随笔 - 6  文章 - 129  trackbacks - 0
<2024年4月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

常用链接

留言簿(14)

随笔档案(6)

文章分类(467)

文章档案(423)

相册

收藏夹(18)

JAVA

搜索

  •  

积分与排名

  • 积分 - 814922
  • 排名 - 49

最新评论

阅读排行榜

评论排行榜

eclipse RCP
通过RCP创建的view,怎样直接显示出来      摘要: 新创建的VIEW已经加到透视图中,但是打开程序时就是不显示相应的视图.

解决方法:

原来是设置了这个导致的
configurer.setSaveAndRestore(true);  阅读全文
posted @ 2012-06-08 11:25 Ke 阅读(2379) | 评论 (4)  编辑
RCP开发---Log4j配置      摘要: 在启动RCP的插件中的start方法里:
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;

Properties prop = new Properties();
try {
prop.load(Activator.class.getResourceAsStream("log4j.properties")); //$NON-NLS-1$
} catch (IOException e) {
// e.printStackTrace();
}

PropertyConfigurator.configure(prop);
}  阅读全文
posted @ 2012-04-28 17:56 Ke 阅读(949) | 评论 (0)  编辑
SWT的SHELL样式      摘要: SWT.BORDER //建立一个有边框但没有标题栏的窗口
SWT.CLOSE //建立一个只有关闭按钮的窗口
SWT.MIN //建立一个不能最大化的窗口
SWT.MAX, //建立一个可以最大化最小化的窗口
SWT.NO_TRIM //建立一个没有任何边界和标题栏的窗口
SWT.RESIZE //建立一个可以改变大小的窗口
SWT.TITLE //建立一个没有标题栏图标,没有关闭按钮的窗口
SWT.ON_TOP //建立一个总是在上的窗口,注意:此属性最好与CLOSE、MIN、MAX一起使用。
SWT.TOOL //建立一个类似工具栏的窗口
SWT.APPLICATION_MODAL //建立一个APPLICATION模态窗口  阅读全文
posted @ 2010-07-16 15:26 Ke 阅读(6838) | 评论 (4)  编辑
透视图的标签改成波浪形      摘要: PlatformUI.getPreferenceStore().setValue(IWorkbenchPreferenceConstants.DOCK_PERSPECTIVE_BAR, IWorkbenchPreferenceConstants.TOP_RIGHT);
PlatformUI.getPreferenceStore().setDefault(IWorkbenchPreferenceConstants.SHOW_TRADITIONAL_STYLE_TABS, false);  阅读全文
posted @ 2009-07-28 09:39 Ke 阅读(316) | 评论 (0)  编辑
解決在eclipse项目中使用utf-8字符時导出错误      摘要: 在eclipse项目中使用utf-8字符可能会造成导出时产生错误,程序不能正常运行
我以前网上找到的办法都不好,解决的办法其实十分简单
在build.properties文件中加入

javacDefaultEncoding.. = UTF-8   阅读全文
posted @ 2009-07-28 09:17 Ke 阅读(493) | 评论 (0)  编辑
往Eclipse RCP视图中添加右键弹出菜单(轉)      摘要: 一个TreeViewer 必须继承ViewPart方法,并且重写其中的createPartControl(Composite parent)类  阅读全文
posted @ 2009-07-27 13:50 Ke 阅读(2225) | 评论 (0)  编辑
其它線程訪問UI線程      摘要: Display.getDefault().asyncExec(new Runnable() {

@Override
public void run() {
// TODO Auto-generated method stub
... ...
}

});  阅读全文
posted @ 2009-07-16 11:52 Ke 阅读(217) | 评论 (0)  编辑
Eclipse切换界面顯示的語言      摘要: -nl "zh_CN" 簡體中文
-nl "zh_TW" 繁體中文
-nl "en_US" 英文
  阅读全文
posted @ 2009-06-20 14:42 Ke 阅读(1600) | 评论 (0)  编辑
rcp添加jar文件      摘要: 1.把jar文件放到项目目录下 2.在plugin.xml中,runtime页面,class-path节中,点add,选择刚才的jar包  阅读全文
posted @ 2009-04-30 09:52 Ke 阅读(304) | 评论 (0)  编辑
系統托盤
posted @ 2008-12-05 23:56 Ke 阅读(237) | 评论 (0)  编辑
窗口居中顯示代碼      摘要: //窗口居中
Shell shell = getWindowConfigurer().getWindow().getShell();
Rectangle screenSize = Display.getDefault().getClientArea();
Rectangle frameSize = shell.getBounds();
shell.setLocation((screenSize.width - frameSize.width)/2, (screenSize.height - frameSize.height)/2);  阅读全文
posted @ 2008-12-05 23:40 Ke 阅读(374) | 评论 (0)  编辑