Home » Modeling » EMF » ResourceLocator problem with childCreationExtenders(Resource lookup failing in generated example editor with childCreationExtenders)
ResourceLocator problem with childCreationExtenders [message #730724] |
Thu, 29 September 2011 02:06 |
Steve Robenalt Messages: 22 Registered: July 2009 |
Junior Member |
|
|
Hi Ed,
I am working on a prototype effort where I am extending a large multi-part EMF model (for CDO configuration, though the model itself is not CDO enabled).
Since the basic model class is extended in each of the extended models, and since there are already so many model projects I have chosen to generate the emf.edit artifacts directly in the model plugins, recognizing that I had some manual updates to the model plugin that I needed to take responsibility for (this may in fact be a part of my problem).
For each model plugin, after generating the edit artifacts, I made the following updates:
1) Added the bundle activator to the manifest, insuring that it pointed to the *EditPlugin$Implementation
2) Updated the plugin.xml to declare both the itemProviderFactory and childCreationExtender extension points (syntactically validated against a new 2-part model generated using the normal artifacts)
3) Update the build.properties to include the generated icons folder in the binary build.
4) Updated the exported packages of the manifest to include the *.providers package
I also verified that the base model had the extensible factory option selected.
The generated editor was based on a higher level product with only 2 changes - addition of all adapter factories from the models so I could create any artifact, and changing of the new model wizard to include the classes in the base model, so I could choose the root (extensible) container to add all of the subclass instances to.
All is well, except that when trying to add new children to the root element of the model, the new child popup fails to be created due to the failure to lookup the icon resources for the menu. In debug, I have verified that the ResourceLocator starts first with the correct plugin class, but still doesn't locate the icons.
With all of that explanation, the question is fairly simple: Is there any reason the above strategy (placing emf.edit artifacts in the model plugin) would violate any assumptions relative to the location of the icon resources? Failing that, are there any obvious steps I've neglected in my manual updates?
Thanks!
Steve Robenalt
|
|
|
Re: ResourceLocator problem with childCreationExtenders [message #730752 is a reply to message #730724] |
Thu, 29 September 2011 04:21 |
Ed Merks Messages: 33217 Registered: July 2009 |
Senior Member |
|
|
Steve,
Comments below.
On 28/09/2011 7:06 PM, Steve Robenalt wrote:
> Hi Ed,
>
> I am working on a prototype effort where I am extending a large
> multi-part EMF model (for CDO configuration, though the model itself
> is not CDO enabled).
>
> Since the basic model class is extended in each of the extended
> models, and since there are already so many model projects I have
> chosen to generate the emf.edit artifacts directly in the model
> plugins, recognizing that I had some manual updates to the model
> plugin that I needed to take responsibility for (this may in fact be a
> part of my problem).
>
> For each model plugin, after generating the edit artifacts, I made the
> following updates:
>
> 1) Added the bundle activator to the manifest, insuring that it
> pointed to the *EditPlugin$Implementation
If you delete the MANIFEST.MF and generate it, isn't there one there?
> 2) Updated the plugin.xml to declare both the itemProviderFactory and
> childCreationExtender extension points (syntactically validated
> against a new 2-part model generated using the normal artifacts)
If you delete it and regenerate, doesn't it produce the merger?
> 3) Update the build.properties to include the generated icons folder
> in the binary build.
What if you delete it and regenerate it?
> 4) Updated the exported packages of the manifest to include the
> *.providers package
I guess I keep asking the same question.
>
> I also verified that the base model had the extensible factory option
> selected.
>
> The generated editor was based on a higher level product with only 2
> changes - addition of all adapter factories from the models so I could
> create any artifact, and changing of the new model wizard to include
> the classes in the base model, so I could choose the root (extensible)
> container to add all of the subclass instances to.
>
> All is well, except that when trying to add new children to the root
> element of the model, the new child popup fails to be created due to
> the failure to lookup the icon resources for the menu. In debug, I
> have verified that the ResourceLocator starts first with the correct
> plugin class, but still doesn't locate the icons.
>
> With all of that explanation, the question is fairly simple: Is there
> any reason the above strategy (placing emf.edit artifacts in the model
> plugin) would violate any assumptions relative to the location of the
> icon resources? Failing that, are there any obvious steps I've
> neglected in my manual updates?
The generator should recognize when the model source and edit source are
the same and produce merged results. It sounds like you did manually
what would be done automatically, so likely something was overlooked.
>
> Thanks!
> Steve Robenalt
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
| | | | |
Goto Forum:
Current Time: Mon Sep 23 07:51:11 GMT 2024
Powered by FUDForum. Page generated in 0.03405 seconds
|