Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Feature-based RCP Product: com.google.guava - which feature?(Going from a plugin-based RCP product to a feature-based product leads to validation failure (Missing Constraint))
Feature-based RCP Product: com.google.guava - which feature? [message #1706388] Wed, 26 August 2015 13:34 Go to next message
Robert Hilbrich is currently offline Robert HilbrichFriend
Messages: 1
Registered: August 2015
Junior Member
I have a working and deployable version of a plugin-based product file for my tool. Now I would like to switch to a feature-based product - in order to achieve a tycho build & root files.

My RCP application now comprises 4 features, one of those features contains the Xtext plugins (called MappingDsl here). The feature.xml looks like the following:

<?xml version="1.0" encoding="UTF-8"?>
<feature
      id="ch.hilbri.assist.features.mapping"
      label="Mapping"
      version="2.0.0.qualifier"
      os="linux,macosx,win32"
      ws="cocoa,gtk,win32"
      arch="x86_64">

   <license url="">
      GPL
   </license>

   <requires>
      <import plugin="ch.hilbri.assist.application" version="2.0.0" match="greaterOrEqual"/>
      <import plugin="ch.hilbri.assist.datamodel.model" version="2.0.0" match="greaterOrEqual"/>
      <import plugin="ch.hilbri.assist.datamodel.model.edit" version="2.0.0" match="greaterOrEqual"/>
      <import plugin="ch.hilbri.assist.datamodel.model.editor" version="2.0.0" match="greaterOrEqual"/>
      <import plugin="ch.hilbri.assist.datamodel.result.mapping" version="2.0.0" match="greaterOrEqual"/>
      <import plugin="ch.hilbri.assist.mappingdsl.ui" version="2.0.0" match="greaterOrEqual"/>
      <import plugin="ch.hilbri.assist.libraries.javafx" version="1.8.60" match="greaterOrEqual"/>
      <import plugin="ch.hilbri.assist.libraries.math" version="3.2.1" match="greaterOrEqual"/>
      <import plugin="ch.hilbri.assist.libraries.jxl" version="2.6.12" match="greaterOrEqual"/>
      <import plugin="ch.hilbri.assist.libraries.choco" version="3.3.1" match="greaterOrEqual"/>
      <import plugin="ch.hilbri.assist.libraries.logback" version="1.1.2" match="greaterOrEqual"/>
      <import plugin="javax.inject" version="1.0.0" match="greaterOrEqual"/>
      <import plugin="org.eclipse.core.databinding" version="1.5.0" match="greaterOrEqual"/>
      <import plugin="org.eclipse.e4.core.di" version="1.5.0" match="greaterOrEqual"/>
      <import plugin="org.eclipse.e4.core.services" version="2.0.0" match="greaterOrEqual"/>
      <import plugin="org.eclipse.e4.ui.di" version="1.1.0" match="greaterOrEqual"/>
      <import plugin="org.eclipse.e4.ui.model.workbench" version="1.1.100" match="greaterOrEqual"/>
      <import plugin="org.eclipse.e4.ui.workbench" version="1.3.0" match="greaterOrEqual"/>
      <import plugin="org.eclipse.jdt.core" version="3.11.0" match="greaterOrEqual"/>
      <import plugin="org.eclipse.jdt.ui" version="3.11.0" match="greaterOrEqual"/>
      <import plugin="org.eclipse.ui.forms" version="3.6.200" match="greaterOrEqual"/>
      <import plugin="org.eclipse.zest.core" version="1.5.200" match="greaterOrEqual"/>
      <import plugin="org.eclipse.zest.layouts" version="1.1.200" match="greaterOrEqual"/>
      <import plugin="org.eclipse.xtext.ui" version="2.8.4" match="greaterOrEqual"/>
      <import plugin="org.eclipse.ui.workbench" version="3.107.0" match="greaterOrEqual"/>
      <import plugin="ch.hilbri.assist.mapping" version="2.0.0" match="greaterOrEqual"/>
      <import plugin="ch.hilbri.assist.mappingdsl" version="2.0.0" match="greaterOrEqual"/>
      <import plugin="ch.hilbri.assist.mappingdsl.tests" version="2.0.0" match="greaterOrEqual"/>
      <import plugin="org.junit" version="4.12.0" match="greaterOrEqual"/>
      <import plugin="org.eclipse.xtext.junit4" version="2.8.4" match="greaterOrEqual"/>
      <import plugin="org.eclipse.core.runtime" version="3.11.0" match="greaterOrEqual"/>
      <import plugin="ch.qos.logback.classic"/>
      <import plugin="org.eclipse.xtext" version="2.8.4" match="greaterOrEqual"/>
      <import plugin="org.eclipse.emf.ecore.xcore" version="1.3.1" match="greaterOrEqual"/>
      <import plugin="org.eclipse.xtext.util" version="2.8.4" match="greaterOrEqual"/>
      <import plugin="org.eclipse.emf.ecore" version="2.11.1" match="greaterOrEqual"/>
      <import plugin="org.eclipse.emf.common" version="2.11.0" match="greaterOrEqual"/>
      <import plugin="org.antlr.runtime" version="3.2.0" match="compatible"/>
      <import plugin="org.eclipse.xtext.common.types" version="2.8.4" match="greaterOrEqual"/>
      <import plugin="org.eclipse.xtext.xbase.lib" version="2.8.4" match="greaterOrEqual"/>
      <import plugin="org.apache.log4j"/>
      <import plugin="org.hamcrest.core"/>
      <import plugin="org.eclipse.ui.editors" version="3.9.0" match="greaterOrEqual"/>
      <import plugin="org.eclipse.ui.ide" version="3.11.0" match="greaterOrEqual"/>
      <import plugin="org.eclipse.xtext.ui.shared" version="2.8.4" match="greaterOrEqual"/>
      <import plugin="org.eclipse.ui" version="3.107.0" match="greaterOrEqual"/>
      <import plugin="org.eclipse.xtext.builder" version="2.8.4" match="greaterOrEqual"/>
      <import plugin="org.eclipse.xtext.common.types.ui" version="2.8.4" match="greaterOrEqual"/>
      <import plugin="org.eclipse.xtext.ui.codetemplates.ui" version="2.8.4" match="greaterOrEqual"/>
      <import plugin="org.eclipse.compare" version="3.5.600" match="greaterOrEqual"/>
   </requires>

   <plugin
         id="ch.hilbri.assist.mapping"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="ch.hilbri.assist.mapping.tests"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="ch.hilbri.assist.mappingdsl"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="ch.hilbri.assist.mappingdsl.tests"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="ch.hilbri.assist.mappingdsl.ui"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

</feature>


Those features are now combined in a product definition file:

<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>

<product name="ASSIST" uid="assist" id="ch.hilbri.assist.application.assist_product" application="ch.hilbri.assist.application.application" version="2.0.0.qualifier" useFeatures="true" includeLaunchers="true">

   <configIni use="default">
   </configIni>

   <launcherArgs>
      <vmArgs>-Xms1024m
-Xmx4096m
      </vmArgs>
      <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts
      </vmArgsMac>
   </launcherArgs>

   <windowImages i16="/ch.hilbri.assist.application/icons/ASSIST-icon-16x16.png" i32="/ch.hilbri.assist.application/icons/ASSIST-icon-32x32.png" i48="/ch.hilbri.assist.application/icons/ASSIST-icon-48x48.png" i64="/ch.hilbri.assist.application/icons/ASSIST-icon-64x64.png" i128="/ch.hilbri.assist.application/icons/ASSIST-icon-128x128.png" i256="/ch.hilbri.assist.application/icons/ASSIST-icon-256x256.png"/>

   <splash
      location="ch.hilbri.assist.application" />
   <launcher name="ASSIST">
      <linux icon="icons/icon.xpm"/>
      <solaris/>
      <win useIco="true">
         <ico path="icons/launcher.ico"/>
         <bmp/>
      </win>
   </launcher>

   <vm>
      <linux include="true">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7</linux>
      <macos include="false">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8</macos>
      <windows include="true">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8</windows>
   </vm>

   <plugins>
   </plugins>

   <features>
      <feature id="ch.hilbri.assist.features.application" version="2.0.0.qualifier"/>
      <feature id="ch.hilbri.assist.features.datamodel" version="2.0.0.qualifier"/>
      <feature id="ch.hilbri.assist.features.libraries" version="2.0.0.qualifier"/>
      <feature id="ch.hilbri.assist.features.mapping" version="2.0.0.qualifier"/>
      <feature id="org.eclipse.e4.rcp" version="1.4.0.v20150603-0857"/>
      <feature id="org.eclipse.emf.ecore"/>
      <feature id="org.eclipse.emf.common"/>
      <feature id="org.eclipse.rcp" version="4.5.0.v20150603-2331"/>
      <feature id="org.eclipse.platform" version="4.5.0.v20150603-2358"/>
      <feature id="org.eclipse.equinox.p2.user.ui"/>
      <feature id="org.eclipse.ecf.filetransfer.httpclient4.feature"/>
      <feature id="org.eclipse.help"/>
      <feature id="org.eclipse.ecf.filetransfer.httpclient4.ssl.feature"/>
      <feature id="org.eclipse.equinox.p2.extras.feature"/>
      <feature id="org.eclipse.equinox.p2.core.feature"/>
      <feature id="org.eclipse.ecf.core.feature"/>
      <feature id="org.eclipse.equinox.p2.rcp.feature"/>
      <feature id="org.eclipse.ecf.filetransfer.feature"/>
      <feature id="org.eclipse.ecf.core.ssl.feature"/>
      <feature id="org.eclipse.ecf.filetransfer.ssl.feature"/>
      <feature id="org.eclipse.jdt" version="3.11.0.v20150603-2000"/>
      <feature id="org.eclipse.zest" version="1.6.0.201506010206"/>
      <feature id="org.eclipse.xtext.ui" version="2.8.4.v201508050135"/>
      <feature id="org.eclipse.draw2d"/>
      <feature id="org.eclipse.xtext.runtime"/>
   </features>

   <configurations>
      <plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
      <plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="2" />
      <plugin id="org.eclipse.equinox.event" autoStart="true" startLevel="2" />
      <plugin id="org.eclipse.equinox.p2.reconciler.dropins" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />
   </configurations>

   <preferencesInfo>
      <targetfile overwrite="false"/>
   </preferencesInfo>

   <cssInfo>
   </cssInfo>

</product>


After adding
org.eclipse.xtext.runtime
as a dependency, the validation fails and requires bundles like
com.google.guava
and
com.google.inject
. I cannot find these bundles in any of the features being presented for selection (when I hit "Add").

The plugin-based product works fine. Tycho-build with this feature-based product works fine. But validation fails and I am unable to start the PDE build, i.e. start the RCP application by clicking on the "Overview - Launch an Eclipse Application" link. Where can I get the missing dependency? Btw, those bundles are present in my target platform - I checked.
Re: Feature-based RCP Product: com.google.guava - which feature? [message #1706426 is a reply to message #1706388] Wed, 26 August 2015 19:01 Go to previous messageGo to next message
Stefan Oehme is currently offline Stefan OehmeFriend
Messages: 159
Registered: April 2010
Location: Kiel
Senior Member

Hi Robert,

there is no feature containing these plugins, you need to add them to one of your own features.

Cheers,
Stefan
Re: Feature-based RCP Product: com.google.guava - which feature? [message #1706428 is a reply to message #1706388] Wed, 26 August 2015 19:06 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14669
Registered: July 2009
Senior Member
how does your target platform look like? you may have a look at https://github.com/eclipse/xtext/blob/master/releng/org.eclipse.xtext.releng/target-platforms/developer-mars.target does it work if you git add required in the launch config?

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Wed, 26 August 2015 19:15]

Report message to a moderator

Previous Topic:Support of semantic predicates
Next Topic:Problem with virtual resource
Goto Forum:
  


Current Time: Fri Apr 26 23:22:09 GMT 2024

Powered by FUDForum. Page generated in 0.03354 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top