EditorState.getAnalyzedAST() returns null
Seems like the problem is that it invokes the following superclass constructor which does not initialize things properly (note the null values):
protected FileState(Descriptor descriptor) {
this(descriptor, null, null); // HACK: subclass don’t use these
}Should this constructor disappear?
Submitted by Oskar van Rest on 3 June 2013 at 17:28
I tried invoking FileState’s ‘proper’ constructor and then things work fine.
Issue Log
I don’t think that’s where this problem comes from. If you look at
getAnalyzedAST()
you can notice that it doesn’t actually use those fields. TheEditorState
class gets the parse controller from the editor.
I see. But
getAnalyzedAST()
also callsgetResource()
which isn’t overridden and therefore returnsnull
.Would you suggest overriding this method as well? For example:
@Override public IResource getResource() { return getParseController().getResource(); }
fixed
Log in to post comments