- 浏览: 527002 次
- 性别:
- 来自: 深圳
-
文章分类
最新评论
-
gaolegao2008:
如果报 is_volum 列名找不到之类的,我是从新部署了一个 ...
spring quartz 定时器报错 -
gaolegao2008:
部署到linux上时,还有一种情况就是mysql数据库区分大小 ...
spring quartz 定时器报错 -
qq123zhz:
yahier 写道 对我有帮助,但我看的一个demo程序,却没 ...
spring quartz 定时器报错 -
qq123zhz:
这个要在eclipse的插件环境下运行的,你不懂eclipse ...
GEF 自动布局 -
qq123zhz:
这个很久了,不记得啥时候写的了
json转为Map
/******************************************************************************* * Copyright (c) 2008, Ralf Ebert * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of Ralf Ebert nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY Ralf Ebert ''AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL Ralf Ebert BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *******************************************************************************/ package de.ralfebert.rcp.tools.preferredperspective; /** * Let Workbench parts implement this interface if you want * {@link PreferredPerspectivePartListener} to automatically activate the * preferred perspective on part activation. */ public interface IPrefersPerspective { /** * @return the preferred perspective of this part or null if no perspective * is preferred. */ String getPreferredPerspectiveId(); }Add PreferredPerspectivePartListener to your application. This class is responsible for switching the perspective upon activation of a part implementing IPrefersPerspective. /******************************************************************************* * Copyright (c) 2008, Ralf Ebert * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of Ralf Ebert nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY Ralf Ebert ''AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL Ralf Ebert BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *******************************************************************************/ package de.ralfebert.rcp.tools.preferredperspective; import java.util.logging.Logger; import org.eclipse.swt.widgets.Display; import org.eclipse.ui.IPartListener; import org.eclipse.ui.IPerspectiveDescriptor; import org.eclipse.ui.IStartup; import org.eclipse.ui.IWorkbenchPart; import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.WorkbenchException; /** * PreferredPerspectivePartListener is to be registered using the extension * point "org.eclipse.ui.startup". It will register itself as listener for the * activation of parts. When a part which implements IPrefersPerspective is * activated it will activate the preferred perspective of this part. */ public class PreferredPerspectivePartListener implements IPartListener, IStartup { private static final Logger log = Logger.getLogger(PreferredPerspectivePartListener.class); public void partActivated(IWorkbenchPart part) { refresh(part); } public static void refresh(final IWorkbenchPart part) { if (!(part instanceof IPrefersPerspective)) { return; } final IWorkbenchWindow workbenchWindow = part.getSite().getPage().getWorkbenchWindow(); IPerspectiveDescriptor activePerspective = workbenchWindow.getActivePage().getPerspective(); final String preferredPerspectiveId = ((IPrefersPerspective) part) .getPreferredPerspectiveId(); if (preferredPerspectiveId == null) { return; } if (activePerspective == null || !activePerspective.getId().equals(preferredPerspectiveId)) { // Switching of the perspective is delayed using Display.asyncExec // because switching the perspective while the workbench is // activating parts might cause conflicts. Display.getCurrent().asyncExec(new Runnable() { public void run() { log.debug("Switching to preferred perspective " + preferredPerspectiveId + " for " + part.getClass()); try { workbenchWindow.getWorkbench().showPerspective(preferredPerspectiveId, workbenchWindow); } catch (WorkbenchException e) { log.warn("Could not switch to preferred perspective " + preferredPerspectiveId + " for " + part.getClass(), e); } } }); } } public void earlyStartup() { Display.getDefault().asyncExec(new Runnable() { public void run() { try { PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage() .addPartListener(new PreferredPerspectivePartListener()); } catch (Exception e) { log.error(e.getMessage(), e); } } }); } public void partBroughtToTop(IWorkbenchPart part) { // nothing to do } public void partClosed(IWorkbenchPart part) { // nothing to do } public void partDeactivated(IWorkbenchPart part) { // nothing to do } public void partOpened(IWorkbenchPart part) { // nothing to do } }
<extension point="org.eclipse.ui.startup"> <startup class="de.ralfebert.rcp.tools.preferredperspective.PreferredPerspectivePartListener"/> </extension>
引用地址:http://www.ralfebert.de/blog/eclipsercp/auto_perspective_switch/
http://eclipse.dzone.com/articles/disable-or-enable-actions-sets
- perspectiveActionSets.zip (13.2 KB)
- 下载次数: 14
发表评论
-
eclipse jdt builder的资料
2014-07-11 15:27 903eclipse jdt关于builder的英文资料。。。。 ... -
eclipse 插件开发 Setting the Java build path
2014-06-04 11:00 1184JDT Plug-in Developer Guide & ... -
RCP MessageConsole设置显示的最大行数
2013-09-05 11:34 914MessageConsole.setWaterMarks(5 ... -
RCP FileSystem 文件系统
2013-02-19 10:42 1345public static File toLocalFile ... -
eclipse4.x 去掉quick access
2013-01-11 14:57 4008/** * 去掉quick access * ... -
RCP 分页组件
2012-12-26 16:59 1439http://www.eclipse.org/nebula/w ... -
jdt 核心知识
2012-11-27 21:39 1198jdt官方核心知识...................... ... -
jdt 创建java工程,生成代码,运行main方法
2012-11-27 10:50 2299public static IJavaProje ... -
SWT 隔行换色-自动宽高调整
2012-10-16 17:32 1673** * 创建:ZhengXi 2009-8-4 */ ... -
RCP 为action添加操作进度条
2012-10-16 13:59 1260public class StartAction extend ... -
RCP 视图交互 ISelectionProvider和ISelectionListener,只响应鼠标左键
2012-10-10 18:36 2208有时候一个视图( V ... -
采用jface dataBinding来实现内容填充
2012-07-27 15:42 1141//采用jface dataBinding来实现内容填充 ... -
RCP 在视图中获得首选项修改后的结果
2012-07-27 15:35 1116在视图或者编辑器中加入如下代码: Activator.get ... -
RCP获得eclipse的相关位置
2012-07-24 11:14 991InternalPlatform.getDefault().g ... -
swt/jface 获取table所有的列的值
2012-07-24 09:24 1382TableItem [] items = table.get ... -
org.eclipse.swt.SWTException: Subclassing not allowed
2012-07-19 15:09 1215org.eclipse.swt.SWTException: S ... -
Job found still running after platform shutdown.
2012-06-29 16:40 1818Job found still running after p ... -
eclipse插件开发 打开指定透视图
2012-06-12 14:08 1418打开透视图 PlatformUI.getWorkbench( ... -
eclipse 插件开发,报错No property tester contributes a property....
2012-06-12 11:29 2057ENTRY org.eclipse.ui.navigator ... -
eclipse JDT相关知识
2012-06-11 10:14 3945Java项目模型 Eclipse的项目有很多种,包括J ...
相关推荐
代码demo和ppt介绍;用org.eclipse.ui.presentationFactories扩展点RCP自定义透视图切换按钮的右键菜单,去除Editor的右键菜单和关闭按钮;
这些插件将 C/C++ 透视图添加到 Eclipse 工作台(Workbench)中, 现在后者可以用许多视图和向导以及高级编辑和调试支持来支持 C/C++ 开发。 由于其复杂性,CDT 被分成几个组件,它们都采用独立插件的形式。 每个...
FlasH的Eclipse设置 设置安装程序 如果您使用的是Windows:只...将透视图切换到“ Dev”(无论如何已将其设置为默认值)。 即使在安装过程中已选择键盘布局,也将其切换为IntelliJ(首选项->常规->键)。 包含什么 适用
* 全局上一个透视图:Ctrl+Shift+F8 * 全局下一个编辑器:Ctrl+F6 * 全局下一个视图:Ctrl+F7 * 全局下一个透视图:Ctrl+F8 三、导航作用域功能快捷键 * Java 编辑器打开结构:Ctrl+F3 * 全局打开类型:Ctrl+Shift...
1.3 Eclipse的诞生 3 1.4 Eclipse贡献SWT工具包 5 1.4.1 SWT的结构 6 1.4.2 SWT所支持的操作系统 6 1.5 Sun AWT/Swing与Eclipse SWT 7 1.5.1 Swing与SWT的比较 7 1.5.2 SWT的优势和不足 8 1.6 SWT与...
透视图可以切换不同的界面布局,方便用户在多种常用的功能模块下工作。透视图保存了当前的菜单栏、工具栏按钮以及视图的大小、位置、显示与否的所有状态,可以在下次切换回来时恢复原来的布局。 五、视图(View) ...
Eclipse 快捷键大全 Eclipse 是一个功能强大且广泛使用的集成开发环境(IDE),它提供了许多实用的快捷键来提高开发效率...* Ctrl+Shift+F8:全局上一个透视图 * Ctrl+F6:全局下一个编辑器 * Ctrl+F7:全局下一个视图
全局 上一个透视图 Ctrl+Shift+F8 全局 下一个编辑器 Ctrl+F6 全局 下一个视图 Ctrl+F7 全局 下一个透视图 Ctrl+F8 文本编辑器 显示标尺上下文菜单 Ctrl+W 全局 显示视图菜单 Ctrl+F10 全局 显示系统菜单 Alt+- 导航...
自述文件 弹出项目 - 2014 年 12 月 SET07102 上的学生 ... 切换回 JavaEE 透视图: 在项目资源管理器中; 打开 DWP/Java Resource/src/pup/ChessGameServlet.java 您可能会发现项目有编译错误——下一步可
Sireum OSATE插件该存储库包含Sireum 插件,该插件将AADL实例模型转换为 ,然后转换为下游Sireum工具(如 。开发人员安装该插件可以使用OSATE发行(以下安装方向... 切换到插件开发透视图:窗口->透视图->打开透视图-
##入门将此项目克隆到本地计算机下载启动Eclipse 切换到“调试”透视图转到窗口菜单选择“打开透视图”菜单项,然后在其下方选择“调试” 将“异步堆栈”选项卡添加到您的Eclipse窗格中(如果尚不存在) 转到窗口...
3.1.3 透视图(Perspective)切换器 52 3.1.4 视图(View) 53 3.1.5 上下文菜单(Context Menu) 55 3.1.6 状态栏(Status Bar) 55 3.1.7 编辑器(Editor) 55 3.2 常见概念和操作 56 3.2.1 项目(Project) 56 ...
10.3 透视投影:越近则越大 10.4 z-buffer:化混乱为有序 10.4.1 完善上一个例子 10.4.2 混合:身后空无一物 10.4.3 z-buffer精度与z-fighting 10.5 定义3d网格 10.5.1 立方体:3d中的“helloworld” ...
10.3 透视投影:越近则越大 409 10.4 z-buffer:化混乱为有序 411 10.4.1 完善上一个例子 412 10.4.2 混合:身后空无一物 413 10.4.3 z-buffer精度与 z-fighting 416 10.5 定义3D网格 417 10.5.1 ...