Re: [JPP-Devel] Unable to load extension on OpenJump
hey Iago, please don't top post On 06.03.2018 17:59, Iago Alonso Alonso wrote: > Hi ede, > > thanks for your respone, after following that guide the plugin now loads! The > problem I see now if that although I specifies the position of the menu, it's > ignored beacuse I've followed the code and found this comment: // we silently > ignore the pos argument as positions are defined in xml or not at all > > So, the menu entry it's set now to the first position (before File, ..., etc > and I want it at the end) and on the XML I've tried something like: > > > .xxxPlugin > 10 > > > But not works. Which XML file refers the comment I have found? check bin/default-plugins.xml for examples. actually the properties file is like default-plugins.xml but just loaded later. something like for the AboutPlugIn com.vividsolutions.jump.workbench.ui.plugin.AboutPlugIn should do the trick. that won't work when packaged as an extension though. in that case yoiu have to give the path during installation in the extension class like context.getFeatureInstaller().addMainMenuPlugin(executable, menuPath, menuItemName, checkBox, icon, enableCheck, pos); you can check com.vividsolutions.jump.workbench.ui.plugin.FeatureInstaller.addMainMenuPlugin(...) javadoc for some explanations. or see eg. com.vividsolutions.jump.plugin.edit.AffineTransformationPlugIn.initialize(...) how it is used. ..ede -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] Unable to load extension on OpenJump
Hi ede, thanks for your respone, after following that guide the plugin now loads! The problem I see now if that although I specifies the position of the menu, it's ignored beacuse I've followed the code and found this comment: // we silently ignore the pos argument as positions are defined in xml or not at all So, the menu entry it's set now to the first position (before File, ..., etc and I want it at the end) and on the XML I've tried something like: .xxxPlugin 10 But not works. Which XML file refers the comment I have found? P.D: By the moment we are testing on a branch because we don't have experience on this project and we are learning, moreover we don't know if all our needs are covered by OpenJump so we are invetigating their capabilities. Regards. El 06-03-2018 05:01 PM, edgar.sol...@web.de escribió: > On 06.03.2018 16:53, Iago Alonso Alonso wrote: > >> Hi, I've downloaded OpenJamp 1.12 and I'm following this two guides to make >> an extension. >> >> http://ojwiki.soldin.de/index.php?title=How_to_make_your_plugin_in_ECLIPSE >> >> http://ojwiki.soldin.de/index.php?title=How_to_create_a_jar_plugin_in_ECLIPSE >> >> I'm creating the extension inside OpenJump, I've downloaded the code from >> the SVN repository and imported to Eclipse. Following the guides I've the >> *xxxPlugin.java* with /execute, initialize, getName/ and /createEnableCheck/ >> methods. Also I have a *xxxExtension.java* with /configure /who calls >> /xxxPlugin().initialize(context);/ >> >> But when I run the application, I can't see my entry on OpenJump. I'm trying >> to make a new menu entry after the "About" option but I don't know how make >> it work. >> >> There is some place where I must register the extension si it can be placed >> as a menu option? Or where I can find a more explained guide to make >> plugins/extensions? > > hey Iago, > > did you > > " > 5 - As you see I have chosen directly the folder \openjump\lib\ext which is > the final place if you want use the plugin. So if you create the jar file > somewhere else then copy it into the \openjump\lib\ext folder. > 6 - Afterwards start OpenJUMP. If you copy the jar file into the \ext folder > and Jump is already running, then the new plugin will not be recognized - > this happens only on program (OpenJUMP) start. > " > > ? > > but for development i'd rather suggest you use this guide > http://ojwiki.soldin.de/index.php?title=How_to_use_a_plugin_with_a_properties_file_in_ECLIPSE > note that you can also add an extension like > > > ch.unizh.geo.degen.HelloWorldExtension > > > which makes it easier to develop extensions in an own project as well. > > also it is suggested to develop against trunk in case you are wanting to > contribute. > > good luck.. ede > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel-- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] Unable to load extension on OpenJump
On 06.03.2018 16:53, Iago Alonso Alonso wrote: > Hi, I've downloaded OpenJamp 1.12 and I'm following this two guides to make > an extension. > > http://ojwiki.soldin.de/index.php?title=How_to_make_your_plugin_in_ECLIPSE > > http://ojwiki.soldin.de/index.php?title=How_to_create_a_jar_plugin_in_ECLIPSE > > I'm creating the extension inside OpenJump, I've downloaded the code from the > SVN repository and imported to Eclipse. Following the guides I've the > *xxxPlugin.java* with /execute, initialize, getName/ and /createEnableCheck/ > methods. Also I have a *xxxExtension.java* with /configure /who calls > /xxxPlugin().initialize(context);/ > > But when I run the application, I can't see my entry on OpenJump. I'm trying > to make a new menu entry after the "About" option but I don't know how make > it work. > > There is some place where I must register the extension si it can be placed > as a menu option? Or where I can find a more explained guide to make > plugins/extensions? > hey Iago, did you " 5 - As you see I have chosen directly the folder \openjump\lib\ext which is the final place if you want use the plugin. So if you create the jar file somewhere else then copy it into the \openjump\lib\ext folder. 6 - Afterwards start OpenJUMP. If you copy the jar file into the \ext folder and Jump is already running, then the new plugin will not be recognized - this happens only on program (OpenJUMP) start. " ? but for development i'd rather suggest you use this guide http://ojwiki.soldin.de/index.php?title=How_to_use_a_plugin_with_a_properties_file_in_ECLIPSE note that you can also add an extension like ch.unizh.geo.degen.HelloWorldExtension which makes it easier to develop extensions in an own project as well. also it is suggested to develop against trunk in case you are wanting to contribute. good luck.. ede -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel