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

Bug 453781

Summary: Differentiate between bundles that provide (non-bundled) snippets and those that provide (deployable) examples.
Product: [Tools] GEF Reporter: Alexander Nyßen <nyssen>
Component: MiscAssignee: Alexander Nyßen <nyssen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 3.10.0 (Mars) M5   
Hardware: All   
OS: All   
Whiteboard:

Description Alexander Nyßen CLA 2014-12-01 11:05:27 EST
We should probably provide a clearer separation between (un-deployed) 'snippets' and (deployed) 'examples'.

For instance, the following bundles only contain snippets that can be executed standalone:
 
 - org.eclipse.gef4.cloudio.examples
 - org.eclipse.gef4.fx.examples
 - org.eclipse.gef4.fx.ui.examples

whereas the following provide (deployable, i.e. installable) examples:

 - org.eclipse.gef4.mvc.fx.ui.example
 - org.eclipse.gef4.zest.fx.ui.example
 - org.eclipse.gef4.cloudio.examples.application (not properly bundled by now, see bug #441988 for details).

The following two bundles are not as easy to categorize, as they provide snippets/examples that can be executed standalone, but are deployed as part of the examples above:

 - org.eclipse.gef4.mvc.fx.example
 - org.eclipse.gef4.zest.fx.example

Maybe we should rename those projects that provide standalone snippets to use the term 'snippets' and use examples only for deployable ones.
Comment 1 Alexander Nyßen CLA 2015-01-09 02:40:23 EST
The cloudio example has been merged into the production component as of bug #441988.

What remains is a refactoring of the other examples. In this context, we would ensure that the naming conventions (https://wiki.eclipse.org/Naming_Conventions) are properly followed as well, i.e. org.eclipse.gef4.<component-name>.examples.<something>.
Comment 2 Alexander Nyßen CLA 2015-01-09 03:51:24 EST
As there might be additional examples in the future, it makes sense to name the MVC and Zest examples and to name the bundles accordingly:

MVC Logo Example
- org.eclipse.gef4.mvc.examples.logo (org.eclipse.gef4.mvc.fx.example)
- org.eclipse.gef4.mvc.examples.logo.ui (org.eclipse.gef4.mvc.fx.ui.example)
- org.eclipse.gef4.mvc.examples.logo.web (org.eclipse.gef4.mvc.fx.example.web)

Zest Graph Example
- org.eclipse.gef4.zest.examples.graph (org.eclipse.gef4.zest.fx.example)
- org.eclipse.gef4.zest.examples.graph.ui (org.eclipse.gef4.zest.fx.ui.example)

The FX examples only bundles snippets. We may leave it as it is (i.e. provide snippets directly in the examples bundle, whereas deployed examples have their owned bundles, named after the example as "logo", "graph", etc.).
Comment 3 Alexander Nyßen CLA 2015-01-09 07:19:56 EST
> MVC Logo Example
> - org.eclipse.gef4.mvc.examples.logo (org.eclipse.gef4.mvc.fx.example)
> - org.eclipse.gef4.mvc.examples.logo.ui (org.eclipse.gef4.mvc.fx.ui.example)
> - org.eclipse.gef4.mvc.examples.logo.web
> (org.eclipse.gef4.mvc.fx.example.web)
> 
> Zest Graph Example
> - org.eclipse.gef4.zest.examples.graph (org.eclipse.gef4.zest.fx.example)
> - org.eclipse.gef4.zest.examples.graph.ui
> (org.eclipse.gef4.zest.fx.ui.example)

Applied the changes mentioned above. What remains to be done is to create dedicated branding bundles for the mvc and zest example features (up to now, the ui.bundles serve this purpose). For MVC, such a bundle does not yet exist. For Zest, the still existing org.eclipse.gef4.zest.examples bundle needs to be migrated (it currently still contains examples for the old Zest2 JFace-API).
Comment 4 Alexander Nyßen CLA 2015-01-09 07:26:11 EST
Also, org.eclipse.gef4.fx.ui.examples needs to be merged with org.eclipse.gef4.fx.examples. After this change, the policy would be as follows:

1) Each bundle (that ships examples or snippets) provides an org.eclipse.gef4.<component-name>.examples bundle, which contains snippets (unbundled, i.e. in a separate source folder) as well as branding information for an example feature (if there are deployable examples)
2) Each standalone example (that is not a simple snippet) will be deployed in an org.eclipse.gef4.<component-name>.examples.<example-name> bundle.
3) Each UI-example (including UI-integration of standalone examples) will be deployed in an org.eclipse.gef4.<component-name>.examples.<example-name>.ui bundle, which will be bundled by an example feature (which uses the org.eclipse.gef4.<component-name>.examples bundle as branding bundle).
Comment 5 Alexander Nyßen CLA 2015-01-09 08:34:24 EST
I now introduced a branding bundle (org.eclipse.gef4.mvc.examples) for the MVC examples and migrated the org.eclipse.gef4.zest.examples bundle into a pure branding bundle for the Zest examples (I deleted the zest.core/zest.jface dependent snippets within).
Comment 6 Alexander Nyßen CLA 2015-01-09 09:24:13 EST
I merged org.eclipse.gef4.fx.ui.examples and org.eclipse.gef4.fx.examples.

As this was the last remaining issue, reporting this as fixed in 3.10.0M5.
Comment 7 Alexander Nyßen CLA 2015-01-11 07:00:33 EST
As standalone examples do not work in case SWT is available on the classpath, split fx.examples into fx.examples and fx.examples.ui again. Also renamed cloudio.examples into cloudio.examples.ui, to indicate that these examples depend on swt/jface.