Child elements of EClass not resolved with AdapterfactoryContentProvider [message #479957] |
Thu, 13 August 2009 08:52 |
Jan Kohnert 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 |
Ed Merks 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 #480645 is a reply to message #480526] |
Tue, 18 August 2009 05:49 |
Ed Merks 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/
|
|
|
Powered by
FUDForum. Page generated in 0.03702 seconds