插件开发自我总结

插件源码查找
第一种

http://xpenxpen.iteye.com/blog/1607903

 

  1. http://www.eclipse.org/downloads/下载eclipse,注意一定要下载eclipse classic,只有这个才带源代码的,其他比如Eclipse IDE for Java EE Developers, Eclipse IDE for Java Developers都是不带源码的。 

    2.1
    打开eclipse,File->Import..,选择Plug-in development下面的Plug-ins and Fragments. Next 
     


    2.2
    出现Import Plug-ins and Fragments对话框,Import As 选择Projects with source folders,其余2项默认。 
     


    2.3
    选择想阅读的源码,比如选择junit插件相关sourceAdd到右边去。点Finish 
     


    这样就生成了工程,可以看junit插件源码了。 


     

     

    看到的全是class文件

    去github上搜索org.testng.eclipse.TestNGPlugin

这样我们就找到了源码

 

第二种
  • 例如TestNG for Eclipse 插件源码

 

  • 插件源码org.eclipse.ui.workbench.source_3.106.2.v20150204-1030.jar

输入网址

http://grepcode.com/snapshot/repository.grepcode.com/java/eclipse.org/4.4.2/org.eclipse.ui/workbench/3.106.2/

 

 

插件开发快捷键

Shift+alt+F1

Ctrl+alt+F1 = shift+alt+F1

插件api

http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fapi%2Findex.html&overview-summary.html

 

画图工具插件

WindowBuilder

报错
内存溢出

 

Unhandled event loop exception

PermGen space

 

 

java.lang.OutOfMemoryError: PermGen space

原理以及解决

http://www.cnblogs.com/javaexam2/archive/2012/04/15/2632724.html

http://www.cnblogs.com/shihujiang/archive/2012/06/07/2539967.html

 

设置参数如下

-Xms512m -Xmx512m -Dfile.encoding=UTF-8 -XX:PermSize=256m -XX:MaxPermSize=256m

如图

 

编程
List控件滚动条不显示

解决链接

http://www.programgo.com/article/24282915845/

必须要让GridData占满垂直方向,List的滚动条才会显示出来。

org.eclipse.swt.widgets.List list = new org.eclipse.swt.widgets.List(

shell, SWT.V_SCROLL);

不显示

//set grabExcessVerticalSpace to false

list.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));

显示

//set grabExcessVerticalSpace to true

list.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

如何设置list控件高度 ,并且随着主题窗口的大小而改变

GridLayout布局GridData进行设置SWT.FILL, SWT.FILL水平和垂直自动设置对齐

grid.heightHint设置初始高度

http://wjy320.iteye.com/blog/1999908

GridData grid = new GridData(SWT.FILL, SWT.FILL, true, true);

        grid.heightHint= 60;

 

每次调用的时候都会初始化 怎么解决listElements.size()的值不变

原因

EnumElementsEnumPage enumElementsEnumPage = enumParentDialog.getEnumElementsEnumPage();

写在了for循环之中所以每次调用都会初始化

转载于:https://www.cnblogs.com/zhaozhenqiang/p/5589777.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值