Stefan, Peppe .. here is an example just for you. the idea of the iconified interface (as well as the EnableChecked) is that we do _not_ have to define them manually during featureinstaller installation anymore. instead plugin can implement these interfaces (sets of methods) and if the feature installer comes across a plugin to install where icon or enablecheck is null (not specified) it checks the plugin if it implements the interface and if yes it asks it for the icon or check. nifty heh ;)
ok here the example. i left the old addMainMenuItem() commented for you to compare. .. ede Modified: core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/analysis/SpatialQueryPlugIn.java =================================================================== --- core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/analysis/SpatialQueryPlugIn.java 2013-04-06 18:57:10 UTC (rev 3476) +++ core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/analysis/SpatialQueryPlugIn.java 2013-04-06 19:00:39 UTC (rev 3477) @@ -94,18 +94,18 @@ return I18N.get("ui.plugin.analysis.SpatialQueryPlugIn.Spatial-Query"); } + public ImageIcon getIcon(){ + return IconLoader.icon("spatial_query.png"); + } + public void initialize(PlugInContext context) throws Exception { - context.getFeatureInstaller().addMainMenuItem(this, - new String[]{MenuNames.TOOLS, MenuNames.TOOLS_QUERIES}, - this.getName() + "...", false, IconLoader.icon("spatial_query.png"), - createEnableCheck(context.getWorkbenchContext())); - - /* FeatureInstaller featureInstaller = new FeatureInstaller(context.getWorkbenchContext()); - featureInstaller.addMainMenuItem( - this, - new String[] {MenuNames.TOOLS, MenuNames.TOOLS_QUERIES}, - new JMenuItem(this.getName() + "..."), - createEnableCheck(context.getWorkbenchContext()));*/ +// context.getFeatureInstaller().addMainMenuItem(this, +// new String[] { MenuNames.TOOLS, MenuNames.TOOLS_QUERIES }, +// this.getName() + "...", false, IconLoader.icon("spatial_query.png"), +// createEnableCheck(context.getWorkbenchContext())); + FeatureInstaller.getInstance().addMainMenuPlugin(this, + new String[] { MenuNames.TOOLS, MenuNames.TOOLS_QUERIES }); + } public static MultiEnableCheck createEnableCheck(WorkbenchContext workbenchContext) { @@ -245,6 +245,3 @@ } } - - - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html _______________________________________________ Jump-pilot-svn-notify mailing list jump-pilot-svn-not...@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-svn-notify ------------------------------------------------------------------------------ Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel