Commit 5627ee50 authored by Michael Schwarz's avatar Michael Schwarz

further cleanup

parent b60192a1
......@@ -505,14 +505,14 @@ class ConflictPanel extends Composite {
// The user wants to shift, but shifting affects other conflicts
if(srdetails.shiftAffectsOthers && resolutionOptions.getSelectionIndex() == 1){
cupConflictsView.beginConnectedResolution();
cupConflictsView.add(srdetails.shift,srdetails.reduce);
cupConflictsView.addFirstPrecedence(srdetails.shift,srdetails.reduce);
return;
}
// The user wants to reduce, but reduce affects other conflicts
if(srdetails.reduceAffectsOthers && resolutionOptions.getSelectionIndex() == 2){
cupConflictsView.beginConnectedResolution();
cupConflictsView.add(srdetails.reduce,srdetails.shift);
cupConflictsView.addFirstPrecedence(srdetails.reduce,srdetails.shift);
return;
}
......@@ -528,11 +528,11 @@ class ConflictPanel extends Composite {
if(srdetails.shiftAffectsOthers){
if(resolutionOptions.getSelectionIndex() == 1) { //Shift
forceEnableDropdown = true;
cupConflictsView.setAssoc(srdetails.shift,Precedence.Type.Right);
cupConflictsView.setTerminalAssoc(srdetails.shift,Precedence.Type.Right);
}
else if (resolutionOptions.getSelectionIndex() == 2) { // Reduce
forceEnableDropdown = true;
cupConflictsView.setAssoc(srdetails.shift,Precedence.Type.Left);
cupConflictsView.setTerminalAssoc(srdetails.shift,Precedence.Type.Left);
}
}
else {
......@@ -564,11 +564,11 @@ class ConflictPanel extends Composite {
// We need to insert a assoc
if(resolutionOptions.getSelectionIndex() == 1) { //Shift
forceEnableDropdown = true;
cupConflictsView.setAssoc(srdetails.shift,Precedence.Type.Right);
cupConflictsView.setTerminalAssoc(srdetails.shift,Precedence.Type.Right);
}
else if (resolutionOptions.getSelectionIndex() == 2) { // Reduce
forceEnableDropdown = true;
cupConflictsView.setAssoc(srdetails.shift,Precedence.Type.Left);
cupConflictsView.setTerminalAssoc(srdetails.shift,Precedence.Type.Left);
}
}
else {
......
......@@ -319,7 +319,7 @@ public class CupConflictsView extends FailableView implements ICupEditorPageVisi
}
}
void add(terminal t,terminal other){
void addFirstPrecedence(terminal t,terminal other){
currentPrecs.add(t,other);
markAllAffected();
}
......@@ -329,12 +329,11 @@ public class CupConflictsView extends FailableView implements ICupEditorPageVisi
markAllAffected();
}
void setAssoc(terminal t,Precedence.Type p){
void setTerminalAssoc(terminal t,Precedence.Type p){
currentPrecs.setAssoc(t, p);
markAllAffected();
}
void beginConnectedResolution(){
Shell shell = new Shell(Display.getCurrent());
MessageBox box = new MessageBox(shell,SWT.ICON_WARNING | SWT.OK);
......
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