Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Modify diagram dynamically.
Modify diagram dynamically. [message #554940] Tue, 24 August 2010 20:21 Go to next message
José Miguel P. is currently offline José Miguel P.Friend
Messages: 66
Registered: March 2010
Member

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 Go to previous messageGo to next message
Louis Rose is currently offline Louis RoseFriend
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 Go to previous messageGo to next message
José Miguel P. is currently offline José Miguel P.Friend
Messages: 66
Registered: March 2010
Member

Hi Louis!!

Yes, of course, I'm using EuGENia for generate the visual editor Wink 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 Wink

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 Wink
Re: Modify diagram dynamically. [message #555402 is a reply to message #555123] Thu, 26 August 2010 13:59 Go to previous messageGo to next message
Louis Rose is currently offline Louis RoseFriend
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 Wink 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 Wink


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 Wink


You're welcome. Thanks for using Epsilon!

Cheers,
Louis.
Re: Modify diagram dynamically. [message #555603 is a reply to message #555402] Fri, 27 August 2010 09:54 Go to previous messageGo to next message
José Miguel P. is currently offline José Miguel P.Friend
Messages: 66
Registered: March 2010
Member

Thanks you very much Luis.

I will try doing it.

Thanks again Wink
Re: Modify diagram dynamically. [message #593214 is a reply to message #555123] Thu, 26 August 2010 14:00 Go to previous messageGo to next message
Louis Rose is currently offline Louis RoseFriend
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 #593262 is a reply to message #593214] Fri, 27 August 2010 09:54 Go to previous message
José Miguel P. is currently offline José Miguel P.Friend
Messages: 66
Registered: March 2010
Member

Thanks you very much Luis.

I will try doing it.

Thanks again ;)
Previous Topic:[HUTN] Object names/identities
Next Topic:Generate EMF GenModel not working for providerType
Goto Forum:
  


Current Time: Fri Apr 19 22:43:01 GMT 2024

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

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

Back to the top