java - Eclipse-Plugin with submenu. How to handle JavaProjects and Projects? -


I want to write an Eclipse-Plugin that works with a selected project. I used the plugin template with submenu on my plugin XML looks like this:

  extension point = "org.eclipse.ui.popupMenus" & gt; & Lt; Object Controlling Object Class = "org.eclipse.core.internal.resources.Project" id = "testplugin2.contribution1" & gt; & Lt; Menu label = "multiplier manager" path = "extra" id = "testplugin2.menu1" & gt; & Lt; Separator name = "group 1" & gt; & Lt; / Separator & gt; & Lt; / Menu & gt; & Lt; Action labels = "list all * .properties" class = "testplugin2.popup.actions.ListPropertiesAction" menupath = "testplugin 2.menu1 / group1" enabled = "1" id = "testplugin 2.project action" & gt; & Lt; / Action & gt; & Lt; / ObjectContribution & gt; & Lt; / Extension & gt;  

This works fine for everything but the Java project has detected that Java projects are not a project. I want this action to appear when a Java project or a normal project is chosen and not, if something else is selected.

How can I reveal submenu properly if Java project or any project is selected?

I did not test it, but it probably works:

 < Code> & lt; The object's contribution ... & gt; & Lt; Visibility & gt; & Lt; Object class name = "org.eclipse.jdt.core.IJavaProject" / & gt; & Lt; / Visibility & gt; & Lt; / ObjectContribution & gt; 

P>

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -