Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » method called on edit
method called on edit [message #138518] Fri, 22 June 2007 02:48 Go to next message
Eclipse UserFriend
Originally posted by: alexjaquet.gmail.com

Hi,

I would like to know wich method is called when I edit a property of a
figure.

Thanks
Re: method called on edit [message #138542 is a reply to message #138518] Fri, 22 June 2007 03:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alexjaquet.gmail.com

Alexandre Jaquet a écrit :
> Hi,
>
> I would like to know wich method is called when I edit a property of a
> figure.
>
> Thanks

The SetCommand is called.
Re: method called on edit [message #138566 is a reply to message #138542] Fri, 22 June 2007 04:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alexjaquet.gmail.com

I now need to know how can I interact with the corresponding figure
after the call to the SetCommand.

Regards,
Alexandre
Re: method called on edit [message #138590 is a reply to message #138566] Fri, 22 June 2007 05:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alexjaquet.gmail.com

I doesn't explain well my needs, so let's do it, I need to retrieve wich
property a user have setted to the model object.

Then change the layout of the figure depending on the user selection.

Thanks for any hints.

Alexandre
Re: method called on edit [message #138600 is a reply to message #138590] Fri, 22 June 2007 06:35 Go to previous message
Eclipse UserFriend
Originally posted by: alexjaquet.gmail.com

I found the begining of the solution, in my edit part I've to override

protected void handleNotificationEvent(Notification notification) {
super.handleNotificationEvent(notification);
Object feature = notification.getFeature();
if (feature instanceof EAttributeImpl) {
String value = notification.getNewStringValue();
EAttributeImpl attribute = (EAttributeImpl)
notification.getFeature();
EClassifier c = attribute.basicGetEType();
c.getInstanceClassName());
if
(c.getInstanceClassName().equals("com.odcgroup.page.model.WBoxType ")) {
if (value.equals("vertical")) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setStretchMajorAxis(false);
layout.setStretchMinorAxis(false);
layout.setMinorAlignment(ConstrainedToolbarLayout.ALIGN_TOPL EFT);
getContentPane().setLayoutManager(layout);
}
}
}
}
But the layout manager is not setted correctly what's wrong with this code

Thanks for any pointers.

Alexandre
Previous Topic:Remove parent EditPart from child editPart
Next Topic:links on multiple reference reference
Goto Forum:
  


Current Time: Mon Apr 28 02:27:40 EDT 2025

Powered by FUDForum. Page generated in 0.06264 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top