- Timestamp:
- 09/09/11 06:23:36 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDprintDot.java
r26 r171 9 9 import de.ugoe.cs.util.console.Console; 10 10 11 /** 12 * <p> 13 * Command that prints a dot representation of a model (if supported) to the 14 * console. 15 * </p> 16 * 17 * @author Steffen Herbold 18 * @version 1.0 19 */ 11 20 public class CMDprintDot implements Command { 12 21 22 /* 23 * (non-Javadoc) 24 * 25 * @see de.ugoe.cs.util.console.Command#help() 26 */ 13 27 @Override 14 28 public void help() { … … 16 30 } 17 31 32 /* 33 * (non-Javadoc) 34 * 35 * @see de.ugoe.cs.util.console.Command#run(java.util.List) 36 */ 18 37 @Override 19 38 public void run(List<Object> parameters) { … … 24 43 throw new InvalidParameterException(); 25 44 } 26 27 IDotCompatible model = null; 28 Object dataObject = GlobalDataContainer.getInstance().getData(modelname); 29 if( dataObject==null ) { 45 46 IDotCompatible model = null; 47 Object dataObject = GlobalDataContainer.getInstance() 48 .getData(modelname); 49 if (dataObject == null) { 30 50 Console.println("Model " + modelname + "not found in storage."); 31 } 32 else if( !(dataObject instanceof IDotCompatible) ) {33 Console.println("Object " + modelname+ " does not implement IDotCompatible!");51 } else if (!(dataObject instanceof IDotCompatible)) { 52 Console.println("Object " + modelname 53 + " does not implement IDotCompatible!"); 34 54 } else { 35 55 model = (IDotCompatible) dataObject;
Note: See TracChangeset
for help on using the changeset viewer.