| pass a parameter in object contribution [message #534656] | 
Wed, 19 May 2010 14:20  | 
 
Eclipse User  | 
 | 
 | 
   | 
 
I have an object contribution like this: 
 
<extension point = "org.eclipse.ui.popupMenus"> 
     <objectContribution 
        id="org.eclipse.ui.examples.readmetool" 
        objectClass="org.eclipse.core.resources.IFile" 
	    nameFilter="*.readme"> 
	    <action id="org.eclipse.ui.examples.readmetool.action1" 
	       label="%PopupMenus.action" 
	       icon="icons/ctool16/openbrwsr.png" 
	       menubarPath="additions" 
	       helpContextId=" org.eclipse.ui.examples.readmetool.open_browser_action_conte xt " 
	       class="org.eclipse.ui.examples.readmetool.PopupMenuActionDelegate " 
 
Is it possible to pass parameter inside the plugin.xml so that the behavior of the class IFile will be different according to the parameter. 
 
Basically I want to contribute to the pop up menu but the code that will be execute is the same for 90% so I don't like to create a new class IFile 2. But I want to reuse it depending on the parameter passed
 |  
 |  
  | 
Powered by 
FUDForum. Page generated in 0.05650 seconds