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

Bug 440992

Summary: GEF4 DOT contains naming inconsistencies (package names, grammar, language registration)
Product: [Tools] GEF Reporter: Alexander Nyßen <nyssen>
Component: GEF DOTAssignee: gef-inbox <gef-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: steeg
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Alexander Nyßen CLA 2014-08-01 09:49:56 EDT
The naming of the internal packages within GEF4 DOT seems to be inconsistent. The org.eclipse.gef4.dot bundle contains package names like org.eclipse.gef4.dot.internal.dot.parser.dot.*, which seems to be quite inconsistent. 

Grammar name and generate statement (within the grammar) are as follows:

- grammar org.eclipse.gef4.dot.internal.dot.parser.Dot 
- generate dot "http://www.eclipse.org/gef4/graph/internal/dot/parser/Dot"

I think this should rather be something like:

- grammar org.eclipse.gef4.dot.internal.parser.Dot
- generate dot "http://www.eclipse.org/gef4/dot/internal/parser/Dot

or:

- grammar org.eclipse.gef4.dot.internal.Dot
- generate dot "http://www.eclipse.org/gef4/dot/internal/Dot

Furthermore, the language registration within plugin.xml is not consistent either. It refers to a wrong package.

We should fix these issues before investigating bug #440986
Comment 1 Fabian Steeg CLA 2014-08-01 18:43:32 EDT
I checked the naming convention and I was using the 'internal' segment the wrong way, it should be 'org.eclipse.gef4.internal.dot.*'. See: https://wiki.eclipse.org/Naming_Conventions#Java_Packages

I've refactored the package name and fixed the naming inconsistencies in Dot.xtext and plugin.xml for the new namespace: http://git.eclipse.org/c/gef/org.eclipse.gef4.git/commit/?id=ba20fe8679cbcb
Comment 2 Alexander Nyßen CLA 2014-08-02 03:29:30 EDT
(In reply to Fabian Steeg from comment #1)
> I checked the naming convention and I was using the 'internal' segment the
> wrong way, it should be 'org.eclipse.gef4.internal.dot.*'. See:
> https://wiki.eclipse.org/Naming_Conventions#Java_Packages
> 
> I've refactored the package name and fixed the naming inconsistencies in
> Dot.xtext and plugin.xml for the new namespace:
> http://git.eclipse.org/c/gef/org.eclipse.gef4.git/commit/?id=ba20fe8679cbcb

Looks a lot cleaner now! Hmm, I now also took another look into the naming conventions. Does that mean we would also have to rethink the naming of our tests and examples bundles (or does that only refer to package naming within production components?)
Comment 3 Fabian Steeg CLA 2014-08-03 16:58:20 EDT
> Does that mean we would also have to rethink the naming of our
> tests and examples bundles (or does that only refer to package naming within
> production components?)

From the linked wiki page it sounds like it's the same for tests and examples. In the case of internal I think it really makes sense: it's the gef4.internal API, not each component's internal API. Tests and examples however make more sense to me as part of their component. So I think I prefer the current names.