problem in using the retargatable action [message #210648] |
Thu, 02 March 2006 16:17 |
Rohit Khariwal Messages: 114 Registered: July 2009 |
Senior Member |
|
|
hi,
I have added one action in the menu bar from the fillActionBar() method of the ApplicationActionBarAdvisor.
my code:-
action=new RetargetAction("Action1","Action1");
register(retargetaction);
MenuManager fileMenu = new MenuManager("&File",
IWorkbenchActionConstants.M_FILE);
menuBar.add(fileMenu);
fileMenu.add(action);
and in the view i am trying to bind it with action using globalActionHandler but it is not working. menubar always shows the action disabled.
code:-
getViewSite().getActionBars().setGlobalActionHandler("Action1 ",new createAction(PlatformUI.getWorkbench().getActiveWorkbenchWin dow()));
getViewSite().getActionBars().updateActionBars();
|
|
|
Powered by
FUDForum. Page generated in 0.02632 seconds