Changeset 200
- Timestamp:
- 09/26/11 22:56:36 (13 years ago)
- Location:
- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/swt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/swt/CommandHistoryDialog.java
r195 r200 24 24 import de.ugoe.cs.util.console.CommandExecuter; 25 25 import de.ugoe.cs.util.console.Console; 26 import de.ugoe.cs.util.console.ConsoleObserver; 26 import de.ugoe.cs.util.console.listener.ICommandListener; 27 27 28 import org.eclipse.swt.events.DisposeListener; 28 29 import org.eclipse.swt.events.DisposeEvent; … … 30 31 import org.eclipse.swt.events.SelectionEvent; 31 32 32 public class CommandHistoryDialog extends Dialog implements ConsoleObserver {33 public class CommandHistoryDialog extends Dialog implements ICommandListener { 33 34 34 35 protected java.util.List<String> history = new LinkedList<String>(); … … 49 50 setText("Command History"); 50 51 isOpen = false; 51 Console.getInstance().register Observer(this);52 Console.getInstance().registerCommandListener(this); 52 53 } 53 54 … … 160 161 161 162 @Override 162 public void updateText(String newMessage) {163 // ignore164 }165 166 @Override167 public void errStream(String errMessage) {168 // ignore169 }170 171 @Override172 public void trace(String traceMessage) {173 // ignore174 }175 176 @Override177 public void printStacktrace(Exception e) {178 // ignore179 180 }181 182 @Override183 163 public void commandNotification(String command) { 184 164 history.add(command); -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/swt/SWTConsole.java
r192 r200 5 5 import de.ugoe.cs.util.StringTools; 6 6 import de.ugoe.cs.util.console.Console; 7 import de.ugoe.cs.util.console.ConsoleObserver; 7 import de.ugoe.cs.util.console.listener.ICommandListener; 8 import de.ugoe.cs.util.console.listener.IErrorListener; 9 import de.ugoe.cs.util.console.listener.IOutputListener; 10 import de.ugoe.cs.util.console.listener.ITraceListener; 8 11 9 public class SWTConsole implements ConsoleObserver {12 public class SWTConsole implements IOutputListener, IErrorListener, ITraceListener, ICommandListener { 10 13 11 14 Text output; 12 15 13 16 public SWTConsole(Text output) { 14 Console.getInstance().registerObserver(this); 17 Console.getInstance().registerOutputListener(this); 18 Console.getInstance().registerErrorListener(this); 19 Console.getInstance().registerTraceListener(this); 20 Console.getInstance().registerCommandListener(this); 15 21 this.output = output; 16 22 } … … 31 37 output.append(traceMessage); 32 38 } 33 34 @Override35 public void printStacktrace(Exception e) {36 // TODO print stacktrace37 }38 39 39 40 @Override
Note: See TracChangeset
for help on using the changeset viewer.