Java 类org.eclipse.ui.IActionBars 实例源码

项目:n4js    文件:SelectAllProjectExplorer_PluginUITest.java   
/**
 * Tests that the Top Level Elements
 */
@Test
public void testTopLevelElementsEntryNoDuplicates() {
    IActionBars actionBars = projectExplorer.getViewSite().getActionBars();
    IMenuManager menuManager = actionBars.getMenuManager();

    int topLevelElementsEntriesFound = 0;

    for (IContributionItem item : menuManager.getItems()) {
        if (item instanceof MenuManager) {
            String escapedMenuText = LegacyActionTools.removeMnemonics(((MenuManager) item).getMenuText());
            if (escapedMenuText.equals("Top Level Elements")) {
                topLevelElementsEntriesFound++;
            }
        }
    }

    assertEquals("There was more than one 'Top Level Elements' entry in the navigator action bar.",
            topLevelElementsEntriesFound, 1);
}
项目:time4sys    文件:ConstraintsEditor.java   
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage() {
    PropertySheetPage propertySheetPage =
        new ExtendedPropertySheetPage(editingDomain) {
            @Override
            public void setSelectionToViewer(List<?> selection) {
                ConstraintsEditor.this.setSelectionToViewer(selection);
                ConstraintsEditor.this.setFocus();
            }

            @Override
            public void setActionBars(IActionBars actionBars) {
                super.setActionBars(actionBars);
                getActionBarContributor().shareGlobalActions(this, actionBars);
            }
        };
    propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
    propertySheetPages.add(propertySheetPage);

    return propertySheetPage;
}
项目:gemoc-studio-modeldebugging    文件:TracingannotationsEditor.java   
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage() {
    PropertySheetPage propertySheetPage =
        new ExtendedPropertySheetPage(editingDomain) {
            @Override
            public void setSelectionToViewer(List<?> selection) {
                TracingannotationsEditor.this.setSelectionToViewer(selection);
                TracingannotationsEditor.this.setFocus();
            }

            @Override
            public void setActionBars(IActionBars actionBars) {
                super.setActionBars(actionBars);
                getActionBarContributor().shareGlobalActions(this, actionBars);
            }
        };
    propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
    propertySheetPages.add(propertySheetPage);

    return propertySheetPage;
}
项目:OCCI-Studio    文件:PlatformEditor.java   
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage() {
    PropertySheetPage propertySheetPage =
        new ExtendedPropertySheetPage(editingDomain) {
            @Override
            public void setSelectionToViewer(List<?> selection) {
                PlatformEditor.this.setSelectionToViewer(selection);
                PlatformEditor.this.setFocus();
            }

            @Override
            public void setActionBars(IActionBars actionBars) {
                super.setActionBars(actionBars);
                getActionBarContributor().shareGlobalActions(this, actionBars);
            }
        };
    propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
    propertySheetPages.add(propertySheetPage);

    return propertySheetPage;
}
项目:bdf2    文件:EditorActionBarContributor.java   
private void addGraphicalEditorActions(GraphicalEditorPage activeEditor,
        IActionBars actionBars) {
    // get the registry of actions from jpdl editor
    ActionRegistry registry = (ActionRegistry) activeEditor.getAdapter(ActionRegistry.class);

    // set jpdl global action to workbench global action
    for (int i = 0; i < WORKBENCH_ACTION_IDS.length; i++) {
        actionBars.setGlobalActionHandler(WORKBENCH_ACTION_IDS[i], registry
                .getAction(WORKBENCH_ACTION_IDS[i]));
    }

    // set the retarget action of jpdl editor to jpdl golbal action
    String[] keys = actionMap.keySet().toArray(new String[actionMap.keySet().size()]);
    for (int i = 0; i < keys.length; i++) {
        actionBars.setGlobalActionHandler(keys[i], registry.getAction(keys[i]));
    }
    actionBars.getToolBarManager().update(true);
}
项目:neoscada    文件:ProtocolEditor.java   
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage ()
{
    PropertySheetPage propertySheetPage =
            new ExtendedPropertySheetPage ( editingDomain )
            {
                @Override
                public void setSelectionToViewer ( List<?> selection )
                {
                    ProtocolEditor.this.setSelectionToViewer ( selection );
                    ProtocolEditor.this.setFocus ();
                }

                @Override
                public void setActionBars ( IActionBars actionBars )
                {
                    super.setActionBars ( actionBars );
                    getActionBarContributor ().shareGlobalActions ( this, actionBars );
                }
            };
    propertySheetPage.setPropertySourceProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
    propertySheetPages.add ( propertySheetPage );

    return propertySheetPage;
}
项目:time4sys    文件:NfpEditor.java   
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage() {
    PropertySheetPage propertySheetPage =
        new ExtendedPropertySheetPage(editingDomain) {
            @Override
            public void setSelectionToViewer(List<?> selection) {
                NfpEditor.this.setSelectionToViewer(selection);
                NfpEditor.this.setFocus();
            }

            @Override
            public void setActionBars(IActionBars actionBars) {
                super.setActionBars(actionBars);
                getActionBarContributor().shareGlobalActions(this, actionBars);
            }
        };
    propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
    propertySheetPages.add(propertySheetPage);

    return propertySheetPage;
}
项目:neoscada    文件:ChartEditor.java   
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * 
 * @generated
 */
