|
|
|
Re: Manipulating Oomph setup models programatically [message #1716149 is a reply to message #1716147] |
Tue, 01 December 2015 17:12 |
|
Hi Patrik,
P2Factory.createVersionRange(Version, VersionSegment) is a convenience factory method to create version ranges that
include a given version and versions up to the next specified version segment. For example, if you have an installable
unit iu with the version 1.0.0 the call P2Factory.eINSTANCE.createVersionRange(iu.getVersion(), VersionSegment.MICRO)
returns the version range [1.0.0,1.0.1), i.e. all version qualifiers in that range.
Note that VersionRange is really a p2 class. You can create instances directly by calling one of the constructors.
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Am 01.12.2015 um 17:56 schrieb Patrik Nandorf:
> Thanks Ed,
>
> Ok, there is obvioulsy a setVersionRange(), sorry missed that.
> Also I wasn't clear on what I'm trying to do which is to change the max version of the range of a requirement.
>
> My assumed approach to this was to get the range, get the max version, increment it and set the new value to the range.
>
> This I can't do since I can't set the Versions in a VersionRange object due to lack of setters.
>
> Then I tried to create a new VersionRange to set. However createVersionRange takes a Version and VersionSegment which
> I haven't figured out how to use to set specific min and max versions.
>
> Hope this explains my problem better.
> Regards
> Patrik
>
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
Powered by
FUDForum. Page generated in 0.03527 seconds