Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [gef-dev] Possible to use GEF outside of Eclipse?


Please ask on the newsgroup. While GEF can work with just RCP, that doesn't mean the examples do. Someone has created a modified shapes example for RCP. Search the newsgroup for more info.

-Randy



Jon Schewe <jon.schewe@xxxxxxxxxxxxx>
Sent by: gef-dev-bounces@xxxxxxxxxxx

12/22/2005 02:04 PM

Please respond to
GEF development

To
Randy Hudson/Raleigh/IBM@IBMUS
cc
GEF development <gef-dev@xxxxxxxxxxx>
Subject
Re: [gef-dev] Possible to use GEF outside of Eclipse?





Can you point me at some documentation on how to do this?  I've successfully got the RCP templates from Eclipse 3.1 working, however I don't know how to get the GEF plugins to run from there.  I'd like to bring up the shapes diagram example inside an RCP application.  How would one go about getting everything setup properly?

Thanks for any help you can provide.

On Fri, 2005-12-16 at 10:48 -0500, Randy Hudson wrote:


This is not supported. GEF is a UI framework, and there is enough benefit from leveraging the workbench that we require its presence.  You'll have to consider RCP, or make the modifications yourself.


-Randy



Jon Schewe <jon.schewe@xxxxxxxxxxxxx>
Sent by: gef-dev-bounces@xxxxxxxxxxx


12/15/2005 03:59 PM

Please respond to


GEF development




To
gef-dev@xxxxxxxxxxx
cc
Subject
[gef-dev] Possible to use GEF outside of Eclipse?








I would like to use GEF in my non-eclipse application and am having a really difficult time finding documentation on how to properly initialize things.  I found the standalone logic design example, however it's for an earlier version of GEF and doesn't work.  Currently my setup code looks like this (I'm starting with the shape editor).  The problem seems to be when I try and create a PaletteViewer.


private static void setupApp(final Canvas c) {


  // model
  final ShapesDiagram model = new ShapesDiagram();
  model.addChild(new EllipticalShape());
  model.addChild(new RectangularShape());
 
  // editparts
  final EditPartFactory editPartFactory = new ShapesEditPartFactory();
  final EditPart topEditPart = editPartFactory.createEditPart(null, model);
  topEditPart.setModel(model);
 
  // edit area                                  
  final ShapesEditor editor = new ShapesEditor();
 
  //editor.init(site);
 
  final Canvas editorCanvas = new Canvas(c, SWT.NONE);
  final GridData gd2 = new GridData();
  editorCanvas.setLayoutData(gd2);
  gd2.heightHint = c.getClientArea().height;
  gd2.widthHint = c.getClientArea().width-200;



  //final EditorSite site = new EditorSite(editorReference, editor, manager.page, descr);
  //part.init(site);
 
  //editor.createPartControl(editorCanvas);


 
  //gvi.setControl(editorCanvas);
  //gvi.setContents(ldep);


  // edit domain
  final EditDomain editDomain = editor.getEditDomain();

  // palette
  final PaletteRoot paletteRoot = ShapesEditorPaletteFactory.createPalette();
  editDomain.setPaletteRoot(paletteRoot);


  final Canvas palette = new Canvas(c, SWT.NONE);
  final GridData gd3 = new GridData();
  gd3.heightHint = c.getClientArea().height;
  gd3.widthHint = 200;
  palette.setLayoutData(gd3);
  //new GEFPlugin(); // do this to initialize preferences that the PaletteViewer constructor relies upon
//     System.out.println(GEFPlugin.getDefault().getBundle());
  final PaletteViewer pvi = new PaletteViewer();
  pvi.setControl(palette);
  editDomain.setPaletteViewer(pvi);
 
  //final GraphicalViewer gvi = editor.getGraphicalViewer();
  final GraphicalViewer gvi = new GraphicalViewerImpl();
  gvi.setEditPartFactory(editPartFactory);
  gvi.setRootEditPart(new ScalableFreeformRootEditPart());
  gvi.setControl(editorCanvas);
  gvi.setEditDomain(editDomain);
  gvi.setContents(topEditPart);
 
  //editor.configureGraphicalViewer();
  //editor.initializeGraphicalViewer();
 
}




http://lug.htc.honeywell.com/people/jschewe[Honeywell Intranet Only]
*My views may not represent those of my employers


_______________________________________________
gef-dev mailing list
gef-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/gef-dev



_______________________________________________
gef-dev mailing list
gef-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/gef-dev


http://lug.htc.honeywell.com/people/jschewe [Honeywell Intranet Only]
*My views may not represent those of my employers

_______________________________________________
gef-dev mailing list
gef-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/gef-dev


Back to the top