当前位置: 首页>>代码示例>>Java>>正文


Java IActionBars类代码示例

本文整理汇总了Java中org.eclipse.ui.IActionBars的典型用法代码示例。如果您正苦于以下问题:Java IActionBars类的具体用法?Java IActionBars怎么用?Java IActionBars使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IActionBars类属于org.eclipse.ui包,在下文中一共展示了IActionBars类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testTopLevelElementsEntryNoDuplicates

import org.eclipse.ui.IActionBars; //导入依赖的package包/类
/**
 * 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);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:23,代码来源:SelectAllProjectExplorer_PluginUITest.java

示例2: getPropertySheetPage

import org.eclipse.ui.IActionBars; //导入依赖的package包/类
/**
 * 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;
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:27,代码来源:ConstraintsEditor.java

示例3: getPropertySheetPage

import org.eclipse.ui.IActionBars; //导入依赖的package包/类
/**
 * 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;
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:27,代码来源:TracingannotationsEditor.java

示例4: getPropertySheetPage

import org.eclipse.ui.IActionBars; //导入依赖的package包/类
/**
 * 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;
}
 
开发者ID:occiware,项目名称:OCCI-Studio,代码行数:27,代码来源:PlatformEditor.java

示例5: addGraphicalEditorActions

import org.eclipse.ui.IActionBars; //导入依赖的package包/类
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);
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:19,代码来源:EditorActionBarContributor.java

示例6: getPropertySheetPage

import org.eclipse.ui.IActionBars; //导入依赖的package包/类
/**
 * 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;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:31,代码来源:ProtocolEditor.java

示例7: getPropertySheetPage

import org.eclipse.ui.IActionBars; //导入依赖的package包/类
/**
 * 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;
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:27,代码来源:NfpEditor.java

示例8: getPropertySheetPage

import org.eclipse.ui.IActionBars; //导入依赖的package包/类
/**
 * 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;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:33,代码来源:ChartEditor.java

示例9: getPropertySheetPage

import org.eclipse.ui.IActionBars; //导入依赖的package包/类
/**
 * 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;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:31,代码来源:ChartConfiguratorView.java

示例10: updateActions

import org.eclipse.ui.IActionBars; //导入依赖的package包/类
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);
}
 
开发者ID:32kda,项目名称:com.onpositive.prefeditor,代码行数:26,代码来源:PreferenceView.java

示例11: getPropertySheetPage

import org.eclipse.ui.IActionBars; //导入依赖的package包/类
/**
 * 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;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:31,代码来源:DetailViewEditor.java

示例12: getPropertySheetPage

import org.eclipse.ui.IActionBars; //导入依赖的package包/类
/**
 * 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;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:29,代码来源:DeploymentEditor.java

示例13: getPropertySheetPage

import org.eclipse.ui.IActionBars; //导入依赖的package包/类
/**
 * 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;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:29,代码来源:ProfileEditor.java

示例14: getPropertySheetPage

import org.eclipse.ui.IActionBars; //导入依赖的package包/类
/**
 * 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;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:29,代码来源:OsgiEditor.java

示例15: getPropertySheetPage

import org.eclipse.ui.IActionBars; //导入依赖的package包/类
/**
 * 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;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:29,代码来源:WorldEditor.java


注:本文中的org.eclipse.ui.IActionBars类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。