本文整理汇总了Java中org.eclipse.jface.action.IToolBarManager类的典型用法代码示例。如果您正苦于以下问题:Java IToolBarManager类的具体用法?Java IToolBarManager怎么用?Java IToolBarManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IToolBarManager类属于org.eclipse.jface.action包,在下文中一共展示了IToolBarManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: topLevelElementChanged
import org.eclipse.jface.action.IToolBarManager; //导入依赖的package包/类
@Override
public void topLevelElementChanged(final boolean workingSetTopLevel) {
if (actionBars != null) {
final IToolBarManager toolBarManager = actionBars.getToolBarManager();
toolBarManager.remove(selectWorkingSetDelegate);
toolBarManager.remove(showHiddenWorkingSetsDelegate);
if (workingSetManagerBroker.isWorkingSetTopLevel()) {
toolBarManager.add(selectWorkingSetDelegate);
final WorkingSetManager manager = workingSetManagerBroker.getActiveManager();
if (manager != null) {
WorkingSet[] allItems = manager.getAllWorkingSets();
WorkingSet[] items = manager.getWorkingSets();
updateShowHiddenAction(allItems, items);
}
}
selectTopLevelElementAction.fillActionBars(actionBars);
actionBars.updateActionBars();
}
}
示例2: updateShowHiddenAction
import org.eclipse.jface.action.IToolBarManager; //导入依赖的package包/类
private void updateShowHiddenAction(final WorkingSet[] allItems, final WorkingSet[] items) {
final IToolBarManager toolBarManager = actionBars.getToolBarManager();
toolBarManager.remove(showHiddenWorkingSetsDelegate);
if (allItems.length > items.length) {
toolBarManager.add(showHiddenWorkingSetsDelegate);
}
}
示例3: addActionToToolbar
import org.eclipse.jface.action.IToolBarManager; //导入依赖的package包/类
private void addActionToToolbar(Action action)
{
IActionBars actionBars = getViewSite().getActionBars();
// IMenuManager dropDownMenu = actionBars.getMenuManager();
IToolBarManager toolBar = actionBars.getToolBarManager();
// dropDownMenu.add(action);
toolBar.add(action);
}
示例4: createControl
import org.eclipse.jface.action.IToolBarManager; //导入依赖的package包/类
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();
}
}
示例5: contributeToToolBar
import org.eclipse.jface.action.IToolBarManager; //导入依赖的package包/类
protected void contributeToToolBar(final IManagedForm headerForm, final IToolBarManager toolBarManager) {
RefreshAction refreshAction = getRefreshAction();
if (refreshAction != null) {
toolBarManager.add(refreshAction);
}
DataModel<?, ?, ?> parentModel = getParentModel();
DataModelElementType parentModelElementType = getParentModelElementType();
if (parentModel != null && parentModelElementType != null) {
final BaseControlContribution parentImageHyperlinkToolBarContribution = createImageHyperlinkToolBarContribution(
"Parent Link", parentModel, parentModelElementType);
if (parentImageHyperlinkToolBarContribution != null) {
addImageHyperlinkToolBarContribution(headerForm, toolBarManager,
parentImageHyperlinkToolBarContribution, parentModel);
}
}
DataModel<?, ?, ?> ownerModel = getOwnerModel();
DataModelElementType ownerModelElementType = getOwnerModelElementType();
if (ownerModel != null && ownerModelElementType != null && ownerModel != parentModel) {
final BaseControlContribution ownerImageHyperlinkToolBarContribution = createImageHyperlinkToolBarContribution(
"Owner Link", ownerModel, ownerModelElementType);
if (ownerImageHyperlinkToolBarContribution != null) {
addImageHyperlinkToolBarContribution(headerForm, toolBarManager,
ownerImageHyperlinkToolBarContribution, ownerModel);
}
}
}
示例6: contributeToToolBar
import org.eclipse.jface.action.IToolBarManager; //导入依赖的package包/类
@Override
protected void contributeToToolBar(IToolBarManager toolBarManager) {
super.contributeToToolBar(toolBarManager);
ControlContribution toolBarCompositeContribution = new ControlContribution(getToolBarCompositeContributionId()) {
@Override
protected Control createControl(Composite parent) {
FormToolkit toolkit = getManagedForm().getToolkit();
Composite toolBarComposite = toolkit.createComposite(parent);
FormLayout toolBarCompositeLayout = new FormLayout();
toolBarCompositeLayout.marginTop = 0;
toolBarCompositeLayout.marginBottom = 0;
toolBarCompositeLayout.marginLeft = 4;
toolBarCompositeLayout.marginRight = 4;
toolBarCompositeLayout.spacing = 4;
toolBarComposite.setLayout(toolBarCompositeLayout);
_ToolBarLabel = toolkit.createLabel(toolBarComposite, "", SWT.RIGHT);
FormData toolBarLabelFormData = new FormData();
toolBarLabelFormData.top = new FormAttachment(0, 0);
toolBarLabelFormData.left = new FormAttachment(0, 0);
toolBarLabelFormData.right = new FormAttachment(100, 0);
// HACK: I really struggled to get this label to show up.
toolBarLabelFormData.width = 100;
_ToolBarLabel.setLayoutData(toolBarLabelFormData);
return toolBarComposite;
}
};
toolBarManager.add(toolBarCompositeContribution);
}
示例7: contributeToToolBar
import org.eclipse.jface.action.IToolBarManager; //导入依赖的package包/类
/**
* This adds Separators for editor additions to the tool bar.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void contributeToToolBar ( IToolBarManager toolBarManager )
{
toolBarManager.add ( new Separator ( "protocol-settings" ) ); //$NON-NLS-1$
toolBarManager.add ( new Separator ( "protocol-additions" ) ); //$NON-NLS-1$
}
示例8: fillCoolBar
import org.eclipse.jface.action.IToolBarManager; //导入依赖的package包/类
@Override
protected void fillCoolBar ( final ICoolBarManager coolBar )
{
final IToolBarManager toolbar = new ToolBarManager ( SWT.FLAT | SWT.RIGHT );
coolBar.add ( new ToolBarContributionItem ( toolbar, "main" ) );
toolbar.add ( getAction ( ActionFactory.NEW_WIZARD_DROP_DOWN.getId () ) );
coolBar.add ( new GroupMarker ( IWorkbenchActionConstants.MB_ADDITIONS ) );
}
示例9: contributeToToolBar
import org.eclipse.jface.action.IToolBarManager; //导入依赖的package包/类
/**
* This adds Separators for editor additions to the tool bar. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public void contributeToToolBar ( final IToolBarManager toolBarManager )
{
toolBarManager.add ( new Separator ( "chart-settings" ) );
toolBarManager.add ( new Separator ( "chart-additions" ) );
}
示例10: contributeToToolBar
import org.eclipse.jface.action.IToolBarManager; //导入依赖的package包/类
/**
* This adds Separators for editor additions to the tool bar.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void contributeToToolBar ( IToolBarManager toolBarManager )
{
toolBarManager.add ( new Separator ( "detailview-settings" ) ); //$NON-NLS-1$
toolBarManager.add ( new Separator ( "detailview-additions" ) ); //$NON-NLS-1$
}
示例11: contributeToToolBar
import org.eclipse.jface.action.IToolBarManager; //导入依赖的package包/类
/**
* This adds Separators for editor additions to the tool bar.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void contributeToToolBar ( IToolBarManager toolBarManager )
{
toolBarManager.add ( new Separator ( "visualinterface-settings" ) ); //$NON-NLS-1$
toolBarManager.add ( new Separator ( "visualinterface-additions" ) ); //$NON-NLS-1$
}
示例12: contributeToToolBar
import org.eclipse.jface.action.IToolBarManager; //导入依赖的package包/类
/**
* This adds Separators for editor additions to the tool bar.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void contributeToToolBar ( IToolBarManager toolBarManager )
{
toolBarManager.add ( new Separator ( "deployment-settings" ) ); //$NON-NLS-1$
toolBarManager.add ( new Separator ( "deployment-additions" ) ); //$NON-NLS-1$
}
示例13: contributeToToolBar
import org.eclipse.jface.action.IToolBarManager; //导入依赖的package包/类
/**
* This adds Separators for editor additions to the tool bar.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void contributeToToolBar ( IToolBarManager toolBarManager )
{
toolBarManager.add ( new Separator ( "setup-settings" ) ); //$NON-NLS-1$
toolBarManager.add ( new Separator ( "setup-additions" ) ); //$NON-NLS-1$
}
示例14: contributeToToolBar
import org.eclipse.jface.action.IToolBarManager; //导入依赖的package包/类
/**
* This adds Separators for editor additions to the tool bar.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void contributeToToolBar ( IToolBarManager toolBarManager )
{
toolBarManager.add ( new Separator ( "osgi-settings" ) ); //$NON-NLS-1$
toolBarManager.add ( new Separator ( "osgi-additions" ) ); //$NON-NLS-1$
}
示例15: contributeToToolBar
import org.eclipse.jface.action.IToolBarManager; //导入依赖的package包/类
/**
* This adds Separators for editor additions to the tool bar.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void contributeToToolBar ( IToolBarManager toolBarManager )
{
toolBarManager.add ( new Separator ( "world-settings" ) ); //$NON-NLS-1$
toolBarManager.add ( new Separator ( "world-additions" ) ); //$NON-NLS-1$
}