}
private Action refreshAction(final UniversalEditor uditor) {
Action it = new Action("Refresh") {
public void run() {
UniversalEditor editor = uditor;
if (editor == null) {
IEditorPart ed = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
if (ed == null) return;
// System.err.println(ed.getClass().getName());
if (ed instanceof UniversalEditor)
editor = (UniversalEditor) ed;
else return;
}
final UniversalEditor theEditor = editor;
// editor is not null
try {
if (!editor.isEditable()) return;
IParseController pc = editor.getParseController();
if (pc == null || !(pc instanceof FregeParseController)) return;
final FregeParseController fpc = (FregeParseController) pc;
TGlobal global = fpc.getCurrentAst();
if (global == null) return;
// global.mem$sub.mem$cache.put(TTree.DNil.it);
// fpc.global = FregeParseController.runSTG(action, global);
final IDocument document= editor.
getDocumentProvider().
getDocument(editor.getEditorInput());
fpc.resetHash();
fpc.msgHandler.clearMessages();
theEditor.removeParserAnnotations();
document.replace(0,1, document.get(0, 1));
}
catch (Exception e) {
// e.printStackTrace();
}