團隊儲存庫提供者

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>


<extension point=

"org.eclipse.team.core.repository"

>

<repository class=

"org.eclipse.myprovider.MyRepositoryProvider"

typeClass=

"org.eclipse.myprovider.MyRepositoryProvider"

id=

"org.eclipse.myprovider.myProviderID"

canImportId=

"org.eclipse.myprovider.myOldProviderID"

metaFilePaths=

".meta/files,.meta/version"

>

</repository>

</extension>

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

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