Revision 3654
trunk/frameworks/_fwAndami/src/com/iver/andami/Launcher.java | ||
---|---|---|
154 | 154 |
System.exit(-1); |
155 | 155 |
} |
156 | 156 |
|
157 |
if ((args.length < 1) || (args.length > 3)) {
|
|
157 |
if (args.length < 1) {
|
|
158 | 158 |
System.err.println("Uso: Launcher appName plugins-directory [locale]"); |
159 | 159 |
} |
160 | 160 |
|
... | ... | |
191 | 191 |
// Directorio de las extensiones |
192 | 192 |
andamiConfigFromXML(andamiConfigPath); |
193 | 193 |
andamiConfig.setPluginsDirectory(args[1]); |
194 |
|
|
195 |
// Hacemos visibles los argumentos como una propiedad est?tica |
|
196 |
// de plugin services para quien lo quiera usar (por ejemplo, para |
|
197 |
// cargar un proyecto por l?nea de comandos) |
|
198 |
PluginServices.setArguments(args); |
|
194 | 199 |
|
195 | 200 |
// Configurar el locale |
196 | 201 |
String localeStr = ""; |
trunk/frameworks/_fwAndami/src/com/iver/andami/PluginServices.java | ||
---|---|---|
72 | 72 |
*/ |
73 | 73 |
public class PluginServices { |
74 | 74 |
private static Logger logger = Logger.getLogger(PluginServices.class.getName()); |
75 |
private static String[] arguments; |
|
76 |
|
|
75 | 77 |
private PluginClassLoader loader; |
76 | 78 |
private PropertyResourceBundle resourceBundle; |
77 | 79 |
private XMLEntity persistentXML; |
80 |
|
|
81 |
|
|
78 | 82 |
|
79 | 83 |
/** |
80 | 84 |
* Crea un nuevo PluginServices |
... | ... | |
258 | 262 |
} |
259 | 263 |
} |
260 | 264 |
|
265 |
|
|
261 | 266 |
/** |
262 | 267 |
* Establece los datos del plugin que deber?n persistir entre ejecuciones |
263 | 268 |
* en formato xml |
... | ... | |
404 | 409 |
} */ |
405 | 410 |
} |
406 | 411 |
} |
412 |
|
|
413 |
/** |
|
414 |
* Usually appName plugins-directory [locale] [other args] |
|
415 |
* @return the original arguments that Andami received. (app-name plugins-directory, locale, etc) |
|
416 |
*/ |
|
417 |
public static String[] getArguments() { |
|
418 |
return arguments; |
|
419 |
} |
|
420 |
|
|
421 |
public static void setArguments(String[] arguments) { |
|
422 |
PluginServices.arguments = arguments; |
|
423 |
} |
|
407 | 424 |
} |
Also available in: Unified diff