diff options
Diffstat (limited to 'bundles/org.eclipse.wst.wsdl.ui/src-asd/org/eclipse/wst/wsdl/ui/internal')
5 files changed, 11 insertions, 7 deletions
diff --git a/bundles/org.eclipse.wst.wsdl.ui/src-asd/org/eclipse/wst/wsdl/ui/internal/asd/design/editparts/AbstractBoxtEditPart.java b/bundles/org.eclipse.wst.wsdl.ui/src-asd/org/eclipse/wst/wsdl/ui/internal/asd/design/editparts/AbstractBoxtEditPart.java index f16dccbb3..964f38a04 100644 --- a/bundles/org.eclipse.wst.wsdl.ui/src-asd/org/eclipse/wst/wsdl/ui/internal/asd/design/editparts/AbstractBoxtEditPart.java +++ b/bundles/org.eclipse.wst.wsdl.ui/src-asd/org/eclipse/wst/wsdl/ui/internal/asd/design/editparts/AbstractBoxtEditPart.java @@ -62,7 +62,7 @@ public abstract class AbstractBoxtEditPart extends BaseEditPart implements IName private DirectEditManager manager; public void performDirectEdit(Point cursorLocation){ - if (cursorLocation == null || hitTest(figure.getLabel(), cursorLocation) && !isReadOnly()) { + if (cursorLocation == null || hitTestFigure(figure.getHeadingFigure(), cursorLocation) && !isReadOnly()) { manager = new LabelEditManager(this, new LabelCellEditorLocator(this, cursorLocation)); manager.show(); } diff --git a/bundles/org.eclipse.wst.wsdl.ui/src-asd/org/eclipse/wst/wsdl/ui/internal/asd/design/editparts/BaseEditPart.java b/bundles/org.eclipse.wst.wsdl.ui/src-asd/org/eclipse/wst/wsdl/ui/internal/asd/design/editparts/BaseEditPart.java index a39903fc2..2eaf4bbf1 100644 --- a/bundles/org.eclipse.wst.wsdl.ui/src-asd/org/eclipse/wst/wsdl/ui/internal/asd/design/editparts/BaseEditPart.java +++ b/bundles/org.eclipse.wst.wsdl.ui/src-asd/org/eclipse/wst/wsdl/ui/internal/asd/design/editparts/BaseEditPart.java @@ -96,6 +96,10 @@ public abstract class BaseEditPart extends AbstractGraphicalEditPart implements } + protected boolean hitTest(Rectangle rectangle, Point location) { + return rectangle.contains(location); + } + protected boolean hitTest(Label target, Point location) { Rectangle origB = target.getTextBounds().getCopy(); Rectangle transB = target.getTextBounds().getCopy(); diff --git a/bundles/org.eclipse.wst.wsdl.ui/src-asd/org/eclipse/wst/wsdl/ui/internal/asd/design/editparts/EndPointEditPart.java b/bundles/org.eclipse.wst.wsdl.ui/src-asd/org/eclipse/wst/wsdl/ui/internal/asd/design/editparts/EndPointEditPart.java index cd49590c1..f86addbfe 100644 --- a/bundles/org.eclipse.wst.wsdl.ui/src-asd/org/eclipse/wst/wsdl/ui/internal/asd/design/editparts/EndPointEditPart.java +++ b/bundles/org.eclipse.wst.wsdl.ui/src-asd/org/eclipse/wst/wsdl/ui/internal/asd/design/editparts/EndPointEditPart.java @@ -123,11 +123,11 @@ public class EndPointEditPart extends BaseEditPart implements IFeedbackHandler, public void performDirectEdit(Point cursorLocation) { this.cursorLocation = cursorLocation; - if (cursorLocation == null || hitTest(getLabelFigure(), cursorLocation) && !isReadOnly()) { + if (!isReadOnly() && (cursorLocation == null || hitTest(getLabelFigure(), cursorLocation))) { manager = new LabelEditManager(this, new LabelCellEditorLocator(this, cursorLocation)); manager.show(); } - else if (hitTest(getLabelFigure(), cursorLocation) && isReadOnly()) { + else if (hitTest(getFigure().getBounds(), cursorLocation) && isReadOnly()) { doOpenNewEditor(); } } diff --git a/bundles/org.eclipse.wst.wsdl.ui/src-asd/org/eclipse/wst/wsdl/ui/internal/asd/design/editparts/OperationEditPart.java b/bundles/org.eclipse.wst.wsdl.ui/src-asd/org/eclipse/wst/wsdl/ui/internal/asd/design/editparts/OperationEditPart.java index a6fb31132..22ae7f56c 100644 --- a/bundles/org.eclipse.wst.wsdl.ui/src-asd/org/eclipse/wst/wsdl/ui/internal/asd/design/editparts/OperationEditPart.java +++ b/bundles/org.eclipse.wst.wsdl.ui/src-asd/org/eclipse/wst/wsdl/ui/internal/asd/design/editparts/OperationEditPart.java @@ -99,11 +99,11 @@ public class OperationEditPart extends BaseEditPart implements INamedEditPart private DirectEditManager manager; public void performDirectEdit(Point cursorLocation){ - if (cursorLocation == null || hitTest(label, cursorLocation) && !isReadOnly()) { + if (cursorLocation == null || hitTest(getFigure().getBounds(), cursorLocation) && !isReadOnly()) { manager = new LabelEditManager(this, new LabelCellEditorLocator(this, cursorLocation)); manager.show(); } - else if (hitTest(label, cursorLocation) && isReadOnly()) { + else if (hitTest(getFigure().getBounds(), cursorLocation) && isReadOnly()) { doOpenNewEditor(); } } diff --git a/bundles/org.eclipse.wst.wsdl.ui/src-asd/org/eclipse/wst/wsdl/ui/internal/asd/design/editparts/ParameterEditPart.java b/bundles/org.eclipse.wst.wsdl.ui/src-asd/org/eclipse/wst/wsdl/ui/internal/asd/design/editparts/ParameterEditPart.java index 90fa15772..73edaef86 100644 --- a/bundles/org.eclipse.wst.wsdl.ui/src-asd/org/eclipse/wst/wsdl/ui/internal/asd/design/editparts/ParameterEditPart.java +++ b/bundles/org.eclipse.wst.wsdl.ui/src-asd/org/eclipse/wst/wsdl/ui/internal/asd/design/editparts/ParameterEditPart.java @@ -133,11 +133,11 @@ public class ParameterEditPart extends BaseEditPart implements IFeedbackHandler, private DirectEditManager manager; public void performDirectEdit(Point cursorLocation){ - if (cursorLocation == null || hitTest(parameterName, cursorLocation) && !isReadOnly()) { + if (!isReadOnly() && (cursorLocation == null || hitTest(getFigure().getBounds(), cursorLocation))) { manager = new LabelEditManager(this, new LabelCellEditorLocator(this, cursorLocation)); manager.show(); } - else if (hitTest(parameterName, cursorLocation) && isReadOnly()) { + else if (hitTest(getFigure().getBounds(), cursorLocation) && isReadOnly()) { doOpenNewEditor(); } } |