-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed Issue #65: Markers attach to an XMachine or an XContext #66
Conversation
Attach the markers to the XContext's name if no child element found (see Issue eventB-Soton#65)
Attach the markers to the XMachine's name if no child element found (see Issue eventB-Soton#65)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks ok.. but see detailed comments
EStructuralFeature feature = this.getFeature(obj, attributeType); | ||
EObject elem = obj; | ||
if ((feature == null)) { | ||
elem = this.getMachine(obj); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you use
((EventBObject)obj).getContaining(MachinePackage.Literals.MACHINE);
EStructuralFeature feature = this.getFeature(obj, attributeType); | ||
EObject elem = obj; | ||
if ((feature == null)) { | ||
elem = this.getContext(obj); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you use
((EventBObject)obj).getContaining(ContextPackage.Literals.CONTEXT);
var feature = getFeature(obj, attributeType) | ||
var elem = obj | ||
if (feature === null) { | ||
elem = getContext(obj) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you use
((EventBObject)obj).getContaining(ContextPackage.Literals.CONTEXT);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @cfsnook. I reimplemented the utility methods to use EventBObject.getContaining() method.
Use EventBObject.getContaining() to get the containing Machine or Context of the element corresponding to the RodinMarker.
The markers are now attached to the name of the XMachine or XContext if there are no element/feature found corresponding to the original issue