Commit 0c73e62e authored by Benedikt Engeser's avatar Benedikt Engeser

Merge branch 'master' of git@github.com:jroith/cup-eclipse.git

parents 796a4658 bd5e24dd
......@@ -886,9 +886,10 @@ public class lalr_state {
shift_sym = itm.symbol_after_dot();
if (!shift_sym.is_non_term() && shift_sym.index() == conflict_sym)
{
/* yes, report on it */
conflictingItems.add(itm);
/* yes, report on it */
message += " and " + itm.to_simple_string()+"\n";
}
}
}
}
terminal.terminal_shared shared = terminal.getShared(context);
......
......@@ -266,15 +266,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) {
......@@ -401,12 +412,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();
}
/*
......@@ -547,10 +561,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