Thursday, December 9, 2010

Saving the workbench on exit.

This is was one big thing on my To Do list. Finally I implemented it into TutoGEF. I had two people asking about it also. So here we go. The procedure will not hurt a bit. We have to change a few things here and there in the already existing code but nothing mind blowing. We start out in MyGraphicalEditor by overriding the methods setInput() and doSave():

Sunday, January 17, 2010

Adding GEF Connections

Of course this means for us we are doing yet another extension to TutoGEF. Our goal is to visualize various interactions between our Services in our Enterprise. The Enterprise is into engineering and has therefor multiple worksteps in its project management. We will add 3 kinds of GEF Connections:
  • deliver design connection
  • deliver resources connection
  • distribute work packages connection
Those will be displayed on the screen as an arrow.  First we will create the Connection class in our model package ...


Wednesday, October 7, 2009

Using GraphicalEditorWithFlyoutPalette

I personally prefer the FlyoutPalette over the one we implemented in TutoGEF. In order to use it we have to do some minor changes to our code:
In tutogef.MyGraphicalEditor change:
public class MyGraphicalEditor extends GraphicalEditorWithPalette
to:
public class MyGraphicalEditor extends GraphicalEditorWithFlyoutPalette

Also remove the methode initializePaletteViewer() 
To get our DragSourceListener we just removed back we need to Override another methode:

@Override
protected PaletteViewerProvider createPaletteViewerProvider() {
    return new PaletteViewerProvider(getEditDomain()) {
        protected void configurePaletteViewer(PaletteViewer viewer) {
            super.configurePaletteViewer(viewer);
            viewer.addDragSourceListener(new TemplateTransferDragSourceListener(viewer))
        }
    };
}

And we are set to enjoy the new Palette!

Here is the update to TutoGEF.

Monday, October 5, 2009

TutoGEF First Extension

All future howtos presuppose Eclipse and GEF in the Version 3.5 or higher and Java 1.6 or higher.


For everyone working through the TutoGEF document and have advanced to Part 10 Property Sheet - first thing to do is adding org.eclipse.ui.views to your Required Plug-ins in your dependencies tab of your project. Only then you are able to use IPropertySource in your imports!


Friday, October 2, 2009

TutoGEF Project

Here is the promised zip containing the TutoGEF Project as described in the GEF Tutorial Document.

In order to use it:
  1. open Eclipse
  2. choose File > Import
  3. in the Import Wizard choose General > Existing Projects into Workspace
  4. use Select Archive file and browse for TutoGEF.zip
  5. Click finish and you are set to go!


    Tuesday, September 29, 2009

    GEF Basics

    In order to get started with GEF this pdf document is very helpful. It describes step by step how to create a project with the basic GEF functionalities showing screenshots of the application and all the code that is necessary. I recommend working through it before asking any questions. For those who want to save some time I will prepare a zip file containing the TutoGEF project. 


    At this point I want to thank Jean-Charles Mammana, Romain Meson and Jonathan Gramain for their work.


    Additional Resources: