本文整理汇总了Java中org.eclipse.jface.action.IToolBarManager.update方法的典型用法代码示例。如果您正苦于以下问题:Java IToolBarManager.update方法的具体用法?Java IToolBarManager.update怎么用?Java IToolBarManager.update使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jface.action.IToolBarManager
的用法示例。
在下文中一共展示了IToolBarManager.update方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createHeaderContents
import org.eclipse.jface.action.IToolBarManager; //导入方法依赖的package包/类
@Override
protected void createHeaderContents(IManagedForm headerForm) {
super.createHeaderContents(headerForm);
FormToolkit toolkit = headerForm.getToolkit();
ScrolledForm scrolledForm = headerForm.getForm();
Form form = scrolledForm.getForm();
toolkit.decorateFormHeading(form);
updateTitle();
makeActions();
IToolBarManager toolBarManager = form.getToolBarManager();
contributeToToolBar(headerForm, toolBarManager);
toolBarManager.update(true);
}
示例2: updateActions
import org.eclipse.jface.action.IToolBarManager; //导入方法依赖的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);
}
示例3: createFormContent
import org.eclipse.jface.action.IToolBarManager; //导入方法依赖的package包/类
@Override
protected final void createFormContent(IManagedForm managedForm) {
makeActions();
ScrolledForm form = managedForm.getForm();
form.setText(getTitle());
form.setImage(getImage());
FormLayout bodyLayout = new FormLayout();
bodyLayout.marginWidth = 0;
bodyLayout.marginHeight = 0;
Composite body = form.getBody();
body.setLayout(bodyLayout);
Dialog.applyDialogFont(body);
_InfoBar = createInfoBar(body);
setInfoText(getInfoText());
_Client = createClient(managedForm, body);
FormData clientFormData = new FormData();
if (_InfoBar != null) {
clientFormData.top = new FormAttachment(_InfoBar, 0, SWT.BOTTOM);
}
else {
clientFormData.top = new FormAttachment(0, 0);
}
clientFormData.left = new FormAttachment(0, 0);
clientFormData.right = new FormAttachment(100, 0);
clientFormData.bottom = new FormAttachment(100, 0);
_Client.setLayoutData(clientFormData);
IToolBarManager toolBarManager = form.getToolBarManager();
contributeToToolBar(toolBarManager);
toolBarManager.update(true);
if (!getModel().isDestroyed()) {
createModelFormContent(managedForm, _Client);
initFromModel();
}
}