コード例 #1
0
 public EditPart getTargetEditPart(Request request) {
   if (REQ_CREATE.equals(request.getType())) {
     return null;
   } else if (RequestConstants.REQ_AUTOSIZE.equals(request.getType())) {
     return getHost();
   }
   return super.getTargetEditPart(request);
 }
コード例 #2
0
 /** @see AbstractEditPolicy#getTargetEditPart(org.eclipse.gef.Request) */
 public EditPart getTargetEditPart(Request request) {
   if (REQ_CREATE.equals(request.getType())) return getHost();
   if (REQ_ADD.equals(request.getType())) return getHost();
   if (REQ_MOVE.equals(request.getType())) return getHost();
   return super.getTargetEditPart(request);
 }