[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] Re: Problems with label referencing a derived attribute

Hello,

I though the problem was solved but it isn't. The label of Element.ActionName works fine when I change Element.action (reference). But when I change Action.Name, the label don't refresh.

 The code I wrote in the ActionNameAdapter.java is:

.
.
.
public void notifyChanged(Notification msg)
.
.
.
else if(msg.getNotifier() instanceof Action && feature == MyPackage.eINSTANCE.getAction_Name())
{
String oldActionName = msg.getOldStringValue();
String newActionName = msg.getNewStringValue();


if(source.eNotificationRequired())
source.eNotify(new NotificationImpl(
(InternalEObject)msg.getNotifier(),
Notification.SET,
MyPackage.ELEMENT__ACTION_NAME,
oldActionName, newActionName));
}


}
.
.
.
private ActionNameAdapter (EObjectImpl sourc){
  source = sourc;
}
public static ActionNameAdapter INSTANCE(EObjectImpl sourc){
  return new ActionNameAdapter(sourc);
}


The call I make to add the listener is:

ActionNameAdapterFactory.INSTANCE.adapt(this, ActionNameAdapter.class);

And the method createAdapter of ActionNameAdapterFactory.java is:

  protected Adapter createAdapter(Notifier target) {
     return ActionNameAdapter.INSTANCE((EObjectImpl)target);
  }


Thanks.