Commit 0081a262 authored by Sebastian Pretscher's avatar Sebastian Pretscher

Some little changes

parent cf5649d5
......@@ -844,7 +844,6 @@ public class CupConflictGraphView extends FailableView implements
break;
}
}
}
}
......@@ -122,6 +122,9 @@ public class CupReduceGraphView extends FailableView
public CupReduceGraphView(Composite realParent, Jumper jumper, CupTextEditor editor) {
super(realParent);
showErrorNoParseTables();
Composite parent = getMain();
this.editor = editor;
Controller.getInstance(editor).registerObserver(this);
......@@ -365,6 +368,10 @@ public class CupReduceGraphView extends FailableView
}
}
private void showErrorNoParseTables() {
showError("Parse tables currently not available");
}
public void reloadGraph() {
synchronized (CupReduceGraphView.modelBuildLock) {
nodeFilter.getNodeList().clear();
......@@ -394,7 +401,13 @@ public class CupReduceGraphView extends FailableView
}
LALRResult lalrResult = model.getLaLrResult();
CupContext lalrContext = model.getLaLrContext();
nodeModel.rebuildModel(model, lalrResult, lalrContext, this);
if(lalrResult == null || lalrContext == null) {
showErrorNoParseTables();
} else {
nodeModel.rebuildModel(model, lalrResult, lalrContext, this);
showMain();
}
}
public AbstractZoomableViewer getGraphViewer() {
......@@ -1010,7 +1023,17 @@ public class CupReduceGraphView extends FailableView
@Override
public void jobStatusChanged(JobStatus status) {
// TODO Auto-generated method stub
if (status.hasFailed()) {
switch (status.getAffectedJob()) {
case buildTable:
showError("Failure while building tables...");
break;
case parseCode:
showError("Failure while parsing code...");
break;
default:
break;
}
}
}
}
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