protected void setGlobalAction(String actionID, IAction action) { IActionBars actionBars = getViewSite().getActionBars(); fGlobalActions.put(actionID, action); actionBars.setGlobalActionHandler(actionID, action); }
@Override public void focusLost(FocusEvent e){ // Do not reset the selection provider with the provider proxy. // This should allow toolbar actions to remain active when the view // is de-activated but still visible. // Bug 316850. clearGlobalActions(); getViewSite().getActionBars().updateActionBars(); } });
@Override public void init(IViewSite site, IMemento memento) throws PartInitException { super.init(site, memento); IMenuManager menuManager= site.getActionBars().getMenuManager(); createViewMenuGroups(menuManager); fPageState= memento; }
@Override public void focusLost(FocusEvent e) { if (fViewCopyHandler != null) { IActionBars actionBars= viewSite.getActionBars(); actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), fViewCopyHandler); actionBars.updateActionBars(); fViewCopyHandler= null; } }
@Override public void focusLost(FocusEvent e) { if (fViewCopyHandler != null) { IActionBars actionBars= viewSite.getActionBars(); actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), fViewCopyHandler); actionBars.updateActionBars(); fViewCopyHandler= null; } }
/** * Called when an element is removed. * @param server org.eclipse.wst.server.core.IServer */ protected void handleServerResourceRemoved(IServer server) { remove(server); String serverId = server.getId(); publishing.remove(serverId); view.getViewSite().getActionBars().getStatusLineManager().setMessage(null, null); }
/** * Clears the status line of all messages and errors */ protected void clearStatusLine() { IStatusLineManager manager = getViewSite().getActionBars().getStatusLineManager(); manager.setErrorMessage(null); manager.setMessage(null); }
private void initializeToolBar() { IToolBarManager tbm = getViewSite().getActionBars().getToolBarManager(); tbm.add( expandAll ); tbm.add( collapseAll ); }
private void initializeToolBar() { IToolBarManager tbm= getViewSite().getActionBars().getToolBarManager(); createToolBarGroups(tbm); tbm.appendToGroup(IContextMenuConstants.GROUP_SEARCH, fSearchAgainAction); tbm.appendToGroup(IContextMenuConstants.GROUP_SEARCH, fCancelAction); tbm.appendToGroup(IContextMenuConstants.GROUP_SEARCH, fSearchesDropDownAction); tbm.appendToGroup(IContextMenuConstants.GROUP_SEARCH, fPinSearchViewAction); getViewSite().getActionBars().updateActionBars(); }
private void initializeToolBar() { IToolBarManager tbm= getViewSite().getActionBars().getToolBarManager(); createToolBarGroups(tbm); tbm.appendToGroup(IContextMenuConstants.GROUP_SEARCH, fSearchAgainAction); tbm.appendToGroup(IContextMenuConstants.GROUP_SEARCH, fCancelAction); tbm.appendToGroup(IContextMenuConstants.GROUP_SEARCH, fSearchesDropDownAction); tbm.appendToGroup(IContextMenuConstants.GROUP_SEARCH, fPinSearchViewAction); getViewSite().getActionBars().updateActionBars(); }
public void init(IViewSite site, IMemento memento) throws PartInitException { super.init(site, memento); IMenuManager menuManager= site.getActionBars().getMenuManager(); createViewMenuGroups(menuManager); fPageState= memento; IWorkbenchSiteProgressService progressService= getProgressService(); if (progressService != null) progressService.showBusyForFamily(InternalSearchUI.FAMILY_SEARCH); }
/** * Creates view toolbar. */ private void createViewToolbar() { toolBarManager = getViewSite().getActionBars().getToolBarManager(); ShowHideInactiveInstrumentationsAction showHideInactiveInstrumentationsAction = new ShowHideInactiveInstrumentationsAction(); toolBarManager.add(showHideInactiveInstrumentationsAction); collapseAction = new CollapseAction(); toolBarManager.add(collapseAction); }
/** * Creates the view tool-bar. */ private void createViewToolbar() { IToolBarManager toolBarManager = getViewSite().getActionBars().getToolBarManager(); toolBarManager.add(new ShowAgentsAction()); toolBarManager.add(new ShowPropertiesAction()); toolBarManager.add(new Separator()); }
private void createSelectAllAction() { IActionBars actionBars= getViewSite().getActionBars(); if (isInListState()) { fSelectAllAction= new SelectAllAction((TableViewer)fWrappedViewer.getViewer()); actionBars.setGlobalActionHandler(ActionFactory.SELECT_ALL.getId(), fSelectAllAction); } else { actionBars.setGlobalActionHandler(ActionFactory.SELECT_ALL.getId(), null); fSelectAllAction= null; } actionBars.updateActionBars(); }
private void createSelectAllAction() { IActionBars actionBars= getViewSite().getActionBars(); if (isInListState()) { fSelectAllAction= new SelectAllAction((TableViewer)fWrappedViewer.getViewer()); actionBars.setGlobalActionHandler(ActionFactory.SELECT_ALL.getId(), fSelectAllAction); } else { actionBars.setGlobalActionHandler(ActionFactory.SELECT_ALL.getId(), null); fSelectAllAction= null; } actionBars.updateActionBars(); }
protected void fillActionBars(IActionBars actionBars) { IToolBarManager toolBar= actionBars.getToolBarManager(); fillToolBar(toolBar); if (fHasWorkingSetFilter) fWorkingSetFilterActionGroup.fillActionBars(getViewSite().getActionBars()); actionBars.updateActionBars(); fActionGroups.fillActionBars(actionBars); if (fHasCustomFilter) fCustomFiltersActionGroup.fillActionBars(actionBars); IMenuManager menu= actionBars.getMenuManager(); menu.add(fToggleLinkingAction); }
protected void fillActionBars(IActionBars actionBars) { IToolBarManager toolBar= actionBars.getToolBarManager(); fillToolBar(toolBar); if (fHasWorkingSetFilter) fWorkingSetFilterActionGroup.fillActionBars(getViewSite().getActionBars()); actionBars.updateActionBars(); fActionGroups.fillActionBars(actionBars); if (fHasCustomFilter) fCustomFiltersActionGroup.fillActionBars(actionBars); IMenuManager menu= actionBars.getMenuManager(); menu.add(fToggleLinkingAction); }
private void updateStatus(ISelection selection) { IStatusLineManager status = getViewSite().getActionBars().getStatusLineManager(); if (selection.isEmpty()) status.setMessage(null); else { Object element = ((IStructuredSelection) selection).getFirstElement(); status.setMessage(((LogViewLabelProvider) fFilteredTree.getViewer().getLabelProvider()).getColumnText(element, 0)); } }
@Override public final void createPartControl(Composite parent) { internalCreatePartControl(parent); inititalizeColors(); getSite().getWorkbenchWindow().getPartService().addPartListener(fPartListener); createContextMenu(); createActions(); fillActionBars(getViewSite().getActionBars()); PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), getHelpContextId()); }
@Override public final void createPartControl(Composite parent) { internalCreatePartControl(parent); inititalizeColors(); getSite().getWorkbenchWindow().getPartService().addPartListener(fPartListener); createContextMenu(); createActions(); fillActionBars(getViewSite().getActionBars()); PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), getHelpContextId()); }