Commit 15d50333 authored by Michael Schwarz's avatar Michael Schwarz

further steps in implementing RR + bugify is SR resolution is sarted

with assoc
parent 3eef45a1
...@@ -430,8 +430,13 @@ class ConflictPanel extends Composite { ...@@ -430,8 +430,13 @@ class ConflictPanel extends Composite {
changeColors(backgroundColorAffected,foregroundColorAffected); changeColors(backgroundColorAffected,foregroundColorAffected);
resolutionButton.setEnabled(false); resolutionButton.setEnabled(false);
// Switch depending on the dynamic type of s // Switch depending on the dynamic type of s is no option
markAffected(s); if(s instanceof PrecedenceToInsert){
markAffected((PrecedenceToInsert)s);
}
else{
markAffected((ReordersToDo) s);
}
return true; return true;
} else { } else {
...@@ -447,9 +452,6 @@ class ConflictPanel extends Composite { ...@@ -447,9 +452,6 @@ class ConflictPanel extends Composite {
} }
} }
private void markAffected(ResolutionStrategy s){
throw new IllegalArgumentException("expected precedence or reorder");
}
private void markAffected(PrecedenceToInsert pti){ private void markAffected(PrecedenceToInsert pti){
if(pti.isResolvedInFavorOfReduce(srdetails)){ if(pti.isResolvedInFavorOfReduce(srdetails)){
...@@ -751,7 +753,7 @@ class ConflictPanel extends Composite { ...@@ -751,7 +753,7 @@ class ConflictPanel extends Composite {
} }
if(conflict instanceof ShiftReduceConflict){ if(conflict instanceof ShiftReduceConflict){
resolutionBoxSelectedSR();
} }
else { else {
......
...@@ -159,7 +159,7 @@ class PrecedenceToInsert extends GraphHelper<terminal> implements ResolutionStra ...@@ -159,7 +159,7 @@ class PrecedenceToInsert extends GraphHelper<terminal> implements ResolutionStra
addedHigher = true; addedHigher = true;
} }
if(originalEdge.getFirst().equals(higher)){ if(originalEdge != null && originalEdge.getFirst() != null && originalEdge.getFirst().equals(higher)){
// We know the for original edge u->v that u is present since u == higher // We know the for original edge u->v that u is present since u == higher
// This is a guarantee for cyclic but we let the algorithm run anyway in order to give the user // This is a guarantee for cyclic but we let the algorithm run anyway in order to give the user
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment