IErlElement element = null;
IErlProject project = null;
IErlModule module = null;
final IErlModel model = ErlangEngine.getInstance().getModel();
if (activeEditor instanceof AbstractErlangEditor) {
final AbstractErlangEditor editor = (AbstractErlangEditor) activeEditor;
textEditor = editor;
editor.reconcileNow();
final String scannerName = editor.getScannerName();
module = editor.getModule();
project = editor.getProject();
openResult = ErlangEngine
.getInstance()
.getService(OpenService.class)
.open(scannerName,
offset,
ErlangEngine.getInstance().getModelUtilService()
.getImportsAsList(module),
project.getProperties().getExternalModules(),
model.getPathVars(module.getCorrespondingResource()));
ErlLogger.debug("open " + openResult);
element = editor.getElementAt(offset, true);
} else if (activeEditor instanceof ITextEditor) {
textEditor = (ITextEditor) activeEditor;
final String text = textEditor.getDocumentProvider()
.getDocument(textEditor.getEditorInput()).get();
openResult = ErlangEngine.getInstance().getService(OpenService.class)