|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Create ItemPropertyDescriptor with table [message #945982 is a reply to message #930519] |
Mon, 15 October 2012 20:52 |
John M. Messages: 198 Registered: July 2010 |
Senior Member |
|
|
Got it running. Here is my implementation:
public class MapEntryItemPropertyDescriptor extends ItemPropertyDescriptor {
public MapEntryItemPropertyDescriptor(AdapterFactory adapterFactory, String displayName, String description,
EStructuralFeature feature) {
super(adapterFactory, displayName, description, feature);
}
public MapEntryItemPropertyDescriptor(AdapterFactory adapterFactory, ResourceLocator resourceLocator,
String displayName, String description, EStructuralFeature feature, boolean isSettable, boolean multiLine,
boolean sortChoices, Object staticImage, String category, String[] filterFlags) {
super(adapterFactory, resourceLocator, displayName, description, feature, isSettable, multiLine, sortChoices,
staticImage, category, filterFlags);
}
@Override
public Object getPropertyValue(Object object) {
return ((BasicEMap.Entry<?, ?>) ((EObject) object).eContainer()).getKey();
}
@Override
public void setPropertyValue(Object object, Object value) {
super.setPropertyValue(((EObject) object).eContainer(), value);
}
}
|
|
|
|
|
|
|
|
Re: Create ItemPropertyDescriptor for editing Map [message #950064 is a reply to message #950041] |
Fri, 19 October 2012 15:50 |
Ed Merks Messages: 33137 Registered: July 2009 |
Senior Member |
|
|
John,
There's no way to know where the command came from.
On 19/10/2012 5:16 PM, John M. wrote:
>>> In my case for example the property page. So I only fire the event if
>>> there is really a change from propery page and not in the editor
>>> itself to prevent firing to much events.
>> How can you know whether some arbitrary change affects the value of a
>> property?
> I can't know that I think.
> I want to prevent if I change for example something with the editor,
> that my listener is activated and firing an event. Because there is
> already an integrated one and I don't want to fire multiple events for
> the same change.
> Only if I make a change with the property sheet the listener shall be
> activated.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.04366 seconds