|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.core.runtime.PlatformObject | +--org.eclipse.update.core.model.ModelObject | +--org.eclipse.update.core.model.FeatureReferenceModel | +--org.eclipse.update.core.FeatureReference
Convenience implementation of a feature reference.
This class may be instantiated or subclassed by clients.
IFeatureReference
,
FeatureReferenceModel
Constructor Summary | |
FeatureReference()
Feature reference default constructor |
|
FeatureReference(IFeatureReference ref)
Constructor FeatureReference. |
Method Summary | |
void |
addCategory(ICategory category)
Adds a category to the referenced feature. |
ICategory[] |
getCategories()
Returns an array of categories the referenced feature belong to. |
IFeature |
getFeature()
Returns the feature this reference points to based on match and resolution |
IFeature |
getFeature(boolean perfectMatch,
org.eclipse.update.configuration.IConfiguredSite configuredSite)
Returns the referenced feature. |
int |
getMatch()
Returns the matching rule for this included feature. |
String |
getName()
Returns the name of the feature reference. |
int |
getSearchLocation()
Returns the search location for this included feature. |
ISite |
getSite()
Returns the update site for the referenced feature |
VersionedIdentifier |
getVersionedIdentifier()
Returns the feature identifier. |
boolean |
isOptional()
Returns true if the feature is optional, false otherwise. |
void |
setSite(ISite site)
Associates a site with the feature reference. |
void |
setURL(URL url)
Sets the feature reference URL. |
Methods inherited from class org.eclipse.update.core.model.FeatureReferenceModel |
addCategoryName, equals, getCategoryNames, getFeatureIdentifier, getFeatureVersion, getOptions, getSiteModel, getType, getURL, getURLString, removeCategoryName, resolve, setCategoryNames, setFeatureIdentifier, setFeatureVersion, setOptions, setSiteModel, setType, setURLString, toString |
Methods inherited from class org.eclipse.update.core.model.ModelObject |
arrayTypeFor, arrayTypeFor, assertIsWriteable, isReadOnly, markListReferenceReadOnly, markReadOnly, markReferenceReadOnly, resolveListReference, resolveNLString, resolveReference, resolveURL |
Methods inherited from class org.eclipse.core.runtime.PlatformObject |
getAdapter |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.update.core.IFeatureReference |
getURL |
Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
getAdapter |
Constructor Detail |
public FeatureReference()
public FeatureReference(IFeatureReference ref)
ref
- the reference to copyMethod Detail |
public IFeature getFeature() throws CoreException
getFeature
in interface IFeatureReference
CoreException
public ISite getSite()
getSite
in interface IFeatureReference
IFeatureReference.getSite()
public ICategory[] getCategories()
getCategories
in interface IFeatureReference
IFeatureReference.getCategories()
public void addCategory(ICategory category)
addCategory
in interface IFeatureReference
category
- new categoryIFeatureReference.addCategory(ICategory)
public void setURL(URL url) throws CoreException
setURL
in interface IFeatureReference
url
- reference URL
CoreException
IFeatureReference.setURL(URL)
public void setSite(ISite site)
setSite
in interface IFeatureReference
site
- site for the feature referenceIFeatureReference.setSite(ISite)
public VersionedIdentifier getVersionedIdentifier() throws CoreException
getVersionedIdentifier
in interface IFeatureReference
CoreException
IFeatureReference.getVersionedIdentifier()
public String getName()
IFeatureReference
getName
in interface IFeatureReference
IFeatureReference.getName()
public boolean isOptional()
IFeatureReference
true
if the feature is optional, false
otherwise.
isOptional
in interface IFeatureReference
IFeatureReference.isOptional()
public int getMatch()
IFeatureReference
RULE_PERFECT
getMatch
in interface IFeatureReference
IFeatureReference.getMatch()
public int getSearchLocation()
IFeatureReference
SEARCH_ROOT
getSearchLocation
in interface IFeatureReference
IFeatureReference.getSearchLocation()
public IFeature getFeature(boolean perfectMatch, org.eclipse.update.configuration.IConfiguredSite configuredSite) throws CoreException
IFeatureReference
getFeature
in interface IFeatureReference
perfectMatch
- true
if the perfect match feature feature should be returned
false
if the best match feature should be returned.configuredSite
- the configured site to search for the Feature. If
the configured site is null
the search will be done in the current configured site.
CoreException
org.eclipse.update.core.IFeatureReference#getFeature(boolean)
|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |