当前位置: 首页>>代码示例>>Java>>正文


Java IActionBars.updateActionBars方法代码示例

本文整理汇总了Java中org.eclipse.ui.IActionBars.updateActionBars方法的典型用法代码示例。如果您正苦于以下问题:Java IActionBars.updateActionBars方法的具体用法?Java IActionBars.updateActionBars怎么用?Java IActionBars.updateActionBars使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.ui.IActionBars的用法示例。


在下文中一共展示了IActionBars.updateActionBars方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setActivePage

import org.eclipse.ui.IActionBars; //导入方法依赖的package包/类
public void setActivePage(IEditorPart part) {
	if (activeEditorPart == part)
		return;

	activeEditorPart = part;

	IActionBars actionBars = getActionBars();
	if (actionBars != null) {

		ITextEditor editor = (part instanceof ITextEditor) ? (ITextEditor) part : null;

		actionBars.setGlobalActionHandler(ActionFactory.DELETE.getId(), getAction(editor, ITextEditorActionConstants.DELETE));
		actionBars.setGlobalActionHandler(ActionFactory.UNDO.getId(), getAction(editor, ITextEditorActionConstants.UNDO));
		actionBars.setGlobalActionHandler(ActionFactory.REDO.getId(), getAction(editor, ITextEditorActionConstants.REDO));
		actionBars.setGlobalActionHandler(ActionFactory.CUT.getId(), getAction(editor, ITextEditorActionConstants.CUT));
		actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), getAction(editor, ITextEditorActionConstants.COPY));
		actionBars.setGlobalActionHandler(ActionFactory.PASTE.getId(), getAction(editor, ITextEditorActionConstants.PASTE));
		actionBars.setGlobalActionHandler(ActionFactory.SELECT_ALL.getId(), getAction(editor, ITextEditorActionConstants.SELECT_ALL));
		actionBars.setGlobalActionHandler(ActionFactory.FIND.getId(), getAction(editor, ITextEditorActionConstants.FIND));
		actionBars.setGlobalActionHandler(IDEActionFactory.BOOKMARK.getId(), getAction(editor, IDEActionFactory.BOOKMARK.getId()));
		actionBars.updateActionBars();
	}
}
 
开发者ID:dstl,项目名称:Open_Source_ECOA_Toolset_AS5,代码行数:24,代码来源:CompDefEditorContributor.java

示例2: init

import org.eclipse.ui.IActionBars; //导入方法依赖的package包/类
public void init(IPageSite pageSite) {
	super.init(pageSite);

	IActionBars bars = pageSite.getActionBars();

	bars.getToolBarManager().add(getActionRegistry().getAction(ClearEdgeBendpointLayoutAction.ID));
	bars.getToolBarManager().add(getActionRegistry().getAction(ActionFactory.DELETE.getId()));
	bars.getToolBarManager().add(getActionRegistry().getAction(ActionFactory.UNDO.getId()));
	bars.getToolBarManager().add(getActionRegistry().getAction(ActionFactory.REDO.getId()));

	bars.setGlobalActionHandler(ClearEdgeBendpointLayoutAction.ID,
			getActionRegistry().getAction(ClearEdgeBendpointLayoutAction.ID));
	bars.setGlobalActionHandler(ActionFactory.UNDO.getId(),
			getActionRegistry().getAction(ActionFactory.UNDO.getId()));
	bars.setGlobalActionHandler(ActionFactory.REDO.getId(),
			getActionRegistry().getAction(ActionFactory.REDO.getId()));
	bars.setGlobalActionHandler(ActionFactory.DELETE.getId(),
			getActionRegistry().getAction(ActionFactory.DELETE.getId()));
	bars.updateActionBars();

	getViewer().setKeyHandler(keyHandler);

	pageSite.setSelectionProvider(getViewer());
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:25,代码来源:GW4EEditor.java

示例3: setActivePage

import org.eclipse.ui.IActionBars; //导入方法依赖的package包/类
public void setActivePage(IEditorPart part) {
	if (activeEditorPart == part)
		return;

	activeEditorPart = part;

	IActionBars actionBars = getActionBars();
	if (actionBars != null) {

		ITextEditor editor = (part instanceof ITextEditor) ? (ITextEditor) part : null;

		actionBars.setGlobalActionHandler(ActionFactory.DELETE.getId(),
				getAction(editor, ITextEditorActionConstants.DELETE));
		actionBars.setGlobalActionHandler(ActionFactory.UNDO.getId(),
				getAction(editor, ITextEditorActionConstants.UNDO));
		actionBars.setGlobalActionHandler(ActionFactory.REDO.getId(),
				getAction(editor, ITextEditorActionConstants.REDO));
		actionBars.setGlobalActionHandler(ActionFactory.CUT.getId(),
				getAction(editor, ITextEditorActionConstants.CUT));
		actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(),
				getAction(editor, ITextEditorActionConstants.COPY));
		actionBars.setGlobalActionHandler(ActionFactory.PASTE.getId(),
				getAction(editor, ITextEditorActionConstants.PASTE));
		actionBars.setGlobalActionHandler(ActionFactory.SELECT_ALL.getId(),
				getAction(editor, ITextEditorActionConstants.SELECT_ALL));
		actionBars.setGlobalActionHandler(ActionFactory.FIND.getId(),
				getAction(editor, ITextEditorActionConstants.FIND));
		actionBars.setGlobalActionHandler(IDEActionFactory.BOOKMARK.getId(),
				getAction(editor, IDEActionFactory.BOOKMARK.getId()));
		actionBars.updateActionBars();
	}
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:33,代码来源:PropEditorContributor.java

示例4: setActivePage

import org.eclipse.ui.IActionBars; //导入方法依赖的package包/类
@Override
	public void setActivePage(IEditorPart activeEditor) {
	IActionBars actionBars = getActionBars();
	if (actionBars == null) return;
	actionBars.clearGlobalActionHandlers();
	if (activeEditor instanceof GraphicalEditorPage) {
		addGraphicalEditorActions((GraphicalEditorPage) activeEditor, actionBars);
	} else if (activeEditor instanceof StructuredTextEditor) {
		addXmlEditorActions((StructuredTextEditor) activeEditor, actionBars);
	}
	actionBars.updateActionBars();
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:13,代码来源:EditorActionBarContributor.java


注:本文中的org.eclipse.ui.IActionBars.updateActionBars方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。