|
org.netbeans.modules.editor.codetemplates/1 1.2.22 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.netbeans.lib.editor.codetemplates.api.CodeTemplateManager
public final class CodeTemplateManager
Code template manager maintains list of code templates for a particular document type and allows temporary code templates to be created.
Method Summary | |
---|---|
CodeTemplate |
createTemporary(String parametrizedText)
Create temporary code template for an ad hoc insertion. |
static CodeTemplateManager |
get(Document doc)
Get an instance of the manager for the given document. |
Collection |
getCodeTemplates()
Get unmodifiable collection of the code templates for this manager. |
boolean |
isLoaded()
Check whether asynchronous loading of the code templates into this manager was already finished. |
void |
registerLoadedListener(ChangeListener listener)
Register change listener waiting for the state when this manager becomes loaded with the code templates. |
void |
waitLoaded()
Wait for this manager to become loaded with the code templates. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static CodeTemplateManager get(Document doc)
doc
- document for which the instance of the manager should be obtained.public Collection getCodeTemplates()
public CodeTemplate createTemporary(String parametrizedText)
parametrizedText
- non-null parametrized text of the code template.
public boolean isLoaded()
registerLoadedListener(ChangeListener)
public void waitLoaded()
public void registerLoadedListener(ChangeListener listener)
In case the manager is already loaded the registered listener will be fired immediately in the same thread.
There is no unregistration of the listeners because they are forgotten automatically once the manager becomes loaded.
listener
- change listener to be fired once this manager becomes loaded
by the code templates.
|
org.netbeans.modules.editor.codetemplates/1 1.2.22 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |