|guidance on creating Resource set and diagram creation [message #778814]
||Fri, 13 January 2012 22:10
| Josef Pohl
Registered: January 2012
Hi there, |
Well, I found out why my connections were not working yesterday. And it raised an issue that I have been wondering about, namely how to go about creating a resource set that I can add domain objects into. And as an extension how to go about extending the system with contextual features such as "save model to file". I realize that the latter has more to do with plugin-development than Graphiti, but if anyone has any pointers I would be greatly obliged. (Sorry, I am a theory guy who has been thrust into a developer role. Sad... I know. Hence why I don't know anything useful.)
So I revised my model a bit yesterday and came up with a better solution, I think.
Now I have a root element Argument, along with a Node (and Goal, Strategy, ... that inherit from it) and a Link (along with some children as well to represent the different types of references.)
What I would like to do is set Argument as the root node and be able to add in all nodes and links underneath this.
From my perusing the questions and answers there are two ways of going about this.
1. Check, when the first node is added (in Create...Feature) to the diagram, if the resource set is created and the Argument domain element has been created and linked to the diagram. If not do so.
2. Do this when the diagram is first being created.
The second sounds a bit more promising.
So I guess, here is my question, what structure(s) (infrastructure) do I need to have in place so when I implement a createDiagram function it is called whenever a new diagram is opened? And make it so the resource set can be referenced throughout the application? How do I override the default create diagram behavior?
As an extension to that, where would I implement something like SaveEMFModel()? Implementing seems straightforward enough (from the previous questions). I am just not sure of the infrastructure necessary to see that this feature is available.
Thanks, sorry for being long winded.
Powered by FUDForum
. Page generated in 0.01567 seconds