コード例 #1
0
	protected Command getConnectionCreateCommand(CreateConnectionRequest request) {
		if (getHost().getModel() instanceof LFWBasicElementObj) {
			LFWBasicElementObj sour = (LFWBasicElementObj) getHost().getModel();
			Class conCls = (Class) request.getNewObject();
			Command command = new MenuRelationConnectionCommand(sour, conCls);
			request.setStartCommand(command);
			return command;
		}
		return null;
	}
 @SuppressWarnings("unchecked") // $NON-NLS-1$
 protected Command getConnectionCreateCommand(CreateConnectionRequest request) {
   Node source = (Node) getHost().getModel();
   if (source.isReadOnly()) {
     return null;
   }
   String style = (String) request.getNewObjectType();
   ConnectionCreateCommand cmd =
       new ConnectionCreateCommand(source, style, (List<Object>) request.getNewObject());
   request.setStartCommand(cmd);
   return cmd;
 }