Der findes to former for produktudvidelse, statiske og dynamiske. Statiske produktudvidelser indeholder direkte alle relevante oplysninger om produktet. Dynamiske produktudvidelser identificerer en klasse (en IProductProvider
), der kan definere et eller flere produkter, hvis der bliver sendt en forespørgsel til den.
<!ELEMENT extension ((product | provider))>
<!ATTLIST-udvidelse
point CDATA #REQUIRED
id CDATA #IMPLIED
navn CDATA #IMPLIED>
<!ELEMENT product (property*)>
<!ATTLIST product
application CDATA #REQUIRED
name CDATA #REQUIRED
description CDATA #IMPLIED>
<!ELEMENT property EMPTY>
<!ATTLIST property
navn CDATA #REQUIRED
value CDATA #REQUIRED>
oplysinger om en produktudbyder.
<!ELEMENT run EMPTY>
<!ATTLIST run
class CDATA #REQUIRED>
Følgende er et eksempel på en dynamisk produkterklæring (produktudbyder): Følgende er et eksempel på en programerklæring:<extension id=
"coolProduct"
point=
"org.eclipse.core.runtime.products"
>
<product name=
"%coolName"
application=
"coolApplication"
description=
"%coolDescription"
>
<property name=
"windowImages"
value=
"window.gif"
/>
<property name=
"aboutImage"
value=
"image.gif"
/>
<property name=
"aboutText"
value=
"%aboutText"
/>
<property name=
"appName"
value=
"CoolApp"
/>
<property name=
"welcomePage"
value=
"$nl$/welcome.xml"
/>
<property name=
"preferenceCustomization"
value=
"plugin_customization.ini"
/>
</product>
</extension>
<extension id=
"coolProvider"
point=
"org.eclipse.core.runtime.products"
>
<provider>
<run class=
"com.example.productProvider"
/>
</provider>
</extension>
IProduct
. Dynamiske produktudvidelser skal identificere en implementor af IProductProvider
. org.eclipse.ui.branding.IProductConstants
indeholder oplysninger om de varemærkerelaterede produktegenskaber, som er defineret af Eclipse UI.
IProductProvider
.
Copyright (c) 2004, 2005 IBM Corporation and others.
All rights reserved. This program and the accompanying materials are made
available under the terms of the Eclipse Public License v1.0 which accompanies
this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html