- Timestamp:
- 08/17/12 11:38:43 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/quest-ui-swt/src/main/java/de/ugoe/cs/quest/ui/swt/commands/CMDshowSequences.java
r526 r570 1 1 2 package de.ugoe.cs.quest.ui.swt.commands; 2 3 … … 23 24 public class CMDshowSequences implements Command { 24 25 25 26 27 28 29 30 31 32 33 26 /* 27 * (non-Javadoc) 28 * 29 * @see de.ugoe.cs.util.console.Command#help() 30 */ 31 @Override 32 public void help() { 33 Console.println("Usage: showSequences <sequencesName>"); 34 } 34 35 35 /* 36 * (non-Javadoc) 37 * 38 * @see de.ugoe.cs.util.console.Command#run(java.util.List) 39 */ 40 @Override 41 public void run(List<Object> parameters) { 42 String sequencesName; 43 try { 44 sequencesName = (String) parameters.get(0); 45 } catch (Exception e) { 46 throw new InvalidParameterException(); 47 } 36 /* 37 * (non-Javadoc) 38 * 39 * @see de.ugoe.cs.util.console.Command#run(java.util.List) 40 */ 41 @Override 42 public void run(List<Object> parameters) { 43 String sequencesName; 44 try { 45 sequencesName = (String) parameters.get(0); 46 } 47 catch (Exception e) { 48 throw new InvalidParameterException(); 49 } 48 50 49 Object dataObject = GlobalDataContainer.getInstance().getData( 50 sequencesName); 51 if (dataObject == null) { 52 CommandHelpers.objectNotFoundMessage(sequencesName); 53 return; 54 } 55 if (!SequenceInstanceOf.isCollectionOfSequences(dataObject)) { 56 CommandHelpers.objectNotType(sequencesName, 57 "Collection<List<Event<?>>>"); 58 return; 59 } 51 Object dataObject = GlobalDataContainer.getInstance().getData(sequencesName); 52 if (dataObject == null) { 53 CommandHelpers.objectNotFoundMessage(sequencesName); 54 return; 55 } 56 if (!SequenceInstanceOf.isCollectionOfSequences(dataObject)) { 57 CommandHelpers.objectNotType(sequencesName, "Collection<List<Event<?>>>"); 58 return; 59 } 60 60 61 62 63 64 65 66 67 68 61 Shell shell = new Shell(SWT.NONE); 62 shell.open(); 63 shell.layout(); 64 shell.setSize(0, 0); 65 SequencesDialog sequencesDialog = new SequencesDialog(shell, SWT.NONE); 66 sequencesDialog.open(sequencesName); 67 shell.dispose(); 68 } 69 69 }
Note: See TracChangeset
for help on using the changeset viewer.