[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools.gef] problem in using the retargatable action
|
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().getActiveWorkbenchWindow()));
getViewSite().getActionBars().updateActionBars();