0

I am writing an editor based on xtext. (v 2.2.1)(Eclipse Indigo) I have a class that extends DefaultLinkingServic and overrides the method: public List getLinkedObjects(EObject context, EReference ref, INode node) throws IllegalNodeException. The method throws IllegalNodeException when an object cannot be resolved. When the exception is thrown (and it should be thrown) the error is not only written to the error log, but it causes a popup window to appear with the error:

An internal error occurred during: "Xtext validation". org.eclipse.xtext.linking.impl.IllegalNodeException: Action App.f is not applicable for the specified arguments.

This is very problematic especiallyif the file has multiple errors which makes it impossible to edit anything in the editor, since the popup repeatedly appears on screen.

This problem is consistent in several IDE's but in others is not reproducible.

Any help would be greatly appreciated.

1 Answers1

0

You are stumbling accross this bug which was already fixed for 2.3 (due June). As a workaround, you may want to bind a custom implementation of the LazyLinkingResource and catch the IllegalNodeException in #getEObject. Alternativley you could return an empty list from your custom LinkingService instead of raising an IllegalNodeException.

Sebastian Zarnekow
  • 6,609
  • 20
  • 23