Community
Participate
Working Groups
Currently VersionAdvice.load is a stubbed out method that should be reading the version advice file produced by PDE Build (or whoever). The code needed for readin gthe file is in PDE build's ProductQuery.loadVersions(). We should be able to copy and use.
Created attachment 126643 [details] Adds version advice from property file This patch loads version advice from a property file. I assume this is just a standard property file (key=value). I have also added a few test cases. This patch can be reviewed.
Created attachment 126644 [details] mylyn/context/zip
A common source for such advice will be property files generated by pde.build, the format there is like this: org.eclipse.core.runtime=3.5.0.v20090223 org.eclipse.core.runtime_3.5.0=3.5.0.v20090223 org.eclipse.core.runtime_3.4.0=3.4.0.v20080512 Particularly, if there is more than one version of a bundle, then the property <bundle-id> will indicate the highest version. And <bundle-id>_<3segments> properties indicate the other available versions. I don't know if we have any need for this extra information, but it is there if we can think of a way to use it. We may also want to be able to give no/null namespace when providing these properties and have them used for any namespace. Have perhaps a special default "*", and when someone asks for a version, we first check the namespace as we do now and if we don't find anything, we then check a default "*" namespace.
Created attachment 126758 [details] Updated patch This patch adds the null namespace as Andrew has suggested. If the same bundle is added twice, the second one wins. I don't think there is anything todo for the multiple versions. If somebody queries for org.eclipse.core.runtime they will get the version in the file. If somebody queries for org.eclipse.core.runtime_3.4.0 this will be seen as a different string. I have also remvoe setVersion from the IVersionAdvice interface. I don't think it makes sense for anyone to "set" advice. Advice is asked for by the publisher, not given (IMHO).
Created attachment 126759 [details] mylyn/context/zip
released.