public class CommentResourceVisitor
extends net.ssehub.easy.varModel.persistency.IVMLWriter
CommentResource. IVML operations can be turned into strings through a pseudo signature of "." as operator
and arguments, e.g., using "isDefined(.)" as key. Variables are read from CommentResource as such.| Modifier and Type | Field and Description |
|---|---|
private net.ssehub.easy.varModel.management.CommentResource |
comments |
| Modifier | Constructor and Description |
|---|---|
private |
CommentResourceVisitor(java.io.Writer out,
net.ssehub.easy.varModel.management.CommentResource comments)
Creates a visitor instance.
|
| Modifier and Type | Method and Description |
|---|---|
private boolean |
appendComment(java.lang.String key,
java.lang.String[] args)
Appends a comment taken from the comments resource.
|
protected void |
appendOCLFeatureCall(net.ssehub.easy.varModel.cst.OCLFeatureCall call,
net.ssehub.easy.varModel.model.datatypes.Operation.FormattingHint hint) |
private java.lang.String |
getComment(java.lang.String key)
Returns the comment for
key. |
static java.lang.String |
visit(net.ssehub.easy.varModel.model.IModelElement elt,
net.ssehub.easy.varModel.management.CommentResource comments)
Visits a model element and returns the translated elements as String.
|
void |
visitCompoundAccess(net.ssehub.easy.varModel.cst.CompoundAccess access) |
void |
visitConstraint(net.ssehub.easy.varModel.model.Constraint constraint) |
void |
visitVariable(net.ssehub.easy.varModel.cst.Variable variable) |
beforeNestedElement, emitComments, emitDecisionVariableDeclarationDefault, endWritingCompound, endWritingProject, forceComponundTypes, getInstance, printDefaultSpace, processVersion, releaseInstance, setFormatInitializer, startWritingCompound, startWritingProject, visitAnnotationVariable, visitAttribute, visitAttributeAssignment, visitBlockExpression, visitBooleanValue, visitComment, visitComment, visitCompound, visitCompoundAccessStatement, visitCompoundInitializer, visitCompoundValue, visitContainerInitializer, visitContainerOperationCall, visitContainerValue, visitDecisionVariableDeclaration, visitDeferInitExpression, visitDerivedDatatype, visitEnum, visitEnumLiteral, visitEnumValue, visitFreezeBlock, visitIfThen, visitIntValue, visitLet, visitMetaTypeValue, visitMultiAndExpression, visitNullValue, visitOclFeatureCall, visitOperationDefinition, visitParenthesis, visitPartialEvaluationBlock, visitProject, visitProjectImport, visitProjectInterface, visitRealValue, visitReference, visitReferenceValue, visitSelf, visitSequence, visitSet, visitStringValue, visitVersionValue, writeValueaddParent, appendIndentation, appendOutput, appendOutput, considerOclCompliance, decreaseAdditionalIndentation, emitConstraintExpression, flush, getExpressionContext, getIndentation, getIvmlIndentStep, getLogger, getParent, getParent, getParent, getParentCount, getUseIvmlWhitespace, getWriter, increaseAdditionalIndentation, removeLastParent, setExpressionContext, setIndentationStep, setIndentStep, setOclCompliance, setUseIvmlWhitespace, setUseWhitespaces, setWriter, visitConstantValue, visitConstraintValue, visitOrderedEnum, visitUnresolvedExpressionprivate CommentResourceVisitor(java.io.Writer out,
net.ssehub.easy.varModel.management.CommentResource comments)
out - the output writercomments - the comment resource, may be null for nonepublic static java.lang.String visit(net.ssehub.easy.varModel.model.IModelElement elt,
net.ssehub.easy.varModel.management.CommentResource comments)
StringProvider.elt - the element to visitcomments - the comment resource, may be null for noneprotected void appendOCLFeatureCall(net.ssehub.easy.varModel.cst.OCLFeatureCall call,
net.ssehub.easy.varModel.model.datatypes.Operation.FormattingHint hint)
appendOCLFeatureCall in class net.ssehub.easy.varModel.persistency.IVMLWriterpublic void visitConstraint(net.ssehub.easy.varModel.model.Constraint constraint)
visitConstraint in interface net.ssehub.easy.varModel.model.IModelVisitorvisitConstraint in class net.ssehub.easy.varModel.persistency.IVMLWriterpublic void visitVariable(net.ssehub.easy.varModel.cst.Variable variable)
visitVariable in interface net.ssehub.easy.varModel.cst.IConstraintTreeVisitorvisitVariable in class net.ssehub.easy.varModel.persistency.IVMLWriterprivate java.lang.String getComment(java.lang.String key)
key.key - the key (may be null)private boolean appendComment(java.lang.String key,
java.lang.String[] args)
key - the key (may be null)args - the arguments for an operation, replacing "{i}" with i a non-negative integer denoting
operand (0) and parameter (1..)true if the operation was performed and something was appended to this writer, false elsepublic void visitCompoundAccess(net.ssehub.easy.varModel.cst.CompoundAccess access)
visitCompoundAccess in interface net.ssehub.easy.varModel.cst.IConstraintTreeVisitorvisitCompoundAccess in class net.ssehub.easy.varModel.persistency.IVMLWriterCopyright © 2009 - 2018 SSE. All Rights Reserved.