Package org.eclipse.pde.ui.templates
Class PluginReference
java.lang.Object
org.eclipse.pde.ui.templates.PluginReference
- All Implemented Interfaces:
IIdentifiable
,IMatchRules
,IPluginReference
Implementation of the IPluginReference
This class may be instantiated. This class is not intended to be sub-classed by clients.
- Since:
- 3.4
- See Also:
- 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
ConstructorDescriptionConstructs a plug-in reference to be used in the PDE template frameworkPluginReference
(String id, String version, int match) Constructs a plug-in reference to be used in the PDE template framework -
Method Summary
Modifier and TypeMethodDescriptionboolean
getId()
Returns a unique id of this object.int
getMatch()
Returns the required match for the imported plug-in.Returns the required version of the plug-in.int
hashCode()
void
Sets the id of this IIdentifiable to the provided value.void
setMatch
(int match) Sets the match type for the require plug-in.void
setVersion
(String version) Sets the desired version of the required plug-in.
-
Constructor Details
-
PluginReference
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
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 Details
-
equals
-
hashCode
public int hashCode() -
getMatch
public int getMatch()Description copied from interface:IPluginReference
Returns the required match for the imported plug-in. The choices are defined in IMatchRules interface.- Specified by:
getMatch
in interfaceIPluginReference
- Returns:
- the desired type of the import plug-in match
- See Also:
-
getVersion
Description copied from interface:IPluginReference
Returns the required version of the plug-in.- Specified by:
getVersion
in interfaceIPluginReference
- Returns:
- required version or null if not set
-
setMatch
Description copied from interface:IPluginReference
Sets the match type for the require plug-in. This method will throw a CoreException if the model is not editable.- Specified by:
setMatch
in interfaceIPluginReference
- Parameters:
match
- the desired match type- Throws:
CoreException
- if the model is not editable- See Also:
-
setVersion
Description copied from interface:IPluginReference
Sets the desired version of the required plug-in. This method will throw a CoreException if the model is not editable.- Specified by:
setVersion
in interfaceIPluginReference
- Parameters:
version
- the required import plug-in version- Throws:
CoreException
- if the model is not editable
-
getId
Description copied from interface:IIdentifiable
Returns a unique id of this object.- Specified by:
getId
in interfaceIIdentifiable
- Returns:
- the id of this object
-
setId
Description copied from interface:IIdentifiable
Sets the id of this IIdentifiable to the provided value.- Specified by:
setId
in interfaceIIdentifiable
- Parameters:
id
- a new id of this object- Throws:
CoreException
- If object is not editable.
-