Commit 16caeb32 authored by Michael Schwarz's avatar Michael Schwarz

RR resolution

parent 092de795
......@@ -69,9 +69,11 @@ class ConflictPanel extends Composite {
private Color backgroundColorReduceReduce = new Color(Display.getCurrent(), Colors.conflictBgBlue);
private Color foregroundColorReduceReduce = new Color(Display.getCurrent(), Colors.conflictFgBlue);
private Color backgroundColorShiftReduce = new Color(Display.getCurrent(), Colors.conflictBgYellow);
private Color foregroundColorShiftReduce = new Color(Display.getCurrent(), Colors.conflictFgYellow);
private Color foregroundColorShiftReduce = new Color(Display.getCurrent(), Colors.conflictFgYellow);
private Color backgroundColorAffected = new Color(Display.getCurrent(), Colors.conflictBgRed);
private Color foregroundColorAffected = new Color(Display.getCurrent(), Colors.conflictFgRed);
private Color foregroundColorAffected = new Color(Display.getCurrent(), Colors.conflictFgRed);
private Color backgroundColorUnrelated = new Color(Display.getCurrent(), Colors.conflictBgGray);
private Color foregroundColorUnrelated = new Color(Display.getCurrent(), Colors.conflictFgGray);
......@@ -779,7 +781,7 @@ class ConflictPanel extends Composite {
}
}
if(resolutionOptions.getSelectionIndex() == 2){ // Reduce
if(resolutionOptions.getSelectionIndex() == 2){ // Reduce with 2
try {
cupConflictsView.setOrder(item2, item1);
} catch (OrderCyclicException e1) {
......
......@@ -560,7 +560,25 @@ public class CupConflictsView extends FailableView
}
}
private void applyConnectedResolutionRR(){
private void applyConnectedResolutionRR() {
try {
ReordersToDo rtd = (ReordersToDo) currentResolution;
List<lr_item_core> order = rtd.getItemsOrdered();
ReduceReduceReorder rrr = new ReduceReduceReorder(editor.getDocument(),isThresholdPresent());
for(lr_item_core item : order){
rrr.moveItemToVeryEnd(item);
}
rrr.apply();
} catch (OrderCyclicException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (BadLocationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
......
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