Commit 2f50ba33 authored by Benedikt Engeser's avatar Benedikt Engeser

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

parents 228e3f81 e3877096
......@@ -62,7 +62,7 @@ public class LALRResult {
System.out.println("*** More conflicts encountered than expected " +
"-- parser generation aborted");
return null;
return result;
}
return result;
......
......@@ -140,6 +140,8 @@ public class DocumentDidChangeJob extends Job {
e.printStackTrace();
}
//errorReporter.pushToUIThread();
// TODO
// errorReporter.pushToUIThread();
......@@ -149,9 +151,16 @@ public class DocumentDidChangeJob extends Job {
revNumber);
resultModelJob.setSystem(true);
resultModelJob.schedule();
try {
resultModelJob.join();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} else {
return Status.CANCEL_STATUS;
}
}
/*
......@@ -178,6 +187,12 @@ public class DocumentDidChangeJob extends Job {
LaLrResultJob resultLaLrModelJob = new LaLrResultJob(lalrResult, revNumber, context);
resultLaLrModelJob.setSystem(true);
resultLaLrModelJob.schedule();
try {
resultLaLrModelJob.join();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} else {
return Status.CANCEL_STATUS;
}
......
package de.tum.in.www2.cupplugin.editors;
public interface CupEditorPageVisibility {
public void willBecomeVisible();
public void becameHidden();
}
......@@ -41,12 +41,14 @@ public class MultiPageEditor extends MultiPageEditorPart implements
private CupOverviewView overviewView;
private CupActionTableView actionTableView;
private CupReduceTableView reduceTableView;
private CupConflictGraphView conflictGraphView;
private final int OVERVIEW_PAGE_INDEX = 0;
private final int EDITOR_PAGE_INDEX = 1;
private final int GRAPH_PAGE_INDEX = 2;
private final int ACTION_TABLE_PAGE_INDEX = 3;
private final int REDUCE_TABLE_PAGE_INDEX = 4;
private final int CONFLICT_GRAPH_PAGE_INDEX = 5;
private int previousPageIndex = EDITOR_PAGE_INDEX;
......@@ -116,12 +118,22 @@ public class MultiPageEditor extends MultiPageEditorPart implements
setPageText(REDUCE_TABLE_PAGE_INDEX, "Reduce Table");
}
void createConflictGraphPage() {
Composite composite = new Composite(getContainer(), SWT.NONE);
IDocument doc = editor.getDocumentProvider().getDocument(
editor.getEditorInput());
conflictGraphView = new CupConflictGraphView(composite, doc);
addPage(CONFLICT_GRAPH_PAGE_INDEX, composite);
setPageText(CONFLICT_GRAPH_PAGE_INDEX, "Conflict Graph");
}
protected void createPages() {
createEditorPage();
createOverviewPage();
createGraphPage();
createActionTablePage();
createReduceTablePage();
createConflictGraphPage();
setActivePage(previousPageIndex);
}
......@@ -178,8 +190,10 @@ public class MultiPageEditor extends MultiPageEditorPart implements
actionTableView.becameHidden();
break;
case REDUCE_TABLE_PAGE_INDEX:
reduceTableView.becameHidden();
reduceTableView.becameHidden();
break;
case CONFLICT_GRAPH_PAGE_INDEX:
conflictGraphView.becameHidden();
break;
}
switch (newPageIndex) {
......@@ -196,6 +210,9 @@ public class MultiPageEditor extends MultiPageEditorPart implements
case REDUCE_TABLE_PAGE_INDEX:
reduceTableView.willBecomeVisible();
break;
case CONFLICT_GRAPH_PAGE_INDEX:
conflictGraphView.willBecomeVisible();
break;
}
previousPageIndex = newPageIndex;
super.pageChange(newPageIndex);
......
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