[XCore] ChildCreationExtenders and ExtensibleProviderFactory issue [message #939503] |
Wed, 10 October 2012 20:33 |
Regent LArcheveque Messages: 94 Registered: May 2010 |
Member |
|
|
Hi,
I have two plugins: ProjectA and ProjectB. Here is the two xcore models:
---------
Project A
---------
@GenModel(prefix="ProjectA", childCreationExtenders="true", extensibleProviderFactory="true", multipleEditorPages="false", modelName="ProjectA")
@GenModel(editDirectory="/ProjectA.edit/src")
@GenModel(editorDirectory="/ProjectA.editor/src")
package projectA
abstract class AbstractClass{
}
class ClassA extends AbstractClass{
}
class ClassesList{
contains AbstractClass[0..*] abstractClasses
}
---------
Project B
---------
@GenModel(prefix="ProjectB", childCreationExtenders="true", extensibleProviderFactory="true", multipleEditorPages="false", modelName="ProjectB")
package projectB
import projectA.AbstractClass
class ClassB extends AbstractClass{
}
When I start the editor generated in projectA with the ChildCreationExtenders sets to true, I am unable to create a child coming from project B. Using standard Ecore, I do not have that issue. I am sure I am missing something but I am unable to figure out. Some help would be appreciated.
I put the projects in attachment.
Regent
|
|
|
|
Re: [XCore] ChildCreationExtenders and ExtensibleProviderFactory issue [message #939799 is a reply to message #939503] |
Thu, 11 October 2012 03:55 |
Ed Merks Messages: 33113 Registered: July 2009 |
Senior Member |
|
|
Régent,
Comments below.
On 10/10/2012 10:33 PM, Régent L Archevêque wrote:
> Hi,
>
> I have two plugins: ProjectA and ProjectB. Here is the two xcore models:
>
> ---------
> Project A
> ---------
> @GenModel(prefix="ProjectA", childCreationExtenders="true", extensibleProviderFactory="true", multipleEditorPages="false", modelName="ProjectA")
> @GenModel(editDirectory="/ProjectA.edit/src")
> @GenModel(editorDirectory="/ProjectA.editor/src")
Hmmm, I didn't realize one could specify 'the same' annotation' more
than once...
>
> package projectA
> abstract class AbstractClass{
> }
>
> class ClassA extends AbstractClass{
> }
>
> class ClassesList{
> contains AbstractClass[0..*] abstractClasses
> }
>
> ---------
> Project B
> ---------
> @GenModel(prefix="ProjectB", childCreationExtenders="true", extensibleProviderFactory="true", multipleEditorPages="false", modelName="ProjectB")
Didn't you intended to specify that it generate a *.edit project like
you did for A? When I do that it does produce
<extension point="org.eclipse.emf.edit.childCreationExtenders">
<extender
uri="projectA"
class="projectB.provider.ProjectBItemProviderAdapterFactory$ProjectAChildCreationExtender"/>
</extension>
>
> package projectB
> import projectA.AbstractClass
> class ClassB extends AbstractClass{
> }
>
> When I start the editor generated in projectA with the ChildCreationExtenders sets to true, I am unable to create a child coming from project B. Using standard Ecore, I do not have that issue. I am sure I am missing something but I am unable to figure out. Some help would be appreciated.
>
> I put the projects in attachment.
I always appreciate simple examples with attachments so I can easily
reproduce problems!
>
> Regent ;)
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05133 seconds