Class CommentUtils
- java.lang.Object
-
- de.uni_hildesheim.sse.translation.CommentUtils
-
class CommentUtils extends java.lang.ObjectMethods for accessing and converting comments.- Author:
- Holger Eichelberger
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringTOKEN_ML_COMMENTprivate static java.lang.StringTOKEN_SL_COMMENTprivate static java.lang.StringTOKEN_WHITESPACE
-
Constructor Summary
Constructors Constructor Description CommentUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static java.lang.StringcommentsToString(org.eclipse.emf.ecore.EObject object)Handles the comments assigned to the EMF AST elementobject.(package private) static net.ssehub.easy.varModel.model.StructuredCommentensureStructuredComment(org.eclipse.emf.ecore.EObject object, TypeContext context)Creates aCommentfrom comments assigned to the EMF AST elementobject.(package private) static voidprintln(java.lang.String comment)Prints out a test and thereby emits explicit characters for marking the line feed.(package private) static net.ssehub.easy.varModel.model.CommenttoComment(org.eclipse.emf.ecore.EObject object, net.ssehub.easy.varModel.model.IModelElement parent)Creates aCommentfrom comments assigned to the EMF AST elementobject.(package private) static net.ssehub.easy.varModel.model.StructuredCommenttoStructuredComment(org.eclipse.emf.ecore.EObject object, net.ssehub.easy.varModel.model.ModelElement parent)Creates aCommentfrom comments assigned to the EMF AST elementobject.
-
-
-
Field Detail
-
TOKEN_WHITESPACE
private static final java.lang.String TOKEN_WHITESPACE
- See Also:
- Constant Field Values
-
TOKEN_SL_COMMENT
private static final java.lang.String TOKEN_SL_COMMENT
- See Also:
- Constant Field Values
-
TOKEN_ML_COMMENT
private static final java.lang.String TOKEN_ML_COMMENT
- See Also:
- Constant Field Values
-
-
Method Detail
-
commentsToString
static java.lang.String commentsToString(org.eclipse.emf.ecore.EObject object)
Handles the comments assigned to the EMF AST elementobject. This method does not add the result to some project, context, etc.- Parameters:
object- the EMF AST element to analyze- Returns:
- the resulting comment as string (may be null if there is no comment)
-
toComment
static net.ssehub.easy.varModel.model.Comment toComment(org.eclipse.emf.ecore.EObject object, net.ssehub.easy.varModel.model.IModelElement parent)Creates aCommentfrom comments assigned to the EMF AST elementobject. This method does not add the result to some project, context, etc.- Parameters:
object- the EMF AST element to analyzeparent- the parent of the new comment in the IVML object model- Returns:
- the resulting comment as string (may be null if there is no comment)
-
toStructuredComment
static net.ssehub.easy.varModel.model.StructuredComment toStructuredComment(org.eclipse.emf.ecore.EObject object, net.ssehub.easy.varModel.model.ModelElement parent)Creates aCommentfrom comments assigned to the EMF AST elementobject. This method does not add the result to some project, context, etc.- Parameters:
object- the EMF AST element to analyzeparent- the parent of the new comment in the IVML object model- Returns:
- the resulting comment as string (may be null if there is no comment)
-
ensureStructuredComment
static net.ssehub.easy.varModel.model.StructuredComment ensureStructuredComment(org.eclipse.emf.ecore.EObject object, TypeContext context)Creates aCommentfrom comments assigned to the EMF AST elementobject. This method does not add the result to some project, context, etc.- Parameters:
object- the EMF AST element to analyzecontext- the resolution context- Returns:
- the resulting comment as string (may be null if there is no comment)
-
println
static void println(java.lang.String comment)
Prints out a test and thereby emits explicit characters for marking the line feed. [debug]- Parameters:
comment- the comment to be printed out
-
-