如何在自己的透视图(Perspective)里面加入eclipse自带视图,如Project Explorer视图.doc
《如何在自己的透视图(Perspective)里面加入eclipse自带视图,如Project Explorer视图.doc》由会员分享,可在线阅读,更多相关《如何在自己的透视图(Perspective)里面加入eclipse自带视图,如Project Explorer视图.doc(5页珍藏版)》请在三一文库上搜索。
1、如何在自己的透视图(Perspective)里面加入eclipse自带视图,如Project Explorer视图呵呵不好意思, 这里我先前理解错了,加入eclipse自带视图直接addView(org.eclipse.ui.views.ResourceNavigator);就可以了下面我先前理解错了,不过有些代码对我还有点价值,这里也不删除了大家见谅!由于这个是用于自己记忆的文章,这里写的可能粗略了点,大家见谅,如果看起来不太理解大家可以直接查看jdk 源码中org.eclipse.ui.ide.application的源码,里面代码很少,不难理 解,point=org.eclipse.ui
2、.perspectives这个扩展点便是了。 %Perspective.resourceDescription /这里可以查看扩展点API,org.eclipse.ui.perspectiveExtensions扩展点,id 将添加至透视图的“导航”菜单的“显示在.”提示器的视图的唯一标识。 package org.eclipse.ui.internal.ide.application;import org.eclipse.ui.IFolderLayout;import org.eclipse.ui.IPageLayout;import org.eclipse.ui.IPerspectiveF
3、actory;import org.eclipse.ui.navigator.resources.ProjectExplorer;import org.eclipse.ui.wizards.newresource.BasicNewFileResourceWizard;import org.eclipse.ui.wizards.newresource.BasicNewFolderResourceWizard;/*/public class ResourcePerspective implements IPerspectiveFactory /* * Constructs a new Defaul
4、t layout engine. */ public ResourcePerspective() super(); /* * Defines the initial layout for a perspective. */ public void createInitialLayout(IPageLayout layout) defineActions(layout); defineLayout(layout); /* * Defines the initial actions for a page. * param layout The layout we are filling */ pu
5、blic void defineActions(IPageLayout layout) / Add new wizards. layout.addNewWizardShortcut(BasicNewFolderResourceWizard.WIZARD_ID); layout.addNewWizardShortcut(BasicNewFileResourceWizard.WIZARD_ID); / Add show views. layout.addShowViewShortcut(ProjectExplorer.VIEW_ID); layout.addShowViewShortcut(IPa
6、geLayout.ID_BOOKMARKS); layout.addShowViewShortcut(IPageLayout.ID_OUTLINE); layout.addShowViewShortcut(IPageLayout.ID_PROP_SHEET); layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW); layout.addShowViewShortcut(IPageLayout.ID_PROGRESS_VIEW); layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
7、layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET); /* * Defines the initial layout for a page. * param layout The layout we are filling */ public void defineLayout(IPageLayout layout) / Editors are placed for free. String editorArea = layout.getEditorArea(); / Top left. IFolderLayout topLeft =
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 如何在自己的透视图Perspective里面加入eclipse自带视图 如Project Explorer视图 何在 自己 透视图 Perspective 里面 加入 eclipse 视图 Project
链接地址:https://www.31doc.com/p-2470711.html