|
Re: How to change the name at the runtime in eclipse emf [message #1863852 is a reply to message #1863846] |
Fri, 01 March 2024 10:41 |
Ed Merks Messages: 33143 Registered: July 2009 |
Senior Member |
|
|
A brute force approach would be to modify OneItemProviderAdapter from this generated code public void notifyChanged(Notification notification)
{
updateChildren(notification);
switch (notification.getFeatureID(One.class))
{
case MyPackage.ONE__NAME:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
super.notifyChanged(notification);
} use "new ViewerNotification(notification, null, false, true))" to do a full refresh of the viewer when the label changes based on the premise that the name affects not only the label of the object itself but also the label of arbitrary other things in the tree and you don't want to do the work to find/track all those places that are affected.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02734 seconds