Commit b828a0ec authored by Michael Schwarz's avatar Michael Schwarz

disable going back to choose option dropdown if in resolution of

connected conflict
parent 97d089f9
......@@ -263,7 +263,11 @@ public class CupConflictsView extends FailableView implements ICupEditorPageVisi
return true;
}
toCheck.addAll(edges.get(over));
toCheck.addAll(speculativeEdges.get(over));
// We need to consider those as well
if(speculativeEdges.get(over) != null){
toCheck.addAll(speculativeEdges.get(over));
}
// TODO:Sure ?
if(toCheck.size() == 0){
......@@ -289,9 +293,6 @@ public class CupConflictsView extends FailableView implements ICupEditorPageVisi
}
public void setAssoc(terminal t,Precedence.Type p){
if(precs.get(t) != Precedence.Type.NoPrec){
throw new IllegalStateException();
}
precs.put(t, p);
for(ConflictPanel c : conflictPanels){
......@@ -823,8 +824,14 @@ public class CupConflictsView extends FailableView implements ICupEditorPageVisi
return;
}
// We need to insert a assoc
if(partOfCurrentConnected && resolutionOptions.getSelectionIndex() == 0){
//Disallow switching back to the 'select what to do' item
markIfAffected(currentPrecs);
return;
}
if(srdetails.reduce.equals(srdetails.shift)){
// We need to insert a assoc
if(resolutionOptions.getSelectionIndex() == 1) { //Shift
forceEnableDropdown = true;
currentPrecs.setAssoc(srdetails.shift,Precedence.Type.Right);
......
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