Ejemplo n.º 1
0
 @Override
 public void init(IPageSite pageSite) {
   super.init(pageSite);
   fShowEnclosingDefinitionsAction = new ShowEnclosingDefinitionsAction();
   IMenuManager menuManager = pageSite.getActionBars().getMenuManager();
   menuManager.add(fShowEnclosingDefinitionsAction);
   menuManager.updateAll(true);
   pageSite.getActionBars().updateActionBars();
 }
 public void setMode(int mode) {
   fMode = mode;
   fActiveActionGroup.cleanViewMenu(fMenuManager);
   PropertyChangeEvent event;
   if (mode == SHOW_PROJECTS) {
     fActiveActionGroup = fFilterActionGroup;
     event = new PropertyChangeEvent(this, MODE_CHANGED, INT_SHOW_WORKING_SETS, INT_SHOW_PROJECTS);
   } else {
     fActiveActionGroup = fShowActionGroup;
     event = new PropertyChangeEvent(this, MODE_CHANGED, INT_SHOW_PROJECTS, INT_SHOW_WORKING_SETS);
   }
   fActiveActionGroup.fillViewMenu(fMenuManager);
   fMenuManager.updateAll(true);
   if (fChangeListener != null) fChangeListener.propertyChange(event);
 }