Modify diagram dynamically. [message #554940] |
Tue, 24 August 2010 20:21 |
|
Hello:
First to all, thanks you for your help.
I need modify the visual diagram dinamically. When the user throw a link from a object to other object, I need generate other links to some others object, impacting it in the model of my metamodel. (like if the user throw this generated links manually).
Is there some way for do it using Epsilon or I need modify the source code?
In the case I need modify the source code. Is possible get some documentation about the code automatic generated?
Thanks you.
Jose Miguel.
|
|
|
Re: Modify diagram dynamically. [message #554946 is a reply to message #554940] |
Tue, 24 August 2010 20:53 |
Louis Rose Messages: 440 Registered: July 2009 Location: York, United Kingdom |
Senior Member |
|
|
Hi Jose Miguel,
Thanks for using Epsilon, and for the feedback!
Jose Miguel wrote on Tue, 24 August 2010 16:21 | I need modify the visual diagram dinamically. When the user throw a link from a object to other object, I need generate other links to some others object, impacting it in the model of my metamodel. (like if the user throw this generated links manually).
|
I'm guessing that you're using EuGENia to generate the visual editor...
Do the links need to be added while the model is being changed in the visual editor? Or could they be added later, after the model has been saved?
Quote: | Is there some way for do it using Epsilon or I need modify the source code?
In the case I need modify the source code. Is possible get some documentation about the code automatic generated?
|
If the links are to be added while the model is being changed with visual editor, I think the best approach is to modify the generated source code...
In the generated .diagram project, there will be some EditPart classes in the your.project.diagram.edit.parts package. If I recall correctly, the handleNotificationEvent(Notification event) method can be used to react to changes to the model. The GMF documentation might provide some tips on how best to achieve the automatic addition of links.
Cheers,
Louis.
|
|
|
Re: Modify diagram dynamically. [message #555123 is a reply to message #554946] |
Wed, 25 August 2010 13:55 |
|
Hi Louis!!
Yes, of course, I'm using EuGENia for generate the visual editor It's really fantastic.
Adding while the model is being changed in the visual editor is the ideally, but I don't discard add this links when the model is saved if the other form is very complicated for to do.
I have checked and in the method handleNotificationEvent(Notification event) come a event when this element is created, modified or removed. I will have a look more about it. Thanks you
Only one more question. In the case I want add this links when the model is saved. How can I do it? If I use EOL I will modify the model but this changes will not impact to the editor. Am I right?
Thanks you very much for your time
|
|
|
Re: Modify diagram dynamically. [message #555402 is a reply to message #555123] |
Thu, 26 August 2010 13:59 |
Louis Rose Messages: 440 Registered: July 2009 Location: York, United Kingdom |
Senior Member |
|
|
Jose Miguel wrote on Wed, 25 August 2010 09:55 | Yes, of course, I'm using EuGENia for generate the visual editor It's really fantastic.
|
Thanks for the positive feedback. It's always motivating to hear!
Quote: | Adding while the model is being changed in the visual editor is the ideally, but I don't discard add this links when the model is saved if the other form is very complicated for to do.
I have checked and in the method handleNotificationEvent(Notification event) come a event when this element is created, modified or removed. I will have a look more about it. Thanks you
|
Great. Yes, this is the approach I would use to add the links while the model is edited. The Notification object should give plenty of information about the type of event that has occurred.
Quote: | Only one more question. In the case I want add this links when the model is saved. How can I do it? If I use EOL I will modify the model but this changes will not impact to the editor. Am I right?
|
I'm guessing, but I think there is a save() or a doSave() method that could be extended to run some EOL code. Propagating the changes back to the editor is tricky. Perhaps calling resolveSemanticElement() would be enough? I think this might be a question to ask on the GMF forum.
Quote: | Thanks you very much for your time
|
You're welcome. Thanks for using Epsilon!
Cheers,
Louis.
|
|
|
|
Re: Modify diagram dynamically. [message #593214 is a reply to message #555123] |
Thu, 26 August 2010 14:00 |
Louis Rose Messages: 440 Registered: July 2009 Location: York, United Kingdom |
Senior Member |
|
|
Jose Miguel wrote on Wed, 25 August 2010 09:55
> Yes, of course, I'm using EuGENia for generate the visual editor ;) It's really fantastic.
Thanks for the positive feedback. It's always motivating to hear!
Quote:
> Adding while the model is being changed in the visual editor is the ideally, but I don't discard add this links when the model is saved if the other form is very complicated for to do.
>
> I have checked and in the method handleNotificationEvent(Notification event) come a event when this element is created, modified or removed. I will have a look more about it. Thanks you ;)
Great. Yes, this is the approach I would use to add the links while the model is edited. The Notification object should give plenty of information about the type of event that has occurred.
Quote:
> Only one more question. In the case I want add this links when the model is saved. How can I do it? If I use EOL I will modify the model but this changes will not impact to the editor. Am I right?
I'm guessing, but I think there is a save() or a doSave() method that could be extended to run some EOL code. Propagating the changes back to the editor is tricky. Perhaps calling resolveSemanticElement() would be enough? I think this might be a question to ask on the GMF forum.
Quote:
> Thanks you very much for your time ;)
You're welcome. Thanks for using Epsilon!
Cheers,
Louis.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03464 seconds