public IPropertySheetPage getPropertySheetPage ()
{
    final PropertySheetPage propertySheetPage = new ExtendedPropertySheetPage (
            this.editingDomain ) {
        @Override
        public void setSelectionToViewer ( final List<?> selection )
        {
            ChartEditor.this.setSelectionToViewer ( selection );
            ChartEditor.this.setFocus ();
        }

        @Override
        public void setActionBars ( final IActionBars actionBars )
        {
            super.setActionBars ( actionBars );
            getActionBarContributor ().shareGlobalActions ( this, actionBars );
        }
    };
    propertySheetPage
            .setPropertySourceProvider ( new AdapterFactoryContentProvider (
                    this.adapterFactory ) );
    this.propertySheetPages.add ( propertySheetPage );

    return propertySheetPage;
}
项目:neoscada    文件:ChartConfiguratorView.java   
/**
 * This accesses a cached version of the property sheet. <!-- begin-user-doc
 * --> <!-- end-user-doc -->
 *
 * @generated
 */
public IPropertySheetPage getPropertySheetPage ()
{
    if ( this.propertySheetPage == null )
    {
        this.propertySheetPage = new ExtendedPropertySheetPage ( this.editingDomain ) {
            @Override
            public void setSelectionToViewer ( final List<?> selection )
            {
                ChartConfiguratorView.this.setSelectionToViewer ( selection );
                ChartConfiguratorView.this.setFocus ();
            }

            @Override
            public void setActionBars ( final IActionBars actionBars )
            {
                super.setActionBars ( actionBars );
                // getActionBarContributor ().shareGlobalActions ( this, actionBars );
            }
        };
        this.propertySheetPage.setPropertySourceProvider ( new AdapterFactoryContentProvider ( this.factory ) );
    }

    return this.propertySheetPage;
}
项目:com.onpositive.prefeditor    文件:PreferenceView.java   
public void updateActions(ISelection selection) {
    chooseFolderAction.setEnabled(activePage instanceof FolderViewerPage);
    copyPathAction.setEnabled(activePage instanceof FolderViewerPage);
    showReadOnlyAction.setEnabled(activePage instanceof PlatformViewerPage);

    removeAction.setEnabled(!selection.isEmpty()  && activePage.isSelectionEditable());
    copyAction.setEnabled(!selection.isEmpty());
    boolean leafSelected = ((StructuredSelection) selection).getFirstElement() instanceof KeyValue;
    copyValueAction.setEnabled(!selection.isEmpty() && leafSelected);
    editValueAction.setEnabled(!selection.isEmpty() && leafSelected);
    trackAction.setChecked(activePage.isTracking());

    exportAction.setEnabled(!selection.isEmpty() && !leafSelected);

    IActionBars bars = getViewSite().getActionBars();
    IToolBarManager toolBarManager = bars.getToolBarManager();
    toolBarManager.removeAll();
    fillLocalToolBar(toolBarManager);
    toolBarManager.update(true);

    IMenuManager menuManager = bars.getMenuManager();
    menuManager.removeAll();
    fillLocalPullDown(menuManager);
    menuManager.update(true);
}
项目:neoscada    文件:DetailViewEditor.java   
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage ()
{
    PropertySheetPage propertySheetPage =
            new ExtendedPropertySheetPage ( editingDomain )
            {
                @Override
                public void setSelectionToViewer ( List<?> selection )
                {
                    DetailViewEditor.this.setSelectionToViewer ( selection );
                    DetailViewEditor.this.setFocus ();
                }

                @Override
                public void setActionBars ( IActionBars actionBars )
                {
                    super.setActionBars ( actionBars );
                    getActionBarContributor ().shareGlobalActions ( this, actionBars );
                }
            };
    propertySheetPage.setPropertySourceProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
    propertySheetPages.add ( propertySheetPage );

    return propertySheetPage;
}
项目:neoscada    文件:DeploymentEditor.java   
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage ()
{
    PropertySheetPage propertySheetPage = new ExtendedPropertySheetPage ( editingDomain, ExtendedPropertySheetPage.Decoration.MANUAL) {
        @Override
        public void setSelectionToViewer ( List<?> selection )
        {
            DeploymentEditor.this.setSelectionToViewer ( selection );
            DeploymentEditor.this.setFocus ();
        }

        @Override
        public void setActionBars ( IActionBars actionBars )
        {
            super.setActionBars ( actionBars );
            getActionBarContributor ().shareGlobalActions ( this, actionBars );
        }
    };
    propertySheetPage.setPropertySourceProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
    propertySheetPages.add ( propertySheetPage );

    return propertySheetPage;
}
项目:neoscada    文件:ProfileEditor.java   
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage ()
{
    PropertySheetPage propertySheetPage = new ExtendedPropertySheetPage ( editingDomain, ExtendedPropertySheetPage.Decoration.MANUAL) {
        @Override
        public void setSelectionToViewer ( List<?> selection )
        {
            ProfileEditor.this.setSelectionToViewer ( selection );
            ProfileEditor.this.setFocus ();
        }

        @Override
        public void setActionBars ( IActionBars actionBars )
        {
            super.setActionBars ( actionBars );
            getActionBarContributor ().shareGlobalActions ( this, actionBars );
        }
    };
    propertySheetPage.setPropertySourceProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
    propertySheetPages.add ( propertySheetPage );

    return propertySheetPage;
}
项目:neoscada    文件:OsgiEditor.java   
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage ()
{
    PropertySheetPage propertySheetPage = new ExtendedPropertySheetPage ( editingDomain, ExtendedPropertySheetPage.Decoration.MANUAL) {
        @Override
        public void setSelectionToViewer ( List<?> selection )
        {
            OsgiEditor.this.setSelectionToViewer ( selection );
            OsgiEditor.this.setFocus ();
        }

        @Override
        public void setActionBars ( IActionBars actionBars )
        {
            super.setActionBars ( actionBars );
            getActionBarContributor ().shareGlobalActions ( this, actionBars );
        }
    };
    propertySheetPage.setPropertySourceProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
    propertySheetPages.add ( propertySheetPage );

    return propertySheetPage;
}
项目:neoscada    文件:WorldEditor.java   
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage ()
{
    PropertySheetPage propertySheetPage = new ExtendedPropertySheetPage ( editingDomain, ExtendedPropertySheetPage.Decoration.MANUAL) {
        @Override
        public void setSelectionToViewer ( List<?> selection )
        {
            WorldEditor.this.setSelectionToViewer ( selection );
            WorldEditor.this.setFocus ();
        }

        @Override
        public void setActionBars ( IActionBars actionBars )
        {
            super.setActionBars ( actionBars );
            getActionBarContributor ().shareGlobalActions ( this, actionBars );
        }
    };
    propertySheetPage.setPropertySourceProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
    propertySheetPages.add ( propertySheetPage );

    return propertySheetPage;
}
项目:OCCI-Studio    文件:CrtpEditor.java   
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage() {
    PropertySheetPage propertySheetPage =
        new ExtendedPropertySheetPage(editingDomain) {
            @Override
            public void setSelectionToViewer(List<?> selection) {
                CrtpEditor.this.setSelectionToViewer(selection);
                CrtpEditor.this.setFocus();
            }

            @Override
            public void setActionBars(IActionBars actionBars) {
                super.setActionBars(actionBars);
                getActionBarContributor().shareGlobalActions(this, actionBars);
            }
        };
    propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
    propertySheetPages.add(propertySheetPage);

    return propertySheetPage;
}
项目:neoscada    文件:MemoryEditor.java   
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage ()
{
    PropertySheetPage propertySheetPage = new ExtendedPropertySheetPage ( editingDomain) {
        @Override
        public void setSelectionToViewer ( List<?> selection )
        {
            MemoryEditor.this.setSelectionToViewer ( selection );
            MemoryEditor.this.setFocus ();
        }

        @Override
        public void setActionBars ( IActionBars actionBars )
        {
            super.setActionBars ( actionBars );
            getActionBarContributor ().shareGlobalActions ( this, actionBars );
        }
    };
    propertySheetPage.setPropertySourceProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
    propertySheetPages.add ( propertySheetPage );

    return propertySheetPage;
}
项目:neoscada    文件:RecipeEditor.java   
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage ()
{
    PropertySheetPage propertySheetPage = new ExtendedPropertySheetPage ( editingDomain, ExtendedPropertySheetPage.Decoration.MANUAL) {
        @Override
        public void setSelectionToViewer ( List<?> selection )
        {
            RecipeEditor.this.setSelectionToViewer ( selection );
            RecipeEditor.this.setFocus ();
        }

        @Override
        public void setActionBars ( IActionBars actionBars )
        {
            super.setActionBars ( actionBars );
            getActionBarContributor ().shareGlobalActions ( this, actionBars );
        }
    };
    propertySheetPage.setPropertySourceProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
    propertySheetPages.add ( propertySheetPage );

    return propertySheetPage;
}
项目:neoscada    文件:InfrastructureEditor.java   
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 *
 * @generated NOT
 */
