• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java IPageSite类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



IPageSite类属于org.eclipse.ui.part包,在下文中一共展示了IPageSite类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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包/类
@Override
public void init(IPageBookViewPage page, IConsole console) {
	IPageSite pageSite = page.getSite();
	IWorkbenchPage workbenchPage = pageSite.getPage();
	IViewPart viewPart = workbenchPage.findView(IConsoleConstants.ID_CONSOLE_VIEW);
	IViewSite viewSite = viewPart.getViewSite();
	IActionBars actionBars = viewSite.getActionBars();
	IToolBarManager toolBarManager = actionBars.getToolBarManager();
	IContributionItem[] items = toolBarManager.getItems();
	for(int i = 0; i < items.length; ++i) {
		IContributionItem item = items[i];
		if(item instanceof ActionContributionItem) {
			IAction action = ((ActionContributionItem) item).getAction();
			String text = action.getText();
			if(text.equals("Pi&n Console") || text.equals("Open Console"))
				toolBarManager.remove(item);
		}
	}
}
 
开发者ID:AlexWengh,项目名称:HMM,代码行数:20,代码来源:ConsolePageParticipant.java


示例4: dispose

import org.eclipse.ui.part.IPageSite; //导入依赖的package包/类
@Override
public void dispose() {
    IPageSite site = getSite();
    if (site != null) {
	    IWorkbenchPage page = site.getPage();
	    page.removePostSelectionListener(selectionListener);
	    UndoRedoUtils.disposeUndoRedo(site.getActionBars());
    }
    clearChildren();
    if ((form != null) && (!form.isDisposed())) {
    	form.dispose();
    }
    DetailUtils.PREFERENCES.removePropertyChangeListener(preferenceListener);
    currentSelection.clear();
    super.dispose();
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:17,代码来源:DetailPage.java


示例5: selectionChanged

import org.eclipse.ui.part.IPageSite; //导入依赖的package包/类
@Override
public void selectionChanged(IWorkbenchPart part, ISelection selection) {
      	if (!isRelevantChange(part)) 
      		return;
      	IPageSite site = getSite(); 
      	if ((site != null) && (site.getSelectionProvider() == null)) {
      		ISelectionProvider partSelectionProvider = associatedPart.getSite().getSelectionProvider();
      		site.setSelectionProvider(partSelectionProvider);
      	}
      	if ((selection != null) && (selection instanceof IStructuredSelection)) {
       	try {
       		updateSelection((IStructuredSelection)selection);
       	} catch (Exception e) {
       		printException(e);
       		trace.error("DetailPage.updateSelection", e);
       	}
      	}
      }
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:19,代码来源:DetailPage.java


示例6: createControl

import org.eclipse.ui.part.IPageSite; //导入依赖的package包/类
@Override
public void createControl(Composite parent) {
	super.createControl(parent);
	ResourcesPlugin.getWorkspace().addResourceChangeListener(workspaceListener, IResourceChangeEvent.POST_CHANGE);
	IPageSite site = getSite();
    if (site != null) {
	    IWorkbenchPage page = site.getPage();
	    page.addPostSelectionListener(selectionListener);
    	ISelectionProvider partSelectionProvider = editorPart.getSite().getSelectionProvider();
	    ISelection selection = partSelectionProvider.getSelection();
	    if ((selection != null) && (selection instanceof IStructuredSelection)) {
        	try {
        		updateSelection((IStructuredSelection)selection);
        	} catch (Exception e) {
        		LogUtil.error("Error updating selection from editor", e);
        	}
       	}
    }
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:20,代码来源:SPIFeTemplatePlanPage.java


示例7: selectionChanged

import org.eclipse.ui.part.IPageSite; //导入依赖的package包/类
@Override
public void selectionChanged(IWorkbenchPart part, ISelection selection) {
      	if (part != editorPart) 
      		return;
      	IPageSite site = getSite(); 
      	if ((site != null) && (site.getSelectionProvider() == null)) {
      		ISelectionProvider partSelectionProvider = editorPart.getSite().getSelectionProvider();
      		site.setSelectionProvider(partSelectionProvider);
      	}
      	if ((selection != null) && (selection instanceof IStructuredSelection)) {
       	try {
       		updateSelection((IStructuredSelection)selection);
       	} catch (Exception e) {
       		LogUtil.error("Error updating selection from editor", e);
       	}
      	}
      }
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:18,代码来源:SPIFeTemplatePlanPage.java


示例8: init

import org.eclipse.ui.part.IPageSite; //导入依赖的package包/类
@Override
public void init(IPageSite site) {
	super.init(site);
	IMenuManager menuManager = site.getActionBars().getMenuManager();
	menuManager.insertBefore(IContextMenuConstants.GROUP_PROPERTIES, new Separator(GROUP_FILTERING));
	fActionGroup.fillActionBars(site.getActionBars());
	menuManager.appendToGroup(IContextMenuConstants.GROUP_PROPERTIES, new Action(SearchMessages.JavaSearchResultPage_preferences_label) {
		@Override
		public void run() {
			String pageId= "org.eclipse.search.preferences.SearchPreferencePage"; //$NON-NLS-1$
			String[] displayedPages= { pageId,
					"org.eclipse.ui.editors.preferencePages.Annotations", //$NON-NLS-1$
					"org.eclipse.ui.preferencePages.ColorsAndFonts" //$NON-NLS-1$
			};
			PreferencesUtil.createPreferenceDialogOn(JavaPlugin.getActiveWorkbenchShell(), pageId, displayedPages, null).open();
		}
	});
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:19,代码来源:JavaSearchResultPage.java


示例9: init

import org.eclipse.ui.part.IPageSite; //导入依赖的package包/类
@Override
public void init(final IPageSite pageSite)
{
  super.init(pageSite);
  final IMenuManager menuManager = pageSite.getActionBars().getMenuManager();
  menuManager.insertBefore(IContextMenuConstants.GROUP_PROPERTIES, new Separator(
      JiveSearchResultPage.LAYOUT_GROUP));
  menuManager.appendToGroup(IContextMenuConstants.GROUP_PROPERTIES, new Action("Preferences...")
    {
      @Override
      public void run()
      {
        final String pageId = "org.eclipse.search.preferences.SearchPreferencePage"; //$NON-NLS-1$
        final Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
        PreferencesUtil.createPreferenceDialogOn(shell, pageId, null, null).open();
      }
    });
}
 
开发者ID:UBPL,项目名称:jive,代码行数:19,代码来源:JiveSearchResultPage.java


示例10: 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


示例11: 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


示例12: 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


示例13: 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


示例14: 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


示例15: 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


示例16: 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


示例17: 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


示例18: createActionControls

import org.eclipse.ui.part.IPageSite; //导入依赖的package包/类
private void createActionControls(Tree tree) {
	String outlineId = FluentMkUI.PLUGIN_ID + ".outline";
	MenuManager menuMgr = new MenuManager(outlineId, outlineId);
	menuMgr.setRemoveAllWhenShown(true);
	menuMgr.addMenuListener(new IMenuListener() {

		@Override
		public void menuAboutToShow(IMenuManager m) {
			contextMenuAboutToShow(m);
		}
	});
	menu = menuMgr.createContextMenu(tree);
	tree.setMenu(menu);

	IPageSite site = getSite();
	site.registerContextMenu(outlineId, menuMgr, viewer); // $NON-NLS-1$
	site.setSelectionProvider(viewer);

	actionGroups = new CompositeActionGroup(new ActionGroup[] { new OpenViewActionGroup(this) });

	setAction(ACTION_EXPAND, new ExpandAllAction(viewer));
	setAction(ACTION_COLLAPSE, new CollapseAllAction(viewer));
	setAction(ACTION_TOGGLE, new ToggleLinkingAction(editor));

	setAction(ACTION_COPY, new OutlineCopyAction(this));
	setAction(ACTION_CUT, new OutlineCutAction(this));
	setAction(ACTION_PASTE, new OutlinePasteAction(this));
	setAction(ACTION_DELETE, new OutlineDeleteAction(this));

	createToolBar();
}
 
开发者ID:grosenberg,项目名称:fluentmark,代码行数:32,代码来源:MkOutlinePage.java


示例19: 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


示例20: 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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java CallbackConnection类代码示例发布时间:2022-05-21
下一篇:
Java MessageListenerConcurrently类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap