Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Why DiagramPrinter does not take existing DiagramEditPart instance?
Why DiagramPrinter does not take existing DiagramEditPart instance? [message #162149] Thu, 22 November 2007 15:19 Go to next message
Eclipse UserFriend
Hi,

When printing a diagram, DiagramPrinter calls PrinterHelper to create a
new DiagramEditPart. This is good for headless mode without opening an
editor. However, if editor does open already, why DiagramPrinter can not
simply take existing DiagramEditPart from the editor ? To me, creating a
new DiagramEditPart, its children EditParts and Figures adds lots of
overhead. More than that,the states set in existing editPart instances in
editor will be lost in the newly created editparts for printing.
I want to extend DiagramPrinter to take existing DiagramEditPart if it
exists but DiagramPrinter is internal. I am also afraid GMF runtime does
this way ( create new editparts ) with specific reason.
Any explanation for this will be appreciated.

Li
Re: Why DiagramPrinter does not take existing DiagramEditPart instance? [message #162425 is a reply to message #162149] Fri, 23 November 2007 13:25 Go to previous messageGo to next message
Eclipse UserFriend
Li,

DiagramPrinter was changed in September (in 2.1) to use the open diagram
editor if one exists for the reason you stated. See
https://bugs.eclipse.org/bugs/show_bug.cgi?id=160731.

- Cherie

Li Ding wrote:
> Hi,
>
> When printing a diagram, DiagramPrinter calls PrinterHelper to create a
> new DiagramEditPart. This is good for headless mode without opening an
> editor. However, if editor does open already, why DiagramPrinter can
> not simply take existing DiagramEditPart from the editor ? To me,
> creating a new DiagramEditPart, its children EditParts and Figures adds
> lots of overhead. More than that,the states set in existing editPart
> instances in editor will be lost in the newly created editparts for
> printing.
> I want to extend DiagramPrinter to take existing DiagramEditPart if it
> exists but DiagramPrinter is internal. I am also afraid GMF runtime does
> this way ( create new editparts ) with specific reason.
> Any explanation for this will be appreciated.
>
> Li
>
Re: Why DiagramPrinter does not take existing DiagramEditPart instance? [message #162488 is a reply to message #162425] Fri, 23 November 2007 14:59 Go to previous message
Eclipse UserFriend
Thanks Cherie. I should alway look the latest code :-)

Li
Previous Topic:Visbility of nodes and their children
Next Topic:Is it possible to map one domain model to different canvas?
Goto Forum:
  


Current Time: Sat Jul 19 05:26:30 EDT 2025

Powered by FUDForum. Page generated in 0.04586 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top