Skip to content
Snippets Groups Projects
Commit 66b26339 authored by Sebastian Ebert's avatar Sebastian Ebert
Browse files

ref resolution now also checks referenced **and** referencing elements

parent c3b4ec0f
No related branches found
No related tags found
No related merge requests found
...@@ -3,15 +3,33 @@ aspect Navigation { ...@@ -3,15 +3,33 @@ aspect Navigation {
eq PetriNet.getChild().petriNet() = this; eq PetriNet.getChild().petriNet() = this;
syn java.util.Collection<Place> TransitionNode.incomingPlaces() { syn java.util.Collection<Place> TransitionNode.incomingPlaces() {
java.util.Set<Place> incomingPlaces = new java.util.HashSet<>();
de.tudresden.inf.st.pnml.PnmlRefTransitionResolver.resolveIncomingPlaces(this, incomingPlaces);
return incomingPlaces;
}
java.util.Set<Place> s = new java.util.HashSet<>();
for (Arc incomingArc : getInArcList()) {
s.add(incomingArc.getSource().asPlaceNode().place());
}
for (TransitionNode ref : getReferencingTransitions()) {
s.addAll(ref.incomingPlaces());
}
return s;
}
syn java.util.Collection<Place> TransitionNode.outgoingPlaces() { syn java.util.Collection<Place> TransitionNode.outgoingPlaces() {
java.util.Set<Place> outgoingPlaces = new java.util.HashSet<>();
de.tudresden.inf.st.pnml.PnmlRefTransitionResolver.resolveOutgoingPlaces(this, outgoingPlaces); java.util.Set<Place> s = new java.util.HashSet<>();
return outgoingPlaces;
for (Arc outgoing : getOutArcList()) {
s.add(outgoing.getTarget().asPlaceNode().place());
}
for (TransitionNode ref : getReferencingTransitions()) {
s.addAll(ref.outgoingPlaces());
}
return s;
} }
inh Page PnObject.ContainingPage(); inh Page PnObject.ContainingPage();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment