Package org.eclipse.pde.ui.templates
Class PluginReference
- java.lang.Object
-
- org.eclipse.pde.ui.templates.PluginReference
-
- All Implemented Interfaces:
IIdentifiable,IMatchRules,IPluginReference
public class PluginReference extends java.lang.Object implements IPluginReference
Implementation of the IPluginReferenceThis class may be instantiated. This class is not intended to be sub-classed by clients.
- Since:
- 3.4
- See Also:
IPluginReference- Restriction:
- This class is not intended to be sub-classed by clients.
-
-
Field Summary
-
Fields inherited from interface org.eclipse.pde.core.IIdentifiable
P_ID
-
Fields inherited from interface org.eclipse.pde.core.plugin.IMatchRules
COMPATIBLE, EQUIVALENT, GREATER_OR_EQUAL, NONE, PERFECT, PREFIX, RULE_COMPATIBLE, RULE_EQUIVALENT, RULE_GREATER_OR_EQUAL, RULE_NAME_TABLE, RULE_PERFECT, RULE_PREFIX
-
Fields inherited from interface org.eclipse.pde.core.plugin.IPluginReference
P_MATCH, P_VERSION
-
-
Constructor Summary
Constructors Constructor Description PluginReference(java.lang.String id)Constructs a plug-in reference to be used in the PDE template frameworkPluginReference(java.lang.String id, java.lang.String version, int match)Constructs a plug-in reference to be used in the PDE template framework
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object object)java.lang.StringgetId()Returns a unique id of this object.intgetMatch()Returns the required match for the imported plug-in.java.lang.StringgetVersion()Returns the required version of the plug-in.inthashCode()voidsetId(java.lang.String id)Sets the id of this IIdentifiable to the provided value.voidsetMatch(int match)Sets the match type for the require plug-in.voidsetVersion(java.lang.String version)Sets the desired version of the required plug-in.
-
-
-
Constructor Detail
-
PluginReference
public PluginReference(java.lang.String id)
Constructs a plug-in reference to be used in the PDE template framework- Parameters:
id- the id of the plug-in- Since:
- 3.9
- See Also:
PluginReference(String id, String version, int match)
-
PluginReference
public PluginReference(java.lang.String id, java.lang.String version, int match)Constructs a plug-in reference to be used in the PDE template framework- Parameters:
id- the id of the plug-inversion- the version of the plug-inmatch- the match rule for the plug-inIMatchRules
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
getMatch
public int getMatch()
Description copied from interface:IPluginReferenceReturns the required match for the imported plug-in. The choices are defined in IMatchRules interface.- Specified by:
getMatchin interfaceIPluginReference- Returns:
- the desired type of the import plug-in match
- See Also:
IMatchRules
-
getVersion
public java.lang.String getVersion()
Description copied from interface:IPluginReferenceReturns the required version of the plug-in.- Specified by:
getVersionin interfaceIPluginReference- Returns:
- required version or null if not set
-
setMatch
public void setMatch(int match) throws CoreExceptionDescription copied from interface:IPluginReferenceSets the match type for the require plug-in. This method will throw a CoreException if the model is not editable.- Specified by:
setMatchin interfaceIPluginReference- Parameters:
match- the desired match type- Throws:
CoreException- if the model is not editable- See Also:
IMatchRules
-
setVersion
public void setVersion(java.lang.String version) throws CoreExceptionDescription copied from interface:IPluginReferenceSets the desired version of the required plug-in. This method will throw a CoreException if the model is not editable.- Specified by:
setVersionin interfaceIPluginReference- Parameters:
version- the required import plug-in version- Throws:
CoreException- if the model is not editable
-
getId
public java.lang.String getId()
Description copied from interface:IIdentifiableReturns a unique id of this object.- Specified by:
getIdin interfaceIIdentifiable- Returns:
- the id of this object
-
setId
public void setId(java.lang.String id) throws CoreExceptionDescription copied from interface:IIdentifiableSets the id of this IIdentifiable to the provided value.- Specified by:
setIdin interfaceIIdentifiable- Parameters:
id- a new id of this object- Throws:
CoreException- If object is not editable.
-
-