|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.jface.text.templates.Template
public class Template
A template consisting of a name and a pattern.
Clients may instantiate this class. May become final in the future.
| Constructor Summary | |
|---|---|
Template()
Creates an empty template. |
|
Template(java.lang.String name,
java.lang.String description,
java.lang.String contextTypeId,
java.lang.String pattern)
Deprecated. as of 3.1 replaced by Template(String, String, String, String, boolean) |
|
Template(java.lang.String name,
java.lang.String description,
java.lang.String contextTypeId,
java.lang.String pattern,
boolean isAutoInsertable)
Creates a template. |
|
Template(Template template)
Creates a copy of a template. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
|
java.lang.String |
getContextTypeId()
Returns the id of the context type in which the template can be applied. |
java.lang.String |
getDescription()
Returns the description of the template. |
java.lang.String |
getName()
Returns the name of the template. |
java.lang.String |
getPattern()
Returns the template pattern. |
int |
hashCode()
|
boolean |
isAutoInsertable()
Returns the auto insertable property of the template. |
boolean |
matches(java.lang.String prefix,
java.lang.String contextTypeId)
Returns true if template is enabled and matches the context,
false otherwise. |
void |
setContextTypeId(java.lang.String contextTypeId)
Deprecated. Templates should never be modified |
void |
setDescription(java.lang.String description)
Deprecated. Templates should never be modified |
void |
setName(java.lang.String name)
Deprecated. Templates should never be modified |
void |
setPattern(java.lang.String pattern)
Deprecated. Templates should never be modified |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Template()
public Template(Template template)
template - the template to copy
public Template(java.lang.String name,
java.lang.String description,
java.lang.String contextTypeId,
java.lang.String pattern)
Template(String, String, String, String, boolean)
name - the name of the templatedescription - the description of the templatecontextTypeId - the id of the context type in which the template can be appliedpattern - the template pattern
public Template(java.lang.String name,
java.lang.String description,
java.lang.String contextTypeId,
java.lang.String pattern,
boolean isAutoInsertable)
name - the name of the templatedescription - the description of the templatecontextTypeId - the id of the context type in which the template can be appliedpattern - the template patternisAutoInsertable - the auto insertable property of the template| Method Detail |
|---|
public int hashCode()
hashCode in class java.lang.Objectpublic void setDescription(java.lang.String description)
description - the new descriptionpublic java.lang.String getDescription()
public void setContextTypeId(java.lang.String contextTypeId)
contextTypeId - the new context type namepublic java.lang.String getContextTypeId()
public void setName(java.lang.String name)
name - the name of the templatepublic java.lang.String getName()
public void setPattern(java.lang.String pattern)
pattern - the new pattern of the templatepublic java.lang.String getPattern()
public boolean matches(java.lang.String prefix,
java.lang.String contextTypeId)
true if template is enabled and matches the context,
false otherwise.
prefix - the prefix (e.g. inside a document) to matchcontextTypeId - the context type id to match
true if template is enabled and matches the context,
false otherwisepublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic boolean isAutoInsertable()
|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.