本文整理匯總了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);
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}