3

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?

Aaron Digulla
  • 321,842
  • 108
  • 597
  • 820
  • What exactly do you mean by 'updated'? Did you install new versions of the XText plugins into an 'old' Eclipse? And did you regenerate the XText parser with the new version? – tobias_k Sep 17 '12 at 20:12
  • I updated the plugins in my target platform (replaced them with the versions from the archived update site and then ran the p2 tools to create new artifact/content jars). I then installed Eclipse again using this target platform, so the platform and Eclipse use the same plugins. I did regenerate the parser. As I said: The parser works. **My problem is that I can't create a working launch configuration.** – Aaron Digulla Sep 18 '12 at 08:46
  • Probably you have either already tried this, or you have good reasons not to, but anyway: 1) Does the problem also occur when installing XText 2.3 into a 'fresh' Eclipse instead of updating from an earlier version? 2) Can you start the application by right-clicking your XText project and selecting 'Run as Eclipse Application' instead of modifying the old starter? – tobias_k Sep 18 '12 at 18:37
  • @tobias_k: 1) With my target repo, I can't update an existing Eclipse installation (it always produces p2 errors that I can't fix), so this is a clean installation. 2) I'll try that. – Aaron Digulla Sep 19 '12 at 10:26
  • Guess I misunderstood that bit about updating then. ;-) About that Run-As-Eclipse-Application: Just tried this myself, and Eclipse persistently used the old starter instead of creating a new one, so you might have to rename or even delete your existing starter before trying this... – tobias_k Sep 19 '12 at 10:59
  • Okay, creating a new launch config works; I guess I'll accept that as an answer even though I'd prefer to know what's wrong with the broken config – Aaron Digulla Sep 19 '12 at 12:21
  • 1
    Well, I guess the main thing is that it works again, but I have to admit that "create a new launcher" is hardly worth the bounty... Maybe if you wait a few days, you'll still get something better. Guess I'll jot this down as an answer then, at least for now. – tobias_k Sep 19 '12 at 12:49

1 Answers1

0

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.

tobias_k
  • 81,265
  • 12
  • 120
  • 179