use of org.eclipse.gmf.runtime.diagram.ui.editpolicies.NonResizableLabelEditPolicy in project statecharts by Yakindu.
the class TransitionExpressionEditPart method createDefaultEditPolicies.
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.COMPONENT_ROLE, new TransitionExpressionComponentEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new ContextSensitiveHelpPolicy(HelpContextIds.SC_PROPERTIES_TRANSITION_EXPRESSION));
// BUGFIX:
// https://code.google.com/a/eclipselabs.org/p/yakindu/issues/detail?id=26
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new NonResizableLabelEditPolicy() {
@Override
protected void replaceHandleDragEditPartsTracker(Handle handle) {
if (handle instanceof AbstractHandle) {
AbstractHandle h = (AbstractHandle) handle;
h.setDragTracker(new DragEditPartsTrackerEx(getHost()) {
protected boolean isMove() {
return true;
}
});
}
}
});
}
Aggregations