Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Child elements of EClass not resolved with AdapterfactoryContentProvider
Child elements of EClass not resolved with AdapterfactoryContentProvider [message #479957] Thu, 13 August 2009 08:52 Go to next message
Jan Kohnert is currently offline Jan KohnertFriend
Messages: 196
Registered: July 2009
Senior Member
Hello,

I've the problem, that my EClasses children (Changeable=true,
Container=false, Containment=true, Derived=false, EType=EObject, lower
Bound = 0, Ordered=true, Resolve Proxies = true, Transient=false,
Unique=true, Unsettable=false, Upper Bound = -1, volatile = false) are not
getting resolved by the AdapterFactoryContentProvider.
Id I debug the case, I see that the children list has entries!
Within the content providers getElements method the method "public
AdapterFactory getFactoryForTypes(Collection<?> types)" returns null, what
might be the reason (adapterFactoryDescriptorRegistry stays null and
delegatedGetFactoryForTypes always returns null).

What are I doing wrong? I'm using the latest Galileo EMF release. And I've
rebuild the model and the edit code plenty of times :)

Thanks,
Jan
Re: Child elements of EClass not resolved with AdapterfactoryContentProvider [message #479960 is a reply to message #479957] Thu, 13 August 2009 09:13 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Jan,

Comments below.

Jan Kohnert wrote:
> Hello,
>
> I've the problem, that my EClasses children (Changeable=true,
> Container=false, Containment=true, Derived=false, EType=EObject, lower
> Bound = 0, Ordered=true, Resolve Proxies = true, Transient=false,
> Unique=true, Unsettable=false, Upper Bound = -1, volatile = false) are
> not getting resolved by the AdapterFactoryContentProvider.
Not sure what you mean by "getting resolved"...
> Id I debug the case, I see that the children list has entries!
Debugging what?
> Within the content providers getElements method the method "public
> AdapterFactory getFactoryForTypes(Collection<?> types)" returns null,
> what might be the reason (adapterFactoryDescriptorRegistry stays null
> and delegatedGetFactoryForTypes always returns null).
For the package of an EClass that fails to return an adapter, does it's
*.edit project have a registration like this:

<extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
<factory
uri="http://www.example.com/Library"

