|
From: Hirzel P. <ph...@us...> - 2005-12-22 12:31:27
|
Update of /cvsroot/tcotool/TCO-Tool/src/org/tcotool/pluginsupport In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29141/src/org/tcotool/pluginsupport Modified Files: PluginUtility.java Log Message: Refactoring #invokePlugins() for better reusability Index: PluginUtility.java =================================================================== RCS file: /cvsroot/tcotool/TCO-Tool/src/org/tcotool/pluginsupport/PluginUtility.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PluginUtility.java 16 Dec 2005 09:27:43 -0000 1.3 --- PluginUtility.java 22 Dec 2005 12:31:16 -0000 1.4 *************** *** 43,47 **** */ public final class PluginUtility { - public static final String CORE_PLUGIN_ID = "org.tcotool.core.runtime"; private static final String PLUGINS_FOLDER = "./plugins"; private static final String DATA_FOLDER = "./data"; --- 43,46 ---- *************** *** 50,60 **** /** * Scan for available Plugins for e.g. at startup and ! * register them. The ApplicationCore-Plugin will then ! * be initialized. ! * @param args no arguments expected * @throws Exception if any error occurred * @see org.tcotool.core.runtime.ApplicationPlugin */ ! public static PluginManager invokePlugins() throws Exception { try { // suppress any logs by commons-logging.jar --- 49,58 ---- /** * Scan for available Plugins for e.g. at startup and ! * register them. The ApplicationCore-Plugin must be passed. ! * @param corePluginId Id of an extension-Point * @throws Exception if any error occurred * @see org.tcotool.core.runtime.ApplicationPlugin */ ! public static PluginManager invokePlugins(final String corePluginId) throws Exception { try { // suppress any logs by commons-logging.jar *************** *** 120,126 **** // get the start-up plug-in (plugin-id => see plugin.xml) ! Plugin corePlugin = pluginManager.getPlugin(CORE_PLUGIN_ID); if (corePlugin == null) { ! throw new Exception("can't get Plugin: " + CORE_PLUGIN_ID); } // Now we are ready to RUN! Let's do it! --- 118,124 ---- // get the start-up plug-in (plugin-id => see plugin.xml) ! Plugin corePlugin = pluginManager.getPlugin(corePluginId); if (corePlugin == null) { ! throw new Exception("can't get Plugin: " + corePluginId); } // Now we are ready to RUN! Let's do it! |