Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Renaming an Element in diagram
Renaming an Element in diagram [message #1047594] Tue, 23 April 2013 08:28
Philipp El is currently offline Philipp El
Messages: 14
Registered: September 2012
Junior Member
Hi,

i have two questions:

1.How can i rename an element in the diagram programatically?
Which Command have to be executed?
The Location of the view element should not change in the diagram.

2.
how can i save the elements of the diagram (view representation) and the elements of teh data model in a file?

I have tried the following steps:

Filesystem fs = ... //elements of the data model
Diagram diagram = ... //diagram elements
try {
     fs.save(new FileOutputStream(new java.io.File("outputfile.fs")), null)
    diagram.save(new FileOutputStream(new java.io.File("outputfile.fs")), null);
}
catch(...){...}



But the problem is that only the diagram elements will be saved.

Thank you very much!
Best regards,

Philipp

[Updated on: Tue, 23 April 2013 08:40]

Report message to a moderator

Previous Topic:How to create multiple figures within a single "FigureDescriptor" ?
Next Topic:Project Explorer Drag and Drop disable
Goto Forum:
  


Current Time: Fri Aug 29 10:18:48 EDT 2014

Powered by FUDForum. Page generated in 0.01689 seconds