class=" com.example.library.provider.LibraryItemProviderAdapterFacto ry "
supportedTypes=
"org.eclipse.emf.edit.provider.IEditingDomainItemProvider
org.eclipse.emf.edit.provider.IStructuredItemContentProvider
org.eclipse.emf.edit.provider.ITreeItemContentProvider
org.eclipse.emf.edit.provider.IItemLabelProvider
org.eclipse.emf.edit.provider.IItemPropertySource"/>
</extension>
>
> What are I doing wrong? I'm using the latest Galileo EMF release. And
> I've rebuild the model and the edit code plenty of times :)
Note that plugin.xml files don't regenerate once the file exists...
Deleting it and regenerating it does the trick...
>
> Thanks,
> Jan
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Child elements of EClass not resolved with AdapterfactoryContentProvider [message #479986 is a reply to message #479960] Thu, 13 August 2009 11:14 Go to previous messageGo to next message
Jan Kohnert is currently offline Jan KohnertFriend
Messages: 196
Registered: July 2009
Senior Member
See belwo

Ed Merks wrote:
...
> Debugging what?

I've been debugging the ContentProviders getElements() method. the element
passed to that was the right obejct. It had a children list which
contained one element. The getElements() how ever returned null.

...
> For the package of an EClass that fails to return an adapter, does it's
> *.edit project have a registration like this:

> <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
> <factory
> uri="http://www.example.com/Library"

> class=" com.example.library.provider.LibraryItemProviderAdapterFacto ry "
> supportedTypes=
> "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
> org.eclipse.emf.edit.provider.IStructuredItemContentProvider
> org.eclipse.emf.edit.provider.ITreeItemContentProvider
> org.eclipse.emf.edit.provider.IItemLabelProvider
> org.eclipse.emf.edit.provider.IItemPropertySource"/>
> </extension>
...

The extension point is there. It also seems to be allright:
<extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
<factory
uri="http:///com/swisslab/webServices/emf"
class=" com.swisslab.webServices.broker.emf.provider.EmfItemProvider AdapterFactory "
supportedTypes=
"org.eclipse.emf.edit.provider.IEditingDomainItemProvider
org.eclipse.emf.edit.provider.IStructuredItemContentProvider
org.eclipse.emf.edit.provider.ITreeItemContentProvider
org.eclipse.emf.edit.provider.IItemLabelProvider
org.eclipse.emf.edit.provider.IItemPropertySource"/>
</extension>

The edit Plugin is included into the exportet Plugins.
Re: Child elements of EClass not resolved with AdapterfactoryContentProvider [message #480003 is a reply to message #479986] Thu, 13 August 2009 12:38 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Jan,

You made it sound like no adapter factory was being found for it though,
so there must be a reason for that. E.g., no registered item providers
for the package of the object's EClass.


Jan Kohnert wrote:
> See belwo
>
> Ed Merks wrote:
> ..
>> Debugging what?
>
> I've been debugging the ContentProviders getElements() method. the
> element passed to that was the right obejct. It had a children list
> which contained one element. The getElements() how ever returned null.
>
> ..
>> For the package of an EClass that fails to return an adapter, does
>> it's *.edit project have a registration like this:
>
>> <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
>> <factory
>> uri="http://www.example.com/Library"
>
>> class=" com.example.library.provider.LibraryItemProviderAdapterFacto ry "
>> supportedTypes=
>> "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
>>
>> org.eclipse.emf.edit.provider.IStructuredItemContentProvider
>> org.eclipse.emf.edit.provider.ITreeItemContentProvider
>> org.eclipse.emf.edit.provider.IItemLabelProvider
>> org.eclipse.emf.edit.provider.IItemPropertySource"/>
>> </extension>
> ..
>
> The extension point is there. It also seems to be allright:
> <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
> <factory
> uri="http:///com/swisslab/webServices/emf"
> class=" com.swisslab.webServices.broker.emf.provider.EmfItemProvider AdapterFactory "
>
> supportedTypes=
> "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
>
> org.eclipse.emf.edit.provider.IStructuredItemContentProvider
> org.eclipse.emf.edit.provider.ITreeItemContentProvider
> org.eclipse.emf.edit.provider.IItemLabelProvider
> org.eclipse.emf.edit.provider.IItemPropertySource"/>
> </extension>
>
> The edit Plugin is included into the exportet Plugins.
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Child elements of EClass not resolved with AdapterfactoryContentProvider [message #480526 is a reply to message #480003] Mon, 17 August 2009 14:13 Go to previous messageGo to next message
Jan Kohnert is currently offline Jan KohnertFriend
Messages: 196
Registered: July 2009
Senior Member
Ed Merks wrote:

> Jan,

> You made it sound like no adapter factory was being found for it though,
> so there must be a reason for that. E.g., no registered item providers
> for the package of the object's EClass.


Where can I see if there are any registered item providers? What else
could it be?

I've exactly the problem with a second project now. I'm using emf 2.5 sdk.
I haven’t changed anything within the genmodel file except the 'Base
Package' and 'Prefix' attributes.



> Jan Kohnert wrote:
>> See belwo
>>
>> Ed Merks wrote:
>> ..
>>> Debugging what?
>>
>> I've been debugging the ContentProviders getElements() method. the
>> element passed to that was the right obejct. It had a children list
>> which contained one element. The getElements() how ever returned null.
>>
>> ..
>>> For the package of an EClass that fails to return an adapter, does
>>> it's *.edit project have a registration like this:
>>
>>> <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
>>> <factory
>>> uri="http://www.example.com/Library"
>>
>>> class=" com.example.library.provider.LibraryItemProviderAdapterFacto ry "
>>> supportedTypes=
>>> "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
>>>
>>> org.eclipse.emf.edit.provider.IStructuredItemContentProvider
>>> org.eclipse.emf.edit.provider.ITreeItemContentProvider
>>> org.eclipse.emf.edit.provider.IItemLabelProvider
>>> org.eclipse.emf.edit.provider.IItemPropertySource"/>
>>> </extension>
>> ..
>>
>> The extension point is there. It also seems to be allright:
>> <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
>> <factory
>> uri="http:///com/swisslab/webServices/emf"
>>
class=" com.swisslab.webServices.broker.emf.provider.EmfItemProvider AdapterFactory "
>>
>> supportedTypes=
>> "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
>>
>> org.eclipse.emf.edit.provider.IStructuredItemContentProvider
>> org.eclipse.emf.edit.provider.ITreeItemContentProvider
>> org.eclipse.emf.edit.provider.IItemLabelProvider
>> org.eclipse.emf.edit.provider.IItemPropertySource"/>
>> </extension>
>>
>> The edit Plugin is included into the exportet Plugins.
>>
>>
Re: Child elements of EClass not resolved with AdapterfactoryContentProvider [message #480645 is a reply to message #480526] Tue, 18 August 2009 05:49 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Jan,

Stepping through the logic in the composed adapter factory where it
tries to find a factory that's capable of dealing with the object that's
passed in is the only way I can think of.


Jan Kohnert schrieb:
> Ed Merks wrote:
>
>> Jan,
>
>> You made it sound like no adapter factory was being found for it
>> though, so there must be a reason for that. E.g., no registered item
>> providers for the package of the object's EClass.
>
>
> Where can I see if there are any registered item providers? What else
> could it be?
>
> I've exactly the problem with a second project now. I'm using emf 2.5
> sdk. I haven�t changed anything within the genmodel file except the
> 'Base Package' and 'Prefix' attributes.
>
>
>
>> Jan Kohnert wrote:
>>> See belwo
>>>
>>> Ed Merks wrote:
>>> ..
>>>> Debugging what?
>>>
>>> I've been debugging the ContentProviders getElements() method. the
>>> element passed to that was the right obejct. It had a children list
>>> which contained one element. The getElements() how ever returned null.
>>>
>>> ..
>>>> For the package of an EClass that fails to return an adapter, does
>>>> it's *.edit project have a registration like this:
>>>
>>>> <extension
>>>> point="org.eclipse.emf.edit.itemProviderAdapterFactories">
>>>> <factory
>>>> uri="http://www.example.com/Library"
>>>
>>>> class=" com.example.library.provider.LibraryItemProviderAdapterFacto ry "
>>>> supportedTypes=
>>>> "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
>>>>
>>>> org.eclipse.emf.edit.provider.IStructuredItemContentProvider
>>>> org.eclipse.emf.edit.provider.ITreeItemContentProvider
>>>> org.eclipse.emf.edit.provider.IItemLabelProvider
>>>> org.eclipse.emf.edit.provider.IItemPropertySource"/>
>>>> </extension>
>>> ..
>>>
>>> The extension point is there. It also seems to be allright:
>>> <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
>>> <factory
>>> uri="http:///com/swisslab/webServices/emf"
> class=" com.swisslab.webServices.broker.emf.provider.EmfItemProvider AdapterFactory "
>
>>>
>>> supportedTypes=
>>> "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
>>>
>>> org.eclipse.emf.edit.provider.IStructuredItemContentProvider
>>> org.eclipse.emf.edit.provider.ITreeItemContentProvider
>>> org.eclipse.emf.edit.provider.IItemLabelProvider
>>> org.eclipse.emf.edit.provider.IItemPropertySource"/>
>>> </extension>
>>>
>>> The edit Plugin is included into the exportet Plugins.
>>>
>>>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[CDO] queryHandlerFactories[sql]
Next Topic:regenerate ecore after schema changes
Goto Forum:
  


Current Time: Fri Apr 26 23:04:17 GMT 2024

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

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

Back to the top