Class EclipseConfigurator

All Implemented Interfaces:
Generator, ResourceProvider

The EclipseConfigurator provides the resource EclipseConfiguration. "The configuration" consists of the Eclipse configuration files for a given project. The configurator generates the following files as W3C DOM documents (for XML files) or as Properties for a given project:

  • .project,
  • .classpath,
  • .settings/org.eclipse.core.resources.prefs,
  • .settings/org.eclipse.core.runtime.prefs and
  • .settings/org.eclipse.jdt.core.prefs.

Each generated data structure can be post processed by a corresponding adapt method before being written to disk. Additional resources can be generated by the method adaptConfiguration(Runnable).

Eclipse provides project nesting, but the outer project does not define a namespace. This can lead to problems if you have multiple (sub)projects in the workspace with the same name. The configurator allows you to define an alias for the project name to avoid this problem. The alias is used as Eclipse project name in all generated files.