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


Java IPageSite.getActionBars方法代码示例

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


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

示例1: init

import org.eclipse.ui.part.IPageSite; //导入方法依赖的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

示例2: init

import org.eclipse.ui.part.IPageSite; //导入方法依赖的package包/类
public void init(IPageSite pageSite) {
	super.init(pageSite);
	ActionRegistry registry = editor.getEditorActionRegistry();
	IActionBars bars = pageSite.getActionBars();
	String id = ActionFactory.UNDO.getId();
	bars.setGlobalActionHandler(id, registry.getAction(id));
	id = ActionFactory.REDO.getId();
	bars.setGlobalActionHandler(id, registry.getAction(id));
	id = ActionFactory.DELETE.getId();
	bars.setGlobalActionHandler(id, registry.getAction(id));
	bars.setGlobalActionHandler(ActionFactory.COPY.getId(),
			registry.getAction(ActionFactory.COPY.getId()));
	bars.setGlobalActionHandler(ActionFactory.PASTE.getId(),
			registry.getAction(ActionFactory.PASTE.getId()));

}
 
开发者ID:ShoukriKattan,项目名称:ForgedUI-Eclipse,代码行数:17,代码来源:DiagramOutlinePage2.java

示例3: init

import org.eclipse.ui.part.IPageSite; //导入方法依赖的package包/类
/**
 * Initializes the outline; addes undo/redo/delete keyhandlers.
 */
public void init(IPageSite pageSite) {
    super.init(pageSite);

    ActionRegistry registry = multieditor.getActionRegistry();
    IActionBars bars = pageSite.getActionBars();
    String id = ActionFactory.UNDO.getId();
    bars.setGlobalActionHandler(id, registry.getAction(id));
    id = ActionFactory.REDO.getId();
    bars.setGlobalActionHandler(id, registry.getAction(id));
    id = ActionFactory.DELETE.getId();
    bars.setGlobalActionHandler(id, registry.getAction(id));
    id = ActionFactory.PASTE.getId();
    bars.setGlobalActionHandler(id, registry.getAction(id));
    id = ActionFactory.COPY.getId();
    bars.setGlobalActionHandler(id, registry.getAction(id));
    id = ActionFactory.CUT.getId();
    bars.setGlobalActionHandler(id, registry.getAction(id));

}
 
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:23,代码来源:UrnOutlinePage.java

示例4: createActions

