diff options
author | Christian W. Damus | 2017-02-22 23:03:58 +0000 |
---|---|---|
committer | Christian W. Damus | 2017-02-22 23:05:57 +0000 |
commit | 15b9d781cfb4dba7be74f4882d2d727e05a861cc (patch) | |
tree | 9d7fee649575ccf4dd675c245c3ef8f6fb847da2 | |
parent | 2995b4f91c351d55849252dd98ce6a9867ec0673 (diff) | |
download | org.eclipse.papyrus-rt-15b9d781cfb4dba7be74f4882d2d727e05a861cc.tar.gz org.eclipse.papyrus-rt-15b9d781cfb4dba7be74f4882d2d727e05a861cc.tar.xz org.eclipse.papyrus-rt-15b9d781cfb4dba7be74f4882d2d727e05a861cc.zip |
Bug 510315: [UML-RT] UML specific implementation for state machinescommitters/cdamus/inherit-sm
Fix transition and pseudostate labels not following the superclass.
Also NPEs in the redefinition deletion advice for some state machine models.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=510315
Change-Id: I7c9b7a199a28aee77ed528983c555c40b1cb5df4
15 files changed, 506 insertions, 64 deletions
diff --git a/plugins/umlrt/core/org.eclipse.papyrusrt.umlrt.core/src/org/eclipse/papyrusrt/umlrt/core/internal/types/advice/DeleteRedefinitionsAdvice.java b/plugins/umlrt/core/org.eclipse.papyrusrt.umlrt.core/src/org/eclipse/papyrusrt/umlrt/core/internal/types/advice/DeleteRedefinitionsAdvice.java index 724c2eca1..ce31b0ebd 100644 --- a/plugins/umlrt/core/org.eclipse.papyrusrt.umlrt.core/src/org/eclipse/papyrusrt/umlrt/core/internal/types/advice/DeleteRedefinitionsAdvice.java +++ b/plugins/umlrt/core/org.eclipse.papyrusrt.umlrt.core/src/org/eclipse/papyrusrt/umlrt/core/internal/types/advice/DeleteRedefinitionsAdvice.java @@ -89,8 +89,9 @@ public class DeleteRedefinitionsAdvice extends AbstractEditHelperAdvice { } else { // The easy case is when the element that I redefine is being destroyed UMLRTNamedElement redefined = element.getRedefinedElement(); - if (((redefined != null) && isBeingDestroyed(request, redefined.toUML())) - || (redefined.toUML() instanceof Behavior)) { // Classifier behavior is optional + if ((redefined != null) + && (isBeingDestroyed(request, redefined.toUML()) + || (redefined.toUML() instanceof Behavior))) { // Classifier behavior is optional result = true; } else { // Assume that the redefinition is not valid until otherwise determined @@ -113,7 +114,7 @@ public class DeleteRedefinitionsAdvice extends AbstractEditHelperAdvice { result = generalizations(subtype, supertype) .anyMatch(g -> isBeingDestroyed(request, g)); } - } else if (redefCtx.redefines(rootCtx)) { + } else if ((redefCtx != null) && redefCtx.redefines(rootCtx)) { // Case of, for example, state machine redefinition. Look for any // of the redefinition contexts being destroyed result = redefCtx.getRedefinitionChain().stream() diff --git a/plugins/umlrt/core/org.eclipse.papyrusrt.umlrt.core/src/org/eclipse/papyrusrt/umlrt/core/utils/StateUtils.java b/plugins/umlrt/core/org.eclipse.papyrusrt.umlrt.core/src/org/eclipse/papyrusrt/umlrt/core/utils/StateUtils.java index e0a6d835b..06cb61489 100644 --- a/plugins/umlrt/core/org.eclipse.papyrusrt.umlrt.core/src/org/eclipse/papyrusrt/umlrt/core/utils/StateUtils.java +++ b/plugins/umlrt/core/org.eclipse.papyrusrt.umlrt.core/src/org/eclipse/papyrusrt/umlrt/core/utils/StateUtils.java @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2016 Christian W. Damus and others. + * Copyright (c) 2016, 2017 Christian W. Damus and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -18,7 +18,11 @@ import org.eclipse.gmf.runtime.common.core.command.ICommand; import org.eclipse.papyrusrt.umlrt.core.types.ElementTypeUtils; import org.eclipse.papyrusrt.umlrt.core.types.IUMLRTElementTypes; import org.eclipse.papyrusrt.umlrt.core.types.UMLRTElementTypesEnumerator; +import org.eclipse.papyrusrt.umlrt.uml.util.UMLRTExtensionUtil; +import org.eclipse.uml2.uml.Region; import org.eclipse.uml2.uml.State; +import org.eclipse.uml2.uml.Transition; +import org.eclipse.uml2.uml.UMLPackage; /** * Utilities for inspecting and working with states in an UML-RT model. @@ -72,8 +76,9 @@ public final class StateUtils { return false; } - return state.getRegions().stream().anyMatch( - r -> r.getTransitions().stream().anyMatch(t -> TransitionUtils.isInternalTransition(t))); + return UMLRTExtensionUtil.<Region> getUMLRTContents(state, UMLPackage.Literals.STATE__REGION).stream() + .flatMap(r -> UMLRTExtensionUtil.<Transition> getUMLRTContents(r, UMLPackage.Literals.REGION__TRANSITION).stream()) + .anyMatch(TransitionUtils::isInternalTransition); } diff --git a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/common/utils/UMLRTEditPartUtils.java b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/common/utils/UMLRTEditPartUtils.java index 7d435425c..32f2ffb7b 100644 --- a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/common/utils/UMLRTEditPartUtils.java +++ b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/common/utils/UMLRTEditPartUtils.java @@ -25,6 +25,7 @@ import java.util.function.Supplier; import org.eclipse.draw2d.Figure; import org.eclipse.draw2d.geometry.Point; import org.eclipse.emf.common.util.TreeIterator; +import org.eclipse.emf.ecore.EAnnotation; import org.eclipse.emf.ecore.EObject; import org.eclipse.gef.EditPart; import org.eclipse.gef.EditPartViewer; @@ -33,9 +34,11 @@ import org.eclipse.gef.Request; import org.eclipse.gef.RequestConstants; import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; +import org.eclipse.gmf.runtime.notation.NotationPackage; import org.eclipse.gmf.runtime.notation.View; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.papyrus.infra.gmfdiag.common.helper.DiagramHelper; +import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSAnnotations; import org.eclipse.papyrus.infra.tools.util.TypeUtils; import org.eclipse.papyrusrt.umlrt.tooling.diagram.common.editparts.IInheritableEditPart; import org.eclipse.swt.graphics.Color; @@ -252,5 +255,21 @@ public class UMLRTEditPartUtils { return result; } + /** + * Queries whether the user has explicitly set visibility of a view. + * + * @param view + * the view to check + * + * @return <code>true</code> if the user has set explicitly the visibility, <code>false</code> otherwise + */ + public static boolean isVisibilityForced(View view) { + EAnnotation eAnnotation = view.getEAnnotation(CSSAnnotations.CSS_FORCE_VALUE); + if (eAnnotation == null) { + return false; + } + return eAnnotation.getDetails().containsKey(NotationPackage.Literals.VIEW__VISIBLE.getName()); + } + } diff --git a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/InternalTransitionsCompartmentEditPart.java b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/InternalTransitionsCompartmentEditPart.java index 302248be1..bb1dc3335 100644 --- a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/InternalTransitionsCompartmentEditPart.java +++ b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/InternalTransitionsCompartmentEditPart.java @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2016 CEA LIST and others. + * Copyright (c) 2016, 2017 CEA LIST, Christian W. Damus, and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -8,22 +8,22 @@ * * Contributors: * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 510315 * *****************************************************************************/ package org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine.internal.editparts; +import static org.eclipse.papyrusrt.umlrt.tooling.diagram.common.utils.UMLRTEditPartUtils.isVisibilityForced; + import java.util.Collection; import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EAnnotation; import org.eclipse.emf.ecore.EObject; import org.eclipse.gef.EditPart; import org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker; import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; -import org.eclipse.gmf.runtime.notation.NotationPackage; import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSAnnotations; import org.eclipse.papyrus.uml.diagram.common.editparts.ListCompartmentEditPart; import org.eclipse.papyrusrt.umlrt.core.utils.StateUtils; import org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine.internal.editpolicies.ReuseCreationEditPolicy; @@ -167,22 +167,6 @@ public class InternalTransitionsCompartmentEditPart extends ListCompartmentEditP } /** - * returns <code>true</code> if the user has set explicitly the visibility. - * - * @param view - * the view to check - * - * @return <code>true</code> if the user has set explicitly the visibility, <code>false</code> otherwise - */ - protected boolean isVisibilityForced(View view) { - EAnnotation eAnnotation = view.getEAnnotation(CSSAnnotations.CSS_FORCE_VALUE); - if (eAnnotation == null) { - return false; - } - return eAnnotation.getDetails().containsKey(NotationPackage.eINSTANCE.getView_Visible().getName()); - } - - /** * Remove this edit part as a listener of the specified transition. * * @param transition diff --git a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/RTPseudostateChoiceLabelEditPart.java b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/RTPseudostateChoiceLabelEditPart.java new file mode 100644 index 000000000..75abe851f --- /dev/null +++ b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/RTPseudostateChoiceLabelEditPart.java @@ -0,0 +1,56 @@ +/***************************************************************************** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine.internal.editparts; + +import static org.eclipse.papyrusrt.umlrt.tooling.diagram.common.internal.editpolicies.AbstractInheritanceEditPolicy.INHERITANCE_ROLE; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateChoiceFloatingLabelEditPart; +import org.eclipse.papyrusrt.umlrt.tooling.diagram.common.internal.editpolicies.InheritanceEditPolicy; +import org.eclipse.papyrusrt.umlrt.tooling.diagram.common.internal.utils.EditPartInheritanceUtils; + +/** + * RT specialization of the choice label edit part. + */ +public class RTPseudostateChoiceLabelEditPart extends PseudostateChoiceFloatingLabelEditPart implements IStateMachineInheritableEditPart { + + /** + * Initializes me with my notation view. + * + * @param view + * my notation view + */ + public RTPseudostateChoiceLabelEditPart(View view) { + super(view); + } + + @Override + protected void createDefaultEditPolicies() { + // This needs to be ahead of the edit-policies that process user edit gestures + installEditPolicy(INHERITANCE_ROLE, new InheritanceEditPolicy()); + + super.createDefaultEditPolicies(); + } + + @Override + public EObject resolveSemanticElement() { + return EditPartInheritanceUtils.resolveSemanticElement(this, super.resolveSemanticElement()); + } + + @Override + public Object getAdapter(@SuppressWarnings("rawtypes") java.lang.Class key) { + return EditPartInheritanceUtils.getAdapter(this, key, super.getAdapter(key)); + } +} diff --git a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/RTPseudostateDeepHistoryLabelEditPart.java b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/RTPseudostateDeepHistoryLabelEditPart.java new file mode 100644 index 000000000..45293b8c6 --- /dev/null +++ b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/RTPseudostateDeepHistoryLabelEditPart.java @@ -0,0 +1,56 @@ +/***************************************************************************** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine.internal.editparts; + +import static org.eclipse.papyrusrt.umlrt.tooling.diagram.common.internal.editpolicies.AbstractInheritanceEditPolicy.INHERITANCE_ROLE; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateDeepHistoryFloatingLabelEditPart; +import org.eclipse.papyrusrt.umlrt.tooling.diagram.common.internal.editpolicies.InheritanceEditPolicy; +import org.eclipse.papyrusrt.umlrt.tooling.diagram.common.internal.utils.EditPartInheritanceUtils; + +/** + * RT specialization of the deep-history label edit part. + */ +public class RTPseudostateDeepHistoryLabelEditPart extends PseudostateDeepHistoryFloatingLabelEditPart implements IStateMachineInheritableEditPart { + + /** + * Initializes me with my notation view. + * + * @param view + * my notation view + */ + public RTPseudostateDeepHistoryLabelEditPart(View view) { + super(view); + } + + @Override + protected void createDefaultEditPolicies() { + // This needs to be ahead of the edit-policies that process user edit gestures + installEditPolicy(INHERITANCE_ROLE, new InheritanceEditPolicy()); + + super.createDefaultEditPolicies(); + } + + @Override + public EObject resolveSemanticElement() { + return EditPartInheritanceUtils.resolveSemanticElement(this, super.resolveSemanticElement()); + } + + @Override + public Object getAdapter(@SuppressWarnings("rawtypes") java.lang.Class key) { + return EditPartInheritanceUtils.getAdapter(this, key, super.getAdapter(key)); + } +} diff --git a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/RTPseudostateEntryPointLabelEditPart.java b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/RTPseudostateEntryPointLabelEditPart.java new file mode 100644 index 000000000..f93e5338e --- /dev/null +++ b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/RTPseudostateEntryPointLabelEditPart.java @@ -0,0 +1,56 @@ +/***************************************************************************** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine.internal.editparts; + +import static org.eclipse.papyrusrt.umlrt.tooling.diagram.common.internal.editpolicies.AbstractInheritanceEditPolicy.INHERITANCE_ROLE; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateEntryPointFloatingLabelEditPart; +import org.eclipse.papyrusrt.umlrt.tooling.diagram.common.internal.editpolicies.InheritanceEditPolicy; +import org.eclipse.papyrusrt.umlrt.tooling.diagram.common.internal.utils.EditPartInheritanceUtils; + +/** + * RT specialization of the entry-point label edit part. + */ +public class RTPseudostateEntryPointLabelEditPart extends PseudostateEntryPointFloatingLabelEditPart implements IStateMachineInheritableEditPart { + + /** + * Initializes me with my notation view. + * + * @param view + * my notation view + */ + public RTPseudostateEntryPointLabelEditPart(View view) { + super(view); + } + + @Override + protected void createDefaultEditPolicies() { + // This needs to be ahead of the edit-policies that process user edit gestures + installEditPolicy(INHERITANCE_ROLE, new InheritanceEditPolicy()); + + super.createDefaultEditPolicies(); + } + + @Override + public EObject resolveSemanticElement() { + return EditPartInheritanceUtils.resolveSemanticElement(this, super.resolveSemanticElement()); + } + + @Override + public Object getAdapter(@SuppressWarnings("rawtypes") java.lang.Class key) { + return EditPartInheritanceUtils.getAdapter(this, key, super.getAdapter(key)); + } +} diff --git a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/RTPseudostateExitPointLabelEditPart.java b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/RTPseudostateExitPointLabelEditPart.java new file mode 100644 index 000000000..0326c7165 --- /dev/null +++ b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/RTPseudostateExitPointLabelEditPart.java @@ -0,0 +1,56 @@ +/***************************************************************************** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine.internal.editparts; + +import static org.eclipse.papyrusrt.umlrt.tooling.diagram.common.internal.editpolicies.AbstractInheritanceEditPolicy.INHERITANCE_ROLE; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateExitPointFloatingLabelEditPart; +import org.eclipse.papyrusrt.umlrt.tooling.diagram.common.internal.editpolicies.InheritanceEditPolicy; +import org.eclipse.papyrusrt.umlrt.tooling.diagram.common.internal.utils.EditPartInheritanceUtils; + +/** + * RT specialization of the exit-point label edit part. + */ +public class RTPseudostateExitPointLabelEditPart extends PseudostateExitPointFloatingLabelEditPart implements IStateMachineInheritableEditPart { + + /** + * Initializes me with my notation view. + * + * @param view + * my notation view + */ + public RTPseudostateExitPointLabelEditPart(View view) { + super(view); + } + + @Override + protected void createDefaultEditPolicies() { + // This needs to be ahead of the edit-policies that process user edit gestures + installEditPolicy(INHERITANCE_ROLE, new InheritanceEditPolicy()); + + super.createDefaultEditPolicies(); + } + + @Override + public EObject resolveSemanticElement() { + return EditPartInheritanceUtils.resolveSemanticElement(this, super.resolveSemanticElement()); + } + + @Override + public Object getAdapter(@SuppressWarnings("rawtypes") java.lang.Class key) { + return EditPartInheritanceUtils.getAdapter(this, key, super.getAdapter(key)); + } +} diff --git a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/RTPseudostateInitialLabelEditPart.java b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/RTPseudostateInitialLabelEditPart.java new file mode 100644 index 000000000..c6c2dde5e --- /dev/null +++ b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/RTPseudostateInitialLabelEditPart.java @@ -0,0 +1,56 @@ +/***************************************************************************** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine.internal.editparts; + +import static org.eclipse.papyrusrt.umlrt.tooling.diagram.common.internal.editpolicies.AbstractInheritanceEditPolicy.INHERITANCE_ROLE; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateInitialFloatingLabelEditPart; +import org.eclipse.papyrusrt.umlrt.tooling.diagram.common.internal.editpolicies.InheritanceEditPolicy; +import org.eclipse.papyrusrt.umlrt.tooling.diagram.common.internal.utils.EditPartInheritanceUtils; + +/** + * RT specialization of the initial pseudostate label edit part. + */ +public class RTPseudostateInitialLabelEditPart extends PseudostateInitialFloatingLabelEditPart implements IStateMachineInheritableEditPart { + + /** + * Constructor. + * + * @param view + * the view controlled by this edit part + */ + public RTPseudostateInitialLabelEditPart(View view) { + super(view); + } + + @Override + protected void createDefaultEditPolicies() { + // This needs to be ahead of the edit-policies that process user edit gestures + installEditPolicy(INHERITANCE_ROLE, new InheritanceEditPolicy()); + + super.createDefaultEditPolicies(); + } + + @Override + public EObject resolveSemanticElement() { + return EditPartInheritanceUtils.resolveSemanticElement(this, super.resolveSemanticElement()); + } + + @Override + public Object getAdapter(@SuppressWarnings("rawtypes") java.lang.Class key) { + return EditPartInheritanceUtils.getAdapter(this, key, super.getAdapter(key)); + } +} diff --git a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/RTPseudostateJunctionLabelEditPart.java b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/RTPseudostateJunctionLabelEditPart.java new file mode 100644 index 000000000..1e40140fa --- /dev/null +++ b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/RTPseudostateJunctionLabelEditPart.java @@ -0,0 +1,57 @@ +/***************************************************************************** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine.internal.editparts; + +import static org.eclipse.papyrusrt.umlrt.tooling.diagram.common.internal.editpolicies.AbstractInheritanceEditPolicy.INHERITANCE_ROLE; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateJunctionFloatingLabelEditPart; +import org.eclipse.papyrusrt.umlrt.tooling.diagram.common.internal.editpolicies.InheritanceEditPolicy; +import org.eclipse.papyrusrt.umlrt.tooling.diagram.common.internal.utils.EditPartInheritanceUtils; + +/** + * RT specialization of the junction label edit part. + */ +public class RTPseudostateJunctionLabelEditPart extends PseudostateJunctionFloatingLabelEditPart implements IStateMachineInheritableEditPart { + + /** + * Initializes me with my notation view. + * + * @param view + * my notation view + */ + public RTPseudostateJunctionLabelEditPart(View view) { + super(view); + } + + @Override + protected void createDefaultEditPolicies() { + // This needs to be ahead of the edit-policies that process user edit gestures + installEditPolicy(INHERITANCE_ROLE, new InheritanceEditPolicy()); + + super.createDefaultEditPolicies(); + } + + @Override + public EObject resolveSemanticElement() { + return EditPartInheritanceUtils.resolveSemanticElement(this, super.resolveSemanticElement()); + } + + @Override + public Object getAdapter(@SuppressWarnings("rawtypes") java.lang.Class key) { + return EditPartInheritanceUtils.getAdapter(this, key, super.getAdapter(key)); + } + +} diff --git a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/RTStateEditPart.java b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/RTStateEditPart.java index 9b414037d..885d58b51 100644 --- a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/RTStateEditPart.java +++ b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/RTStateEditPart.java @@ -14,6 +14,7 @@ package org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine.internal.editparts; import static org.eclipse.papyrusrt.umlrt.tooling.diagram.common.internal.editpolicies.AbstractInheritanceEditPolicy.INHERITANCE_ROLE; +import static org.eclipse.papyrusrt.umlrt.tooling.diagram.common.utils.UMLRTEditPartUtils.isVisibilityForced; import java.util.ArrayList; import java.util.Collection; @@ -22,17 +23,14 @@ import java.util.List; import org.eclipse.draw2d.PositionConstants; import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EAnnotation; import org.eclipse.emf.ecore.EObject; import org.eclipse.gef.EditPart; import org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker; import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; import org.eclipse.gmf.runtime.notation.BasicCompartment; -import org.eclipse.gmf.runtime.notation.NotationPackage; import org.eclipse.gmf.runtime.notation.View; import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationUtils; -import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSAnnotations; import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy; import org.eclipse.papyrus.uml.diagram.statemachine.custom.edit.part.CustomStateEditPart; import org.eclipse.papyrusrt.umlrt.core.utils.StateUtils; @@ -390,20 +388,4 @@ public class RTStateEditPart extends CustomStateEditPart implements IStateMachin } return Collections.EMPTY_LIST; } - - /** - * returns <code>true</code> if the user has set explicitly the visibility. - * - * @param view - * the view to check - * - * @return <code>true</code> if the user has set explicitly the visibility, <code>false</code> otherwise - */ - protected boolean isVisibilityForced(View view) { - EAnnotation eAnnotation = view.getEAnnotation(CSSAnnotations.CSS_FORCE_VALUE); - if (eAnnotation == null) { - return false; - } - return eAnnotation.getDetails().containsKey(NotationPackage.eINSTANCE.getView_Visible().getName()); - } } diff --git a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/RTStateMachineEditPartProvider.java b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/RTStateMachineEditPartProvider.java index cd32749a4..76618a573 100644 --- a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/RTStateMachineEditPartProvider.java +++ b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/RTStateMachineEditPartProvider.java @@ -15,16 +15,23 @@ package org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine.internal.editpa import org.eclipse.emf.ecore.EObject; import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PackageEditPart; import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateChoiceEditPart; +import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateChoiceFloatingLabelEditPart; import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateDeepHistoryEditPart; +import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateDeepHistoryFloatingLabelEditPart; import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateEntryPointEditPart; +import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateEntryPointFloatingLabelEditPart; import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateExitPointEditPart; +import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateExitPointFloatingLabelEditPart; import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateInitialEditPart; +import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateInitialFloatingLabelEditPart; import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateJunctionEditPart; +import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateJunctionFloatingLabelEditPart; import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.RegionCompartmentEditPart; import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.RegionEditPart; import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.StateEditPart; import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.StateEditPartTN; import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.TransitionEditPart; +import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.TransitionGuardEditPart; import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.TransitionNameEditPart; import org.eclipse.papyrusrt.umlrt.core.utils.ModelUtils; import org.eclipse.papyrusrt.umlrt.core.utils.StateMachineUtils; @@ -55,9 +62,17 @@ public class RTStateMachineEditPartProvider extends AbstractRTEditPartProvider { nodeMap.put(RegionEditPart.VISUAL_ID, always(RTRegionEditPart.class)); nodeMap.put(RegionCompartmentEditPart.VISUAL_ID, always(RTRegionCompartmentEditPart.class)); nodeMap.put(TransitionNameEditPart.VISUAL_ID, always(RTTransitionNameEditPart.class)); + nodeMap.put(TransitionGuardEditPart.VISUAL_ID, always(RTTransitionGuardEditPart.class)); + + // Labels + nodeMap.put(PseudostateChoiceFloatingLabelEditPart.VISUAL_ID, always(RTPseudostateChoiceLabelEditPart.class)); + nodeMap.put(PseudostateInitialFloatingLabelEditPart.VISUAL_ID, always(RTPseudostateInitialLabelEditPart.class)); + nodeMap.put(PseudostateDeepHistoryFloatingLabelEditPart.VISUAL_ID, always(RTPseudostateDeepHistoryLabelEditPart.class)); + nodeMap.put(PseudostateJunctionFloatingLabelEditPart.VISUAL_ID, always(RTPseudostateJunctionLabelEditPart.class)); + nodeMap.put(PseudostateEntryPointFloatingLabelEditPart.VISUAL_ID, always(RTPseudostateEntryPointLabelEditPart.class)); + nodeMap.put(PseudostateExitPointFloatingLabelEditPart.VISUAL_ID, always(RTPseudostateExitPointLabelEditPart.class)); // Edges - // get the plain transition edit part and not the custom one edgeMap.put(TransitionEditPart.VISUAL_ID, always(RTTransitionEditPart.class)); } diff --git a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/RTTransitionGuardEditPart.java b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/RTTransitionGuardEditPart.java new file mode 100644 index 000000000..7dbd7ceec --- /dev/null +++ b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/RTTransitionGuardEditPart.java @@ -0,0 +1,82 @@ +/***************************************************************************** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine.internal.editparts; + +import static org.eclipse.papyrusrt.umlrt.tooling.diagram.common.internal.editpolicies.AbstractInheritanceEditPolicy.INHERITANCE_ROLE; +import static org.eclipse.papyrusrt.umlrt.tooling.diagram.common.utils.UMLRTEditPartUtils.isVisibilityForced; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.uml.diagram.statemachine.custom.edit.part.CustomTransitionGuardEditPart; +import org.eclipse.papyrusrt.umlrt.tooling.diagram.common.internal.editpolicies.InheritanceEditPolicy; +import org.eclipse.papyrusrt.umlrt.tooling.diagram.common.internal.utils.EditPartInheritanceUtils; +import org.eclipse.uml2.uml.Transition; + +/** + * Inheritance-aware edit-part for the transition guard label. + */ +public class RTTransitionGuardEditPart extends CustomTransitionGuardEditPart implements IStateMachineInheritableEditPart { + + public RTTransitionGuardEditPart(View view) { + super(view); + } + + + @Override + protected void createDefaultEditPolicies() { + // This needs to be ahead of the edit-policies that process user edit gestures + installEditPolicy(INHERITANCE_ROLE, new InheritanceEditPolicy()); + + super.createDefaultEditPolicies(); + } + + @Override + public EObject resolveSemanticElement() { + return EditPartInheritanceUtils.resolveSemanticElement(this, super.resolveSemanticElement()); + } + + @Override + public Object getAdapter(@SuppressWarnings("rawtypes") java.lang.Class key) { + return EditPartInheritanceUtils.getAdapter(this, key, super.getAdapter(key)); + } + + /** + * Default to visible if there is any guard condition to show. + */ + @Override + protected void refreshVisibility() { + // If visibility is hard coded to be visible or not, do not continue + if (!(getModel() instanceof View)) { + return; + } + + View view = (View) getModel(); + if (isVisibilityForced(view)) { + setVisibility(view.isVisible()); + } else if (isInherited()) { + // Do as in the parent diagram + View parentView = getRedefinedView(); + if (parentView != null) { + setVisibility(parentView.isVisible()); + } + } else { + // let the fact that internal transitions exist or not to toggle visibility + EObject semantic = resolveSemanticElement(); + if (semantic instanceof Transition) { + setVisibility(view.isVisible() && (((Transition) semantic).getGuard() != null)); + } + } + } + +} diff --git a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/RTTransitionNameEditPart.java b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/RTTransitionNameEditPart.java index a41add130..ac2801201 100644 --- a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/RTTransitionNameEditPart.java +++ b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/editparts/RTTransitionNameEditPart.java @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2017 CEA LIST and others. + * Copyright (c) 2017 CEA LIST, Christian W. Damus, and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -8,11 +8,14 @@ * * Contributors: * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 510315 * *****************************************************************************/ package org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine.internal.editparts; +import static org.eclipse.papyrusrt.umlrt.tooling.diagram.common.internal.editpolicies.AbstractInheritanceEditPolicy.INHERITANCE_ROLE; + import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.List; @@ -35,12 +38,14 @@ import org.eclipse.papyrus.infra.services.labelprovider.service.ExtensibleLabelP import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService; import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.TransitionNameEditPart; import org.eclipse.papyrusrt.umlrt.tooling.diagram.common.Activator; +import org.eclipse.papyrusrt.umlrt.tooling.diagram.common.internal.editpolicies.InheritanceEditPolicy; +import org.eclipse.papyrusrt.umlrt.tooling.diagram.common.internal.utils.EditPartInheritanceUtils; import org.eclipse.swt.graphics.Image; /** * Specific RT implementation to handle the label displayed thanks to label provider. */ -public class RTTransitionNameEditPart extends TransitionNameEditPart { +public class RTTransitionNameEditPart extends TransitionNameEditPart implements IStateMachineInheritableEditPart { /** Label that is displayed as the tooltip. */ private Label toolTipLabel = new Label(); @@ -59,6 +64,24 @@ public class RTTransitionNameEditPart extends TransitionNameEditPart { super(view); } + @Override + protected void createDefaultEditPolicies() { + // This needs to be ahead of the edit-policies that process user edit gestures + installEditPolicy(INHERITANCE_ROLE, new InheritanceEditPolicy()); + + super.createDefaultEditPolicies(); + } + + @Override + public EObject resolveSemanticElement() { + return EditPartInheritanceUtils.resolveSemanticElement(this, super.resolveSemanticElement()); + } + + @Override + public Object getAdapter(@SuppressWarnings("rawtypes") java.lang.Class key) { + return EditPartInheritanceUtils.getAdapter(this, key, super.getAdapter(key)); + } + /** * {@inheritDoc} */ diff --git a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/parsers/TransitionLabelParser.java b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/parsers/TransitionLabelParser.java index 1dd43d58e..a218f9bcc 100644 --- a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/parsers/TransitionLabelParser.java +++ b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/statemachine/internal/parsers/TransitionLabelParser.java @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2016 CEA LIST and others. + * Copyright (c) 2016, 2017 CEA LIST, Christian W. Damus, and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -8,6 +8,7 @@ * * Contributors: * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 510315 * *****************************************************************************/ package org.eclipse.papyrusrt.umlrt.tooling.diagram.statemachine.internal.parsers; @@ -25,9 +26,12 @@ import org.eclipse.papyrus.infra.emf.utils.EMFHelper; import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject; import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService; import org.eclipse.papyrus.uml.diagram.common.parser.NamedElementLabelParser; +import org.eclipse.papyrusrt.umlrt.uml.util.UMLRTExtensionUtil; import org.eclipse.uml2.uml.CallEvent; import org.eclipse.uml2.uml.NamedElement; import org.eclipse.uml2.uml.Transition; +import org.eclipse.uml2.uml.Trigger; +import org.eclipse.uml2.uml.UMLPackage; /** * Parser for internal transitions. @@ -41,9 +45,6 @@ public class TransitionLabelParser extends NamedElementLabelParser { super(); } - /** - * {@inheritDoc} - */ @Override public String getPrintString(IAdaptable element, int flags) { EObject eObject = EMFHelper.getEObject(element); @@ -55,12 +56,10 @@ public class TransitionLabelParser extends NamedElementLabelParser { Activator.log.error(e); } } + return super.getPrintString(element, flags); } - /** - * {@inheritDoc} - */ @Override public List<EObject> getSemanticElementsBeingParsed(EObject element) { List<EObject> semantics = super.getSemanticElementsBeingParsed(element); @@ -68,10 +67,11 @@ public class TransitionLabelParser extends NamedElementLabelParser { return semantics; } - if (!((Transition) element).getTriggers().isEmpty()) { - semantics.addAll(((Transition) element).getTriggers()); + List<Trigger> triggers = UMLRTExtensionUtil.getUMLRTContents(element, UMLPackage.Literals.TRANSITION__TRIGGER); + if (!triggers.isEmpty()) { + semantics.addAll(triggers); - Set<CallEvent> callEvents = ((Transition) element).getTriggers().stream() + Set<CallEvent> callEvents = triggers.stream() .map(t -> t.getEvent()) .filter(CallEvent.class::isInstance) .map(CallEvent.class::cast).collect(Collectors.toSet()); @@ -86,17 +86,11 @@ public class TransitionLabelParser extends NamedElementLabelParser { return semantics; } - /** - * {@inheritDoc} - */ @Override public boolean isAffectingEvent(Object event, int flags) { return true; } - /** - * {@inheritDoc} - */ @Override public boolean areSemanticElementsAffected(EObject listener, Object notification) { return super.areSemanticElementsAffected(listener, notification); |