public IPropertySheetPage getPropertySheetPage ()
{
    final PropertySheetPage propertySheetPage = new ExtendedPropertySheetPage ( this.editingDomain, ExtendedPropertySheetPage.Decoration.MANUAL, InfrastructureEditorPlugin.getPlugin ().getDialogSettings ()) {
        @Override
        public void setSelectionToViewer ( final List<?> selection )
        {
            InfrastructureEditor.this.setSelectionToViewer ( selection );
            InfrastructureEditor.this.setFocus ();
        }

        @Override
        public void setActionBars ( final IActionBars actionBars )
        {
            super.setActionBars ( actionBars );
            getActionBarContributor ().shareGlobalActions ( this, actionBars );
        }
    };
    propertySheetPage.setPropertySourceProvider ( new ExtendedAdapterFactoryContentProvider ( this.adapterFactory ) );
    this.propertySheetPages.add ( propertySheetPage );

    return propertySheetPage;
}
项目:neoscada    文件:SecurityEditor.java   
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage ()
{
    PropertySheetPage propertySheetPage =
            new ExtendedPropertySheetPage ( editingDomain )
            {
                @Override
                public void setSelectionToViewer ( List<?> selection )
                {
                    SecurityEditor.this.setSelectionToViewer ( selection );
                    SecurityEditor.this.setFocus ();
                }

                @Override
                public void setActionBars ( IActionBars actionBars )
                {
                    super.setActionBars ( actionBars );
                    getActionBarContributor ().shareGlobalActions ( this, actionBars );
                }
            };
    propertySheetPage.setPropertySourceProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
    propertySheetPages.add ( propertySheetPage );

    return propertySheetPage;
}
项目:neoscada    文件:GlobalizeEditor.java   
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage ()
{
    PropertySheetPage propertySheetPage = new ExtendedPropertySheetPage ( editingDomain ) {
        @Override
        public void setSelectionToViewer ( List<?> selection )
        {
            GlobalizeEditor.this.setSelectionToViewer ( selection );
            GlobalizeEditor.this.setFocus ();
        }

        @Override
        public void setActionBars ( IActionBars actionBars )
        {
            super.setActionBars ( actionBars );
            getActionBarContributor ().shareGlobalActions ( this, actionBars );
        }
    };
    propertySheetPage.setPropertySourceProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
    propertySheetPages.add ( propertySheetPage );

    return propertySheetPage;
}
项目:time4sys    文件:AnalysisEditor.java   
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage() {
    PropertySheetPage propertySheetPage =
        new ExtendedPropertySheetPage(editingDomain) {
            @Override
            public void setSelectionToViewer(List<?> selection) {
                AnalysisEditor.this.setSelectionToViewer(selection);
                AnalysisEditor.this.setFocus();
            }

            @Override
            public void setActionBars(IActionBars actionBars) {
                super.setActionBars(actionBars);
                getActionBarContributor().shareGlobalActions(this, actionBars);
            }
        };
    propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
    propertySheetPages.add(propertySheetPage);

    return propertySheetPage;
}
项目:neoscada    文件:ConfigurationEditor.java   
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage ()
{
    PropertySheetPage propertySheetPage =
            new ExtendedPropertySheetPage ( editingDomain )
            {
                @Override
                public void setSelectionToViewer ( List<?> selection )
                {
                    ConfigurationEditor.this.setSelectionToViewer ( selection );
                    ConfigurationEditor.this.setFocus ();
                }

                @Override
                public void setActionBars ( IActionBars actionBars )
                {
                    super.setActionBars ( actionBars );
                    getActionBarContributor ().shareGlobalActions ( this, actionBars );
                }
            };
    propertySheetPage.setPropertySourceProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
    propertySheetPages.add ( propertySheetPage );

    return propertySheetPage;
}
项目:time4sys    文件:GqamEditor.java   
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage() {
    PropertySheetPage propertySheetPage =
        new ExtendedPropertySheetPage(editingDomain) {
            @Override
            public void setSelectionToViewer(List<?> selection) {
                GqamEditor.this.setSelectionToViewer(selection);
                GqamEditor.this.setFocus();
            }

            @Override
            public void setActionBars(IActionBars actionBars) {
                super.setActionBars(actionBars);
                getActionBarContributor().shareGlobalActions(this, actionBars);
            }
        };
    propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
    propertySheetPages.add(propertySheetPage);

    return propertySheetPage;
}
项目:Open_Source_ECOA_Toolset_AS5    文件:CompDefEditorContributor.java   
public void setActivePage(IEditorPart part) {
    if (activeEditorPart == part)
        return;

    activeEditorPart = part;

    IActionBars actionBars = getActionBars();
    if (actionBars != null) {

        ITextEditor editor = (part instanceof ITextEditor) ? (ITextEditor) part : null;

        actionBars.setGlobalActionHandler(ActionFactory.DELETE.getId(), getAction(editor, ITextEditorActionConstants.DELETE));
        actionBars.setGlobalActionHandler(ActionFactory.UNDO.getId(), getAction(editor, ITextEditorActionConstants.UNDO));
        actionBars.setGlobalActionHandler(ActionFactory.REDO.getId(), getAction(editor, ITextEditorActionConstants.REDO));
        actionBars.setGlobalActionHandler(ActionFactory.CUT.getId(), getAction(editor, ITextEditorActionConstants.CUT));
        actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), getAction(editor, ITextEditorActionConstants.COPY));
        actionBars.setGlobalActionHandler(ActionFactory.PASTE.getId(), getAction(editor, ITextEditorActionConstants.PASTE));
        actionBars.setGlobalActionHandler(ActionFactory.SELECT_ALL.getId(), getAction(editor, ITextEditorActionConstants.SELECT_ALL));
        actionBars.setGlobalActionHandler(ActionFactory.FIND.getId(), getAction(editor, ITextEditorActionConstants.FIND));
        actionBars.setGlobalActionHandler(IDEActionFactory.BOOKMARK.getId(), getAction(editor, IDEActionFactory.BOOKMARK.getId()));
        actionBars.updateActionBars();
    }
}
项目:Open_Source_ECOA_Toolset_AS5    文件:ServicesEditorContributor.java   
public void setActivePage(IEditorPart part) {
    if (activeEditorPart == part)
        return;

    activeEditorPart = part;

    IActionBars actionBars = getActionBars();
    if (actionBars != null) {

        ITextEditor editor = (part instanceof ITextEditor) ? (ITextEditor) part : null;

        actionBars.setGlobalActionHandler(ActionFactory.DELETE.getId(), getAction(editor, ITextEditorActionConstants.DELETE));
        actionBars.setGlobalActionHandler(ActionFactory.UNDO.getId(), getAction(editor, ITextEditorActionConstants.UNDO));
        actionBars.setGlobalActionHandler(ActionFactory.REDO.getId(), getAction(editor, ITextEditorActionConstants.REDO));
        actionBars.setGlobalActionHandler(ActionFactory.CUT.getId(), getAction(editor, ITextEditorActionConstants.CUT));
        actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), getAction(editor, ITextEditorActionConstants.COPY));
        actionBars.setGlobalActionHandler(ActionFactory.PASTE.getId(), getAction(editor, ITextEditorActionConstants.PASTE));
        actionBars.setGlobalActionHandler(ActionFactory.SELECT_ALL.getId(), getAction(editor, ITextEditorActionConstants.SELECT_ALL));
        actionBars.setGlobalActionHandler(ActionFactory.FIND.getId(), getAction(editor, ITextEditorActionConstants.FIND));
        actionBars.setGlobalActionHandler(IDEActionFactory.BOOKMARK.getId(), getAction(editor, IDEActionFactory.BOOKMARK.getId()));
        actionBars.updateActionBars();
    }
}
项目:gw4e.project    文件:GW4EEditor.java   
public void createControl(Composite parent) {
    sash = new SashForm(parent, SWT.VERTICAL);
    IActionBars bars = getSite().getActionBars();
    ActionRegistry ar = getActionRegistry();

    bars.setGlobalActionHandler(ActionFactory.COPY.getId(), ar.getAction(ActionFactory.COPY.getId()));
    bars.setGlobalActionHandler(ActionFactory.PASTE.getId(), ar.getAction(ActionFactory.PASTE.getId()));

    OutLineComposite composite = new OutLineComposite(filter, sash, SWT.NONE);

    Control tree = getViewer().createControl(composite.getComposite());
    tree.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 10, 1));
    tree.setData(GW_WIDGET_ID,GW_OUTLINE_ELEMENTS_TREE);
    getViewer().setEditDomain(getEditDomain());
    getViewer().setEditPartFactory(gwtpf);
    getViewer().setContents(gWGraph);

    getSelectionSynchronizer().addViewer(getViewer());

}
项目:time4sys    文件:Time4sysEditor.java   
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage() {
    PropertySheetPage propertySheetPage =
        new ExtendedPropertySheetPage(editingDomain) {
            @Override
            public void setSelectionToViewer(List<?> selection) {
                Time4sysEditor.this.setSelectionToViewer(selection);
                Time4sysEditor.this.setFocus();
            }

            @Override
            public void setActionBars(IActionBars actionBars) {
                super.setActionBars(actionBars);
                getActionBarContributor().shareGlobalActions(this, actionBars);
            }
        };
    propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
    propertySheetPages.add(propertySheetPage);

    return propertySheetPage;
}
项目:time4sys    文件:LibraryEditor.java   
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage() {
    PropertySheetPage propertySheetPage =
        new ExtendedPropertySheetPage(editingDomain) {
            @Override
            public void setSelectionToViewer(List<?> selection) {
                LibraryEditor.this.setSelectionToViewer(selection);
                LibraryEditor.this.setFocus();
            }

            @Override
            public void setActionBars(IActionBars actionBars) {
                super.setActionBars(actionBars);
                getActionBarContributor().shareGlobalActions(this, actionBars);
            }
        };
    propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
    propertySheetPages.add(propertySheetPage);

    return propertySheetPage;
}
项目:gemoc-studio    文件:GexpressionsEditor.java   
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage() {
    PropertySheetPage propertySheetPage =
        new ExtendedPropertySheetPage(editingDomain) {
            @Override
            public void setSelectionToViewer(List<?> selection) {
                GexpressionsEditor.this.setSelectionToViewer(selection);
                GexpressionsEditor.this.setFocus();
            }

            @Override
            public void setActionBars(IActionBars actionBars) {
                super.setActionBars(actionBars);
                getActionBarContributor().shareGlobalActions(this, actionBars);
            }
        };
    propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
    propertySheetPages.add(propertySheetPage);

    return propertySheetPage;
}
项目:time4sys    文件:DesignEditor.java   
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage() {
    PropertySheetPage propertySheetPage =
        new ExtendedPropertySheetPage(editingDomain) {
            @Override
            public void setSelectionToViewer(List<?> selection) {
                DesignEditor.this.setSelectionToViewer(selection);
                DesignEditor.this.setFocus();
            }

            @Override
            public void setActionBars(IActionBars actionBars) {
                super.setActionBars(actionBars);
                getActionBarContributor().shareGlobalActions(this, actionBars);
            }
        };
    propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
    propertySheetPages.add(propertySheetPage);

    return propertySheetPage;
}
项目:gemoc-studio    文件:FsmEditor.java   
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage() {
    PropertySheetPage propertySheetPage =
        new ExtendedPropertySheetPage(editingDomain) {
            @Override
            public void setSelectionToViewer(List<?> selection) {
                FsmEditor.this.setSelectionToViewer(selection);
                FsmEditor.this.setFocus();
            }

            @Override
            public void setActionBars(IActionBars actionBars) {
                super.setActionBars(actionBars);
                getActionBarContributor().shareGlobalActions(this, actionBars);
            }
        };
    propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
    propertySheetPages.add(propertySheetPage);

    return propertySheetPage;
}
项目:n4js    文件:N4JSOpenActions.java   
@Override
public void fillActionBars(final IActionBars actionBars) {
    if (inViewPart && canEnableOpenAction()) {
        openGroup.fillActionBars(actionBars);
        if (openAndExpandAction == null && openGroup.getOpenAction().isEnabled()) {
            actionBars.setGlobalActionHandler(ICommonActionConstants.OPEN, openGroup.getOpenAction());
        } else if (openAndExpandAction != null && openAndExpandAction.isEnabled()) {
            actionBars.setGlobalActionHandler(ICommonActionConstants.OPEN, openAndExpandAction);
        }
    }
}
项目:n4js    文件:SelectTopLevelElementActionGroup.java   
@Override
public void fillActionBars(final IActionBars actionBars) {
    if (hasContributedToViewMenu) {
        return;
    }
    final IMenuManager topLevelSubMenu = new MenuManager("Top Level Elements");
    addActions(topLevelSubMenu);
    final IMenuManager menuManager = actionBars.getMenuManager();
    menuManager.insertBefore(IWorkbenchActionConstants.MB_ADDITIONS, topLevelSubMenu);
    hasContributedToViewMenu = true;
}
项目:n4js    文件:N4JSProjectActionGroup.java   
@Override
public void fillActionBars(final IActionBars actionBars) {
    super.fillActionBars(actionBars);
    actionBars.setGlobalActionHandler(IDEActionFactory.CLOSE_PROJECT.getId(), closeAction);
    actionBars.setGlobalActionHandler(IDEActionFactory.CLOSE_UNRELATED_PROJECTS.getId(), closeUnrelatedAction);
    actionBars.setGlobalActionHandler(IDEActionFactory.OPEN_PROJECT.getId(), openAction);
}
项目:n4js    文件:TestResultsView.java   
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);
}
项目:bdf2    文件:EditorActionBarContributor.java   
private void buildActions(IActionBars actionBars) {
    addRetargetAction(new UndoRetargetAction());
    addRetargetAction(new RedoRetargetAction());
    addRetargetAction(new DeleteRetargetAction());

    RetargetAction showGridAction=new RetargetAction(GEFActionConstants.TOGGLE_GRID_VISIBILITY, "Grid");
    showGridAction.setImageDescriptor(Activator.getImageDescriptorFromPlugin("icons/grid.png"));
    addRetargetAction(showGridAction);
}
项目:eclipse-batch-editor    文件:BatchEditorContentOutlinePage.java   
public void createControl(Composite parent) {
    super.createControl(parent);

    labelProvider = new BatchEditorOutlineLabelProvider();

    TreeViewer viewer = getTreeViewer();
    viewer.setContentProvider(contentProvider);
    viewer.addDoubleClickListener(this);
    viewer.setLabelProvider(new DelegatingStyledCellLabelProvider(labelProvider));
    viewer.addSelectionChangedListener(this);

    /* it can happen that input is already updated before control created */
    if (input != null) {
        viewer.setInput(input);
    }
    toggleLinkingAction = new ToggleLinkingAction();
    toggleLinkingAction.setActionDefinitionId(IWorkbenchCommandConstants.NAVIGATE_TOGGLE_LINK_WITH_EDITOR);

    IActionBars actionBars = getSite().getActionBars();

    IToolBarManager toolBarManager = actionBars.getToolBarManager();
    toolBarManager.add(toggleLinkingAction);

    IMenuManager viewMenuManager = actionBars.getMenuManager();
    viewMenuManager.add(new Separator("EndFilterGroup")); //$NON-NLS-1$

    viewMenuManager.add(new Separator("treeGroup")); //$NON-NLS-1$
    viewMenuManager.add(toggleLinkingAction);


    /*
     * when no input is set on init state - let the editor rebuild outline
     * (async)
     */
    if (input == null && editor != null) {
        editor.rebuildOutline();
    }

}
项目:Hydrograph    文件:CommentBoxLabelEditManager.java   
/**
 * restores the saved actions
 * @param actionbars
 *                  at actionbars 
 */
