Class TracingSugar


  • public class TracingSugar
    extends GeneratorNodeExtensions
    Some additional sugar extension to - create generator nodes for EObjects - create ILocationData for EObjects. - enhance FileSystemAccess for tracing
    • Constructor Detail

      • TracingSugar

        public TracingSugar()
    • Method Detail

      • generateTracedFile

        public void generateTracedFile​(IFileSystemAccess2 fsa,
                                       java.lang.String path,
                                       org.eclipse.emf.ecore.EObject rootTrace,
                                       org.eclipse.xtend2.lib.StringConcatenationClient code)
        Convenience extension, to generate traced code.
      • trace

        public CompositeGeneratorNode trace​(org.eclipse.emf.ecore.EObject obj)
        Convenience shorthand for obj.location.trace
      • trace

        public CompositeGeneratorNode trace​(org.eclipse.emf.ecore.EObject obj,
                                            org.eclipse.xtend2.lib.StringConcatenationClient code)
        Convenience shorthand for obj.trace.appendTemplate('''some template''')
      • location

        public ILocationData location​(org.eclipse.emf.ecore.EObject obj)
        Returns:
        ILocationData covering the fullTextRegion of the given EObject.
      • location

        public ILocationData location​(org.eclipse.emf.ecore.EObject obj,
                                      org.eclipse.emf.ecore.EStructuralFeature feature,
                                      int idx)
        Parameters:
        obj - the EObject containing the feature
        feature - the EStructuralFeature to trace
        idx - the index of the value to trace, in case the feature contains a list, should be -1 otherwise.
        Returns:
        ILocationData covering the fullTextRegion of the given feature in the given EObject.