给DiagramEditPart添加Request

实现ScalableFreeformRootEditPart中的performRequest方法即可:
@Override
	public void performRequest(Request req) {
		 if (req.getType().equals(REQ_OPEN)) {
			 MessageDialog.openConfirm(null, null, "HELLO");
		 }
		super.performRequest(req);
	}

你可能感兴趣的:(java)