To create nodes and links from code: it' possible to have a final answer about it? [message #504116] |
Thu, 17 December 2009 10:57 |
|
Hi all,
I have posted several question in this forum, but I have got no answer; many others have posted questions about creation of semantic and graphical object from code, and there is any answer that not definitely solve the problem:
- which is the right (or best) way to do this?
- should I have to use Commands?
- should I have to use Service?
- if I have to use Commands, which kind of it I have to execute?
- why Service doesn't create semantic objects?
- ... and so on....
So, please, there is anyone who could help?
Regards,
Giovanni.
|
|
|
|
|
Re: To create nodes and links from code: it' possible to have a final answer about it? [message #505395 is a reply to message #504582] |
Wed, 30 December 2009 11:38 |
Indigo Mising name Messages: 14 Registered: August 2009 |
Junior Member |
|
|
Giovanni, I've also been frustrated about the best way to create nodes and links.
Adam, your answer is very helpful, and I agree, these are fundemental questions. I think what would be really great is a high-level overview that describes the classes in the command/request framework and their intended use. By browsing the tutorials and forums, there are lots of examples that use different approaches and and classes, such as:
DeferredCreateConnectionViewAndElementCommand
ViewAndElementDescriptor
CreateElementRequestAdapter
CreateViewAndElementRequest
CreateViewRequest
RecordingCommand
etc...
For a rookie (like me) , this stuff is very confusing (to put it mildly).
I have not be able to find anywhere (including the GMF documentation) that gives a good overview of theses classes and their use. If there is such a place, please direct me.
If you are reading this post and you have this kind of knowledge, I think it would help a lot of people and cure a lot of headaches .
Finally, I tried to bypass the entire request/command framework and have GMF do the 'hard work', with some success - if you're interested, take a look at the post entitled "An easier way to create diagram elements?"
Thanks!
|
|
|
Re: To create nodes and links from code: it' possible to have a final answer about it? [message #505400 is a reply to message #505395] |
Wed, 30 December 2009 12:00 |
|
Hi Indigo,
thanks for your solidarity
I solved my last problems using the request/command pattern, but I agree with your opinion "I think what would be really great is a high-level overview that describes the classes in the command/request framework and their intended use."
Unfortunately, this is open-source code and I think the meaning is "If you need something....do it yourself!"
Happy new year, see you
Regards,
Giovanni.
|
|
|
Powered by
FUDForum. Page generated in 0.03619 seconds