|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.cdt.ui.CodeGeneration
public class CodeGeneration
Class that offers access to the templates contained in the 'code generation' preference page.
Method Summary | |
---|---|
static java.lang.String |
getBodyFileContent(org.eclipse.cdt.core.model.ITranslationUnit tu,
java.lang.String typeComment,
java.lang.String typeContent,
java.lang.String lineDelimiter)
Returns the content for a new compilation unit using the 'new Java file' code template. |
static java.lang.String |
getClassComment(org.eclipse.cdt.core.model.ITranslationUnit tu,
java.lang.String typeQualifiedName,
java.lang.String lineDelimiter)
Returns the content for a new type comment using the 'typecomment' code template. |
static java.lang.String |
getHeaderFileContent(org.eclipse.cdt.core.model.ITranslationUnit tu,
java.lang.String typeComment,
java.lang.String typeContent,
java.lang.String lineDelimiter)
Returns the content for a new compilation unit using the 'new Java file' code template. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String getHeaderFileContent(org.eclipse.cdt.core.model.ITranslationUnit tu, java.lang.String typeComment, java.lang.String typeContent, java.lang.String lineDelimiter) throws org.eclipse.core.runtime.CoreException
tu
- The translation unit to create the source for. The compilation unit does not need to exist.typeComment
- The comment for the type to created. Used when the code template contains a ${typecomment} variable. Can be null
if
no comment should be added.typeContent
- The code of the type, including type declaration and body.lineDelimiter
- The line delimiter to be used.
null
if the template is undefined or empty.
org.eclipse.core.runtime.CoreException
public static java.lang.String getBodyFileContent(org.eclipse.cdt.core.model.ITranslationUnit tu, java.lang.String typeComment, java.lang.String typeContent, java.lang.String lineDelimiter) throws org.eclipse.core.runtime.CoreException
tu
- The translation unit to create the source for. The compilation unit does not need to exist.typeComment
- The comment for the type to created. Used when the code template contains a ${typecomment} variable. Can be null
if
no comment should be added.typeContent
- The code of the type, including type declaration and body.lineDelimiter
- The line delimiter to be used.
null
if the template is undefined or empty.
org.eclipse.core.runtime.CoreException
public static java.lang.String getClassComment(org.eclipse.cdt.core.model.ITranslationUnit tu, java.lang.String typeQualifiedName, java.lang.String lineDelimiter) throws org.eclipse.core.runtime.CoreException
tu
- The translation unit where the type is contained. The compilation unit does not need to exist.typeQualifiedName
- The name of the type to which the comment is added. For inner types the name must be qualified and include the outer
types names (dot separated).lineDelimiter
- The line delimiter to be used.
null
if the code template is undefined or empty. The returned content is unformatted and is not indented.
org.eclipse.core.runtime.CoreException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |