org.netbeans.modules.editor.lib2/1 1.43.1 10

org.netbeans.spi.editor.codegen
Interface CodeGenerator


public interface CodeGenerator

Interface to be implemented by all generators inserting their code snippets into documents using the Insert Code editor action.

Since:
1.8

Nested Class Summary
static interface CodeGenerator.Factory
          Factory creating code generators.
The factory instances are looked up by the MimeLookup so they should be registered in an xml-layer in Editors/<mime-type>/CodeGenerators directory.
 
Method Summary
 String getDisplayName()
          Gets the generator's name to be displayed in the popup that appears on the Insert Code action invocation.
 void invoke()
          Invokes the generator to create the code snippet and insert it into a document.
 

Method Detail

getDisplayName

String getDisplayName()
Gets the generator's name to be displayed in the popup that appears on the Insert Code action invocation.

Returns:
non-null name
Since:
1.8

invoke

void invoke()
Invokes the generator to create the code snippet and insert it into a document.

Since:
1.8

org.netbeans.modules.editor.lib2/1 1.43.1 10

Built on December 5 2011.  |  Portions Copyright 1997-2011 Sun Microsystems, Inc. All rights reserved.