EMF Codegen: versioned required plugins [message #523454] |
Fri, 26 March 2010 14:21 |
Sven Krause Messages: 119 Registered: July 2009 |
Senior Member |
|
|
Hi,
is there a way to generate the manifest definitins for the model and
edit plugins containing a minimum version for the required plugins?
I've changed the manifest templates patching the required plugin list
from the gen model:
<% Set<String> editRequiredPlugins = new
LinkedHashSet<String>(genModel.getEditRequiredPlugins());
Map<String, String> replaceMap = new HashMap<String,String>();
replaceMap.put("any.plugin.id", "1.0.0");
for(Map.Entry<String, String> e: replaceMap.entrySet()) {
editRequiredPlugins.remove(e.getKey());
boolean reexported = editRequiredPlugins.remove(e.getKey() +
";visibility:=reexport");
editRequiredPlugins.add(e.getKey()+ ";bundle-version=\"" +
e.getValue() + "\"" + (reexported ? ";visibility:=reexport" : ""));
}
Iterator<String> requiredPluginIterator =
editRequiredPlugins.iterator(); if (requiredPluginIterator.hasNext()) {
String pluginID = requiredPluginIterator.next();%>
Require-Bundle: ...
But this is a) too strong bound to the specific genmodel and b) heavy to
maintain.
Sven
|
|
|
Re: EMF Codegen: versioned required plugins [message #523466 is a reply to message #523454] |
Fri, 26 March 2010 09:50 |
Ed Merks Messages: 33145 Registered: July 2009 |
Senior Member |
|
|
Sven,
Comments below.
Sven Krause wrote:
> Hi,
>
> is there a way to generate the manifest definitins for the model and
> edit plugins containing a minimum version for the required plugins?
No.
>
> I've changed the manifest templates patching the required plugin list
> from the gen model:
>
> <% Set<String> editRequiredPlugins = new
> LinkedHashSet<String>(genModel.getEditRequiredPlugins());
> Map<String, String> replaceMap = new HashMap<String,String>();
> replaceMap.put("any.plugin.id", "1.0.0");
>
> for(Map.Entry<String, String> e: replaceMap.entrySet()) {
> editRequiredPlugins.remove(e.getKey());
> boolean reexported = editRequiredPlugins.remove(e.getKey() +
> ";visibility:=reexport");
> editRequiredPlugins.add(e.getKey()+ ";bundle-version=\"" +
> e.getValue() + "\"" + (reexported ? ";visibility:=reexport" : ""));
> }
> Iterator<String> requiredPluginIterator =
> editRequiredPlugins.iterator(); if (requiredPluginIterator.hasNext())
> { String pluginID = requiredPluginIterator.next();%>
> Require-Bundle: ...
>
>
> But this is a) too strong bound to the specific genmodel and b) heavy
> to maintain.
I think bounds are something that should be set up and maintained with
careful consideration using the MANIFEST.MF editor. The GenModel
doesn't generally know the actual version number in the workspace even
for the things it generates, and therefore doesn't know them for the
dependencies either.
>
> Sven
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02636 seconds