[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] Re: How can I get the Diagram from Diagram file without opening it?

Hello,

No, you shouldn't see the diagram in the shell. This method allows you to create a DiagramEditPart without creating an editor. You could then use the DiagramEditPart for whatever reason you needed it. For example, GMF uses this mechanism to create an image from a diagram (see CopyToImageUtil.copyToImage()).

Regards,
Cherie

dzh wrote:
Thank you for your quick answer:)
The code works well without reporting error, but I can not see anything from
the shell shows up....So I suspect if I did right?
If there any example of using copyToImageUtil ? If rightly created, the diagram should show up in the shell?


I use the diagramEditPart which is returned by copyToImageUtil.createDiagramEditPart method to get the commands to create
view on it, and I use resource.save(Collections.EMPTY_MAP) to save, but after reopen the diagram file, I found nothing changed.


Best reagrds,
dzh

"Alex Shatalin" <vano@xxxxxxxxxxx> дÈëÏûÏ¢ÐÂÎÅ:cd695fb3116688c8a1538267a876@xxxxxxxxxxxxxxxxxxx
Hello dzh,

use editor.doSave(), but it is Ddiagram, how to save it back to its
diagramfile.
 call resource.save(Collections.EMPTY_MAP); for the diagram file resource.

-----------------
Alex Shatalin