org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditDomain Java Examples

The following examples show how to use org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditDomain. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CrossflowValidationDecoratorProvider.java    From scava with Eclipse Public License 2.0 6 votes vote down vote up
/**
* @generated
*/
public void createDecorators(IDecoratorTarget decoratorTarget) {
	EditPart editPart = (EditPart) decoratorTarget.getAdapter(EditPart.class);
	if (editPart instanceof GraphicalEditPart || editPart instanceof AbstractConnectionEditPart) {
		Object model = editPart.getModel();
		if ((model instanceof View)) {
			View view = (View) model;
			if (!(view instanceof Edge) && !view.isSetElement()) {
				return;
			}
		}
		EditDomain ed = editPart.getViewer().getEditDomain();
		if (!(ed instanceof DiagramEditDomain)) {
			return;
		}
		if (((DiagramEditDomain) ed).getEditorPart() instanceof CrossflowDiagramEditor) {
			decoratorTarget.installDecorator(KEY, new StatusDecorator(decoratorTarget));
		}
	}
}
 
Example #2
Source File: ProcessValidationDecoratorProvider.java    From bonita-studio with GNU General Public License v2.0 6 votes vote down vote up
/**
* @generated
*/
public void createDecorators(IDecoratorTarget decoratorTarget) {
	EditPart editPart = (EditPart) decoratorTarget.getAdapter(EditPart.class);
	if (editPart instanceof GraphicalEditPart || editPart instanceof AbstractConnectionEditPart) {
		Object model = editPart.getModel();
		if ((model instanceof View)) {
			View view = (View) model;
			if (!(view instanceof Edge) && !view.isSetElement()) {
				return;
			}
		}
		EditDomain ed = editPart.getViewer().getEditDomain();
		if (!(ed instanceof DiagramEditDomain)) {
			return;
		}
		if (((DiagramEditDomain) ed).getEditorPart() instanceof ProcessDiagramEditor) {
			decoratorTarget.installDecorator(KEY, new StatusDecorator(decoratorTarget));
		}
	}
}
 
Example #3
Source File: StatechartValidationDecorationProvider.java    From statecharts with Eclipse Public License 1.0 5 votes vote down vote up
public void createDecorators(IDecoratorTarget decoratorTarget) {
	EditPart editPart = (EditPart) decoratorTarget.getAdapter(EditPart.class);
	if (editPart instanceof BorderItemEditPart)
		return;
	if (editPart instanceof IPrimaryEditPart
			&& (editPart instanceof GraphicalEditPart || editPart instanceof AbstractConnectionEditPart)) {
		EditDomain ed = editPart.getViewer().getEditDomain();
		if (!(ed instanceof DiagramEditDomain)) {
			return;
		}
		if (shouldInstall(((DiagramEditDomain) ed).getEditorPart())) {
			decoratorTarget.installDecorator(getDecoratorKey(), createStatusDecorator(decoratorTarget, issueStore));
		}
	}
}
 
Example #4
Source File: TransitionPriorityDecorationProvider.java    From statecharts with Eclipse Public License 1.0 5 votes vote down vote up
@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);
		}
	}
}
 
Example #5
Source File: RegionPriorityDecorationProvider.java    From statecharts with Eclipse Public License 1.0 5 votes vote down vote up
@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);
		}
	}
}
 
Example #6
Source File: AbstractMarkerBasedDecorationProvider.java    From statecharts with Eclipse Public License 1.0 5 votes vote down vote up
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())) {
			decoratorTarget.installDecorator(getDecoratorKey(), createStatusDecorator(decoratorTarget));
		}
	}
}