Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > subclipse commit: rev 90 - trunk/subclipse/ui/src/org/tigris/subversion/subclipse/ui/console

subclipse
Discussion topic

Back to topic list

subclipse commit: rev 90 - trunk/subclipse/ui/src/org/tigris/subversion/subclipse/ui/console

Author cchab
Full name chabanois cédric
Date 2003-07-24 14:26:19 PDT
Message Author: cchab
Date: Thu Jul 24 16:26:17 2003
New Revision: 90

Modified:
   trunk/subclipse/ui/s​rc/org/tigris/subver​sion/subclipse/ui/co​nsole/ConsoleView.ja​va
Log:
bug corrected in console : colors of lines were not always related with lines

Modified: trunk/subclipse/ui/s​rc/org/tigris/subver​sion/subclipse/ui/co​nsole/ConsoleView.ja​va
====================​====================​====================​==================
--- trunk/subclipse/ui/s​rc/org/tigris/subver​sion/subclipse/ui/co​nsole/ConsoleView.ja​va (original)
+++ trunk/subclipse/ui/s​rc/org/tigris/subver​sion/subclipse/ui/co​nsole/ConsoleView.ja​va Thu Jul 24 16:26:17 2003
@@ -16,6 +16,7 @@
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
+import java.util.StringTokenizer;
 import java.util.Vector;
 
 import org.eclipse.core.run​time.IStatus;
@@ -351,6 +352,15 @@
         return new Color(display, rgb);
     }
 
+ /**
+ * Appends lines to the console if any views are open.
+ */
+ private static void appendConsoleLines(int type, String lines) {
+ StringTokenizer st = new StringTokenizer(lines,"\n");
+ while (st.hasMoreTokens())
+ appendConsoleLine(ty​pe,st.nextToken());
+ }
+
     /**
      * Appends a line to the console if any views are open.
      */
@@ -452,14 +462,14 @@
         
         public void commandInvoked(String line) {
             commandStarted = System.currentTimeMillis();
- appendConsoleLine(Co​nsoleDocument.DELIMI​TER, Policy.bind("Console​.preExecutionDelimit​er")); //$NON-NLS-1$
- appendConsoleLine(Co​nsoleDocument.COMMAN​D, line);
+ appendConsoleLines(C​onsoleDocument.DELIM​ITER, Policy.bind("Console​.preExecutionDelimit​er")); //$NON-NLS-1$
+ appendConsoleLines(C​onsoleDocument.COMMA​ND, line);
         }
         public void messageLineReceived(String line) {
- appendConsoleLine(Co​nsoleDocument.MESSAG​E, " " + line); //$NON-NLS-1$
+ appendConsoleLines(C​onsoleDocument.MESSA​GE, " " + line); //$NON-NLS-1$
         }
         public void errorLineReceived(String line) {
- appendConsoleLine(Co​nsoleDocument.ERROR,​ " " + line); //$NON-NLS-1$
+ appendConsoleLines(C​onsoleDocument.ERROR​, " " + line); //$NON-NLS-1$
         }
         public void commandCompleted(IStatus status, Exception exception) {
             long commandRuntime = System.currentTimeMillis() - commandStarted;
@@ -477,7 +487,7 @@
                 } else {
                     statusText = Policy.bind("Console.resultOk", time); //$NON-NLS-1$
                 }
- appendConsoleLine(Co​nsoleDocument.STATUS​, statusText);
+ appendConsoleLines(C​onsoleDocument.STATU​S, statusText);
                 IStatus[] children = status.getChildren();
                 if (children.length == 0) {
                     if (!status.isOK())

--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: cvs-unsubscribe@subc​lipse.tigris.org
For additional commands, e-mail: cvs-help at subclipse dot tigris dot org

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

subclipse commit: rev 90 - trunk/subclipse/ui/src/org/tigris/subversion/subclipse/ui/console cchab chabanois cédric 2003-07-24 14:26:19 PDT
Messages per page: