Hi all!

I got only one plugin with diferents menu items, each of them call a diferent 
method. Therefore inside the method execute(PlugInContext context) ¿how can i 
know which button is pressed? so i can call the correct method.

********
public void initialize(PlugInContext context) throws Exception {
        FeatureInstaller featureInstaller = new 
FeatureInstaller(context.getWorkbenchContext());
        featureInstaller.addMainMenuItem(
                this,                                
                new String[] {"My Plugin"},     
                "nameFunction1", 
                false, 
                null,
                createEnableCheck(context.getWorkbenchContext()));
        featureInstaller.addMainMenuItem(

                this,                                

                new String[] {"My Plugin"},     

                "nameFunction2", 

                false, 

                null,

                createEnableCheck(context.getWorkbenchContext()));
    }

public boolean execute(PlugInContext context) throws Exception { 
       ¿which command has the user pressed? nameFunction1 or nameFunction2 ?
     }
********

Thanks!
                                          
_________________________________________________________________

------------------------------------------------------------------------------

_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to