Commit 5cb54e48 authored by Sebastian Pretscher's avatar Sebastian Pretscher

Enhanced SearchAlgo/Presentation for ConflictView

parent a2e434c1
......@@ -259,15 +259,26 @@ public class CupReduceGraphView implements ICupParserLaLrChangeObserver,
}
public void reloadGraph() {
LayoutAlgorithm layout = new CompositeLayoutAlgorithm(
LayoutStyles.NO_LAYOUT_NODE_RESIZING, new LayoutAlgorithm[] {
new GridLayoutAlgorithm(
LayoutStyles.NO_LAYOUT_NODE_RESIZING),
new HorizontalShift(
LayoutStyles.NO_LAYOUT_NODE_RESIZING) // ,
// new GridLayoutAlgorithm(
// LayoutStyles.NO_LAYOUT_NODE_RESIZING)
});
LayoutAlgorithm layout = null;
if (nodeModel.getNodes().size() <= 40) {
layout = new CompositeLayoutAlgorithm(
LayoutStyles.NO_LAYOUT_NODE_RESIZING,
new LayoutAlgorithm[] {
new GridLayoutAlgorithm(
LayoutStyles.NO_LAYOUT_NODE_RESIZING),
new HorizontalShift(
LayoutStyles.NO_LAYOUT_NODE_RESIZING),
new GridLayoutAlgorithm(
LayoutStyles.NO_LAYOUT_NODE_RESIZING) });
} else {
layout = new CompositeLayoutAlgorithm(
LayoutStyles.NO_LAYOUT_NODE_RESIZING,
new LayoutAlgorithm[] {
new GridLayoutAlgorithm(
LayoutStyles.NO_LAYOUT_NODE_RESIZING),
new HorizontalShift(
LayoutStyles.NO_LAYOUT_NODE_RESIZING) });
}
graphViewer.setLayoutAlgorithm(layout, true);
graphViewer.applyLayout();
synchronized (CupReduceGraphView.modelBuildLock) {
......@@ -394,12 +405,15 @@ public class CupReduceGraphView implements ICupParserLaLrChangeObserver,
rebuildJob.cancel();
}
rebuildJob = new ModelRebuildJob(model, lalrResult,
lalrContext, connections, nodes, nodeMap, reduceGraphView);
lalrContext, connections, nodes, nodeMap,
reduceGraphView);
rebuildJob.setSystem(false);
IProgressService progressService = PlatformUI.getWorkbench().getProgressService();
progressService.showInDialog(Display.getCurrent().getActiveShell(), rebuildJob);
IProgressService progressService = PlatformUI.getWorkbench()
.getProgressService();
progressService.showInDialog(Display.getCurrent()
.getActiveShell(), rebuildJob);
rebuildJob.schedule();
}
/*
......@@ -540,10 +554,11 @@ public class CupReduceGraphView implements ICupParserLaLrChangeObserver,
}
}
}
ModelRebuildJobFinished job = new ModelRebuildJobFinished(reduceGraphView);
ModelRebuildJobFinished job = new ModelRebuildJobFinished(
reduceGraphView);
job.setSystem(true);
job.schedule();
return Status.OK_STATUS;
}
......
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