Class TemplatePersistenceData
- java.lang.Object
-
- org.eclipse.text.templates.TemplatePersistenceData
-
- org.eclipse.jface.text.templates.persistence.TemplatePersistenceData
-
@Deprecated public class TemplatePersistenceData extends org.eclipse.text.templates.TemplatePersistenceData
Deprecated.SeeTemplatePersistenceDataTemplatePersistenceData stores information about a template. It uniquely references contributed templates via their id. Contributed templates may be deleted or modified. All template may be enabled or not.Clients may use this class, although this is not usually needed except when implementing a custom template preference page or template store. This class is not intended to be subclassed.
- Since:
- 3.0
- Restriction:
- This class is not intended to be subclassed by clients.
-
-
Constructor Summary
Constructors Constructor Description TemplatePersistenceData(Template template, boolean enabled)Deprecated.TemplatePersistenceData(Template template, boolean enabled, String id)Deprecated.TemplatePersistenceData(org.eclipse.text.templates.TemplatePersistenceData data)Deprecated.In some cases, we must continue to respect the deprecated TemplatePresistenceData even though we are givenTemplatePersistenceData.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(Object other)Deprecated.StringgetId()Deprecated.Returns the id of this template store, ornullif there is none.TemplategetTemplate()Deprecated.Returns the template encapsulated by the receiver.protected UUIDgetUniqueIdForEquals()Deprecated.Required to support equals() with deprecated type org.eclipse.jface.text.templates.persistence.TemplatePersistenceData.inthashCode()Deprecated.booleanisCustom()Deprecated.Returns whether the receiver represents a custom template, i.e. is either a user-added template or a contributed template that has been modified.booleanisDeleted()Deprecated.Returns the deletion state of the stored template.booleanisEnabled()Deprecated.Returns the enablement state of the contained template.booleanisModified()Deprecated.Returns whether the receiver represents a modified template, i.e. a contributed template that has been changed.booleanisUserAdded()Deprecated.Returnstrueif the contained template was added by a user, i.e. does not reference a contributed template.voidrevert()Deprecated.Reverts the template to its original setting.voidsetDeleted(boolean isDeleted)Deprecated.Sets the deletion state of the stored template.voidsetEnabled(boolean isEnabled)Deprecated.Sets the enablement state of the contained template.voidsetTemplate(Template template)Deprecated.Sets the template encapsulated by the receiver.
-
-
-
Constructor Detail
-
TemplatePersistenceData
public TemplatePersistenceData(org.eclipse.text.templates.TemplatePersistenceData data)
Deprecated.In some cases, we must continue to respect the deprecated TemplatePresistenceData even though we are givenTemplatePersistenceData.- Parameters:
data- TheTemplatePersistenceDatathat will underlie this object.- Since:
- 3.14
-
TemplatePersistenceData
public TemplatePersistenceData(Template template, boolean enabled)
Deprecated.
-
-
Method Detail
-
getId
public String getId()
Deprecated.Description copied from class:org.eclipse.text.templates.TemplatePersistenceDataReturns the id of this template store, ornullif there is none.- Overrides:
getIdin classorg.eclipse.text.templates.TemplatePersistenceData- Returns:
- the id of this template store
-
isDeleted
public boolean isDeleted()
Deprecated.Description copied from class:org.eclipse.text.templates.TemplatePersistenceDataReturns the deletion state of the stored template. This is only relevant of contributed templates.- Overrides:
isDeletedin classorg.eclipse.text.templates.TemplatePersistenceData- Returns:
- the deletion state of the stored template
-
setDeleted
public void setDeleted(boolean isDeleted)
Deprecated.Description copied from class:org.eclipse.text.templates.TemplatePersistenceDataSets the deletion state of the stored template.- Overrides:
setDeletedin classorg.eclipse.text.templates.TemplatePersistenceData- Parameters:
isDeleted- the deletion state of the stored template
-
getTemplate
public Template getTemplate()
Deprecated.Description copied from class:org.eclipse.text.templates.TemplatePersistenceDataReturns the template encapsulated by the receiver.- Overrides:
getTemplatein classorg.eclipse.text.templates.TemplatePersistenceData- Returns:
- the template encapsulated by the receiver
-
setTemplate
public void setTemplate(Template template)
Deprecated.Description copied from class:org.eclipse.text.templates.TemplatePersistenceDataSets the template encapsulated by the receiver.- Overrides:
setTemplatein classorg.eclipse.text.templates.TemplatePersistenceData- Parameters:
template- the new template
-
isCustom
public boolean isCustom()
Deprecated.Description copied from class:org.eclipse.text.templates.TemplatePersistenceDataReturns whether the receiver represents a custom template, i.e. is either a user-added template or a contributed template that has been modified.- Overrides:
isCustomin classorg.eclipse.text.templates.TemplatePersistenceData- Returns:
trueif the contained template is a custom template and cannot be reconstructed from the contributed templates
-
isModified
public boolean isModified()
Deprecated.Description copied from class:org.eclipse.text.templates.TemplatePersistenceDataReturns whether the receiver represents a modified template, i.e. a contributed template that has been changed.- Overrides:
isModifiedin classorg.eclipse.text.templates.TemplatePersistenceData- Returns:
trueif the contained template is contributed but has been modified,falseotherwise
-
isUserAdded
public boolean isUserAdded()
Deprecated.Description copied from class:org.eclipse.text.templates.TemplatePersistenceDataReturnstrueif the contained template was added by a user, i.e. does not reference a contributed template.- Overrides:
isUserAddedin classorg.eclipse.text.templates.TemplatePersistenceData- Returns:
trueif the contained template was added by a user,falseotherwise
-
revert
public void revert()
Deprecated.Description copied from class:org.eclipse.text.templates.TemplatePersistenceDataReverts the template to its original setting.- Overrides:
revertin classorg.eclipse.text.templates.TemplatePersistenceData
-
isEnabled
public boolean isEnabled()
Deprecated.Description copied from class:org.eclipse.text.templates.TemplatePersistenceDataReturns the enablement state of the contained template.- Overrides:
isEnabledin classorg.eclipse.text.templates.TemplatePersistenceData- Returns:
- the enablement state of the contained template
-
setEnabled
public void setEnabled(boolean isEnabled)
Deprecated.Description copied from class:org.eclipse.text.templates.TemplatePersistenceDataSets the enablement state of the contained template.- Overrides:
setEnabledin classorg.eclipse.text.templates.TemplatePersistenceData- Parameters:
isEnabled- the new enablement state of the contained template
-
equals
public boolean equals(Object other)
Deprecated.- Overrides:
equalsin classorg.eclipse.text.templates.TemplatePersistenceData
-
hashCode
public int hashCode()
Deprecated.- Overrides:
hashCodein classorg.eclipse.text.templates.TemplatePersistenceData
-
getUniqueIdForEquals
protected UUID getUniqueIdForEquals()
Deprecated.Description copied from class:org.eclipse.text.templates.TemplatePersistenceDataRequired to support equals() with deprecated type org.eclipse.jface.text.templates.persistence.TemplatePersistenceData.- Overrides:
getUniqueIdForEqualsin classorg.eclipse.text.templates.TemplatePersistenceData- Returns:
- unique id to support
TemplatePersistenceData.equals(Object)
-
-