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 {
changeColors(backgroundColorAffected,foregroundColorAffected);
resolutionButton.setEnabled(false);
// Switch depending on the dynamic type of s
markAffected(s);
// Switch depending on the dynamic type of s is no option
if(s instanceof PrecedenceToInsert){
markAffected((PrecedenceToInsert)s);
}
else{
markAffected((ReordersToDo) s);
}
return true;
} else {
......@@ -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){
if(pti.isResolvedInFavorOfReduce(srdetails)){
......@@ -751,7 +753,7 @@ class ConflictPanel extends Composite {
}
if(conflict instanceof ShiftReduceConflict){
resolutionBoxSelectedSR();
}
else {
......
......@@ -159,7 +159,7 @@ class PrecedenceToInsert extends GraphHelper<terminal> implements ResolutionStra
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
// 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