Is there a way to create multiple targlet containers? [message #1417432] |
Fri, 05 September 2014 12:12 |
Alexander Nittka Messages: 1193 Registered: July 2009 |
Senior Member |
|
|
Hi,
I have the following scenario. I'd like my Xtext project to support older installations as well. The project started with Xtext 2.3 and it does not need fancy new stuff. So there is no reason to require newer versions. Hoever I would like to check, whether the plugins run with Xtext 2.6 etc as well.
I can have different target platform definitions (Juno with Xtext 2.3/2.6, Luna with 2.5 etc). However, I would like to take advantage of the bundle pool.
So is there a way to define different targlet containers, each having a different combination of Eclipse- and Xtext version? Switching between those should be faster than swithching between "normal" target definitions (where for each new installation the plugins are downloaded again and again).
Thanks for clarification or alternative approaches to the problem.
Alex
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext@itemis.de
|
|
|
Re: Is there a way to create multiple targlet containers? [message #1417459 is a reply to message #1417432] |
Fri, 05 September 2014 13:27 |
Ed Merks Messages: 33142 Registered: July 2009 |
Senior Member |
|
|
Alex,
Comments below.
On 05/09/2014 2:12 PM, Alexander Nittka wrote:
> Hi,
>
> I have the following scenario. I'd like my Xtext project to support
> older installations as well. The project started with Xtext 2.3 and it
> does not need fancy new stuff. So there is no reason to require newer
> versions. Hoever I would like to check, whether the plugins run with
> Xtext 2.6 etc as well.
>
> I can have different target platform definitions (Juno with Xtext
> 2.3/2.6, Luna with 2.5 etc). However, I would like to take advantage
> of the bundle pool.
>
> So is there a way to define different targlet containers, each having
> a different combination of Eclipse- and Xtext version? Switching
> between those should be faster than swithching between "normal" target
> definitions (where for each new installation the plugins are
> downloaded again and again).
The way I've written this for many of the existing projects is to reuse
the "eclipse.target.platform" variable defined in the Eclipse project
catalog (probably we should put that in the Github project catalog too):
<?xml version="1.0" encoding="UTF-8"?>
<setup:VariableTask
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
name="eclipse.target.platform"
defaultValue="Luna"
storageURI="scope://Workspace">
<description>Specifies a default value for the variable that's
originally defined in the Eclipse.org project catalog.</description>
</setup:VariableTask>
And then use the variable reference in the TargletTask to choose the
appropriate named repository list as the active one. This way one can
switch to a different one using the manual install button, going back to
the variables page, changing the variable that chooses the active
repository list for the TP, and then performing the targlet task to do
the switch, all of which will of course use the bundle pool so will be
very fast (and can even be used with offline enabled so that you don't
even look if there are updates online but rather just use what's already
in the pool.
>
> Thanks for clarification or alternative approaches to the problem.
>
> Alex
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Re: Is there a way to create multiple targlet containers? [message #1417492 is a reply to message #1417470] |
Fri, 05 September 2014 15:17 |
Ed Merks Messages: 33142 Registered: July 2009 |
Senior Member |
|
|
Alex,
Comments below.
On 05/09/2014 4:04 PM, Alexander Nittka wrote:
> If I understand correctly, this would allow me to choose the
> repositories (and hence the Eclipse version), but not which version of
> Xtext is to be used...
Actually its it very common to assume that the choice of repository also
chooses the version, because that's what you normally get when using p2
to install software. I.e., you say I want IU x.y.z and p2 looks at all
the repos and finds typically the highest version and installs that.
Both the P2 Task and the Targlet Task/Container aren't quite like that
because they really specify requirements and those requirements can
include a version range along with the IU ID to restrict the possible
solutions. So you could include all repos with all versions of the IU,
and still specify that you want [2.3.0,2.4.0) of that IU to ensure you
end up with some 2.3.x version and nothing but that.
> at least not with the Xtext composite update site where all versions
> are hosted.
So a composite isn't directly a problem as long you're specific in your
requirements about which version you insist on having. However a
composite is a composite because it's composed from other repos, so
there typically will be repos with specific versions in them and the
solution will be found more quickly if you use more specific repos.
> Well, I have a starting point now, maybe non-composite sites are out
> there somewhere...
Of course it's sometimes the case that not only do you need specific
things in the TP, but you need specific versions installed in the IDE.
In that case, you'd really want/need separate IDEs... But yes, if it
comes down to just what's in the TP, you should be able to author a
targlet task that lets you quickly choose different versions...
>
> Thanks
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.04191 seconds