|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.schmant.project.eclipse.EclipseWorkspaceInfoCollector
public class EclipseWorkspaceInfoCollector
This is the default ProjectRepositoryInfoCollector
used by
EclipseWorkspace
. It scans for Eclipse workspace configuration files
in the .metadata
directory and for project configuration files in
all other directories under the workspace root directory and in directories
supplied separately in an EclipseWorkspaceSettings
object, if any. It
creates creates Project
objects for all projects found.
The following workspace configuration files are parsed (paths relative to
.metadata
:
.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs
The following files are parsed in each project:
.project
(required).settings/org.eclipse.jdt.core.prefs
(optional)
This object uses EclipseProjectCreatorPlugin
:s registered in the
PluginRegistry
for creating Project
objects. By registering
new plugins, this object can be made to create new kinds of Project
objects for new project types.
This class can be also extended by inheritance to give it knowledge about new project types, etc. However, plugins is the preferred extension method.
Constructor Summary | |
---|---|
EclipseWorkspaceInfoCollector(Object wosDir,
EclipseWorkspaceSettings settings)
Create an Eclipse workspace information collector for the workspace in the provided directory. |
Method Summary | |
---|---|
ProjectRepositoryInfo<EclipseWorkspaceConfiguration> |
collect(EclipseWorkspace wos)
Collect information for the workspace and return an object containing the parsed information. |
protected Project |
createEclipseProject(EclipseWorkspace wos,
DirectoryView projDir,
EclipseWorkspaceConfiguration parsedSettings,
Report r)
Create an Eclipse project from the contents in a project directory. |
protected EntityRepository |
getWorkspaceDir()
Get the workspace directory. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EclipseWorkspaceInfoCollector(Object wosDir, EclipseWorkspaceSettings settings)
wosDir
- The workspace directory. Interpreted with
InterpretAsReadOnlyDirectoryStrategy
. (Any
filters in the in the DirectoryRepresentation
object are ignored,
but directory views work as usual.)settings
- Workspace settings. This may be null
.Method Detail |
---|
protected EntityRepository getWorkspaceDir()
protected Project createEclipseProject(EclipseWorkspace wos, DirectoryView projDir, EclipseWorkspaceConfiguration parsedSettings, Report r)
EclipseProjectCreatorPlugin
plugins
with the name
"org.schmant.project.eclipse.EclipseProjectCreatorPlugin"
to process the supplied directory.
This may be overridden by subclasses if they want to introduce new kinds
of Eclipse projects. The recommended way to do that, however, is via
EclipseProjectCreatorPlugin
:s.
projDir
- The project directoryr
- The current Report
.parsedSettings
- Settings parsed from the workspace metadata. User-
supplied settings should override the values in this object.
Project
or null
if the project
directory should be ignored.public ProjectRepositoryInfo<EclipseWorkspaceConfiguration> collect(EclipseWorkspace wos)
ProjectRepositoryInfoCollector
collect
in interface ProjectRepositoryInfoCollector<EclipseWorkspace,EclipseWorkspaceConfiguration>
wos
- A reference to the workspace object. This method is called
from the workspace constructor, so no methods may be called on this
object since it is not fully initialized yet. The created projects can
save it for future reference, though.
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |