Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EMF Codegen: versioned required plugins
EMF Codegen: versioned required plugins [message #523454] Fri, 26 March 2010 14:21
Sven Krause is currently offline Sven KrauseFriend
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 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
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/
Previous Topic:eAttribute default value
Next Topic:generically get item provider for an EObject
Goto Forum:
  


Current Time: Fri Apr 26 21:36:53 GMT 2024

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

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

Back to the top