Home » Language IDEs » AspectJ » implementing ITableItemLabelProvider with aspects
implementing ITableItemLabelProvider with aspects [message #66181] |
Thu, 20 July 2006 14:09 |
Daniel Mahler Messages: 53 Registered: July 2009 |
Member |
|
|
I have been experimenting with customizing emf generated code using AspectJ,
[and so far it has been pretty close to a raging succcess. :) ]
Now I am trying to 'Tree with Columns' editor page to do something useful.
Since the column contents are fairly uniform,
I using AspectJ to essentially create a mixin trait to inherit into all my
item providers (see code below).
My model is generated from an XSD (that explains the odd classnames) and
comes in 2 packages.
So I have created three trivial interfaces:
and andcestor for all item providers, and 2 specializations of it (1 for
each package).
I the aspect I then make the generated item providers implement the new
interfaces and I make the new top inteface provide default implementations
for the ITableItemLabelProvider interface and declare the it to extend all
the item provider interfaces.
Finally I add _1ItemProviderAdapterFactory.new() to the supportedTypes
list of the adapter factory in each package using after advice on its
constructor.
As far as I understand the EMF framework, this should do it,
since now all the item providers implement ITableItemLabelProvider
and both the adapter factories support it.
However, when I run the plugin,
I only get the new behaviour for the document root node
and all the descendants revert to the eclipse default behavior,
of showing the same information in both columns.
According to the AJDT tools my advice is being applied to all my classes,
so I do not know what is going on.
Any advice appreciated.
thanks
D
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public interface CrcsItemProvider {
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public interface CCSItemProvider extends CrcsItemProvider {
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public interface RCSItemProvider extends CrcsItemProvider {
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public privileged aspect TextProvider {
declare parents: com.rightscom.ns.ccs.provider.*Provider implements
CCSItemProvider;
declare parents: org.relaxng.ns.structure._1.provider.*Provider
implements RCSItemProvider;
declare parents: CrcsItemProvider implements ITableItemLabelProvider,
IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
IItemLabelProvider,
IItemPropertySource;
////////////////////////////
public String CrcsItemProvider.getColumnText (Object o, int i) {
String res = null;
switch (i) {
case 0: res = getText(o); break;
default: res ="ZZZZZZZZ"; break;
}
return res;
}
public Object CrcsItemProvider.getColumnImage (Object o, int i) {
Object res = null;
switch (i) {
case 0: res = getImage(o); break;
default: res =null; break;
}
return getImage(o);
}
after (CcsItemProviderAdapterFactory t) returning:
execution(CcsItemProviderAdapterFactory.new())
&& this(t) {
t.supportedTypes.add(ITableItemLabelProvider.class);
}
after (_1ItemProviderAdapterFactory t) returning:
execution(_1ItemProviderAdapterFactory.new())
&& this(t) {
t.supportedTypes.add(ITableItemLabelProvider.class);
}
....
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
|
|
|
Re: implementing ITableItemLabelProvider with aspects [message #66206 is a reply to message #66181] |
Thu, 20 July 2006 14:19 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
This is a multi-part message in MIME format.
--------------060009020200020408070500
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
D,
Probably wrappers are being created by this ItemProviderAdapter method
and the wrappers are not implementing all the APIs you need them to
implement.
protected Object createWrapper(EObject object, EStructuralFeature
feature, Object value, int index)
{
if (!isWrappingNeeded(object)) return value;
if (FeatureMapUtil.isFeatureMap(feature))
{
value = new
*FeatureMapEntryWrapperItemProvider*((FeatureMap.Entry)value ,
object, (EAttribute)feature, index, adapterFactory,
getResourceLocator());
}
else if (feature instanceof EAttribute)
{
value = new *AttributeValueWrapperItemProvider*(value, object,
(EAttribute)feature, index, adapterFactory, getResourceLocator());
}
else if (!((EReference)feature).isContainment())
{
value = new *DelegatingWrapperItemProvider*(value, object,
feature, index, adapterFactory);
}
return value;
}
dmahler@gmail.com wrote:
> I have been experimenting with customizing emf generated code using AspectJ,
> [and so far it has been pretty close to a raging succcess. :) ]
> Now I am trying to 'Tree with Columns' editor page to do something useful.
> Since the column contents are fairly uniform,
> I using AspectJ to essentially create a mixin trait to inherit into all my
> item providers (see code below).
> My model is generated from an XSD (that explains the odd classnames) and
> comes in 2 packages.
> So I have created three trivial interfaces:
> and andcestor for all item providers, and 2 specializations of it (1 for
> each package).
>
> I the aspect I then make the generated item providers implement the new
> interfaces and I make the new top inteface provide default implementations
> for the ITableItemLabelProvider interface and declare the it to extend all
> the item provider interfaces.
>
> Finally I add _1ItemProviderAdapterFactory.new() to the supportedTypes
> list of the adapter factory in each package using after advice on its
> constructor.
>
> As far as I understand the EMF framework, this should do it,
> since now all the item providers implement ITableItemLabelProvider
> and both the adapter factories support it.
> However, when I run the plugin,
> I only get the new behaviour for the document root node
> and all the descendants revert to the eclipse default behavior,
> of showing the same information in both columns.
> According to the AJDT tools my advice is being applied to all my classes,
> so I do not know what is going on.
> Any advice appreciated.
>
> thanks
> D
>
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
> public interface CrcsItemProvider {
>
> }
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
> public interface CCSItemProvider extends CrcsItemProvider {
>
> }
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
> public interface RCSItemProvider extends CrcsItemProvider {
>
> }
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>
> public privileged aspect TextProvider {
>
> declare parents: com.rightscom.ns.ccs.provider.*Provider implements
> CCSItemProvider;
>
> declare parents: org.relaxng.ns.structure._1.provider.*Provider
> implements RCSItemProvider;
>
> declare parents: CrcsItemProvider implements ITableItemLabelProvider,
> IEditingDomainItemProvider,
> IStructuredItemContentProvider,
> ITreeItemContentProvider,
> IItemLabelProvider,
> IItemPropertySource;
>
> ////////////////////////////
>
> public String CrcsItemProvider.getColumnText (Object o, int i) {
> String res = null;
> switch (i) {
> case 0: res = getText(o); break;
> default: res ="ZZZZZZZZ"; break;
> }
> return res;
> }
>
> public Object CrcsItemProvider.getColumnImage (Object o, int i) {
> Object res = null;
> switch (i) {
> case 0: res = getImage(o); break;
> default: res =null; break;
> }
> return getImage(o);
> }
>
> after (CcsItemProviderAdapterFactory t) returning:
> execution(CcsItemProviderAdapterFactory.new())
> && this(t) {
> t.supportedTypes.add(ITableItemLabelProvider.class);
> }
>
> after (_1ItemProviderAdapterFactory t) returning:
> execution(_1ItemProviderAdapterFactory.new())
> && this(t) {
> t.supportedTypes.add(ITableItemLabelProvider.class);
> }
> ....
> }
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>
>
--------------060009020200020408070500
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
D,<br>
<br>
Probably wrappers are being created by this ItemProviderAdapter method
and the wrappers are not implementing all the APIs you need them to
implement.<br>
<blockquote><small> protected Object createWrapper(EObject object,
EStructuralFeature feature, Object value, int index)</small><br>
<small> {</small><br>
<small> if (!isWrappingNeeded(object)) return value;</small><br>
<br>
<small> if (FeatureMapUtil.isFeatureMap(feature))</small><br>
<small> {</small><br>
<small> value = new <b>FeatureMapEntryWrapperItemProvider</b>((FeatureMap.Entry)value,
object, (EAttribute)feature, index, adapterFactory,
getResourceLocator());</small><br>
<small> }</small><br>
<small> else if (feature instanceof EAttribute)</small><br>
<small> {</small><br>
<small> value = new <b>AttributeValueWrapperItemProvider</b>(value,
object, (EAttribute)feature, index, adapterFactory,
getResourceLocator());</small><br>
<small> }</small><br>
<small> else if (!((EReference)feature).isContainment())</small><br>
<small> {</small><br>
<small> value = new <b>DelegatingWrapperItemProvider</b>(value,
object, feature, index, adapterFactory);</small><br>
<small> }</small><br>
<br>
<small> return value;</small><br>
<small> }</small><br>
<br>
</blockquote>
<a class="moz-txt-link-abbreviated" href="mailto:dmahler@gmail.com">dmahler@gmail.com</a> wrote:
<blockquote cite="mide9o2kn$vbv$1@utils.eclipse.org" type="cite">
<pre wrap="">I have been experimenting with customizing emf generated code using AspectJ,
[and so far it has been pretty close to a raging succcess. :) ]
Now I am trying to 'Tree with Columns' editor page to do something useful.
Since the column contents are fairly uniform,
I using AspectJ to essentially create a mixin trait to inherit into all my
item providers (see code below).
My model is generated from an XSD (that explains the odd classnames) and
comes in 2 packages.
So I have created three trivial interfaces:
and andcestor for all item providers, and 2 specializations of it (1 for
each package).
I the aspect I then make the generated item providers implement the new
interfaces and I make the new top inteface provide default implementations
for the ITableItemLabelProvider interface and declare the it to extend all
the item provider interfaces.
Finally I add _1ItemProviderAdapterFactory.new() to the supportedTypes
list of the adapter factory in each package using after advice on its
constructor.
As far as I understand the EMF framework, this should do it,
since now all the item providers implement ITableItemLabelProvider
and both the adapter factories support it.
However, when I run the plugin,
I only get the new behaviour for the document root node
and all the descendants revert to the eclipse default behavior,
of showing the same information in both columns.
According to the AJDT tools my advice is being applied to all my classes,
so I do not know what is going on.
Any advice appreciated.
thanks
D
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public interface CrcsItemProvider {
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public interface CCSItemProvider extends CrcsItemProvider {
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public interface RCSItemProvider extends CrcsItemProvider {
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public privileged aspect TextProvider {
declare parents: com.rightscom.ns.ccs.provider.*Provider implements
CCSItemProvider;
declare parents: org.relaxng.ns.structure._1.provider.*Provider
implements RCSItemProvider;
declare parents: CrcsItemProvider implements ITableItemLabelProvider,
IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
IItemLabelProvider,
IItemPropertySource;
////////////////////////////
public String CrcsItemProvider.getColumnText (Object o, int i) {
String res = null;
switch (i) {
case 0: res = getText(o); break;
default: res ="ZZZZZZZZ"; break;
}
return res;
}
public Object CrcsItemProvider.getColumnImage (Object o, int i) {
Object res = null;
switch (i) {
case 0: res = getImage(o); break;
default: res =null; break;
}
return getImage(o);
}
after (CcsItemProviderAdapterFactory t) returning:
execution(CcsItemProviderAdapterFactory.new())
&& this(t) {
t.supportedTypes.add(ITableItemLabelProvider.class);
}
after (_1ItemProviderAdapterFactory t) returning:
execution(_1ItemProviderAdapterFactory.new())
&& this(t) {
t.supportedTypes.add(ITableItemLabelProvider.class);
}
.....
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
</pre>
</blockquote>
<br>
</body>
</html>
--------------060009020200020408070500--
|
|
|
Re: implementing ITableItemLabelProvider with aspects [message #66229 is a reply to message #66206] |
Thu, 20 July 2006 15:22 |
Daniel Mahler Messages: 53 Registered: July 2009 |
Member |
|
|
Thanks again Ed!
Could you expand on that little though,
I've only been working with Eclipse for less than a month.
What are my options? Can I add the missing APIs myself?
How do I find out what exactly needs adding?
Is this an Eclipse bug? Should I report it somewhere?
Does it mean the AOP approach to customization is flawed in this particular
case? or more generally?
thanks
D
Ed Merks wrote:
> D,
>
> Probably wrappers are being created by this ItemProviderAdapter method
> and the wrappers are not implementing all the APIs you need them to
> implement.
>
> protected Object createWrapper(EObject object, EStructuralFeature
> feature, Object value, int index)
> {
> if (!isWrappingNeeded(object)) return value;
>
> if (FeatureMapUtil.isFeatureMap(feature))
> {
> value = new
> *FeatureMapEntryWrapperItemProvider*((FeatureMap.Entry)value ,
> object, (EAttribute)feature, index, adapterFactory,
> getResourceLocator());
> }
> else if (feature instanceof EAttribute)
> {
> value = new *AttributeValueWrapperItemProvider*(value, object,
> (EAttribute)feature, index, adapterFactory, getResourceLocator());
> }
> else if (!((EReference)feature).isContainment())
> {
> value = new *DelegatingWrapperItemProvider*(value, object,
> feature, index, adapterFactory);
> }
>
> return value;
> }
>
> dmahler@gmail.com wrote:
>> I have been experimenting with customizing emf generated code using
>> AspectJ,
>> [and so far it has been pretty close to a raging succcess. :) ]
>> Now I am trying to 'Tree with Columns' editor page to do something
>> useful. Since the column contents are fairly uniform,
>> I using AspectJ to essentially create a mixin trait to inherit into all
>> my item providers (see code below).
>> My model is generated from an XSD (that explains the odd classnames) and
>> comes in 2 packages.
>> So I have created three trivial interfaces:
>> and andcestor for all item providers, and 2 specializations of it (1 for
>> each package).
>>
>> I the aspect I then make the generated item providers implement the new
>> interfaces and I make the new top inteface provide default
>> implementations
>> for the ITableItemLabelProvider interface and declare the it to extend
>> all the item provider interfaces.
>>
>> Finally I add _1ItemProviderAdapterFactory.new() to the supportedTypes
>> list of the adapter factory in each package using after advice on its
>> constructor.
>>
>> As far as I understand the EMF framework, this should do it,
>> since now all the item providers implement ITableItemLabelProvider
>> and both the adapter factories support it.
>> However, when I run the plugin,
>> I only get the new behaviour for the document root node
>> and all the descendants revert to the eclipse default behavior,
>> of showing the same information in both columns.
>> According to the AJDT tools my advice is being applied to all my classes,
>> so I do not know what is going on.
>> Any advice appreciated.
>>
>> thanks
>> D
>>
>>
>>
>>
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>> public interface CrcsItemProvider {
>>
>> }
>>
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>> public interface CCSItemProvider extends CrcsItemProvider {
>>
>> }
>>
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>> public interface RCSItemProvider extends CrcsItemProvider {
>>
>> }
>>
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>
>> public privileged aspect TextProvider {
>>
>> declare parents: com.rightscom.ns.ccs.provider.*Provider
>> implements
>> CCSItemProvider;
>>
>> declare parents: org.relaxng.ns.structure._1.provider.*Provider
>> implements RCSItemProvider;
>>
>> declare parents: CrcsItemProvider implements
>> ITableItemLabelProvider, IEditingDomainItemProvider,
>> IStructuredItemContentProvider,
>> ITreeItemContentProvider,
>> IItemLabelProvider,
>> IItemPropertySource;
>>
>> ////////////////////////////
>>
>> public String CrcsItemProvider.getColumnText (Object o, int i) {
>> String res = null;
>> switch (i) {
>> case 0: res = getText(o); break;
>> default: res ="ZZZZZZZZ"; break;
>> }
>> return res;
>> }
>>
>> public Object CrcsItemProvider.getColumnImage (Object o, int i) {
>> Object res = null;
>> switch (i) {
>> case 0: res = getImage(o); break;
>> default: res =null; break;
>> }
>> return getImage(o);
>> }
>>
>> after (CcsItemProviderAdapterFactory t) returning:
>> execution(CcsItemProviderAdapterFactory.new())
>> && this(t) {
>> t.supportedTypes.add(ITableItemLabelProvider.class);
>> }
>>
>> after (_1ItemProviderAdapterFactory t) returning:
>> execution(_1ItemProviderAdapterFactory.new())
>> && this(t) {
>> t.supportedTypes.add(ITableItemLabelProvider.class);
>> }
>> ....
>> }
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>
>>
|
|
|
Re: implementing ITableItemLabelProvider with aspects [message #66251 is a reply to message #66229] |
Thu, 20 July 2006 15:46 |
Daniel Mahler Messages: 53 Registered: July 2009 |
Member |
|
|
Ed,
I missed the stars in your post at first.
Now I see that the classes you highlighted do not
implementITableItemLabelProvider, so the wrappers mask the getColumn*
methods.
This seems to have nothing to do with using aspects.
How can you get columns to work at all if wrappers supress the column
methods?
Wouldn't people have run into this already?
Is there something I am not getting?
cheers
D
dmahler@gmail.com wrote:
> Thanks again Ed!
>
> Could you expand on that little though,
> I've only been working with Eclipse for less than a month.
>
> What are my options? Can I add the missing APIs myself?
> How do I find out what exactly needs adding?
> Is this an Eclipse bug? Should I report it somewhere?
> Does it mean the AOP approach to customization is flawed in this
> particular case? or more generally?
>
> thanks
> D
>
>
> Ed Merks wrote:
>
>> D,
>>
>> Probably wrappers are being created by this ItemProviderAdapter method
>> and the wrappers are not implementing all the APIs you need them to
>> implement.
>>
>> protected Object createWrapper(EObject object, EStructuralFeature
>> feature, Object value, int index)
>> {
>> if (!isWrappingNeeded(object)) return value;
>>
>> if (FeatureMapUtil.isFeatureMap(feature))
>> {
>> value = new
>> *FeatureMapEntryWrapperItemProvider*((FeatureMap.Entry)value ,
>> object, (EAttribute)feature, index, adapterFactory,
>> getResourceLocator());
>> }
>> else if (feature instanceof EAttribute)
>> {
>> value = new *AttributeValueWrapperItemProvider*(value, object,
>> (EAttribute)feature, index, adapterFactory, getResourceLocator());
>> }
>> else if (!((EReference)feature).isContainment())
>> {
>> value = new *DelegatingWrapperItemProvider*(value, object,
>> feature, index, adapterFactory);
>> }
>>
>> return value;
>> }
>>
>> dmahler@gmail.com wrote:
>>> I have been experimenting with customizing emf generated code using
>>> AspectJ,
>>> [and so far it has been pretty close to a raging succcess. :) ]
>>> Now I am trying to 'Tree with Columns' editor page to do something
>>> useful. Since the column contents are fairly uniform,
>>> I using AspectJ to essentially create a mixin trait to inherit into all
>>> my item providers (see code below).
>>> My model is generated from an XSD (that explains the odd classnames) and
>>> comes in 2 packages.
>>> So I have created three trivial interfaces:
>>> and andcestor for all item providers, and 2 specializations of it (1 for
>>> each package).
>>>
>>> I the aspect I then make the generated item providers implement the new
>>> interfaces and I make the new top inteface provide default
>>> implementations
>>> for the ITableItemLabelProvider interface and declare the it to extend
>>> all the item provider interfaces.
>>>
>>> Finally I add _1ItemProviderAdapterFactory.new() to the supportedTypes
>>> list of the adapter factory in each package using after advice on its
>>> constructor.
>>>
>>> As far as I understand the EMF framework, this should do it,
>>> since now all the item providers implement ITableItemLabelProvider
>>> and both the adapter factories support it.
>>> However, when I run the plugin,
>>> I only get the new behaviour for the document root node
>>> and all the descendants revert to the eclipse default behavior,
>>> of showing the same information in both columns.
>>> According to the AJDT tools my advice is being applied to all my
>>> classes, so I do not know what is going on.
>>> Any advice appreciated.
>>>
>>> thanks
>>> D
>>>
>>>
>>>
>>>
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>> public interface CrcsItemProvider {
>>>
>>> }
>>>
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>> public interface CCSItemProvider extends CrcsItemProvider {
>>>
>>> }
>>>
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>> public interface RCSItemProvider extends CrcsItemProvider {
>>>
>>> }
>>>
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>
>>> public privileged aspect TextProvider {
>>>
>>> declare parents: com.rightscom.ns.ccs.provider.*Provider
>>> implements
>>> CCSItemProvider;
>>>
>>> declare parents:
>>> org.relaxng.ns.structure._1.provider.*Provider
>>> implements RCSItemProvider;
>>>
>>> declare parents: CrcsItemProvider implements
>>> ITableItemLabelProvider, IEditingDomainItemProvider,
>>> IStructuredItemContentProvider,
>>> ITreeItemContentProvider,
>>> IItemLabelProvider,
>>> IItemPropertySource;
>>>
>>> ////////////////////////////
>>>
>>> public String CrcsItemProvider.getColumnText (Object o, int i) {
>>> String res = null;
>>> switch (i) {
>>> case 0: res = getText(o); break;
>>> default: res ="ZZZZZZZZ"; break;
>>> }
>>> return res;
>>> }
>>>
>>> public Object CrcsItemProvider.getColumnImage (Object o, int i)
>>> {
>>> Object res = null;
>>> switch (i) {
>>> case 0: res = getImage(o); break;
>>> default: res =null; break;
>>> }
>>> return getImage(o);
>>> }
>>>
>>> after (CcsItemProviderAdapterFactory t) returning:
>>> execution(CcsItemProviderAdapterFactory.new())
>>> && this(t) {
>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>> }
>>>
>>> after (_1ItemProviderAdapterFactory t) returning:
>>> execution(_1ItemProviderAdapterFactory.new())
>>> && this(t) {
>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>> }
>>> ....
>>> }
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>
>>>
|
|
|
Re: implementing ITableItemLabelProvider with aspects [message #66275 is a reply to message #66229] |
Thu, 20 July 2006 15:44 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
This is a multi-part message in MIME format.
--------------000708000103030405040508
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
D,
Unfortunately I don't understand the aspect stuff well enough to say
intelligent things. I think your approach will still work. I'll answer
in terms of what I'd do without aspects to support this. I.e., I'd
create a derived wrapper MyFeatureMapEntryWrapperItemProvider that
implements the API that my factory wants to support.
protected Object createWrapper(EObject object, EStructuralFeature
feature, Object value, int index)
{
if (!isWrappingNeeded(object)) return value;
if (FeatureMapUtil.isFeatureMap(feature))
{
class MyFeatureMapEntryWrapperItemProvider extends
FeatureMapEntryWrapperItemProvider implements ITableItemLabelProvider
{
public MyFeatureMapEntryWrapperItemProvider(
FeatureMap.Entry entry,
EObject owner,
EAttribute attribute,
int index,
AdapterFactory adapterFactory,
ResourceLocator resourceLocator)
{
super(entry, owner, attribute, index, adapterFactory,
resourceLocator);
}
public Object getColumnImage(Object object, int columnIndex)
{
// TODO Auto-generated method stub
return null;
}
public String getColumnText(Object object, int columnIndex)
{
// TODO Auto-generated method stub
return null;
}
}
value = new
MyFeatureMapEntryWrapperItemProvider((FeatureMap.Entry)value ,
object, (EAttribute)feature, index, adapterFactory,
getResourceLocator());
}
dmahler@gmail.com wrote:
> Thanks again Ed!
>
> Could you expand on that little though,
> I've only been working with Eclipse for less than a month.
>
> What are my options? Can I add the missing APIs myself?
> How do I find out what exactly needs adding?
> Is this an Eclipse bug? Should I report it somewhere?
> Does it mean the AOP approach to customization is flawed in this particular
> case? or more generally?
>
> thanks
> D
>
>
> Ed Merks wrote:
>
>
>> D,
>>
>> Probably wrappers are being created by this ItemProviderAdapter method
>> and the wrappers are not implementing all the APIs you need them to
>> implement.
>>
>> protected Object createWrapper(EObject object, EStructuralFeature
>> feature, Object value, int index)
>> {
>> if (!isWrappingNeeded(object)) return value;
>>
>> if (FeatureMapUtil.isFeatureMap(feature))
>> {
>> value = new
>> *FeatureMapEntryWrapperItemProvider*((FeatureMap.Entry)value ,
>> object, (EAttribute)feature, index, adapterFactory,
>> getResourceLocator());
>> }
>> else if (feature instanceof EAttribute)
>> {
>> value = new *AttributeValueWrapperItemProvider*(value, object,
>> (EAttribute)feature, index, adapterFactory, getResourceLocator());
>> }
>> else if (!((EReference)feature).isContainment())
>> {
>> value = new *DelegatingWrapperItemProvider*(value, object,
>> feature, index, adapterFactory);
>> }
>>
>> return value;
>> }
>>
>> dmahler@gmail.com wrote:
>>
>>> I have been experimenting with customizing emf generated code using
>>> AspectJ,
>>> [and so far it has been pretty close to a raging succcess. :) ]
>>> Now I am trying to 'Tree with Columns' editor page to do something
>>> useful. Since the column contents are fairly uniform,
>>> I using AspectJ to essentially create a mixin trait to inherit into all
>>> my item providers (see code below).
>>> My model is generated from an XSD (that explains the odd classnames) and
>>> comes in 2 packages.
>>> So I have created three trivial interfaces:
>>> and andcestor for all item providers, and 2 specializations of it (1 for
>>> each package).
>>>
>>> I the aspect I then make the generated item providers implement the new
>>> interfaces and I make the new top inteface provide default
>>> implementations
>>> for the ITableItemLabelProvider interface and declare the it to extend
>>> all the item provider interfaces.
>>>
>>> Finally I add _1ItemProviderAdapterFactory.new() to the supportedTypes
>>> list of the adapter factory in each package using after advice on its
>>> constructor.
>>>
>>> As far as I understand the EMF framework, this should do it,
>>> since now all the item providers implement ITableItemLabelProvider
>>> and both the adapter factories support it.
>>> However, when I run the plugin,
>>> I only get the new behaviour for the document root node
>>> and all the descendants revert to the eclipse default behavior,
>>> of showing the same information in both columns.
>>> According to the AJDT tools my advice is being applied to all my classes,
>>> so I do not know what is going on.
>>> Any advice appreciated.
>>>
>>> thanks
>>> D
>>>
>>>
>>>
>>>
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>> public interface CrcsItemProvider {
>>>
>>> }
>>>
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>> public interface CCSItemProvider extends CrcsItemProvider {
>>>
>>> }
>>>
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>> public interface RCSItemProvider extends CrcsItemProvider {
>>>
>>> }
>>>
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>
>>> public privileged aspect TextProvider {
>>>
>>> declare parents: com.rightscom.ns.ccs.provider.*Provider
>>> implements
>>> CCSItemProvider;
>>>
>>> declare parents: org.relaxng.ns.structure._1.provider.*Provider
>>> implements RCSItemProvider;
>>>
>>> declare parents: CrcsItemProvider implements
>>> ITableItemLabelProvider, IEditingDomainItemProvider,
>>> IStructuredItemContentProvider,
>>> ITreeItemContentProvider,
>>> IItemLabelProvider,
>>> IItemPropertySource;
>>>
>>> ////////////////////////////
>>>
>>> public String CrcsItemProvider.getColumnText (Object o, int i) {
>>> String res = null;
>>> switch (i) {
>>> case 0: res = getText(o); break;
>>> default: res ="ZZZZZZZZ"; break;
>>> }
>>> return res;
>>> }
>>>
>>> public Object CrcsItemProvider.getColumnImage (Object o, int i) {
>>> Object res = null;
>>> switch (i) {
>>> case 0: res = getImage(o); break;
>>> default: res =null; break;
>>> }
>>> return getImage(o);
>>> }
>>>
>>> after (CcsItemProviderAdapterFactory t) returning:
>>> execution(CcsItemProviderAdapterFactory.new())
>>> && this(t) {
>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>> }
>>>
>>> after (_1ItemProviderAdapterFactory t) returning:
>>> execution(_1ItemProviderAdapterFactory.new())
>>> && this(t) {
>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>> }
>>> ....
>>> }
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>
>>>
>>>
>
>
--------------000708000103030405040508
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
D,<br>
<br>
Unfortunately I don't understand the aspect stuff well enough to say
intelligent things. I think your approach will still work. I'll
answer in terms of what I'd do without aspects to support this. I.e.,
I'd create a derived wrapper <small>MyFeatureMapEntryWrapperItemProvider
</small> that implements the API that my factory wants to support.<br>
<blockquote><small> protected Object createWrapper(EObject object,
EStructuralFeature feature, Object value, int index)<br>
{<br>
if (!isWrappingNeeded(object)) return value;<br>
<br>
if (FeatureMapUtil.isFeatureMap(feature))<br>
{<br>
class MyFeatureMapEntryWrapperItemProvider extends
FeatureMapEntryWrapperItemProvider implements ITableItemLabelProvider<br>
{<br>
public MyFeatureMapEntryWrapperItemProvider(<br>
FeatureMap.Entry entry,<br>
EObject owner,<br>
EAttribute attribute,<br>
int index,<br>
AdapterFactory adapterFactory,<br>
ResourceLocator resourceLocator)<br>
{<br>
super(entry, owner, attribute, index, adapterFactory,
resourceLocator); <br>
}<br>
<br>
public Object getColumnImage(Object object, int columnIndex)<br>
{<br>
// TODO Auto-generated method stub<br>
return null;<br>
}<br>
<br>
public String getColumnText(Object object, int columnIndex)<br>
{<br>
// TODO Auto-generated method stub<br>
return null;<br>
}<br>
}<br>
value = new
MyFeatureMapEntryWrapperItemProvider((FeatureMap.Entry)value , object,
(EAttribute)feature, index, adapterFactory, getResourceLocator());<br>
}</small><br>
</blockquote>
<br>
<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:dmahler@gmail.com">dmahler@gmail.com</a> wrote:
<blockquote cite="mide9o6su$sje$2@utils.eclipse.org" type="cite">
<pre wrap="">Thanks again Ed!
Could you expand on that little though,
I've only been working with Eclipse for less than a month.
What are my options? Can I add the missing APIs myself?
How do I find out what exactly needs adding?
Is this an Eclipse bug? Should I report it somewhere?
Does it mean the AOP approach to customization is flawed in this particular
case? or more generally?
thanks
D
Ed Merks wrote:
</pre>
<blockquote type="cite">
<pre wrap="">D,
Probably wrappers are being created by this ItemProviderAdapter method
and the wrappers are not implementing all the APIs you need them to
implement.
protected Object createWrapper(EObject object, EStructuralFeature
feature, Object value, int index)
{
if (!isWrappingNeeded(object)) return value;
if (FeatureMapUtil.isFeatureMap(feature))
{
value = new
*FeatureMapEntryWrapperItemProvider*((FeatureMap.Entry)value ,
object, (EAttribute)feature, index, adapterFactory,
getResourceLocator());
}
else if (feature instanceof EAttribute)
{
value = new *AttributeValueWrapperItemProvider*(value, object,
(EAttribute)feature, index, adapterFactory, getResourceLocator());
}
else if (!((EReference)feature).isContainment())
{
value = new *DelegatingWrapperItemProvider*(value, object,
feature, index, adapterFactory);
}
return value;
}
<a class="moz-txt-link-abbreviated" href="mailto:dmahler@gmail.com">dmahler@gmail.com</a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I have been experimenting with customizing emf generated code using
AspectJ,
[and so far it has been pretty close to a raging succcess. :) ]
Now I am trying to 'Tree with Columns' editor page to do something
useful. Since the column contents are fairly uniform,
I using AspectJ to essentially create a mixin trait to inherit into all
my item providers (see code below).
My model is generated from an XSD (that explains the odd classnames) and
comes in 2 packages.
So I have created three trivial interfaces:
and andcestor for all item providers, and 2 specializations of it (1 for
each package).
I the aspect I then make the generated item providers implement the new
interfaces and I make the new top inteface provide default
implementations
for the ITableItemLabelProvider interface and declare the it to extend
all the item provider interfaces.
Finally I add _1ItemProviderAdapterFactory.new() to the supportedTypes
list of the adapter factory in each package using after advice on its
constructor.
As far as I understand the EMF framework, this should do it,
since now all the item providers implement ITableItemLabelProvider
and both the adapter factories support it.
However, when I run the plugin,
I only get the new behaviour for the document root node
and all the descendants revert to the eclipse default behavior,
of showing the same information in both columns.
According to the AJDT tools my advice is being applied to all my classes,
so I do not know what is going on.
Any advice appreciated.
thanks
D
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public interface CrcsItemProvider {
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public interface CCSItemProvider extends CrcsItemProvider {
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public interface RCSItemProvider extends CrcsItemProvider {
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public privileged aspect TextProvider {
declare parents: com.rightscom.ns.ccs.provider.*Provider
implements
CCSItemProvider;
declare parents: org.relaxng.ns.structure._1.provider.*Provider
implements RCSItemProvider;
declare parents: CrcsItemProvider implements
ITableItemLabelProvider, IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
IItemLabelProvider,
IItemPropertySource;
////////////////////////////
public String CrcsItemProvider.getColumnText (Object o, int i) {
String res = null;
switch (i) {
case 0: res = getText(o); break;
default: res ="ZZZZZZZZ"; break;
}
return res;
}
public Object CrcsItemProvider.getColumnImage (Object o, int i) {
Object res = null;
switch (i) {
case 0: res = getImage(o); break;
default: res =null; break;
}
return getImage(o);
}
after (CcsItemProviderAdapterFactory t) returning:
execution(CcsItemProviderAdapterFactory.new())
&& this(t) {
t.supportedTypes.add(ITableItemLabelProvider.class);
}
after (_1ItemProviderAdapterFactory t) returning:
execution(_1ItemProviderAdapterFactory.new())
&& this(t) {
t.supportedTypes.add(ITableItemLabelProvider.class);
}
.....
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
<br>
</body>
</html>
--------------000708000103030405040508--
|
|
|
Re: implementing ITableItemLabelProvider with aspects [message #66298 is a reply to message #66251] |
Thu, 20 July 2006 15:47 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
This is a multi-part message in MIME format.
--------------040101020701010702080409
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
D,
If people want to support additional APIs, they need to get the wrappers
to support those as well (if their model uses wrappers, which most
non-schema-based models don't). So they need to create derived wrapper
classes for that, as I showed in the other note. People often need to
do this because they don't like the labels we generate by default for
the wrappers...
dmahler@gmail.com wrote:
> Ed,
>
> I missed the stars in your post at first.
> Now I see that the classes you highlighted do not
> implementITableItemLabelProvider, so the wrappers mask the getColumn*
> methods.
> This seems to have nothing to do with using aspects.
> How can you get columns to work at all if wrappers supress the column
> methods?
> Wouldn't people have run into this already?
> Is there something I am not getting?
>
> cheers
> D
>
> dmahler@gmail.com wrote:
>
>
>> Thanks again Ed!
>>
>> Could you expand on that little though,
>> I've only been working with Eclipse for less than a month.
>>
>> What are my options? Can I add the missing APIs myself?
>> How do I find out what exactly needs adding?
>> Is this an Eclipse bug? Should I report it somewhere?
>> Does it mean the AOP approach to customization is flawed in this
>> particular case? or more generally?
>>
>> thanks
>> D
>>
>>
>> Ed Merks wrote:
>>
>>
>>> D,
>>>
>>> Probably wrappers are being created by this ItemProviderAdapter method
>>> and the wrappers are not implementing all the APIs you need them to
>>> implement.
>>>
>>> protected Object createWrapper(EObject object, EStructuralFeature
>>> feature, Object value, int index)
>>> {
>>> if (!isWrappingNeeded(object)) return value;
>>>
>>> if (FeatureMapUtil.isFeatureMap(feature))
>>> {
>>> value = new
>>> *FeatureMapEntryWrapperItemProvider*((FeatureMap.Entry)value ,
>>> object, (EAttribute)feature, index, adapterFactory,
>>> getResourceLocator());
>>> }
>>> else if (feature instanceof EAttribute)
>>> {
>>> value = new *AttributeValueWrapperItemProvider*(value, object,
>>> (EAttribute)feature, index, adapterFactory, getResourceLocator());
>>> }
>>> else if (!((EReference)feature).isContainment())
>>> {
>>> value = new *DelegatingWrapperItemProvider*(value, object,
>>> feature, index, adapterFactory);
>>> }
>>>
>>> return value;
>>> }
>>>
>>> dmahler@gmail.com wrote:
>>>
>>>> I have been experimenting with customizing emf generated code using
>>>> AspectJ,
>>>> [and so far it has been pretty close to a raging succcess. :) ]
>>>> Now I am trying to 'Tree with Columns' editor page to do something
>>>> useful. Since the column contents are fairly uniform,
>>>> I using AspectJ to essentially create a mixin trait to inherit into all
>>>> my item providers (see code below).
>>>> My model is generated from an XSD (that explains the odd classnames) and
>>>> comes in 2 packages.
>>>> So I have created three trivial interfaces:
>>>> and andcestor for all item providers, and 2 specializations of it (1 for
>>>> each package).
>>>>
>>>> I the aspect I then make the generated item providers implement the new
>>>> interfaces and I make the new top inteface provide default
>>>> implementations
>>>> for the ITableItemLabelProvider interface and declare the it to extend
>>>> all the item provider interfaces.
>>>>
>>>> Finally I add _1ItemProviderAdapterFactory.new() to the supportedTypes
>>>> list of the adapter factory in each package using after advice on its
>>>> constructor.
>>>>
>>>> As far as I understand the EMF framework, this should do it,
>>>> since now all the item providers implement ITableItemLabelProvider
>>>> and both the adapter factories support it.
>>>> However, when I run the plugin,
>>>> I only get the new behaviour for the document root node
>>>> and all the descendants revert to the eclipse default behavior,
>>>> of showing the same information in both columns.
>>>> According to the AJDT tools my advice is being applied to all my
>>>> classes, so I do not know what is going on.
>>>> Any advice appreciated.
>>>>
>>>> thanks
>>>> D
>>>>
>>>>
>>>>
>>>>
>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>> public interface CrcsItemProvider {
>>>>
>>>> }
>>>>
>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>> public interface CCSItemProvider extends CrcsItemProvider {
>>>>
>>>> }
>>>>
>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>> public interface RCSItemProvider extends CrcsItemProvider {
>>>>
>>>> }
>>>>
>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>
>>>> public privileged aspect TextProvider {
>>>>
>>>> declare parents: com.rightscom.ns.ccs.provider.*Provider
>>>> implements
>>>> CCSItemProvider;
>>>>
>>>> declare parents:
>>>> org.relaxng.ns.structure._1.provider.*Provider
>>>> implements RCSItemProvider;
>>>>
>>>> declare parents: CrcsItemProvider implements
>>>> ITableItemLabelProvider, IEditingDomainItemProvider,
>>>> IStructuredItemContentProvider,
>>>> ITreeItemContentProvider,
>>>> IItemLabelProvider,
>>>> IItemPropertySource;
>>>>
>>>> ////////////////////////////
>>>>
>>>> public String CrcsItemProvider.getColumnText (Object o, int i) {
>>>> String res = null;
>>>> switch (i) {
>>>> case 0: res = getText(o); break;
>>>> default: res ="ZZZZZZZZ"; break;
>>>> }
>>>> return res;
>>>> }
>>>>
>>>> public Object CrcsItemProvider.getColumnImage (Object o, int i)
>>>> {
>>>> Object res = null;
>>>> switch (i) {
>>>> case 0: res = getImage(o); break;
>>>> default: res =null; break;
>>>> }
>>>> return getImage(o);
>>>> }
>>>>
>>>> after (CcsItemProviderAdapterFactory t) returning:
>>>> execution(CcsItemProviderAdapterFactory.new())
>>>> && this(t) {
>>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>>> }
>>>>
>>>> after (_1ItemProviderAdapterFactory t) returning:
>>>> execution(_1ItemProviderAdapterFactory.new())
>>>> && this(t) {
>>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>>> }
>>>> ....
>>>> }
>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>
>>>>
>>>>
>
>
--------------040101020701010702080409
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
D,<br>
<br>
If people want to support additional APIs, they need to get the
wrappers to support those as well (if their model uses wrappers, which
most non-schema-based models don't). So they need to create derived
wrapper classes for that, as I showed in the other note. People often
need to do this because they don't like the labels we generate by
default for the wrappers...<br>
<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:dmahler@gmail.com">dmahler@gmail.com</a> wrote:
<blockquote cite="mide9o89o$c9k$1@utils.eclipse.org" type="cite">
<pre wrap="">Ed,
I missed the stars in your post at first.
Now I see that the classes you highlighted do not
implementITableItemLabelProvider, so the wrappers mask the getColumn*
methods.
This seems to have nothing to do with using aspects.
How can you get columns to work at all if wrappers supress the column
methods?
Wouldn't people have run into this already?
Is there something I am not getting?
cheers
D
<a class="moz-txt-link-abbreviated" href="mailto:dmahler@gmail.com">dmahler@gmail.com</a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Thanks again Ed!
Could you expand on that little though,
I've only been working with Eclipse for less than a month.
What are my options? Can I add the missing APIs myself?
How do I find out what exactly needs adding?
Is this an Eclipse bug? Should I report it somewhere?
Does it mean the AOP approach to customization is flawed in this
particular case? or more generally?
thanks
D
Ed Merks wrote:
</pre>
<blockquote type="cite">
<pre wrap="">D,
Probably wrappers are being created by this ItemProviderAdapter method
and the wrappers are not implementing all the APIs you need them to
implement.
protected Object createWrapper(EObject object, EStructuralFeature
feature, Object value, int index)
{
if (!isWrappingNeeded(object)) return value;
if (FeatureMapUtil.isFeatureMap(feature))
{
value = new
*FeatureMapEntryWrapperItemProvider*((FeatureMap.Entry)value ,
object, (EAttribute)feature, index, adapterFactory,
getResourceLocator());
}
else if (feature instanceof EAttribute)
{
value = new *AttributeValueWrapperItemProvider*(value, object,
(EAttribute)feature, index, adapterFactory, getResourceLocator());
}
else if (!((EReference)feature).isContainment())
{
value = new *DelegatingWrapperItemProvider*(value, object,
feature, index, adapterFactory);
}
return value;
}
<a class="moz-txt-link-abbreviated" href="mailto:dmahler@gmail.com">dmahler@gmail.com</a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I have been experimenting with customizing emf generated code using
AspectJ,
[and so far it has been pretty close to a raging succcess. :) ]
Now I am trying to 'Tree with Columns' editor page to do something
useful. Since the column contents are fairly uniform,
I using AspectJ to essentially create a mixin trait to inherit into all
my item providers (see code below).
My model is generated from an XSD (that explains the odd classnames) and
comes in 2 packages.
So I have created three trivial interfaces:
and andcestor for all item providers, and 2 specializations of it (1 for
each package).
I the aspect I then make the generated item providers implement the new
interfaces and I make the new top inteface provide default
implementations
for the ITableItemLabelProvider interface and declare the it to extend
all the item provider interfaces.
Finally I add _1ItemProviderAdapterFactory.new() to the supportedTypes
list of the adapter factory in each package using after advice on its
constructor.
As far as I understand the EMF framework, this should do it,
since now all the item providers implement ITableItemLabelProvider
and both the adapter factories support it.
However, when I run the plugin,
I only get the new behaviour for the document root node
and all the descendants revert to the eclipse default behavior,
of showing the same information in both columns.
According to the AJDT tools my advice is being applied to all my
classes, so I do not know what is going on.
Any advice appreciated.
thanks
D
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public interface CrcsItemProvider {
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public interface CCSItemProvider extends CrcsItemProvider {
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public interface RCSItemProvider extends CrcsItemProvider {
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public privileged aspect TextProvider {
declare parents: com.rightscom.ns.ccs.provider.*Provider
implements
CCSItemProvider;
declare parents:
org.relaxng.ns.structure._1.provider.*Provider
implements RCSItemProvider;
declare parents: CrcsItemProvider implements
ITableItemLabelProvider, IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
IItemLabelProvider,
IItemPropertySource;
////////////////////////////
public String CrcsItemProvider.getColumnText (Object o, int i) {
String res = null;
switch (i) {
case 0: res = getText(o); break;
default: res ="ZZZZZZZZ"; break;
}
return res;
}
public Object CrcsItemProvider.getColumnImage (Object o, int i)
{
Object res = null;
switch (i) {
case 0: res = getImage(o); break;
default: res =null; break;
}
return getImage(o);
}
after (CcsItemProviderAdapterFactory t) returning:
execution(CcsItemProviderAdapterFactory.new())
&& this(t) {
t.supportedTypes.add(ITableItemLabelProvider.class);
}
after (_1ItemProviderAdapterFactory t) returning:
execution(_1ItemProviderAdapterFactory.new())
&& this(t) {
t.supportedTypes.add(ITableItemLabelProvider.class);
}
.....
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
</pre>
</blockquote>
</blockquote>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
<br>
</body>
</html>
--------------040101020701010702080409--
|
|
|
Re: implementing ITableItemLabelProvider with aspects [message #66359 is a reply to message #66275] |
Mon, 24 July 2006 16:00 |
Daniel Mahler Messages: 53 Registered: July 2009 |
Member |
|
|
Ed,
I've now implemented the the following extension to ItemProviderAdapter,
and made all my item providers inherit that instead (no aspects).
supportedTypes.add(ITableItemLabelProvider.class);
The "Tree with Columns" view now works correctly for the first 2 levels
of the tree, but still reverts to the default Tree view behaviour after
that.
According to my understanding of the EMF book, this and the
supportedTypes.add(ITableItemLabelProvider.class);
lines in the *ItemProviderAdapterFactory constructors should be all that is
needed.
thanks
D
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++
package com.rightscom.crcs;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.ecore.*;
import org.eclipse.emf.ecore.util.*;
import org.eclipse.emf.common.util.*;
import org.eclipse.emf.edit.provider.*;
public class CRCSItemProviderAdapter extends ItemProviderAdapter implements
ITableItemLabelProvider
{
public CRCSItemProviderAdapter(AdapterFactory adapterFactory) {
super(adapterFactory);
// TODO Auto-generated constructor stub
}
public String getColumnText (Object o, int i) {
String res="ZZ "+getText(o)+" :: "+String.valueOf(i);
return res;
}
public Object getColumnImage (Object o, int i) {
Object res = null;
switch (i) {
default: res = getImage(o); break;
}
return res;
}
@Override
protected Object createWrapper(EObject object, EStructuralFeature feature,
Object value, int index)
{
if (!isWrappingNeeded(object)) return value;
if (FeatureMapUtil.isFeatureMap(feature))
{
class AA extends FeatureMapEntryWrapperItemProvider implements
ITableItemLabelProvider
{
public AA (FeatureMap.Entry entry, EObject owner, EAttribute attribute,
int index, AdapterFactory adapterFactory, ResourceLocator resourceLocator)
{
super(entry, owner, attribute, index, adapterFactory, resourceLocator);
}
public String getColumnText (Object o, int i) {
String res="AA "+getText(o)+" :: "+String.valueOf(i);
return res;
}
public Object getColumnImage (Object o, int i) {
Object res = null;
switch (i) {
default: res = getImage(o); break;
}
return res;
}
}
value = new AA ((FeatureMap.Entry)value, object, (EAttribute)feature,
index, adapterFactory, getResourceLocator());
}
else if (feature instanceof EAttribute)
{
class BB extends AttributeValueWrapperItemProvider implements
ITableItemLabelProvider
{
public BB(Object value, EObject owner, EAttribute attribute,
AdapterFactory adapterFactory, ResourceLocator resourceLocator) {
super(value, owner, attribute, adapterFactory, resourceLocator);
// TODO Auto-generated constructor stub
}
public BB(Object value, EObject owner, EAttribute attribute, int index,
AdapterFactory adapterFactory, ResourceLocator resourceLocator) {
super(value, owner, attribute, index, adapterFactory, resourceLocator);
}
public String getColumnText (Object o, int i) {
String res="BB "+ getText(o)+" :: "+String.valueOf(i);
return res;
}
public Object getColumnImage (Object o, int i) {
Object res = null;
switch (i) {
default: res = getImage(o); break;
}
return res;
}
}
value = new BB(value, object, (EAttribute)feature, index,
adapterFactory, getResourceLocator());
}
else if (!((EReference)feature).isContainment())
{
class CC extends DelegatingWrapperItemProvider implements
ITableItemLabelProvider
{
public CC(Object value, Object owner, EStructuralFeature feature, int
index, AdapterFactory adapterFactory) {
super(value, owner, feature, index, adapterFactory);
}
public String getColumnText (Object o, int i) {
String res="CC " + getText(o)+" :: "+String.valueOf(i);
return res;
}
public Object getColumnImage (Object o, int i) {
Object res = null;
switch (i) {
default: res = getImage(o); break;
}
return res;
}
}
value = new CC (value, object, feature, index, adapterFactory);
}
return value;
}
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++
Ed Merks wrote:
> D,
>
> Unfortunately I don't understand the aspect stuff well enough to say
> intelligent things. I think your approach will still work. I'll answer
> in terms of what I'd do without aspects to support this. I.e., I'd
> create a derived wrapper MyFeatureMapEntryWrapperItemProvider that
> implements the API that my factory wants to support.
>
> protected Object createWrapper(EObject object, EStructuralFeature
> feature, Object value, int index)
> {
> if (!isWrappingNeeded(object)) return value;
>
> if (FeatureMapUtil.isFeatureMap(feature))
> {
> class MyFeatureMapEntryWrapperItemProvider extends
> FeatureMapEntryWrapperItemProvider implements ITableItemLabelProvider
> {
> public MyFeatureMapEntryWrapperItemProvider(
> FeatureMap.Entry entry,
> EObject owner,
> EAttribute attribute,
> int index,
> AdapterFactory adapterFactory,
> ResourceLocator resourceLocator)
> {
> super(entry, owner, attribute, index, adapterFactory,
> resourceLocator);
> }
>
> public Object getColumnImage(Object object, int columnIndex)
> {
> // TODO Auto-generated method stub
> return null;
> }
>
> public String getColumnText(Object object, int columnIndex)
> {
> // TODO Auto-generated method stub
> return null;
> }
> }
> value = new
> MyFeatureMapEntryWrapperItemProvider((FeatureMap.Entry)value ,
> object, (EAttribute)feature, index, adapterFactory,
> getResourceLocator());
> }
>
>
>
>
> dmahler@gmail.com wrote:
>> Thanks again Ed!
>>
>> Could you expand on that little though,
>> I've only been working with Eclipse for less than a month.
>>
>> What are my options? Can I add the missing APIs myself?
>> How do I find out what exactly needs adding?
>> Is this an Eclipse bug? Should I report it somewhere?
>> Does it mean the AOP approach to customization is flawed in this
>> particular case? or more generally?
>>
>> thanks
>> D
>>
>>
>> Ed Merks wrote:
>>
>>
>>> D,
>>>
>>> Probably wrappers are being created by this ItemProviderAdapter method
>>> and the wrappers are not implementing all the APIs you need them to
>>> implement.
>>>
>>> protected Object createWrapper(EObject object, EStructuralFeature
>>> feature, Object value, int index)
>>> {
>>> if (!isWrappingNeeded(object)) return value;
>>>
>>> if (FeatureMapUtil.isFeatureMap(feature))
>>> {
>>> value = new
>>> *FeatureMapEntryWrapperItemProvider*((FeatureMap.Entry)value ,
>>> object, (EAttribute)feature, index, adapterFactory,
>>> getResourceLocator());
>>> }
>>> else if (feature instanceof EAttribute)
>>> {
>>> value = new *AttributeValueWrapperItemProvider*(value, object,
>>> (EAttribute)feature, index, adapterFactory, getResourceLocator());
>>> }
>>> else if (!((EReference)feature).isContainment())
>>> {
>>> value = new *DelegatingWrapperItemProvider*(value, object,
>>> feature, index, adapterFactory);
>>> }
>>>
>>> return value;
>>> }
>>>
>>> dmahler@gmail.com wrote:
>>>
>>>> I have been experimenting with customizing emf generated code using
>>>> AspectJ,
>>>> [and so far it has been pretty close to a raging succcess. :) ]
>>>> Now I am trying to 'Tree with Columns' editor page to do something
>>>> useful. Since the column contents are fairly uniform,
>>>> I using AspectJ to essentially create a mixin trait to inherit into all
>>>> my item providers (see code below).
>>>> My model is generated from an XSD (that explains the odd classnames)
>>>> and comes in 2 packages.
>>>> So I have created three trivial interfaces:
>>>> and andcestor for all item providers, and 2 specializations of it (1
>>>> for each package).
>>>>
>>>> I the aspect I then make the generated item providers implement the new
>>>> interfaces and I make the new top inteface provide default
>>>> implementations
>>>> for the ITableItemLabelProvider interface and declare the it to extend
>>>> all the item provider interfaces.
>>>>
>>>> Finally I add _1ItemProviderAdapterFactory.new() to the supportedTypes
>>>> list of the adapter factory in each package using after advice on its
>>>> constructor.
>>>>
>>>> As far as I understand the EMF framework, this should do it,
>>>> since now all the item providers implement ITableItemLabelProvider
>>>> and both the adapter factories support it.
>>>> However, when I run the plugin,
>>>> I only get the new behaviour for the document root node
>>>> and all the descendants revert to the eclipse default behavior,
>>>> of showing the same information in both columns.
>>>> According to the AJDT tools my advice is being applied to all my
>>>> classes, so I do not know what is going on.
>>>> Any advice appreciated.
>>>>
>>>> thanks
>>>> D
>>>>
>>>>
>>>>
>>>>
>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>> public interface CrcsItemProvider {
>>>>
>>>> }
>>>>
>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>> public interface CCSItemProvider extends CrcsItemProvider {
>>>>
>>>> }
>>>>
>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>> public interface RCSItemProvider extends CrcsItemProvider {
>>>>
>>>> }
>>>>
>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>
>>>> public privileged aspect TextProvider {
>>>>
>>>> declare parents: com.rightscom.ns.ccs.provider.*Provider
>>>> implements
>>>> CCSItemProvider;
>>>>
>>>> declare parents:
>>>> org.relaxng.ns.structure._1.provider.*Provider
>>>> implements RCSItemProvider;
>>>>
>>>> declare parents: CrcsItemProvider implements
>>>> ITableItemLabelProvider, IEditingDomainItemProvider,
>>>> IStructuredItemContentProvider,
>>>> ITreeItemContentProvider,
>>>> IItemLabelProvider,
>>>> IItemPropertySource;
>>>>
>>>> ////////////////////////////
>>>>
>>>> public String CrcsItemProvider.getColumnText (Object o, int i)
>>>> {
>>>> String res = null;
>>>> switch (i) {
>>>> case 0: res = getText(o); break;
>>>> default: res ="ZZZZZZZZ"; break;
>>>> }
>>>> return res;
>>>> }
>>>>
>>>> public Object CrcsItemProvider.getColumnImage (Object o, int i)
>>>> {
>>>> Object res = null;
>>>> switch (i) {
>>>> case 0: res = getImage(o); break;
>>>> default: res =null; break;
>>>> }
>>>> return getImage(o);
>>>> }
>>>>
>>>> after (CcsItemProviderAdapterFactory t) returning:
>>>> execution(CcsItemProviderAdapterFactory.new())
>>>> && this(t) {
>>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>>> }
>>>>
>>>> after (_1ItemProviderAdapterFactory t) returning:
>>>> execution(_1ItemProviderAdapterFactory.new())
>>>> && this(t) {
>>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>>> }
>>>> ....
>>>> }
>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>
>>>>
>>>>
>>
>>
|
|
|
Re: implementing ITableItemLabelProvider with aspects [message #66393 is a reply to message #66359] |
Mon, 24 July 2006 17:01 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
This is a multi-part message in MIME format.
--------------070405050706040505070106
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
D,
Yes, this should do the trick. Set a breakpoint
AdapterFactoryLabelProvider.getColumnText and see what's happening there
for the case that it's not working.
dmahler@gmail.com wrote:
>Ed,
>
>I've now implemented the the following extension to ItemProviderAdapter,
>and made all my item providers inherit that instead (no aspects).
>supportedTypes.add(ITableItemLabelProvider.class);
>
>The "Tree with Columns" view now works correctly for the first 2 levels
>of the tree, but still reverts to the default Tree view behaviour after
>that.
>
>According to my understanding of the EMF book, this and the
>
>supportedTypes.add(ITableItemLabelProvider.class);
>
>lines in the *ItemProviderAdapterFactory constructors should be all that is
>needed.
>
>thanks
>D
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++
>package com.rightscom.crcs;
>
>import org.eclipse.emf.common.notify.AdapterFactory;
>
>import org.eclipse.emf.ecore.*;
>import org.eclipse.emf.ecore.util.*;
>import org.eclipse.emf.common.util.*;
>import org.eclipse.emf.edit.provider.*;
>
>public class CRCSItemProviderAdapter extends ItemProviderAdapter implements
>ITableItemLabelProvider
>{
>
> public CRCSItemProviderAdapter(AdapterFactory adapterFactory) {
> super(adapterFactory);
> // TODO Auto-generated constructor stub
> }
>
>
> public String getColumnText (Object o, int i) {
> String res="ZZ "+getText(o)+" :: "+String.valueOf(i);
> return res;
> }
>
> public Object getColumnImage (Object o, int i) {
> Object res = null;
> switch (i) {
> default: res = getImage(o); break;
> }
> return res;
> }
>
> @Override
> protected Object createWrapper(EObject object, EStructuralFeature feature,
>Object value, int index)
> {
> if (!isWrappingNeeded(object)) return value;
>
> if (FeatureMapUtil.isFeatureMap(feature))
> {
> class AA extends FeatureMapEntryWrapperItemProvider implements
>ITableItemLabelProvider
> {
> public AA (FeatureMap.Entry entry, EObject owner, EAttribute attribute,
>int index, AdapterFactory adapterFactory, ResourceLocator resourceLocator)
>{
> super(entry, owner, attribute, index, adapterFactory, resourceLocator);
> }
> public String getColumnText (Object o, int i) {
> String res="AA "+getText(o)+" :: "+String.valueOf(i);
> return res;
> }
> public Object getColumnImage (Object o, int i) {
> Object res = null;
> switch (i) {
> default: res = getImage(o); break;
> }
> return res;
> }
> }
> value = new AA ((FeatureMap.Entry)value, object, (EAttribute)feature,
>index, adapterFactory, getResourceLocator());
> }
> else if (feature instanceof EAttribute)
> {
> class BB extends AttributeValueWrapperItemProvider implements
>ITableItemLabelProvider
> {
> public BB(Object value, EObject owner, EAttribute attribute,
>AdapterFactory adapterFactory, ResourceLocator resourceLocator) {
> super(value, owner, attribute, adapterFactory, resourceLocator);
> // TODO Auto-generated constructor stub
> }
> public BB(Object value, EObject owner, EAttribute attribute, int index,
>AdapterFactory adapterFactory, ResourceLocator resourceLocator) {
> super(value, owner, attribute, index, adapterFactory, resourceLocator);
> }
> public String getColumnText (Object o, int i) {
> String res="BB "+ getText(o)+" :: "+String.valueOf(i);
> return res;
> }
> public Object getColumnImage (Object o, int i) {
> Object res = null;
> switch (i) {
> default: res = getImage(o); break;
> }
> return res;
> }
> }
> value = new BB(value, object, (EAttribute)feature, index,
>adapterFactory, getResourceLocator());
> }
> else if (!((EReference)feature).isContainment())
> {
> class CC extends DelegatingWrapperItemProvider implements
>ITableItemLabelProvider
> {
> public CC(Object value, Object owner, EStructuralFeature feature, int
>index, AdapterFactory adapterFactory) {
> super(value, owner, feature, index, adapterFactory);
> }
> public String getColumnText (Object o, int i) {
> String res="CC " + getText(o)+" :: "+String.valueOf(i);
> return res;
> }
>
> public Object getColumnImage (Object o, int i) {
> Object res = null;
> switch (i) {
> default: res = getImage(o); break;
> }
> return res;
> }
>
> }
> value = new CC (value, object, feature, index, adapterFactory);
> }
> return value;
> }
>}
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++
>
>
>Ed Merks wrote:
>
>
>
>>D,
>>
>>Unfortunately I don't understand the aspect stuff well enough to say
>>intelligent things. I think your approach will still work. I'll answer
>>in terms of what I'd do without aspects to support this. I.e., I'd
>>create a derived wrapper MyFeatureMapEntryWrapperItemProvider that
>>implements the API that my factory wants to support.
>>
>> protected Object createWrapper(EObject object, EStructuralFeature
>> feature, Object value, int index)
>> {
>> if (!isWrappingNeeded(object)) return value;
>>
>> if (FeatureMapUtil.isFeatureMap(feature))
>> {
>> class MyFeatureMapEntryWrapperItemProvider extends
>> FeatureMapEntryWrapperItemProvider implements ITableItemLabelProvider
>> {
>> public MyFeatureMapEntryWrapperItemProvider(
>> FeatureMap.Entry entry,
>> EObject owner,
>> EAttribute attribute,
>> int index,
>> AdapterFactory adapterFactory,
>> ResourceLocator resourceLocator)
>> {
>> super(entry, owner, attribute, index, adapterFactory,
>> resourceLocator);
>> }
>>
>> public Object getColumnImage(Object object, int columnIndex)
>> {
>> // TODO Auto-generated method stub
>> return null;
>> }
>>
>> public String getColumnText(Object object, int columnIndex)
>> {
>> // TODO Auto-generated method stub
>> return null;
>> }
>> }
>> value = new
>> MyFeatureMapEntryWrapperItemProvider((FeatureMap.Entry)value ,
>> object, (EAttribute)feature, index, adapterFactory,
>> getResourceLocator());
>> }
>>
>>
>>
>>
>>dmahler@gmail.com wrote:
>>
>>
>>>Thanks again Ed!
>>>
>>>Could you expand on that little though,
>>>I've only been working with Eclipse for less than a month.
>>>
>>>What are my options? Can I add the missing APIs myself?
>>>How do I find out what exactly needs adding?
>>>Is this an Eclipse bug? Should I report it somewhere?
>>>Does it mean the AOP approach to customization is flawed in this
>>>particular case? or more generally?
>>>
>>>thanks
>>>D
>>>
>>>
>>>Ed Merks wrote:
>>>
>>>
>>>
>>>
>>>>D,
>>>>
>>>>Probably wrappers are being created by this ItemProviderAdapter method
>>>>and the wrappers are not implementing all the APIs you need them to
>>>>implement.
>>>>
>>>> protected Object createWrapper(EObject object, EStructuralFeature
>>>> feature, Object value, int index)
>>>> {
>>>> if (!isWrappingNeeded(object)) return value;
>>>>
>>>> if (FeatureMapUtil.isFeatureMap(feature))
>>>> {
>>>> value = new
>>>> *FeatureMapEntryWrapperItemProvider*((FeatureMap.Entry)value ,
>>>> object, (EAttribute)feature, index, adapterFactory,
>>>> getResourceLocator());
>>>> }
>>>> else if (feature instanceof EAttribute)
>>>> {
>>>> value = new *AttributeValueWrapperItemProvider*(value, object,
>>>> (EAttribute)feature, index, adapterFactory, getResourceLocator());
>>>> }
>>>> else if (!((EReference)feature).isContainment())
>>>> {
>>>> value = new *DelegatingWrapperItemProvider*(value, object,
>>>> feature, index, adapterFactory);
>>>> }
>>>>
>>>> return value;
>>>> }
>>>>
>>>>dmahler@gmail.com wrote:
>>>>
>>>>
>>>>
>>>>>I have been experimenting with customizing emf generated code using
>>>>>AspectJ,
>>>>>[and so far it has been pretty close to a raging succcess. :) ]
>>>>>Now I am trying to 'Tree with Columns' editor page to do something
>>>>>useful. Since the column contents are fairly uniform,
>>>>>I using AspectJ to essentially create a mixin trait to inherit into all
>>>>>my item providers (see code below).
>>>>>My model is generated from an XSD (that explains the odd classnames)
>>>>>and comes in 2 packages.
>>>>>So I have created three trivial interfaces:
>>>>>and andcestor for all item providers, and 2 specializations of it (1
>>>>>for each package).
>>>>>
>>>>>I the aspect I then make the generated item providers implement the new
>>>>>interfaces and I make the new top inteface provide default
>>>>>implementations
>>>>>for the ITableItemLabelProvider interface and declare the it to extend
>>>>>all the item provider interfaces.
>>>>>
>>>>>Finally I add _1ItemProviderAdapterFactory.new() to the supportedTypes
>>>>>list of the adapter factory in each package using after advice on its
>>>>>constructor.
>>>>>
>>>>>As far as I understand the EMF framework, this should do it,
>>>>>since now all the item providers implement ITableItemLabelProvider
>>>>>and both the adapter factories support it.
>>>>>However, when I run the plugin,
>>>>>I only get the new behaviour for the document root node
>>>>>and all the descendants revert to the eclipse default behavior,
>>>>>of showing the same information in both columns.
>>>>>According to the AJDT tools my advice is being applied to all my
>>>>>classes, so I do not know what is going on.
>>>>>Any advice appreciated.
>>>>>
>>>>>thanks
>>>>>D
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>public interface CrcsItemProvider {
>>>>>
>>>>>}
>>>>>
>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>public interface CCSItemProvider extends CrcsItemProvider {
>>>>>
>>>>>}
>>>>>
>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>public interface RCSItemProvider extends CrcsItemProvider {
>>>>>
>>>>>}
>>>>>
>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>
>>>>>public privileged aspect TextProvider {
>>>>>
>>>>> declare parents: com.rightscom.ns.ccs.provider.*Provider
>>>>> implements
>>>>>CCSItemProvider;
>>>>>
>>>>> declare parents:
>>>>> org.relaxng.ns.structure._1.provider.*Provider
>>>>>implements RCSItemProvider;
>>>>>
>>>>> declare parents: CrcsItemProvider implements
>>>>> ITableItemLabelProvider, IEditingDomainItemProvider,
>>>>> IStructuredItemContentProvider,
>>>>> ITreeItemContentProvider,
>>>>> IItemLabelProvider,
>>>>> IItemPropertySource;
>>>>>
>>>>> ////////////////////////////
>>>>>
>>>>> public String CrcsItemProvider.getColumnText (Object o, int i)
>>>>> {
>>>>> String res = null;
>>>>> switch (i) {
>>>>> case 0: res = getText(o); break;
>>>>> default: res ="ZZZZZZZZ"; break;
>>>>> }
>>>>> return res;
>>>>> }
>>>>>
>>>>> public Object CrcsItemProvider.getColumnImage (Object o, int i)
>>>>> {
>>>>> Object res = null;
>>>>> switch (i) {
>>>>> case 0: res = getImage(o); break;
>>>>> default: res =null; break;
>>>>> }
>>>>> return getImage(o);
>>>>> }
>>>>>
>>>>> after (CcsItemProviderAdapterFactory t) returning:
>>>>> execution(CcsItemProviderAdapterFactory.new())
>>>>> && this(t) {
>>>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>>>> }
>>>>>
>>>>> after (_1ItemProviderAdapterFactory t) returning:
>>>>> execution(_1ItemProviderAdapterFactory.new())
>>>>> && this(t) {
>>>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>>>> }
>>>>>....
>>>>>}
>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>>
>
>
>
--------------070405050706040505070106
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
D,<br>
<br>
Yes, this should do the trick. Set a breakpoint
AdapterFactoryLabelProvider.getColumnText and see what's happening
there for the case that it's not working.<br>
<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:dmahler@gmail.com">dmahler@gmail.com</a> wrote:
<blockquote cite="midea2ql5$sij$1@utils.eclipse.org" type="cite">
<pre wrap="">Ed,
I've now implemented the the following extension to ItemProviderAdapter,
and made all my item providers inherit that instead (no aspects).
supportedTypes.add(ITableItemLabelProvider.class);
The "Tree with Columns" view now works correctly for the first 2 levels
of the tree, but still reverts to the default Tree view behaviour after
that.
According to my understanding of the EMF book, this and the
supportedTypes.add(ITableItemLabelProvider.class);
lines in the *ItemProviderAdapterFactory constructors should be all that is
needed.
thanks
D
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++
package com.rightscom.crcs;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.ecore.*;
import org.eclipse.emf.ecore.util.*;
import org.eclipse.emf.common.util.*;
import org.eclipse.emf.edit.provider.*;
public class CRCSItemProviderAdapter extends ItemProviderAdapter implements
ITableItemLabelProvider
{
public CRCSItemProviderAdapter(AdapterFactory adapterFactory) {
super(adapterFactory);
// TODO Auto-generated constructor stub
}
public String getColumnText (Object o, int i) {
String res="ZZ "+getText(o)+" :: "+String.valueOf(i);
return res;
}
public Object getColumnImage (Object o, int i) {
Object res = null;
switch (i) {
default: res = getImage(o); break;
}
return res;
}
@Override
protected Object createWrapper(EObject object, EStructuralFeature feature,
Object value, int index)
{
if (!isWrappingNeeded(object)) return value;
if (FeatureMapUtil.isFeatureMap(feature))
{
class AA extends FeatureMapEntryWrapperItemProvider implements
ITableItemLabelProvider
{
public AA (FeatureMap.Entry entry, EObject owner, EAttribute attribute,
int index, AdapterFactory adapterFactory, ResourceLocator resourceLocator)
{
super(entry, owner, attribute, index, adapterFactory, resourceLocator);
}
public String getColumnText (Object o, int i) {
String res="AA "+getText(o)+" :: "+String.valueOf(i);
return res;
}
public Object getColumnImage (Object o, int i) {
Object res = null;
switch (i) {
default: res = getImage(o); break;
}
return res;
}
}
value = new AA ((FeatureMap.Entry)value, object, (EAttribute)feature,
index, adapterFactory, getResourceLocator());
}
else if (feature instanceof EAttribute)
{
class BB extends AttributeValueWrapperItemProvider implements
ITableItemLabelProvider
{
public BB(Object value, EObject owner, EAttribute attribute,
AdapterFactory adapterFactory, ResourceLocator resourceLocator) {
super(value, owner, attribute, adapterFactory, resourceLocator);
// TODO Auto-generated constructor stub
}
public BB(Object value, EObject owner, EAttribute attribute, int index,
AdapterFactory adapterFactory, ResourceLocator resourceLocator) {
super(value, owner, attribute, index, adapterFactory, resourceLocator);
}
public String getColumnText (Object o, int i) {
String res="BB "+ getText(o)+" :: "+String.valueOf(i);
return res;
}
public Object getColumnImage (Object o, int i) {
Object res = null;
switch (i) {
default: res = getImage(o); break;
}
return res;
}
}
value = new BB(value, object, (EAttribute)feature, index,
adapterFactory, getResourceLocator());
}
else if (!((EReference)feature).isContainment())
{
class CC extends DelegatingWrapperItemProvider implements
ITableItemLabelProvider
{
public CC(Object value, Object owner, EStructuralFeature feature, int
index, AdapterFactory adapterFactory) {
super(value, owner, feature, index, adapterFactory);
}
public String getColumnText (Object o, int i) {
String res="CC " + getText(o)+" :: "+String.valueOf(i);
return res;
}
public Object getColumnImage (Object o, int i) {
Object res = null;
switch (i) {
default: res = getImage(o); break;
}
return res;
}
}
value = new CC (value, object, feature, index, adapterFactory);
}
return value;
}
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++
Ed Merks wrote:
</pre>
<blockquote type="cite">
<pre wrap="">D,
Unfortunately I don't understand the aspect stuff well enough to say
intelligent things. I think your approach will still work. I'll answer
in terms of what I'd do without aspects to support this. I.e., I'd
create a derived wrapper MyFeatureMapEntryWrapperItemProvider that
implements the API that my factory wants to support.
protected Object createWrapper(EObject object, EStructuralFeature
feature, Object value, int index)
{
if (!isWrappingNeeded(object)) return value;
if (FeatureMapUtil.isFeatureMap(feature))
{
class MyFeatureMapEntryWrapperItemProvider extends
FeatureMapEntryWrapperItemProvider implements ITableItemLabelProvider
{
public MyFeatureMapEntryWrapperItemProvider(
FeatureMap.Entry entry,
EObject owner,
EAttribute attribute,
int index,
AdapterFactory adapterFactory,
ResourceLocator resourceLocator)
{
super(entry, owner, attribute, index, adapterFactory,
resourceLocator);
}
public Object getColumnImage(Object object, int columnIndex)
{
// TODO Auto-generated method stub
return null;
}
public String getColumnText(Object object, int columnIndex)
{
// TODO Auto-generated method stub
return null;
}
}
value = new
MyFeatureMapEntryWrapperItemProvider((FeatureMap.Entry)value ,
object, (EAttribute)feature, index, adapterFactory,
getResourceLocator());
}
<a class="moz-txt-link-abbreviated" href="mailto:dmahler@gmail.com">dmahler@gmail.com</a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Thanks again Ed!
Could you expand on that little though,
I've only been working with Eclipse for less than a month.
What are my options? Can I add the missing APIs myself?
How do I find out what exactly needs adding?
Is this an Eclipse bug? Should I report it somewhere?
Does it mean the AOP approach to customization is flawed in this
particular case? or more generally?
thanks
D
Ed Merks wrote:
</pre>
<blockquote type="cite">
<pre wrap="">D,
Probably wrappers are being created by this ItemProviderAdapter method
and the wrappers are not implementing all the APIs you need them to
implement.
protected Object createWrapper(EObject object, EStructuralFeature
feature, Object value, int index)
{
if (!isWrappingNeeded(object)) return value;
if (FeatureMapUtil.isFeatureMap(feature))
{
value = new
*FeatureMapEntryWrapperItemProvider*((FeatureMap.Entry)value ,
object, (EAttribute)feature, index, adapterFactory,
getResourceLocator());
}
else if (feature instanceof EAttribute)
{
value = new *AttributeValueWrapperItemProvider*(value, object,
(EAttribute)feature, index, adapterFactory, getResourceLocator());
}
else if (!((EReference)feature).isContainment())
{
value = new *DelegatingWrapperItemProvider*(value, object,
feature, index, adapterFactory);
}
return value;
}
<a class="moz-txt-link-abbreviated" href="mailto:dmahler@gmail.com">dmahler@gmail.com</a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I have been experimenting with customizing emf generated code using
AspectJ,
[and so far it has been pretty close to a raging succcess. :) ]
Now I am trying to 'Tree with Columns' editor page to do something
useful. Since the column contents are fairly uniform,
I using AspectJ to essentially create a mixin trait to inherit into all
my item providers (see code below).
My model is generated from an XSD (that explains the odd classnames)
and comes in 2 packages.
So I have created three trivial interfaces:
and andcestor for all item providers, and 2 specializations of it (1
for each package).
I the aspect I then make the generated item providers implement the new
interfaces and I make the new top inteface provide default
implementations
for the ITableItemLabelProvider interface and declare the it to extend
all the item provider interfaces.
Finally I add _1ItemProviderAdapterFactory.new() to the supportedTypes
list of the adapter factory in each package using after advice on its
constructor.
As far as I understand the EMF framework, this should do it,
since now all the item providers implement ITableItemLabelProvider
and both the adapter factories support it.
However, when I run the plugin,
I only get the new behaviour for the document root node
and all the descendants revert to the eclipse default behavior,
of showing the same information in both columns.
According to the AJDT tools my advice is being applied to all my
classes, so I do not know what is going on.
Any advice appreciated.
thanks
D
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public interface CrcsItemProvider {
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public interface CCSItemProvider extends CrcsItemProvider {
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public interface RCSItemProvider extends CrcsItemProvider {
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public privileged aspect TextProvider {
declare parents: com.rightscom.ns.ccs.provider.*Provider
implements
CCSItemProvider;
declare parents:
org.relaxng.ns.structure._1.provider.*Provider
implements RCSItemProvider;
declare parents: CrcsItemProvider implements
ITableItemLabelProvider, IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
IItemLabelProvider,
IItemPropertySource;
////////////////////////////
public String CrcsItemProvider.getColumnText (Object o, int i)
{
String res = null;
switch (i) {
case 0: res = getText(o); break;
default: res ="ZZZZZZZZ"; break;
}
return res;
}
public Object CrcsItemProvider.getColumnImage (Object o, int i)
{
Object res = null;
switch (i) {
case 0: res = getImage(o); break;
default: res =null; break;
}
return getImage(o);
}
after (CcsItemProviderAdapterFactory t) returning:
execution(CcsItemProviderAdapterFactory.new())
&& this(t) {
t.supportedTypes.add(ITableItemLabelProvider.class);
}
after (_1ItemProviderAdapterFactory t) returning:
execution(_1ItemProviderAdapterFactory.new())
&& this(t) {
t.supportedTypes.add(ITableItemLabelProvider.class);
}
.....
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
</pre>
</blockquote>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
<br>
</body>
</html>
--------------070405050706040505070106--
|
|
|
Re: implementing ITableItemLabelProvider with aspects [message #66408 is a reply to message #66393] |
Tue, 25 July 2006 00:31 |
Daniel Mahler Messages: 53 Registered: July 2009 |
Member |
|
|
Ed,
It looks like a plain DelegatingWrapperItemProvider is getting passed in.
Its delegateItmeProvider and owner are instances of the inner AA class
though and its adapterFactory is also mine.
After setting a breakpoint on DelegatingWrapperItemProvider constructors
It looks like the callchain on the AA istance is
getChildren() -> updateChildren() -> createWrapper(..).
All these are inherited from DelegatingWrapperItemProvider,
and DelegatingWrapperItemProvider.createWrapper calls the constructor
protected IWrapperItemProvider createWrapper(Object value, Object owner,
AdapterFactory adapterFactory)
{
return new DelegatingWrapperItemProvider(value, owner, adapterFactory);
}
so we get a raw DelegatingWrapperItemProvider instance.
I looked at verring createWrapper in AA, but the AA constructor
seems to need more information then is available at the createWrapper call.
BTW is there a way to extrect plain text representation from the debug
perspective to paste into emails?
thanks
D
Ed Merks wrote:
> D,
>
> Yes, this should do the trick. Set a breakpoint
> AdapterFactoryLabelProvider.getColumnText and see what's happening there
> for the case that it's not working.
>
>
> dmahler@gmail.com wrote:
>
>>Ed,
>>
>>I've now implemented the the following extension to ItemProviderAdapter,
>>and made all my item providers inherit that instead (no aspects).
>>supportedTypes.add(ITableItemLabelProvider.class);
>>
>>The "Tree with Columns" view now works correctly for the first 2 levels
>>of the tree, but still reverts to the default Tree view behaviour after
>>that.
>>
>>According to my understanding of the EMF book, this and the
>>
>>supportedTypes.add(ITableItemLabelProvider.class);
>>
>>lines in the *ItemProviderAdapterFactory constructors should be all that
>>is needed.
>>
>>thanks
>>D
>>
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++
>>package com.rightscom.crcs;
>>
>>import org.eclipse.emf.common.notify.AdapterFactory;
>>
>>import org.eclipse.emf.ecore.*;
>>import org.eclipse.emf.ecore.util.*;
>>import org.eclipse.emf.common.util.*;
>>import org.eclipse.emf.edit.provider.*;
>>
>>public class CRCSItemProviderAdapter extends ItemProviderAdapter
>>implements ITableItemLabelProvider
>>{
>>
>> public CRCSItemProviderAdapter(AdapterFactory adapterFactory) {
>> super(adapterFactory);
>> // TODO Auto-generated constructor stub
>> }
>>
>>
>> public String getColumnText (Object o, int i) {
>> String res="ZZ "+getText(o)+" :: "+String.valueOf(i);
>> return res;
>> }
>>
>> public Object getColumnImage (Object o, int i) {
>> Object res = null;
>> switch (i) {
>> default: res = getImage(o); break;
>> }
>> return res;
>> }
>>
>> @Override
>> protected Object createWrapper(EObject object, EStructuralFeature
>> feature,
>>Object value, int index)
>> {
>> if (!isWrappingNeeded(object)) return value;
>>
>> if (FeatureMapUtil.isFeatureMap(feature))
>> {
>> class AA extends FeatureMapEntryWrapperItemProvider
>> implements
>>ITableItemLabelProvider
>> {
>> public AA (FeatureMap.Entry entry, EObject
>> owner, EAttribute attribute,
>>int index, AdapterFactory adapterFactory, ResourceLocator resourceLocator)
>>{
>> super(entry, owner, attribute,
>> index, adapterFactory,
>> resourceLocator);
>> }
>> public String getColumnText (Object o, int
>> i) {
>> String res="AA "+getText(o)+" ::
>> "+String.valueOf(i); return res;
>> }
>> public Object getColumnImage (Object o,
>> int i) {
>> Object res = null;
>> switch (i) {
>> default: res = getImage(o); break;
>> }
>> return res;
>> }
>> }
>> value = new AA ((FeatureMap.Entry)value, object,
>> (EAttribute)feature,
>>index, adapterFactory, getResourceLocator());
>> }
>> else if (feature instanceof EAttribute)
>> {
>> class BB extends AttributeValueWrapperItemProvider
>> implements
>>ITableItemLabelProvider
>> {
>> public BB(Object value, EObject owner,
>> EAttribute attribute,
>>AdapterFactory adapterFactory, ResourceLocator resourceLocator) {
>> super(value, owner, attribute,
>> adapterFactory, resourceLocator);
>> // TODO Auto-generated constructor
>> stub
>> }
>> public BB(Object value, EObject owner,
>> EAttribute attribute, int index,
>>AdapterFactory adapterFactory, ResourceLocator resourceLocator) {
>> super(value, owner, attribute,
>> index, adapterFactory,
>> resourceLocator);
>> }
>> public String getColumnText (Object o, int
>> i) {
>> String res="BB "+ getText(o)+" ::
>> "+String.valueOf(i); return res;
>> }
>> public Object getColumnImage (Object o,
>> int i) {
>> Object res = null;
>> switch (i) {
>> default: res = getImage(o); break;
>> }
>> return res;
>> }
>> }
>> value = new BB(value, object, (EAttribute)feature, index,
>>adapterFactory, getResourceLocator());
>> }
>> else if (!((EReference)feature).isContainment())
>> {
>> class CC extends DelegatingWrapperItemProvider
>> implements
>>ITableItemLabelProvider
>> {
>> public CC(Object value, Object owner,
>> EStructuralFeature feature, int
>>index, AdapterFactory adapterFactory) {
>> super(value, owner, feature,
>> index, adapterFactory);
>> }
>> public String getColumnText (Object o, int
>> i) {
>> String res="CC " + getText(o)+" ::
>> "+String.valueOf(i); return res;
>> }
>>
>> public Object getColumnImage (Object o,
>> int i) {
>> Object res = null;
>> switch (i) {
>> default: res = getImage(o); break;
>> }
>> return res;
>> }
>>
>> }
>> value = new CC (value, object, feature, index,
>> adapterFactory);
>> }
>> return value;
>> }
>>}
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++
>>
>>
>>Ed Merks wrote:
>>
>>
>>
>>>D,
>>>
>>>Unfortunately I don't understand the aspect stuff well enough to say
>>>intelligent things. I think your approach will still work. I'll answer
>>>in terms of what I'd do without aspects to support this. I.e., I'd
>>>create a derived wrapper MyFeatureMapEntryWrapperItemProvider that
>>>implements the API that my factory wants to support.
>>>
>>> protected Object createWrapper(EObject object, EStructuralFeature
>>> feature, Object value, int index)
>>> {
>>> if (!isWrappingNeeded(object)) return value;
>>>
>>> if (FeatureMapUtil.isFeatureMap(feature))
>>> {
>>> class MyFeatureMapEntryWrapperItemProvider extends
>>> FeatureMapEntryWrapperItemProvider implements ITableItemLabelProvider
>>> {
>>> public MyFeatureMapEntryWrapperItemProvider(
>>> FeatureMap.Entry entry,
>>> EObject owner,
>>> EAttribute attribute,
>>> int index,
>>> AdapterFactory adapterFactory,
>>> ResourceLocator resourceLocator)
>>> {
>>> super(entry, owner, attribute, index, adapterFactory,
>>> resourceLocator);
>>> }
>>>
>>> public Object getColumnImage(Object object, int columnIndex)
>>> {
>>> // TODO Auto-generated method stub
>>> return null;
>>> }
>>>
>>> public String getColumnText(Object object, int columnIndex)
>>> {
>>> // TODO Auto-generated method stub
>>> return null;
>>> }
>>> }
>>> value = new
>>> MyFeatureMapEntryWrapperItemProvider((FeatureMap.Entry)value ,
>>> object, (EAttribute)feature, index, adapterFactory,
>>> getResourceLocator());
>>> }
>>>
>>>
>>>
>>>
>>>dmahler@gmail.com wrote:
>>>
>>>
>>>>Thanks again Ed!
>>>>
>>>>Could you expand on that little though,
>>>>I've only been working with Eclipse for less than a month.
>>>>
>>>>What are my options? Can I add the missing APIs myself?
>>>>How do I find out what exactly needs adding?
>>>>Is this an Eclipse bug? Should I report it somewhere?
>>>>Does it mean the AOP approach to customization is flawed in this
>>>>particular case? or more generally?
>>>>
>>>>thanks
>>>>D
>>>>
>>>>
>>>>Ed Merks wrote:
>>>>
>>>>
>>>>
>>>>
>>>>>D,
>>>>>
>>>>>Probably wrappers are being created by this ItemProviderAdapter method
>>>>>and the wrappers are not implementing all the APIs you need them to
>>>>>implement.
>>>>>
>>>>> protected Object createWrapper(EObject object, EStructuralFeature
>>>>> feature, Object value, int index)
>>>>> {
>>>>> if (!isWrappingNeeded(object)) return value;
>>>>>
>>>>> if (FeatureMapUtil.isFeatureMap(feature))
>>>>> {
>>>>> value = new
>>>>> *FeatureMapEntryWrapperItemProvider*((FeatureMap.Entry)value ,
>>>>> object, (EAttribute)feature, index, adapterFactory,
>>>>> getResourceLocator());
>>>>> }
>>>>> else if (feature instanceof EAttribute)
>>>>> {
>>>>> value = new *AttributeValueWrapperItemProvider*(value,
>>>>> object,
>>>>> (EAttribute)feature, index, adapterFactory, getResourceLocator());
>>>>> }
>>>>> else if (!((EReference)feature).isContainment())
>>>>> {
>>>>> value = new *DelegatingWrapperItemProvider*(value, object,
>>>>> feature, index, adapterFactory);
>>>>> }
>>>>>
>>>>> return value;
>>>>> }
>>>>>
>>>>>dmahler@gmail.com wrote:
>>>>>
>>>>>
>>>>>
>>>>>>I have been experimenting with customizing emf generated code using
>>>>>>AspectJ,
>>>>>>[and so far it has been pretty close to a raging succcess. :) ]
>>>>>>Now I am trying to 'Tree with Columns' editor page to do something
>>>>>>useful. Since the column contents are fairly uniform,
>>>>>>I using AspectJ to essentially create a mixin trait to inherit into
>>>>>>all my item providers (see code below).
>>>>>>My model is generated from an XSD (that explains the odd classnames)
>>>>>>and comes in 2 packages.
>>>>>>So I have created three trivial interfaces:
>>>>>>and andcestor for all item providers, and 2 specializations of it (1
>>>>>>for each package).
>>>>>>
>>>>>>I the aspect I then make the generated item providers implement the
>>>>>>new interfaces and I make the new top inteface provide default
>>>>>>implementations
>>>>>>for the ITableItemLabelProvider interface and declare the it to
>>>>>>extend all the item provider interfaces.
>>>>>>
>>>>>>Finally I add _1ItemProviderAdapterFactory.new() to the supportedTypes
>>>>>>list of the adapter factory in each package using after advice on its
>>>>>>constructor.
>>>>>>
>>>>>>As far as I understand the EMF framework, this should do it,
>>>>>>since now all the item providers implement ITableItemLabelProvider
>>>>>>and both the adapter factories support it.
>>>>>>However, when I run the plugin,
>>>>>>I only get the new behaviour for the document root node
>>>>>>and all the descendants revert to the eclipse default behavior,
>>>>>>of showing the same information in both columns.
>>>>>>According to the AJDT tools my advice is being applied to all my
>>>>>>classes, so I do not know what is going on.
>>>>>>Any advice appreciated.
>>>>>>
>>>>>>thanks
>>>>>>D
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>public interface CrcsItemProvider {
>>>>>>
>>>>>>}
>>>>>>
>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>public interface CCSItemProvider extends CrcsItemProvider {
>>>>>>
>>>>>>}
>>>>>>
>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>public interface RCSItemProvider extends CrcsItemProvider {
>>>>>>
>>>>>>}
>>>>>>
>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>
>>>>>>public privileged aspect TextProvider {
>>>>>>
>>>>>> declare parents: com.rightscom.ns.ccs.provider.*Provider
>>>>>> implements
>>>>>>CCSItemProvider;
>>>>>>
>>>>>> declare parents:
>>>>>> org.relaxng.ns.structure._1.provider.*Provider
>>>>>>implements RCSItemProvider;
>>>>>>
>>>>>> declare parents: CrcsItemProvider implements
>>>>>> ITableItemLabelProvider, IEditingDomainItemProvider,
>>>>>> IStructuredItemContentProvider,
>>>>>> ITreeItemContentProvider,
>>>>>> IItemLabelProvider,
>>>>>> IItemPropertySource;
>>>>>>
>>>>>> ////////////////////////////
>>>>>>
>>>>>> public String CrcsItemProvider.getColumnText (Object o, int i)
>>>>>> {
>>>>>> String res = null;
>>>>>> switch (i) {
>>>>>> case 0: res = getText(o); break;
>>>>>> default: res ="ZZZZZZZZ"; break;
>>>>>> }
>>>>>> return res;
>>>>>> }
>>>>>>
>>>>>> public Object CrcsItemProvider.getColumnImage (Object o, int
>>>>>> i)
>>>>>> {
>>>>>> Object res = null;
>>>>>> switch (i) {
>>>>>> case 0: res = getImage(o); break;
>>>>>> default: res =null; break;
>>>>>> }
>>>>>> return getImage(o);
>>>>>> }
>>>>>>
>>>>>> after (CcsItemProviderAdapterFactory t) returning:
>>>>>> execution(CcsItemProviderAdapterFactory.new())
>>>>>> && this(t) {
>>>>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>>>>> }
>>>>>>
>>>>>> after (_1ItemProviderAdapterFactory t) returning:
>>>>>> execution(_1ItemProviderAdapterFactory.new())
>>>>>> && this(t) {
>>>>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>>>>> }
>>>>>>....
>>>>>>}
>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>
>>
>>
|
|
| |
Re: implementing ITableItemLabelProvider with aspects [message #66456 is a reply to message #66408] |
Tue, 25 July 2006 12:38 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
This is a multi-part message in MIME format.
--------------080308050705010200080509
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
D,
It would be really good if you could provide a test case where we could
explore this issue in detail. One approach to try is to reuse your
derived DelegatingWrapper, CC, and pass in null for the feature and
CommandParameter.NO_INDEX for the index. I don't know of a way to turn
a tree view into text. I suppose a screen capture pasted as an image
won't work for you?
dmahler@gmail.com wrote:
> Ed,
>
> It looks like a plain DelegatingWrapperItemProvider is getting passed in.
> Its delegateItmeProvider and owner are instances of the inner AA class
> though and its adapterFactory is also mine.
> After setting a breakpoint on DelegatingWrapperItemProvider constructors
> It looks like the callchain on the AA istance is
> getChildren() -> updateChildren() -> createWrapper(..).
> All these are inherited from DelegatingWrapperItemProvider,
> and DelegatingWrapperItemProvider.createWrapper calls the constructor
>
> protected IWrapperItemProvider createWrapper(Object value, Object owner,
> AdapterFactory adapterFactory)
> {
> return new DelegatingWrapperItemProvider(value, owner, adapterFactory);
> }
>
> so we get a raw DelegatingWrapperItemProvider instance.
> I looked at verring createWrapper in AA, but the AA constructor
> seems to need more information then is available at the createWrapper call.
> BTW is there a way to extrect plain text representation from the debug
> perspective to paste into emails?
>
> thanks
> D
>
>
> Ed Merks wrote:
>
>
>> D,
>>
>> Yes, this should do the trick. Set a breakpoint
>> AdapterFactoryLabelProvider.getColumnText and see what's happening there
>> for the case that it's not working.
>>
>>
>> dmahler@gmail.com wrote:
>>
>>
>>> Ed,
>>>
>>> I've now implemented the the following extension to ItemProviderAdapter,
>>> and made all my item providers inherit that instead (no aspects).
>>> supportedTypes.add(ITableItemLabelProvider.class);
>>>
>>> The "Tree with Columns" view now works correctly for the first 2 levels
>>> of the tree, but still reverts to the default Tree view behaviour after
>>> that.
>>>
>>> According to my understanding of the EMF book, this and the
>>>
>>> supportedTypes.add(ITableItemLabelProvider.class);
>>>
>>> lines in the *ItemProviderAdapterFactory constructors should be all that
>>> is needed.
>>>
>>> thanks
>>> D
>>>
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++
>>> package com.rightscom.crcs;
>>>
>>> import org.eclipse.emf.common.notify.AdapterFactory;
>>>
>>> import org.eclipse.emf.ecore.*;
>>> import org.eclipse.emf.ecore.util.*;
>>> import org.eclipse.emf.common.util.*;
>>> import org.eclipse.emf.edit.provider.*;
>>>
>>> public class CRCSItemProviderAdapter extends ItemProviderAdapter
>>> implements ITableItemLabelProvider
>>> {
>>>
>>> public CRCSItemProviderAdapter(AdapterFactory adapterFactory) {
>>> super(adapterFactory);
>>> // TODO Auto-generated constructor stub
>>> }
>>>
>>>
>>> public String getColumnText (Object o, int i) {
>>> String res="ZZ "+getText(o)+" :: "+String.valueOf(i);
>>> return res;
>>> }
>>>
>>> public Object getColumnImage (Object o, int i) {
>>> Object res = null;
>>> switch (i) {
>>> default: res = getImage(o); break;
>>> }
>>> return res;
>>> }
>>>
>>> @Override
>>> protected Object createWrapper(EObject object, EStructuralFeature
>>> feature,
>>> Object value, int index)
>>> {
>>> if (!isWrappingNeeded(object)) return value;
>>>
>>> if (FeatureMapUtil.isFeatureMap(feature))
>>> {
>>> class AA extends FeatureMapEntryWrapperItemProvider
>>> implements
>>> ITableItemLabelProvider
>>> {
>>> public AA (FeatureMap.Entry entry, EObject
>>> owner, EAttribute attribute,
>>> int index, AdapterFactory adapterFactory, ResourceLocator resourceLocator)
>>> {
>>> super(entry, owner, attribute,
>>> index, adapterFactory,
>>> resourceLocator);
>>> }
>>> public String getColumnText (Object o, int
>>> i) {
>>> String res="AA "+getText(o)+" ::
>>> "+String.valueOf(i); return res;
>>> }
>>> public Object getColumnImage (Object o,
>>> int i) {
>>> Object res = null;
>>> switch (i) {
>>> default: res = getImage(o); break;
>>> }
>>> return res;
>>> }
>>> }
>>> value = new AA ((FeatureMap.Entry)value, object,
>>> (EAttribute)feature,
>>> index, adapterFactory, getResourceLocator());
>>> }
>>> else if (feature instanceof EAttribute)
>>> {
>>> class BB extends AttributeValueWrapperItemProvider
>>> implements
>>> ITableItemLabelProvider
>>> {
>>> public BB(Object value, EObject owner,
>>> EAttribute attribute,
>>> AdapterFactory adapterFactory, ResourceLocator resourceLocator) {
>>> super(value, owner, attribute,
>>> adapterFactory, resourceLocator);
>>> // TODO Auto-generated constructor
>>> stub
>>> }
>>> public BB(Object value, EObject owner,
>>> EAttribute attribute, int index,
>>> AdapterFactory adapterFactory, ResourceLocator resourceLocator) {
>>> super(value, owner, attribute,
>>> index, adapterFactory,
>>> resourceLocator);
>>> }
>>> public String getColumnText (Object o, int
>>> i) {
>>> String res="BB "+ getText(o)+" ::
>>> "+String.valueOf(i); return res;
>>> }
>>> public Object getColumnImage (Object o,
>>> int i) {
>>> Object res = null;
>>> switch (i) {
>>> default: res = getImage(o); break;
>>> }
>>> return res;
>>> }
>>> }
>>> value = new BB(value, object, (EAttribute)feature, index,
>>> adapterFactory, getResourceLocator());
>>> }
>>> else if (!((EReference)feature).isContainment())
>>> {
>>> class CC extends DelegatingWrapperItemProvider
>>> implements
>>> ITableItemLabelProvider
>>> {
>>> public CC(Object value, Object owner,
>>> EStructuralFeature feature, int
>>> index, AdapterFactory adapterFactory) {
>>> super(value, owner, feature,
>>> index, adapterFactory);
>>> }
>>> public String getColumnText (Object o, int
>>> i) {
>>> String res="CC " + getText(o)+" ::
>>> "+String.valueOf(i); return res;
>>> }
>>>
>>> public Object getColumnImage (Object o,
>>> int i) {
>>> Object res = null;
>>> switch (i) {
>>> default: res = getImage(o); break;
>>> }
>>> return res;
>>> }
>>>
>>> }
>>> value = new CC (value, object, feature, index,
>>> adapterFactory);
>>> }
>>> return value;
>>> }
>>> }
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++
>>>
>>>
>>> Ed Merks wrote:
>>>
>>>
>>>
>>>
>>>> D,
>>>>
>>>> Unfortunately I don't understand the aspect stuff well enough to say
>>>> intelligent things. I think your approach will still work. I'll answer
>>>> in terms of what I'd do without aspects to support this. I.e., I'd
>>>> create a derived wrapper MyFeatureMapEntryWrapperItemProvider that
>>>> implements the API that my factory wants to support.
>>>>
>>>> protected Object createWrapper(EObject object, EStructuralFeature
>>>> feature, Object value, int index)
>>>> {
>>>> if (!isWrappingNeeded(object)) return value;
>>>>
>>>> if (FeatureMapUtil.isFeatureMap(feature))
>>>> {
>>>> class MyFeatureMapEntryWrapperItemProvider extends
>>>> FeatureMapEntryWrapperItemProvider implements ITableItemLabelProvider
>>>> {
>>>> public MyFeatureMapEntryWrapperItemProvider(
>>>> FeatureMap.Entry entry,
>>>> EObject owner,
>>>> EAttribute attribute,
>>>> int index,
>>>> AdapterFactory adapterFactory,
>>>> ResourceLocator resourceLocator)
>>>> {
>>>> super(entry, owner, attribute, index, adapterFactory,
>>>> resourceLocator);
>>>> }
>>>>
>>>> public Object getColumnImage(Object object, int columnIndex)
>>>> {
>>>> // TODO Auto-generated method stub
>>>> return null;
>>>> }
>>>>
>>>> public String getColumnText(Object object, int columnIndex)
>>>> {
>>>> // TODO Auto-generated method stub
>>>> return null;
>>>> }
>>>> }
>>>> value = new
>>>> MyFeatureMapEntryWrapperItemProvider((FeatureMap.Entry)value ,
>>>> object, (EAttribute)feature, index, adapterFactory,
>>>> getResourceLocator());
>>>> }
>>>>
>>>>
>>>>
>>>>
>>>> dmahler@gmail.com wrote:
>>>>
>>>>
>>>>
>>>>> Thanks again Ed!
>>>>>
>>>>> Could you expand on that little though,
>>>>> I've only been working with Eclipse for less than a month.
>>>>>
>>>>> What are my options? Can I add the missing APIs myself?
>>>>> How do I find out what exactly needs adding?
>>>>> Is this an Eclipse bug? Should I report it somewhere?
>>>>> Does it mean the AOP approach to customization is flawed in this
>>>>> particular case? or more generally?
>>>>>
>>>>> thanks
>>>>> D
>>>>>
>>>>>
>>>>> Ed Merks wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> D,
>>>>>>
>>>>>> Probably wrappers are being created by this ItemProviderAdapter method
>>>>>> and the wrappers are not implementing all the APIs you need them to
>>>>>> implement.
>>>>>>
>>>>>> protected Object createWrapper(EObject object, EStructuralFeature
>>>>>> feature, Object value, int index)
>>>>>> {
>>>>>> if (!isWrappingNeeded(object)) return value;
>>>>>>
>>>>>> if (FeatureMapUtil.isFeatureMap(feature))
>>>>>> {
>>>>>> value = new
>>>>>> *FeatureMapEntryWrapperItemProvider*((FeatureMap.Entry)value ,
>>>>>> object, (EAttribute)feature, index, adapterFactory,
>>>>>> getResourceLocator());
>>>>>> }
>>>>>> else if (feature instanceof EAttribute)
>>>>>> {
>>>>>> value = new *AttributeValueWrapperItemProvider*(value,
>>>>>> object,
>>>>>> (EAttribute)feature, index, adapterFactory, getResourceLocator());
>>>>>> }
>>>>>> else if (!((EReference)feature).isContainment())
>>>>>> {
>>>>>> value = new *DelegatingWrapperItemProvider*(value, object,
>>>>>> feature, index, adapterFactory);
>>>>>> }
>>>>>>
>>>>>> return value;
>>>>>> }
>>>>>>
>>>>>> dmahler@gmail.com wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> I have been experimenting with customizing emf generated code using
>>>>>>> AspectJ,
>>>>>>> [and so far it has been pretty close to a raging succcess. :) ]
>>>>>>> Now I am trying to 'Tree with Columns' editor page to do something
>>>>>>> useful. Since the column contents are fairly uniform,
>>>>>>> I using AspectJ to essentially create a mixin trait to inherit into
>>>>>>> all my item providers (see code below).
>>>>>>> My model is generated from an XSD (that explains the odd classnames)
>>>>>>> and comes in 2 packages.
>>>>>>> So I have created three trivial interfaces:
>>>>>>> and andcestor for all item providers, and 2 specializations of it (1
>>>>>>> for each package).
>>>>>>>
>>>>>>> I the aspect I then make the generated item providers implement the
>>>>>>> new interfaces and I make the new top inteface provide default
>>>>>>> implementations
>>>>>>> for the ITableItemLabelProvider interface and declare the it to
>>>>>>> extend all the item provider interfaces.
>>>>>>>
>>>>>>> Finally I add _1ItemProviderAdapterFactory.new() to the supportedTypes
>>>>>>> list of the adapter factory in each package using after advice on its
>>>>>>> constructor.
>>>>>>>
>>>>>>> As far as I understand the EMF framework, this should do it,
>>>>>>> since now all the item providers implement ITableItemLabelProvider
>>>>>>> and both the adapter factories support it.
>>>>>>> However, when I run the plugin,
>>>>>>> I only get the new behaviour for the document root node
>>>>>>> and all the descendants revert to the eclipse default behavior,
>>>>>>> of showing the same information in both columns.
>>>>>>> According to the AJDT tools my advice is being applied to all my
>>>>>>> classes, so I do not know what is going on.
>>>>>>> Any advice appreciated.
>>>>>>>
>>>>>>> thanks
>>>>>>> D
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>> public interface CrcsItemProvider {
>>>>>>>
>>>>>>> }
>>>>>>>
>>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>> public interface CCSItemProvider extends CrcsItemProvider {
>>>>>>>
>>>>>>> }
>>>>>>>
>>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>> public interface RCSItemProvider extends CrcsItemProvider {
>>>>>>>
>>>>>>> }
>>>>>>>
>>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>>
>>>>>>> public privileged aspect TextProvider {
>>>>>>>
>>>>>>> declare parents: com.rightscom.ns.ccs.provider.*Provider
>>>>>>> implements
>>>>>>> CCSItemProvider;
>>>>>>>
>>>>>>> declare parents:
>>>>>>> org.relaxng.ns.structure._1.provider.*Provider
>>>>>>> implements RCSItemProvider;
>>>>>>>
>>>>>>> declare parents: CrcsItemProvider implements
>>>>>>> ITableItemLabelProvider, IEditingDomainItemProvider,
>>>>>>> IStructuredItemContentProvider,
>>>>>>> ITreeItemContentProvider,
>>>>>>> IItemLabelProvider,
>>>>>>> IItemPropertySource;
>>>>>>>
>>>>>>> ////////////////////////////
>>>>>>>
>>>>>>> public String CrcsItemProvider.getColumnText (Object o, int i)
>>>>>>> {
>>>>>>> String res = null;
>>>>>>> switch (i) {
>>>>>>> case 0: res = getText(o); break;
>>>>>>> default: res ="ZZZZZZZZ"; break;
>>>>>>> }
>>>>>>> return res;
>>>>>>> }
>>>>>>>
>>>>>>> public Object CrcsItemProvider.getColumnImage (Object o, int
>>>>>>> i)
>>>>>>> {
>>>>>>> Object res = null;
>>>>>>> switch (i) {
>>>>>>> case 0: res = getImage(o); break;
>>>>>>> default: res =null; break;
>>>>>>> }
>>>>>>> return getImage(o);
>>>>>>> }
>>>>>>>
>>>>>>> after (CcsItemProviderAdapterFactory t) returning:
>>>>>>> execution(CcsItemProviderAdapterFactory.new())
>>>>>>> && this(t) {
>>>>>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>>>>>> }
>>>>>>>
>>>>>>> after (_1ItemProviderAdapterFactory t) returning:
>>>>>>> execution(_1ItemProviderAdapterFactory.new())
>>>>>>> && this(t) {
>>>>>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>>>>>> }
>>>>>>> ....
>>>>>>> }
>>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>>
>>>
>
>
--------------080308050705010200080509
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
D,<br>
<br>
It would be really good if you could provide a test case where we could
explore this issue in detail. One approach to try is to reuse your
derived DelegatingWrapper, CC, and pass in null for the feature and
CommandParameter.NO_INDEX for the index. I don't know of a way to turn
a tree view into text. I suppose a screen capture pasted as an image
won't work for you?<br>
<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:dmahler@gmail.com">dmahler@gmail.com</a> wrote:
<blockquote cite="midea3oip$fg3$1@utils.eclipse.org" type="cite">
<pre wrap="">Ed,
It looks like a plain DelegatingWrapperItemProvider is getting passed in.
Its delegateItmeProvider and owner are instances of the inner AA class
though and its adapterFactory is also mine.
After setting a breakpoint on DelegatingWrapperItemProvider constructors
It looks like the callchain on the AA istance is
getChildren() -> updateChildren() -> createWrapper(..).
All these are inherited from DelegatingWrapperItemProvider,
and DelegatingWrapperItemProvider.createWrapper calls the constructor
protected IWrapperItemProvider createWrapper(Object value, Object owner,
AdapterFactory adapterFactory)
{
return new DelegatingWrapperItemProvider(value, owner, adapterFactory);
}
so we get a raw DelegatingWrapperItemProvider instance.
I looked at verring createWrapper in AA, but the AA constructor
seems to need more information then is available at the createWrapper call.
BTW is there a way to extrect plain text representation from the debug
perspective to paste into emails?
thanks
D
Ed Merks wrote:
</pre>
<blockquote type="cite">
<pre wrap="">D,
Yes, this should do the trick. Set a breakpoint
AdapterFactoryLabelProvider.getColumnText and see what's happening there
for the case that it's not working.
<a class="moz-txt-link-abbreviated" href="mailto:dmahler@gmail.com">dmahler@gmail.com</a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Ed,
I've now implemented the the following extension to ItemProviderAdapter,
and made all my item providers inherit that instead (no aspects).
supportedTypes.add(ITableItemLabelProvider.class);
The "Tree with Columns" view now works correctly for the first 2 levels
of the tree, but still reverts to the default Tree view behaviour after
that.
According to my understanding of the EMF book, this and the
supportedTypes.add(ITableItemLabelProvider.class);
lines in the *ItemProviderAdapterFactory constructors should be all that
is needed.
thanks
D
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++
package com.rightscom.crcs;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.ecore.*;
import org.eclipse.emf.ecore.util.*;
import org.eclipse.emf.common.util.*;
import org.eclipse.emf.edit.provider.*;
public class CRCSItemProviderAdapter extends ItemProviderAdapter
implements ITableItemLabelProvider
{
public CRCSItemProviderAdapter(AdapterFactory adapterFactory) {
super(adapterFactory);
// TODO Auto-generated constructor stub
}
public String getColumnText (Object o, int i) {
String res="ZZ "+getText(o)+" :: "+String.valueOf(i);
return res;
}
public Object getColumnImage (Object o, int i) {
Object res = null;
switch (i) {
default: res = getImage(o); break;
}
return res;
}
@Override
protected Object createWrapper(EObject object, EStructuralFeature
feature,
Object value, int index)
{
if (!isWrappingNeeded(object)) return value;
if (FeatureMapUtil.isFeatureMap(feature))
{
class AA extends FeatureMapEntryWrapperItemProvider
implements
ITableItemLabelProvider
{
public AA (FeatureMap.Entry entry, EObject
owner, EAttribute attribute,
int index, AdapterFactory adapterFactory, ResourceLocator resourceLocator)
{
super(entry, owner, attribute,
index, adapterFactory,
resourceLocator);
}
public String getColumnText (Object o, int
i) {
String res="AA "+getText(o)+" ::
"+String.valueOf(i); return res;
}
public Object getColumnImage (Object o,
int i) {
Object res = null;
switch (i) {
default: res = getImage(o); break;
}
return res;
}
}
value = new AA ((FeatureMap.Entry)value, object,
(EAttribute)feature,
index, adapterFactory, getResourceLocator());
}
else if (feature instanceof EAttribute)
{
class BB extends AttributeValueWrapperItemProvider
implements
ITableItemLabelProvider
{
public BB(Object value, EObject owner,
EAttribute attribute,
AdapterFactory adapterFactory, ResourceLocator resourceLocator) {
super(value, owner, attribute,
adapterFactory, resourceLocator);
// TODO Auto-generated constructor
stub
}
public BB(Object value, EObject owner,
EAttribute attribute, int index,
AdapterFactory adapterFactory, ResourceLocator resourceLocator) {
super(value, owner, attribute,
index, adapterFactory,
resourceLocator);
}
public String getColumnText (Object o, int
i) {
String res="BB "+ getText(o)+" ::
"+String.valueOf(i); return res;
}
public Object getColumnImage (Object o,
int i) {
Object res = null;
switch (i) {
default: res = getImage(o); break;
}
return res;
}
}
value = new BB(value, object, (EAttribute)feature, index,
adapterFactory, getResourceLocator());
}
else if (!((EReference)feature).isContainment())
{
class CC extends DelegatingWrapperItemProvider
implements
ITableItemLabelProvider
{
public CC(Object value, Object owner,
EStructuralFeature feature, int
index, AdapterFactory adapterFactory) {
super(value, owner, feature,
index, adapterFactory);
}
public String getColumnText (Object o, int
i) {
String res="CC " + getText(o)+" ::
"+String.valueOf(i); return res;
}
public Object getColumnImage (Object o,
int i) {
Object res = null;
switch (i) {
default: res = getImage(o); break;
}
return res;
}
}
value = new CC (value, object, feature, index,
adapterFactory);
}
return value;
}
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++
Ed Merks wrote:
</pre>
<blockquote type="cite">
<pre wrap="">D,
Unfortunately I don't understand the aspect stuff well enough to say
intelligent things. I think your approach will still work. I'll answer
in terms of what I'd do without aspects to support this. I.e., I'd
create a derived wrapper MyFeatureMapEntryWrapperItemProvider that
implements the API that my factory wants to support.
protected Object createWrapper(EObject object, EStructuralFeature
feature, Object value, int index)
{
if (!isWrappingNeeded(object)) return value;
if (FeatureMapUtil.isFeatureMap(feature))
{
class MyFeatureMapEntryWrapperItemProvider extends
FeatureMapEntryWrapperItemProvider implements ITableItemLabelProvider
{
public MyFeatureMapEntryWrapperItemProvider(
FeatureMap.Entry entry,
EObject owner,
EAttribute attribute,
int index,
AdapterFactory adapterFactory,
ResourceLocator resourceLocator)
{
super(entry, owner, attribute, index, adapterFactory,
resourceLocator);
}
public Object getColumnImage(Object object, int columnIndex)
{
// TODO Auto-generated method stub
return null;
}
public String getColumnText(Object object, int columnIndex)
{
// TODO Auto-generated method stub
return null;
}
}
value = new
MyFeatureMapEntryWrapperItemProvider((FeatureMap.Entry)value ,
object, (EAttribute)feature, index, adapterFactory,
getResourceLocator());
}
<a class="moz-txt-link-abbreviated" href="mailto:dmahler@gmail.com">dmahler@gmail.com</a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Thanks again Ed!
Could you expand on that little though,
I've only been working with Eclipse for less than a month.
What are my options? Can I add the missing APIs myself?
How do I find out what exactly needs adding?
Is this an Eclipse bug? Should I report it somewhere?
Does it mean the AOP approach to customization is flawed in this
particular case? or more generally?
thanks
D
Ed Merks wrote:
</pre>
<blockquote type="cite">
<pre wrap="">D,
Probably wrappers are being created by this ItemProviderAdapter method
and the wrappers are not implementing all the APIs you need them to
implement.
protected Object createWrapper(EObject object, EStructuralFeature
feature, Object value, int index)
{
if (!isWrappingNeeded(object)) return value;
if (FeatureMapUtil.isFeatureMap(feature))
{
value = new
*FeatureMapEntryWrapperItemProvider*((FeatureMap.Entry)value ,
object, (EAttribute)feature, index, adapterFactory,
getResourceLocator());
}
else if (feature instanceof EAttribute)
{
value = new *AttributeValueWrapperItemProvider*(value,
object,
(EAttribute)feature, index, adapterFactory, getResourceLocator());
}
else if (!((EReference)feature).isContainment())
{
value = new *DelegatingWrapperItemProvider*(value, object,
feature, index, adapterFactory);
}
return value;
}
<a class="moz-txt-link-abbreviated" href="mailto:dmahler@gmail.com">dmahler@gmail.com</a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I have been experimenting with customizing emf generated code using
AspectJ,
[and so far it has been pretty close to a raging succcess. :) ]
Now I am trying to 'Tree with Columns' editor page to do something
useful. Since the column contents are fairly uniform,
I using AspectJ to essentially create a mixin trait to inherit into
all my item providers (see code below).
My model is generated from an XSD (that explains the odd classnames)
and comes in 2 packages.
So I have created three trivial interfaces:
and andcestor for all item providers, and 2 specializations of it (1
for each package).
I the aspect I then make the generated item providers implement the
new interfaces and I make the new top inteface provide default
implementations
for the ITableItemLabelProvider interface and declare the it to
extend all the item provider interfaces.
Finally I add _1ItemProviderAdapterFactory.new() to the supportedTypes
list of the adapter factory in each package using after advice on its
constructor.
As far as I understand the EMF framework, this should do it,
since now all the item providers implement ITableItemLabelProvider
and both the adapter factories support it.
However, when I run the plugin,
I only get the new behaviour for the document root node
and all the descendants revert to the eclipse default behavior,
of showing the same information in both columns.
According to the AJDT tools my advice is being applied to all my
classes, so I do not know what is going on.
Any advice appreciated.
thanks
D
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public interface CrcsItemProvider {
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public interface CCSItemProvider extends CrcsItemProvider {
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public interface RCSItemProvider extends CrcsItemProvider {
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public privileged aspect TextProvider {
declare parents: com.rightscom.ns.ccs.provider.*Provider
implements
CCSItemProvider;
declare parents:
org.relaxng.ns.structure._1.provider.*Provider
implements RCSItemProvider;
declare parents: CrcsItemProvider implements
ITableItemLabelProvider, IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
IItemLabelProvider,
IItemPropertySource;
////////////////////////////
public String CrcsItemProvider.getColumnText (Object o, int i)
{
String res = null;
switch (i) {
case 0: res = getText(o); break;
default: res ="ZZZZZZZZ"; break;
}
return res;
}
public Object CrcsItemProvider.getColumnImage (Object o, int
i)
{
Object res = null;
switch (i) {
case 0: res = getImage(o); break;
default: res =null; break;
}
return getImage(o);
}
after (CcsItemProviderAdapterFactory t) returning:
execution(CcsItemProviderAdapterFactory.new())
&& this(t) {
t.supportedTypes.add(ITableItemLabelProvider.class);
}
after (_1ItemProviderAdapterFactory t) returning:
execution(_1ItemProviderAdapterFactory.new())
&& this(t) {
t.supportedTypes.add(ITableItemLabelProvider.class);
}
.....
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
</pre>
</blockquote>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
<br>
</body>
</html>
--------------080308050705010200080509--
|
|
|
Re: implementing ITableItemLabelProvider with aspects [message #66492 is a reply to message #66456] |
Tue, 25 July 2006 20:05 |
Daniel Mahler Messages: 53 Registered: July 2009 |
Member |
|
|
--nextPart26859135.E4ct18iyiN
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8Bit
Ed,
I have reproduced the problem for the mindmap.xsd project
that is used in the tutorials.
It which is attached.
Just import it, run it, and load this model.
<?xml version="1.0" encoding="UTF-8"?>
<mindmap:map xmlns:mindmap="http://www.example.org/mindmap">
<rootTopics>
<comments>
<items/>
</comments>
</rootTopics>
<relations/>
<resources/>
<resources/>
</mindmap:map>
and switch to the Tree with Columns view.
Don't regenerate though, as I have not killed all the @generated markers.
D
Ed Merks wrote:
> D,
>
> It would be really good if you could provide a test case where we could
> explore this issue in detail. One approach to try is to reuse your
> derived DelegatingWrapper, CC, and pass in null for the feature and
> CommandParameter.NO_INDEX for the index. I don't know of a way to turn
> a tree view into text. I suppose a screen capture pasted as an image
> won't work for you?
>
>
> dmahler@gmail.com wrote:
>> Ed,
>>
>> It looks like a plain DelegatingWrapperItemProvider is getting passed in.
>> Its delegateItmeProvider and owner are instances of the inner AA class
>> though and its adapterFactory is also mine.
>> After setting a breakpoint on DelegatingWrapperItemProvider constructors
>> It looks like the callchain on the AA istance is
>> getChildren() -> updateChildren() -> createWrapper(..).
>> All these are inherited from DelegatingWrapperItemProvider,
>> and DelegatingWrapperItemProvider.createWrapper calls the constructor
>>
>> protected IWrapperItemProvider createWrapper(Object value, Object owner,
>> AdapterFactory adapterFactory)
>> {
>> return new DelegatingWrapperItemProvider(value, owner,
>> adapterFactory);
>> }
>>
>> so we get a raw DelegatingWrapperItemProvider instance.
>> I looked at verring createWrapper in AA, but the AA constructor
>> seems to need more information then is available at the createWrapper
>> call. BTW is there a way to extrect plain text representation from the
>> debug perspective to paste into emails?
>>
>> thanks
>> D
>>
>>
>> Ed Merks wrote:
>>
>>
>>> D,
>>>
>>> Yes, this should do the trick. Set a breakpoint
>>> AdapterFactoryLabelProvider.getColumnText and see what's happening there
>>> for the case that it's not working.
>>>
>>>
>>> dmahler@gmail.com wrote:
>>>
>>>
>>>> Ed,
>>>>
>>>> I've now implemented the the following extension to
>>>> ItemProviderAdapter, and made all my item providers inherit that
>>>> instead (no aspects).
>>>> supportedTypes.add(ITableItemLabelProvider.class);
>>>>
>>>> The "Tree with Columns" view now works correctly for the first 2 levels
>>>> of the tree, but still reverts to the default Tree view behaviour after
>>>> that.
>>>>
>>>> According to my understanding of the EMF book, this and the
>>>>
>>>> supportedTypes.add(ITableItemLabelProvider.class);
>>>>
>>>> lines in the *ItemProviderAdapterFactory constructors should be all
>>>> that is needed.
>>>>
>>>> thanks
>>>> D
>>>>
>>>>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++
>>>> package com.rightscom.crcs;
>>>>
>>>> import org.eclipse.emf.common.notify.AdapterFactory;
>>>>
>>>> import org.eclipse.emf.ecore.*;
>>>> import org.eclipse.emf.ecore.util.*;
>>>> import org.eclipse.emf.common.util.*;
>>>> import org.eclipse.emf.edit.provider.*;
>>>>
>>>> public class CRCSItemProviderAdapter extends ItemProviderAdapter
>>>> implements ITableItemLabelProvider
>>>> {
>>>>
>>>> public CRCSItemProviderAdapter(AdapterFactory adapterFactory) {
>>>> super(adapterFactory);
>>>> // TODO Auto-generated constructor stub
>>>> }
>>>>
>>>>
>>>> public String getColumnText (Object o, int i) {
>>>> String res="ZZ "+getText(o)+" :: "+String.valueOf(i);
>>>> return res;
>>>> }
>>>>
>>>> public Object getColumnImage (Object o, int i) {
>>>> Object res = null;
>>>> switch (i) {
>>>> default: res = getImage(o); break;
>>>> }
>>>> return res;
>>>> }
>>>>
>>>> @Override
>>>> protected Object createWrapper(EObject object,
>>>> EStructuralFeature feature,
>>>> Object value, int index)
>>>> {
>>>> if (!isWrappingNeeded(object)) return value;
>>>>
>>>> if (FeatureMapUtil.isFeatureMap(feature))
>>>> {
>>>> class AA extends FeatureMapEntryWrapperItemProvider
>>>> implements
>>>> ITableItemLabelProvider
>>>> {
>>>> public AA (FeatureMap.Entry entry,
>>>> EObject owner, EAttribute attribute,
>>>> int index, AdapterFactory adapterFactory, ResourceLocator
>>>> resourceLocator)
>>>> {
>>>> super(entry, owner, attribute,
>>>> index, adapterFactory,
>>>> resourceLocator);
>>>> }
>>>> public String getColumnText (Object o,
>>>> int i) {
>>>> String res="AA "+getText(o)+" ::
>>>> "+String.valueOf(i); return res;
>>>> }
>>>> public Object getColumnImage (Object o,
>>>> int i) {
>>>> Object res = null;
>>>> switch (i) {
>>>> default: res = getImage(o);
>>>> break; }
>>>> return res;
>>>> }
>>>> }
>>>> value = new AA ((FeatureMap.Entry)value, object,
>>>> (EAttribute)feature,
>>>> index, adapterFactory, getResourceLocator());
>>>> }
>>>> else if (feature instanceof EAttribute)
>>>> {
>>>> class BB extends AttributeValueWrapperItemProvider
>>>> implements
>>>> ITableItemLabelProvider
>>>> {
>>>> public BB(Object value, EObject owner,
>>>> EAttribute attribute,
>>>> AdapterFactory adapterFactory, ResourceLocator resourceLocator) {
>>>> super(value, owner, attribute,
>>>> adapterFactory,
>>>> resourceLocator); // TODO
>>>> Auto-generated constructor stub
>>>> }
>>>> public BB(Object value, EObject owner,
>>>> EAttribute attribute, int index,
>>>> AdapterFactory adapterFactory, ResourceLocator resourceLocator) {
>>>> super(value, owner, attribute,
>>>> index, adapterFactory,
>>>> resourceLocator);
>>>> }
>>>> public String getColumnText (Object o,
>>>> int i) {
>>>> String res="BB "+ getText(o)+"
>>>> :: "+String.valueOf(i); return
>>>> res;
>>>> }
>>>> public Object getColumnImage (Object o,
>>>> int i) {
>>>> Object res = null;
>>>> switch (i) {
>>>> default: res = getImage(o);
>>>> break; }
>>>> return res;
>>>> }
>>>> }
>>>> value = new BB(value, object, (EAttribute)feature, index,
>>>> adapterFactory, getResourceLocator());
>>>> }
>>>> else if (!((EReference)feature).isContainment())
>>>> {
>>>> class CC extends DelegatingWrapperItemProvider
>>>> implements
>>>> ITableItemLabelProvider
>>>> {
>>>> public CC(Object value, Object owner,
>>>> EStructuralFeature feature, int
>>>> index, AdapterFactory adapterFactory) {
>>>> super(value, owner, feature,
>>>> index, adapterFactory);
>>>> }
>>>> public String getColumnText (Object o,
>>>> int i) {
>>>> String res="CC " + getText(o)+"
>>>> :: "+String.valueOf(i); return
>>>> res;
>>>> }
>>>>
>>>> public Object getColumnImage (Object o,
>>>> int i) {
>>>> Object res = null;
>>>> switch (i) {
>>>> default: res = getImage(o);
>>>> break; }
>>>> return res;
>>>> }
>>>>
>>>> }
>>>> value = new CC (value, object, feature, index,
>>>> adapterFactory);
>>>> }
>>>> return value;
>>>> }
>>>> }
>>>>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++
>>>>
>>>>
>>>> Ed Merks wrote:
>>>>
>>>>
>>>>
>>>>
>>>>> D,
>>>>>
>>>>> Unfortunately I don't understand the aspect stuff well enough to say
>>>>> intelligent things. I think your approach will still work. I'll
>>>>> answer
>>>>> in terms of what I'd do without aspects to support this. I.e., I'd
>>>>> create a derived wrapper MyFeatureMapEntryWrapperItemProvider that
>>>>> implements the API that my factory wants to support.
>>>>>
>>>>> protected Object createWrapper(EObject object, EStructuralFeature
>>>>> feature, Object value, int index)
>>>>> {
>>>>> if (!isWrappingNeeded(object)) return value;
>>>>>
>>>>> if (FeatureMapUtil.isFeatureMap(feature))
>>>>> {
>>>>> class MyFeatureMapEntryWrapperItemProvider extends
>>>>> FeatureMapEntryWrapperItemProvider implements
>>>>> ITableItemLabelProvider
>>>>> {
>>>>> public MyFeatureMapEntryWrapperItemProvider(
>>>>> FeatureMap.Entry entry,
>>>>> EObject owner,
>>>>> EAttribute attribute,
>>>>> int index,
>>>>> AdapterFactory adapterFactory,
>>>>> ResourceLocator resourceLocator)
>>>>> {
>>>>> super(entry, owner, attribute, index, adapterFactory,
>>>>> resourceLocator);
>>>>> }
>>>>>
>>>>> public Object getColumnImage(Object object, int
>>>>> columnIndex)
>>>>> {
>>>>> // TODO Auto-generated method stub
>>>>> return null;
>>>>> }
>>>>>
>>>>> public String getColumnText(Object object, int columnIndex)
>>>>> {
>>>>> // TODO Auto-generated method stub
>>>>> return null;
>>>>> }
>>>>> }
>>>>> value = new
>>>>> MyFeatureMapEntryWrapperItemProvider((FeatureMap.Entry)value ,
>>>>> object, (EAttribute)feature, index, adapterFactory,
>>>>> getResourceLocator());
>>>>> }
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> dmahler@gmail.com wrote:
>>>>>
>>>>>
>>>>>
>>>>>> Thanks again Ed!
>>>>>>
>>>>>> Could you expand on that little though,
>>>>>> I've only been working with Eclipse for less than a month.
>>>>>>
>>>>>> What are my options? Can I add the missing APIs myself?
>>>>>> How do I find out what exactly needs adding?
>>>>>> Is this an Eclipse bug? Should I report it somewhere?
>>>>>> Does it mean the AOP approach to customization is flawed in this
>>>>>> particular case? or more generally?
>>>>>>
>>>>>> thanks
>>>>>> D
>>>>>>
>>>>>>
>>>>>> Ed Merks wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> D,
>>>>>>>
>>>>>>> Probably wrappers are being created by this ItemProviderAdapter
>>>>>>> method and the wrappers are not implementing all the APIs you need
>>>>>>> them to implement.
>>>>>>>
>>>>>>> protected Object createWrapper(EObject object,
>>>>>>> EStructuralFeature
>>>>>>> feature, Object value, int index)
>>>>>>> {
>>>>>>> if (!isWrappingNeeded(object)) return value;
>>>>>>>
>>>>>>> if (FeatureMapUtil.isFeatureMap(feature))
>>>>>>> {
>>>>>>> value = new
>>>>>>> *FeatureMapEntryWrapperItemProvider*((FeatureMap.Entry)value ,
>>>>>>> object, (EAttribute)feature, index, adapterFactory,
>>>>>>> getResourceLocator());
>>>>>>> }
>>>>>>> else if (feature instanceof EAttribute)
>>>>>>> {
>>>>>>> value = new *AttributeValueWrapperItemProvider*(value,
>>>>>>> object,
>>>>>>> (EAttribute)feature, index, adapterFactory,
>>>>>>> getResourceLocator());
>>>>>>> }
>>>>>>> else if (!((EReference)feature).isContainment())
>>>>>>> {
>>>>>>> value = new *DelegatingWrapperItemProvider*(value, object,
>>>>>>> feature, index, adapterFactory);
>>>>>>> }
>>>>>>>
>>>>>>> return value;
>>>>>>> }
>>>>>>>
>>>>>>> dmahler@gmail.com wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> I have been experimenting with customizing emf generated code using
>>>>>>>> AspectJ,
>>>>>>>> [and so far it has been pretty close to a raging succcess. :) ]
>>>>>>>> Now I am trying to 'Tree with Columns' editor page to do something
>>>>>>>> useful. Since the column contents are fairly uniform,
>>>>>>>> I using AspectJ to essentially create a mixin trait to inherit into
>>>>>>>> all my item providers (see code below).
>>>>>>>> My model is generated from an XSD (that explains the odd
>>>>>>>> classnames) and comes in 2 packages.
>>>>>>>> So I have created three trivial interfaces:
>>>>>>>> and andcestor for all item providers, and 2 specializations of it
>>>>>>>> (1 for each package).
>>>>>>>>
>>>>>>>> I the aspect I then make the generated item providers implement the
>>>>>>>> new interfaces and I make the new top inteface provide default
>>>>>>>> implementations
>>>>>>>> for the ITableItemLabelProvider interface and declare the it to
>>>>>>>> extend all the item provider interfaces.
>>>>>>>>
>>>>>>>> Finally I add _1ItemProviderAdapterFactory.new() to the
>>>>>>>> supportedTypes list of the adapter factory in each package using
>>>>>>>> after advice on its constructor.
>>>>>>>>
>>>>>>>> As far as I understand the EMF framework, this should do it,
>>>>>>>> since now all the item providers implement ITableItemLabelProvider
>>>>>>>> and both the adapter factories support it.
>>>>>>>> However, when I run the plugin,
>>>>>>>> I only get the new behaviour for the document root node
>>>>>>>> and all the descendants revert to the eclipse default behavior,
>>>>>>>> of showing the same information in both columns.
>>>>>>>> According to the AJDT tools my advice is being applied to all my
>>>>>>>> classes, so I do not know what is going on.
>>>>>>>> Any advice appreciated.
>>>>>>>>
>>>>>>>> thanks
>>>>>>>> D
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>>> public interface CrcsItemProvider {
>>>>>>>>
>>>>>>>> }
>>>>>>>>
>>>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>>> public interface CCSItemProvider extends CrcsItemProvider {
>>>>>>>>
>>>>>>>> }
>>>>>>>>
>>>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>>> public interface RCSItemProvider extends CrcsItemProvider {
>>>>>>>>
>>>>>>>> }
>>>>>>>>
>>>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>>>
>>>>>>>> public privileged aspect TextProvider {
>>>>>>>>
>>>>>>>> declare parents: com.rightscom.ns.ccs.provider.*Provider
>>>>>>>> implements
>>>>>>>> CCSItemProvider;
>>>>>>>>
>>>>>>>> declare parents:
>>>>>>>> org.relaxng.ns.structure._1.provider.*Provider
>>>>>>>> implements RCSItemProvider;
>>>>>>>>
>>>>>>>> declare parents: CrcsItemProvider implements
>>>>>>>> ITableItemLabelProvider, IEditingDomainItemProvider,
>>>>>>>> IStructuredItemContentProvider,
>>>>>>>> ITreeItemContentProvider,
>>>>>>>> IItemLabelProvider,
>>>>>>>> IItemPropertySource;
>>>>>>>>
>>>>>>>> ////////////////////////////
>>>>>>>>
>>>>>>>> public String CrcsItemProvider.getColumnText (Object o, int
>>>>>>>> i)
>>>>>>>> {
>>>>>>>> String res = null;
>>>>>>>> switch (i) {
>>>>>>>> case 0: res = getText(o); break;
>>>>>>>> default: res ="ZZZZZZZZ"; break;
>>>>>>>> }
>>>>>>>> return res;
>>>>>>>> }
>>>>>>>>
>>>>>>>> public Object CrcsItemProvider.getColumnImage (Object o, int
>>>>>>>> i)
>>>>>>>> {
>>>>>>>> Object res = null;
>>>>>>>> switch (i) {
>>>>>>>> case 0: res = getImage(o); break;
>>>>>>>> default: res =null; break;
>>>>>>>> }
>>>>>>>> return getImage(o);
>>>>>>>> }
>>>>>>>>
>>>>>>>> after (CcsItemProviderAdapterFactory t) returning:
>>>>>>>> execution(CcsItemProviderAdapterFactory.new())
>>>>>>>> && this(t) {
>>>>>>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>>>>>>> }
>>>>>>>>
>>>>>>>> after (_1ItemProviderAdapterFactory t) returning:
>>>>>>>> execution(_1ItemProviderAdapterFactory.new())
>>>>>>>> && this(t) {
>>>>>>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>>>>>>> }
>>>>>>>> ....
>>>>>>>> }
>>>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>>>
>>
>>
--nextPart26859135.E4ct18iyiN
Content-Type: application/x-zip; name="mindmap.zip"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="mindmap.zip"
UEsDBBQACAAIALGm+TQAAAAAAAAAAAAAAAASAAAAbWluZG1hcC8uY2xhc3Nw YXRolY/LCsIwEEXX
9itC9qa6c9EHIhV0UaXUtdRkaKNxEvMQ/XstUnSj4G7u5XAuk+S3syJXsE5q TOmUTSgB5FpIbFO6
q5fjGc2zKOGqcc40vsui0TsAensnJ4kipc5ySvrydcZfQa5xALVtGXAljQN2 FJ6pJiDvntNsXRX7
xaas56uyqP6XGQGMawvMwiVIC2KrQivR/TDp4E3wg+wgsWeT+OPxB1BLBwg/ HFeoowAAACwBAABQ
SwMEFAAIAAgAsab5NAAAAAAAAAAAAAAAABAAAABtaW5kbWFwLy5wcm9qZWN0 vZLBbgIhFEXX+hVm
9oV21wWOiZru2jTRfgCF58hkeBBgTD/fxwyaamJiYuLu3st9HAKIxZ/tZgcI 0TicV2/stZoBKqcN
NvPqZ/vx8l4t6qnwwbWg0hqiCsYnKtfTiUBpobYGtZVe8MFRqpy1gKkW/KQo LBvErPl/89ubTm88
KDLFrWhMos5BYbjQMFCd8RFYqxNTLpCQBzn0IZzhNCBD02dqHC2/8IJfE+5B eg3sU6LZQUzLpxE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PLsopekbUsX0ivyQZ6XZ5Jb8hF9KZcSm/J i+lteTXL19K78lra
L6+j9+RGel/eRAfkXfSBfIDlbJ18kD6We+gTuZc+lU/SZ/IV+lzuZ/kB+lJ+ QF/JT+hr+Sl9I7+m
b+Wv9J0m6EtNo+81H/2gtaEftbb0H60D/aQdTT9rA1ieRb9qA+k3LYf+q+XS 71oB/aGNoj+1EpZP
ooPaZAlahURtihTaKZK0eVJqC1kekT6tSfq1xVLXlsgUbZlso62SbbW1LF8v U7UNsp12vWyvbZZp
2i2yg3aPTNd2s/xh2VF7RB6hPSY7aY/Lzto+eaT2uuyiHWD5R/Io7WPZTftc Hq19Ibtr38ke2u+y
p0+TR/l02duXIvv4UmVfXzvZz9dR9vf1lAN8WSwfJDNjNbIv266RpS8L++Gf 6sdG/EvtcXjwf1BL
Bwjt150ilhcAACQ9AABQSwMEFAAIAAgAsab5NAAAAAAAAAAAAAAAADsAAABt aW5kbWFwL2Jpbi9v
cmcvZXhhbXBsZS9taW5kbWFwL2ltcGwvUmVsYXRpb25zaGlwSW1wbC5jbGFz c61Xa1RU1xX+jgwM
g9dHURAElBhxXsiIWqOiEh6jjAwjAYRA4+MyXPDqMIMzg9GmbfqwTV9Jmr6J TdrYGltLW1AZmtgm
9rHiWv3Vv3397N++f7Zp9z73zp1huLj80Vnr3rPveez97W/vs8+Z37z/9jsA mvGuE6sEvInkREC7
|
|
|
Re: implementing ITableItemLabelProvider with aspects [message #66524 is a reply to message #66492] |
Wed, 26 July 2006 12:03 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
This is a multi-part message in MIME format.
--------------080700050903080108010302
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
D,
I changed your code like this so that AA and CC both create a new CC:
protected Object createWrapper(EObject object,
EStructuralFeature feature, Object value, int index)
{
class BB extends AttributeValueWrapperItemProvider
implements ITableItemLabelProvider
{
public BB(Object value, EObject owner, EAttribute
attribute, AdapterFactory adapterFactory, ResourceLocator
resourceLocator) {
super(value, owner, attribute, adapterFactory,
resourceLocator);
// TODO Auto-generated constructor stub
}
public BB(Object value, EObject owner, EAttribute
attribute, int index, AdapterFactory adapterFactory, ResourceLocator
resourceLocator) {
super(value, owner, attribute, index,
adapterFactory, resourceLocator);
// TODO Auto-generated constructor stub
}
public String getColumnText (Object o, int i) {
String res="BB "+ getText(o)+" ::
"+String.valueOf(i);
return res;
}
public Object getColumnImage (Object o, int i) {
Object res = null;
switch (i) {
default: res = getImage(o); break;
}
return res;
}
}
class CC extends DelegatingWrapperItemProvider
implements ITableItemLabelProvider
{
public CC(Object value, Object owner,
EStructuralFeature feature, int index, AdapterFactory adapterFactory) {
super(value, owner, feature, index, adapterFactory);
// TODO Auto-generated constructor stub
}
public String getColumnText (Object o, int i) {
String res="CC " + getText(o)+" ::
"+String.valueOf(i);
return res;
}
public Object getColumnImage (Object o, int i) {
Object res = null;
switch (i) {
default: res = getImage(o); break;
}
return res;
}
protected IWrapperItemProvider createWrapper(Object
value, Object owner, AdapterFactory adapterFactory)
{
return new CC(value, owner, null,
CommandParameter.NO_INDEX, adapterFactory);
}
}
class AA extends FeatureMapEntryWrapperItemProvider
implements ITableItemLabelProvider
{
public AA (FeatureMap.Entry entry, EObject owner,
EAttribute attribute, int index, AdapterFactory adapterFactory,
ResourceLocator resourceLocator) {
super(entry, owner, attribute, index,
adapterFactory, resourceLocator);
}
public String getColumnText (Object o, int i) {
String res="AA "+getText(o)+" ::
"+String.valueOf(i);
return res;
}
public Object getColumnImage (Object o, int i) {
Object res = null;
switch (i) {
default: res = getImage(o); break;
}
return res;
}
protected IWrapperItemProvider createWrapper(Object
value, Object owner, AdapterFactory adapterFactory)
{
return new CC(value, owner, null,
CommandParameter.NO_INDEX, adapterFactory);
}
}
if (!isWrappingNeeded(object)) return value;
if (FeatureMapUtil.isFeatureMap(feature))
{
value = new AA ((FeatureMap.Entry)value, object,
(EAttribute)feature, index, adapterFactory, getResourceLocator());
}
else if (feature instanceof EAttribute)
{
value = new BB(value, object, (EAttribute)feature, index,
adapterFactory, getResourceLocator());
}
else if (!((EReference)feature).isContainment())
{
value = new CC (value, object, feature, index,
adapterFactory);
}
return value;
}
But I wasn't really sure what I should notice to indicate that there was
a problem before I made this change since every object with children
displayed your specialized results already (i.e., either an AA or a ZZ
label).
dmahler@gmail.com wrote:
>Ed,
>
>I have reproduced the problem for the mindmap.xsd project
>that is used in the tutorials.
>It which is attached.
>Just import it, run it, and load this model.
>
>
><?xml version="1.0" encoding="UTF-8"?>
><mindmap:map xmlns:mindmap="http://www.example.org/mindmap">
> <rootTopics>
> <comments>
> <items/>
> </comments>
> </rootTopics>
> <relations/>
> <resources/>
> <resources/>
></mindmap:map>
>
>and switch to the Tree with Columns view.
>Don't regenerate though, as I have not killed all the @generated markers.
>
>D
>
>
>Ed Merks wrote:
>
>
>
>>D,
>>
>>It would be really good if you could provide a test case where we could
>>explore this issue in detail. One approach to try is to reuse your
>>derived DelegatingWrapper, CC, and pass in null for the feature and
>>CommandParameter.NO_INDEX for the index. I don't know of a way to turn
>>a tree view into text. I suppose a screen capture pasted as an image
>>won't work for you?
>>
>>
>>dmahler@gmail.com wrote:
>>
>>
>>>Ed,
>>>
>>>It looks like a plain DelegatingWrapperItemProvider is getting passed in.
>>>Its delegateItmeProvider and owner are instances of the inner AA class
>>>though and its adapterFactory is also mine.
>>>After setting a breakpoint on DelegatingWrapperItemProvider constructors
>>>It looks like the callchain on the AA istance is
>>>getChildren() -> updateChildren() -> createWrapper(..).
>>>All these are inherited from DelegatingWrapperItemProvider,
>>>and DelegatingWrapperItemProvider.createWrapper calls the constructor
>>>
>>>protected IWrapperItemProvider createWrapper(Object value, Object owner,
>>>AdapterFactory adapterFactory)
>>> {
>>> return new DelegatingWrapperItemProvider(value, owner,
>>> adapterFactory);
>>> }
>>>
>>>so we get a raw DelegatingWrapperItemProvider instance.
>>>I looked at verring createWrapper in AA, but the AA constructor
>>>seems to need more information then is available at the createWrapper
>>>call. BTW is there a way to extrect plain text representation from the
>>>debug perspective to paste into emails?
>>>
>>>thanks
>>>D
>>>
>>>
>>>Ed Merks wrote:
>>>
>>>
>>>
>>>
>>>>D,
>>>>
>>>>Yes, this should do the trick. Set a breakpoint
>>>>AdapterFactoryLabelProvider.getColumnText and see what's happening there
>>>>for the case that it's not working.
>>>>
>>>>
>>>>dmahler@gmail.com wrote:
>>>>
>>>>
>>>>
>>>>
>>>>>Ed,
>>>>>
>>>>>I've now implemented the the following extension to
>>>>>ItemProviderAdapter, and made all my item providers inherit that
>>>>>instead (no aspects).
>>>>>supportedTypes.add(ITableItemLabelProvider.class);
>>>>>
>>>>>The "Tree with Columns" view now works correctly for the first 2 levels
>>>>>of the tree, but still reverts to the default Tree view behaviour after
>>>>>that.
>>>>>
>>>>>According to my understanding of the EMF book, this and the
>>>>>
>>>>>supportedTypes.add(ITableItemLabelProvider.class);
>>>>>
>>>>>lines in the *ItemProviderAdapterFactory constructors should be all
>>>>>that is needed.
>>>>>
>>>>>thanks
>>>>>D
>>>>>
>>>>>
>>>>>
>>>>>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++
>
>
>>>>>package com.rightscom.crcs;
>>>>>
>>>>>import org.eclipse.emf.common.notify.AdapterFactory;
>>>>>
>>>>>import org.eclipse.emf.ecore.*;
>>>>>import org.eclipse.emf.ecore.util.*;
>>>>>import org.eclipse.emf.common.util.*;
>>>>>import org.eclipse.emf.edit.provider.*;
>>>>>
>>>>>public class CRCSItemProviderAdapter extends ItemProviderAdapter
>>>>>implements ITableItemLabelProvider
>>>>>{
>>>>>
>>>>> public CRCSItemProviderAdapter(AdapterFactory adapterFactory) {
>>>>> super(adapterFactory);
>>>>> // TODO Auto-generated constructor stub
>>>>> }
>>>>>
>>>>>
>>>>> public String getColumnText (Object o, int i) {
>>>>> String res="ZZ "+getText(o)+" :: "+String.valueOf(i);
>>>>> return res;
>>>>> }
>>>>>
>>>>> public Object getColumnImage (Object o, int i) {
>>>>> Object res = null;
>>>>> switch (i) {
>>>>> default: res = getImage(o); break;
>>>>> }
>>>>> return res;
>>>>> }
>>>>>
>>>>> @Override
>>>>> protected Object createWrapper(EObject object,
>>>>> EStructuralFeature feature,
>>>>>Object value, int index)
>>>>> {
>>>>> if (!isWrappingNeeded(object)) return value;
>>>>>
>>>>> if (FeatureMapUtil.isFeatureMap(feature))
>>>>> {
>>>>> class AA extends FeatureMapEntryWrapperItemProvider
>>>>> implements
>>>>>ITableItemLabelProvider
>>>>> {
>>>>> public AA (FeatureMap.Entry entry,
>>>>> EObject owner, EAttribute attribute,
>>>>>int index, AdapterFactory adapterFactory, ResourceLocator
>>>>>resourceLocator)
>>>>>{
>>>>> super(entry, owner, attribute,
>>>>> index, adapterFactory,
>>>>> resourceLocator);
>>>>> }
>>>>> public String getColumnText (Object o,
>>>>> int i) {
>>>>> String res="AA "+getText(o)+" ::
>>>>> "+String.valueOf(i); return res;
>>>>> }
>>>>> public Object getColumnImage (Object o,
>>>>> int i) {
>>>>> Object res = null;
>>>>> switch (i) {
>>>>> default: res = getImage(o);
>>>>> break; }
>>>>> return res;
>>>>> }
>>>>> }
>>>>> value = new AA ((FeatureMap.Entry)value, object,
>>>>> (EAttribute)feature,
>>>>>index, adapterFactory, getResourceLocator());
>>>>> }
>>>>> else if (feature instanceof EAttribute)
>>>>> {
>>>>> class BB extends AttributeValueWrapperItemProvider
>>>>> implements
>>>>>ITableItemLabelProvider
>>>>> {
>>>>> public BB(Object value, EObject owner,
>>>>> EAttribute attribute,
>>>>>AdapterFactory adapterFactory, ResourceLocator resourceLocator) {
>>>>> super(value, owner, attribute,
>>>>> adapterFactory,
>>>>> resourceLocator); // TODO
>>>>> Auto-generated constructor stub
>>>>> }
>>>>> public BB(Object value, EObject owner,
>>>>> EAttribute attribute, int index,
>>>>>AdapterFactory adapterFactory, ResourceLocator resourceLocator) {
>>>>> super(value, owner, attribute,
>>>>> index, adapterFactory,
>>>>> resourceLocator);
>>>>> }
>>>>> public String getColumnText (Object o,
>>>>> int i) {
>>>>> String res="BB "+ getText(o)+"
>>>>> :: "+String.valueOf(i); return
>>>>> res;
>>>>> }
>>>>> public Object getColumnImage (Object o,
>>>>> int i) {
>>>>> Object res = null;
>>>>> switch (i) {
>>>>> default: res = getImage(o);
>>>>> break; }
>>>>> return res;
>>>>> }
>>>>> }
>>>>> value = new BB(value, object, (EAttribute)feature, index,
>>>>>adapterFactory, getResourceLocator());
>>>>> }
>>>>> else if (!((EReference)feature).isContainment())
>>>>> {
>>>>> class CC extends DelegatingWrapperItemProvider
>>>>> implements
>>>>>ITableItemLabelProvider
>>>>> {
>>>>> public CC(Object value, Object owner,
>>>>> EStructuralFeature feature, int
>>>>>index, AdapterFactory adapterFactory) {
>>>>> super(value, owner, feature,
>>>>> index, adapterFactory);
>>>>> }
>>>>> public String getColumnText (Object o,
>>>>> int i) {
>>>>> String res="CC " + getText(o)+"
>>>>> :: "+String.valueOf(i); return
>>>>> res;
>>>>> }
>>>>>
>>>>> public Object getColumnImage (Object o,
>>>>> int i) {
>>>>> Object res = null;
>>>>> switch (i) {
>>>>> default: res = getImage(o);
>>>>> break; }
>>>>> return res;
>>>>> }
>>>>>
>>>>> }
>>>>> value = new CC (value, object, feature, index,
>>>>> adapterFactory);
>>>>> }
>>>>> return value;
>>>>> }
>>>>>}
>>>>>
>>>>>
>>>>>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++
>
>
>>>>>Ed Merks wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>D,
>>>>>>
>>>>>>Unfortunately I don't understand the aspect stuff well enough to say
>>>>>>intelligent things. I think your approach will still work. I'll
>>>>>>answer
>>>>>>in terms of what I'd do without aspects to support this. I.e., I'd
>>>>>>create a derived wrapper MyFeatureMapEntryWrapperItemProvider that
>>>>>>implements the API that my factory wants to support.
>>>>>>
>>>>>> protected Object createWrapper(EObject object, EStructuralFeature
>>>>>> feature, Object value, int index)
>>>>>> {
>>>>>> if (!isWrappingNeeded(object)) return value;
>>>>>>
>>>>>> if (FeatureMapUtil.isFeatureMap(feature))
>>>>>> {
>>>>>> class MyFeatureMapEntryWrapperItemProvider extends
>>>>>> FeatureMapEntryWrapperItemProvider implements
>>>>>> ITableItemLabelProvider
>>>>>> {
>>>>>> public MyFeatureMapEntryWrapperItemProvider(
>>>>>> FeatureMap.Entry entry,
>>>>>> EObject owner,
>>>>>> EAttribute attribute,
>>>>>> int index,
>>>>>> AdapterFactory adapterFactory,
>>>>>> ResourceLocator resourceLocator)
>>>>>> {
>>>>>> super(entry, owner, attribute, index, adapterFactory,
>>>>>> resourceLocator);
>>>>>> }
>>>>>>
>>>>>> public Object getColumnImage(Object object, int
>>>>>> columnIndex)
>>>>>> {
>>>>>> // TODO Auto-generated method stub
>>>>>> return null;
>>>>>> }
>>>>>>
>>>>>> public String getColumnText(Object object, int columnIndex)
>>>>>> {
>>>>>> // TODO Auto-generated method stub
>>>>>> return null;
>>>>>> }
>>>>>> }
>>>>>> value = new
>>>>>> MyFeatureMapEntryWrapperItemProvider((FeatureMap.Entry)value ,
>>>>>> object, (EAttribute)feature, index, adapterFactory,
>>>>>> getResourceLocator());
>>>>>> }
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>dmahler@gmail.com wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>Thanks again Ed!
>>>>>>>
>>>>>>>Could you expand on that little though,
>>>>>>>I've only been working with Eclipse for less than a month.
>>>>>>>
>>>>>>>What are my options? Can I add the missing APIs myself?
>>>>>>>How do I find out what exactly needs adding?
>>>>>>>Is this an Eclipse bug? Should I report it somewhere?
>>>>>>>Does it mean the AOP approach to customization is flawed in this
>>>>>>>particular case? or more generally?
>>>>>>>
>>>>>>>thanks
>>>>>>>D
>>>>>>>
>>>>>>>
>>>>>>>Ed Merks wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>D,
>>>>>>>>
>>>>>>>>Probably wrappers are being created by this ItemProviderAdapter
>>>>>>>>method and the wrappers are not implementing all the APIs you need
>>>>>>>>them to implement.
>>>>>>>>
>>>>>>>> protected Object createWrapper(EObject object,
>>>>>>>> EStructuralFeature
>>>>>>>> feature, Object value, int index)
>>>>>>>> {
>>>>>>>> if (!isWrappingNeeded(object)) return value;
>>>>>>>>
>>>>>>>> if (FeatureMapUtil.isFeatureMap(feature))
>>>>>>>> {
>>>>>>>> value = new
>>>>>>>> *FeatureMapEntryWrapperItemProvider*((FeatureMap.Entry)value ,
>>>>>>>> object, (EAttribute)feature, index, adapterFactory,
>>>>>>>> getResourceLocator());
>>>>>>>> }
>>>>>>>> else if (feature instanceof EAttribute)
>>>>>>>> {
>>>>>>>> value = new *AttributeValueWrapperItemProvider*(value,
>>>>>>>> object,
>>>>>>>> (EAttribute)feature, index, adapterFactory,
>>>>>>>> getResourceLocator());
>>>>>>>> }
>>>>>>>> else if (!((EReference)feature).isContainment())
>>>>>>>> {
>>>>>>>> value = new *DelegatingWrapperItemProvider*(value, object,
>>>>>>>> feature, index, adapterFactory);
>>>>>>>> }
>>>>>>>>
>>>>>>>> return value;
>>>>>>>> }
>>>>>>>>
>>>>>>>>dmahler@gmail.com wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>>I have been experimenting with customizing emf generated code using
>>>>>>>>>AspectJ,
>>>>>>>>>[and so far it has been pretty close to a raging succcess. :) ]
>>>>>>>>>Now I am trying to 'Tree with Columns' editor page to do something
>>>>>>>>>useful. Since the column contents are fairly uniform,
>>>>>>>>>I using AspectJ to essentially create a mixin trait to inherit into
>>>>>>>>>all my item providers (see code below).
>>>>>>>>>My model is generated from an XSD (that explains the odd
>>>>>>>>>classnames) and comes in 2 packages.
>>>>>>>>>So I have created three trivial interfaces:
>>>>>>>>>and andcestor for all item providers, and 2 specializations of it
>>>>>>>>>(1 for each package).
>>>>>>>>>
>>>>>>>>>I the aspect I then make the generated item providers implement the
>>>>>>>>>new interfaces and I make the new top inteface provide default
>>>>>>>>>implementations
>>>>>>>>>for the ITableItemLabelProvider interface and declare the it to
>>>>>>>>>extend all the item provider interfaces.
>>>>>>>>>
>>>>>>>>>Finally I add _1ItemProviderAdapterFactory.new() to the
>>>>>>>>>supportedTypes list of the adapter factory in each package using
>>>>>>>>>after advice on its constructor.
>>>>>>>>>
>>>>>>>>>As far as I understand the EMF framework, this should do it,
>>>>>>>>>since now all the item providers implement ITableItemLabelProvider
>>>>>>>>>and both the adapter factories support it.
>>>>>>>>>However, when I run the plugin,
>>>>>>>>>I only get the new behaviour for the document root node
>>>>>>>>>and all the descendants revert to the eclipse default behavior,
>>>>>>>>>of showing the same information in both columns.
>>>>>>>>>According to the AJDT tools my advice is being applied to all my
>>>>>>>>>classes, so I do not know what is going on.
>>>>>>>>>Any advice appreciated.
>>>>>>>>>
>>>>>>>>>thanks
>>>>>>>>>D
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>>>>public interface CrcsItemProvider {
>>>>>>>>>
>>>>>>>>>}
>>>>>>>>>
>>>>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>>>>public interface CCSItemProvider extends CrcsItemProvider {
>>>>>>>>>
>>>>>>>>>}
>>>>>>>>>
>>>>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>>>>public interface RCSItemProvider extends CrcsItemProvider {
>>>>>>>>>
>>>>>>>>>}
>>>>>>>>>
>>>>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>>>>
>>>>>>>>>public privileged aspect TextProvider {
>>>>>>>>>
>>>>>>>>> declare parents: com.rightscom.ns.ccs.provider.*Provider
>>>>>>>>> implements
>>>>>>>>>CCSItemProvider;
>>>>>>>>>
>>>>>>>>> declare parents:
>>>>>>>>> org.relaxng.ns.structure._1.provider.*Provider
>>>>>>>>>implements RCSItemProvider;
>>>>>>>>>
>>>>>>>>> declare parents: CrcsItemProvider implements
>>>>>>>>> ITableItemLabelProvider, IEditingDomainItemProvider,
>>>>>>>>> IStructuredItemContentProvider,
>>>>>>>>> ITreeItemContentProvider,
>>>>>>>>> IItemLabelProvider,
>>>>>>>>> IItemPropertySource;
>>>>>>>>>
>>>>>>>>> ////////////////////////////
>>>>>>>>>
>>>>>>>>> public String CrcsItemProvider.getColumnText (Object o, int
>>>>>>>>> i)
>>>>>>>>> {
>>>>>>>>> String res = null;
>>>>>>>>> switch (i) {
>>>>>>>>> case 0: res = getText(o); break;
>>>>>>>>> default: res ="ZZZZZZZZ"; break;
>>>>>>>>> }
>>>>>>>>> return res;
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> public Object CrcsItemProvider.getColumnImage (Object o, int
>>>>>>>>> i)
>>>>>>>>> {
>>>>>>>>> Object res = null;
>>>>>>>>> switch (i) {
>>>>>>>>> case 0: res = getImage(o); break;
>>>>>>>>> default: res =null; break;
>>>>>>>>> }
>>>>>>>>> return getImage(o);
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> after (CcsItemProviderAdapterFactory t) returning:
>>>>>>>>> execution(CcsItemProviderAdapterFactory.new())
>>>>>>>>> && this(t) {
>>>>>>>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> after (_1ItemProviderAdapterFactory t) returning:
>>>>>>>>> execution(_1ItemProviderAdapterFactory.new())
>>>>>>>>> && this(t) {
>>>>>>>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>>>>>>>> }
>>>>>>>>>....
>>>>>>>>>}
>>>>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>>
--------------080700050903080108010302
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
D,<br>
<br>
I changed your code like this so that AA and CC both create a new CC:<br>
<br>
<blockquote><small> protected Object createWrapper(EObject object,
EStructuralFeature feature, Object value, int index)</small><br>
<small> {</small><br>
<small> </small><br>
<small> class BB extends
AttributeValueWrapperItemProvider implements ITableItemLabelProvider </small><br>
<small> {</small><br>
<br>
<small> public BB(Object value, EObject owner,
EAttribute attribute, AdapterFactory adapterFactory, ResourceLocator
resourceLocator) {</small><br>
<small> super(value, owner, attribute,
adapterFactory, resourceLocator);</small><br>
<small> // TODO Auto-generated constructor stub</small><br>
<small> }</small><br>
<br>
<small> public BB(Object value, EObject owner,
EAttribute attribute, int index, AdapterFactory adapterFactory,
ResourceLocator resourceLocator) {</small><br>
<small> super(value, owner, attribute, index,
adapterFactory, resourceLocator);</small><br>
<small> // TODO Auto-generated constructor stub</small><br>
<small> }</small><br>
<br>
<br>
<small> public String getColumnText (Object o, int i) {</small><br>
<small> String res="BB "+ getText(o)+" ::
"+String.valueOf(i);</small><br>
<small> return res;</small><br>
<small> }</small><br>
<br>
<small> public Object getColumnImage (Object o, int i)
{</small><br>
<small> Object res = null;</small><br>
<small> switch (i) {</small><br>
<small> default: res = getImage(o); break;</small><br>
<small> }</small><br>
<small> return res;</small><br>
<small> }</small><br>
<br>
<small> </small><br>
<small> }</small><br>
<br>
<small> class CC extends DelegatingWrapperItemProvider
implements ITableItemLabelProvider </small><br>
<small> {</small><br>
<br>
<small> public CC(Object value, Object owner,
EStructuralFeature feature, int index, AdapterFactory adapterFactory) {</small><br>
<small> super(value, owner, feature, index,
adapterFactory);</small><br>
<small> // TODO Auto-generated constructor stub</small><br>
<small> }</small><br>
<br>
<br>
<small> public String getColumnText (Object o, int i) {</small><br>
<small> String res="CC " + getText(o)+" ::
"+String.valueOf(i);</small><br>
<small> return res;</small><br>
<small> }</small><br>
<br>
<small> public Object getColumnImage (Object o, int i)
{</small><br>
<small> Object res = null;</small><br>
<small> switch (i) {</small><br>
<small> default: res = getImage(o); break;</small><br>
<small> }</small><br>
<small> return res;</small><br>
<small> }</small><br>
<br>
<small> protected IWrapperItemProvider
createWrapper(Object value, Object owner, AdapterFactory adapterFactory)</small><br>
<small> {</small><br>
<small> return new CC(value, owner, null,
CommandParameter.NO_INDEX, adapterFactory);</small><br>
<small> }</small><br>
<br>
<small> }</small><br>
<br>
<small> class AA extends
FeatureMapEntryWrapperItemProvider implements ITableItemLabelProvider </small><br>
<small> {</small><br>
<br>
<small> public AA (FeatureMap.Entry entry, EObject
owner, EAttribute attribute, int index, AdapterFactory adapterFactory,
ResourceLocator resourceLocator) {</small><br>
<small> super(entry, owner, attribute, index,
adapterFactory, resourceLocator);</small><br>
<small> }</small><br>
<br>
<br>
<small> public String getColumnText (Object o, int i) {</small><br>
<small> String res="AA "+getText(o)+" ::
"+String.valueOf(i);</small><br>
<small> return res;</small><br>
<small> }</small><br>
<br>
<small> public Object getColumnImage (Object o, int i)
{</small><br>
<small> Object res = null;</small><br>
<small> switch (i) {</small><br>
<small> default: res = getImage(o); break;</small><br>
<small> }</small><br>
<small> return res;</small><br>
<small> }</small><br>
<small> protected IWrapperItemProvider
createWrapper(Object value, Object owner, AdapterFactory adapterFactory)</small><br>
<small> {</small><br>
<small> return new CC(value, owner, null,
CommandParameter.NO_INDEX, adapterFactory);</small><br>
<small> }</small><br>
<small> }</small><br>
<small> if (!isWrappingNeeded(object)) return value;</small><br>
<br>
<small> if (FeatureMapUtil.isFeatureMap(feature))</small><br>
<small> {</small><br>
<small> value = new AA ((FeatureMap.Entry)value, object,
(EAttribute)feature, index, adapterFactory, getResourceLocator());</small><br>
<small> }</small><br>
<small> else if (feature instanceof EAttribute)</small><br>
<small> {</small><br>
<small> value = new BB(value, object, (EAttribute)feature,
index, adapterFactory, getResourceLocator());</small><br>
<small> }</small><br>
<small> else if (!((EReference)feature).isContainment())</small><br>
<small> {</small><br>
<small> value = new CC (value, object, feature, index,
adapterFactory);</small><br>
<small> }</small><br>
<br>
<small> return value;</small><br>
<small> }</small><br>
</blockquote>
But I wasn't really sure what I should notice to indicate that there
was a problem before I made this change since every object with
children displayed your specialized results already (i.e., either an AA
or a ZZ label).<br>
<br>
<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:dmahler@gmail.com">dmahler@gmail.com</a> wrote:
<blockquote cite="midea5tat$4s0$1@utils.eclipse.org" type="cite">
<pre wrap="">Ed,
I have reproduced the problem for the mindmap.xsd project
that is used in the tutorials.
It which is attached.
Just import it, run it, and load this model.
<?xml version="1.0" encoding="UTF-8"?>
<mindmap:map xmlns:mindmap=<a class="moz-txt-link-rfc2396E" href="http://www.example.org/mindmap">"http://www.example.org/mindmap"</a>>
<rootTopics>
<comments>
<items/>
</comments>
</rootTopics>
<relations/>
<resources/>
<resources/>
</mindmap:map>
and switch to the Tree with Columns view.
Don't regenerate though, as I have not killed all the @generated markers.
D
Ed Merks wrote:
</pre>
<blockquote type="cite">
<pre wrap="">D,
It would be really good if you could provide a test case where we could
explore this issue in detail. One approach to try is to reuse your
derived DelegatingWrapper, CC, and pass in null for the feature and
CommandParameter.NO_INDEX for the index. I don't know of a way to turn
a tree view into text. I suppose a screen capture pasted as an image
won't work for you?
<a class="moz-txt-link-abbreviated" href="mailto:dmahler@gmail.com">dmahler@gmail.com</a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Ed,
It looks like a plain DelegatingWrapperItemProvider is getting passed in.
Its delegateItmeProvider and owner are instances of the inner AA class
though and its adapterFactory is also mine.
After setting a breakpoint on DelegatingWrapperItemProvider constructors
It looks like the callchain on the AA istance is
getChildren() -> updateChildren() -> createWrapper(..).
All these are inherited from DelegatingWrapperItemProvider,
and DelegatingWrapperItemProvider.createWrapper calls the constructor
protected IWrapperItemProvider createWrapper(Object value, Object owner,
AdapterFactory adapterFactory)
{
return new DelegatingWrapperItemProvider(value, owner,
adapterFactory);
}
so we get a raw DelegatingWrapperItemProvider instance.
I looked at verring createWrapper in AA, but the AA constructor
seems to need more information then is available at the createWrapper
call. BTW is there a way to extrect plain text representation from the
debug perspective to paste into emails?
thanks
D
Ed Merks wrote:
</pre>
<blockquote type="cite">
<pre wrap="">D,
Yes, this should do the trick. Set a breakpoint
AdapterFactoryLabelProvider.getColumnText and see what's happening there
for the case that it's not working.
<a class="moz-txt-link-abbreviated" href="mailto:dmahler@gmail.com">dmahler@gmail.com</a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Ed,
I've now implemented the the following extension to
ItemProviderAdapter, and made all my item providers inherit that
instead (no aspects).
supportedTypes.add(ITableItemLabelProvider.class);
The "Tree with Columns" view now works correctly for the first 2 levels
of the tree, but still reverts to the default Tree view behaviour after
that.
According to my understanding of the EMF book, this and the
supportedTypes.add(ITableItemLabelProvider.class);
lines in the *ItemProviderAdapterFactory constructors should be all
that is needed.
thanks
D
</pre>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<pre wrap=""><!----> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++
</pre>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">package com.rightscom.crcs;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.ecore.*;
import org.eclipse.emf.ecore.util.*;
import org.eclipse.emf.common.util.*;
import org.eclipse.emf.edit.provider.*;
public class CRCSItemProviderAdapter extends ItemProviderAdapter
implements ITableItemLabelProvider
{
public CRCSItemProviderAdapter(AdapterFactory adapterFactory) {
super(adapterFactory);
// TODO Auto-generated constructor stub
}
public String getColumnText (Object o, int i) {
String res="ZZ "+getText(o)+" :: "+String.valueOf(i);
return res;
}
public Object getColumnImage (Object o, int i) {
Object res = null;
switch (i) {
default: res = getImage(o); break;
}
return res;
}
@Override
protected Object createWrapper(EObject object,
EStructuralFeature feature,
Object value, int index)
{
if (!isWrappingNeeded(object)) return value;
if (FeatureMapUtil.isFeatureMap(feature))
{
class AA extends FeatureMapEntryWrapperItemProvider
implements
ITableItemLabelProvider
{
public AA (FeatureMap.Entry entry,
EObject owner, EAttribute attribute,
int index, AdapterFactory adapterFactory, ResourceLocator
resourceLocator)
{
super(entry, owner, attribute,
index, adapterFactory,
r
|
|
|
Re: implementing ITableItemLabelProvider with aspects [message #594355 is a reply to message #66181] |
Thu, 20 July 2006 14:19 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
--------------060009020200020408070500
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
D,
Probably wrappers are being created by this ItemProviderAdapter method
and the wrappers are not implementing all the APIs you need them to
implement.
protected Object createWrapper(EObject object, EStructuralFeature
feature, Object value, int index)
{
if (!isWrappingNeeded(object)) return value;
if (FeatureMapUtil.isFeatureMap(feature))
{
value = new
*FeatureMapEntryWrapperItemProvider*((FeatureMap.Entry)value ,
object, (EAttribute)feature, index, adapterFactory,
getResourceLocator());
}
else if (feature instanceof EAttribute)
{
value = new *AttributeValueWrapperItemProvider*(value, object,
(EAttribute)feature, index, adapterFactory, getResourceLocator());
}
else if (!((EReference)feature).isContainment())
{
value = new *DelegatingWrapperItemProvider*(value, object,
feature, index, adapterFactory);
}
return value;
}
dmahler@gmail.com wrote:
> I have been experimenting with customizing emf generated code using AspectJ,
> [and so far it has been pretty close to a raging succcess. :) ]
> Now I am trying to 'Tree with Columns' editor page to do something useful.
> Since the column contents are fairly uniform,
> I using AspectJ to essentially create a mixin trait to inherit into all my
> item providers (see code below).
> My model is generated from an XSD (that explains the odd classnames) and
> comes in 2 packages.
> So I have created three trivial interfaces:
> and andcestor for all item providers, and 2 specializations of it (1 for
> each package).
>
> I the aspect I then make the generated item providers implement the new
> interfaces and I make the new top inteface provide default implementations
> for the ITableItemLabelProvider interface and declare the it to extend all
> the item provider interfaces.
>
> Finally I add _1ItemProviderAdapterFactory.new() to the supportedTypes
> list of the adapter factory in each package using after advice on its
> constructor.
>
> As far as I understand the EMF framework, this should do it,
> since now all the item providers implement ITableItemLabelProvider
> and both the adapter factories support it.
> However, when I run the plugin,
> I only get the new behaviour for the document root node
> and all the descendants revert to the eclipse default behavior,
> of showing the same information in both columns.
> According to the AJDT tools my advice is being applied to all my classes,
> so I do not know what is going on.
> Any advice appreciated.
>
> thanks
> D
>
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
> public interface CrcsItemProvider {
>
> }
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
> public interface CCSItemProvider extends CrcsItemProvider {
>
> }
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
> public interface RCSItemProvider extends CrcsItemProvider {
>
> }
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>
> public privileged aspect TextProvider {
>
> declare parents: com.rightscom.ns.ccs.provider.*Provider implements
> CCSItemProvider;
>
> declare parents: org.relaxng.ns.structure._1.provider.*Provider
> implements RCSItemProvider;
>
> declare parents: CrcsItemProvider implements ITableItemLabelProvider,
> IEditingDomainItemProvider,
> IStructuredItemContentProvider,
> ITreeItemContentProvider,
> IItemLabelProvider,
> IItemPropertySource;
>
> ////////////////////////////
>
> public String CrcsItemProvider.getColumnText (Object o, int i) {
> String res = null;
> switch (i) {
> case 0: res = getText(o); break;
> default: res ="ZZZZZZZZ"; break;
> }
> return res;
> }
>
> public Object CrcsItemProvider.getColumnImage (Object o, int i) {
> Object res = null;
> switch (i) {
> case 0: res = getImage(o); break;
> default: res =null; break;
> }
> return getImage(o);
> }
>
> after (CcsItemProviderAdapterFactory t) returning:
> execution(CcsItemProviderAdapterFactory.new())
> && this(t) {
> t.supportedTypes.add(ITableItemLabelProvider.class);
> }
>
> after (_1ItemProviderAdapterFactory t) returning:
> execution(_1ItemProviderAdapterFactory.new())
> && this(t) {
> t.supportedTypes.add(ITableItemLabelProvider.class);
> }
> ....
> }
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>
>
--------------060009020200020408070500
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
D,<br>
<br>
Probably wrappers are being created by this ItemProviderAdapter method
and the wrappers are not implementing all the APIs you need them to
implement.<br>
<blockquote><small> protected Object createWrapper(EObject object,
EStructuralFeature feature, Object value, int index)</small><br>
<small> {</small><br>
<small> if (!isWrappingNeeded(object)) return value;</small><br>
<br>
<small> if (FeatureMapUtil.isFeatureMap(feature))</small><br>
<small> {</small><br>
<small> value = new <b>FeatureMapEntryWrapperItemProvider</b>((FeatureMap.Entry)value,
object, (EAttribute)feature, index, adapterFactory,
getResourceLocator());</small><br>
<small> }</small><br>
<small> else if (feature instanceof EAttribute)</small><br>
<small> {</small><br>
<small> value = new <b>AttributeValueWrapperItemProvider</b>(value,
object, (EAttribute)feature, index, adapterFactory,
getResourceLocator());</small><br>
<small> }</small><br>
<small> else if (!((EReference)feature).isContainment())</small><br>
<small> {</small><br>
<small> value = new <b>DelegatingWrapperItemProvider</b>(value,
object, feature, index, adapterFactory);</small><br>
<small> }</small><br>
<br>
<small> return value;</small><br>
<small> }</small><br>
<br>
</blockquote>
<a class="moz-txt-link-abbreviated" href="mailto:dmahler@gmail.com">dmahler@gmail.com</a> wrote:
<blockquote cite="mide9o2kn$vbv$1@utils.eclipse.org" type="cite">
<pre wrap="">I have been experimenting with customizing emf generated code using AspectJ,
[and so far it has been pretty close to a raging succcess. :) ]
Now I am trying to 'Tree with Columns' editor page to do something useful.
Since the column contents are fairly uniform,
I using AspectJ to essentially create a mixin trait to inherit into all my
item providers (see code below).
My model is generated from an XSD (that explains the odd classnames) and
comes in 2 packages.
So I have created three trivial interfaces:
and andcestor for all item providers, and 2 specializations of it (1 for
each package).
I the aspect I then make the generated item providers implement the new
interfaces and I make the new top inteface provide default implementations
for the ITableItemLabelProvider interface and declare the it to extend all
the item provider interfaces.
Finally I add _1ItemProviderAdapterFactory.new() to the supportedTypes
list of the adapter factory in each package using after advice on its
constructor.
As far as I understand the EMF framework, this should do it,
since now all the item providers implement ITableItemLabelProvider
and both the adapter factories support it.
However, when I run the plugin,
I only get the new behaviour for the document root node
and all the descendants revert to the eclipse default behavior,
of showing the same information in both columns.
According to the AJDT tools my advice is being applied to all my classes,
so I do not know what is going on.
Any advice appreciated.
thanks
D
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public interface CrcsItemProvider {
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public interface CCSItemProvider extends CrcsItemProvider {
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public interface RCSItemProvider extends CrcsItemProvider {
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public privileged aspect TextProvider {
declare parents: com.rightscom.ns.ccs.provider.*Provider implements
CCSItemProvider;
declare parents: org.relaxng.ns.structure._1.provider.*Provider
implements RCSItemProvider;
declare parents: CrcsItemProvider implements ITableItemLabelProvider,
IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
IItemLabelProvider,
IItemPropertySource;
////////////////////////////
public String CrcsItemProvider.getColumnText (Object o, int i) {
String res = null;
switch (i) {
case 0: res = getText(o); break;
default: res ="ZZZZZZZZ"; break;
}
return res;
}
public Object CrcsItemProvider.getColumnImage (Object o, int i) {
Object res = null;
switch (i) {
case 0: res = getImage(o); break;
default: res =null; break;
}
return getImage(o);
}
after (CcsItemProviderAdapterFactory t) returning:
execution(CcsItemProviderAdapterFactory.new())
&& this(t) {
t.supportedTypes.add(ITableItemLabelProvider.class);
}
after (_1ItemProviderAdapterFactory t) returning:
execution(_1ItemProviderAdapterFactory.new())
&& this(t) {
t.supportedTypes.add(ITableItemLabelProvider.class);
}
.....
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
</pre>
</blockquote>
<br>
</body>
</html>
--------------060009020200020408070500--
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: implementing ITableItemLabelProvider with aspects [message #594365 is a reply to message #66206] |
Thu, 20 July 2006 15:22 |
Daniel Mahler Messages: 53 Registered: July 2009 |
Member |
|
|
Thanks again Ed!
Could you expand on that little though,
I've only been working with Eclipse for less than a month.
What are my options? Can I add the missing APIs myself?
How do I find out what exactly needs adding?
Is this an Eclipse bug? Should I report it somewhere?
Does it mean the AOP approach to customization is flawed in this particular
case? or more generally?
thanks
D
Ed Merks wrote:
> D,
>
> Probably wrappers are being created by this ItemProviderAdapter method
> and the wrappers are not implementing all the APIs you need them to
> implement.
>
> protected Object createWrapper(EObject object, EStructuralFeature
> feature, Object value, int index)
> {
> if (!isWrappingNeeded(object)) return value;
>
> if (FeatureMapUtil.isFeatureMap(feature))
> {
> value = new
> *FeatureMapEntryWrapperItemProvider*((FeatureMap.Entry)value ,
> object, (EAttribute)feature, index, adapterFactory,
> getResourceLocator());
> }
> else if (feature instanceof EAttribute)
> {
> value = new *AttributeValueWrapperItemProvider*(value, object,
> (EAttribute)feature, index, adapterFactory, getResourceLocator());
> }
> else if (!((EReference)feature).isContainment())
> {
> value = new *DelegatingWrapperItemProvider*(value, object,
> feature, index, adapterFactory);
> }
>
> return value;
> }
>
> dmahler@gmail.com wrote:
>> I have been experimenting with customizing emf generated code using
>> AspectJ,
>> [and so far it has been pretty close to a raging succcess. :) ]
>> Now I am trying to 'Tree with Columns' editor page to do something
>> useful. Since the column contents are fairly uniform,
>> I using AspectJ to essentially create a mixin trait to inherit into all
>> my item providers (see code below).
>> My model is generated from an XSD (that explains the odd classnames) and
>> comes in 2 packages.
>> So I have created three trivial interfaces:
>> and andcestor for all item providers, and 2 specializations of it (1 for
>> each package).
>>
>> I the aspect I then make the generated item providers implement the new
>> interfaces and I make the new top inteface provide default
>> implementations
>> for the ITableItemLabelProvider interface and declare the it to extend
>> all the item provider interfaces.
>>
>> Finally I add _1ItemProviderAdapterFactory.new() to the supportedTypes
>> list of the adapter factory in each package using after advice on its
>> constructor.
>>
>> As far as I understand the EMF framework, this should do it,
>> since now all the item providers implement ITableItemLabelProvider
>> and both the adapter factories support it.
>> However, when I run the plugin,
>> I only get the new behaviour for the document root node
>> and all the descendants revert to the eclipse default behavior,
>> of showing the same information in both columns.
>> According to the AJDT tools my advice is being applied to all my classes,
>> so I do not know what is going on.
>> Any advice appreciated.
>>
>> thanks
>> D
>>
>>
>>
>>
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>> public interface CrcsItemProvider {
>>
>> }
>>
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>> public interface CCSItemProvider extends CrcsItemProvider {
>>
>> }
>>
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>> public interface RCSItemProvider extends CrcsItemProvider {
>>
>> }
>>
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>
>> public privileged aspect TextProvider {
>>
>> declare parents: com.rightscom.ns.ccs.provider.*Provider
>> implements
>> CCSItemProvider;
>>
>> declare parents: org.relaxng.ns.structure._1.provider.*Provider
>> implements RCSItemProvider;
>>
>> declare parents: CrcsItemProvider implements
>> ITableItemLabelProvider, IEditingDomainItemProvider,
>> IStructuredItemContentProvider,
>> ITreeItemContentProvider,
>> IItemLabelProvider,
>> IItemPropertySource;
>>
>> ////////////////////////////
>>
>> public String CrcsItemProvider.getColumnText (Object o, int i) {
>> String res = null;
>> switch (i) {
>> case 0: res = getText(o); break;
>> default: res ="ZZZZZZZZ"; break;
>> }
>> return res;
>> }
>>
>> public Object CrcsItemProvider.getColumnImage (Object o, int i) {
>> Object res = null;
>> switch (i) {
>> case 0: res = getImage(o); break;
>> default: res =null; break;
>> }
>> return getImage(o);
>> }
>>
>> after (CcsItemProviderAdapterFactory t) returning:
>> execution(CcsItemProviderAdapterFactory.new())
>> && this(t) {
>> t.supportedTypes.add(ITableItemLabelProvider.class);
>> }
>>
>> after (_1ItemProviderAdapterFactory t) returning:
>> execution(_1ItemProviderAdapterFactory.new())
>> && this(t) {
>> t.supportedTypes.add(ITableItemLabelProvider.class);
>> }
>> ....
>> }
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>
>>
|
|
|
Re: implementing ITableItemLabelProvider with aspects [message #594373 is a reply to message #66229] |
Thu, 20 July 2006 15:46 |
Daniel Mahler Messages: 53 Registered: July 2009 |
Member |
|
|
Ed,
I missed the stars in your post at first.
Now I see that the classes you highlighted do not
implementITableItemLabelProvider, so the wrappers mask the getColumn*
methods.
This seems to have nothing to do with using aspects.
How can you get columns to work at all if wrappers supress the column
methods?
Wouldn't people have run into this already?
Is there something I am not getting?
cheers
D
dmahler@gmail.com wrote:
> Thanks again Ed!
>
> Could you expand on that little though,
> I've only been working with Eclipse for less than a month.
>
> What are my options? Can I add the missing APIs myself?
> How do I find out what exactly needs adding?
> Is this an Eclipse bug? Should I report it somewhere?
> Does it mean the AOP approach to customization is flawed in this
> particular case? or more generally?
>
> thanks
> D
>
>
> Ed Merks wrote:
>
>> D,
>>
>> Probably wrappers are being created by this ItemProviderAdapter method
>> and the wrappers are not implementing all the APIs you need them to
>> implement.
>>
>> protected Object createWrapper(EObject object, EStructuralFeature
>> feature, Object value, int index)
>> {
>> if (!isWrappingNeeded(object)) return value;
>>
>> if (FeatureMapUtil.isFeatureMap(feature))
>> {
>> value = new
>> *FeatureMapEntryWrapperItemProvider*((FeatureMap.Entry)value ,
>> object, (EAttribute)feature, index, adapterFactory,
>> getResourceLocator());
>> }
>> else if (feature instanceof EAttribute)
>> {
>> value = new *AttributeValueWrapperItemProvider*(value, object,
>> (EAttribute)feature, index, adapterFactory, getResourceLocator());
>> }
>> else if (!((EReference)feature).isContainment())
>> {
>> value = new *DelegatingWrapperItemProvider*(value, object,
>> feature, index, adapterFactory);
>> }
>>
>> return value;
>> }
>>
>> dmahler@gmail.com wrote:
>>> I have been experimenting with customizing emf generated code using
>>> AspectJ,
>>> [and so far it has been pretty close to a raging succcess. :) ]
>>> Now I am trying to 'Tree with Columns' editor page to do something
>>> useful. Since the column contents are fairly uniform,
>>> I using AspectJ to essentially create a mixin trait to inherit into all
>>> my item providers (see code below).
>>> My model is generated from an XSD (that explains the odd classnames) and
>>> comes in 2 packages.
>>> So I have created three trivial interfaces:
>>> and andcestor for all item providers, and 2 specializations of it (1 for
>>> each package).
>>>
>>> I the aspect I then make the generated item providers implement the new
>>> interfaces and I make the new top inteface provide default
>>> implementations
>>> for the ITableItemLabelProvider interface and declare the it to extend
>>> all the item provider interfaces.
>>>
>>> Finally I add _1ItemProviderAdapterFactory.new() to the supportedTypes
>>> list of the adapter factory in each package using after advice on its
>>> constructor.
>>>
>>> As far as I understand the EMF framework, this should do it,
>>> since now all the item providers implement ITableItemLabelProvider
>>> and both the adapter factories support it.
>>> However, when I run the plugin,
>>> I only get the new behaviour for the document root node
>>> and all the descendants revert to the eclipse default behavior,
>>> of showing the same information in both columns.
>>> According to the AJDT tools my advice is being applied to all my
>>> classes, so I do not know what is going on.
>>> Any advice appreciated.
>>>
>>> thanks
>>> D
>>>
>>>
>>>
>>>
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>> public interface CrcsItemProvider {
>>>
>>> }
>>>
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>> public interface CCSItemProvider extends CrcsItemProvider {
>>>
>>> }
>>>
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>> public interface RCSItemProvider extends CrcsItemProvider {
>>>
>>> }
>>>
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>
>>> public privileged aspect TextProvider {
>>>
>>> declare parents: com.rightscom.ns.ccs.provider.*Provider
>>> implements
>>> CCSItemProvider;
>>>
>>> declare parents:
>>> org.relaxng.ns.structure._1.provider.*Provider
>>> implements RCSItemProvider;
>>>
>>> declare parents: CrcsItemProvider implements
>>> ITableItemLabelProvider, IEditingDomainItemProvider,
>>> IStructuredItemContentProvider,
>>> ITreeItemContentProvider,
>>> IItemLabelProvider,
>>> IItemPropertySource;
>>>
>>> ////////////////////////////
>>>
>>> public String CrcsItemProvider.getColumnText (Object o, int i) {
>>> String res = null;
>>> switch (i) {
>>> case 0: res = getText(o); break;
>>> default: res ="ZZZZZZZZ"; break;
>>> }
>>> return res;
>>> }
>>>
>>> public Object CrcsItemProvider.getColumnImage (Object o, int i)
>>> {
>>> Object res = null;
>>> switch (i) {
>>> case 0: res = getImage(o); break;
>>> default: res =null; break;
>>> }
>>> return getImage(o);
>>> }
>>>
>>> after (CcsItemProviderAdapterFactory t) returning:
>>> execution(CcsItemProviderAdapterFactory.new())
>>> && this(t) {
>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>> }
>>>
>>> after (_1ItemProviderAdapterFactory t) returning:
>>> execution(_1ItemProviderAdapterFactory.new())
>>> && this(t) {
>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>> }
>>> ....
>>> }
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>
>>>
|
|
|
Re: implementing ITableItemLabelProvider with aspects [message #594384 is a reply to message #66229] |
Thu, 20 July 2006 15:44 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
--------------000708000103030405040508
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
D,
Unfortunately I don't understand the aspect stuff well enough to say
intelligent things. I think your approach will still work. I'll answer
in terms of what I'd do without aspects to support this. I.e., I'd
create a derived wrapper MyFeatureMapEntryWrapperItemProvider that
implements the API that my factory wants to support.
protected Object createWrapper(EObject object, EStructuralFeature
feature, Object value, int index)
{
if (!isWrappingNeeded(object)) return value;
if (FeatureMapUtil.isFeatureMap(feature))
{
class MyFeatureMapEntryWrapperItemProvider extends
FeatureMapEntryWrapperItemProvider implements ITableItemLabelProvider
{
public MyFeatureMapEntryWrapperItemProvider(
FeatureMap.Entry entry,
EObject owner,
EAttribute attribute,
int index,
AdapterFactory adapterFactory,
ResourceLocator resourceLocator)
{
super(entry, owner, attribute, index, adapterFactory,
resourceLocator);
}
public Object getColumnImage(Object object, int columnIndex)
{
// TODO Auto-generated method stub
return null;
}
public String getColumnText(Object object, int columnIndex)
{
// TODO Auto-generated method stub
return null;
}
}
value = new
MyFeatureMapEntryWrapperItemProvider((FeatureMap.Entry)value ,
object, (EAttribute)feature, index, adapterFactory,
getResourceLocator());
}
dmahler@gmail.com wrote:
> Thanks again Ed!
>
> Could you expand on that little though,
> I've only been working with Eclipse for less than a month.
>
> What are my options? Can I add the missing APIs myself?
> How do I find out what exactly needs adding?
> Is this an Eclipse bug? Should I report it somewhere?
> Does it mean the AOP approach to customization is flawed in this particular
> case? or more generally?
>
> thanks
> D
>
>
> Ed Merks wrote:
>
>
>> D,
>>
>> Probably wrappers are being created by this ItemProviderAdapter method
>> and the wrappers are not implementing all the APIs you need them to
>> implement.
>>
>> protected Object createWrapper(EObject object, EStructuralFeature
>> feature, Object value, int index)
>> {
>> if (!isWrappingNeeded(object)) return value;
>>
>> if (FeatureMapUtil.isFeatureMap(feature))
>> {
>> value = new
>> *FeatureMapEntryWrapperItemProvider*((FeatureMap.Entry)value ,
>> object, (EAttribute)feature, index, adapterFactory,
>> getResourceLocator());
>> }
>> else if (feature instanceof EAttribute)
>> {
>> value = new *AttributeValueWrapperItemProvider*(value, object,
>> (EAttribute)feature, index, adapterFactory, getResourceLocator());
>> }
>> else if (!((EReference)feature).isContainment())
>> {
>> value = new *DelegatingWrapperItemProvider*(value, object,
>> feature, index, adapterFactory);
>> }
>>
>> return value;
>> }
>>
>> dmahler@gmail.com wrote:
>>
>>> I have been experimenting with customizing emf generated code using
>>> AspectJ,
>>> [and so far it has been pretty close to a raging succcess. :) ]
>>> Now I am trying to 'Tree with Columns' editor page to do something
>>> useful. Since the column contents are fairly uniform,
>>> I using AspectJ to essentially create a mixin trait to inherit into all
>>> my item providers (see code below).
>>> My model is generated from an XSD (that explains the odd classnames) and
>>> comes in 2 packages.
>>> So I have created three trivial interfaces:
>>> and andcestor for all item providers, and 2 specializations of it (1 for
>>> each package).
>>>
>>> I the aspect I then make the generated item providers implement the new
>>> interfaces and I make the new top inteface provide default
>>> implementations
>>> for the ITableItemLabelProvider interface and declare the it to extend
>>> all the item provider interfaces.
>>>
>>> Finally I add _1ItemProviderAdapterFactory.new() to the supportedTypes
>>> list of the adapter factory in each package using after advice on its
>>> constructor.
>>>
>>> As far as I understand the EMF framework, this should do it,
>>> since now all the item providers implement ITableItemLabelProvider
>>> and both the adapter factories support it.
>>> However, when I run the plugin,
>>> I only get the new behaviour for the document root node
>>> and all the descendants revert to the eclipse default behavior,
>>> of showing the same information in both columns.
>>> According to the AJDT tools my advice is being applied to all my classes,
>>> so I do not know what is going on.
>>> Any advice appreciated.
>>>
>>> thanks
>>> D
>>>
>>>
>>>
>>>
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>> public interface CrcsItemProvider {
>>>
>>> }
>>>
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>> public interface CCSItemProvider extends CrcsItemProvider {
>>>
>>> }
>>>
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>> public interface RCSItemProvider extends CrcsItemProvider {
>>>
>>> }
>>>
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>
>>> public privileged aspect TextProvider {
>>>
>>> declare parents: com.rightscom.ns.ccs.provider.*Provider
>>> implements
>>> CCSItemProvider;
>>>
>>> declare parents: org.relaxng.ns.structure._1.provider.*Provider
>>> implements RCSItemProvider;
>>>
>>> declare parents: CrcsItemProvider implements
>>> ITableItemLabelProvider, IEditingDomainItemProvider,
>>> IStructuredItemContentProvider,
>>> ITreeItemContentProvider,
>>> IItemLabelProvider,
>>> IItemPropertySource;
>>>
>>> ////////////////////////////
>>>
>>> public String CrcsItemProvider.getColumnText (Object o, int i) {
>>> String res = null;
>>> switch (i) {
>>> case 0: res = getText(o); break;
>>> default: res ="ZZZZZZZZ"; break;
>>> }
>>> return res;
>>> }
>>>
>>> public Object CrcsItemProvider.getColumnImage (Object o, int i) {
>>> Object res = null;
>>> switch (i) {
>>> case 0: res = getImage(o); break;
>>> default: res =null; break;
>>> }
>>> return getImage(o);
>>> }
>>>
>>> after (CcsItemProviderAdapterFactory t) returning:
>>> execution(CcsItemProviderAdapterFactory.new())
>>> && this(t) {
>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>> }
>>>
>>> after (_1ItemProviderAdapterFactory t) returning:
>>> execution(_1ItemProviderAdapterFactory.new())
>>> && this(t) {
>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>> }
>>> ....
>>> }
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>
>>>
>>>
>
>
--------------000708000103030405040508
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
D,<br>
<br>
Unfortunately I don't understand the aspect stuff well enough to say
intelligent things. I think your approach will still work. I'll
answer in terms of what I'd do without aspects to support this. I.e.,
I'd create a derived wrapper <small>MyFeatureMapEntryWrapperItemProvider
</small> that implements the API that my factory wants to support.<br>
<blockquote><small> protected Object createWrapper(EObject object,
EStructuralFeature feature, Object value, int index)<br>
{<br>
if (!isWrappingNeeded(object)) return value;<br>
<br>
if (FeatureMapUtil.isFeatureMap(feature))<br>
{<br>
class MyFeatureMapEntryWrapperItemProvider extends
FeatureMapEntryWrapperItemProvider implements ITableItemLabelProvider<br>
{<br>
public MyFeatureMapEntryWrapperItemProvider(<br>
FeatureMap.Entry entry,<br>
EObject owner,<br>
EAttribute attribute,<br>
int index,<br>
AdapterFactory adapterFactory,<br>
ResourceLocator resourceLocator)<br>
{<br>
super(entry, owner, attribute, index, adapterFactory,
resourceLocator); <br>
}<br>
<br>
public Object getColumnImage(Object object, int columnIndex)<br>
{<br>
// TODO Auto-generated method stub<br>
return null;<br>
}<br>
<br>
public String getColumnText(Object object, int columnIndex)<br>
{<br>
// TODO Auto-generated method stub<br>
return null;<br>
}<br>
}<br>
value = new
MyFeatureMapEntryWrapperItemProvider((FeatureMap.Entry)value , object,
(EAttribute)feature, index, adapterFactory, getResourceLocator());<br>
}</small><br>
</blockquote>
<br>
<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:dmahler@gmail.com">dmahler@gmail.com</a> wrote:
<blockquote cite="mide9o6su$sje$2@utils.eclipse.org" type="cite">
<pre wrap="">Thanks again Ed!
Could you expand on that little though,
I've only been working with Eclipse for less than a month.
What are my options? Can I add the missing APIs myself?
How do I find out what exactly needs adding?
Is this an Eclipse bug? Should I report it somewhere?
Does it mean the AOP approach to customization is flawed in this particular
case? or more generally?
thanks
D
Ed Merks wrote:
</pre>
<blockquote type="cite">
<pre wrap="">D,
Probably wrappers are being created by this ItemProviderAdapter method
and the wrappers are not implementing all the APIs you need them to
implement.
protected Object createWrapper(EObject object, EStructuralFeature
feature, Object value, int index)
{
if (!isWrappingNeeded(object)) return value;
if (FeatureMapUtil.isFeatureMap(feature))
{
value = new
*FeatureMapEntryWrapperItemProvider*((FeatureMap.Entry)value ,
object, (EAttribute)feature, index, adapterFactory,
getResourceLocator());
}
else if (feature instanceof EAttribute)
{
value = new *AttributeValueWrapperItemProvider*(value, object,
(EAttribute)feature, index, adapterFactory, getResourceLocator());
}
else if (!((EReference)feature).isContainment())
{
value = new *DelegatingWrapperItemProvider*(value, object,
feature, index, adapterFactory);
}
return value;
}
<a class="moz-txt-link-abbreviated" href="mailto:dmahler@gmail.com">dmahler@gmail.com</a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I have been experimenting with customizing emf generated code using
AspectJ,
[and so far it has been pretty close to a raging succcess. :) ]
Now I am trying to 'Tree with Columns' editor page to do something
useful. Since the column contents are fairly uniform,
I using AspectJ to essentially create a mixin trait to inherit into all
my item providers (see code below).
My model is generated from an XSD (that explains the odd classnames) and
comes in 2 packages.
So I have created three trivial interfaces:
and andcestor for all item providers, and 2 specializations of it (1 for
each package).
I the aspect I then make the generated item providers implement the new
interfaces and I make the new top inteface provide default
implementations
for the ITableItemLabelProvider interface and declare the it to extend
all the item provider interfaces.
Finally I add _1ItemProviderAdapterFactory.new() to the supportedTypes
list of the adapter factory in each package using after advice on its
constructor.
As far as I understand the EMF framework, this should do it,
since now all the item providers implement ITableItemLabelProvider
and both the adapter factories support it.
However, when I run the plugin,
I only get the new behaviour for the document root node
and all the descendants revert to the eclipse default behavior,
of showing the same information in both columns.
According to the AJDT tools my advice is being applied to all my classes,
so I do not know what is going on.
Any advice appreciated.
thanks
D
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public interface CrcsItemProvider {
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public interface CCSItemProvider extends CrcsItemProvider {
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public interface RCSItemProvider extends CrcsItemProvider {
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public privileged aspect TextProvider {
declare parents: com.rightscom.ns.ccs.provider.*Provider
implements
CCSItemProvider;
declare parents: org.relaxng.ns.structure._1.provider.*Provider
implements RCSItemProvider;
declare parents: CrcsItemProvider implements
ITableItemLabelProvider, IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
IItemLabelProvider,
IItemPropertySource;
////////////////////////////
public String CrcsItemProvider.getColumnText (Object o, int i) {
String res = null;
switch (i) {
case 0: res = getText(o); break;
default: res ="ZZZZZZZZ"; break;
}
return res;
}
public Object CrcsItemProvider.getColumnImage (Object o, int i) {
Object res = null;
switch (i) {
case 0: res = getImage(o); break;
default: res =null; break;
}
return getImage(o);
}
after (CcsItemProviderAdapterFactory t) returning:
execution(CcsItemProviderAdapterFactory.new())
&& this(t) {
t.supportedTypes.add(ITableItemLabelProvider.class);
}
after (_1ItemProviderAdapterFactory t) returning:
execution(_1ItemProviderAdapterFactory.new())
&& this(t) {
t.supportedTypes.add(ITableItemLabelProvider.class);
}
.....
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
<br>
</body>
</html>
--------------000708000103030405040508--
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: implementing ITableItemLabelProvider with aspects [message #594400 is a reply to message #66251] |
Thu, 20 July 2006 15:47 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
--------------040101020701010702080409
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
D,
If people want to support additional APIs, they need to get the wrappers
to support those as well (if their model uses wrappers, which most
non-schema-based models don't). So they need to create derived wrapper
classes for that, as I showed in the other note. People often need to
do this because they don't like the labels we generate by default for
the wrappers...
dmahler@gmail.com wrote:
> Ed,
>
> I missed the stars in your post at first.
> Now I see that the classes you highlighted do not
> implementITableItemLabelProvider, so the wrappers mask the getColumn*
> methods.
> This seems to have nothing to do with using aspects.
> How can you get columns to work at all if wrappers supress the column
> methods?
> Wouldn't people have run into this already?
> Is there something I am not getting?
>
> cheers
> D
>
> dmahler@gmail.com wrote:
>
>
>> Thanks again Ed!
>>
>> Could you expand on that little though,
>> I've only been working with Eclipse for less than a month.
>>
>> What are my options? Can I add the missing APIs myself?
>> How do I find out what exactly needs adding?
>> Is this an Eclipse bug? Should I report it somewhere?
>> Does it mean the AOP approach to customization is flawed in this
>> particular case? or more generally?
>>
>> thanks
>> D
>>
>>
>> Ed Merks wrote:
>>
>>
>>> D,
>>>
>>> Probably wrappers are being created by this ItemProviderAdapter method
>>> and the wrappers are not implementing all the APIs you need them to
>>> implement.
>>>
>>> protected Object createWrapper(EObject object, EStructuralFeature
>>> feature, Object value, int index)
>>> {
>>> if (!isWrappingNeeded(object)) return value;
>>>
>>> if (FeatureMapUtil.isFeatureMap(feature))
>>> {
>>> value = new
>>> *FeatureMapEntryWrapperItemProvider*((FeatureMap.Entry)value ,
>>> object, (EAttribute)feature, index, adapterFactory,
>>> getResourceLocator());
>>> }
>>> else if (feature instanceof EAttribute)
>>> {
>>> value = new *AttributeValueWrapperItemProvider*(value, object,
>>> (EAttribute)feature, index, adapterFactory, getResourceLocator());
>>> }
>>> else if (!((EReference)feature).isContainment())
>>> {
>>> value = new *DelegatingWrapperItemProvider*(value, object,
>>> feature, index, adapterFactory);
>>> }
>>>
>>> return value;
>>> }
>>>
>>> dmahler@gmail.com wrote:
>>>
>>>> I have been experimenting with customizing emf generated code using
>>>> AspectJ,
>>>> [and so far it has been pretty close to a raging succcess. :) ]
>>>> Now I am trying to 'Tree with Columns' editor page to do something
>>>> useful. Since the column contents are fairly uniform,
>>>> I using AspectJ to essentially create a mixin trait to inherit into all
>>>> my item providers (see code below).
>>>> My model is generated from an XSD (that explains the odd classnames) and
>>>> comes in 2 packages.
>>>> So I have created three trivial interfaces:
>>>> and andcestor for all item providers, and 2 specializations of it (1 for
>>>> each package).
>>>>
>>>> I the aspect I then make the generated item providers implement the new
>>>> interfaces and I make the new top inteface provide default
>>>> implementations
>>>> for the ITableItemLabelProvider interface and declare the it to extend
>>>> all the item provider interfaces.
>>>>
>>>> Finally I add _1ItemProviderAdapterFactory.new() to the supportedTypes
>>>> list of the adapter factory in each package using after advice on its
>>>> constructor.
>>>>
>>>> As far as I understand the EMF framework, this should do it,
>>>> since now all the item providers implement ITableItemLabelProvider
>>>> and both the adapter factories support it.
>>>> However, when I run the plugin,
>>>> I only get the new behaviour for the document root node
>>>> and all the descendants revert to the eclipse default behavior,
>>>> of showing the same information in both columns.
>>>> According to the AJDT tools my advice is being applied to all my
>>>> classes, so I do not know what is going on.
>>>> Any advice appreciated.
>>>>
>>>> thanks
>>>> D
>>>>
>>>>
>>>>
>>>>
>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>> public interface CrcsItemProvider {
>>>>
>>>> }
>>>>
>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>> public interface CCSItemProvider extends CrcsItemProvider {
>>>>
>>>> }
>>>>
>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>> public interface RCSItemProvider extends CrcsItemProvider {
>>>>
>>>> }
>>>>
>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>
>>>> public privileged aspect TextProvider {
>>>>
>>>> declare parents: com.rightscom.ns.ccs.provider.*Provider
>>>> implements
>>>> CCSItemProvider;
>>>>
>>>> declare parents:
>>>> org.relaxng.ns.structure._1.provider.*Provider
>>>> implements RCSItemProvider;
>>>>
>>>> declare parents: CrcsItemProvider implements
>>>> ITableItemLabelProvider, IEditingDomainItemProvider,
>>>> IStructuredItemContentProvider,
>>>> ITreeItemContentProvider,
>>>> IItemLabelProvider,
>>>> IItemPropertySource;
>>>>
>>>> ////////////////////////////
>>>>
>>>> public String CrcsItemProvider.getColumnText (Object o, int i) {
>>>> String res = null;
>>>> switch (i) {
>>>> case 0: res = getText(o); break;
>>>> default: res ="ZZZZZZZZ"; break;
>>>> }
>>>> return res;
>>>> }
>>>>
>>>> public Object CrcsItemProvider.getColumnImage (Object o, int i)
>>>> {
>>>> Object res = null;
>>>> switch (i) {
>>>> case 0: res = getImage(o); break;
>>>> default: res =null; break;
>>>> }
>>>> return getImage(o);
>>>> }
>>>>
>>>> after (CcsItemProviderAdapterFactory t) returning:
>>>> execution(CcsItemProviderAdapterFactory.new())
>>>> && this(t) {
>>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>>> }
>>>>
>>>> after (_1ItemProviderAdapterFactory t) returning:
>>>> execution(_1ItemProviderAdapterFactory.new())
>>>> && this(t) {
>>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>>> }
>>>> ....
>>>> }
>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>
>>>>
>>>>
>
>
--------------040101020701010702080409
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
D,<br>
<br>
If people want to support additional APIs, they need to get the
wrappers to support those as well (if their model uses wrappers, which
most non-schema-based models don't). So they need to create derived
wrapper classes for that, as I showed in the other note. People often
need to do this because they don't like the labels we generate by
default for the wrappers...<br>
<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:dmahler@gmail.com">dmahler@gmail.com</a> wrote:
<blockquote cite="mide9o89o$c9k$1@utils.eclipse.org" type="cite">
<pre wrap="">Ed,
I missed the stars in your post at first.
Now I see that the classes you highlighted do not
implementITableItemLabelProvider, so the wrappers mask the getColumn*
methods.
This seems to have nothing to do with using aspects.
How can you get columns to work at all if wrappers supress the column
methods?
Wouldn't people have run into this already?
Is there something I am not getting?
cheers
D
<a class="moz-txt-link-abbreviated" href="mailto:dmahler@gmail.com">dmahler@gmail.com</a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Thanks again Ed!
Could you expand on that little though,
I've only been working with Eclipse for less than a month.
What are my options? Can I add the missing APIs myself?
How do I find out what exactly needs adding?
Is this an Eclipse bug? Should I report it somewhere?
Does it mean the AOP approach to customization is flawed in this
particular case? or more generally?
thanks
D
Ed Merks wrote:
</pre>
<blockquote type="cite">
<pre wrap="">D,
Probably wrappers are being created by this ItemProviderAdapter method
and the wrappers are not implementing all the APIs you need them to
implement.
protected Object createWrapper(EObject object, EStructuralFeature
feature, Object value, int index)
{
if (!isWrappingNeeded(object)) return value;
if (FeatureMapUtil.isFeatureMap(feature))
{
value = new
*FeatureMapEntryWrapperItemProvider*((FeatureMap.Entry)value ,
object, (EAttribute)feature, index, adapterFactory,
getResourceLocator());
}
else if (feature instanceof EAttribute)
{
value = new *AttributeValueWrapperItemProvider*(value, object,
(EAttribute)feature, index, adapterFactory, getResourceLocator());
}
else if (!((EReference)feature).isContainment())
{
value = new *DelegatingWrapperItemProvider*(value, object,
feature, index, adapterFactory);
}
return value;
}
<a class="moz-txt-link-abbreviated" href="mailto:dmahler@gmail.com">dmahler@gmail.com</a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I have been experimenting with customizing emf generated code using
AspectJ,
[and so far it has been pretty close to a raging succcess. :) ]
Now I am trying to 'Tree with Columns' editor page to do something
useful. Since the column contents are fairly uniform,
I using AspectJ to essentially create a mixin trait to inherit into all
my item providers (see code below).
My model is generated from an XSD (that explains the odd classnames) and
comes in 2 packages.
So I have created three trivial interfaces:
and andcestor for all item providers, and 2 specializations of it (1 for
each package).
I the aspect I then make the generated item providers implement the new
interfaces and I make the new top inteface provide default
implementations
for the ITableItemLabelProvider interface and declare the it to extend
all the item provider interfaces.
Finally I add _1ItemProviderAdapterFactory.new() to the supportedTypes
list of the adapter factory in each package using after advice on its
constructor.
As far as I understand the EMF framework, this should do it,
since now all the item providers implement ITableItemLabelProvider
and both the adapter factories support it.
However, when I run the plugin,
I only get the new behaviour for the document root node
and all the descendants revert to the eclipse default behavior,
of showing the same information in both columns.
According to the AJDT tools my advice is being applied to all my
classes, so I do not know what is going on.
Any advice appreciated.
thanks
D
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public interface CrcsItemProvider {
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public interface CCSItemProvider extends CrcsItemProvider {
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public interface RCSItemProvider extends CrcsItemProvider {
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public privileged aspect TextProvider {
declare parents: com.rightscom.ns.ccs.provider.*Provider
implements
CCSItemProvider;
declare parents:
org.relaxng.ns.structure._1.provider.*Provider
implements RCSItemProvider;
declare parents: CrcsItemProvider implements
ITableItemLabelProvider, IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
IItemLabelProvider,
IItemPropertySource;
////////////////////////////
public String CrcsItemProvider.getColumnText (Object o, int i) {
String res = null;
switch (i) {
case 0: res = getText(o); break;
default: res ="ZZZZZZZZ"; break;
}
return res;
}
public Object CrcsItemProvider.getColumnImage (Object o, int i)
{
Object res = null;
switch (i) {
case 0: res = getImage(o); break;
default: res =null; break;
}
return getImage(o);
}
after (CcsItemProviderAdapterFactory t) returning:
execution(CcsItemProviderAdapterFactory.new())
&& this(t) {
t.supportedTypes.add(ITableItemLabelProvider.class);
}
after (_1ItemProviderAdapterFactory t) returning:
execution(_1ItemProviderAdapterFactory.new())
&& this(t) {
t.supportedTypes.add(ITableItemLabelProvider.class);
}
.....
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
</pre>
</blockquote>
</blockquote>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
<br>
</body>
</html>
--------------040101020701010702080409--
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: implementing ITableItemLabelProvider with aspects [message #594431 is a reply to message #66275] |
Mon, 24 July 2006 16:00 |
Daniel Mahler Messages: 53 Registered: July 2009 |
Member |
|
|
Ed,
I've now implemented the the following extension to ItemProviderAdapter,
and made all my item providers inherit that instead (no aspects).
supportedTypes.add(ITableItemLabelProvider.class);
The "Tree with Columns" view now works correctly for the first 2 levels
of the tree, but still reverts to the default Tree view behaviour after
that.
According to my understanding of the EMF book, this and the
supportedTypes.add(ITableItemLabelProvider.class);
lines in the *ItemProviderAdapterFactory constructors should be all that is
needed.
thanks
D
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++
package com.rightscom.crcs;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.ecore.*;
import org.eclipse.emf.ecore.util.*;
import org.eclipse.emf.common.util.*;
import org.eclipse.emf.edit.provider.*;
public class CRCSItemProviderAdapter extends ItemProviderAdapter implements
ITableItemLabelProvider
{
public CRCSItemProviderAdapter(AdapterFactory adapterFactory) {
super(adapterFactory);
// TODO Auto-generated constructor stub
}
public String getColumnText (Object o, int i) {
String res="ZZ "+getText(o)+" :: "+String.valueOf(i);
return res;
}
public Object getColumnImage (Object o, int i) {
Object res = null;
switch (i) {
default: res = getImage(o); break;
}
return res;
}
@Override
protected Object createWrapper(EObject object, EStructuralFeature feature,
Object value, int index)
{
if (!isWrappingNeeded(object)) return value;
if (FeatureMapUtil.isFeatureMap(feature))
{
class AA extends FeatureMapEntryWrapperItemProvider implements
ITableItemLabelProvider
{
public AA (FeatureMap.Entry entry, EObject owner, EAttribute attribute,
int index, AdapterFactory adapterFactory, ResourceLocator resourceLocator)
{
super(entry, owner, attribute, index, adapterFactory, resourceLocator);
}
public String getColumnText (Object o, int i) {
String res="AA "+getText(o)+" :: "+String.valueOf(i);
return res;
}
public Object getColumnImage (Object o, int i) {
Object res = null;
switch (i) {
default: res = getImage(o); break;
}
return res;
}
}
value = new AA ((FeatureMap.Entry)value, object, (EAttribute)feature,
index, adapterFactory, getResourceLocator());
}
else if (feature instanceof EAttribute)
{
class BB extends AttributeValueWrapperItemProvider implements
ITableItemLabelProvider
{
public BB(Object value, EObject owner, EAttribute attribute,
AdapterFactory adapterFactory, ResourceLocator resourceLocator) {
super(value, owner, attribute, adapterFactory, resourceLocator);
// TODO Auto-generated constructor stub
}
public BB(Object value, EObject owner, EAttribute attribute, int index,
AdapterFactory adapterFactory, ResourceLocator resourceLocator) {
super(value, owner, attribute, index, adapterFactory, resourceLocator);
}
public String getColumnText (Object o, int i) {
String res="BB "+ getText(o)+" :: "+String.valueOf(i);
return res;
}
public Object getColumnImage (Object o, int i) {
Object res = null;
switch (i) {
default: res = getImage(o); break;
}
return res;
}
}
value = new BB(value, object, (EAttribute)feature, index,
adapterFactory, getResourceLocator());
}
else if (!((EReference)feature).isContainment())
{
class CC extends DelegatingWrapperItemProvider implements
ITableItemLabelProvider
{
public CC(Object value, Object owner, EStructuralFeature feature, int
index, AdapterFactory adapterFactory) {
super(value, owner, feature, index, adapterFactory);
}
public String getColumnText (Object o, int i) {
String res="CC " + getText(o)+" :: "+String.valueOf(i);
return res;
}
public Object getColumnImage (Object o, int i) {
Object res = null;
switch (i) {
default: res = getImage(o); break;
}
return res;
}
}
value = new CC (value, object, feature, index, adapterFactory);
}
return value;
}
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++
Ed Merks wrote:
> D,
>
> Unfortunately I don't understand the aspect stuff well enough to say
> intelligent things. I think your approach will still work. I'll answer
> in terms of what I'd do without aspects to support this. I.e., I'd
> create a derived wrapper MyFeatureMapEntryWrapperItemProvider that
> implements the API that my factory wants to support.
>
> protected Object createWrapper(EObject object, EStructuralFeature
> feature, Object value, int index)
> {
> if (!isWrappingNeeded(object)) return value;
>
> if (FeatureMapUtil.isFeatureMap(feature))
> {
> class MyFeatureMapEntryWrapperItemProvider extends
> FeatureMapEntryWrapperItemProvider implements ITableItemLabelProvider
> {
> public MyFeatureMapEntryWrapperItemProvider(
> FeatureMap.Entry entry,
> EObject owner,
> EAttribute attribute,
> int index,
> AdapterFactory adapterFactory,
> ResourceLocator resourceLocator)
> {
> super(entry, owner, attribute, index, adapterFactory,
> resourceLocator);
> }
>
> public Object getColumnImage(Object object, int columnIndex)
> {
> // TODO Auto-generated method stub
> return null;
> }
>
> public String getColumnText(Object object, int columnIndex)
> {
> // TODO Auto-generated method stub
> return null;
> }
> }
> value = new
> MyFeatureMapEntryWrapperItemProvider((FeatureMap.Entry)value ,
> object, (EAttribute)feature, index, adapterFactory,
> getResourceLocator());
> }
>
>
>
>
> dmahler@gmail.com wrote:
>> Thanks again Ed!
>>
>> Could you expand on that little though,
>> I've only been working with Eclipse for less than a month.
>>
>> What are my options? Can I add the missing APIs myself?
>> How do I find out what exactly needs adding?
>> Is this an Eclipse bug? Should I report it somewhere?
>> Does it mean the AOP approach to customization is flawed in this
>> particular case? or more generally?
>>
>> thanks
>> D
>>
>>
>> Ed Merks wrote:
>>
>>
>>> D,
>>>
>>> Probably wrappers are being created by this ItemProviderAdapter method
>>> and the wrappers are not implementing all the APIs you need them to
>>> implement.
>>>
>>> protected Object createWrapper(EObject object, EStructuralFeature
>>> feature, Object value, int index)
>>> {
>>> if (!isWrappingNeeded(object)) return value;
>>>
>>> if (FeatureMapUtil.isFeatureMap(feature))
>>> {
>>> value = new
>>> *FeatureMapEntryWrapperItemProvider*((FeatureMap.Entry)value ,
>>> object, (EAttribute)feature, index, adapterFactory,
>>> getResourceLocator());
>>> }
>>> else if (feature instanceof EAttribute)
>>> {
>>> value = new *AttributeValueWrapperItemProvider*(value, object,
>>> (EAttribute)feature, index, adapterFactory, getResourceLocator());
>>> }
>>> else if (!((EReference)feature).isContainment())
>>> {
>>> value = new *DelegatingWrapperItemProvider*(value, object,
>>> feature, index, adapterFactory);
>>> }
>>>
>>> return value;
>>> }
>>>
>>> dmahler@gmail.com wrote:
>>>
>>>> I have been experimenting with customizing emf generated code using
>>>> AspectJ,
>>>> [and so far it has been pretty close to a raging succcess. :) ]
>>>> Now I am trying to 'Tree with Columns' editor page to do something
>>>> useful. Since the column contents are fairly uniform,
>>>> I using AspectJ to essentially create a mixin trait to inherit into all
>>>> my item providers (see code below).
>>>> My model is generated from an XSD (that explains the odd classnames)
>>>> and comes in 2 packages.
>>>> So I have created three trivial interfaces:
>>>> and andcestor for all item providers, and 2 specializations of it (1
>>>> for each package).
>>>>
>>>> I the aspect I then make the generated item providers implement the new
>>>> interfaces and I make the new top inteface provide default
>>>> implementations
>>>> for the ITableItemLabelProvider interface and declare the it to extend
>>>> all the item provider interfaces.
>>>>
>>>> Finally I add _1ItemProviderAdapterFactory.new() to the supportedTypes
>>>> list of the adapter factory in each package using after advice on its
>>>> constructor.
>>>>
>>>> As far as I understand the EMF framework, this should do it,
>>>> since now all the item providers implement ITableItemLabelProvider
>>>> and both the adapter factories support it.
>>>> However, when I run the plugin,
>>>> I only get the new behaviour for the document root node
>>>> and all the descendants revert to the eclipse default behavior,
>>>> of showing the same information in both columns.
>>>> According to the AJDT tools my advice is being applied to all my
>>>> classes, so I do not know what is going on.
>>>> Any advice appreciated.
>>>>
>>>> thanks
>>>> D
>>>>
>>>>
>>>>
>>>>
>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>> public interface CrcsItemProvider {
>>>>
>>>> }
>>>>
>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>> public interface CCSItemProvider extends CrcsItemProvider {
>>>>
>>>> }
>>>>
>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>> public interface RCSItemProvider extends CrcsItemProvider {
>>>>
>>>> }
>>>>
>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>
>>>> public privileged aspect TextProvider {
>>>>
>>>> declare parents: com.rightscom.ns.ccs.provider.*Provider
>>>> implements
>>>> CCSItemProvider;
>>>>
>>>> declare parents:
>>>> org.relaxng.ns.structure._1.provider.*Provider
>>>> implements RCSItemProvider;
>>>>
>>>> declare parents: CrcsItemProvider implements
>>>> ITableItemLabelProvider, IEditingDomainItemProvider,
>>>> IStructuredItemContentProvider,
>>>> ITreeItemContentProvider,
>>>> IItemLabelProvider,
>>>> IItemPropertySource;
>>>>
>>>> ////////////////////////////
>>>>
>>>> public String CrcsItemProvider.getColumnText (Object o, int i)
>>>> {
>>>> String res = null;
>>>> switch (i) {
>>>> case 0: res = getText(o); break;
>>>> default: res ="ZZZZZZZZ"; break;
>>>> }
>>>> return res;
>>>> }
>>>>
>>>> public Object CrcsItemProvider.getColumnImage (Object o, int i)
>>>> {
>>>> Object res = null;
>>>> switch (i) {
>>>> case 0: res = getImage(o); break;
>>>> default: res =null; break;
>>>> }
>>>> return getImage(o);
>>>> }
>>>>
>>>> after (CcsItemProviderAdapterFactory t) returning:
>>>> execution(CcsItemProviderAdapterFactory.new())
>>>> && this(t) {
>>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>>> }
>>>>
>>>> after (_1ItemProviderAdapterFactory t) returning:
>>>> execution(_1ItemProviderAdapterFactory.new())
>>>> && this(t) {
>>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>>> }
>>>> ....
>>>> }
>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>
>>>>
>>>>
>>
>>
|
|
|
Re: implementing ITableItemLabelProvider with aspects [message #594444 is a reply to message #66359] |
Mon, 24 July 2006 17:01 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
--------------070405050706040505070106
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
D,
Yes, this should do the trick. Set a breakpoint
AdapterFactoryLabelProvider.getColumnText and see what's happening there
for the case that it's not working.
dmahler@gmail.com wrote:
>Ed,
>
>I've now implemented the the following extension to ItemProviderAdapter,
>and made all my item providers inherit that instead (no aspects).
>supportedTypes.add(ITableItemLabelProvider.class);
>
>The "Tree with Columns" view now works correctly for the first 2 levels
>of the tree, but still reverts to the default Tree view behaviour after
>that.
>
>According to my understanding of the EMF book, this and the
>
>supportedTypes.add(ITableItemLabelProvider.class);
>
>lines in the *ItemProviderAdapterFactory constructors should be all that is
>needed.
>
>thanks
>D
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++
>package com.rightscom.crcs;
>
>import org.eclipse.emf.common.notify.AdapterFactory;
>
>import org.eclipse.emf.ecore.*;
>import org.eclipse.emf.ecore.util.*;
>import org.eclipse.emf.common.util.*;
>import org.eclipse.emf.edit.provider.*;
>
>public class CRCSItemProviderAdapter extends ItemProviderAdapter implements
>ITableItemLabelProvider
>{
>
> public CRCSItemProviderAdapter(AdapterFactory adapterFactory) {
> super(adapterFactory);
> // TODO Auto-generated constructor stub
> }
>
>
> public String getColumnText (Object o, int i) {
> String res="ZZ "+getText(o)+" :: "+String.valueOf(i);
> return res;
> }
>
> public Object getColumnImage (Object o, int i) {
> Object res = null;
> switch (i) {
> default: res = getImage(o); break;
> }
> return res;
> }
>
> @Override
> protected Object createWrapper(EObject object, EStructuralFeature feature,
>Object value, int index)
> {
> if (!isWrappingNeeded(object)) return value;
>
> if (FeatureMapUtil.isFeatureMap(feature))
> {
> class AA extends FeatureMapEntryWrapperItemProvider implements
>ITableItemLabelProvider
> {
> public AA (FeatureMap.Entry entry, EObject owner, EAttribute attribute,
>int index, AdapterFactory adapterFactory, ResourceLocator resourceLocator)
>{
> super(entry, owner, attribute, index, adapterFactory, resourceLocator);
> }
> public String getColumnText (Object o, int i) {
> String res="AA "+getText(o)+" :: "+String.valueOf(i);
> return res;
> }
> public Object getColumnImage (Object o, int i) {
> Object res = null;
> switch (i) {
> default: res = getImage(o); break;
> }
> return res;
> }
> }
> value = new AA ((FeatureMap.Entry)value, object, (EAttribute)feature,
>index, adapterFactory, getResourceLocator());
> }
> else if (feature instanceof EAttribute)
> {
> class BB extends AttributeValueWrapperItemProvider implements
>ITableItemLabelProvider
> {
> public BB(Object value, EObject owner, EAttribute attribute,
>AdapterFactory adapterFactory, ResourceLocator resourceLocator) {
> super(value, owner, attribute, adapterFactory, resourceLocator);
> // TODO Auto-generated constructor stub
> }
> public BB(Object value, EObject owner, EAttribute attribute, int index,
>AdapterFactory adapterFactory, ResourceLocator resourceLocator) {
> super(value, owner, attribute, index, adapterFactory, resourceLocator);
> }
> public String getColumnText (Object o, int i) {
> String res="BB "+ getText(o)+" :: "+String.valueOf(i);
> return res;
> }
> public Object getColumnImage (Object o, int i) {
> Object res = null;
> switch (i) {
> default: res = getImage(o); break;
> }
> return res;
> }
> }
> value = new BB(value, object, (EAttribute)feature, index,
>adapterFactory, getResourceLocator());
> }
> else if (!((EReference)feature).isContainment())
> {
> class CC extends DelegatingWrapperItemProvider implements
>ITableItemLabelProvider
> {
> public CC(Object value, Object owner, EStructuralFeature feature, int
>index, AdapterFactory adapterFactory) {
> super(value, owner, feature, index, adapterFactory);
> }
> public String getColumnText (Object o, int i) {
> String res="CC " + getText(o)+" :: "+String.valueOf(i);
> return res;
> }
>
> public Object getColumnImage (Object o, int i) {
> Object res = null;
> switch (i) {
> default: res = getImage(o); break;
> }
> return res;
> }
>
> }
> value = new CC (value, object, feature, index, adapterFactory);
> }
> return value;
> }
>}
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++
>
>
>Ed Merks wrote:
>
>
>
>>D,
>>
>>Unfortunately I don't understand the aspect stuff well enough to say
>>intelligent things. I think your approach will still work. I'll answer
>>in terms of what I'd do without aspects to support this. I.e., I'd
>>create a derived wrapper MyFeatureMapEntryWrapperItemProvider that
>>implements the API that my factory wants to support.
>>
>> protected Object createWrapper(EObject object, EStructuralFeature
>> feature, Object value, int index)
>> {
>> if (!isWrappingNeeded(object)) return value;
>>
>> if (FeatureMapUtil.isFeatureMap(feature))
>> {
>> class MyFeatureMapEntryWrapperItemProvider extends
>> FeatureMapEntryWrapperItemProvider implements ITableItemLabelProvider
>> {
>> public MyFeatureMapEntryWrapperItemProvider(
>> FeatureMap.Entry entry,
>> EObject owner,
>> EAttribute attribute,
>> int index,
>> AdapterFactory adapterFactory,
>> ResourceLocator resourceLocator)
>> {
>> super(entry, owner, attribute, index, adapterFactory,
>> resourceLocator);
>> }
>>
>> public Object getColumnImage(Object object, int columnIndex)
>> {
>> // TODO Auto-generated method stub
>> return null;
>> }
>>
>> public String getColumnText(Object object, int columnIndex)
>> {
>> // TODO Auto-generated method stub
>> return null;
>> }
>> }
>> value = new
>> MyFeatureMapEntryWrapperItemProvider((FeatureMap.Entry)value ,
>> object, (EAttribute)feature, index, adapterFactory,
>> getResourceLocator());
>> }
>>
>>
>>
>>
>>dmahler@gmail.com wrote:
>>
>>
>>>Thanks again Ed!
>>>
>>>Could you expand on that little though,
>>>I've only been working with Eclipse for less than a month.
>>>
>>>What are my options? Can I add the missing APIs myself?
>>>How do I find out what exactly needs adding?
>>>Is this an Eclipse bug? Should I report it somewhere?
>>>Does it mean the AOP approach to customization is flawed in this
>>>particular case? or more generally?
>>>
>>>thanks
>>>D
>>>
>>>
>>>Ed Merks wrote:
>>>
>>>
>>>
>>>
>>>>D,
>>>>
>>>>Probably wrappers are being created by this ItemProviderAdapter method
>>>>and the wrappers are not implementing all the APIs you need them to
>>>>implement.
>>>>
>>>> protected Object createWrapper(EObject object, EStructuralFeature
>>>> feature, Object value, int index)
>>>> {
>>>> if (!isWrappingNeeded(object)) return value;
>>>>
>>>> if (FeatureMapUtil.isFeatureMap(feature))
>>>> {
>>>> value = new
>>>> *FeatureMapEntryWrapperItemProvider*((FeatureMap.Entry)value ,
>>>> object, (EAttribute)feature, index, adapterFactory,
>>>> getResourceLocator());
>>>> }
>>>> else if (feature instanceof EAttribute)
>>>> {
>>>> value = new *AttributeValueWrapperItemProvider*(value, object,
>>>> (EAttribute)feature, index, adapterFactory, getResourceLocator());
>>>> }
>>>> else if (!((EReference)feature).isContainment())
>>>> {
>>>> value = new *DelegatingWrapperItemProvider*(value, object,
>>>> feature, index, adapterFactory);
>>>> }
>>>>
>>>> return value;
>>>> }
>>>>
>>>>dmahler@gmail.com wrote:
>>>>
>>>>
>>>>
>>>>>I have been experimenting with customizing emf generated code using
>>>>>AspectJ,
>>>>>[and so far it has been pretty close to a raging succcess. :) ]
>>>>>Now I am trying to 'Tree with Columns' editor page to do something
>>>>>useful. Since the column contents are fairly uniform,
>>>>>I using AspectJ to essentially create a mixin trait to inherit into all
>>>>>my item providers (see code below).
>>>>>My model is generated from an XSD (that explains the odd classnames)
>>>>>and comes in 2 packages.
>>>>>So I have created three trivial interfaces:
>>>>>and andcestor for all item providers, and 2 specializations of it (1
>>>>>for each package).
>>>>>
>>>>>I the aspect I then make the generated item providers implement the new
>>>>>interfaces and I make the new top inteface provide default
>>>>>implementations
>>>>>for the ITableItemLabelProvider interface and declare the it to extend
>>>>>all the item provider interfaces.
>>>>>
>>>>>Finally I add _1ItemProviderAdapterFactory.new() to the supportedTypes
>>>>>list of the adapter factory in each package using after advice on its
>>>>>constructor.
>>>>>
>>>>>As far as I understand the EMF framework, this should do it,
>>>>>since now all the item providers implement ITableItemLabelProvider
>>>>>and both the adapter factories support it.
>>>>>However, when I run the plugin,
>>>>>I only get the new behaviour for the document root node
>>>>>and all the descendants revert to the eclipse default behavior,
>>>>>of showing the same information in both columns.
>>>>>According to the AJDT tools my advice is being applied to all my
>>>>>classes, so I do not know what is going on.
>>>>>Any advice appreciated.
>>>>>
>>>>>thanks
>>>>>D
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>public interface CrcsItemProvider {
>>>>>
>>>>>}
>>>>>
>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>public interface CCSItemProvider extends CrcsItemProvider {
>>>>>
>>>>>}
>>>>>
>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>public interface RCSItemProvider extends CrcsItemProvider {
>>>>>
>>>>>}
>>>>>
>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>
>>>>>public privileged aspect TextProvider {
>>>>>
>>>>> declare parents: com.rightscom.ns.ccs.provider.*Provider
>>>>> implements
>>>>>CCSItemProvider;
>>>>>
>>>>> declare parents:
>>>>> org.relaxng.ns.structure._1.provider.*Provider
>>>>>implements RCSItemProvider;
>>>>>
>>>>> declare parents: CrcsItemProvider implements
>>>>> ITableItemLabelProvider, IEditingDomainItemProvider,
>>>>> IStructuredItemContentProvider,
>>>>> ITreeItemContentProvider,
>>>>> IItemLabelProvider,
>>>>> IItemPropertySource;
>>>>>
>>>>> ////////////////////////////
>>>>>
>>>>> public String CrcsItemProvider.getColumnText (Object o, int i)
>>>>> {
>>>>> String res = null;
>>>>> switch (i) {
>>>>> case 0: res = getText(o); break;
>>>>> default: res ="ZZZZZZZZ"; break;
>>>>> }
>>>>> return res;
>>>>> }
>>>>>
>>>>> public Object CrcsItemProvider.getColumnImage (Object o, int i)
>>>>> {
>>>>> Object res = null;
>>>>> switch (i) {
>>>>> case 0: res = getImage(o); break;
>>>>> default: res =null; break;
>>>>> }
>>>>> return getImage(o);
>>>>> }
>>>>>
>>>>> after (CcsItemProviderAdapterFactory t) returning:
>>>>> execution(CcsItemProviderAdapterFactory.new())
>>>>> && this(t) {
>>>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>>>> }
>>>>>
>>>>> after (_1ItemProviderAdapterFactory t) returning:
>>>>> execution(_1ItemProviderAdapterFactory.new())
>>>>> && this(t) {
>>>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>>>> }
>>>>>....
>>>>>}
>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>>
>
>
>
--------------070405050706040505070106
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
D,<br>
<br>
Yes, this should do the trick. Set a breakpoint
AdapterFactoryLabelProvider.getColumnText and see what's happening
there for the case that it's not working.<br>
<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:dmahler@gmail.com">dmahler@gmail.com</a> wrote:
<blockquote cite="midea2ql5$sij$1@utils.eclipse.org" type="cite">
<pre wrap="">Ed,
I've now implemented the the following extension to ItemProviderAdapter,
and made all my item providers inherit that instead (no aspects).
supportedTypes.add(ITableItemLabelProvider.class);
The "Tree with Columns" view now works correctly for the first 2 levels
of the tree, but still reverts to the default Tree view behaviour after
that.
According to my understanding of the EMF book, this and the
supportedTypes.add(ITableItemLabelProvider.class);
lines in the *ItemProviderAdapterFactory constructors should be all that is
needed.
thanks
D
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++
package com.rightscom.crcs;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.ecore.*;
import org.eclipse.emf.ecore.util.*;
import org.eclipse.emf.common.util.*;
import org.eclipse.emf.edit.provider.*;
public class CRCSItemProviderAdapter extends ItemProviderAdapter implements
ITableItemLabelProvider
{
public CRCSItemProviderAdapter(AdapterFactory adapterFactory) {
super(adapterFactory);
// TODO Auto-generated constructor stub
}
public String getColumnText (Object o, int i) {
String res="ZZ "+getText(o)+" :: "+String.valueOf(i);
return res;
}
public Object getColumnImage (Object o, int i) {
Object res = null;
switch (i) {
default: res = getImage(o); break;
}
return res;
}
@Override
protected Object createWrapper(EObject object, EStructuralFeature feature,
Object value, int index)
{
if (!isWrappingNeeded(object)) return value;
if (FeatureMapUtil.isFeatureMap(feature))
{
class AA extends FeatureMapEntryWrapperItemProvider implements
ITableItemLabelProvider
{
public AA (FeatureMap.Entry entry, EObject owner, EAttribute attribute,
int index, AdapterFactory adapterFactory, ResourceLocator resourceLocator)
{
super(entry, owner, attribute, index, adapterFactory, resourceLocator);
}
public String getColumnText (Object o, int i) {
String res="AA "+getText(o)+" :: "+String.valueOf(i);
return res;
}
public Object getColumnImage (Object o, int i) {
Object res = null;
switch (i) {
default: res = getImage(o); break;
}
return res;
}
}
value = new AA ((FeatureMap.Entry)value, object, (EAttribute)feature,
index, adapterFactory, getResourceLocator());
}
else if (feature instanceof EAttribute)
{
class BB extends AttributeValueWrapperItemProvider implements
ITableItemLabelProvider
{
public BB(Object value, EObject owner, EAttribute attribute,
AdapterFactory adapterFactory, ResourceLocator resourceLocator) {
super(value, owner, attribute, adapterFactory, resourceLocator);
// TODO Auto-generated constructor stub
}
public BB(Object value, EObject owner, EAttribute attribute, int index,
AdapterFactory adapterFactory, ResourceLocator resourceLocator) {
super(value, owner, attribute, index, adapterFactory, resourceLocator);
}
public String getColumnText (Object o, int i) {
String res="BB "+ getText(o)+" :: "+String.valueOf(i);
return res;
}
public Object getColumnImage (Object o, int i) {
Object res = null;
switch (i) {
default: res = getImage(o); break;
}
return res;
}
}
value = new BB(value, object, (EAttribute)feature, index,
adapterFactory, getResourceLocator());
}
else if (!((EReference)feature).isContainment())
{
class CC extends DelegatingWrapperItemProvider implements
ITableItemLabelProvider
{
public CC(Object value, Object owner, EStructuralFeature feature, int
index, AdapterFactory adapterFactory) {
super(value, owner, feature, index, adapterFactory);
}
public String getColumnText (Object o, int i) {
String res="CC " + getText(o)+" :: "+String.valueOf(i);
return res;
}
public Object getColumnImage (Object o, int i) {
Object res = null;
switch (i) {
default: res = getImage(o); break;
}
return res;
}
}
value = new CC (value, object, feature, index, adapterFactory);
}
return value;
}
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++
Ed Merks wrote:
</pre>
<blockquote type="cite">
<pre wrap="">D,
Unfortunately I don't understand the aspect stuff well enough to say
intelligent things. I think your approach will still work. I'll answer
in terms of what I'd do without aspects to support this. I.e., I'd
create a derived wrapper MyFeatureMapEntryWrapperItemProvider that
implements the API that my factory wants to support.
protected Object createWrapper(EObject object, EStructuralFeature
feature, Object value, int index)
{
if (!isWrappingNeeded(object)) return value;
if (FeatureMapUtil.isFeatureMap(feature))
{
class MyFeatureMapEntryWrapperItemProvider extends
FeatureMapEntryWrapperItemProvider implements ITableItemLabelProvider
{
public MyFeatureMapEntryWrapperItemProvider(
FeatureMap.Entry entry,
EObject owner,
EAttribute attribute,
int index,
AdapterFactory adapterFactory,
ResourceLocator resourceLocator)
{
super(entry, owner, attribute, index, adapterFactory,
resourceLocator);
}
public Object getColumnImage(Object object, int columnIndex)
{
// TODO Auto-generated method stub
return null;
}
public String getColumnText(Object object, int columnIndex)
{
// TODO Auto-generated method stub
return null;
}
}
value = new
MyFeatureMapEntryWrapperItemProvider((FeatureMap.Entry)value ,
object, (EAttribute)feature, index, adapterFactory,
getResourceLocator());
}
<a class="moz-txt-link-abbreviated" href="mailto:dmahler@gmail.com">dmahler@gmail.com</a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Thanks again Ed!
Could you expand on that little though,
I've only been working with Eclipse for less than a month.
What are my options? Can I add the missing APIs myself?
How do I find out what exactly needs adding?
Is this an Eclipse bug? Should I report it somewhere?
Does it mean the AOP approach to customization is flawed in this
particular case? or more generally?
thanks
D
Ed Merks wrote:
</pre>
<blockquote type="cite">
<pre wrap="">D,
Probably wrappers are being created by this ItemProviderAdapter method
and the wrappers are not implementing all the APIs you need them to
implement.
protected Object createWrapper(EObject object, EStructuralFeature
feature, Object value, int index)
{
if (!isWrappingNeeded(object)) return value;
if (FeatureMapUtil.isFeatureMap(feature))
{
value = new
*FeatureMapEntryWrapperItemProvider*((FeatureMap.Entry)value ,
object, (EAttribute)feature, index, adapterFactory,
getResourceLocator());
}
else if (feature instanceof EAttribute)
{
value = new *AttributeValueWrapperItemProvider*(value, object,
(EAttribute)feature, index, adapterFactory, getResourceLocator());
}
else if (!((EReference)feature).isContainment())
{
value = new *DelegatingWrapperItemProvider*(value, object,
feature, index, adapterFactory);
}
return value;
}
<a class="moz-txt-link-abbreviated" href="mailto:dmahler@gmail.com">dmahler@gmail.com</a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I have been experimenting with customizing emf generated code using
AspectJ,
[and so far it has been pretty close to a raging succcess. :) ]
Now I am trying to 'Tree with Columns' editor page to do something
useful. Since the column contents are fairly uniform,
I using AspectJ to essentially create a mixin trait to inherit into all
my item providers (see code below).
My model is generated from an XSD (that explains the odd classnames)
and comes in 2 packages.
So I have created three trivial interfaces:
and andcestor for all item providers, and 2 specializations of it (1
for each package).
I the aspect I then make the generated item providers implement the new
interfaces and I make the new top inteface provide default
implementations
for the ITableItemLabelProvider interface and declare the it to extend
all the item provider interfaces.
Finally I add _1ItemProviderAdapterFactory.new() to the supportedTypes
list of the adapter factory in each package using after advice on its
constructor.
As far as I understand the EMF framework, this should do it,
since now all the item providers implement ITableItemLabelProvider
and both the adapter factories support it.
However, when I run the plugin,
I only get the new behaviour for the document root node
and all the descendants revert to the eclipse default behavior,
of showing the same information in both columns.
According to the AJDT tools my advice is being applied to all my
classes, so I do not know what is going on.
Any advice appreciated.
thanks
D
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public interface CrcsItemProvider {
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public interface CCSItemProvider extends CrcsItemProvider {
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public interface RCSItemProvider extends CrcsItemProvider {
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public privileged aspect TextProvider {
declare parents: com.rightscom.ns.ccs.provider.*Provider
implements
CCSItemProvider;
declare parents:
org.relaxng.ns.structure._1.provider.*Provider
implements RCSItemProvider;
declare parents: CrcsItemProvider implements
ITableItemLabelProvider, IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
IItemLabelProvider,
IItemPropertySource;
////////////////////////////
public String CrcsItemProvider.getColumnText (Object o, int i)
{
String res = null;
switch (i) {
case 0: res = getText(o); break;
default: res ="ZZZZZZZZ"; break;
}
return res;
}
public Object CrcsItemProvider.getColumnImage (Object o, int i)
{
Object res = null;
switch (i) {
case 0: res = getImage(o); break;
default: res =null; break;
}
return getImage(o);
}
after (CcsItemProviderAdapterFactory t) returning:
execution(CcsItemProviderAdapterFactory.new())
&& this(t) {
t.supportedTypes.add(ITableItemLabelProvider.class);
}
after (_1ItemProviderAdapterFactory t) returning:
execution(_1ItemProviderAdapterFactory.new())
&& this(t) {
t.supportedTypes.add(ITableItemLabelProvider.class);
}
.....
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
</pre>
</blockquote>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
<br>
</body>
</html>
--------------070405050706040505070106--
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: implementing ITableItemLabelProvider with aspects [message #594458 is a reply to message #66393] |
Tue, 25 July 2006 00:31 |
Daniel Mahler Messages: 53 Registered: July 2009 |
Member |
|
|
Ed,
It looks like a plain DelegatingWrapperItemProvider is getting passed in.
Its delegateItmeProvider and owner are instances of the inner AA class
though and its adapterFactory is also mine.
After setting a breakpoint on DelegatingWrapperItemProvider constructors
It looks like the callchain on the AA istance is
getChildren() -> updateChildren() -> createWrapper(..).
All these are inherited from DelegatingWrapperItemProvider,
and DelegatingWrapperItemProvider.createWrapper calls the constructor
protected IWrapperItemProvider createWrapper(Object value, Object owner,
AdapterFactory adapterFactory)
{
return new DelegatingWrapperItemProvider(value, owner, adapterFactory);
}
so we get a raw DelegatingWrapperItemProvider instance.
I looked at verring createWrapper in AA, but the AA constructor
seems to need more information then is available at the createWrapper call.
BTW is there a way to extrect plain text representation from the debug
perspective to paste into emails?
thanks
D
Ed Merks wrote:
> D,
>
> Yes, this should do the trick. Set a breakpoint
> AdapterFactoryLabelProvider.getColumnText and see what's happening there
> for the case that it's not working.
>
>
> dmahler@gmail.com wrote:
>
>>Ed,
>>
>>I've now implemented the the following extension to ItemProviderAdapter,
>>and made all my item providers inherit that instead (no aspects).
>>supportedTypes.add(ITableItemLabelProvider.class);
>>
>>The "Tree with Columns" view now works correctly for the first 2 levels
>>of the tree, but still reverts to the default Tree view behaviour after
>>that.
>>
>>According to my understanding of the EMF book, this and the
>>
>>supportedTypes.add(ITableItemLabelProvider.class);
>>
>>lines in the *ItemProviderAdapterFactory constructors should be all that
>>is needed.
>>
>>thanks
>>D
>>
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++
>>package com.rightscom.crcs;
>>
>>import org.eclipse.emf.common.notify.AdapterFactory;
>>
>>import org.eclipse.emf.ecore.*;
>>import org.eclipse.emf.ecore.util.*;
>>import org.eclipse.emf.common.util.*;
>>import org.eclipse.emf.edit.provider.*;
>>
>>public class CRCSItemProviderAdapter extends ItemProviderAdapter
>>implements ITableItemLabelProvider
>>{
>>
>> public CRCSItemProviderAdapter(AdapterFactory adapterFactory) {
>> super(adapterFactory);
>> // TODO Auto-generated constructor stub
>> }
>>
>>
>> public String getColumnText (Object o, int i) {
>> String res="ZZ "+getText(o)+" :: "+String.valueOf(i);
>> return res;
>> }
>>
>> public Object getColumnImage (Object o, int i) {
>> Object res = null;
>> switch (i) {
>> default: res = getImage(o); break;
>> }
>> return res;
>> }
>>
>> @Override
>> protected Object createWrapper(EObject object, EStructuralFeature
>> feature,
>>Object value, int index)
>> {
>> if (!isWrappingNeeded(object)) return value;
>>
>> if (FeatureMapUtil.isFeatureMap(feature))
>> {
>> class AA extends FeatureMapEntryWrapperItemProvider
>> implements
>>ITableItemLabelProvider
>> {
>> public AA (FeatureMap.Entry entry, EObject
>> owner, EAttribute attribute,
>>int index, AdapterFactory adapterFactory, ResourceLocator resourceLocator)
>>{
>> super(entry, owner, attribute,
>> index, adapterFactory,
>> resourceLocator);
>> }
>> public String getColumnText (Object o, int
>> i) {
>> String res="AA "+getText(o)+" ::
>> "+String.valueOf(i); return res;
>> }
>> public Object getColumnImage (Object o,
>> int i) {
>> Object res = null;
>> switch (i) {
>> default: res = getImage(o); break;
>> }
>> return res;
>> }
>> }
>> value = new AA ((FeatureMap.Entry)value, object,
>> (EAttribute)feature,
>>index, adapterFactory, getResourceLocator());
>> }
>> else if (feature instanceof EAttribute)
>> {
>> class BB extends AttributeValueWrapperItemProvider
>> implements
>>ITableItemLabelProvider
>> {
>> public BB(Object value, EObject owner,
>> EAttribute attribute,
>>AdapterFactory adapterFactory, ResourceLocator resourceLocator) {
>> super(value, owner, attribute,
>> adapterFactory, resourceLocator);
>> // TODO Auto-generated constructor
>> stub
>> }
>> public BB(Object value, EObject owner,
>> EAttribute attribute, int index,
>>AdapterFactory adapterFactory, ResourceLocator resourceLocator) {
>> super(value, owner, attribute,
>> index, adapterFactory,
>> resourceLocator);
>> }
>> public String getColumnText (Object o, int
>> i) {
>> String res="BB "+ getText(o)+" ::
>> "+String.valueOf(i); return res;
>> }
>> public Object getColumnImage (Object o,
>> int i) {
>> Object res = null;
>> switch (i) {
>> default: res = getImage(o); break;
>> }
>> return res;
>> }
>> }
>> value = new BB(value, object, (EAttribute)feature, index,
>>adapterFactory, getResourceLocator());
>> }
>> else if (!((EReference)feature).isContainment())
>> {
>> class CC extends DelegatingWrapperItemProvider
>> implements
>>ITableItemLabelProvider
>> {
>> public CC(Object value, Object owner,
>> EStructuralFeature feature, int
>>index, AdapterFactory adapterFactory) {
>> super(value, owner, feature,
>> index, adapterFactory);
>> }
>> public String getColumnText (Object o, int
>> i) {
>> String res="CC " + getText(o)+" ::
>> "+String.valueOf(i); return res;
>> }
>>
>> public Object getColumnImage (Object o,
>> int i) {
>> Object res = null;
>> switch (i) {
>> default: res = getImage(o); break;
>> }
>> return res;
>> }
>>
>> }
>> value = new CC (value, object, feature, index,
>> adapterFactory);
>> }
>> return value;
>> }
>>}
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++
>>
>>
>>Ed Merks wrote:
>>
>>
>>
>>>D,
>>>
>>>Unfortunately I don't understand the aspect stuff well enough to say
>>>intelligent things. I think your approach will still work. I'll answer
>>>in terms of what I'd do without aspects to support this. I.e., I'd
>>>create a derived wrapper MyFeatureMapEntryWrapperItemProvider that
>>>implements the API that my factory wants to support.
>>>
>>> protected Object createWrapper(EObject object, EStructuralFeature
>>> feature, Object value, int index)
>>> {
>>> if (!isWrappingNeeded(object)) return value;
>>>
>>> if (FeatureMapUtil.isFeatureMap(feature))
>>> {
>>> class MyFeatureMapEntryWrapperItemProvider extends
>>> FeatureMapEntryWrapperItemProvider implements ITableItemLabelProvider
>>> {
>>> public MyFeatureMapEntryWrapperItemProvider(
>>> FeatureMap.Entry entry,
>>> EObject owner,
>>> EAttribute attribute,
>>> int index,
>>> AdapterFactory adapterFactory,
>>> ResourceLocator resourceLocator)
>>> {
>>> super(entry, owner, attribute, index, adapterFactory,
>>> resourceLocator);
>>> }
>>>
>>> public Object getColumnImage(Object object, int columnIndex)
>>> {
>>> // TODO Auto-generated method stub
>>> return null;
>>> }
>>>
>>> public String getColumnText(Object object, int columnIndex)
>>> {
>>> // TODO Auto-generated method stub
>>> return null;
>>> }
>>> }
>>> value = new
>>> MyFeatureMapEntryWrapperItemProvider((FeatureMap.Entry)value ,
>>> object, (EAttribute)feature, index, adapterFactory,
>>> getResourceLocator());
>>> }
>>>
>>>
>>>
>>>
>>>dmahler@gmail.com wrote:
>>>
>>>
>>>>Thanks again Ed!
>>>>
>>>>Could you expand on that little though,
>>>>I've only been working with Eclipse for less than a month.
>>>>
>>>>What are my options? Can I add the missing APIs myself?
>>>>How do I find out what exactly needs adding?
>>>>Is this an Eclipse bug? Should I report it somewhere?
>>>>Does it mean the AOP approach to customization is flawed in this
>>>>particular case? or more generally?
>>>>
>>>>thanks
>>>>D
>>>>
>>>>
>>>>Ed Merks wrote:
>>>>
>>>>
>>>>
>>>>
>>>>>D,
>>>>>
>>>>>Probably wrappers are being created by this ItemProviderAdapter method
>>>>>and the wrappers are not implementing all the APIs you need them to
>>>>>implement.
>>>>>
>>>>> protected Object createWrapper(EObject object, EStructuralFeature
>>>>> feature, Object value, int index)
>>>>> {
>>>>> if (!isWrappingNeeded(object)) return value;
>>>>>
>>>>> if (FeatureMapUtil.isFeatureMap(feature))
>>>>> {
>>>>> value = new
>>>>> *FeatureMapEntryWrapperItemProvider*((FeatureMap.Entry)value ,
>>>>> object, (EAttribute)feature, index, adapterFactory,
>>>>> getResourceLocator());
>>>>> }
>>>>> else if (feature instanceof EAttribute)
>>>>> {
>>>>> value = new *AttributeValueWrapperItemProvider*(value,
>>>>> object,
>>>>> (EAttribute)feature, index, adapterFactory, getResourceLocator());
>>>>> }
>>>>> else if (!((EReference)feature).isContainment())
>>>>> {
>>>>> value = new *DelegatingWrapperItemProvider*(value, object,
>>>>> feature, index, adapterFactory);
>>>>> }
>>>>>
>>>>> return value;
>>>>> }
>>>>>
>>>>>dmahler@gmail.com wrote:
>>>>>
>>>>>
>>>>>
>>>>>>I have been experimenting with customizing emf generated code using
>>>>>>AspectJ,
>>>>>>[and so far it has been pretty close to a raging succcess. :) ]
>>>>>>Now I am trying to 'Tree with Columns' editor page to do something
>>>>>>useful. Since the column contents are fairly uniform,
>>>>>>I using AspectJ to essentially create a mixin trait to inherit into
>>>>>>all my item providers (see code below).
>>>>>>My model is generated from an XSD (that explains the odd classnames)
>>>>>>and comes in 2 packages.
>>>>>>So I have created three trivial interfaces:
>>>>>>and andcestor for all item providers, and 2 specializations of it (1
>>>>>>for each package).
>>>>>>
>>>>>>I the aspect I then make the generated item providers implement the
>>>>>>new interfaces and I make the new top inteface provide default
>>>>>>implementations
>>>>>>for the ITableItemLabelProvider interface and declare the it to
>>>>>>extend all the item provider interfaces.
>>>>>>
>>>>>>Finally I add _1ItemProviderAdapterFactory.new() to the supportedTypes
>>>>>>list of the adapter factory in each package using after advice on its
>>>>>>constructor.
>>>>>>
>>>>>>As far as I understand the EMF framework, this should do it,
>>>>>>since now all the item providers implement ITableItemLabelProvider
>>>>>>and both the adapter factories support it.
>>>>>>However, when I run the plugin,
>>>>>>I only get the new behaviour for the document root node
>>>>>>and all the descendants revert to the eclipse default behavior,
>>>>>>of showing the same information in both columns.
>>>>>>According to the AJDT tools my advice is being applied to all my
>>>>>>classes, so I do not know what is going on.
>>>>>>Any advice appreciated.
>>>>>>
>>>>>>thanks
>>>>>>D
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>public interface CrcsItemProvider {
>>>>>>
>>>>>>}
>>>>>>
>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>public interface CCSItemProvider extends CrcsItemProvider {
>>>>>>
>>>>>>}
>>>>>>
>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>public interface RCSItemProvider extends CrcsItemProvider {
>>>>>>
>>>>>>}
>>>>>>
>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>
>>>>>>public privileged aspect TextProvider {
>>>>>>
>>>>>> declare parents: com.rightscom.ns.ccs.provider.*Provider
>>>>>> implements
>>>>>>CCSItemProvider;
>>>>>>
>>>>>> declare parents:
>>>>>> org.relaxng.ns.structure._1.provider.*Provider
>>>>>>implements RCSItemProvider;
>>>>>>
>>>>>> declare parents: CrcsItemProvider implements
>>>>>> ITableItemLabelProvider, IEditingDomainItemProvider,
>>>>>> IStructuredItemContentProvider,
>>>>>> ITreeItemContentProvider,
>>>>>> IItemLabelProvider,
>>>>>> IItemPropertySource;
>>>>>>
>>>>>> ////////////////////////////
>>>>>>
>>>>>> public String CrcsItemProvider.getColumnText (Object o, int i)
>>>>>> {
>>>>>> String res = null;
>>>>>> switch (i) {
>>>>>> case 0: res = getText(o); break;
>>>>>> default: res ="ZZZZZZZZ"; break;
>>>>>> }
>>>>>> return res;
>>>>>> }
>>>>>>
>>>>>> public Object CrcsItemProvider.getColumnImage (Object o, int
>>>>>> i)
>>>>>> {
>>>>>> Object res = null;
>>>>>> switch (i) {
>>>>>> case 0: res = getImage(o); break;
>>>>>> default: res =null; break;
>>>>>> }
>>>>>> return getImage(o);
>>>>>> }
>>>>>>
>>>>>> after (CcsItemProviderAdapterFactory t) returning:
>>>>>> execution(CcsItemProviderAdapterFactory.new())
>>>>>> && this(t) {
>>>>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>>>>> }
>>>>>>
>>>>>> after (_1ItemProviderAdapterFactory t) returning:
>>>>>> execution(_1ItemProviderAdapterFactory.new())
>>>>>> && this(t) {
>>>>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>>>>> }
>>>>>>....
>>>>>>}
>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>
>>
>>
|
|
| |
Re: implementing ITableItemLabelProvider with aspects [message #594475 is a reply to message #66408] |
Tue, 25 July 2006 12:38 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
--------------080308050705010200080509
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
D,
It would be really good if you could provide a test case where we could
explore this issue in detail. One approach to try is to reuse your
derived DelegatingWrapper, CC, and pass in null for the feature and
CommandParameter.NO_INDEX for the index. I don't know of a way to turn
a tree view into text. I suppose a screen capture pasted as an image
won't work for you?
dmahler@gmail.com wrote:
> Ed,
>
> It looks like a plain DelegatingWrapperItemProvider is getting passed in.
> Its delegateItmeProvider and owner are instances of the inner AA class
> though and its adapterFactory is also mine.
> After setting a breakpoint on DelegatingWrapperItemProvider constructors
> It looks like the callchain on the AA istance is
> getChildren() -> updateChildren() -> createWrapper(..).
> All these are inherited from DelegatingWrapperItemProvider,
> and DelegatingWrapperItemProvider.createWrapper calls the constructor
>
> protected IWrapperItemProvider createWrapper(Object value, Object owner,
> AdapterFactory adapterFactory)
> {
> return new DelegatingWrapperItemProvider(value, owner, adapterFactory);
> }
>
> so we get a raw DelegatingWrapperItemProvider instance.
> I looked at verring createWrapper in AA, but the AA constructor
> seems to need more information then is available at the createWrapper call.
> BTW is there a way to extrect plain text representation from the debug
> perspective to paste into emails?
>
> thanks
> D
>
>
> Ed Merks wrote:
>
>
>> D,
>>
>> Yes, this should do the trick. Set a breakpoint
>> AdapterFactoryLabelProvider.getColumnText and see what's happening there
>> for the case that it's not working.
>>
>>
>> dmahler@gmail.com wrote:
>>
>>
>>> Ed,
>>>
>>> I've now implemented the the following extension to ItemProviderAdapter,
>>> and made all my item providers inherit that instead (no aspects).
>>> supportedTypes.add(ITableItemLabelProvider.class);
>>>
>>> The "Tree with Columns" view now works correctly for the first 2 levels
>>> of the tree, but still reverts to the default Tree view behaviour after
>>> that.
>>>
>>> According to my understanding of the EMF book, this and the
>>>
>>> supportedTypes.add(ITableItemLabelProvider.class);
>>>
>>> lines in the *ItemProviderAdapterFactory constructors should be all that
>>> is needed.
>>>
>>> thanks
>>> D
>>>
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++
>>> package com.rightscom.crcs;
>>>
>>> import org.eclipse.emf.common.notify.AdapterFactory;
>>>
>>> import org.eclipse.emf.ecore.*;
>>> import org.eclipse.emf.ecore.util.*;
>>> import org.eclipse.emf.common.util.*;
>>> import org.eclipse.emf.edit.provider.*;
>>>
>>> public class CRCSItemProviderAdapter extends ItemProviderAdapter
>>> implements ITableItemLabelProvider
>>> {
>>>
>>> public CRCSItemProviderAdapter(AdapterFactory adapterFactory) {
>>> super(adapterFactory);
>>> // TODO Auto-generated constructor stub
>>> }
>>>
>>>
>>> public String getColumnText (Object o, int i) {
>>> String res="ZZ "+getText(o)+" :: "+String.valueOf(i);
>>> return res;
>>> }
>>>
>>> public Object getColumnImage (Object o, int i) {
>>> Object res = null;
>>> switch (i) {
>>> default: res = getImage(o); break;
>>> }
>>> return res;
>>> }
>>>
>>> @Override
>>> protected Object createWrapper(EObject object, EStructuralFeature
>>> feature,
>>> Object value, int index)
>>> {
>>> if (!isWrappingNeeded(object)) return value;
>>>
>>> if (FeatureMapUtil.isFeatureMap(feature))
>>> {
>>> class AA extends FeatureMapEntryWrapperItemProvider
>>> implements
>>> ITableItemLabelProvider
>>> {
>>> public AA (FeatureMap.Entry entry, EObject
>>> owner, EAttribute attribute,
>>> int index, AdapterFactory adapterFactory, ResourceLocator resourceLocator)
>>> {
>>> super(entry, owner, attribute,
>>> index, adapterFactory,
>>> resourceLocator);
>>> }
>>> public String getColumnText (Object o, int
>>> i) {
>>> String res="AA "+getText(o)+" ::
>>> "+String.valueOf(i); return res;
>>> }
>>> public Object getColumnImage (Object o,
>>> int i) {
>>> Object res = null;
>>> switch (i) {
>>> default: res = getImage(o); break;
>>> }
>>> return res;
>>> }
>>> }
>>> value = new AA ((FeatureMap.Entry)value, object,
>>> (EAttribute)feature,
>>> index, adapterFactory, getResourceLocator());
>>> }
>>> else if (feature instanceof EAttribute)
>>> {
>>> class BB extends AttributeValueWrapperItemProvider
>>> implements
>>> ITableItemLabelProvider
>>> {
>>> public BB(Object value, EObject owner,
>>> EAttribute attribute,
>>> AdapterFactory adapterFactory, ResourceLocator resourceLocator) {
>>> super(value, owner, attribute,
>>> adapterFactory, resourceLocator);
>>> // TODO Auto-generated constructor
>>> stub
>>> }
>>> public BB(Object value, EObject owner,
>>> EAttribute attribute, int index,
>>> AdapterFactory adapterFactory, ResourceLocator resourceLocator) {
>>> super(value, owner, attribute,
>>> index, adapterFactory,
>>> resourceLocator);
>>> }
>>> public String getColumnText (Object o, int
>>> i) {
>>> String res="BB "+ getText(o)+" ::
>>> "+String.valueOf(i); return res;
>>> }
>>> public Object getColumnImage (Object o,
>>> int i) {
>>> Object res = null;
>>> switch (i) {
>>> default: res = getImage(o); break;
>>> }
>>> return res;
>>> }
>>> }
>>> value = new BB(value, object, (EAttribute)feature, index,
>>> adapterFactory, getResourceLocator());
>>> }
>>> else if (!((EReference)feature).isContainment())
>>> {
>>> class CC extends DelegatingWrapperItemProvider
>>> implements
>>> ITableItemLabelProvider
>>> {
>>> public CC(Object value, Object owner,
>>> EStructuralFeature feature, int
>>> index, AdapterFactory adapterFactory) {
>>> super(value, owner, feature,
>>> index, adapterFactory);
>>> }
>>> public String getColumnText (Object o, int
>>> i) {
>>> String res="CC " + getText(o)+" ::
>>> "+String.valueOf(i); return res;
>>> }
>>>
>>> public Object getColumnImage (Object o,
>>> int i) {
>>> Object res = null;
>>> switch (i) {
>>> default: res = getImage(o); break;
>>> }
>>> return res;
>>> }
>>>
>>> }
>>> value = new CC (value, object, feature, index,
>>> adapterFactory);
>>> }
>>> return value;
>>> }
>>> }
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++
>>>
>>>
>>> Ed Merks wrote:
>>>
>>>
>>>
>>>
>>>> D,
>>>>
>>>> Unfortunately I don't understand the aspect stuff well enough to say
>>>> intelligent things. I think your approach will still work. I'll answer
>>>> in terms of what I'd do without aspects to support this. I.e., I'd
>>>> create a derived wrapper MyFeatureMapEntryWrapperItemProvider that
>>>> implements the API that my factory wants to support.
>>>>
>>>> protected Object createWrapper(EObject object, EStructuralFeature
>>>> feature, Object value, int index)
>>>> {
>>>> if (!isWrappingNeeded(object)) return value;
>>>>
>>>> if (FeatureMapUtil.isFeatureMap(feature))
>>>> {
>>>> class MyFeatureMapEntryWrapperItemProvider extends
>>>> FeatureMapEntryWrapperItemProvider implements ITableItemLabelProvider
>>>> {
>>>> public MyFeatureMapEntryWrapperItemProvider(
>>>> FeatureMap.Entry entry,
>>>> EObject owner,
>>>> EAttribute attribute,
>>>> int index,
>>>> AdapterFactory adapterFactory,
>>>> ResourceLocator resourceLocator)
>>>> {
>>>> super(entry, owner, attribute, index, adapterFactory,
>>>> resourceLocator);
>>>> }
>>>>
>>>> public Object getColumnImage(Object object, int columnIndex)
>>>> {
>>>> // TODO Auto-generated method stub
>>>> return null;
>>>> }
>>>>
>>>> public String getColumnText(Object object, int columnIndex)
>>>> {
>>>> // TODO Auto-generated method stub
>>>> return null;
>>>> }
>>>> }
>>>> value = new
>>>> MyFeatureMapEntryWrapperItemProvider((FeatureMap.Entry)value ,
>>>> object, (EAttribute)feature, index, adapterFactory,
>>>> getResourceLocator());
>>>> }
>>>>
>>>>
>>>>
>>>>
>>>> dmahler@gmail.com wrote:
>>>>
>>>>
>>>>
>>>>> Thanks again Ed!
>>>>>
>>>>> Could you expand on that little though,
>>>>> I've only been working with Eclipse for less than a month.
>>>>>
>>>>> What are my options? Can I add the missing APIs myself?
>>>>> How do I find out what exactly needs adding?
>>>>> Is this an Eclipse bug? Should I report it somewhere?
>>>>> Does it mean the AOP approach to customization is flawed in this
>>>>> particular case? or more generally?
>>>>>
>>>>> thanks
>>>>> D
>>>>>
>>>>>
>>>>> Ed Merks wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> D,
>>>>>>
>>>>>> Probably wrappers are being created by this ItemProviderAdapter method
>>>>>> and the wrappers are not implementing all the APIs you need them to
>>>>>> implement.
>>>>>>
>>>>>> protected Object createWrapper(EObject object, EStructuralFeature
>>>>>> feature, Object value, int index)
>>>>>> {
>>>>>> if (!isWrappingNeeded(object)) return value;
>>>>>>
>>>>>> if (FeatureMapUtil.isFeatureMap(feature))
>>>>>> {
>>>>>> value = new
>>>>>> *FeatureMapEntryWrapperItemProvider*((FeatureMap.Entry)value ,
>>>>>> object, (EAttribute)feature, index, adapterFactory,
>>>>>> getResourceLocator());
>>>>>> }
>>>>>> else if (feature instanceof EAttribute)
>>>>>> {
>>>>>> value = new *AttributeValueWrapperItemProvider*(value,
>>>>>> object,
>>>>>> (EAttribute)feature, index, adapterFactory, getResourceLocator());
>>>>>> }
>>>>>> else if (!((EReference)feature).isContainment())
>>>>>> {
>>>>>> value = new *DelegatingWrapperItemProvider*(value, object,
>>>>>> feature, index, adapterFactory);
>>>>>> }
>>>>>>
>>>>>> return value;
>>>>>> }
>>>>>>
>>>>>> dmahler@gmail.com wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> I have been experimenting with customizing emf generated code using
>>>>>>> AspectJ,
>>>>>>> [and so far it has been pretty close to a raging succcess. :) ]
>>>>>>> Now I am trying to 'Tree with Columns' editor page to do something
>>>>>>> useful. Since the column contents are fairly uniform,
>>>>>>> I using AspectJ to essentially create a mixin trait to inherit into
>>>>>>> all my item providers (see code below).
>>>>>>> My model is generated from an XSD (that explains the odd classnames)
>>>>>>> and comes in 2 packages.
>>>>>>> So I have created three trivial interfaces:
>>>>>>> and andcestor for all item providers, and 2 specializations of it (1
>>>>>>> for each package).
>>>>>>>
>>>>>>> I the aspect I then make the generated item providers implement the
>>>>>>> new interfaces and I make the new top inteface provide default
>>>>>>> implementations
>>>>>>> for the ITableItemLabelProvider interface and declare the it to
>>>>>>> extend all the item provider interfaces.
>>>>>>>
>>>>>>> Finally I add _1ItemProviderAdapterFactory.new() to the supportedTypes
>>>>>>> list of the adapter factory in each package using after advice on its
>>>>>>> constructor.
>>>>>>>
>>>>>>> As far as I understand the EMF framework, this should do it,
>>>>>>> since now all the item providers implement ITableItemLabelProvider
>>>>>>> and both the adapter factories support it.
>>>>>>> However, when I run the plugin,
>>>>>>> I only get the new behaviour for the document root node
>>>>>>> and all the descendants revert to the eclipse default behavior,
>>>>>>> of showing the same information in both columns.
>>>>>>> According to the AJDT tools my advice is being applied to all my
>>>>>>> classes, so I do not know what is going on.
>>>>>>> Any advice appreciated.
>>>>>>>
>>>>>>> thanks
>>>>>>> D
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>> public interface CrcsItemProvider {
>>>>>>>
>>>>>>> }
>>>>>>>
>>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>> public interface CCSItemProvider extends CrcsItemProvider {
>>>>>>>
>>>>>>> }
>>>>>>>
>>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>> public interface RCSItemProvider extends CrcsItemProvider {
>>>>>>>
>>>>>>> }
>>>>>>>
>>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>>
>>>>>>> public privileged aspect TextProvider {
>>>>>>>
>>>>>>> declare parents: com.rightscom.ns.ccs.provider.*Provider
>>>>>>> implements
>>>>>>> CCSItemProvider;
>>>>>>>
>>>>>>> declare parents:
>>>>>>> org.relaxng.ns.structure._1.provider.*Provider
>>>>>>> implements RCSItemProvider;
>>>>>>>
>>>>>>> declare parents: CrcsItemProvider implements
>>>>>>> ITableItemLabelProvider, IEditingDomainItemProvider,
>>>>>>> IStructuredItemContentProvider,
>>>>>>> ITreeItemContentProvider,
>>>>>>> IItemLabelProvider,
>>>>>>> IItemPropertySource;
>>>>>>>
>>>>>>> ////////////////////////////
>>>>>>>
>>>>>>> public String CrcsItemProvider.getColumnText (Object o, int i)
>>>>>>> {
>>>>>>> String res = null;
>>>>>>> switch (i) {
>>>>>>> case 0: res = getText(o); break;
>>>>>>> default: res ="ZZZZZZZZ"; break;
>>>>>>> }
>>>>>>> return res;
>>>>>>> }
>>>>>>>
>>>>>>> public Object CrcsItemProvider.getColumnImage (Object o, int
>>>>>>> i)
>>>>>>> {
>>>>>>> Object res = null;
>>>>>>> switch (i) {
>>>>>>> case 0: res = getImage(o); break;
>>>>>>> default: res =null; break;
>>>>>>> }
>>>>>>> return getImage(o);
>>>>>>> }
>>>>>>>
>>>>>>> after (CcsItemProviderAdapterFactory t) returning:
>>>>>>> execution(CcsItemProviderAdapterFactory.new())
>>>>>>> && this(t) {
>>>>>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>>>>>> }
>>>>>>>
>>>>>>> after (_1ItemProviderAdapterFactory t) returning:
>>>>>>> execution(_1ItemProviderAdapterFactory.new())
>>>>>>> && this(t) {
>>>>>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>>>>>> }
>>>>>>> ....
>>>>>>> }
>>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>>
>>>
>
>
--------------080308050705010200080509
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
D,<br>
<br>
It would be really good if you could provide a test case where we could
explore this issue in detail. One approach to try is to reuse your
derived DelegatingWrapper, CC, and pass in null for the feature and
CommandParameter.NO_INDEX for the index. I don't know of a way to turn
a tree view into text. I suppose a screen capture pasted as an image
won't work for you?<br>
<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:dmahler@gmail.com">dmahler@gmail.com</a> wrote:
<blockquote cite="midea3oip$fg3$1@utils.eclipse.org" type="cite">
<pre wrap="">Ed,
It looks like a plain DelegatingWrapperItemProvider is getting passed in.
Its delegateItmeProvider and owner are instances of the inner AA class
though and its adapterFactory is also mine.
After setting a breakpoint on DelegatingWrapperItemProvider constructors
It looks like the callchain on the AA istance is
getChildren() -> updateChildren() -> createWrapper(..).
All these are inherited from DelegatingWrapperItemProvider,
and DelegatingWrapperItemProvider.createWrapper calls the constructor
protected IWrapperItemProvider createWrapper(Object value, Object owner,
AdapterFactory adapterFactory)
{
return new DelegatingWrapperItemProvider(value, owner, adapterFactory);
}
so we get a raw DelegatingWrapperItemProvider instance.
I looked at verring createWrapper in AA, but the AA constructor
seems to need more information then is available at the createWrapper call.
BTW is there a way to extrect plain text representation from the debug
perspective to paste into emails?
thanks
D
Ed Merks wrote:
</pre>
<blockquote type="cite">
<pre wrap="">D,
Yes, this should do the trick. Set a breakpoint
AdapterFactoryLabelProvider.getColumnText and see what's happening there
for the case that it's not working.
<a class="moz-txt-link-abbreviated" href="mailto:dmahler@gmail.com">dmahler@gmail.com</a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Ed,
I've now implemented the the following extension to ItemProviderAdapter,
and made all my item providers inherit that instead (no aspects).
supportedTypes.add(ITableItemLabelProvider.class);
The "Tree with Columns" view now works correctly for the first 2 levels
of the tree, but still reverts to the default Tree view behaviour after
that.
According to my understanding of the EMF book, this and the
supportedTypes.add(ITableItemLabelProvider.class);
lines in the *ItemProviderAdapterFactory constructors should be all that
is needed.
thanks
D
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++
package com.rightscom.crcs;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.ecore.*;
import org.eclipse.emf.ecore.util.*;
import org.eclipse.emf.common.util.*;
import org.eclipse.emf.edit.provider.*;
public class CRCSItemProviderAdapter extends ItemProviderAdapter
implements ITableItemLabelProvider
{
public CRCSItemProviderAdapter(AdapterFactory adapterFactory) {
super(adapterFactory);
// TODO Auto-generated constructor stub
}
public String getColumnText (Object o, int i) {
String res="ZZ "+getText(o)+" :: "+String.valueOf(i);
return res;
}
public Object getColumnImage (Object o, int i) {
Object res = null;
switch (i) {
default: res = getImage(o); break;
}
return res;
}
@Override
protected Object createWrapper(EObject object, EStructuralFeature
feature,
Object value, int index)
{
if (!isWrappingNeeded(object)) return value;
if (FeatureMapUtil.isFeatureMap(feature))
{
class AA extends FeatureMapEntryWrapperItemProvider
implements
ITableItemLabelProvider
{
public AA (FeatureMap.Entry entry, EObject
owner, EAttribute attribute,
int index, AdapterFactory adapterFactory, ResourceLocator resourceLocator)
{
super(entry, owner, attribute,
index, adapterFactory,
resourceLocator);
}
public String getColumnText (Object o, int
i) {
String res="AA "+getText(o)+" ::
"+String.valueOf(i); return res;
}
public Object getColumnImage (Object o,
int i) {
Object res = null;
switch (i) {
default: res = getImage(o); break;
}
return res;
}
}
value = new AA ((FeatureMap.Entry)value, object,
(EAttribute)feature,
index, adapterFactory, getResourceLocator());
}
else if (feature instanceof EAttribute)
{
class BB extends AttributeValueWrapperItemProvider
implements
ITableItemLabelProvider
{
public BB(Object value, EObject owner,
EAttribute attribute,
AdapterFactory adapterFactory, ResourceLocator resourceLocator) {
super(value, owner, attribute,
adapterFactory, resourceLocator);
// TODO Auto-generated constructor
stub
}
public BB(Object value, EObject owner,
EAttribute attribute, int index,
AdapterFactory adapterFactory, ResourceLocator resourceLocator) {
super(value, owner, attribute,
index, adapterFactory,
resourceLocator);
}
public String getColumnText (Object o, int
i) {
String res="BB "+ getText(o)+" ::
"+String.valueOf(i); return res;
}
public Object getColumnImage (Object o,
int i) {
Object res = null;
switch (i) {
default: res = getImage(o); break;
}
return res;
}
}
value = new BB(value, object, (EAttribute)feature, index,
adapterFactory, getResourceLocator());
}
else if (!((EReference)feature).isContainment())
{
class CC extends DelegatingWrapperItemProvider
implements
ITableItemLabelProvider
{
public CC(Object value, Object owner,
EStructuralFeature feature, int
index, AdapterFactory adapterFactory) {
super(value, owner, feature,
index, adapterFactory);
}
public String getColumnText (Object o, int
i) {
String res="CC " + getText(o)+" ::
"+String.valueOf(i); return res;
}
public Object getColumnImage (Object o,
int i) {
Object res = null;
switch (i) {
default: res = getImage(o); break;
}
return res;
}
}
value = new CC (value, object, feature, index,
adapterFactory);
}
return value;
}
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++
Ed Merks wrote:
</pre>
<blockquote type="cite">
<pre wrap="">D,
Unfortunately I don't understand the aspect stuff well enough to say
intelligent things. I think your approach will still work. I'll answer
in terms of what I'd do without aspects to support this. I.e., I'd
create a derived wrapper MyFeatureMapEntryWrapperItemProvider that
implements the API that my factory wants to support.
protected Object createWrapper(EObject object, EStructuralFeature
feature, Object value, int index)
{
if (!isWrappingNeeded(object)) return value;
if (FeatureMapUtil.isFeatureMap(feature))
{
class MyFeatureMapEntryWrapperItemProvider extends
FeatureMapEntryWrapperItemProvider implements ITableItemLabelProvider
{
public MyFeatureMapEntryWrapperItemProvider(
FeatureMap.Entry entry,
EObject owner,
EAttribute attribute,
int index,
AdapterFactory adapterFactory,
ResourceLocator resourceLocator)
{
super(entry, owner, attribute, index, adapterFactory,
resourceLocator);
}
public Object getColumnImage(Object object, int columnIndex)
{
// TODO Auto-generated method stub
return null;
}
public String getColumnText(Object object, int columnIndex)
{
// TODO Auto-generated method stub
return null;
}
}
value = new
MyFeatureMapEntryWrapperItemProvider((FeatureMap.Entry)value ,
object, (EAttribute)feature, index, adapterFactory,
getResourceLocator());
}
<a class="moz-txt-link-abbreviated" href="mailto:dmahler@gmail.com">dmahler@gmail.com</a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Thanks again Ed!
Could you expand on that little though,
I've only been working with Eclipse for less than a month.
What are my options? Can I add the missing APIs myself?
How do I find out what exactly needs adding?
Is this an Eclipse bug? Should I report it somewhere?
Does it mean the AOP approach to customization is flawed in this
particular case? or more generally?
thanks
D
Ed Merks wrote:
</pre>
<blockquote type="cite">
<pre wrap="">D,
Probably wrappers are being created by this ItemProviderAdapter method
and the wrappers are not implementing all the APIs you need them to
implement.
protected Object createWrapper(EObject object, EStructuralFeature
feature, Object value, int index)
{
if (!isWrappingNeeded(object)) return value;
if (FeatureMapUtil.isFeatureMap(feature))
{
value = new
*FeatureMapEntryWrapperItemProvider*((FeatureMap.Entry)value ,
object, (EAttribute)feature, index, adapterFactory,
getResourceLocator());
}
else if (feature instanceof EAttribute)
{
value = new *AttributeValueWrapperItemProvider*(value,
object,
(EAttribute)feature, index, adapterFactory, getResourceLocator());
}
else if (!((EReference)feature).isContainment())
{
value = new *DelegatingWrapperItemProvider*(value, object,
feature, index, adapterFactory);
}
return value;
}
<a class="moz-txt-link-abbreviated" href="mailto:dmahler@gmail.com">dmahler@gmail.com</a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I have been experimenting with customizing emf generated code using
AspectJ,
[and so far it has been pretty close to a raging succcess. :) ]
Now I am trying to 'Tree with Columns' editor page to do something
useful. Since the column contents are fairly uniform,
I using AspectJ to essentially create a mixin trait to inherit into
all my item providers (see code below).
My model is generated from an XSD (that explains the odd classnames)
and comes in 2 packages.
So I have created three trivial interfaces:
and andcestor for all item providers, and 2 specializations of it (1
for each package).
I the aspect I then make the generated item providers implement the
new interfaces and I make the new top inteface provide default
implementations
for the ITableItemLabelProvider interface and declare the it to
extend all the item provider interfaces.
Finally I add _1ItemProviderAdapterFactory.new() to the supportedTypes
list of the adapter factory in each package using after advice on its
constructor.
As far as I understand the EMF framework, this should do it,
since now all the item providers implement ITableItemLabelProvider
and both the adapter factories support it.
However, when I run the plugin,
I only get the new behaviour for the document root node
and all the descendants revert to the eclipse default behavior,
of showing the same information in both columns.
According to the AJDT tools my advice is being applied to all my
classes, so I do not know what is going on.
Any advice appreciated.
thanks
D
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public interface CrcsItemProvider {
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public interface CCSItemProvider extends CrcsItemProvider {
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public interface RCSItemProvider extends CrcsItemProvider {
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
public privileged aspect TextProvider {
declare parents: com.rightscom.ns.ccs.provider.*Provider
implements
CCSItemProvider;
declare parents:
org.relaxng.ns.structure._1.provider.*Provider
implements RCSItemProvider;
declare parents: CrcsItemProvider implements
ITableItemLabelProvider, IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
IItemLabelProvider,
IItemPropertySource;
////////////////////////////
public String CrcsItemProvider.getColumnText (Object o, int i)
{
String res = null;
switch (i) {
case 0: res = getText(o); break;
default: res ="ZZZZZZZZ"; break;
}
return res;
}
public Object CrcsItemProvider.getColumnImage (Object o, int
i)
{
Object res = null;
switch (i) {
case 0: res = getImage(o); break;
default: res =null; break;
}
return getImage(o);
}
after (CcsItemProviderAdapterFactory t) returning:
execution(CcsItemProviderAdapterFactory.new())
&& this(t) {
t.supportedTypes.add(ITableItemLabelProvider.class);
}
after (_1ItemProviderAdapterFactory t) returning:
execution(_1ItemProviderAdapterFactory.new())
&& this(t) {
t.supportedTypes.add(ITableItemLabelProvider.class);
}
.....
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
</pre>
</blockquote>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
<br>
</body>
</html>
--------------080308050705010200080509--
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: implementing ITableItemLabelProvider with aspects [message #594488 is a reply to message #66456] |
Tue, 25 July 2006 20:05 |
Daniel Mahler Messages: 53 Registered: July 2009 |
Member |
|
|
--nextPart26859135.E4ct18iyiN
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8Bit
Ed,
I have reproduced the problem for the mindmap.xsd project
that is used in the tutorials.
It which is attached.
Just import it, run it, and load this model.
<?xml version="1.0" encoding="UTF-8"?>
<mindmap:map xmlns:mindmap="http://www.example.org/mindmap">
<rootTopics>
<comments>
<items/>
</comments>
</rootTopics>
<relations/>
<resources/>
<resources/>
</mindmap:map>
and switch to the Tree with Columns view.
Don't regenerate though, as I have not killed all the @generated markers.
D
Ed Merks wrote:
> D,
>
> It would be really good if you could provide a test case where we could
> explore this issue in detail. One approach to try is to reuse your
> derived DelegatingWrapper, CC, and pass in null for the feature and
> CommandParameter.NO_INDEX for the index. I don't know of a way to turn
> a tree view into text. I suppose a screen capture pasted as an image
> won't work for you?
>
>
> dmahler@gmail.com wrote:
>> Ed,
>>
>> It looks like a plain DelegatingWrapperItemProvider is getting passed in.
>> Its delegateItmeProvider and owner are instances of the inner AA class
>> though and its adapterFactory is also mine.
>> After setting a breakpoint on DelegatingWrapperItemProvider constructors
>> It looks like the callchain on the AA istance is
>> getChildren() -> updateChildren() -> createWrapper(..).
>> All these are inherited from DelegatingWrapperItemProvider,
>> and DelegatingWrapperItemProvider.createWrapper calls the constructor
>>
>> protected IWrapperItemProvider createWrapper(Object value, Object owner,
>> AdapterFactory adapterFactory)
>> {
>> return new DelegatingWrapperItemProvider(value, owner,
>> adapterFactory);
>> }
>>
>> so we get a raw DelegatingWrapperItemProvider instance.
>> I looked at verring createWrapper in AA, but the AA constructor
>> seems to need more information then is available at the createWrapper
>> call. BTW is there a way to extrect plain text representation from the
>> debug perspective to paste into emails?
>>
>> thanks
>> D
>>
>>
>> Ed Merks wrote:
>>
>>
>>> D,
>>>
>>> Yes, this should do the trick. Set a breakpoint
>>> AdapterFactoryLabelProvider.getColumnText and see what's happening there
>>> for the case that it's not working.
>>>
>>>
>>> dmahler@gmail.com wrote:
>>>
>>>
>>>> Ed,
>>>>
>>>> I've now implemented the the following extension to
>>>> ItemProviderAdapter, and made all my item providers inherit that
>>>> instead (no aspects).
>>>> supportedTypes.add(ITableItemLabelProvider.class);
>>>>
>>>> The "Tree with Columns" view now works correctly for the first 2 levels
>>>> of the tree, but still reverts to the default Tree view behaviour after
>>>> that.
>>>>
>>>> According to my understanding of the EMF book, this and the
>>>>
>>>> supportedTypes.add(ITableItemLabelProvider.class);
>>>>
>>>> lines in the *ItemProviderAdapterFactory constructors should be all
>>>> that is needed.
>>>>
>>>> thanks
>>>> D
>>>>
>>>>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++
>>>> package com.rightscom.crcs;
>>>>
>>>> import org.eclipse.emf.common.notify.AdapterFactory;
>>>>
>>>> import org.eclipse.emf.ecore.*;
>>>> import org.eclipse.emf.ecore.util.*;
>>>> import org.eclipse.emf.common.util.*;
>>>> import org.eclipse.emf.edit.provider.*;
>>>>
>>>> public class CRCSItemProviderAdapter extends ItemProviderAdapter
>>>> implements ITableItemLabelProvider
>>>> {
>>>>
>>>> public CRCSItemProviderAdapter(AdapterFactory adapterFactory) {
>>>> super(adapterFactory);
>>>> // TODO Auto-generated constructor stub
>>>> }
>>>>
>>>>
>>>> public String getColumnText (Object o, int i) {
>>>> String res="ZZ "+getText(o)+" :: "+String.valueOf(i);
>>>> return res;
>>>> }
>>>>
>>>> public Object getColumnImage (Object o, int i) {
>>>> Object res = null;
>>>> switch (i) {
>>>> default: res = getImage(o); break;
>>>> }
>>>> return res;
>>>> }
>>>>
>>>> @Override
>>>> protected Object createWrapper(EObject object,
>>>> EStructuralFeature feature,
>>>> Object value, int index)
>>>> {
>>>> if (!isWrappingNeeded(object)) return value;
>>>>
>>>> if (FeatureMapUtil.isFeatureMap(feature))
>>>> {
>>>> class AA extends FeatureMapEntryWrapperItemProvider
>>>> implements
>>>> ITableItemLabelProvider
>>>> {
>>>> public AA (FeatureMap.Entry entry,
>>>> EObject owner, EAttribute attribute,
>>>> int index, AdapterFactory adapterFactory, ResourceLocator
>>>> resourceLocator)
>>>> {
>>>> super(entry, owner, attribute,
>>>> index, adapterFactory,
>>>> resourceLocator);
>>>> }
>>>> public String getColumnText (Object o,
>>>> int i) {
>>>> String res="AA "+getText(o)+" ::
>>>> "+String.valueOf(i); return res;
>>>> }
>>>> public Object getColumnImage (Object o,
>>>> int i) {
>>>> Object res = null;
>>>> switch (i) {
>>>> default: res = getImage(o);
>>>> break; }
>>>> return res;
>>>> }
>>>> }
>>>> value = new AA ((FeatureMap.Entry)value, object,
>>>> (EAttribute)feature,
>>>> index, adapterFactory, getResourceLocator());
>>>> }
>>>> else if (feature instanceof EAttribute)
>>>> {
>>>> class BB extends AttributeValueWrapperItemProvider
>>>> implements
>>>> ITableItemLabelProvider
>>>> {
>>>> public BB(Object value, EObject owner,
>>>> EAttribute attribute,
>>>> AdapterFactory adapterFactory, ResourceLocator resourceLocator) {
>>>> super(value, owner, attribute,
>>>> adapterFactory,
>>>> resourceLocator); // TODO
>>>> Auto-generated constructor stub
>>>> }
>>>> public BB(Object value, EObject owner,
>>>> EAttribute attribute, int index,
>>>> AdapterFactory adapterFactory, ResourceLocator resourceLocator) {
>>>> super(value, owner, attribute,
>>>> index, adapterFactory,
>>>> resourceLocator);
>>>> }
>>>> public String getColumnText (Object o,
>>>> int i) {
>>>> String res="BB "+ getText(o)+"
>>>> :: "+String.valueOf(i); return
>>>> res;
>>>> }
>>>> public Object getColumnImage (Object o,
>>>> int i) {
>>>> Object res = null;
>>>> switch (i) {
>>>> default: res = getImage(o);
>>>> break; }
>>>> return res;
>>>> }
>>>> }
>>>> value = new BB(value, object, (EAttribute)feature, index,
>>>> adapterFactory, getResourceLocator());
>>>> }
>>>> else if (!((EReference)feature).isContainment())
>>>> {
>>>> class CC extends DelegatingWrapperItemProvider
>>>> implements
>>>> ITableItemLabelProvider
>>>> {
>>>> public CC(Object value, Object owner,
>>>> EStructuralFeature feature, int
>>>> index, AdapterFactory adapterFactory) {
>>>> super(value, owner, feature,
>>>> index, adapterFactory);
>>>> }
>>>> public String getColumnText (Object o,
>>>> int i) {
>>>> String res="CC " + getText(o)+"
>>>> :: "+String.valueOf(i); return
>>>> res;
>>>> }
>>>>
>>>> public Object getColumnImage (Object o,
>>>> int i) {
>>>> Object res = null;
>>>> switch (i) {
>>>> default: res = getImage(o);
>>>> break; }
>>>> return res;
>>>> }
>>>>
>>>> }
>>>> value = new CC (value, object, feature, index,
>>>> adapterFactory);
>>>> }
>>>> return value;
>>>> }
>>>> }
>>>>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++
>>>>
>>>>
>>>> Ed Merks wrote:
>>>>
>>>>
>>>>
>>>>
>>>>> D,
>>>>>
>>>>> Unfortunately I don't understand the aspect stuff well enough to say
>>>>> intelligent things. I think your approach will still work. I'll
>>>>> answer
>>>>> in terms of what I'd do without aspects to support this. I.e., I'd
>>>>> create a derived wrapper MyFeatureMapEntryWrapperItemProvider that
>>>>> implements the API that my factory wants to support.
>>>>>
>>>>> protected Object createWrapper(EObject object, EStructuralFeature
>>>>> feature, Object value, int index)
>>>>> {
>>>>> if (!isWrappingNeeded(object)) return value;
>>>>>
>>>>> if (FeatureMapUtil.isFeatureMap(feature))
>>>>> {
>>>>> class MyFeatureMapEntryWrapperItemProvider extends
>>>>> FeatureMapEntryWrapperItemProvider implements
>>>>> ITableItemLabelProvider
>>>>> {
>>>>> public MyFeatureMapEntryWrapperItemProvider(
>>>>> FeatureMap.Entry entry,
>>>>> EObject owner,
>>>>> EAttribute attribute,
>>>>> int index,
>>>>> AdapterFactory adapterFactory,
>>>>> ResourceLocator resourceLocator)
>>>>> {
>>>>> super(entry, owner, attribute, index, adapterFactory,
>>>>> resourceLocator);
>>>>> }
>>>>>
>>>>> public Object getColumnImage(Object object, int
>>>>> columnIndex)
>>>>> {
>>>>> // TODO Auto-generated method stub
>>>>> return null;
>>>>> }
>>>>>
>>>>> public String getColumnText(Object object, int columnIndex)
>>>>> {
>>>>> // TODO Auto-generated method stub
>>>>> return null;
>>>>> }
>>>>> }
>>>>> value = new
>>>>> MyFeatureMapEntryWrapperItemProvider((FeatureMap.Entry)value ,
>>>>> object, (EAttribute)feature, index, adapterFactory,
>>>>> getResourceLocator());
>>>>> }
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> dmahler@gmail.com wrote:
>>>>>
>>>>>
>>>>>
>>>>>> Thanks again Ed!
>>>>>>
>>>>>> Could you expand on that little though,
>>>>>> I've only been working with Eclipse for less than a month.
>>>>>>
>>>>>> What are my options? Can I add the missing APIs myself?
>>>>>> How do I find out what exactly needs adding?
>>>>>> Is this an Eclipse bug? Should I report it somewhere?
>>>>>> Does it mean the AOP approach to customization is flawed in this
>>>>>> particular case? or more generally?
>>>>>>
>>>>>> thanks
>>>>>> D
>>>>>>
>>>>>>
>>>>>> Ed Merks wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> D,
>>>>>>>
>>>>>>> Probably wrappers are being created by this ItemProviderAdapter
>>>>>>> method and the wrappers are not implementing all the APIs you need
>>>>>>> them to implement.
>>>>>>>
>>>>>>> protected Object createWrapper(EObject object,
>>>>>>> EStructuralFeature
>>>>>>> feature, Object value, int index)
>>>>>>> {
>>>>>>> if (!isWrappingNeeded(object)) return value;
>>>>>>>
>>>>>>> if (FeatureMapUtil.isFeatureMap(feature))
>>>>>>> {
>>>>>>> value = new
>>>>>>> *FeatureMapEntryWrapperItemProvider*((FeatureMap.Entry)value ,
>>>>>>> object, (EAttribute)feature, index, adapterFactory,
>>>>>>> getResourceLocator());
>>>>>>> }
>>>>>>> else if (feature instanceof EAttribute)
>>>>>>> {
>>>>>>> value = new *AttributeValueWrapperItemProvider*(value,
>>>>>>> object,
>>>>>>> (EAttribute)feature, index, adapterFactory,
>>>>>>> getResourceLocator());
>>>>>>> }
>>>>>>> else if (!((EReference)feature).isContainment())
>>>>>>> {
>>>>>>> value = new *DelegatingWrapperItemProvider*(value, object,
>>>>>>> feature, index, adapterFactory);
>>>>>>> }
>>>>>>>
>>>>>>> return value;
>>>>>>> }
>>>>>>>
>>>>>>> dmahler@gmail.com wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> I have been experimenting with customizing emf generated code using
>>>>>>>> AspectJ,
>>>>>>>> [and so far it has been pretty close to a raging succcess. :) ]
>>>>>>>> Now I am trying to 'Tree with Columns' editor page to do something
>>>>>>>> useful. Since the column contents are fairly uniform,
>>>>>>>> I using AspectJ to essentially create a mixin trait to inherit into
>>>>>>>> all my item providers (see code below).
>>>>>>>> My model is generated from an XSD (that explains the odd
>>>>>>>> classnames) and comes in 2 packages.
>>>>>>>> So I have created three trivial interfaces:
>>>>>>>> and andcestor for all item providers, and 2 specializations of it
>>>>>>>> (1 for each package).
>>>>>>>>
>>>>>>>> I the aspect I then make the generated item providers implement the
>>>>>>>> new interfaces and I make the new top inteface provide default
>>>>>>>> implementations
>>>>>>>> for the ITableItemLabelProvider interface and declare the it to
>>>>>>>> extend all the item provider interfaces.
>>>>>>>>
>>>>>>>> Finally I add _1ItemProviderAdapterFactory.new() to the
>>>>>>>> supportedTypes list of the adapter factory in each package using
>>>>>>>> after advice on its constructor.
>>>>>>>>
>>>>>>>> As far as I understand the EMF framework, this should do it,
>>>>>>>> since now all the item providers implement ITableItemLabelProvider
>>>>>>>> and both the adapter factories support it.
>>>>>>>> However, when I run the plugin,
>>>>>>>> I only get the new behaviour for the document root node
>>>>>>>> and all the descendants revert to the eclipse default behavior,
>>>>>>>> of showing the same information in both columns.
>>>>>>>> According to the AJDT tools my advice is being applied to all my
>>>>>>>> classes, so I do not know what is going on.
>>>>>>>> Any advice appreciated.
>>>>>>>>
>>>>>>>> thanks
>>>>>>>> D
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>>> public interface CrcsItemProvider {
>>>>>>>>
>>>>>>>> }
>>>>>>>>
>>>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>>> public interface CCSItemProvider extends CrcsItemProvider {
>>>>>>>>
>>>>>>>> }
>>>>>>>>
>>>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>>> public interface RCSItemProvider extends CrcsItemProvider {
>>>>>>>>
>>>>>>>> }
>>>>>>>>
>>>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>>>
>>>>>>>> public privileged aspect TextProvider {
>>>>>>>>
>>>>>>>> declare parents: com.rightscom.ns.ccs.provider.*Provider
>>>>>>>> implements
>>>>>>>> CCSItemProvider;
>>>>>>>>
>>>>>>>> declare parents:
>>>>>>>> org.relaxng.ns.structure._1.provider.*Provider
>>>>>>>> implements RCSItemProvider;
>>>>>>>>
>>>>>>>> declare parents: CrcsItemProvider implements
>>>>>>>> ITableItemLabelProvider, IEditingDomainItemProvider,
>>>>>>>> IStructuredItemContentProvider,
>>>>>>>> ITreeItemContentProvider,
>>>>>>>> IItemLabelProvider,
>>>>>>>> IItemPropertySource;
>>>>>>>>
>>>>>>>> ////////////////////////////
>>>>>>>>
>>>>>>>> public String CrcsItemProvider.getColumnText (Object o, int
>>>>>>>> i)
>>>>>>>> {
>>>>>>>> String res = null;
>>>>>>>> switch (i) {
>>>>>>>> case 0: res = getText(o); break;
>>>>>>>> default: res ="ZZZZZZZZ"; break;
>>>>>>>> }
>>>>>>>> return res;
>>>>>>>> }
>>>>>>>>
>>>>>>>> public Object CrcsItemProvider.getColumnImage (Object o, int
>>>>>>>> i)
>>>>>>>> {
>>>>>>>> Object res = null;
>>>>>>>> switch (i) {
>>>>>>>> case 0: res = getImage(o); break;
>>>>>>>> default: res =null; break;
>>>>>>>> }
>>>>>>>> return getImage(o);
>>>>>>>> }
>>>>>>>>
>>>>>>>> after (CcsItemProviderAdapterFactory t) returning:
>>>>>>>> execution(CcsItemProviderAdapterFactory.new())
>>>>>>>> && this(t) {
>>>>>>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>>>>>>> }
>>>>>>>>
>>>>>>>> after (_1ItemProviderAdapterFactory t) returning:
>>>>>>>> execution(_1ItemProviderAdapterFactory.new())
>>>>>>>> && this(t) {
>>>>>>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>>>>>>> }
>>>>>>>> ....
>>>>>>>> }
>>>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>>>
>>
>>
--nextPart26859135.E4ct18iyiN
Content-Type: application/x-zip; name="mindmap.zip"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="mindmap.zip"
UEsDBBQACAAIALGm+TQAAAAAAAAAAAAAAAASAAAAbWluZG1hcC8uY2xhc3Nw YXRolY/LCsIwEEXX
9itC9qa6c9EHIhV0UaXUtdRkaKNxEvMQ/XstUnSj4G7u5XAuk+S3syJXsE5q TOmUTSgB5FpIbFO6
q5fjGc2zKOGqcc40vsui0TsAensnJ4kipc5ySvrydcZfQa5xALVtGXAljQN2 FJ6pJiDvntNsXRX7
xaas56uyqP6XGQGMawvMwiVIC2KrQivR/TDp4E3wg+wgsWeT+OPxB1BLBwg/ HFeoowAAACwBAABQ
SwMEFAAIAAgAsab5NAAAAAAAAAAAAAAAABAAAABtaW5kbWFwLy5wcm9qZWN0 vZLBbgIhFEXX+hVm
9oV21wWOiZru2jTRfgCF58hkeBBgTD/fxwyaamJiYuLu3st9HAKIxZ/tZgcI 0TicV2/stZoBKqcN
NvPqZ/vx8l4t6qnwwbWg0hqiCsYnKtfTiUBpobYGtZVe8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7SL
PqTd9BE9SF8w6idGHaSdUtAeLqz3Sj89KnV6TLajx2VXekL2ZfkAelJm0FPy GHpaDqJ9cjA9I/9G
z8pilpfQ83IivSBPphdlGb0kp9PLsopekbUsX0ivyQZ6XZ5Jb8hF9KZcSm/J i+lteTXL19K78lra
L6+j9+RGel/eRAfkXfSBfIDlbJ18kD6We+gTuZc+lU/SZ/IV+lzuZ/kB+lJ+ QF/JT+hr+Sl9I7+m
b+Wv9J0m6EtNo+81H/2gtaEftbb0H60D/aQdTT9rA1ieRb9qA+k3LYf+q+XS 71oB/aGNoj+1EpZP
ooPaZAlahURtihTaKZK0eVJqC1kekT6tSfq1xVLXlsgUbZlso62SbbW1LF8v U7UNsp12vWyvbZZp
2i2yg3aPTNd2s/xh2VF7RB6hPSY7aY/Lzto+eaT2uuyiHWD5R/Io7WPZTftc Hq19Ibtr38ke2u+y
p0+TR/l02duXIvv4UmVfXzvZz9dR9vf1lAN8WSwfJDNjNbIv266RpS8L++Gf 6sdG/EvtcXjwf1BL
Bwjt150ilhcAACQ9AABQSwMEFAAIAAgAsab5NAAAAAAAAAAAAAAAADsAAABt aW5kbWFwL2Jpbi9v
cmcvZXhhbXBsZS9taW5kbWFwL2ltcGwvUmVsYXRpb25zaGlwSW1wbC5jbGFz c61Xa1RU1xX+jgwM
g9dHURAElBhxXsiIWqOiEh6jjAwjAYRA4+MyXPDqMIMzg9GmbfqwTV9Jmr6J TdrYGltLW1AZmtgm
9rHiWv3Vv3397N++f7Zp9z73zp1huLj80Vnr3rPveez97W/vs8+Z37z/9jsA mvGuE6sEvInkREC7
|
|
|
Re: implementing ITableItemLabelProvider with aspects [message #594498 is a reply to message #66492] |
Wed, 26 July 2006 12:03 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
--------------080700050903080108010302
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
D,
I changed your code like this so that AA and CC both create a new CC:
protected Object createWrapper(EObject object,
EStructuralFeature feature, Object value, int index)
{
class BB extends AttributeValueWrapperItemProvider
implements ITableItemLabelProvider
{
public BB(Object value, EObject owner, EAttribute
attribute, AdapterFactory adapterFactory, ResourceLocator
resourceLocator) {
super(value, owner, attribute, adapterFactory,
resourceLocator);
// TODO Auto-generated constructor stub
}
public BB(Object value, EObject owner, EAttribute
attribute, int index, AdapterFactory adapterFactory, ResourceLocator
resourceLocator) {
super(value, owner, attribute, index,
adapterFactory, resourceLocator);
// TODO Auto-generated constructor stub
}
public String getColumnText (Object o, int i) {
String res="BB "+ getText(o)+" ::
"+String.valueOf(i);
return res;
}
public Object getColumnImage (Object o, int i) {
Object res = null;
switch (i) {
default: res = getImage(o); break;
}
return res;
}
}
class CC extends DelegatingWrapperItemProvider
implements ITableItemLabelProvider
{
public CC(Object value, Object owner,
EStructuralFeature feature, int index, AdapterFactory adapterFactory) {
super(value, owner, feature, index, adapterFactory);
// TODO Auto-generated constructor stub
}
public String getColumnText (Object o, int i) {
String res="CC " + getText(o)+" ::
"+String.valueOf(i);
return res;
}
public Object getColumnImage (Object o, int i) {
Object res = null;
switch (i) {
default: res = getImage(o); break;
}
return res;
}
protected IWrapperItemProvider createWrapper(Object
value, Object owner, AdapterFactory adapterFactory)
{
return new CC(value, owner, null,
CommandParameter.NO_INDEX, adapterFactory);
}
}
class AA extends FeatureMapEntryWrapperItemProvider
implements ITableItemLabelProvider
{
public AA (FeatureMap.Entry entry, EObject owner,
EAttribute attribute, int index, AdapterFactory adapterFactory,
ResourceLocator resourceLocator) {
super(entry, owner, attribute, index,
adapterFactory, resourceLocator);
}
public String getColumnText (Object o, int i) {
String res="AA "+getText(o)+" ::
"+String.valueOf(i);
return res;
}
public Object getColumnImage (Object o, int i) {
Object res = null;
switch (i) {
default: res = getImage(o); break;
}
return res;
}
protected IWrapperItemProvider createWrapper(Object
value, Object owner, AdapterFactory adapterFactory)
{
return new CC(value, owner, null,
CommandParameter.NO_INDEX, adapterFactory);
}
}
if (!isWrappingNeeded(object)) return value;
if (FeatureMapUtil.isFeatureMap(feature))
{
value = new AA ((FeatureMap.Entry)value, object,
(EAttribute)feature, index, adapterFactory, getResourceLocator());
}
else if (feature instanceof EAttribute)
{
value = new BB(value, object, (EAttribute)feature, index,
adapterFactory, getResourceLocator());
}
else if (!((EReference)feature).isContainment())
{
value = new CC (value, object, feature, index,
adapterFactory);
}
return value;
}
But I wasn't really sure what I should notice to indicate that there was
a problem before I made this change since every object with children
displayed your specialized results already (i.e., either an AA or a ZZ
label).
dmahler@gmail.com wrote:
>Ed,
>
>I have reproduced the problem for the mindmap.xsd project
>that is used in the tutorials.
>It which is attached.
>Just import it, run it, and load this model.
>
>
><?xml version="1.0" encoding="UTF-8"?>
><mindmap:map xmlns:mindmap="http://www.example.org/mindmap">
> <rootTopics>
> <comments>
> <items/>
> </comments>
> </rootTopics>
> <relations/>
> <resources/>
> <resources/>
></mindmap:map>
>
>and switch to the Tree with Columns view.
>Don't regenerate though, as I have not killed all the @generated markers.
>
>D
>
>
>Ed Merks wrote:
>
>
>
>>D,
>>
>>It would be really good if you could provide a test case where we could
>>explore this issue in detail. One approach to try is to reuse your
>>derived DelegatingWrapper, CC, and pass in null for the feature and
>>CommandParameter.NO_INDEX for the index. I don't know of a way to turn
>>a tree view into text. I suppose a screen capture pasted as an image
>>won't work for you?
>>
>>
>>dmahler@gmail.com wrote:
>>
>>
>>>Ed,
>>>
>>>It looks like a plain DelegatingWrapperItemProvider is getting passed in.
>>>Its delegateItmeProvider and owner are instances of the inner AA class
>>>though and its adapterFactory is also mine.
>>>After setting a breakpoint on DelegatingWrapperItemProvider constructors
>>>It looks like the callchain on the AA istance is
>>>getChildren() -> updateChildren() -> createWrapper(..).
>>>All these are inherited from DelegatingWrapperItemProvider,
>>>and DelegatingWrapperItemProvider.createWrapper calls the constructor
>>>
>>>protected IWrapperItemProvider createWrapper(Object value, Object owner,
>>>AdapterFactory adapterFactory)
>>> {
>>> return new DelegatingWrapperItemProvider(value, owner,
>>> adapterFactory);
>>> }
>>>
>>>so we get a raw DelegatingWrapperItemProvider instance.
>>>I looked at verring createWrapper in AA, but the AA constructor
>>>seems to need more information then is available at the createWrapper
>>>call. BTW is there a way to extrect plain text representation from the
>>>debug perspective to paste into emails?
>>>
>>>thanks
>>>D
>>>
>>>
>>>Ed Merks wrote:
>>>
>>>
>>>
>>>
>>>>D,
>>>>
>>>>Yes, this should do the trick. Set a breakpoint
>>>>AdapterFactoryLabelProvider.getColumnText and see what's happening there
>>>>for the case that it's not working.
>>>>
>>>>
>>>>dmahler@gmail.com wrote:
>>>>
>>>>
>>>>
>>>>
>>>>>Ed,
>>>>>
>>>>>I've now implemented the the following extension to
>>>>>ItemProviderAdapter, and made all my item providers inherit that
>>>>>instead (no aspects).
>>>>>supportedTypes.add(ITableItemLabelProvider.class);
>>>>>
>>>>>The "Tree with Columns" view now works correctly for the first 2 levels
>>>>>of the tree, but still reverts to the default Tree view behaviour after
>>>>>that.
>>>>>
>>>>>According to my understanding of the EMF book, this and the
>>>>>
>>>>>supportedTypes.add(ITableItemLabelProvider.class);
>>>>>
>>>>>lines in the *ItemProviderAdapterFactory constructors should be all
>>>>>that is needed.
>>>>>
>>>>>thanks
>>>>>D
>>>>>
>>>>>
>>>>>
>>>>>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++
>
>
>>>>>package com.rightscom.crcs;
>>>>>
>>>>>import org.eclipse.emf.common.notify.AdapterFactory;
>>>>>
>>>>>import org.eclipse.emf.ecore.*;
>>>>>import org.eclipse.emf.ecore.util.*;
>>>>>import org.eclipse.emf.common.util.*;
>>>>>import org.eclipse.emf.edit.provider.*;
>>>>>
>>>>>public class CRCSItemProviderAdapter extends ItemProviderAdapter
>>>>>implements ITableItemLabelProvider
>>>>>{
>>>>>
>>>>> public CRCSItemProviderAdapter(AdapterFactory adapterFactory) {
>>>>> super(adapterFactory);
>>>>> // TODO Auto-generated constructor stub
>>>>> }
>>>>>
>>>>>
>>>>> public String getColumnText (Object o, int i) {
>>>>> String res="ZZ "+getText(o)+" :: "+String.valueOf(i);
>>>>> return res;
>>>>> }
>>>>>
>>>>> public Object getColumnImage (Object o, int i) {
>>>>> Object res = null;
>>>>> switch (i) {
>>>>> default: res = getImage(o); break;
>>>>> }
>>>>> return res;
>>>>> }
>>>>>
>>>>> @Override
>>>>> protected Object createWrapper(EObject object,
>>>>> EStructuralFeature feature,
>>>>>Object value, int index)
>>>>> {
>>>>> if (!isWrappingNeeded(object)) return value;
>>>>>
>>>>> if (FeatureMapUtil.isFeatureMap(feature))
>>>>> {
>>>>> class AA extends FeatureMapEntryWrapperItemProvider
>>>>> implements
>>>>>ITableItemLabelProvider
>>>>> {
>>>>> public AA (FeatureMap.Entry entry,
>>>>> EObject owner, EAttribute attribute,
>>>>>int index, AdapterFactory adapterFactory, ResourceLocator
>>>>>resourceLocator)
>>>>>{
>>>>> super(entry, owner, attribute,
>>>>> index, adapterFactory,
>>>>> resourceLocator);
>>>>> }
>>>>> public String getColumnText (Object o,
>>>>> int i) {
>>>>> String res="AA "+getText(o)+" ::
>>>>> "+String.valueOf(i); return res;
>>>>> }
>>>>> public Object getColumnImage (Object o,
>>>>> int i) {
>>>>> Object res = null;
>>>>> switch (i) {
>>>>> default: res = getImage(o);
>>>>> break; }
>>>>> return res;
>>>>> }
>>>>> }
>>>>> value = new AA ((FeatureMap.Entry)value, object,
>>>>> (EAttribute)feature,
>>>>>index, adapterFactory, getResourceLocator());
>>>>> }
>>>>> else if (feature instanceof EAttribute)
>>>>> {
>>>>> class BB extends AttributeValueWrapperItemProvider
>>>>> implements
>>>>>ITableItemLabelProvider
>>>>> {
>>>>> public BB(Object value, EObject owner,
>>>>> EAttribute attribute,
>>>>>AdapterFactory adapterFactory, ResourceLocator resourceLocator) {
>>>>> super(value, owner, attribute,
>>>>> adapterFactory,
>>>>> resourceLocator); // TODO
>>>>> Auto-generated constructor stub
>>>>> }
>>>>> public BB(Object value, EObject owner,
>>>>> EAttribute attribute, int index,
>>>>>AdapterFactory adapterFactory, ResourceLocator resourceLocator) {
>>>>> super(value, owner, attribute,
>>>>> index, adapterFactory,
>>>>> resourceLocator);
>>>>> }
>>>>> public String getColumnText (Object o,
>>>>> int i) {
>>>>> String res="BB "+ getText(o)+"
>>>>> :: "+String.valueOf(i); return
>>>>> res;
>>>>> }
>>>>> public Object getColumnImage (Object o,
>>>>> int i) {
>>>>> Object res = null;
>>>>> switch (i) {
>>>>> default: res = getImage(o);
>>>>> break; }
>>>>> return res;
>>>>> }
>>>>> }
>>>>> value = new BB(value, object, (EAttribute)feature, index,
>>>>>adapterFactory, getResourceLocator());
>>>>> }
>>>>> else if (!((EReference)feature).isContainment())
>>>>> {
>>>>> class CC extends DelegatingWrapperItemProvider
>>>>> implements
>>>>>ITableItemLabelProvider
>>>>> {
>>>>> public CC(Object value, Object owner,
>>>>> EStructuralFeature feature, int
>>>>>index, AdapterFactory adapterFactory) {
>>>>> super(value, owner, feature,
>>>>> index, adapterFactory);
>>>>> }
>>>>> public String getColumnText (Object o,
>>>>> int i) {
>>>>> String res="CC " + getText(o)+"
>>>>> :: "+String.valueOf(i); return
>>>>> res;
>>>>> }
>>>>>
>>>>> public Object getColumnImage (Object o,
>>>>> int i) {
>>>>> Object res = null;
>>>>> switch (i) {
>>>>> default: res = getImage(o);
>>>>> break; }
>>>>> return res;
>>>>> }
>>>>>
>>>>> }
>>>>> value = new CC (value, object, feature, index,
>>>>> adapterFactory);
>>>>> }
>>>>> return value;
>>>>> }
>>>>>}
>>>>>
>>>>>
>>>>>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++
>
>
>>>>>Ed Merks wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>D,
>>>>>>
>>>>>>Unfortunately I don't understand the aspect stuff well enough to say
>>>>>>intelligent things. I think your approach will still work. I'll
>>>>>>answer
>>>>>>in terms of what I'd do without aspects to support this. I.e., I'd
>>>>>>create a derived wrapper MyFeatureMapEntryWrapperItemProvider that
>>>>>>implements the API that my factory wants to support.
>>>>>>
>>>>>> protected Object createWrapper(EObject object, EStructuralFeature
>>>>>> feature, Object value, int index)
>>>>>> {
>>>>>> if (!isWrappingNeeded(object)) return value;
>>>>>>
>>>>>> if (FeatureMapUtil.isFeatureMap(feature))
>>>>>> {
>>>>>> class MyFeatureMapEntryWrapperItemProvider extends
>>>>>> FeatureMapEntryWrapperItemProvider implements
>>>>>> ITableItemLabelProvider
>>>>>> {
>>>>>> public MyFeatureMapEntryWrapperItemProvider(
>>>>>> FeatureMap.Entry entry,
>>>>>> EObject owner,
>>>>>> EAttribute attribute,
>>>>>> int index,
>>>>>> AdapterFactory adapterFactory,
>>>>>> ResourceLocator resourceLocator)
>>>>>> {
>>>>>> super(entry, owner, attribute, index, adapterFactory,
>>>>>> resourceLocator);
>>>>>> }
>>>>>>
>>>>>> public Object getColumnImage(Object object, int
>>>>>> columnIndex)
>>>>>> {
>>>>>> // TODO Auto-generated method stub
>>>>>> return null;
>>>>>> }
>>>>>>
>>>>>> public String getColumnText(Object object, int columnIndex)
>>>>>> {
>>>>>> // TODO Auto-generated method stub
>>>>>> return null;
>>>>>> }
>>>>>> }
>>>>>> value = new
>>>>>> MyFeatureMapEntryWrapperItemProvider((FeatureMap.Entry)value ,
>>>>>> object, (EAttribute)feature, index, adapterFactory,
>>>>>> getResourceLocator());
>>>>>> }
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>dmahler@gmail.com wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>Thanks again Ed!
>>>>>>>
>>>>>>>Could you expand on that little though,
>>>>>>>I've only been working with Eclipse for less than a month.
>>>>>>>
>>>>>>>What are my options? Can I add the missing APIs myself?
>>>>>>>How do I find out what exactly needs adding?
>>>>>>>Is this an Eclipse bug? Should I report it somewhere?
>>>>>>>Does it mean the AOP approach to customization is flawed in this
>>>>>>>particular case? or more generally?
>>>>>>>
>>>>>>>thanks
>>>>>>>D
>>>>>>>
>>>>>>>
>>>>>>>Ed Merks wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>D,
>>>>>>>>
>>>>>>>>Probably wrappers are being created by this ItemProviderAdapter
>>>>>>>>method and the wrappers are not implementing all the APIs you need
>>>>>>>>them to implement.
>>>>>>>>
>>>>>>>> protected Object createWrapper(EObject object,
>>>>>>>> EStructuralFeature
>>>>>>>> feature, Object value, int index)
>>>>>>>> {
>>>>>>>> if (!isWrappingNeeded(object)) return value;
>>>>>>>>
>>>>>>>> if (FeatureMapUtil.isFeatureMap(feature))
>>>>>>>> {
>>>>>>>> value = new
>>>>>>>> *FeatureMapEntryWrapperItemProvider*((FeatureMap.Entry)value ,
>>>>>>>> object, (EAttribute)feature, index, adapterFactory,
>>>>>>>> getResourceLocator());
>>>>>>>> }
>>>>>>>> else if (feature instanceof EAttribute)
>>>>>>>> {
>>>>>>>> value = new *AttributeValueWrapperItemProvider*(value,
>>>>>>>> object,
>>>>>>>> (EAttribute)feature, index, adapterFactory,
>>>>>>>> getResourceLocator());
>>>>>>>> }
>>>>>>>> else if (!((EReference)feature).isContainment())
>>>>>>>> {
>>>>>>>> value = new *DelegatingWrapperItemProvider*(value, object,
>>>>>>>> feature, index, adapterFactory);
>>>>>>>> }
>>>>>>>>
>>>>>>>> return value;
>>>>>>>> }
>>>>>>>>
>>>>>>>>dmahler@gmail.com wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>>I have been experimenting with customizing emf generated code using
>>>>>>>>>AspectJ,
>>>>>>>>>[and so far it has been pretty close to a raging succcess. :) ]
>>>>>>>>>Now I am trying to 'Tree with Columns' editor page to do something
>>>>>>>>>useful. Since the column contents are fairly uniform,
>>>>>>>>>I using AspectJ to essentially create a mixin trait to inherit into
>>>>>>>>>all my item providers (see code below).
>>>>>>>>>My model is generated from an XSD (that explains the odd
>>>>>>>>>classnames) and comes in 2 packages.
>>>>>>>>>So I have created three trivial interfaces:
>>>>>>>>>and andcestor for all item providers, and 2 specializations of it
>>>>>>>>>(1 for each package).
>>>>>>>>>
>>>>>>>>>I the aspect I then make the generated item providers implement the
>>>>>>>>>new interfaces and I make the new top inteface provide default
>>>>>>>>>implementations
>>>>>>>>>for the ITableItemLabelProvider interface and declare the it to
>>>>>>>>>extend all the item provider interfaces.
>>>>>>>>>
>>>>>>>>>Finally I add _1ItemProviderAdapterFactory.new() to the
>>>>>>>>>supportedTypes list of the adapter factory in each package using
>>>>>>>>>after advice on its constructor.
>>>>>>>>>
>>>>>>>>>As far as I understand the EMF framework, this should do it,
>>>>>>>>>since now all the item providers implement ITableItemLabelProvider
>>>>>>>>>and both the adapter factories support it.
>>>>>>>>>However, when I run the plugin,
>>>>>>>>>I only get the new behaviour for the document root node
>>>>>>>>>and all the descendants revert to the eclipse default behavior,
>>>>>>>>>of showing the same information in both columns.
>>>>>>>>>According to the AJDT tools my advice is being applied to all my
>>>>>>>>>classes, so I do not know what is going on.
>>>>>>>>>Any advice appreciated.
>>>>>>>>>
>>>>>>>>>thanks
>>>>>>>>>D
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>>>>public interface CrcsItemProvider {
>>>>>>>>>
>>>>>>>>>}
>>>>>>>>>
>>>>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>>>>public interface CCSItemProvider extends CrcsItemProvider {
>>>>>>>>>
>>>>>>>>>}
>>>>>>>>>
>>>>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>>>>public interface RCSItemProvider extends CrcsItemProvider {
>>>>>>>>>
>>>>>>>>>}
>>>>>>>>>
>>>>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>>>>
>>>>>>>>>public privileged aspect TextProvider {
>>>>>>>>>
>>>>>>>>> declare parents: com.rightscom.ns.ccs.provider.*Provider
>>>>>>>>> implements
>>>>>>>>>CCSItemProvider;
>>>>>>>>>
>>>>>>>>> declare parents:
>>>>>>>>> org.relaxng.ns.structure._1.provider.*Provider
>>>>>>>>>implements RCSItemProvider;
>>>>>>>>>
>>>>>>>>> declare parents: CrcsItemProvider implements
>>>>>>>>> ITableItemLabelProvider, IEditingDomainItemProvider,
>>>>>>>>> IStructuredItemContentProvider,
>>>>>>>>> ITreeItemContentProvider,
>>>>>>>>> IItemLabelProvider,
>>>>>>>>> IItemPropertySource;
>>>>>>>>>
>>>>>>>>> ////////////////////////////
>>>>>>>>>
>>>>>>>>> public String CrcsItemProvider.getColumnText (Object o, int
>>>>>>>>> i)
>>>>>>>>> {
>>>>>>>>> String res = null;
>>>>>>>>> switch (i) {
>>>>>>>>> case 0: res = getText(o); break;
>>>>>>>>> default: res ="ZZZZZZZZ"; break;
>>>>>>>>> }
>>>>>>>>> return res;
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> public Object CrcsItemProvider.getColumnImage (Object o, int
>>>>>>>>> i)
>>>>>>>>> {
>>>>>>>>> Object res = null;
>>>>>>>>> switch (i) {
>>>>>>>>> case 0: res = getImage(o); break;
>>>>>>>>> default: res =null; break;
>>>>>>>>> }
>>>>>>>>> return getImage(o);
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> after (CcsItemProviderAdapterFactory t) returning:
>>>>>>>>> execution(CcsItemProviderAdapterFactory.new())
>>>>>>>>> && this(t) {
>>>>>>>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> after (_1ItemProviderAdapterFactory t) returning:
>>>>>>>>> execution(_1ItemProviderAdapterFactory.new())
>>>>>>>>> && this(t) {
>>>>>>>>> t.supportedTypes.add(ITableItemLabelProvider.class);
>>>>>>>>> }
>>>>>>>>>....
>>>>>>>>>}
>>>>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>>
--------------080700050903080108010302
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
D,<br>
<br>
I changed your code like this so that AA and CC both create a new CC:<br>
<br>
<blockquote><small> protected Object createWrapper(EObject object,
EStructuralFeature feature, Object value, int index)</small><br>
<small> {</small><br>
<small> </small><br>
<small> class BB extends
AttributeValueWrapperItemProvider implements ITableItemLabelProvider </small><br>
<small> {</small><br>
<br>
<small> public BB(Object value, EObject owner,
EAttribute attribute, AdapterFactory adapterFactory, ResourceLocator
resourceLocator) {</small><br>
<small> super(value, owner, attribute,
adapterFactory, resourceLocator);</small><br>
<small> // TODO Auto-generated constructor stub</small><br>
<small> }</small><br>
<br>
<small> public BB(Object value, EObject owner,
EAttribute attribute, int index, AdapterFactory adapterFactory,
ResourceLocator resourceLocator) {</small><br>
<small> super(value, owner, attribute, index,
adapterFactory, resourceLocator);</small><br>
<small> // TODO Auto-generated constructor stub</small><br>
<small> }</small><br>
<br>
<br>
<small> public String getColumnText (Object o, int i) {</small><br>
<small> String res="BB "+ getText(o)+" ::
"+String.valueOf(i);</small><br>
<small> return res;</small><br>
<small> }</small><br>
<br>
<small> public Object getColumnImage (Object o, int i)
{</small><br>
<small> Object res = null;</small><br>
<small> switch (i) {</small><br>
<small> default: res = getImage(o); break;</small><br>
<small> }</small><br>
<small> return res;</small><br>
<small> }</small><br>
<br>
<small> </small><br>
<small> }</small><br>
<br>
<small> class CC extends DelegatingWrapperItemProvider
implements ITableItemLabelProvider </small><br>
<small> {</small><br>
<br>
<small> public CC(Object value, Object owner,
EStructuralFeature feature, int index, AdapterFactory adapterFactory) {</small><br>
<small> super(value, owner, feature, index,
adapterFactory);</small><br>
<small> // TODO Auto-generated constructor stub</small><br>
<small> }</small><br>
<br>
<br>
<small> public String getColumnText (Object o, int i) {</small><br>
<small> String res="CC " + getText(o)+" ::
"+String.valueOf(i);</small><br>
<small> return res;</small><br>
<small> }</small><br>
<br>
<small> public Object getColumnImage (Object o, int i)
{</small><br>
<small> Object res = null;</small><br>
<small> switch (i) {</small><br>
<small> default: res = getImage(o); break;</small><br>
<small> }</small><br>
<small> return res;</small><br>
<small> }</small><br>
<br>
<small> protected IWrapperItemProvider
createWrapper(Object value, Object owner, AdapterFactory adapterFactory)</small><br>
<small> {</small><br>
<small> return new CC(value, owner, null,
CommandParameter.NO_INDEX, adapterFactory);</small><br>
<small> }</small><br>
<br>
<small> }</small><br>
<br>
<small> class AA extends
FeatureMapEntryWrapperItemProvider implements ITableItemLabelProvider </small><br>
<small> {</small><br>
<br>
<small> public AA (FeatureMap.Entry entry, EObject
owner, EAttribute attribute, int index, AdapterFactory adapterFactory,
ResourceLocator resourceLocator) {</small><br>
<small> super(entry, owner, attribute, index,
adapterFactory, resourceLocator);</small><br>
<small> }</small><br>
<br>
<br>
<small> public String getColumnText (Object o, int i) {</small><br>
<small> String res="AA "+getText(o)+" ::
"+String.valueOf(i);</small><br>
<small> return res;</small><br>
<small> }</small><br>
<br>
<small> public Object getColumnImage (Object o, int i)
{</small><br>
<small> Object res = null;</small><br>
<small> switch (i) {</small><br>
<small> default: res = getImage(o); break;</small><br>
<small> }</small><br>
<small> return res;</small><br>
<small> }</small><br>
<small> protected IWrapperItemProvider
createWrapper(Object value, Object owner, AdapterFactory adapterFactory)</small><br>
<small> {</small><br>
<small> return new CC(value, owner, null,
CommandParameter.NO_INDEX, adapterFactory);</small><br>
<small> }</small><br>
<small> }</small><br>
<small> if (!isWrappingNeeded(object)) return value;</small><br>
<br>
<small> if (FeatureMapUtil.isFeatureMap(feature))</small><br>
<small> {</small><br>
<small> value = new AA ((FeatureMap.Entry)value, object,
(EAttribute)feature, index, adapterFactory, getResourceLocator());</small><br>
<small> }</small><br>
<small> else if (feature instanceof EAttribute)</small><br>
<small> {</small><br>
<small> value = new BB(value, object, (EAttribute)feature,
index, adapterFactory, getResourceLocator());</small><br>
<small> }</small><br>
<small> else if (!((EReference)feature).isContainment())</small><br>
<small> {</small><br>
<small> value = new CC (value, object, feature, index,
adapterFactory);</small><br>
<small> }</small><br>
<br>
<small> return value;</small><br>
<small> }</small><br>
</blockquote>
But I wasn't really sure what I should notice to indicate that there
was a problem before I made this change since every object with
children displayed your specialized results already (i.e., either an AA
or a ZZ label).<br>
<br>
<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:dmahler@gmail.com">dmahler@gmail.com</a> wrote:
<blockquote cite="midea5tat$4s0$1@utils.eclipse.org" type="cite">
<pre wrap="">Ed,
I have reproduced the problem for the mindmap.xsd project
that is used in the tutorials.
It which is attached.
Just import it, run it, and load this model.
<?xml version="1.0" encoding="UTF-8"?>
<mindmap:map xmlns:mindmap=<a class="moz-txt-link-rfc2396E" href="http://www.example.org/mindmap">"http://www.example.org/mindmap"</a>>
<rootTopics>
<comments>
<items/>
</comments>
</rootTopics>
<relations/>
<resources/>
<resources/>
</mindmap:map>
and switch to the Tree with Columns view.
Don't regenerate though, as I have not killed all the @generated markers.
D
Ed Merks wrote:
</pre>
<blockquote type="cite">
<pre wrap="">D,
It would be really good if you could provide a test case where we could
explore this issue in detail. One approach to try is to reuse your
derived DelegatingWrapper, CC, and pass in null for the feature and
CommandParameter.NO_INDEX for the index. I don't know of a way to turn
a tree view into text. I suppose a screen capture pasted as an image
won't work for you?
<a class="moz-txt-link-abbreviated" href="mailto:dmahler@gmail.com">dmahler@gmail.com</a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Ed,
It looks like a plain DelegatingWrapperItemProvider is getting passed in.
Its delegateItmeProvider and owner are instances of the inner AA class
though and its adapterFactory is also mine.
After setting a breakpoint on DelegatingWrapperItemProvider constructors
It looks like the callchain on the AA istance is
getChildren() -> updateChildren() -> createWrapper(..).
All these are inherited from DelegatingWrapperItemProvider,
and DelegatingWrapperItemProvider.createWrapper calls the constructor
protected IWrapperItemProvider createWrapper(Object value, Object owner,
AdapterFactory adapterFactory)
{
return new DelegatingWrapperItemProvider(value, owner,
adapterFactory);
}
so we get a raw DelegatingWrapperItemProvider instance.
I looked at verring createWrapper in AA, but the AA constructor
seems to need more information then is available at the createWrapper
call. BTW is there a way to extrect plain text representation from the
debug perspective to paste into emails?
thanks
D
Ed Merks wrote:
</pre>
<blockquote type="cite">
<pre wrap="">D,
Yes, this should do the trick. Set a breakpoint
AdapterFactoryLabelProvider.getColumnText and see what's happening there
for the case that it's not working.
<a class="moz-txt-link-abbreviated" href="mailto:dmahler@gmail.com">dmahler@gmail.com</a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Ed,
I've now implemented the the following extension to
ItemProviderAdapter, and made all my item providers inherit that
instead (no aspects).
supportedTypes.add(ITableItemLabelProvider.class);
The "Tree with Columns" view now works correctly for the first 2 levels
of the tree, but still reverts to the default Tree view behaviour after
that.
According to my understanding of the EMF book, this and the
supportedTypes.add(ITableItemLabelProvider.class);
lines in the *ItemProviderAdapterFactory constructors should be all
that is needed.
thanks
D
</pre>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<pre wrap=""><!----> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++
</pre>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">package com.rightscom.crcs;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.ecore.*;
import org.eclipse.emf.ecore.util.*;
import org.eclipse.emf.common.util.*;
import org.eclipse.emf.edit.provider.*;
public class CRCSItemProviderAdapter extends ItemProviderAdapter
implements ITableItemLabelProvider
{
public CRCSItemProviderAdapter(AdapterFactory adapterFactory) {
super(adapterFactory);
// TODO Auto-generated constructor stub
}
public String getColumnText (Object o, int i) {
String res="ZZ "+getText(o)+" :: "+String.valueOf(i);
return res;
}
public Object getColumnImage (Object o, int i) {
Object res = null;
switch (i) {
default: res = getImage(o); break;
}
return res;
}
@Override
protected Object createWrapper(EObject object,
EStructuralFeature feature,
Object value, int index)
{
if (!isWrappingNeeded(object)) return value;
if (FeatureMapUtil.isFeatureMap(feature))
{
class AA extends FeatureMapEntryWrapperItemProvider
implements
ITableItemLabelProvider
{
public AA (FeatureMap.Entry entry,
EObject owner, EAttribute attribute,
int index, AdapterFactory adapterFactory, ResourceLocator
resourceLocator)
{
super(entry, owner, attribute,
index, adapterFactory,
resourceLocator);
}
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Goto Forum:
Current Time: Sun Dec 22 06:27:37 GMT 2024
Powered by FUDForum. Page generated in 0.06495 seconds
|