Changeset 674 for trunk/quest-ui-swt
- Timestamp:
- 08/28/12 16:42:22 (12 years ago)
- Location:
- trunk/quest-ui-swt/src/main/java/de/ugoe/cs/quest/ui/swt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/quest-ui-swt/src/main/java/de/ugoe/cs/quest/ui/swt/MainWindow.java
r658 r674 2 2 3 3 import java.util.List; 4 import java.util.logging.Level; 4 5 5 6 import org.eclipse.swt.widgets.Display; … … 29 30 30 31 private List<String> startupCommands; 32 33 private final Level traceLevel; 31 34 32 35 protected Shell shlEventbenchConsole; … … 45 48 protected CommandHistoryDialog historyDialog; 46 49 47 public MainWindow(List<String> startupCommands ) {50 public MainWindow(List<String> startupCommands, Level traceLevel) { 48 51 this.startupCommands = startupCommands; 52 this.traceLevel = traceLevel; 49 53 } 50 54 … … 59 63 Display display = Display.getDefault(); 60 64 createContents(); 61 new SWTConsole(consoleTabComposite.textConsoleOutput );65 new SWTConsole(consoleTabComposite.textConsoleOutput, traceLevel); 62 66 historyDialog = new CommandHistoryDialog(shlEventbenchConsole, SWT.NONE); 63 67 shlEventbenchConsole.open(); -
trunk/quest-ui-swt/src/main/java/de/ugoe/cs/quest/ui/swt/SWTConsole.java
r655 r674 18 18 { 19 19 20 StyledText output; 20 private StyledText output; 21 22 private Level traceLevel; 21 23 22 public SWTConsole(StyledText styledText ) {24 public SWTConsole(StyledText styledText, Level traceLevel) { 23 25 Console.getInstance().registerOutputListener(this); 24 26 Console.getInstance().registerErrorListener(this); … … 26 28 Console.getInstance().registerCommandListener(this); 27 29 this.output = styledText; 30 this.traceLevel = traceLevel; 28 31 } 29 32 … … 40 43 @Override 41 44 public void traceMsg(String traceMessage, Level level) { 42 appendColored("[" + level.toString() + "] " + traceMessage, SWT.COLOR_BLUE); 45 if( level.intValue()>=traceLevel.intValue()) { 46 appendColored("[" + level.toString() + "] " + traceMessage, SWT.COLOR_BLUE); 47 } 43 48 } 44 49
Note: See TracChangeset
for help on using the changeset viewer.