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

Bug 272792

Summary: Non-conforming use of namespace org.eclipse.rwt
Product: [RT] RAP Reporter: Ralf Sternberg <rsternberg>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 1.2   
Target Milestone: 2.0 M1   
Hardware: All   
OS: All   
Whiteboard:

Description Ralf Sternberg CLA 2009-04-18 07:08:10 EDT
The namespace @org.eclipse.rwt@ does not conform with the Eclipse Naming Conventions [1] which demands that the segment following @org.eclipse.@ is the subproject name. As there is no project called "RWT", these package names should be changed to @org.eclipse.rap.rwt@.
[1] http://wiki.eclipse.org/index.php/Naming_Conventions#Java_Packages
Comment 1 RĂ¼diger Herrmann CLA 2009-09-10 08:15:38 EDT
We can't change this as it would break existing code.
In addition, the namespace was chosen to more closely align with the org.eclipse.swt packages - which also violates the naming convention, but for a good reason.
Comment 2 Ralf Sternberg CLA 2012-07-18 10:35:06 EDT
(In reply to comment #1)
> the namespace was chosen to more closely align with the
> org.eclipse.swt packages - which also violates the naming convention, but for a
> good reason.

I don't agree with this reasoning. Looking at the package names, most of the contents in these packages have nothing to do with SWT: application, branding, client, engine, lifecycle, service, etc. are all about RWT-specific (and thus RAP-specific) concepts that haven't got a counterpart in SWT. The only SWT-related packages are rwt, graphics, widgets, and theme. But even for them, I don't see a good reason to choose a non-conforming package name.

IMHO, exceptions from a rule hardly simplify matters, but a clear structure does, because it doesn't require any additional knowledge to understand it. I think a clear structure demands that all API is in the namespace of the project that provides it (org.eclipse.swt, org.eclipse.rap.rwt, ...), and even better in the namespace of the bundle that provides it. Imports will be sorted more clearly in the code and there's no doubt where a package comes from, or who should provide a missing package.

> We can't change this as it would break existing code.

The major version change to 2.0 gives us the chance to clean this up and I am determined to do so. But we should provide a migration guide for 2.0 (bug 385411).
Comment 3 Ralf Sternberg CLA 2012-07-23 06:26:30 EDT
The package org.eclipse.rwt has been renamed (including subpackages) to org.eclipse.rap.rwt in commits 48131862117c8d03f1611d1673e7ce5e11a43ce6 (internal packages) and 01da7187a68224ef205c15495e205839db00dc68.

I've started a migration guide at http://eclipse.org/rap/noteworthy/2.0/migration-guide/
Opened bug 385710 to update our documentation.