Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Best approach for viewer creation ?
Best approach for viewer creation ? [message #166465] Tue, 01 February 2005 07:55 Go to next message
Eclipse UserFriend
Originally posted by: no.mail.please

Hi !

I made my gef editor starting from the IBM GEF Redbook. It creates the
viewer in the createPartControl method (graphicalViewer =
createGraphicalViewer(parent)) and in the createGraphicalViewer method.
It also configures and initializes the viewer in this method.

Recently I found the latest example (ShapeDiagram) and was surprised the
way the author configures and initializes its viewer : he uses
configureGraphicalViewer and initializeGraphicalViewer to do the job
(and no createPartControl).

Both work fine but which is the recommended approach ? I guess this is
the ShapeDiagram Editor's one cause it is the most recent example, isn't
it ?

--
Arnaud
Re: Best approach for viewer creation ? [message #166473 is a reply to message #166465] Tue, 01 February 2005 08:00 Go to previous message
Eclipse UserFriend
Originally posted by: no.mail.please

OK, I found the answer myself ... stupid question ! I didn't notice the
ShapeDiagram Editor extended GraphicalEditorWithFlyoutPalette, so the
"original" methods are in this class.

protected void createGraphicalViewer(Composite parent) {
GraphicalViewer viewer = new ScrollingGraphicalViewer();
viewer.createControl(parent);
setGraphicalViewer(viewer);
configureGraphicalViewer();
hookGraphicalViewer();
initializeGraphicalViewer();
}

--
Arnaud
Previous Topic:how can i split A model into business and view models
Next Topic:Connections Problem!!!!!!
Goto Forum:
  


Current Time: Fri Apr 26 04:41:25 GMT 2024

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

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

Back to the top