Skip to content

class CodeSnippet

Package: ch.actifsource.codesnippet.metamodel.element.javamodel.CodeSnippet

Direct Known Subclasses:


class CodeSnippet extends AbstractCodeSnippet, AbstractContext, RootResource, ListChildParentElement

Properties

children

Element[0..N]

Method Summary

displayCodeSnippet

@DisplayCodeSnippet

Converts a CodeSnippet to a text which can be displayed in diagrams for example.

displayCodeSnippetSingleLine

@DisplayCodeSnippet

Converts a CodeSnippet to a text on a single line which can be displayed in diagrams.

getAllInstanceableCluster

@CodeSnippetExtension

Return:

List<MessageClusterDefinitionInstanceable>

getCompilationUnit

@CodeSnippetToCode

Return:

BaseCompilationUnit

getCompilationUnit

@FCodeSnippetToCode

Return:

BaseCompilationUnit

getFunctionBlockType

@CodeSnippetExtension

Return:

FunctionBlockType

getFunctionCall

@FCodeSnippetExt

Parameters:

ACallingBaseElement
PlatformType

getMethodType

@CodeSnippetExtension

Return:

ClassType

getRecordItems

getResourceReference

@TemplateFunction

Parameters:

PlatformType
Controller

internal_getResourceReferences

@FCodeSnippet

Return:

List<Resource>

isValid

@TokenToName

Check if the CodeSnippet is valide.
Returns true if the CodeSnippet is valide (No parset exception exist).

Return:

BooleanLiteral

isValidOrThrowException

@TokenToName

Check if the CodeSnippet is valide.
Returns true if the CodeSnippet is valide (No parset exception exist) else
throw generator exception.

Return:

BooleanLiteral

toC

@CodeSnippetToCode

Generates ANSI C from code represented by a CodeSnippet.

toC

@FCodeSnippetToCode

toCwithNameProvider

@CodeSnippetToCode

Generates ANSI C from code represented by a CodeSnippet.

Parameters:

NameProvider

toFormattedC

@CodeSnippetToCode

Generates formatted C code (html) from code represented by a CodeSnippet, i.e., it highlights comments, functions and keywords defined by the language. It uses the code that is returned by the function codeSnippetToC.

Return:

TextLiteral

toFormattedCwithNameProvider

@CodeSnippetToCode

Generates formatted C code (html) from code represented by a CodeSnippet, i.e., it highlights comments, functions and keywords defined by the language. It uses the code that is returned by the function codeSnippetToC.

Parameters:

NameProvider

Return:

TextLiteral

toST

@CodeSnippetToCode

Generates Structured Text from code represented by a CodeSnippet.

toST

@FTemplateFunctions

Parameters:

ACallingBaseElement
PlatformType

toST_BR

@CodeSnippetExtension

Parameters:

ACallingBaseElement
PlatformType

toST_S7Tia

@CodeSnippetExtension

Parameters:

ACallingBaseElement

toSTwithNameProvider

@CodeSnippetToCode

Generates Structured Text from code represented by a CodeSnippet.

Parameters:

NameProvider

toText

@CodeSnippetToCode

Generates text from code represented by a CodeSnippet. Is used in particular to generate code from CodeSnippets which use the CodeSnippetLanguage Text.

toTextwithNameProvider

@CodeSnippetToCode

Generates text from code represented by a CodeSnippet. Is used in particular to generate code from CodeSnippets which use the CodeSnippetLanguage Text.

Parameters:

NameProvider

toVHDL

@CodeSnippetToCode

Generates VHDL code from input code represented by a CodeSnippet.

toVHDLwithNameProvider

@CodeSnippetToCode

Generates VHDL code from input code represented by a CodeSnippet.

Parameters:

NameProvider

typePathNameToST

@FGenericCodeSnippetExtension

Parameters:

NameProvider
IncrementLiteral_DiagramUtil
AbstractPostfixDotIdentifier
ACallingBaseElement
PlatformType

typePathNameToST_BR

@CodeSnippetExtension

Parameters:

NameProvider
IncrementLiteral_DiagramUtil
AbstractPostfixDotIdentifier
ACallingBaseElement
PlatformType

typePathNameToST_BR

@PlatformAdapterFunctions

Parameters:

AbstractPostfixDotIdentifier
ACallingBaseElement
PlatformType

typePathNameToST_S7Tia

@PlatformAdapterFunctions

Parameters:

AbstractPostfixDotIdentifier
ACallingBaseElement
PlatformType

variableChildName

@CodeSnippetExtension

Parameters:

AbstractChild
Resource
PlatformType

variableName

@FTemplateFunctions

Parameters:

NameProvider
ACallingBaseElement
PlatformType
Resource

variableName

@FGenericCodeSnippetExtension

Parameters:

Resource
NameProvider
ACallingBaseElement
PlatformType

variableName_BR

@CodeSnippetExtension

Parameters:

Resource
NameProvider
ACallingBaseElement
PlatformType