public abstract class RepositoryProviderType extends PlatformObject
A repository provider type class is associated with it's provider ID along with it's corresponding repository provider class. To add a repository provider type and have it registered with the platform, a client must minimally:
RepositoryProviderType
plugin.xml
.
Here is an example extension point definition:
<extension point="org.eclipse.team.core.repository">
<repository
class="org.eclipse.myprovider.MyRepositoryProvider"
typeClass="org.eclipse.myprovider.MyRepositoryProviderType"
id="org.eclipse.myprovider.myProviderID">
</repository>
</extension>
Once a repository provider type is registered with Team, then you
can access the singleton instance of the class by invoking RepositoryProviderType.getProviderType()
.
getProviderType(String)
Constructor and Description |
---|
RepositoryProviderType() |
Modifier and Type | Method and Description |
---|---|
String |
getFileSystemScheme()
Return the file system scheme for this provider type or
null if the type doesn't support file systems
as defined by the org.eclipse.core.filesystem.filesystems
extension point. |
String |
getID()
Answer the id of this provider type.
|
ProjectSetCapability |
getProjectSetCapability()
Answers an object for serializing and deserializing
of references to projects.
|
static RepositoryProviderType |
getProviderType(String id)
Return the RepositoryProviderType for the given provider ID.
|
Subscriber |
getSubscriber()
Return a
Subscriber that describes the synchronization state
of the resources contained in the project associated with this
provider type. |
static RepositoryProviderType |
getTypeForScheme(String scheme)
Return the repository type for the given file system scheme or
null if there isn't one. |
void |
metaFilesDetected(IProject project,
IContainer[] containers)
Callback from team when the meta-files for a repository type are detected in an
unshared project.
|
getAdapter
public static RepositoryProviderType getProviderType(String id)
id
- the ID of the providergetID()
public static RepositoryProviderType getTypeForScheme(String scheme)
null
if there isn't one. The scheme corresponds to
the scheme used for the org.eclipse.core.filesystem.filesystems
extension point.scheme
- the file system schemenull
public final String getID()
public ProjectSetCapability getProjectSetCapability()
Subclasses should override this method to return the appropriate serializer for the associated repository type. It is recommended that serializers not have any references to UI classes so that they can be used in a headless environment.
At this time, the default implementation wrappers the IProjectSetSerializer
interface if one exists, providing backward compatibility with existing code.
At some time in the future, the IProjectSetSerializer
interface will be removed
and the default implementation will revert to having limited functionality.
null
)public void metaFilesDetected(IProject project, IContainer[] containers)
repository
entry in the plugin manifest file.
By default, nothing is done (except that the repository type's plugin will have been loaded. Subclass may wish to mark the met-data as team-private. This method is called from a resource delta so subclasses may not obtain scheduling rules or in any way modify workspace resources (including auto-sharing the project). However, auto-sharing (or other modification) could be performed by a background job scheduled from this callback.
project
- the project that contains the detected meta-files.containers
- the folders (possibly including the project folder) in which meta-files were foundpublic Subscriber getSubscriber()
Subscriber
that describes the synchronization state
of the resources contained in the project associated with this
provider type. By default, null
is returned. Subclasses
may override.null
public final String getFileSystemScheme()
null
if the type doesn't support file systems
as defined by the org.eclipse.core.filesystem.filesystems
extension point.null
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.