Skip to content
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

Merged
merged 5 commits into from
Feb 2, 2021

Conversation

tshoang
Copy link
Member

@tshoang tshoang commented Feb 1, 2021

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

@tshoang tshoang requested a review from cfsnook February 1, 2021 23:10
@tshoang tshoang linked an issue Feb 1, 2021 that may be closed by this pull request
Copy link
Member

@cfsnook cfsnook left a 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);
Copy link
Member

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);
Copy link
Member

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)
Copy link
Member

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);

Copy link
Member Author

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.
@cfsnook cfsnook merged commit 63a5d38 into eventB-Soton:master Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Markers attach to an XMachine or an XContext
2 participants