團隊儲存庫提供者

org.eclipse.team.core.repository

2.0 版

「團隊」外掛程式含有「儲存庫」的概念。儲存庫的工作就是提供在「團隊」成員之間共用資源的支援。儲存庫是根據每一個專案基礎來配置的。一次僅有一個儲存庫可以對映至專案。

延伸這個延伸點的儲存庫可以提供常用儲存庫特有規則的實作,以進行資源修改、移動和刪除。請參閱下列介面, 以取得 IFileModificationValidatorMoveDeleteHook 的詳細資料。

也可以指定「儲存庫」類型以提供非專案特定的功能,如 org.eclipse.team.core.ProjectSetCapability

(選用)當現行安裝中沒有第二個提供者的外掛程式時,儲存庫提供者類型可指定從第二個提供者匯入專案。在兩個提供者無法重複使用相同 ID 的情況下,這可用來移轉一個提供者實作方式至另一個。

儲存庫提供者類型也可以指定一或多個相對於母項儲存檔案的 Meta 檔路徑(以逗點區隔)。只要非共用的專案或資料夾中有檔案符合儲存庫定義相關的所有 Meta 檔路徑, 將以母項儲存檔案作為引數來呼叫 RepositoryProviderType#metaFilesDetected 方法。如此,儲存庫類型有機會將檔案標示為團隊專用,也可能分享專案。如需詳細資訊,請參閱上述方法的 javadoc。

<!ELEMENT extension (repository)>

<!ATTLIST extension

point CDATA #REQUIRED>


<!ELEMENT repository EMPTY>

<!ATTLIST repository

id               CDATA #IMPLIED

class            CDATA #REQUIRED

typeClass        CDATA #IMPLIED

canImportId      CDATA #IMPLIED

metaFilePaths    CDATA #IMPLIED

fileSystemScheme CDATA #IMPLIED>


<extension point=

"org.eclipse.team.core.repository"

>

<repository class=

"org.eclipse.myprovider.MyRepositoryProvider"

typeClass=

"org.eclipse.myprovider.MyRepositoryProviderType"

id=

"org.eclipse.myprovider.myProviderID"

canImportId=

"org.eclipse.myprovider.myOldProviderID"

metaFilePaths=

".meta/files,.meta/version"

>

</repository>

</extension>

class 屬性的值必須代表 org.eclipse.team.core.RepositoryProvider 的子類別,且 typeClass 屬性的值必須代表 org.eclipse.team.core.RepositoryProviderType 的子類別

RepositoryProvider 提供的實作提供 helper 方法和常用的程式碼,來對映和取消提供者到專案的對映。選用的 RepositoryProviderType 提供透過 ProjectSetCapability 的專案集匯入和匯出。