A nullpointer exception sometimes arises when formatting error messages to be shown in the refactoring dialog.

The problem seems to be that the getLeftToken fails (even though the error term VarDecl("x") in (VarDecl("x"), "duplicate declaration") has an origin term). However, most important is that the problem does not let the whole refactoring operation fail.

Caused by: java.lang.NullPointerException
at org.spoofax.jsglr.client.imploder.ImploderAttachment.getLeftToken(ImploderAttachment.java:108)
at org.strategoxt.imp.runtime.services.StrategoRefactoring.formatErrorMessage(StrategoRefactoring.java:287)
at org.strategoxt.imp.runtime.services.StrategoRefactoring.updateStatus(StrategoRefactoring.java:242)
at org.strategoxt.imp.runtime.services.StrategoRefactoring.checkFinalConditions(StrategoRefactoring.java:221)
at org.eclipse.ltk.core.refactoring.CheckConditionsOperation.run(CheckConditionsOperation.java:85)
at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run(CreateChangeOperation.java:121)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Submitted by Maartje on 2 September 2013 at 18:15

On 2 September 2013 at 18:15 Maartje tagged refactoring

Log in to post comments