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?
I tried invoking FileState’s ‘proper’ constructor and then things work fine.

Submitted by Oskar van Rest on 3 June 2013 at 17:28

On 4 June 2013 at 12:03 Lennart Kats commented:

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. The EditorState class gets the parse controller from the editor.


On 4 June 2013 at 17:32 Oskar van Rest commented:

I see. But getAnalyzedAST() also calls getResource() which isn’t overridden and therefore returns null.

Would you suggest overriding this method as well? For example:

@Override
public IResource getResource() {
    return getParseController().getResource();
}

On 8 June 2013 at 06:49 Oskar van Rest commented:

fixed


On 8 June 2013 at 06:49 Oskar van Rest closed this issue.

Log in to post comments