Pregunta

I have written an DSL plug-in using Xtext 2.2.1. After upgrading to Xtext 2.3.0, I cannot debug the related Eclipse Application (i.e. I'm using a launch config which is labeled "Eclipse Application" to start an instance with my DSL plug-in from within Eclipse) because of this error:

Error instantiating builder 'org.eclipse.xtext.ui.shared.xtextBuilder'.
Plug-in org.eclipse.xtext.ui.shared was unable to load class org.eclipse.xtext.ui.shared.internal.ExecutableExtensionFactory.
org/eclipse/xtext/ui/guice/AbstractGuiceAwareExecutableExtensionFactory

What I tried:

  1. I deselected all bundles from the target platform in the launch configuration, clicked "Add Required Plug-ins", tried again, same error.

  2. I made sure that org.eclipse.xtext.ui and org.eclipse.xtext.ui.shared version 2.3.0 are available in the plug-ins list and both are enabled.

  3. When I install the plug-in into my IDE, it works perfectly. I just can't launch an Eclipse Application from within the IDE.

"Validate Plug-ins" doesn't show any problems.

Any ideas how I can fix this?

¿Fue útil?

Solución

While this is neither an answer to the question, why the launcher stopped working, nor a way to fix the existing launcher, you should at least be able to get back to work by creating a new launcher. To do this, just select Run As > Eclipse Application from the context menu of the XText project. This way, Eclipse should handle the creation and configuration of the launcher for you.

Be sure that Eclipse actually creates a new launcher! If Eclipse finds an existing Eclipse Application launcher, it might use that one instead. You should at least rename the old launcher, so you can tell which one is used (shown at the top of the Console View). The new launcher will by default have the name "Eclipse Application". If Eclipse still uses the old launcher you may have to remove that launcher first.

If you want to find out what was wrong with the old launcher, or if that launcher was specifically configured and you want to preserve that configuration, this may help: Eclipse stores the launcher configurations in the directory .metadata/.plugins/org.eclipse.debug.core/.launches/ located in the workspace, so you could back up the old launcher and then compare it to the newly created one using some diff tool.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top