Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [XCore] ChildCreationExtenders and ExtensibleProviderFactory issue([XCore] ChildCreationExtenders and ExtensibleProviderFactory issue)
icon9.gif  [XCore] ChildCreationExtenders and ExtensibleProviderFactory issue [message #939503] Wed, 10 October 2012 20:33 Go to next message
Regent LArcheveque is currently offline Regent LArchevequeFriend
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 Wink
Re: [XCore] ChildCreationExtenders and ExtensibleProviderFactory issue [message #939507 is a reply to message #939503] Wed, 10 October 2012 20:34 Go to previous messageGo to next message
Regent LArcheveque is currently offline Regent LArchevequeFriend
Messages: 94
Registered: May 2010
Member
Oupps. I am using the Eclipse Version 4.2.1.
Re: [XCore] ChildCreationExtenders and ExtensibleProviderFactory issue [message #939799 is a reply to message #939503] Thu, 11 October 2012 03:55 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
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/
Re: [XCore] ChildCreationExtenders and ExtensibleProviderFactory issue [message #940266 is a reply to message #939799] Thu, 11 October 2012 13:27 Go to previous messageGo to next message
Regent LArcheveque is currently offline Regent LArchevequeFriend
Messages: 94
Registered: May 2010
Member
Thanks again Ed for your support.

My fault. In this example I forgot to generate the edit layer for project B. It works now. On the other hand, on my real project I realize the .edit plugin.xml does not include the extension point "org.eclipse.emf.edit.childCreationExtenders". I am investigating. I keep you in touch.

Regent Wink
Re: [XCore] ChildCreationExtenders and ExtensibleProviderFactory issue [message #940290 is a reply to message #940266] Thu, 11 October 2012 13:54 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Régent,

Keep in mind that plugin.xml doesn't regenerate once it exists; I
started working on supporting plugin.xml merging today to address that.


On 11/10/2012 3:27 PM, Régent L Archevêque wrote:
> Thanks again Ed for your support.
>
> My fault. In this example I forgot to generate the edit layer for
> project B. It works now. On the other hand, on my real project I
> realize the .edit plugin.xml does not include the extension point
> "org.eclipse.emf.edit.childCreationExtenders". I am investigating. I
> keep you in touch.
>
> Regent ;)


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [XCore] ChildCreationExtenders and ExtensibleProviderFactory issue [message #940355 is a reply to message #940290] Thu, 11 October 2012 15:00 Go to previous message
Regent LArcheveque is currently offline Regent LArchevequeFriend
Messages: 94
Registered: May 2010
Member
Problem fixed. It was exactly that. The plugin.xml did not include the extension point. plugin.xml merging will be a nice update. Thanks for your help.

Wink
Previous Topic:[CDO] bug in AuditListTableMappingWithRanges?
Next Topic:[CDO] Changes between the 4.1 releases?
Goto Forum:
  


Current Time: Thu Mar 28 23:20:43 GMT 2024

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

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

Back to the top