|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jface.text.templates.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(String name,
String description,
String contextTypeId,
String pattern)
Creates a template. |
|
Template(Template template)
Creates a copy of a template. |
Method Summary | |
boolean |
equals(Object o)
|
String |
getContextTypeId()
Returns the id of the context type in which the template can be applied. |
String |
getDescription()
Returns the description of the template. |
String |
getName()
Returns the name of the template. |
String |
getPattern()
Returns the template pattern. |
int |
hashCode()
|
boolean |
matches(String prefix,
String contextTypeName)
Returns true if template is enabled and matches the context,
false otherwise. |
void |
setContextTypeId(String contextTypeId)
Sets the name of the context type in which the template can be applied. |
void |
setDescription(String description)
Sets the description of the template. |
void |
setName(String name)
Sets the name of the template. |
void |
setPattern(String pattern)
Sets the pattern of the template. |
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 copypublic Template(String name, String description, String contextTypeId, String pattern)
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 patternMethod Detail |
public int hashCode()
public void setDescription(String description)
description
- the new descriptionpublic String getDescription()
public void setContextTypeId(String contextTypeId)
contextTypeId
- the new context type namepublic String getContextTypeId()
public void setName(String name)
name
- the name of the templatepublic String getName()
public void setPattern(String pattern)
pattern
- the new pattern of the templatepublic String getPattern()
public boolean matches(String prefix, String contextTypeName)
true
if template is enabled and matches the context,
false
otherwise.
prefix
- the prefix (e.g. inside a document) to matchcontextTypeName
- the context type name to match
true
if template is enabled and matches the context,
false
otherwisepublic boolean equals(Object o)
|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.