Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Development Resources/HOWTO/The Eclipse Code Namespace Policy"
(New page: Eclipse projects must carefully manage their namespaces in order to help identify the producer of components and avoid namespace collisions. Exceptions to these rules must be approved by ...) |
(→Java Package Names) |
||
Line 8: | Line 8: | ||
Where: | Where: | ||
* ''forge'' is the short name of the hosting forge, e.g. "eclipse", "locationtech", or "polarsys"; | * ''forge'' is the short name of the hosting forge, e.g. "eclipse", "locationtech", or "polarsys"; | ||
− | * ''shortname'' is the short name of the project (i.e. the last segment of the project id), e.g. "dali", "egit", "udig"; | + | * ''shortname'' is the short name of the project (i.e. the last segment of the project id), e.g. "dali", "egit", "udig"; and |
* ''component'' is project-specific | * ''component'' is project-specific | ||
− | Java package names use the "flat" or "short" project name; they should not include, for example, the name of the top-level project or any parent/container project. | + | Multiple component segments are permitted. |
+ | |||
+ | Examples: | ||
+ | * <code>org.eclipse.emf.core</code>, <code>org.eclipse.emf.edit</code>, <code>org.eclipse.emf.edit.ui</code>; | ||
+ | * <code>org.locationtech.udig.resources</code> | ||
+ | |||
+ | Java package names use the "flat" or "short" project name in the third segment; they should not include, for example, the name of the top-level project or any parent/container project. | ||
* e.g. <code>org.eclipse.graphiti.core</code>, not <strike><code>org.eclipse.modeling.mdt.graphiti.core</code></strike> or <strike><code>org.eclipse.mdt.graphiti.core</code></strike>. | * e.g. <code>org.eclipse.graphiti.core</code>, not <strike><code>org.eclipse.modeling.mdt.graphiti.core</code></strike> or <strike><code>org.eclipse.mdt.graphiti.core</code></strike>. | ||
Revision as of 17:07, 23 July 2013
Eclipse projects must carefully manage their namespaces in order to help identify the producer of components and avoid namespace collisions.
Exceptions to these rules must be approved by the Project Management Committee and the EMO(ED).
Java Package Names
Java package names take the following form:
org.<forge>.<shortname>.<component>.*
Where:
- forge is the short name of the hosting forge, e.g. "eclipse", "locationtech", or "polarsys";
- shortname is the short name of the project (i.e. the last segment of the project id), e.g. "dali", "egit", "udig"; and
- component is project-specific
Multiple component segments are permitted.
Examples:
-
org.eclipse.emf.core
,org.eclipse.emf.edit
,org.eclipse.emf.edit.ui
; -
org.locationtech.udig.resources
Java package names use the "flat" or "short" project name in the third segment; they should not include, for example, the name of the top-level project or any parent/container project.
- e.g.
org.eclipse.graphiti.core
, notororg.eclipse.modeling.mdt.graphiti.core
.org.eclipse.mdt.graphiti.core
OSGi Bundle Names
OSGi Bundle names follow the same rules as Java Package Names.