Changeset 581
- Timestamp:
- 08/21/12 11:06:25 (12 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 1 deleted
- 5 edited
- 12 copied
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/quest-plugin-mfc/pom.xml
r516 r581 20 20 <version>0.0.1-SNAPSHOT</version> 21 21 </dependency> 22 <dependency> 23 <groupId>commons-codec</groupId> 24 <artifactId>commons-codec</artifactId> 25 <version>1.6</version> 26 </dependency> 27 <dependency> 28 <groupId>net.sourceforge.collections</groupId> 29 <artifactId>collections-generic</artifactId> 30 <version>4.01</version> 31 </dependency> 32 <dependency> 33 <groupId>jdom</groupId> 34 <artifactId>jdom</artifactId> 35 <version>1.1</version> 36 </dependency> 37 <dependency> 38 <groupId>de.ugoe.cs.quest</groupId> 39 <artifactId>quest-core-events</artifactId> 40 <version>0.0.1-SNAPSHOT</version> 41 </dependency> 42 <dependency> 43 <groupId>de.ugoe.cs.quest</groupId> 44 <artifactId>quest-ui-core</artifactId> 45 <version>0.0.1-SNAPSHOT</version> 46 </dependency> 22 47 </dependencies> 23 48 <build> … … 31 56 </configuration> 32 57 </plugin> 58 <plugin> 59 <artifactId>maven-assembly-plugin</artifactId> 60 <version>2.2-beta-2</version> 61 <configuration> 62 <descriptors> 63 <descriptor>src/main/assembly/config.xml</descriptor> 64 </descriptors> 65 </configuration> 66 <executions> 67 <execution> 68 <id>make-assembly</id> 69 <phase>package</phase> 70 <goals> 71 <goal>single</goal> 72 </goals> 73 </execution> 74 </executions> 75 </plugin> 33 76 </plugins> 34 77 </build> -
trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/EventGenerator.java
r580 r581 116 116 /** 117 117 * <p> 118 * Creates a new EventGenerator. Sets " rules/rules.xml" as default file for118 * Creates a new EventGenerator. Sets "data/rules.xml" as default file for 119 119 * the rules. 120 120 * </p> 121 121 */ 122 122 public EventGenerator() { 123 rulesFile = " rules/rules.xml";123 rulesFile = "data/rules.xml"; 124 124 } 125 125 -
trunk/quest-runner/pom.xml
r579 r581 141 141 <artifactId>quest-plugin-guitar</artifactId> 142 142 <version>0.0.1-SNAPSHOT</version> 143 <destination>${project.build.directory}/plugins/quest-plugin-guitar .jar</destination>143 <destination>${project.build.directory}/plugins/quest-plugin-guitar-0.0.1.jar</destination> 144 144 </configuration> 145 145 </execution> … … 154 154 <artifactId>quest-plugin-jfc</artifactId> 155 155 <version>0.0.1-SNAPSHOT</version> 156 <destination>${project.build.directory}/plugins/quest-plugin-jfc .jar</destination>156 <destination>${project.build.directory}/plugins/quest-plugin-jfc-0.0.1.jar</destination> 157 157 </configuration> 158 158 </execution> … … 167 167 <artifactId>quest-plugin-mfc</artifactId> 168 168 <version>0.0.1-SNAPSHOT</version> 169 <destination>${project.build.directory}/plugins/quest-plugin-mfc.jar</destination> 169 <destination>${project.build.directory}/plugins/quest-plugin-mfc-0.0.1.jar</destination> 170 </configuration> 171 </execution> 172 <execution> 173 <id>get-mfc-plugin-config</id> 174 <phase>process-classes</phase> 175 <goals> 176 <goal>unpack</goal> 177 </goals> 178 <configuration> 179 <artifactItems> 180 <artifactItem> 181 <groupId>de.ugoe.cs.quest</groupId> 182 <artifactId>quest-plugin-mfc</artifactId> 183 <version>0.0.1-SNAPSHOT</version> 184 <classifier>config</classifier> 185 <type>zip</type> 186 <outputDirectory>${project.build.directory}/data</outputDirectory> 187 </artifactItem> 188 </artifactItems> 170 189 </configuration> 171 190 </execution> … … 180 199 <artifactId>quest-plugin-php</artifactId> 181 200 <version>0.0.1-SNAPSHOT</version> 182 <destination>${project.build.directory}/plugins/quest-plugin-php .jar</destination>201 <destination>${project.build.directory}/plugins/quest-plugin-php-0.0.1.jar</destination> 183 202 </configuration> 184 203 </execution> -
trunk/quest-runner/src/main/assembly/bin.xml
r579 r581 6 6 <formats> 7 7 <format>tar.gz</format> 8 <format>dir</format> 8 9 <!-- format>tar.bz2</format> 9 10 <format>zip</format--> -
trunk/quest-runner/src/main/java/de/ugoe/cs/quest/ui/Runner.java
r579 r581 1 1 2 package de.ugoe.cs.quest.ui; 2 3 … … 30 31 public class Runner { 31 32 32 33 34 33 public enum UITYPE { 34 text, swt 35 }; 35 36 36 37 38 37 public enum LOG4JTYPE { 38 enable, disable 39 } 39 40 40 41 42 43 44 45 46 * if parameters are defined, they are interpreted as commands 47 * for the {@link Console} and executed before the user can use 48 * the console; can be used toperform batch operations49 50 41 /** 42 * <p> 43 * Main method of the application. 44 * </p> 45 * 46 * @param args 47 * if parameters are defined, they are interpreted as commands for the 48 * {@link Console} and executed before the user can use the console; can be used to 49 * perform batch operations 50 */ 51 public static void main(String[] args) { 51 52 52 CommandExecuter.getInstance().addCommandPackage( 53 "de.ugoe.cs.quest.ui.commands"); 54 CommandExecuter.getInstance().addCommandPackage( 55 "de.ugoe.cs.quest.ui.swt.commands"); 53 CommandExecuter.getInstance().addCommandPackage("de.ugoe.cs.quest.ui.commands"); 54 CommandExecuter.getInstance().addCommandPackage("de.ugoe.cs.quest.ui.swt.commands"); 56 55 57 // The following four command packages are added automatically, once the 58 // plugin-mechanism works correctly. Hence, these calls should be 59 // removed then. 60 CommandExecuter.getInstance().addCommandPackage( 61 "de.ugoe.cs.quest.plugin.mfc.commands"); 62 CommandExecuter.getInstance().addCommandPackage( 63 "de.ugoe.cs.quest.plugin.php.commands"); 64 CommandExecuter.getInstance().addCommandPackage( 65 "de.ugoe.cs.quest.plugin.guitar.commands"); 66 CommandExecuter.getInstance().addCommandPackage( 67 "de.ugoe.cs.quest.plugin.jfc.commands"); 68 69 int i; 70 if(false) { 71 int j; 72 } 73 74 new java.util.Date().getDate(); 56 // The following four command packages are added automatically, once the 57 // plugin-mechanism works correctly. Hence, these calls should be 58 // removed then. 59 /* 60 * CommandExecuter.getInstance().addCommandPackage( "de.ugoe.cs.quest.plugin.mfc.commands"); 61 * CommandExecuter.getInstance().addCommandPackage( "de.ugoe.cs.quest.plugin.php.commands"); 62 * CommandExecuter.getInstance().addCommandPackage( 63 * "de.ugoe.cs.quest.plugin.guitar.commands"); 64 * CommandExecuter.getInstance().addCommandPackage( "de.ugoe.cs.quest.plugin.jfc.commands"); 65 */ 75 66 76 /* 77 * Code for loading plugins. Should be uncommented once the 78 * plugin-mechanism works correctly. 79 * TODO: uncomment as soon as plug-in mechanism works 80 * 81 * PluginLoader pluginLoader = new PluginLoader(new File("plugins")); 82 * pluginLoader.load(); 83 * 84 * for( QuestPlugin plugin : pluginLoader.getPlugins()) { for( String 85 * commandPackage : plugin.getCommandPackages()) { 86 * CommandExecuter.getInstance().addCommandPackage(commandPackage); } } 87 */ 67 PluginLoader pluginLoader = new PluginLoader(new File("plugins")); 68 pluginLoader.load(); 88 69 89 OptionParser parser = new OptionParser(); 90 OptionSpec<LOG4JTYPE> log4j = parser 91 .accepts("log4j", "Allowed values: enable, disable") 92 .withRequiredArg().ofType(LOG4JTYPE.class) 93 .defaultsTo(LOG4JTYPE.enable); 94 OptionSpec<UITYPE> ui = parser 95 .accepts("ui", "Allowed values: text, swt").withRequiredArg() 96 .ofType(UITYPE.class).defaultsTo(UITYPE.text); 97 OptionSpec<LOG4JTYPE> trace = parser 98 .accepts("trace", "Allowed values: enable, disable") 99 .withRequiredArg().ofType(LOG4JTYPE.class) 100 .defaultsTo(LOG4JTYPE.enable); 101 OptionSet options = parser.parse(args); 70 for (QuestPlugin plugin : pluginLoader.getPlugins()) { 71 for (String commandPackage : plugin.getCommandPackages()) { 72 CommandExecuter.getInstance().addCommandPackage(commandPackage); 73 } 74 } 102 75 103 List<String> startupCommands = options.nonOptionArguments(); 104 try { 105 switch (options.valueOf(log4j)) { 106 case enable: 107 new Log4JLogger(); 108 break; 109 case disable: 110 // do nothing 111 break; 112 default: 113 throw new AssertionError( 114 "reached source code that should be unreachable"); 115 } 76 OptionParser parser = new OptionParser(); 77 OptionSpec<LOG4JTYPE> log4j = 78 parser.accepts("log4j", "Allowed values: enable, disable").withRequiredArg() 79 .ofType(LOG4JTYPE.class).defaultsTo(LOG4JTYPE.enable); 80 OptionSpec<UITYPE> ui = 81 parser.accepts("ui", "Allowed values: text, swt").withRequiredArg() 82 .ofType(UITYPE.class).defaultsTo(UITYPE.text); 83 OptionSpec<LOG4JTYPE> trace = 84 parser.accepts("trace", "Allowed values: enable, disable").withRequiredArg() 85 .ofType(LOG4JTYPE.class).defaultsTo(LOG4JTYPE.enable); 86 OptionSet options = parser.parse(args); 116 87 117 switch (options.valueOf(ui)) { 118 case text: 119 TextConsole textConsole = new TextConsole(); 120 if (options.valueOf(trace) == LOG4JTYPE.disable) { 121 textConsole.setDebug(false); 122 } 123 for (String command : startupCommands) { 124 CommandExecuter.getInstance().exec(command); 125 } 126 textConsole.run(true); 127 break; 128 case swt: 129 MainWindow mainWindow = new MainWindow(startupCommands); 130 mainWindow.open(); 131 break; 132 default: 133 throw new AssertionError( 134 "reached source code that should be unreachable"); 135 } 136 } catch (OptionException e) { 137 System.err.println("Invalid Parameters: " + e.getMessage()); 138 try { 139 parser.printHelpOn(System.out); 140 } catch (IOException e1) { 141 // ignore exception. 142 } 143 } 144 } 88 List<String> startupCommands = options.nonOptionArguments(); 89 try { 90 switch (options.valueOf(log4j)) 91 { 92 case enable: 93 new Log4JLogger(); 94 break; 95 case disable: 96 // do nothing 97 break; 98 default: 99 throw new AssertionError("reached source code that should be unreachable"); 100 } 101 102 switch (options.valueOf(ui)) 103 { 104 case text: 105 TextConsole textConsole = new TextConsole(); 106 if (options.valueOf(trace) == LOG4JTYPE.disable) { 107 textConsole.setDebug(false); 108 } 109 for (String command : startupCommands) { 110 CommandExecuter.getInstance().exec(command); 111 } 112 textConsole.run(true); 113 break; 114 case swt: 115 MainWindow mainWindow = new MainWindow(startupCommands); 116 mainWindow.open(); 117 break; 118 default: 119 throw new AssertionError("reached source code that should be unreachable"); 120 } 121 } 122 catch (OptionException e) { 123 System.err.println("Invalid Parameters: " + e.getMessage()); 124 try { 125 parser.printHelpOn(System.out); 126 } 127 catch (IOException e1) { 128 // ignore exception. 129 } 130 } 131 } 145 132 146 133 } -
trunk/quest-ui-core/pom.xml
r579 r581 65 65 </dependency> 66 66 <dependency> 67 <groupId>commons-codec</groupId>68 <artifactId>commons-codec</artifactId>69 <version>1.6</version>70 </dependency>71 <dependency>72 <groupId>jdom</groupId>73 <artifactId>jdom</artifactId>74 <version>1.1</version>75 </dependency>76 <dependency>77 67 <groupId>edu.umd.cs</groupId> 78 68 <artifactId>guitar-model-core</artifactId>
Note: See TracChangeset
for help on using the changeset viewer.