protected void configureModelListener() { modelListener = new IXtextModelListener() { public void modelChanged(XtextResource resource) { try { scheduleRefresh(); } catch (Throwable t) { LOG.error("Error refreshing outline", t); } } }; xtextDocument.addModelListener(modelListener); }