目標位置

ID:
org.eclipse.pde.core.targetLocations

自:
3.8

說明:
這個延伸點可讓用戶端提供自己的目標位置實作,以提供外掛程式和其他內容給目標平台。

配置標記:

<!ELEMENT extension (targetLocation)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED

>


<!ELEMENT targetLocation EMPTY>

<!ATTLIST targetLocation

type            CDATA #REQUIRED

locationFactory CDATA #IMPLIED

canUpdate       (true | false)

>


範例:
以下是 targetLocations 延伸的範例:

   <extension
  id="org.eclipse.pde.core.customlocation"
  name="Custom Location"
  point="org.eclipse.pde.core.targetLocations">
  <targetLocation
   locationFactory="org.eclipse.pde.core.CustomLocationFactory"
   type="CustomLocation">
  </targetLocation>
    </extension>
在上述範例中,目標的名稱和 ID 是在 plugin.xml 中宣告,但用來建立目標位置的 Factory org.eclipse.pde.core.CustomLocationFactory 來自提供的外掛程式。

API 資訊:
延伸必須提供實作 ITargetLocationFactory 的 Factory。Factory 將用來實例化 ITargetLocation 物件。 如果要在 PDE UI 中顯示實作,用戶端必須提供配接器 Factory,將 ITargetLocation 實作調整為下列的內容: IWizardNode:提供 IWizardNode 物件,以提供精靈來建立這個類型的新位置 ILabelProvider:在 UI 中提供位置實作的標籤文字和影像。如需相關資訊,請參閱 ITargetLocation


Copyright © 2011 IBM Corporation and others.
All rights reserved. 本程式與隨附的資料依照本發行版所隨附的 Elipse Public License 1.0 版條款而提供,可以在以下網址取得:http://www.eclipse.org/legal/epl-v10.html。