Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Hybrid .target + targlet project
Hybrid .target + targlet project [message #1760728] Tue, 02 May 2017 12:42 Go to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 275
Registered: December 2015
Senior Member
Hi,

Is there a way that I can use Targlets to add to the target platform of a project that uses a .target definition as its core target platform specification mechanism?

I have a project that uses a .target definition which I cannot change. I think this .target definition lacks some 'development' utilities, say for example swt spy or git.

I would like to keep using the .target file but add to it with targlets. Some component would probably need to translate the .target into a targlet model and combine this model with my native targlets defined in the oomph setup. Currently that component is me, converting the target to targlet by hand which is a pita, especially since the .target changes quite often.
Re: Hybrid .target + targlet project [message #1760764 is a reply to message #1760728] Tue, 02 May 2017 16:40 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 29551
Registered: July 2009
Senior Member
You can drag a .target file onto a Targlet Task...
Re: Hybrid .target + targlet project [message #1760895 is a reply to message #1760764] Thu, 04 May 2017 07:42 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 275
Registered: December 2015
Senior Member
And how awesome is that! Thank you.
Re: Hybrid .target + targlet project [message #1779040 is a reply to message #1760895] Fri, 29 December 2017 23:02 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 275
Registered: December 2015
Senior Member
Hi,

So, the .target file changes often, and I have several branches too.. So I really think that either I shouldn't do this conversion at all, or I should do it automatically.

Do you think it could be possible that I write a custom task which adds to the targlet container automatically? Maybe adding a flag to the Target platform task "Merge into Modular Target", or by adding an annotation on a targlet container?



Re: Hybrid .target + targlet project [message #1779043 is a reply to message #1779040] Sat, 30 December 2017 09:37 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 29551
Registered: July 2009
Senior Member
Oomph can generate the .target file as a side-effective of resolving the Targlet. It uses annotations for that. You can see an example of that in Oomph.setup. Wouldn't that be better?
Re: Hybrid .target + targlet project [message #1779047 is a reply to message #1779043] Sat, 30 December 2017 23:59 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 275
Registered: December 2015
Senior Member
It would totally be better this way, but it's sadly not my competence. Either I do target->targlet or I ditch the targlet format completely and rely on target task instead and lose all the cool things that targlets offer.
Re: Hybrid .target + targlet project [message #1779049 is a reply to message #1779047] Sun, 31 December 2017 04:46 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 29551
Registered: July 2009
Senior Member
It's pretty trivial like this on one of the Targlets of any Targlet Task:
<?xml version="1.0" encoding="UTF-8"?>
<base:Annotation
    xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:base="http://www.eclipse.org/oomph/base/1.0"
    source="http:/www.eclipse.org/oomph/targlets/TargetDefinitionGenerator">
  <detail key="location">
    <value>${git.clone.oomph.location/releng/org.eclipse.oomph.parent/tp/org.eclipse.oomph.tp.target}</value>
  </detail>
  <detail key="extraUnits">
    <value>org.eclipse.equinox.executable.feature.group</value>
  </detail>
  <detail key="singleLocation">
    <value>true</value>
  </detail>
  <detail key="includeAllPlatforms">
    <value>false</value>
  </detail>
  <detail key="includeSource">
    <value>true</value>
  </detail>
</base:Annotation>
Of course you have to modify this to use the location in your clone where the *.target is located, but that's it. It would also be possible to using the ${eclipse.target.platform} variable (or whatever variable you're using to choose the repository list) to generated different *.target files for different TP choices.

You can also drag and drop a *.target file onto a Targlet Task, so given that, it should be possible in principle to convert it on the fly.
Previous Topic:File does not contain a valid product
Next Topic:Does Eclipse Installer perform automatic updates?
Goto Forum:
  


Current Time: Tue Sep 25 10:00:57 GMT 2018

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

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

Back to the top