private void restoreSavedActions(IActionBars actionBars){
    actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), copy);
    actionBars.setGlobalActionHandler(ActionFactory.PASTE.getId(), paste);
    actionBars.setGlobalActionHandler(ActionFactory.DELETE.getId(), delete);
    actionBars.setGlobalActionHandler(ActionFactory.SELECT_ALL.getId(), selectAll);
    actionBars.setGlobalActionHandler(ActionFactory.CUT.getId(), cut);
    actionBars.setGlobalActionHandler(ActionFactory.FIND.getId(), find);
    actionBars.setGlobalActionHandler(ActionFactory.UNDO.getId(), undo);
    actionBars.setGlobalActionHandler(ActionFactory.REDO.getId(), redo);
}
项目:convertigo-eclipse    文件:ProjectExplorerView.java   
private void hookGlobalActions() {
    IActionBars bars = getViewSite().getActionBars();

    bars.setGlobalActionHandler(ActionFactory.COPY.getId(), copyAction);
    bars.setGlobalActionHandler(ActionFactory.CUT.getId(), cutAction);
    bars.setGlobalActionHandler(ActionFactory.PASTE.getId(), pasteAction);

/*
    bars.setGlobalActionHandler(ActionFactory.UNDO.getId(), undoAction);
    bars.setGlobalActionHandler(ActionFactory.REDO.getId(), redoAction);
*/
}