Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 140557

Summary: GEF Examples are inconsistent with other project example wizards
Product: [Tools] GEF Reporter: Steven R. Shaw <steveshaw>
Component: GEF-Legacy GEF (MVC)Assignee: Anthony Hunter <ahunter.eclipse>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P2 CC: ahunter.eclipse, crevells, david_williams, erich_gamma, fplante, hudsonr, steven.wasleski
Version: unspecified   
Target Milestone: 3.3.0 (Europa)   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed patch for all gef examples
none
Patch for GEF Flow example that provides the description for it in the new wizard dialog.
none
Patch for GEF Shapes example that provides the description for it in the new wizard dialog.
none
This is a GEF (unzipper) PDE project.
none
Patch that takes care of the rest of the GEF naming issues.
none
Updated GEF unzipper project.
none
Updated patch that takes care of the naming issues in gef example projects + updates releng and gef-feature projects none

Description Steven R. Shaw CLA 2006-05-08 09:20:33 EDT
1. GEF examples are currently deployed as part of the SDK and pollute the development environment, they should be installable from the SDK instead like we do in EMFT
2. GEF "Flow Diagram" and "Shapes Diagram" don't have any text description when selected in the wizard

Propose (from Fred Plante):
- One issue in the "File > New" dialog is that we are not consistent wrt. where we put our example plug-ins and how we name them: 
I propose we name the categories containing our "unzipper" examples: "File > New > Examples > <project-name> Plug-ins" e.g. "File > New > Examples > GEF Plug-ins"
- GEF's "Examples > GEF (Graphical Editing Framework)" category may be too general and confused with the proposed new "Examples > GEF Plug-ins" category
Proposal:
Rename to "GEF Documents" and keep in "Examples" category
Comment 1 Randy Hudson CLA 2006-05-08 09:27:29 EDT
Examples have never been included in the GEF SDK.
Comment 2 Syed Atif CLA 2006-05-10 17:47:48 EDT
Created attachment 41057 [details]
Proposed patch for all gef examples

I changed the category from  "GEF (Graphical Editing Framework)" to "GEF Plugins". Though I think that "GEF (Graphical Editing Framework)" was not really confusing.
Comment 3 Steven R. Shaw CLA 2006-05-11 08:32:43 EDT
I don't think the category name should be changed to "GEF Plugins".  This is a proposed new category that would create the GEF examples in the users workspace.  I would suggest just leaving the examples named the way they are currently.
Comment 4 Syed Atif CLA 2006-05-11 13:46:51 EDT
Created attachment 41166 [details]
Patch for GEF Flow example that provides the description for it in the new wizard dialog.
Comment 5 Syed Atif CLA 2006-05-11 13:48:16 EDT
Created attachment 41167 [details]
Patch for GEF Shapes example that provides the description for it in the new wizard dialog.
Comment 6 Steven R. Shaw CLA 2006-05-12 10:56:52 EDT
Here is what is being proposed by Fred for GMF:

We have to make a distinction between the plug-ins implementing the examples, and where these plug-ins, when executed, put their New Wizard. The convention I am trying to set is that the former are in "File > New > Examples > <Project> Plug-in", and the latter are somewhere else.

How about the following?

GMF (Graphical Modeling Framework) Plug-ins
	Geoshape
	Logic
	Review Decorator
	Service
	Square Layout


The logic and geoshape example code should create their new wizard in a category named "GMF (Graphical Modeling Framework) Diagrams":

GMF (Graphical Modeling Framework) Diagrams
	Geoshape
	Logic
Comment 7 Steven R. Shaw CLA 2006-05-16 08:55:06 EDT
Moving to RC4
Comment 8 Syed Atif CLA 2006-05-30 17:50:34 EDT
Created attachment 43028 [details]
This is a GEF (unzipper) PDE project.

This project is just like the org.eclipse.gmf.examples.runtime.ui.pde project: it gathers all the zip file sources and creates plugin projects, under the category "Examples/GEF (Graphical Editing Framework) Plug-ins", that can be extracted into the workspace.
Comment 9 Syed Atif CLA 2006-05-30 17:54:56 EDT
Created attachment 43030 [details]
Patch that takes care of the rest of the GEF naming issues.

1. provides descriptions for flow and shapes diagram plugin projects
2. Changes the name from "GEF (Graphical Editing Framework)" to "GEF (Graphical Editing Framework) Diagrams"
3. Provides a buildZip.xml file in each project to zip the examples into a zip file to be collected by the GEF (unzipper) PDE project given above.

(GMF diagram examples have already been renamed...see Bug 143723)
Comment 10 Syed Atif CLA 2006-06-07 17:06:00 EDT
Created attachment 43797 [details]
Updated GEF unzipper project.

This updated project introduces a modified gatherExamples.xml build script that builds zip files itself. This means no more placing buildZip.xml in each example project. I have also added an ant builder that will build the zips and gather icons from the other example projects whenever this project is built.

Make sure you also download the updated patch below.
Comment 11 Syed Atif CLA 2006-06-07 17:07:24 EDT
Created attachment 43798 [details]
Updated patch that takes care of the naming issues in gef example projects + updates releng and gef-feature projects
Comment 12 Steven R. Shaw CLA 2006-06-12 10:53:54 EDT
One comment:
When creating a new example plug-in, the title in the wizard when choosing the project name reads: (i.e. for EDiagram) "Modeling EDiagram Plug-in Project Creation".

