/** * Returns a <code>ToolBarManager</code> if the given parent is a * <code>CompareViewerPane</code> or <code>null</code> otherwise. * * @param parent a <code>Composite</code> or <code>null</code> * @return a <code>ToolBarManager</code> if the given parent is a <code>CompareViewerPane</code> otherwise <code>null</code> */ public static ToolBarManager getToolBarManager(Composite parent) { if (parent instanceof CompareViewerPane) { CompareViewerPane pane= (CompareViewerPane) parent; return pane.getToolBarManager(); } return null; }
/** * Returns a <code>ToolBarManager</code> if the given parent is a * <code>CompareViewerPane</code> or <code>null</code> otherwise. * * @param parent a <code>Composite</code> or <code>null</code> * @return a <code>ToolBarManager</code> if the given parent is a <code>CompareViewerPane</code> otherwise <code>null</code> */ public static ToolBarManager getToolBarManager(Composite parent) { if (parent instanceof CompareViewerPane) { CompareViewerPane pane= (CompareViewerPane) parent; return pane.getToolBarManager(); } return null; }
/** * Returns the toolbar manager for this viewer. * * Subclasses may extend this method and use either the toolbar manager * provided by the inherited method by calling * super.getToolBarManager(parent) or provide an alternate toolbar manager. * * @param parent * a <code>Composite</code> or <code>null</code> * @return a <code>IToolBarManager</code> * @since 3.4 */ protected IToolBarManager getToolBarManager(Composite parent) { return CompareViewerPane.getToolBarManager(parent); }
/** * Clears tool items in the <code>CompareViewerPane</code>'s control bar. * * @param parent a <code>Composite</code> or <code>null</code> */ public static void clearToolBar(Composite parent) { ToolBarManager tbm= getToolBarManager(parent); if (tbm != null) { tbm.removeAll(); tbm.update(true); } }
/** * Clears tool items in the <code>CompareViewerPane</code>'s control bar. * * @param parent a <code>Composite</code> or <code>null</code> */ public static void clearToolBar(Composite parent) { ToolBarManager tbm= getToolBarManager(parent); if (tbm != null) { tbm.removeAll(); tbm.update(true); } }
public void contributeDiffViewerToolbarItems(Action[] actions, boolean workspacePatch){ ToolBarManager tbm= CompareViewerPane.getToolBarManager(viewer.getControl().getParent()); if (tbm != null) { tbm.removeAll(); tbm.add(new Separator("contributed")); //$NON-NLS-1$ for (int i = 0; i < actions.length; i++) { tbm.appendToGroup("contributed", actions[i]); //$NON-NLS-1$ } tbm.update(true); } }
public void contributeDiffViewerToolbarItems(Action[] actions, boolean workspacePatch){ ToolBarManager tbm= CompareViewerPane.getToolBarManager(viewer.getControl().getParent()); if (tbm != null) { tbm.removeAll(); tbm.add(new Separator("contributed")); //$NON-NLS-1$ for (int i = 0; i < actions.length; i++) { tbm.appendToGroup("contributed", actions[i]); //$NON-NLS-1$ } tbm.update(true); } }
ToolBarManager toolBarManager = CompareViewerPane.getToolBarManager(fEditionPane); Control c = createPage(fEditionPane, toolBarManager); fEditionPane.setContent(c);
ToolBarManager toolBarManager = CompareViewerPane.getToolBarManager(pagePane); IPage page = createPage(pagePane, toolBarManager); pagePane.setContent(page.getControl());
private void setSmartButtonVisible(boolean visible) { if (fSmartActionItem == null) return; Control c= getControl(); if (c == null || c.isDisposed()) return; fSmartActionItem.setVisible(visible); ToolBarManager tbm= CompareViewerPane.getToolBarManager(c.getParent()); if (tbm != null) { tbm.update(true); ToolBar tb= tbm.getControl(); if (!tb.isDisposed()) tb.getParent().layout(true); } }
ToolBarManager toolBarManager = CompareViewerPane.getToolBarManager(pagePane); IPage page = createPage(pagePane, toolBarManager); pagePane.setContent(page.getControl());
private void setSmartButtonVisible(boolean visible) { if (fSmartActionItem == null) return; Control c= getControl(); if (c == null || c.isDisposed()) return; fSmartActionItem.setVisible(visible); ToolBarManager tbm= CompareViewerPane.getToolBarManager(c.getParent()); if (tbm != null) { tbm.update(true); ToolBar tb= tbm.getControl(); if (!tb.isDisposed()) tb.getParent().layout(true); } }
private void setSmartButtonVisible(boolean visible) { if (fSmartActionItem == null) return; Control c= getControl(); if (c == null || c.isDisposed()) return; fSmartActionItem.setVisible(visible); ToolBarManager tbm= CompareViewerPane.getToolBarManager(c.getParent()); if (tbm != null) { tbm.update(true); ToolBar tb= tbm.getControl(); if (!tb.isDisposed()) tb.getParent().layout(true); } } }
site = new DialogSynchronizePageSite(shell, isModal); ((SynchronizePageConfiguration)pageConfiguration).setSite(site); ToolBarManager tbm = CompareViewerPane.getToolBarManager(fEditionPane); site.createActionBars(tbm); try {
ToolBarManager toolBarManager = CompareViewerPane.getToolBarManager(fEditionPane); Control c = createPage(fEditionPane, toolBarManager); fEditionPane.setContent(c);
public Control createPartControl(Composite parent) { Composite top = new Composite(parent, SWT.NULL); GridLayout layout = new GridLayout(); layout.marginHeight = 0; layout.marginWidth = 0; layout.verticalSpacing = 0; top.setLayout(layout); shell = parent.getShell(); fEditionPane = new CompareViewerPane(top, SWT.BORDER | SWT.FLAT); fEditionPane.setText(TeamUIMessages.ParticipantPageSaveablePart_0); fEditionPane.setLayoutData(SWTUtils.createHVFillGridData()); fPage = participant.createPage(pageConfiguration); site = new DialogSynchronizePageSite(shell, isModal); ((SynchronizePageConfiguration)pageConfiguration).setSite(site); ToolBarManager tbm = CompareViewerPane.getToolBarManager(fEditionPane); site.createActionBars(tbm); try { ((ISynchronizePage)fPage).init(pageConfiguration.getSite()); } catch (PartInitException e1) { TeamUIPlugin.log(IStatus.ERROR, TeamUIMessages.ParticipantPagePane_0, e1); } fPage.createControl(fEditionPane); fPage.setActionBars(site.getActionBars()); fEditionPane.setContent(fPage.getControl()); tbm.update(true); return top; }
ToolBarManager tbm= CompareViewerPane.getToolBarManager(fComposite.getParent()); if (tbm != null ) { updateToolItems();
ToolBarManager tbm= CompareViewerPane.getToolBarManager(parent); if (tbm != null) { tbm.removeAll();
private void initializeToolbars(Composite parent) { ToolBarManager tbm= CompareViewerPane.getToolBarManager(parent); if (tbm != null) { tbm.removeAll();
ToolBarManager tbm= CompareViewerPane.getToolBarManager(parent); if (tbm != null) { tbm.removeAll();