本文整理汇总了Java中org.eclipse.jface.action.IToolBarManager.add方法的典型用法代码示例。如果您正苦于以下问题:Java IToolBarManager.add方法的具体用法?Java IToolBarManager.add怎么用?Java IToolBarManager.add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jface.action.IToolBarManager
的用法示例。
在下文中一共展示了IToolBarManager.add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addImageHyperlinkToolBarContribution
import org.eclipse.jface.action.IToolBarManager; //导入方法依赖的package包/类
protected void addImageHyperlinkToolBarContribution(final IManagedForm headerForm,
final IToolBarManager toolBarManager, final BaseControlContribution baseControlContribution,
final DataModel<?, ?, ?> model) {
final Separator separator = new Separator();
toolBarManager.add(separator);
toolBarManager.add(baseControlContribution);
baseControlContribution.addControlDisposeListener(new DisposeListener() {
@Override
public void widgetDisposed(DisposeEvent e) {
if (!model.isDestroyed()) {
// Only do this clean up when the model destruction caused the widget disposal
// WARNING: toolBarManager.update(true); throws a NullPointer if called during app exit.
return;
}
toolBarManager.remove(separator);
separator.dispose();
toolBarManager.remove(baseControlContribution);
toolBarManager.update(true);
}
});
}
示例2: fillLocalToolBar
import org.eclipse.jface.action.IToolBarManager; //导入方法依赖的package包/类
private void fillLocalToolBar(IToolBarManager manager) {
manager.add(collapseAllAction);
manager.add(trackAction);
manager.add(reloadAction);
if (activePage instanceof FolderViewerPage) {
manager.add(chooseFolderAction);
}
if (activePage instanceof PlatformViewerPage) {
manager.add(showReadOnlyAction);
}
manager.add(viewModeAction);
manager.add(addAction);
manager.add(removeAction);
manager.add(copyAction);
}
示例3: 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 ( "recipe-settings" ) ); //$NON-NLS-1$
toolBarManager.add ( new Separator ( "recipe-additions" ) ); //$NON-NLS-1$
}
示例4: 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$
}
示例5: 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 ( "globalize-settings" ) ); //$NON-NLS-1$
toolBarManager.add ( new Separator ( "globalize-additions" ) ); //$NON-NLS-1$
}
示例6: 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();
}
}
示例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 ( "memory-settings" ) );
toolBarManager.add ( new Separator ( "memory-additions" ) );
}
示例8: 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);
}
示例9: createToolbar
import org.eclipse.jface.action.IToolBarManager; //导入方法依赖的package包/类
private void createToolbar() {
IToolBarManager manager = getViewSite().getActionBars().getToolBarManager();
manager.add(settingsEngine);
manager.add(optionsAction);
manager.add(searchAction);
manager.add(clearLogsAction);
manager.add(scrollLockAction);
}
示例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 ( "protocol-settings" ) ); //$NON-NLS-1$
toolBarManager.add ( new Separator ( "protocol-additions" ) ); //$NON-NLS-1$
}
示例11: createToolbar
import org.eclipse.jface.action.IToolBarManager; //导入方法依赖的package包/类
/**
* Créé la barre d'outils de la page.
*/
private void createToolbar() {
/* Ajoute le bouton de tri. */
IToolBarManager mgr = getSite().getActionBars().getToolBarManager();
mgr.add(sortAction);
}
示例12: contributeToToolBar
import org.eclipse.jface.action.IToolBarManager; //导入方法依赖的package包/类
public void contributeToToolBar(IToolBarManager manager) {
manager.add(new Separator());
manager.add(sampleAction);
}
示例13: fillCustomToolBar
import org.eclipse.jface.action.IToolBarManager; //导入方法依赖的package包/类
private void fillCustomToolBar(IToolBarManager manager) {
manager.add(actionShowHistory);
}
示例14: contributeToToolBar
import org.eclipse.jface.action.IToolBarManager; //导入方法依赖的package包/类
@Override
public void contributeToToolBar(IToolBarManager toolBarManager) {
toolBarManager.add(this.getAction(ActionFactory.REDO.getId()));
toolBarManager.add(this.getAction(ActionFactory.UNDO.getId()));
}
示例15: createPartControl
import org.eclipse.jface.action.IToolBarManager; //导入方法依赖的package包/类
/**
* This is a callback that will allow us to create the viewer and initialize
* it.
*/
@Override
public void createPartControl ( final Composite parent )
{
super.createPartControl ( parent );
this.scheduler = ScheduledExportedExecutorService.newSingleThreadExportedScheduledExecutor ( ID + "/" + getViewSite ().getSecondaryId () );
// resume Action
this.resumeAction = new CustomizableAction ();
this.resumeAction.setText ( Messages.EventHistoryView_Action_Resume_Text );
this.resumeAction.setToolTipText ( Messages.EventHistoryView_Action_Resume_ToolTop );
this.resumeAction.setImageDescriptor ( ImageDescriptor.createFromURL ( Activator.getDefault ().getBundle ().getResource ( "icons/resume.gif" ) ) ); //$NON-NLS-1$
this.resumeAction.setDisabledImageDescriptor ( ImageDescriptor.createFromURL ( Activator.getDefault ().getBundle ().getResource ( "icons/resume_disabled.gif" ) ) ); //$NON-NLS-1$
this.resumeAction.setEnabled ( false );
this.resumeAction.setRunnable ( new Runnable () {
@Override
public void run ()
{
resumeEventsRetrieval ();
}
} );
// clear Action
this.clearAction = new CustomizableAction ();
this.clearAction.setText ( Messages.EventHistoryView_Action_Clear_Text );
this.clearAction.setToolTipText ( Messages.EventHistoryView_Action_Clear_ToolTip );
this.clearAction.setImageDescriptor ( ImageDescriptor.createFromURL ( Activator.getDefault ().getBundle ().getResource ( "icons/clear_search.gif" ) ) ); //$NON-NLS-1$
this.clearAction.setEnabled ( false );
this.clearAction.setRunnable ( new Runnable () {
@Override
public void run ()
{
clearData ();
EventHistoryView.this.searchAction.setChecked ( false );
}
} );
// search Action
this.searchAction = new CustomizableAction ( "", IAction.AS_CHECK_BOX );
this.searchAction.setText ( Messages.EventHistoryView_Action_Search_Text );
this.searchAction.setToolTipText ( Messages.EventHistoryView_Action_Search_ToolTip );
this.searchAction.setImageDescriptor ( ImageDescriptor.createFromURL ( Activator.getDefault ().getBundle ().getResource ( "icons/search.gif" ) ) ); //$NON-NLS-1$
this.searchAction.setDisabledImageDescriptor ( ImageDescriptor.createFromURL ( Activator.getDefault ().getBundle ().getResource ( "icons/search_disabled.gif" ) ) ); //$NON-NLS-1$
this.searchAction.setEnabled ( false );
this.searchAction.setRunnable ( new Runnable () {
@Override
public void run ()
{
EventHistoryView.this.searchAction.setChecked ( true );
pauseEventsRetrieval ();
startEventsRetrieval ();
}
} );
final IToolBarManager toolBarManager = getViewSite ().getActionBars ().getToolBarManager ();
toolBarManager.add ( this.resumeAction );
toolBarManager.add ( this.searchAction );
toolBarManager.add ( this.clearAction );
// label which contains no of retrieved events
this.events = new WritableSet ( DisplayRealm.getRealm ( parent.getDisplay () ) );
// load configuration first, since we need the additional columns later
loadConfiguration ();
this.eventsTable = new EventViewTable ( getContentPane (), getViewSite (), SWT.BORDER, this.events, this.initialColumnSettings, this.columnInformations );
this.eventsTable.setLayoutData ( new GridData ( SWT.FILL, SWT.FILL, true, true, 1, 1 ) );
getSite ().setSelectionProvider ( this.eventsTable.getTableViewer () );
}