use of org.eclipse.gef.EditDomain 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