|Re: How I can add graphical elements to my file [message #218908 is a reply to message #218881]
||Mon, 16 February 2009 10:27
Originally posted by: cayla_sha.gmx.net|
I think you should use MindMapFactory.eINSTANCE.createTopic();
And then you need a AbstractTransactionalCommand to add the Topic
persistent to the Map. At the place where I put <thisMap> you have to
find the Map, which contains all Topics, Relations etc. This depends on
where you create the Topic.
Topic newTopic = (Topic)MindMapFactory.eINSTANCE.createTopic();
TransactionalEditingDomain editingDomain =
AbstractTransactionalCommand cmd = new
AbstractTransactionalCommand(editingDomain, "create topic", null, null)
protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
IAdaptable info) throws ExecutionException
catch (Throwable t)
I think this should work.
Brice Laurel schrieb:
> Hi list,
> I read and do this tutorial
> http://wiki.eclipse.org/index.php/GMF_Tutorial. I have the figure with 3
> topics :
> - a topic ;
> - a subtopic ;
> - another subtopic.
> Now, I want to add another topic in my figure programmatically.
> I create a plugin's project that allow me to add a figure to file
> "default.mindmap_diagram" programmatically. I think I can use the code
> MindMapFactory.eINSTANCE.create(Topic); am I wrong?
> I don't see when the link between this instruction with file
> Thanks in advance for your help.
Powered by FUDForum
. Page generated in 0.01982 seconds