|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.netbeans.lib.editor.codetemplates.spi.CodeTemplateInsertRequest
Code template insert request parses the code template's text to gather the data necessary to insert the particular code template into the document (such as the template's parameters).
isInserted()
and isReleased()
return false. Registered CodeTemplateProcessor
s
will be asked to fill in the default values into the parameters.
isInserted()
returns true and isReleased()
returns false.
isReleased()
returns true. There is no more
work to do. Code templates processor(s) servicing the request will be released.
CodeTemplateParameter
Method Summary | |
List |
getAllParameters()
Get all the parameters (masters and slaves) present in the code template text in the order as they occur in the parametrized text. |
CodeTemplate |
getCodeTemplate()
Get code template associated with this insert request. |
JTextComponent |
getComponent()
Get the text component into which the template should be inserted at the current caret position. |
String |
getInsertText()
Get the text where all the parameters are replaced by their present values. |
CodeTemplateParameter |
getMasterParameter(String name)
Get master parameter with the given name. |
List |
getMasterParameters()
Get list of master parameters in the order they are located in the code template text. |
String |
getParametrizedText()
Get the present parametrized text handled by this request. |
boolean |
isInserted()
Check whether the code template that this request represents was already inserted into the document. |
boolean |
isReleased()
Check whether this request is already released which means that the code template was inserted and values of all the parameters were modified by the user so there is no more work to be done. |
void |
setParametrizedText(String parametrizedText)
Set the parametrized text to a new value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public CodeTemplate getCodeTemplate()
public JTextComponent getComponent()
public List getMasterParameters()
public CodeTemplateParameter getMasterParameter(String name)
name
- non-null name of the master parameter to be searched.
public List getAllParameters()
getMasterParameters()
public boolean isInserted()
CodeTemplateProcessor.parameterValueChanged(CodeTemplateParameter, boolean)
.
Returns false if the code template was not yet inserted into the document
i.e. the CodeTemplateProcessor.updateDefaultValues()
is currently being called on the registered processors.isReleased()
public boolean isReleased()
isInserted()
gives additional info whether request is inserted into the document or not.isInserted()
public String getParametrizedText()
CodeTemplate.getParametrizedText()
is used.
setParametrizedText(String)
.
public void setParametrizedText(String parametrizedText)
parametrizedText
- new parametrized text to be used.public String getInsertText()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |