Skip to main content



      Home
Home » Eclipse Projects » GEF » Hello Gef #1 : a first tutorial example (comments welcome)
Hello Gef #1 : a first tutorial example (comments welcome) [message #24990] Mon, 07 October 2002 11:45 Go to next message
Eclipse UserFriend
Well, thanks to Randy's answers, I was able to complete my first goal: write
a minimal GEF example with the following specifications:

- Open a GEF-based graph editor from a given extension (no special New...
menu to leave out Eclipse's details)
- Display a fixed number of graphical nodes, using a simple shape like a
rectangle
- Allow moving the nodes at any location in the editor window using drag &
drop
- If it is not adding too much code, also allow resizing the nodes
- The model behing the editor need not to be saved (it's just an example)

I was planing to have a minimal code that would not need org.gef.commands
package at all, but I failed so there is one command -maybe the good neews
is that having undo/redo will be very cheap (see next example iteration
later!).

My goals are:
- to help people new to GEF to get started by sharing what is learned with
this newsgroup and from the much more complex Logical Diagram Editor
example.
- Get some feedbacks on my sample: if you find a more simple way to do
things, or find a bug, please post feedback in this newsgroup!


My sample is in the attached ZIP file. To install it, you need Eclipse 2.0.1
with latest GEF (I have build 20020821). It may work with Eclipse 2.0, but
not with earlier GEF releases beacause of the refactoring of
com.ibm.etools.gef into org.eclipse.eg...

Use File / Import / Existing project into workspace => select the root
directorty where you unziped the archive.
Click on the HelloGef1 node in any perspective you have opened,
Use Project / Rebuild project
Use Run / Run As / Runtime workbench

=> this will open a new Eclipse workbench windows.
In this new Eclipse windows, use the File / New / Project, select Simple /
Project and call it 'Foobar' (or whatever name) to create an empty project
called 'FooBar'
Select 'FooBar' in the Resource perspective,
Right-click and select New / File => call the new file "foobar.gefhello1"
Double-click on the new file => you should have a new editor window called
"Hello GEF 1 Editor" and five colored rectangles.

=> you can now play with this editor : select one or more rectangle and try
to move or resize it. Do not worry moving
out of the limits of the editor window: the scrollbars will allow to reach
any node... (thanks to the FreeForm* classes).



Re: Hello Gef #1 : a first tutorial example (comments welcome) [message #25364 is a reply to message #24990] Mon, 07 October 2002 22:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: not_real_email.somewhere.com

Thanks for sharing with us. But how to extract the file. I am seeing a
block of text like the following. How to convert it to a binary file?

Re: Hello Gef #1 : a first tutorial example (comments welcome) [message #25446 is a reply to message #25364] Tue, 08 October 2002 04:53 Go to previous message
Eclipse UserFriend
May be your newsreader configuration failed to properly extract the
attachement.
Anyway, I have posted my example to Eclipse Wiki WEB site; the example
can be downloaded from this page:

http://eclipsewiki.swiki.net/50#hellogef1

If the above URL is not working, try going to http://eclipsewiki.swiki.net,
in GEF / Examples section.


Feedbacks welcome!
Previous Topic:Marquee in GEF
Next Topic:Shouldn't getDragTracker() return always the same instance of a DragTracker?
Goto Forum:
  


Current Time: Wed Jul 16 08:04:11 EDT 2025

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

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

Back to the top