use of org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecorator in project statecharts by Yakindu.
the class TransitionPriorityDecorationProvider method createDecorators.
@Override
public void createDecorators(IDecoratorTarget decoratorTarget) {
EditPart editPart = (EditPart) decoratorTarget.getAdapter(EditPart.class);
if (editPart instanceof GraphicalEditPart || editPart instanceof AbstractConnectionEditPart) {
EditDomain ed = editPart.getViewer().getEditDomain();
if (!(ed instanceof DiagramEditDomain)) {
return;
}
if (shouldInstall(((DiagramEditDomain) ed).getEditorPart()) && editPart instanceof TransitionEditPart) {
IDecorator decorator = createStatusDecorator(decoratorTarget);
decorators.add(decorator);
decoratorTarget.installDecorator(getDecoratorKey(), decorator);
}
}
}
use of org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecorator in project statecharts by Yakindu.
the class RegionPriorityDecorationProvider method createDecorators.
@Override
public void createDecorators(IDecoratorTarget decoratorTarget) {
EditPart editPart = (EditPart) decoratorTarget.getAdapter(EditPart.class);
if (editPart instanceof GraphicalEditPart || editPart instanceof AbstractConnectionEditPart) {
EditDomain ed = editPart.getViewer().getEditDomain();
if (!(ed instanceof DiagramEditDomain)) {
return;
}
if (shouldInstall(((DiagramEditDomain) ed).getEditorPart()) && editPart instanceof RegionEditPart) {
IDecorator decorator = createStatusDecorator(decoratorTarget);
decorators.add(decorator);
decoratorTarget.installDecorator(getDecoratorKey(), decorator);
}
}
}
Aggregations