connectioneditpolicy.java
来自「eclipse开发笔记」· Java 代码 · 共 21 行
JAVA
21 行
package hellogef.policy;
import hellogef.command.DeleteConnectionCommand;
import hellogef.model.ConnectionModel;
import org.eclipse.gef.commands.Command;
import org.eclipse.gef.editpolicies.ComponentEditPolicy;
import org.eclipse.gef.requests.GroupRequest;
public class ConnectionEditPolicy extends ComponentEditPolicy{
protected Command createDeleteCommand(GroupRequest deleteRequest) {
ConnectionModel conn=(ConnectionModel)getHost().getModel();
DeleteConnectionCommand cmd=new DeleteConnectionCommand();
cmd.setConnection(conn);
cmd.setSource(conn.getSource());
cmd.setTarget(conn.getTarget());
return cmd;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?