use of org.eclipse.gef.editpolicies.RootComponentEditPolicy in project yamcs-studio by yamcs.
the class ContainerTreeEditpart method createEditPolicies.
@Override
protected void createEditPolicies() {
super.createEditPolicies();
if (getWidgetModel().isChildrenOperationAllowable()) {
installEditPolicy(EditPolicy.CONTAINER_ROLE, new WidgetContainerEditPolicy());
installEditPolicy(EditPolicy.TREE_CONTAINER_ROLE, new WidgetTreeContainerEditPolicy());
}
// If this editpart is the contents of the viewer, then it is not deletable!
if (getParent() instanceof RootEditPart)
installEditPolicy(EditPolicy.COMPONENT_ROLE, new RootComponentEditPolicy());
}
use of org.eclipse.gef.editpolicies.RootComponentEditPolicy in project whole by wholeplatform.
the class RootFragmentPart method createEditPolicies.
protected void createEditPolicies() {
super.createEditPolicies();
installEditPolicy(EditPolicy.COMPONENT_ROLE, new RootComponentEditPolicy());
// installEditPolicy(EditPolicy.LAYOUT_ROLE, null);
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, null);
installEditPolicy(EditPolicy.NODE_ROLE, null);
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, null);
}
use of org.eclipse.gef.editpolicies.RootComponentEditPolicy in project statecharts by Yakindu.
the class StatechartTextEditPart method createDefaultEditPolicies.
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
// Disables deletion of the text compartment view if additional elements
// are selected too
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new SemanticEditPolicy() {
@Override
protected boolean shouldProceed(DestroyRequest destroyRequest) {
return false;
}
});
// Disables deletion of the text compartment view via keyboard
installEditPolicy(EditPolicy.COMPONENT_ROLE, new RootComponentEditPolicy());
removeEditPolicy(EditPolicyRoles.CONNECTION_HANDLES_ROLE);
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PreferredSizeHandlerEditPolicy() {
@Override
protected IFigure getPreferredSizeFigure() {
return getChildBySemanticHint(SemanticHints.STATECHART_NAME).getFigure();
}
});
}
use of org.eclipse.gef.editpolicies.RootComponentEditPolicy in project statecharts by Yakindu.
the class StatechartTextExpressionEditPart method createDefaultEditPolicies.
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
// Disables deletion of the text compartment via keyboard
installEditPolicy(COMPONENT_ROLE, new RootComponentEditPolicy());
removeEditPolicy(PRIMARY_DRAG_ROLE);
installEditPolicy(SELECTION_FEEDBACK_ROLE, new ContextSensitiveHelpPolicy(HelpContextIds.SC_PROPERTIES_STATECHART_EXPRESSION));
removeEditPolicy(CONNECTION_HANDLES_ROLE);
}
use of org.eclipse.gef.editpolicies.RootComponentEditPolicy in project yamcs-studio by yamcs.
the class DisplayEditpart method createEditPolicies.
@Override
protected void createEditPolicies() {
super.createEditPolicies();
// disallows the removal of this edit part from its parent
installEditPolicy(EditPolicy.COMPONENT_ROLE, new RootComponentEditPolicy());
removeEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE);
}
Aggregations