本文整理了Java中org.eclipse.jface.action.ToolBarManager.add()
方法的一些代码示例,展示了ToolBarManager.add()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ToolBarManager.add()
方法的具体详情如下:
包路径:org.eclipse.jface.action.ToolBarManager
类名称:ToolBarManager
方法名:add
暂无
代码示例来源:origin: org.eclipse.mylyn.builds/ui
@Override
protected void fillToolBar(ToolBarManager toolBarManager) {
super.fillToolBar(toolBarManager);
toolBarManager.add(filterTestFailuresAction);
toolBarManager.add(showTestResultsAction);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
/**
* Fills up the tool bar with items for the method viewer
* Should be called by the creator of the tool bar
* @param tbm the tool bar manager
*/
public void contributeToToolBar(ToolBarManager tbm) {
tbm.add(fShowInheritedMembersAction);
tbm.add(fSortByDefiningTypeAction);
tbm.add(new Separator());
fMemberFilterActionGroup.contributeToToolBar(tbm);
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
/**
* Fills up the tool bar with items for the method viewer
* Should be called by the creator of the tool bar
* @param tbm the tool bar manager
*/
public void contributeToToolBar(ToolBarManager tbm) {
tbm.add(fShowInheritedMembersAction);
tbm.add(fSortByDefiningTypeAction);
tbm.add(new Separator());
fMemberFilterActionGroup.contributeToToolBar(tbm);
}
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
/**
* Fills up the tool bar with items for the method viewer
* Should be called by the creator of the tool bar
* @param tbm the tool bar manager
*/
public void contributeToToolBar(ToolBarManager tbm) {
tbm.add(fShowInheritedMembersAction);
tbm.add(fSortByDefiningTypeAction);
tbm.add(new Separator());
fMemberFilterActionGroup.contributeToToolBar(tbm);
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
/**
* Adds actions to the given toolbar.
*
* @param manager the toolbar manager to add actions to
* @param infoControl the information control
*/
public void fillToolBar(ToolBarManager manager, IInformationControl infoControl) {
ConfigureAnnotationsAction configureAnnotationsAction= new ConfigureAnnotationsAction(annotation, infoControl);
manager.add(configureAnnotationsAction);
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
/**
* Adds actions to the given toolbar.
*
* @param manager the toolbar manager to add actions to
* @param infoControl the information control
*/
public void fillToolBar(ToolBarManager manager, IInformationControl infoControl) {
ConfigureAnnotationsAction configureAnnotationsAction= new ConfigureAnnotationsAction(annotation, infoControl);
manager.add(configureAnnotationsAction);
}
}
代码示例来源:origin: org.eclipse.mylyn.builds/ui
@Override
protected void fillToolBar(ToolBarManager toolBarManager) {
super.fillToolBar(toolBarManager);
toolBarManager.add(new Action("Collapse All", CommonImages.COLLAPSE_ALL) {
public void run() {
viewer.collapseAll();
}
});
}
}
代码示例来源:origin: stackoverflow.com
private static final class PresenterControlCreator extends AbstractReusableInformationControlCreator {
@Override
public IInformationControl doCreateInformationControl(Shell parent) {
ToolBarManager tbm= new ToolBarManager(SWT.FLAT);
NLSHoverControl iControl= new NLSHoverControl(parent, tbm);
OpenPropertiesFileAction openPropertiesFileAction= new OpenPropertiesFileAction(iControl);
tbm.add(openPropertiesFileAction);
tbm.update(true);
return iControl;
}
}
代码示例来源:origin: stackoverflow.com
ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT);
ToolBar toolbar = toolBarManager.createControl(section);
toolbar.setCursor(Display.getDefault().getSystemCursor(SWT.CURSOR_HAND));
// Add sort action to the tool bar
fSortAction = new SortAction(fExtensionTree, PDEUIMessages.ExtensionsPage_sortAlpha, null, null, this);
toolBarManager.add(fSortAction);
// Add collapse action to the tool bar
fCollapseAction = new CollapseAction(fExtensionTree, PDEUIMessages.ExtensionsPage_collapseAll);
toolBarManager.add(fCollapseAction);
toolBarManager.update(true);
section.setTextClient(toolbar);
代码示例来源:origin: org.eclipse.mylyn.builds/ui
@Override
protected void fillToolBar(ToolBarManager toolBarManager) {
super.fillToolBar(toolBarManager);
toolBarManager.add(buildOutputAction);
}
代码示例来源:origin: stackoverflow.com
@Override
public IInformationControl doCreateInformationControl(Shell parent) {
ToolBarManager tbm = new ToolBarManager(SWT.FLAT);
DefaultInformationControl iControl = new DefaultInformationControl(parent, tbm);
IAction action = new MyAction();
tbm.add(action);
tbm.update(true);
return iControl;
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
@Override
public IInformationControl doCreateInformationControl(Shell parent) {
ToolBarManager tbm= new ToolBarManager(SWT.FLAT);
NLSHoverControl iControl= new NLSHoverControl(parent, tbm);
OpenPropertiesFileAction openPropertiesFileAction= new OpenPropertiesFileAction(iControl);
tbm.add(openPropertiesFileAction);
tbm.update(true);
return iControl;
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
@Override
public IInformationControl doCreateInformationControl(Shell parent) {
ToolBarManager tbm= new ToolBarManager(SWT.FLAT);
NLSHoverControl iControl= new NLSHoverControl(parent, tbm);
OpenPropertiesFileAction openPropertiesFileAction= new OpenPropertiesFileAction(iControl);
tbm.add(openPropertiesFileAction);
tbm.update(true);
return iControl;
}
}
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
private void createSectionToolbar(Section section, FormToolkit toolkit) {
ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT);
ToolBar toolbar = toolBarManager.createControl(section);
final Cursor handCursor = Display.getCurrent().getSystemCursor(SWT.CURSOR_HAND);
toolbar.setCursor(handCursor);
fNewPluginAction = new NewPluginAction();
fNewFragmentAction = new NewFragmentAction();
toolBarManager.add(fNewPluginAction);
toolBarManager.add(fNewFragmentAction);
toolBarManager.update(true);
section.setTextClient(toolbar);
}
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.runtime
public void createImageAction(Section section, Image image) {
if (image == null)
return;
ToolBarManager manager = createSectionToolbar(section);
SaveImageAction action = new SaveImageAction(image);
action.setText(PDERuntimeMessages.SpyFormToolkit_saveImageAs_title);
action.setImageDescriptor(PDERuntimePluginImages.SAVE_IMAGE_AS_OBJ);
manager.add(action);
manager.update(true);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.compare
public void contributeDiffViewerToolbarItems(Action[] actions, boolean workspacePatch){
ToolBarManager tbm= CompareViewerPane.getToolBarManager(viewer.getControl().getParent());
if (tbm != null) {
tbm.removeAll();
tbm.add(new Separator("contributed")); //$NON-NLS-1$
for (int i = 0; i < actions.length; i++) {
tbm.appendToGroup("contributed", actions[i]); //$NON-NLS-1$
}
tbm.update(true);
}
}
代码示例来源:origin: org.eclipse/org.eclipse.compare
public void contributeDiffViewerToolbarItems(Action[] actions, boolean workspacePatch){
ToolBarManager tbm= CompareViewerPane.getToolBarManager(viewer.getControl().getParent());
if (tbm != null) {
tbm.removeAll();
tbm.add(new Separator("contributed")); //$NON-NLS-1$
for (int i = 0; i < actions.length; i++) {
tbm.appendToGroup("contributed", actions[i]); //$NON-NLS-1$
}
tbm.update(true);
}
}
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
private void createSectionToolbar(Section section, FormToolkit toolkit) {
ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT);
ToolBar toolbar = toolBarManager.createControl(section);
final Cursor handCursor = Display.getCurrent().getSystemCursor(SWT.CURSOR_HAND);
toolbar.setCursor(handCursor);
// Add sort action to the tool bar
fSortAction = new SortAction(fImportViewer, PDEUIMessages.RequiresSection_sortAlpha, null, null, this);
toolBarManager.add(fSortAction);
toolBarManager.update(true);
section.setTextClient(toolbar);
}
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
private void createSectionToolbar(Section section, FormToolkit toolkit) {
ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT);
ToolBar toolbar = toolBarManager.createControl(section);
final Cursor handCursor = Display.getCurrent().getSystemCursor(SWT.CURSOR_HAND);
toolbar.setCursor(handCursor);
// Add sort action to the tool bar
fSortAction = new SortAction(getTablePart().getTableViewer(), PDEUIMessages.RequiresSection_sortAlpha, null, null, this);
toolBarManager.add(fSortAction);
toolBarManager.update(true);
section.setTextClient(toolbar);
}
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
/**
* @param section
* @param toolkit
*/
private void createSectionToolbar(Section section, FormToolkit toolkit) {
ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT);
ToolBar toolbar = toolBarManager.createControl(section);
final Cursor handCursor = Display.getCurrent().getSystemCursor(SWT.CURSOR_HAND);
toolbar.setCursor(handCursor);
// Add sort action to the tool bar
fSortAction = new SortAction(getStructuredViewerPart().getViewer(), PDEUIMessages.FeatureEditor_PluginSection_sortAlpha, ListUtil.NAME_COMPARATOR, null, null);
toolBarManager.add(fSortAction);
toolBarManager.update(true);
section.setTextClient(toolbar);
}
内容来源于网络,如有侵权,请联系作者删除!