Class CommentUtils


  • class CommentUtils
    extends java.lang.Object
    Methods for accessing and converting comments.
    Author:
    Holger Eichelberger
    • Constructor Summary

      Constructors 
      Constructor Description
      CommentUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static java.lang.String commentsToString​(org.eclipse.emf.ecore.EObject object)
      Handles the comments assigned to the EMF AST element object.
      (package private) static net.ssehub.easy.varModel.model.StructuredComment ensureStructuredComment​(org.eclipse.emf.ecore.EObject object, TypeContext context)
      Creates a Comment from comments assigned to the EMF AST element object.
      (package private) static void println​(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.Comment toComment​(org.eclipse.emf.ecore.EObject object, net.ssehub.easy.varModel.model.IModelElement parent)
      Creates a Comment from comments assigned to the EMF AST element object.
      (package private) static net.ssehub.easy.varModel.model.StructuredComment toStructuredComment​(org.eclipse.emf.ecore.EObject object, net.ssehub.easy.varModel.model.ModelElement parent)
      Creates a Comment from comments assigned to the EMF AST element object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CommentUtils

        CommentUtils()
    • Method Detail

      • commentsToString

        static java.lang.String commentsToString​(org.eclipse.emf.ecore.EObject object)
        Handles the comments assigned to the EMF AST element object. 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 a Comment from comments assigned to the EMF AST element object. This method does not add the result to some project, context, etc.
        Parameters:
        object - the EMF AST element to analyze
        parent - 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 a Comment from comments assigned to the EMF AST element object. This method does not add the result to some project, context, etc.
        Parameters:
        object - the EMF AST element to analyze
        parent - 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 a Comment from comments assigned to the EMF AST element object. This method does not add the result to some project, context, etc.
        Parameters:
        object - the EMF AST element to analyze
        context - 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