use of org.eclipse.wst.xsd.ui.internal.adt.design.directedit.TypeReferenceDirectEditManager in project webtools.sourceediting by eclipse.
the class BaseFieldEditPart method performRequest.
public void performRequest(Request request) {
if (((IADTObject) getModel()).isReadOnly() || isFileReadOnly()) {
return;
}
if (request.getType() == RequestConstants.REQ_DIRECT_EDIT || request.getType() == RequestConstants.REQ_OPEN) {
IFieldFigure fieldFigure = getFieldFigure();
Object model = getModel();
if (request instanceof LocationRequest) {
LocationRequest locationRequest = (LocationRequest) request;
Point p = locationRequest.getLocation();
if (hitTest(fieldFigure.getTypeLabel(), p)) {
TypeReferenceDirectEditManager manager = new TypeReferenceDirectEditManager((IField) model, this, fieldFigure.getTypeLabel());
TypeUpdateCommand typeUpdateCommand = new TypeUpdateCommand();
typeUpdateCommand.setDelegate(manager);
adtDirectEditPolicy.setUpdateCommand(typeUpdateCommand);
manager.show();
} else if (hitTest(fieldFigure.getNameLabel(), p)) {
directEditNameField();
}
} else {
directEditNameField();
}
}
}
Aggregations