- 浏览: 382805 次
- 性别:
- 来自: 深圳
-
最新评论
-
zxjlwt:
学习论。确实很全啊。欢迎交流http://surenpi.co ...
eclipse dialog 对话框 大全 -
zxjlwt:
很好。http://surenpi.com
eclipse 源码泛读 -
string2020:
有卵用???
activiti 第一个例子 helloworld -
ysj_csdn:
能给个正确的例子?
activiti 第一个例子 helloworld -
zxjlwt:
学习了。http://surenpi.com
Eclipse扩展点介绍
文章列表
在gef中,如何使用emf做为模型,与一般我们自己实现模型的区别:
1:模型的代码不用自己去实现了,使用emf可以自动生成。
2:模型的通知gef part 更改视图,emf 提供了这样的功能,不过part还是需要去注册,监听,也要实行
emf 的接口:Adapter
3:支持xml的存储,序列号 更为方便。
4:属性栏中显示的属性在part 中实现。
public Object getAdapter(Class key) {
if (IPropertySource.class == key)
return new ShapeProperty ...
rcp 容易犯的错误
- 博客分类:
- eclipse plugin
1:两个插件之间互相引用。
2:插件的加载顺序。会引起来创建失败。
3:代码的编写位置。
Java陷阱之assert关键字
一、概述
在C和C++语言中都有assert关键,表示断言。
在Java中,同样也有assert关键字,表示断言,用法和含义都差不多。
二、语法
在Java中,assert关键字是从JAVA SE 1.4 引入的,为了避免和老版本的Java代码中使用了assert关键字导致错误,Java在执行的时候默认是不启动断言检查的(这个时候,所有的断言语句都将忽略!),如果要开启断言检查,则需要用开关-enableassertions或-ea来开启。
assert关键字语法很简单,有两种用法:
1、asse ...
continue 跳转到下次循环。
break 终止循环。
后边还可以添加 表示如:continue aa 或break aa
代码:
aa: while(true)
{
while(true)
break aa;
}
}
aa: while(true)
{
while(true)
continue aa;
}
}
http://student.csdn.net/link.php?url=http://www.ibm.com%2Fdeveloperworks%2Fcn%2Fopensource%2Fos-cn-ecl-rcprich%2F
org.eclips.core.expression的基本结构
Expression的运算结果是返回true或者false,用来处理逻辑结构。not 用来对表达式运行结果取反 and 用来在多个表达式之间进行与运算,只有多个表达式都为true的时候,才会返回true,否则返回false or 用来在多个表达式之间进行或运算,只有多个表达式都为false的时候,才会返回false,否则返回true instanceof 用来判断指定的对象是否是指定类或者接口的实例 systemTest 用来比较System系统变量中的值是否与指定值相等 iterate 用来 ...
package dialog;
import java.util.ArrayList;
public class EFilteredItemsSelectionDialog extends {
//对话框 需要的集合数据
private List<String> list=new ArrayList<String>();
public EFilteredItemsSelectionDialog(Shell shell) {
super(shell);
//设置显示列表的 标签提供者
this.setListL ...
org.eclipse.core.runtime.AssertionFailedException: assertion failed:
at org.eclipse.core.runtime.Assert.isTrue(Assert.java:110)
这种错误是 getAdapter的类型不对应造成的
不如:传个A而得到的是B。这样就出错了。
java.lang.RuntimeException: WARNING: Prevented recursive attempt to activate part while still in the m ...
treeViewer = new CheckboxTreeViewer(container, SWT.BORDER);
关键 代码:
treeViewer.addCheckStateListener(new ICheckStateListener() {
。。。。。
treeViewer.setSubtreeChecked(event.getElement(), true);
}
jface viewer
- 博客分类:
- eclipse plugin
在jface中有
Viewer
List IStructuredContentProvider LabelProvider
Tree TreeNodeContentProvider LabelProvider
Table IStructuredContentProvider ITableLabelProvider
一个viewer 有两部分组成: 内容提供者、标签提供者。
gef连接线的添加
- 博客分类:
- eclipse plugin
步骤:
1:需要添加对应的 model,并修改需要被连接的model。
2:需要添加对应的part(AbstractConnectionEditPart),并让被连接part实现NodeEditPart
3:在被连接的part中注册policy (GraphicalNodeEditPolicy)
4:实现相应的command(如创建line、删除line)。
5:最后在palette里添加 tool。
part的包含关系:
node part 包含 line part
代码:
@Override
protected List g ...
gef直接编辑的思路
- 博客分类:
- eclipse plugin
拦截编辑的事件,在同样的位置,同样的大小,用Text来覆盖。
首先需要在原有的基础上多加两个类
EDirectEditManager 直接编辑管理类
ECellEditorLocator 单元格的编辑的位置
public class ECellEditorLocator implements CellEditorLocator{
private IFigure figure;
public ECellEditorLocator(IFigure figure)
{
this.figure=figure;
}
@Override ...
C:\oracle\product\10.2.0\db_1\NETWORK\ADMIN
tnsnames.ora 文件添加:
# tnsnames.ora Network Configuration File: C:\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = MICROSOF-FBBB67)(PORT = 152 ...
@Override
protected void createPages() {
try {
this.addPage(0, new GefEditor(), this.getEditorInput());
this.setPageText(0, "图形");
this.addPage(1, new SourceEditor(), this.getEditorInput());
this.setPageText(1, "源码");
} catch (PartIn ...
1:IPartListener 对每个part的监听,如:关闭、隐藏。。。等。 所以 每个part的状态你的可以检测到。
很有用的:
1:你可以在每个窗口关闭后,删除 对应工具栏 ,打开时 在添加对应工具栏。
2: 在每个窗口关闭后,另外窗口作出相应变化。
注册方式: this.getSite().getPage().addPartListener(listener)
2:ISelectionListener 这个与ISelectionProvider 配合使用,对选择的内容进行实时监听。
注册监听:this.getSite ...