Problem with isJavaEnabled() [message #1490775] |
Fri, 28 November 2014 12:34 |
|
The Geppetto product is built on Xtext but it does not include JDT. Geppetto may also be installed into an Eclipse IDE but unless Xtext is already installed there it won't work very well. Here's why:
The product includes a feature where the following is included:
- The Eclipse platform
- The Xtext plug-ins needed by Geppetto
- The Geppetto feature
The problem is that when we don't use the product but instead installs the feature #3 into an Eclipse IDE, then Xtext detects that java is enabled. This in turn results in that the SharedContributionWithJDT will make an attempt to bind the class JdtQueuedBuildData which in turn references JavaBuilderState which we neither provide nor depend on. Consequently it has not been installed by p2.
In short, when 'isJavaEnabled()' returns true the xtext requirements change. Bundles marked as optional become required and our bundles fail to start. I don't know what the best solution is for this and any advice would be welcome:
- We can tell our users that in order to install Geppetto into an IDE, they need to install additional Xtext features first because the IDE has the JDK installed and that in turn increases the requirements from Xtext beyond what our feature actually requires.
- We can provide an additional feature that includes the xtext bundles that are no longer optional when the JDK is present and tell users that they need to install that too.
None of the above strikes me as an ideal solution. I think we would need a way to influence the SharedContributionWithJDT module and prevent it from binding even when java is enabled.
|
|
|
|
Re: Problem with isJavaEnabled() [message #1495647 is a reply to message #1495613] |
Tue, 02 December 2014 11:38 |
|
Hi Matthieu,
Thanks for the info about filtering optional plug-ins. We're using Buckminster for the builds and optional plug-ins isn't a problem for us. The problem occurs when we omit optional plug-ins that then become required at runtime when the JDT is detected.
Our current solution is to provide two features. One that is slimmed down to a bare minimum intended for the product where no JDT is present and another for installation in the Eclipse IDE. The latter requires the org.eclipse.xtext.ui feature which in turn ensures that all optional stuff is brought in.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03240 seconds