本文整理匯總了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();
}
}