當前位置: 首頁>>代碼示例>>Java>>正文


Java ToolBarManager.update方法代碼示例

本文整理匯總了Java中org.eclipse.jface.action.ToolBarManager.update方法的典型用法代碼示例。如果您正苦於以下問題:Java ToolBarManager.update方法的具體用法?Java ToolBarManager.update怎麽用?Java ToolBarManager.update使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.jface.action.ToolBarManager的用法示例。


在下文中一共展示了ToolBarManager.update方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createUI_12_Actions

import org.eclipse.jface.action.ToolBarManager; //導入方法依賴的package包/類
private void createUI_12_Actions(final Composite parent) {

        final ToolBar toolbar = new ToolBar(parent, SWT.FLAT);
        GridDataFactory
                .fillDefaults()//
                .grab(true, false)
                .align(SWT.END, SWT.BEGINNING)
                .applyTo(toolbar);

        final ToolBarManager tbm = new ToolBarManager(toolbar);

        tbm.add(_actionRestoreDefaults);
        tbm.add(_actionPrefDialog);

        tbm.update(true);
    }
 
開發者ID:wolfgang-ch,項目名稱:mytourbook,代碼行數:17,代碼來源:SlideoutStatisticOptions.java

示例2: contributeToActionBars

import org.eclipse.jface.action.ToolBarManager; //導入方法依賴的package包/類
private void contributeToActionBars() {
    final IActionBars bars = getViewSite().getActionBars();
    fillLocalPullDown(bars.getMenuManager());
    fillLocalToolBar(bars.getToolBarManager());
    // a custom tool bar works slightly differently:
    final ToolBarManager m = new ToolBarManager(toolBar);
    fillCustomToolBar(m);
    m.update(true);
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:10,代碼來源:TestResultsView.java

示例3: configureControl

import org.eclipse.jface.action.ToolBarManager; //導入方法依賴的package包/類
protected void configureControl(
        IXtextBrowserInformationControl control, ToolBarManager tbm,
        String font) {
    OpenInHelpAction openHelpAction = new OpenInHelpAction();
    openHelpAction.setEnabled(true);
    tbm.add(openHelpAction);
    tbm.update(true);
}
 
開發者ID:Yakindu,項目名稱:solidity-ide,代碼行數:9,代碼來源:CustomCSSHelpHoverProvider.java

示例4: doCreateInformationControl

import org.eclipse.jface.action.ToolBarManager; //導入方法依賴的package包/類
public IInformationControl doCreateInformationControl(Shell parent) {
    if (de.darwinspl.preferences.resource.dwprofile.ui.DwprofileBrowserInformationControl.isAvailable(parent)) {
        ToolBarManager tbm = new ToolBarManager(SWT.FLAT);
        de.darwinspl.preferences.resource.dwprofile.ui.DwprofileBrowserInformationControl iControl = new de.darwinspl.preferences.resource.dwprofile.ui.DwprofileBrowserInformationControl(parent, FONT, tbm);
        final OpenDeclarationAction openDeclarationAction = new OpenDeclarationAction(iControl);
        tbm.add(openDeclarationAction);
        final SimpleSelectionProvider selectionProvider = new SimpleSelectionProvider();
        
        IInputChangedListener inputChangeListener = new IInputChangedListener() {
            public void inputChanged(Object newInput) {
                if (newInput == null) {
                    selectionProvider.setSelection(new StructuredSelection());
                } else if (newInput instanceof de.darwinspl.preferences.resource.dwprofile.ui.DwprofileDocBrowserInformationControlInput) {
                    de.darwinspl.preferences.resource.dwprofile.ui.DwprofileDocBrowserInformationControlInput input = (de.darwinspl.preferences.resource.dwprofile.ui.DwprofileDocBrowserInformationControlInput) newInput;
                    Object inputElement = input.getInputElement();
                    selectionProvider.setSelection(new StructuredSelection(inputElement));
                    // If there is an element of type EObject in the input element, the button to open
                    // the declaration will be set enable
                    boolean isEObjectInput = inputElement instanceof EObject;
                    openDeclarationAction.setEnabled(isEObjectInput);
                    if (isEObjectInput) {
                        String simpleName = inputElement.getClass().getSimpleName();
                        simpleName = simpleName.substring(0, simpleName.length() - 4);
                        openDeclarationAction.setText("Open " + simpleName);
                    } else							openDeclarationAction.setText("Open Declaration");
                }
            }
        };
        iControl.addInputChangeListener(inputChangeListener);
        
        tbm.update(true);
        return iControl;
    } else {
        return new DefaultInformationControl(parent, true);
    }
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:37,代碼來源:DwprofileTextHover.java

示例5: doCreateInformationControl

import org.eclipse.jface.action.ToolBarManager; //導入方法依賴的package包/類
public IInformationControl doCreateInformationControl(Shell parent) {
    if (eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionBrowserInformationControl.isAvailable(parent)) {
        ToolBarManager tbm = new ToolBarManager(SWT.FLAT);
        eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionBrowserInformationControl iControl = new eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionBrowserInformationControl(parent, FONT, tbm);
        final OpenDeclarationAction openDeclarationAction = new OpenDeclarationAction(iControl);
        tbm.add(openDeclarationAction);
        final SimpleSelectionProvider selectionProvider = new SimpleSelectionProvider();
        
        IInputChangedListener inputChangeListener = new IInputChangedListener() {
            public void inputChanged(Object newInput) {
                if (newInput == null) {
                    selectionProvider.setSelection(new StructuredSelection());
                } else if (newInput instanceof eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionDocBrowserInformationControlInput) {
                    eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionDocBrowserInformationControlInput input = (eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionDocBrowserInformationControlInput) newInput;
                    Object inputElement = input.getInputElement();
                    selectionProvider.setSelection(new StructuredSelection(inputElement));
                    // If there is an element of type EObject in the input element, the button to open
                    // the declaration will be set enable
                    boolean isEObjectInput = inputElement instanceof EObject;
                    openDeclarationAction.setEnabled(isEObjectInput);
                    if (isEObjectInput) {
                        String simpleName = inputElement.getClass().getSimpleName();
                        simpleName = simpleName.substring(0, simpleName.length() - 4);
                        openDeclarationAction.setText("Open " + simpleName);
                    } else							openDeclarationAction.setText("Open Declaration");
                }
            }
        };
        iControl.addInputChangeListener(inputChangeListener);
        
        tbm.update(true);
        return iControl;
    } else {
        return new DefaultInformationControl(parent, true);
    }
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:37,代碼來源:HyexpressionTextHover.java

示例6: doCreateInformationControl

import org.eclipse.jface.action.ToolBarManager; //導入方法依賴的package包/類
public IInformationControl doCreateInformationControl(Shell parent) {
    if (eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaBrowserInformationControl.isAvailable(parent)) {
        ToolBarManager tbm = new ToolBarManager(SWT.FLAT);
        eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaBrowserInformationControl iControl = new eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaBrowserInformationControl(parent, FONT, tbm);
        final OpenDeclarationAction openDeclarationAction = new OpenDeclarationAction(iControl);
        tbm.add(openDeclarationAction);
        final SimpleSelectionProvider selectionProvider = new SimpleSelectionProvider();
        
        IInputChangedListener inputChangeListener = new IInputChangedListener() {
            public void inputChanged(Object newInput) {
                if (newInput == null) {
                    selectionProvider.setSelection(new StructuredSelection());
                } else if (newInput instanceof eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaDocBrowserInformationControlInput) {
                    eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaDocBrowserInformationControlInput input = (eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaDocBrowserInformationControlInput) newInput;
                    Object inputElement = input.getInputElement();
                    selectionProvider.setSelection(new StructuredSelection(inputElement));
                    // If there is an element of type EObject in the input element, the button to open
                    // the declaration will be set enable
                    boolean isEObjectInput = inputElement instanceof EObject;
                    openDeclarationAction.setEnabled(isEObjectInput);
                    if (isEObjectInput) {
                        String simpleName = inputElement.getClass().getSimpleName();
                        simpleName = simpleName.substring(0, simpleName.length() - 4);
                        openDeclarationAction.setText("Open " + simpleName);
                    } else							openDeclarationAction.setText("Open Declaration");
                }
            }
        };
        iControl.addInputChangeListener(inputChangeListener);
        
        tbm.update(true);
        return iControl;
    } else {
        return new DefaultInformationControl(parent, true);
    }
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:37,代碼來源:HyvalidityformulaTextHover.java

示例7: doCreateInformationControl

import org.eclipse.jface.action.ToolBarManager; //導入方法依賴的package包/類
public IInformationControl doCreateInformationControl(Shell parent) {
    if (eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueBrowserInformationControl.isAvailable(parent)) {
        ToolBarManager tbm = new ToolBarManager(SWT.FLAT);
        eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueBrowserInformationControl iControl = new eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueBrowserInformationControl(parent, FONT, tbm);
        final OpenDeclarationAction openDeclarationAction = new OpenDeclarationAction(iControl);
        tbm.add(openDeclarationAction);
        final SimpleSelectionProvider selectionProvider = new SimpleSelectionProvider();
        
        IInputChangedListener inputChangeListener = new IInputChangedListener() {
            public void inputChanged(Object newInput) {
                if (newInput == null) {
                    selectionProvider.setSelection(new StructuredSelection());
                } else if (newInput instanceof eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueDocBrowserInformationControlInput) {
                    eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueDocBrowserInformationControlInput input = (eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueDocBrowserInformationControlInput) newInput;
                    Object inputElement = input.getInputElement();
                    selectionProvider.setSelection(new StructuredSelection(inputElement));
                    // If there is an element of type EObject in the input element, the button to open
                    // the declaration will be set enable
                    boolean isEObjectInput = inputElement instanceof EObject;
                    openDeclarationAction.setEnabled(isEObjectInput);
                    if (isEObjectInput) {
                        String simpleName = inputElement.getClass().getSimpleName();
                        simpleName = simpleName.substring(0, simpleName.length() - 4);
                        openDeclarationAction.setText("Open " + simpleName);
                    } else							openDeclarationAction.setText("Open Declaration");
                }
            }
        };
        iControl.addInputChangeListener(inputChangeListener);
        
        tbm.update(true);
        return iControl;
    } else {
        return new DefaultInformationControl(parent, true);
    }
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:37,代碼來源:HydatavalueTextHover.java

示例8: doCreateInformationControl

import org.eclipse.jface.action.ToolBarManager; //導入方法依賴的package包/類
public IInformationControl doCreateInformationControl(Shell parent) {
    if (eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingBrowserInformationControl.isAvailable(parent)) {
        ToolBarManager tbm = new ToolBarManager(SWT.FLAT);
        eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingBrowserInformationControl iControl = new eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingBrowserInformationControl(parent, FONT, tbm);
        final OpenDeclarationAction openDeclarationAction = new OpenDeclarationAction(iControl);
        tbm.add(openDeclarationAction);
        final SimpleSelectionProvider selectionProvider = new SimpleSelectionProvider();
        
        IInputChangedListener inputChangeListener = new IInputChangedListener() {
            public void inputChanged(Object newInput) {
                if (newInput == null) {
                    selectionProvider.setSelection(new StructuredSelection());
                } else if (newInput instanceof eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingDocBrowserInformationControlInput) {
                    eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingDocBrowserInformationControlInput input = (eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingDocBrowserInformationControlInput) newInput;
                    Object inputElement = input.getInputElement();
                    selectionProvider.setSelection(new StructuredSelection(inputElement));
                    // If there is an element of type EObject in the input element, the button to open
                    // the declaration will be set enable
                    boolean isEObjectInput = inputElement instanceof EObject;
                    openDeclarationAction.setEnabled(isEObjectInput);
                    if (isEObjectInput) {
                        String simpleName = inputElement.getClass().getSimpleName();
                        simpleName = simpleName.substring(0, simpleName.length() - 4);
                        openDeclarationAction.setText("Open " + simpleName);
                    } else							openDeclarationAction.setText("Open Declaration");
                }
            }
        };
        iControl.addInputChangeListener(inputChangeListener);
        
        tbm.update(true);
        return iControl;
    } else {
        return new DefaultInformationControl(parent, true);
    }
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:37,代碼來源:HymappingTextHover.java

示例9: doCreateInformationControl

import org.eclipse.jface.action.ToolBarManager; //導入方法依賴的package包/類
public IInformationControl doCreateInformationControl(Shell parent) {
    if (eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsBrowserInformationControl.isAvailable(parent)) {
        ToolBarManager tbm = new ToolBarManager(SWT.FLAT);
        eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsBrowserInformationControl iControl = new eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsBrowserInformationControl(parent, FONT, tbm);
        final OpenDeclarationAction openDeclarationAction = new OpenDeclarationAction(iControl);
        tbm.add(openDeclarationAction);
        final SimpleSelectionProvider selectionProvider = new SimpleSelectionProvider();
        
        IInputChangedListener inputChangeListener = new IInputChangedListener() {
            public void inputChanged(Object newInput) {
                if (newInput == null) {
                    selectionProvider.setSelection(new StructuredSelection());
                } else if (newInput instanceof eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsDocBrowserInformationControlInput) {
                    eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsDocBrowserInformationControlInput input = (eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsDocBrowserInformationControlInput) newInput;
                    Object inputElement = input.getInputElement();
                    selectionProvider.setSelection(new StructuredSelection(inputElement));
                    // If there is an element of type EObject in the input element, the button to open
                    // the declaration will be set enable
                    boolean isEObjectInput = inputElement instanceof EObject;
                    openDeclarationAction.setEnabled(isEObjectInput);
                    if (isEObjectInput) {
                        String simpleName = inputElement.getClass().getSimpleName();
                        simpleName = simpleName.substring(0, simpleName.length() - 4);
                        openDeclarationAction.setText("Open " + simpleName);
                    } else							openDeclarationAction.setText("Open Declaration");
                }
            }
        };
        iControl.addInputChangeListener(inputChangeListener);
        
        tbm.update(true);
        return iControl;
    } else {
        return new DefaultInformationControl(parent, true);
    }
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:37,代碼來源:HyconstraintsTextHover.java

示例10: doCreateInformationControl

import org.eclipse.jface.action.ToolBarManager; //導入方法依賴的package包/類
public IInformationControl doCreateInformationControl(Shell parent) {
    if (eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestBrowserInformationControl.isAvailable(parent)) {
        ToolBarManager tbm = new ToolBarManager(SWT.FLAT);
        eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestBrowserInformationControl iControl = new eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestBrowserInformationControl(parent, FONT, tbm);
        final OpenDeclarationAction openDeclarationAction = new OpenDeclarationAction(iControl);
        tbm.add(openDeclarationAction);
        final SimpleSelectionProvider selectionProvider = new SimpleSelectionProvider();
        
        IInputChangedListener inputChangeListener = new IInputChangedListener() {
            public void inputChanged(Object newInput) {
                if (newInput == null) {
                    selectionProvider.setSelection(new StructuredSelection());
                } else if (newInput instanceof eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestDocBrowserInformationControlInput) {
                    eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestDocBrowserInformationControlInput input = (eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestDocBrowserInformationControlInput) newInput;
                    Object inputElement = input.getInputElement();
                    selectionProvider.setSelection(new StructuredSelection(inputElement));
                    // If there is an element of type EObject in the input element, the button to open
                    // the declaration will be set enable
                    boolean isEObjectInput = inputElement instanceof EObject;
                    openDeclarationAction.setEnabled(isEObjectInput);
                    if (isEObjectInput) {
                        String simpleName = inputElement.getClass().getSimpleName();
                        simpleName = simpleName.substring(0, simpleName.length() - 4);
                        openDeclarationAction.setText("Open " + simpleName);
                    } else							openDeclarationAction.setText("Open Declaration");
                }
            }
        };
        iControl.addInputChangeListener(inputChangeListener);
        
        tbm.update(true);
        return iControl;
    } else {
        return new DefaultInformationControl(parent, true);
    }
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:37,代碼來源:HymanifestTextHover.java

示例11: addActions

import org.eclipse.jface.action.ToolBarManager; //導入方法依賴的package包/類
private void addActions(final ToolBarManager manager, final CommonStructureControl cssControl) {
    manager.add(new NewNodeAction(cssControl));
    manager.add(new DeleteNodeAction(cssControl));
    manager.add(new Separator());
    manager.add(new MoveUpNodeAction(cssControl));
    manager.add(new MoveDownNodeAction(cssControl));
    manager.add(new PromoteNodeAction(cssControl));
    manager.add(new DemoteNodeAction(cssControl));

    manager.update(true);
}
 
開發者ID:Microsoft,項目名稱:team-explorer-everywhere,代碼行數:12,代碼來源:ClassificationAdminDialog.java

示例12: createUI10MapViewerHeader

import org.eclipse.jface.action.ToolBarManager; //導入方法依賴的package包/類
private void createUI10MapViewerHeader(final Composite parent) {

        final Composite headerContainer = new Composite(parent, SWT.NONE);
        GridDataFactory.fillDefaults().grab(true, false).applyTo(headerContainer);
        GridLayoutFactory.fillDefaults().numColumns(2).applyTo(headerContainer);
//			headerContainer.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_GREEN));
        {
            /*
             * label: map provider
             */
            final Label label = new Label(headerContainer, SWT.NONE);
            GridDataFactory.fillDefaults().grab(true, false).align(SWT.FILL, SWT.CENTER).applyTo(label);
            label.setText(Messages.Pref_Map_Label_AvaiablelMapProvider);

            /*
             * button: refresh
             */
            final ToolBar toolbar = new ToolBar(headerContainer, SWT.FLAT);
            final ToolBarManager tbm = new ToolBarManager(toolbar);

            _actionRefreshNotAssessed = new ActionRefreshOfflineInfoNotAssessed(this);
            _actionRefreshSelected = new ActionRefreshOfflineInfoSelected(this);
            _actionRefreshAll = new ActionRefreshOfflineInfoAll(this);
            _actionCancelRefresh = new ActionCancelRefreshOfflineInfo(this);

            tbm.add(_actionRefreshNotAssessed);
            tbm.add(_actionRefreshSelected);
            tbm.add(_actionRefreshAll);
            tbm.add(_actionCancelRefresh);

            tbm.update(true);
        }
    }
 
開發者ID:wolfgang-ch,項目名稱:mytourbook,代碼行數:34,代碼來源:PrefPageMapProviders.java

示例13: clearToolBar

import org.eclipse.jface.action.ToolBarManager; //導入方法依賴的package包/類
public static void clearToolBar(Composite parent)
{
    ToolBarManager tbm = getToolBarManager(parent);
    if(tbm != null)
    {
        tbm.removeAll();
        tbm.update(true);
    }
}
 
開發者ID:qxo,項目名稱:eclipse-code-lines-plugin,代碼行數:10,代碼來源:ViewerPane.java

示例14: contributeToTreePane

import org.eclipse.jface.action.ToolBarManager; //導入方法依賴的package包/類
private void contributeToTreePane()
{
    ToolBarManager manager = treePane.getToolBarManager();
    manager.removeAll();
    manager.add(countAction);
    manager.add(new Separator("separator1"));
    manager.add(refreshTreePaneAction);
    manager.add(collapseAllAction);
    manager.update(true);
}
 
開發者ID:qxo,項目名稱:eclipse-code-lines-plugin,代碼行數:11,代碼來源:LinesView.java

示例15: contributeToTablePane

import org.eclipse.jface.action.ToolBarManager; //導入方法依賴的package包/類
private void contributeToTablePane()
{
    ToolBarManager manager = ViewerPane.getToolBarManager(tablePane);
    manager.removeAll();
    manager.add(exportAction);
    manager.add(new Separator("separator1"));
    manager.add(clearAction);
    manager.update(true);
}
 
開發者ID:qxo,項目名稱:eclipse-code-lines-plugin,代碼行數:10,代碼來源:LinesView.java


注:本文中的org.eclipse.jface.action.ToolBarManager.update方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。