
Educators: Earn a free Gold upgrade by joining the PBwiki Back To School Challenge.

Questions? Join PBwiki's weekly office hours today at 1 PM Eastern and get live answers.
Let's say there is a built-in menu item that executes some functionality that you want to access or duplicate in your own code. How do you find out where the code executed by the menu item resides?
If it is a built-in menu item you need to look at the configureMainMenus method of the JUMPConfiguration class. (This is a private method so you will actually need to look at the source code, the Javadoc won't help you much, if at all.)
As an example, I was interested in seeing how the code that copied selected features and then pasted them to another Layer worked. Once I opened the JUMPConfiguration class in my Eclipse IDE I did a search for "edit". This brought me to the section of the method that creates the menu items in the "Edit" top-level menue. I found the code I wanted to examine was in the CopySelectedItemsPlugIn and the PasteItemsPlugIn.
In summary, here are the simple steps to locate the code executed by a built-in menu function:
Note: This method will not work for menu items that are contributed by third party plug-ins.
Page Information
|
Wiki Information |
Recent PBwiki Blog Posts |