import org.eclipse.ui.part.IPageSite; //导入方法依赖的package包/类
private void createActions() {
	IPageSite site = getSite();
	IActionBars actionBars = site.getActionBars();
	IToolBarManager toolBarManager = actionBars.getToolBarManager();
	List<IAction> actions = new de.darwinspl.preferences.resource.dwprofile.ui.DwprofileOutlinePageActionProvider().getActions(treeViewer);
	for (IAction action : actions) {
		toolBarManager.add(action);
	}
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:10,代码来源:DwprofileOutlinePage.java

示例5: createActions

import org.eclipse.ui.part.IPageSite; //导入方法依赖的package包/类
private void createActions() {
	IPageSite site = getSite();
	IActionBars actionBars = site.getActionBars();
	IToolBarManager toolBarManager = actionBars.getToolBarManager();
	List<IAction> actions = new eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionOutlinePageActionProvider().getActions(treeViewer);
	for (IAction action : actions) {
		toolBarManager.add(action);
	}
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:10,代码来源:HyexpressionOutlinePage.java

示例6: createActions

import org.eclipse.ui.part.IPageSite; //导入方法依赖的package包/类
private void createActions() {
	IPageSite site = getSite();
	IActionBars actionBars = site.getActionBars();
	IToolBarManager toolBarManager = actionBars.getToolBarManager();
	List<IAction> actions = new eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaOutlinePageActionProvider().getActions(treeViewer);
	for (IAction action : actions) {
		toolBarManager.add(action);
	}
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:10,代码来源:HyvalidityformulaOutlinePage.java

示例7: createActions

import org.eclipse.ui.part.IPageSite; //导入方法依赖的package包/类
private void createActions() {
	IPageSite site = getSite();
	IActionBars actionBars = site.getActionBars();
	IToolBarManager toolBarManager = actionBars.getToolBarManager();
	List<IAction> actions = new eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueOutlinePageActionProvider().getActions(treeViewer);
	for (IAction action : actions) {
		toolBarManager.add(action);
	}
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:10,代码来源:HydatavalueOutlinePage.java

示例8: createActions

import org.eclipse.ui.part.IPageSite; //导入方法依赖的package包/类
private void createActions() {
	IPageSite site = getSite();
	IActionBars actionBars = site.getActionBars();
	IToolBarManager toolBarManager = actionBars.getToolBarManager();
	List<IAction> actions = new eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingOutlinePageActionProvider().getActions(treeViewer);
	for (IAction action : actions) {
		toolBarManager.add(action);
	}
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:10,代码来源:HymappingOutlinePage.java

示例9: createActions

import org.eclipse.ui.part.IPageSite; //导入方法依赖的package包/类
private void createActions() {
	IPageSite site = getSite();
	IActionBars actionBars = site.getActionBars();
	IToolBarManager toolBarManager = actionBars.getToolBarManager();
	List<IAction> actions = new eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsOutlinePageActionProvider().getActions(treeViewer);
	for (IAction action : actions) {
		toolBarManager.add(action);
	}
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:10,代码来源:HyconstraintsOutlinePage.java

示例10: createActions

import org.eclipse.ui.part.IPageSite; //导入方法依赖的package包/类
private void createActions() {
	IPageSite site = getSite();
	IActionBars actionBars = site.getActionBars();
	IToolBarManager toolBarManager = actionBars.getToolBarManager();
	List<IAction> actions = new eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestOutlinePageActionProvider().getActions(treeViewer);
	for (IAction action : actions) {
		toolBarManager.add(action);
	}
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:10,代码来源:HymanifestOutlinePage.java

示例11: init

import org.eclipse.ui.part.IPageSite; //导入方法依赖的package包/类
/**
 * Is used to register several global action handlers (UNDO, REDO, COPY, PASTE, ...) on initialization of this outline page. This activates for example the
 * undo-action in the central Eclipse-Menu.
 *
 * @param pageSite
 *          the page site
 * @see org.eclipse.ui.part.Page#init(IPageSite)
 */
@Override
public void init(IPageSite pageSite) {
  super.init(pageSite);
  IActionBars actionBars = pageSite.getActionBars();
  registerGlobalActionHandler(actionBars, ActionFactory.UNDO.getId());
  registerGlobalActionHandler(actionBars, ActionFactory.REDO.getId());
  registerGlobalActionHandler(actionBars, ActionFactory.COPY.getId());
  registerGlobalActionHandler(actionBars, ActionFactory.PASTE.getId());
  registerGlobalActionHandler(actionBars, ActionFactory.PRINT.getId());
  registerGlobalActionHandler(actionBars, ActionFactory.SAVE_AS.getId());
  actionBars.updateActionBars();
}
 
开发者ID:eclipse,项目名称:triquetrum,代码行数:21,代码来源:DiagramEditorOutlinePage.java

示例12: init

import org.eclipse.ui.part.IPageSite; //导入方法依赖的package包/类
/**
 * Is used to register several global action handlers (UNDO, REDO, COPY,
 * PASTE, ...) on initialization of this outline page. This activates for
 * example the undo-action in the central Eclipse-Menu.
 * 
 * @param pageSite
 *            the page site
 * 
 * @see org.eclipse.ui.part.Page#init(IPageSite)
 */
@Override
public void init(IPageSite pageSite) {
	super.init(pageSite);
	IActionBars actionBars = pageSite.getActionBars();
	registerGlobalActionHandler(actionBars, ActionFactory.UNDO.getId());
	registerGlobalActionHandler(actionBars, ActionFactory.REDO.getId());
	registerGlobalActionHandler(actionBars, ActionFactory.COPY.getId());
	registerGlobalActionHandler(actionBars, ActionFactory.PASTE.getId());
	registerGlobalActionHandler(actionBars, ActionFactory.PRINT.getId());
	registerGlobalActionHandler(actionBars, ActionFactory.SAVE_AS.getId());
	actionBars.updateActionBars();
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:23,代码来源:GraphicsEditorOutlinePage.java

示例13: init

import org.eclipse.ui.part.IPageSite; //导入方法依赖的package包/类
@Override
public void init(IPageSite pageSite) {
	super.init(pageSite);
	ActionRegistry registry = editor.getActionRegistry();
	IActionBars bars = pageSite.getActionBars();
	for (Iterator<IAction> it = registry.getActions(); it.hasNext();) {
		IAction ia = it.next();
		bars.setGlobalActionHandler(ia.getId(), ia);
	}

	bars.updateActionBars();
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:13,代码来源:JDReportOutlineView.java

示例14: handleGlobalAction

import org.eclipse.ui.part.IPageSite; //导入方法依赖的package包/类
/**
 * Handles all global actions
 */
private void handleGlobalAction( )
{
	IPageSite pageSite = page == null ? null : page.getSite( );
	IActionBars actionBars = pageSite == null ? null
			: pageSite.getActionBars( );

	if ( actionBars != null )
	{
		String copyID = ActionFactory.COPY.getId( );
		String pasteID = ActionFactory.PASTE.getId( );
		String deleteID = ActionFactory.DELETE.getId( );
		String moveID = ActionFactory.MOVE.getId( );
		String renameID = ActionFactory.RENAME.getId( );
		String refreshID = ActionFactory.REFRESH.getId( );

		actionBars.setGlobalActionHandler( copyID, copyResourceAction );
		actionBars.setGlobalActionHandler( pasteID, pasteResourceAction );
		actionBars.setGlobalActionHandler( deleteID, deleteResourceAction );
		actionBars.setGlobalActionHandler( moveID, moveResourceAction );
		actionBars.setGlobalActionHandler( renameID, renameResourceAction );
		actionBars.setGlobalActionHandler( refreshID, refreshExplorerAction );

		IMenuManager menuManager = actionBars.getMenuManager( );
		IToolBarManager toolBarManager = actionBars.getToolBarManager( );

		if ( menuManager != null )
		{
			menuManager.add( filterAction );
		}
		if ( toolBarManager != null )
		{
			toolBarManager.add( refreshExplorerAction );
		}
	}
}
 
开发者ID:eclipse,项目名称:birt,代码行数:39,代码来源:LibraryExplorerContextMenuProvider.java

示例15: updateActionBars

import org.eclipse.ui.part.IPageSite; //导入方法依赖的package包/类
/**
 * Updates the action bars for this page site.
 */
private void updateActionBars( )
{
	IPageSite site = page == null ? null : page.getSite( );
	IActionBars actionBars = site == null ? null : site.getActionBars( );

	if ( actionBars != null )
	{
		actionBars.updateActionBars( );
	}
}
 
开发者ID:eclipse,项目名称:birt,代码行数:14,代码来源:LibraryExplorerContextMenuProvider.java


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