Should read "GEF EDiagram Plug-in Project Creation".

Since there are translatable strings included in this patch, we should wait until 3.2.1 before releasing this patch.  Changed target milestone accordingly.
Comment 13 Anthony Hunter CLA 2006-09-12 14:10:53 EDT
The IBM team has requested this for 3.2.1 so that all the examples are consistent in Callisto.
Comment 14 Anthony Hunter CLA 2006-09-12 14:14:47 EDT
Created the new plug-in org.eclipse.gef.examples.ui.pde and added to the SDK.

This plug-in works exactly like GMF.

The examples in the SDK now match that of GMF, EMF, EMFT, etc.
Comment 15 Randy Hudson CLA 2006-09-13 10:58:34 EDT
What is the project:
org.eclipse.gef.examples.ui.pde?
Comment 16 Anthony Hunter CLA 2006-09-13 11:33:49 EDT
org.eclipse.gef.examples.ui.pde contains the zipped examples (logic, flow, etc) and wizard to unzip the projects into a developers workspace.
Comment 17 Randy Hudson CLA 2006-09-13 12:54:46 EDT
> org.eclipse.gef.examples.ui.pde contains the zipped examples (logic, flow, etc)
> and wizard to unzip the projects into a developers workspace.

GEF has always followed the patterns established by the Eclipse Platform as best we could. When I download the Eclipse SDK Examples (at least in 3.2.0), I don't see anything that resembles this. Why is there suddenly a need to do things differently from the past, and also differently from the Platform Examples? And an even better question: why reinvent the wheel? This is not a problem looking for a solution. If a GEF developer wants the Logic example loaded into his workspace, all he must do is invoke the PDE import wizard. Furthermore, the existing mechanism works for every example, and even for plugins that make up the SDK runtime.
Comment 18 Frederic Plante CLA 2006-09-13 13:15:00 EDT
This is targetting product extensibility users. Product don't ship with examples as part of the development environment since we don't want to "pollute" users workbench with examples. The only way for them to access an example is to download it from eclipse.org - we want to make it more easy since many customers don't even know what Eclipse is about.

A simple efficient solution we used in 4 EMFT project, in GMF and eventually in EMF and JET, is to bundle with the SDK a plug-in whose sole purpose is to install example source within the workspace. This solution is also used in commercial products built on top of Eclipse.

We are not reinventing the wheel, we are just making it rounder ;-)
Comment 19 Steven Wasleski CLA 2006-09-13 13:57:13 EDT
I am just starting to read through this issue and am not ready to comment on the value of the feature, but one thing that is immediately clear is that this is new function with new strings and is therefore out of bounds for a maintenance release.  This work really has to be deferred to a functional release.

If a consumer of GEF needs this sort of capability, that consumer could of course add it in their plugins.  To put it in GEF at this time, however, would be wrong.  One very bad thing I can see here is that a new dependency is being added from the GEF SDK higher up the platform stack (IDE rather than RCP).  The ramifications of this for all GEF consumers is unpredictable.  This would be a bad risk to take in a maintenance release that MUST maintain compatibility.
Comment 20 Steven Wasleski CLA 2006-09-13 14:05:19 EDT
I may have been wrong about the prereq taking things up from RCP to IDE, however the rest of comment 19 is correct.  I am still trying to fully understand the latest patch in here.  In any event, a significant new dependency change seems odd for a maintenance release and new function is certainly wrong.
Comment 21 Anthony Hunter CLA 2006-09-15 14:09:50 EDT
New plug-in cannot go in a maintenance release.
Comment 22 Randy Hudson CLA 2006-10-09 09:37:17 EDT
Anthony, could you please resolve this bug as INVALID or REMIND (and depending on a platform enhancement)? The eclipse community should be working towards a common solution, not several independant (possibly better, but definitely different) approaches.

GEF is aligned with the platform on definitions of SDK, Example features, and packaging of those examples. GEF should stay aligned until a new common approach has been agreed upon.
Comment 23 Randy Hudson CLA 2007-01-09 14:08:19 EST
I see this new plug-in has been slipped into the SDK zips for the 3.3 releases. I would like to state once again that it is undesirable for the SDK to pollute the UI with examples when a developer only wants to have the source code available for GEF. It is also possible that products currently ship the SDK under the assumption that it doesn't add any UI contributions (other than ISV help doc).

(In reply to comment #18)
> This is targetting product extensibility users. Product don't ship with
> examples as part of the development environment since we don't want to
> "pollute" users workbench with examples.

So, wouldn't the solution be for the product to simply ship the examples feature? I did't understand the logic: Product X is shipping the GEF SDK feature, Product X wants the GEF examples (available in the Examples feature); therefore, we should move/copy the examples into the SDK? Can't Product X just ship the Examples Feature and the SDK feature together? This solves the Product X's problem without changing the packaging for every other consumer.

The new plug-in (org.eclipse.gef.examples.ui.pde), despite duplicating PDE function, does solve a problem, but I think it should packaged in the examples feature, not the SDK. BTW, currently it is not included in *any* feature, it is only part of a ZIP file. My guess is that it would fail to work properly via the update site, and this (loose/orphan plug-in) probably doesn't conform to some guideline hiding somewhere in the far reaches of the eclipse wiki.
Comment 24 Anthony Hunter CLA 2007-03-21 07:43:13 EDT
Already delivered to 3.3