本文整理汇总了Java中org.eclipse.jface.action.ToolBarManager.update方法的典型用法代码示例。如果您正苦于以下问题:Java ToolBarManager.update方法的具体用法?Java ToolBarManager.update怎么用?Java ToolBarManager.update使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jface.action.ToolBarManager
的用法示例。
在下文中一共展示了ToolBarManager.update方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createUI_12_Actions
import org.eclipse.jface.action.ToolBarManager; //导入方法依赖的package包/类
private void createUI_12_Actions(final Composite parent) {
final ToolBar toolbar = new ToolBar(parent, SWT.FLAT);
GridDataFactory
.fillDefaults()//
.grab(true, false)
.align(SWT.END, SWT.BEGINNING)
.applyTo(toolbar);
final ToolBarManager tbm = new ToolBarManager(toolbar);
tbm.add(_actionRestoreDefaults);
tbm.add(_actionPrefDialog);
tbm.update(true);
}
示例2: contributeToActionBars
import org.eclipse.jface.action.ToolBarManager; //导入方法依赖的package包/类
private void contributeToActionBars() {
final IActionBars bars = getViewSite().getActionBars();
fillLocalPullDown(bars.getMenuManager());
fillLocalToolBar(bars.getToolBarManager());
// a custom tool bar works slightly differently:
final ToolBarManager m = new ToolBarManager(toolBar);
fillCustomToolBar(m);
m.update(true);
}
示例3: configureControl
import org.eclipse.jface.action.ToolBarManager; //导入方法依赖的package包/类
protected void configureControl(
IXtextBrowserInformationControl control, ToolBarManager tbm,
String font) {
OpenInHelpAction openHelpAction = new OpenInHelpAction();
openHelpAction.setEnabled(true);
tbm.add(openHelpAction);
tbm.update(true);
}
示例4: doCreateInformationControl
import org.eclipse.jface.action.ToolBarManager; //导入方法依赖的package包/类
public IInformationControl doCreateInformationControl(Shell parent) {
if (de.darwinspl.preferences.resource.dwprofile.ui.DwprofileBrowserInformationControl.isAvailable(parent)) {
ToolBarManager tbm = new ToolBarManager(SWT.FLAT);
de.darwinspl.preferences.resource.dwprofile.ui.DwprofileBrowserInformationControl iControl = new de.darwinspl.preferences.resource.dwprofile.ui.DwprofileBrowserInformationControl(parent, FONT, tbm);
final OpenDeclarationAction openDeclarationAction = new OpenDeclarationAction(iControl);
tbm.add(openDeclarationAction);
final SimpleSelectionProvider selectionProvider = new SimpleSelectionProvider();
IInputChangedListener inputChangeListener = new IInputChangedListener() {
public void inputChanged(Object newInput) {
if (newInput == null) {
selectionProvider.setSelection(new StructuredSelection());
} else if (newInput instanceof de.darwinspl.preferences.resource.dwprofile.ui.DwprofileDocBrowserInformationControlInput) {
de.darwinspl.preferences.resource.dwprofile.ui.DwprofileDocBrowserInformationControlInput input = (de.darwinspl.preferences.resource.dwprofile.ui.DwprofileDocBrowserInformationControlInput) newInput;
Object inputElement = input.getInputElement();
selectionProvider.setSelection(new StructuredSelection(inputElement));
// If there is an element of type EObject in the input element, the button to open
// the declaration will be set enable
boolean isEObjectInput = inputElement instanceof EObject;
openDeclarationAction.setEnabled(isEObjectInput);
if (isEObjectInput) {
String simpleName = inputElement.getClass().getSimpleName();
simpleName = simpleName.substring(0, simpleName.length() - 4);
openDeclarationAction.setText("Open " + simpleName);
} else openDeclarationAction.setText("Open Declaration");
}
}
};
iControl.addInputChangeListener(inputChangeListener);
tbm.update(true);
return iControl;
} else {
return new DefaultInformationControl(parent, true);
}
}
示例5: doCreateInformationControl
import org.eclipse.jface.action.ToolBarManager; //导入方法依赖的package包/类
public IInformationControl doCreateInformationControl(Shell parent) {
if (eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionBrowserInformationControl.isAvailable(parent)) {
ToolBarManager tbm = new ToolBarManager(SWT.FLAT);
eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionBrowserInformationControl iControl = new eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionBrowserInformationControl(parent, FONT, tbm);
final OpenDeclarationAction openDeclarationAction = new OpenDeclarationAction(iControl);
tbm.add(openDeclarationAction);
final SimpleSelectionProvider selectionProvider = new SimpleSelectionProvider();
IInputChangedListener inputChangeListener = new IInputChangedListener() {
public void inputChanged(Object newInput) {
if (newInput == null) {
selectionProvider.setSelection(new StructuredSelection());
} else if (newInput instanceof eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionDocBrowserInformationControlInput) {
eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionDocBrowserInformationControlInput input = (eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionDocBrowserInformationControlInput) newInput;
Object inputElement = input.getInputElement();
selectionProvider.setSelection(new StructuredSelection(inputElement));
// If there is an element of type EObject in the input element, the button to open
// the declaration will be set enable
boolean isEObjectInput = inputElement instanceof EObject;
openDeclarationAction.setEnabled(isEObjectInput);
if (isEObjectInput) {
String simpleName = inputElement.getClass().getSimpleName();
simpleName = simpleName.substring(0, simpleName.length() - 4);
openDeclarationAction.setText("Open " + simpleName);
} else openDeclarationAction.setText("Open Declaration");
}
}
};
iControl.addInputChangeListener(inputChangeListener);
tbm.update(true);
return iControl;
} else {
return new DefaultInformationControl(parent, true);
}
}
示例6: doCreateInformationControl
import org.eclipse.jface.action.ToolBarManager; //导入方法依赖的package包/类
public IInformationControl doCreateInformationControl(Shell parent) {
if (eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaBrowserInformationControl.isAvailable(parent)) {
ToolBarManager tbm = new ToolBarManager(SWT.FLAT);
eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaBrowserInformationControl iControl = new eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaBrowserInformationControl(parent, FONT, tbm);
final OpenDeclarationAction openDeclarationAction = new OpenDeclarationAction(iControl);
tbm.add(openDeclarationAction);
final SimpleSelectionProvider selectionProvider = new SimpleSelectionProvider();
IInputChangedListener inputChangeListener = new IInputChangedListener() {
public void inputChanged(Object newInput) {
if (newInput == null) {
selectionProvider.setSelection(new StructuredSelection());
} else if (newInput instanceof eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaDocBrowserInformationControlInput) {
eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaDocBrowserInformationControlInput input = (eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaDocBrowserInformationControlInput) newInput;
Object inputElement = input.getInputElement();
selectionProvider.setSelection(new StructuredSelection(inputElement));
// If there is an element of type EObject in the input element, the button to open
// the declaration will be set enable
boolean isEObjectInput = inputElement instanceof EObject;
openDeclarationAction.setEnabled(isEObjectInput);
if (isEObjectInput) {
String simpleName = inputElement.getClass().getSimpleName();
simpleName = simpleName.substring(0, simpleName.length() - 4);
openDeclarationAction.setText("Open " + simpleName);
} else openDeclarationAction.setText("Open Declaration");
}
}
};
iControl.addInputChangeListener(inputChangeListener);
tbm.update(true);
return iControl;
} else {
return new DefaultInformationControl(parent, true);
}
}
示例7: doCreateInformationControl
import org.eclipse.jface.action.ToolBarManager; //导入方法依赖的package包/类
public IInformationControl doCreateInformationControl(Shell parent) {
if (eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueBrowserInformationControl.isAvailable(parent)) {
ToolBarManager tbm = new ToolBarManager(SWT.FLAT);
eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueBrowserInformationControl iControl = new eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueBrowserInformationControl(parent, FONT, tbm);
final OpenDeclarationAction openDeclarationAction = new OpenDeclarationAction(iControl);
tbm.add(openDeclarationAction);
final SimpleSelectionProvider selectionProvider = new SimpleSelectionProvider();
IInputChangedListener inputChangeListener = new IInputChangedListener() {
public void inputChanged(Object newInput) {
if (newInput == null) {
selectionProvider.setSelection(new StructuredSelection());
} else if (newInput instanceof eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueDocBrowserInformationControlInput) {
eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueDocBrowserInformationControlInput input = (eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueDocBrowserInformationControlInput) newInput;
Object inputElement = input.getInputElement();
selectionProvider.setSelection(new StructuredSelection(inputElement));
// If there is an element of type EObject in the input element, the button to open
// the declaration will be set enable
boolean isEObjectInput = inputElement instanceof EObject;
openDeclarationAction.setEnabled(isEObjectInput);
if (isEObjectInput) {
String simpleName = inputElement.getClass().getSimpleName();
simpleName = simpleName.substring(0, simpleName.length() - 4);
openDeclarationAction.setText("Open " + simpleName);
} else openDeclarationAction.setText("Open Declaration");
}
}
};
iControl.addInputChangeListener(inputChangeListener);
tbm.update(true);
return iControl;
} else {
return new DefaultInformationControl(parent, true);
}
}
示例8: doCreateInformationControl
import org.eclipse.jface.action.ToolBarManager; //导入方法依赖的package包/类
public IInformationControl doCreateInformationControl(Shell parent) {
if (eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingBrowserInformationControl.isAvailable(parent)) {
ToolBarManager tbm = new ToolBarManager(SWT.FLAT);
eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingBrowserInformationControl iControl = new eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingBrowserInformationControl(parent, FONT, tbm);
final OpenDeclarationAction openDeclarationAction = new OpenDeclarationAction(iControl);
tbm.add(openDeclarationAction);
final SimpleSelectionProvider selectionProvider = new SimpleSelectionProvider();
IInputChangedListener inputChangeListener = new IInputChangedListener() {
public void inputChanged(Object newInput) {
if (newInput == null) {
selectionProvider.setSelection(new StructuredSelection());
} else if (newInput instanceof eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingDocBrowserInformationControlInput) {
eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingDocBrowserInformationControlInput input = (eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingDocBrowserInformationControlInput) newInput;
Object inputElement = input.getInputElement();
selectionProvider.setSelection(new StructuredSelection(inputElement));
// If there is an element of type EObject in the input element, the button to open
// the declaration will be set enable
boolean isEObjectInput = inputElement instanceof EObject;
openDeclarationAction.setEnabled(isEObjectInput);
if (isEObjectInput) {
String simpleName = inputElement.getClass().getSimpleName();
simpleName = simpleName.substring(0, simpleName.length() - 4);
openDeclarationAction.setText("Open " + simpleName);
} else openDeclarationAction.setText("Open Declaration");
}
}
};
iControl.addInputChangeListener(inputChangeListener);
tbm.update(true);
return iControl;
} else {
return new DefaultInformationControl(parent, true);
}
}
示例9: doCreateInformationControl
import org.eclipse.jface.action.ToolBarManager; //导入方法依赖的package包/类
public IInformationControl doCreateInformationControl(Shell parent) {
if (eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsBrowserInformationControl.isAvailable(parent)) {
ToolBarManager tbm = new ToolBarManager(SWT.FLAT);
eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsBrowserInformationControl iControl = new eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsBrowserInformationControl(parent, FONT, tbm);
final OpenDeclarationAction openDeclarationAction = new OpenDeclarationAction(iControl);
tbm.add(openDeclarationAction);
final SimpleSelectionProvider selectionProvider = new SimpleSelectionProvider();
IInputChangedListener inputChangeListener = new IInputChangedListener() {
public void inputChanged(Object newInput) {
if (newInput == null) {
selectionProvider.setSelection(new StructuredSelection());
} else if (newInput instanceof eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsDocBrowserInformationControlInput) {
eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsDocBrowserInformationControlInput input = (eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsDocBrowserInformationControlInput) newInput;
Object inputElement = input.getInputElement();
selectionProvider.setSelection(new StructuredSelection(inputElement));
// If there is an element of type EObject in the input element, the button to open
// the declaration will be set enable
boolean isEObjectInput = inputElement instanceof EObject;
openDeclarationAction.setEnabled(isEObjectInput);
if (isEObjectInput) {
String simpleName = inputElement.getClass().getSimpleName();
simpleName = simpleName.substring(0, simpleName.length() - 4);
openDeclarationAction.setText("Open " + simpleName);
} else openDeclarationAction.setText("Open Declaration");
}
}
};
iControl.addInputChangeListener(inputChangeListener);
tbm.update(true);
return iControl;
} else {
return new DefaultInformationControl(parent, true);
}
}
示例10: doCreateInformationControl
import org.eclipse.jface.action.ToolBarManager; //导入方法依赖的package包/类
public IInformationControl doCreateInformationControl(Shell parent) {
if (eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestBrowserInformationControl.isAvailable(parent)) {
ToolBarManager tbm = new ToolBarManager(SWT.FLAT);
eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestBrowserInformationControl iControl = new eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestBrowserInformationControl(parent, FONT, tbm);
final OpenDeclarationAction openDeclarationAction = new OpenDeclarationAction(iControl);
tbm.add(openDeclarationAction);
final SimpleSelectionProvider selectionProvider = new SimpleSelectionProvider();
IInputChangedListener inputChangeListener = new IInputChangedListener() {
public void inputChanged(Object newInput) {
if (newInput == null) {
selectionProvider.setSelection(new StructuredSelection());
} else if (newInput instanceof eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestDocBrowserInformationControlInput) {
eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestDocBrowserInformationControlInput input = (eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestDocBrowserInformationControlInput) newInput;
Object inputElement = input.getInputElement();
selectionProvider.setSelection(new StructuredSelection(inputElement));
// If there is an element of type EObject in the input element, the button to open
// the declaration will be set enable
boolean isEObjectInput = inputElement instanceof EObject;
openDeclarationAction.setEnabled(isEObjectInput);
if (isEObjectInput) {
String simpleName = inputElement.getClass().getSimpleName();
simpleName = simpleName.substring(0, simpleName.length() - 4);
openDeclarationAction.setText("Open " + simpleName);
} else openDeclarationAction.setText("Open Declaration");
}
}
};
iControl.addInputChangeListener(inputChangeListener);
tbm.update(true);
return iControl;
} else {
return new DefaultInformationControl(parent, true);
}
}
示例11: addActions
import org.eclipse.jface.action.ToolBarManager; //导入方法依赖的package包/类
private void addActions(final ToolBarManager manager, final CommonStructureControl cssControl) {
manager.add(new NewNodeAction(cssControl));
manager.add(new DeleteNodeAction(cssControl));
manager.add(new Separator());
manager.add(new MoveUpNodeAction(cssControl));
manager.add(new MoveDownNodeAction(cssControl));
manager.add(new PromoteNodeAction(cssControl));
manager.add(new DemoteNodeAction(cssControl));
manager.update(true);
}
示例12: createUI10MapViewerHeader
import org.eclipse.jface.action.ToolBarManager; //导入方法依赖的package包/类
private void createUI10MapViewerHeader(final Composite parent) {
final Composite headerContainer = new Composite(parent, SWT.NONE);
GridDataFactory.fillDefaults().grab(true, false).applyTo(headerContainer);
GridLayoutFactory.fillDefaults().numColumns(2).applyTo(headerContainer);
// headerContainer.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_GREEN));
{
/*
* label: map provider
*/
final Label label = new Label(headerContainer, SWT.NONE);
GridDataFactory.fillDefaults().grab(true, false).align(SWT.FILL, SWT.CENTER).applyTo(label);
label.setText(Messages.Pref_Map_Label_AvaiablelMapProvider);
/*
* button: refresh
*/
final ToolBar toolbar = new ToolBar(headerContainer, SWT.FLAT);
final ToolBarManager tbm = new ToolBarManager(toolbar);
_actionRefreshNotAssessed = new ActionRefreshOfflineInfoNotAssessed(this);
_actionRefreshSelected = new ActionRefreshOfflineInfoSelected(this);
_actionRefreshAll = new ActionRefreshOfflineInfoAll(this);
_actionCancelRefresh = new ActionCancelRefreshOfflineInfo(this);
tbm.add(_actionRefreshNotAssessed);
tbm.add(_actionRefreshSelected);
tbm.add(_actionRefreshAll);
tbm.add(_actionCancelRefresh);
tbm.update(true);
}
}
示例13: clearToolBar
import org.eclipse.jface.action.ToolBarManager; //导入方法依赖的package包/类
public static void clearToolBar(Composite parent)
{
ToolBarManager tbm = getToolBarManager(parent);
if(tbm != null)
{
tbm.removeAll();
tbm.update(true);
}
}
示例14: contributeToTreePane
import org.eclipse.jface.action.ToolBarManager; //导入方法依赖的package包/类
private void contributeToTreePane()
{
ToolBarManager manager = treePane.getToolBarManager();
manager.removeAll();
manager.add(countAction);
manager.add(new Separator("separator1"));
manager.add(refreshTreePaneAction);
manager.add(collapseAllAction);
manager.update(true);
}
示例15: contributeToTablePane
import org.eclipse.jface.action.ToolBarManager; //导入方法依赖的package包/类
private void contributeToTablePane()
{
ToolBarManager manager = ViewerPane.getToolBarManager(tablePane);
manager.removeAll();
manager.add(exportAction);
manager.add(new Separator("separator1"));
manager.add(clearAction);
manager.update(true);
}