public class TracingSugar extends GeneratorNodeExtensions
| Modifier and Type | Field and Description |
|---|---|
protected ILocationInFileProvider |
locationProvider |
protected GeneratorNodeProcessor |
processor |
protected ITraceURIConverter |
traceURIConverter |
protected GeneratorWhiteSpaceConfig |
whiteSpaceConfig |
| Constructor and Description |
|---|
TracingSugar() |
| Modifier and Type | Method and Description |
|---|---|
void |
generateTracedFile(IFileSystemAccess2 fsa,
java.lang.String path,
CompositeGeneratorNode rootNode)
Use to generate a file based on generator node.
|
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.
|
ILocationData |
location(org.eclipse.emf.ecore.EObject obj) |
ILocationData |
location(org.eclipse.emf.ecore.EObject obj,
org.eclipse.emf.ecore.EStructuralFeature feature,
int idx) |
CompositeGeneratorNode |
trace(org.eclipse.emf.ecore.EObject obj)
Convenience shorthand for
obj.location.trace |
CompositeGeneratorNode |
trace(org.eclipse.emf.ecore.EObject obj,
org.eclipse.xtend2.lib.StringConcatenationClient code)
Convenience shorthand for
obj.trace.appendTemplate('''some template''') |
append, appendNewLine, appendNewLine, appendNewLineIfNotEmpty, appendTemplate, indent, indent, trace, trace, trace, trace@Inject protected ILocationInFileProvider locationProvider
@Inject protected ITraceURIConverter traceURIConverter
@Inject protected GeneratorWhiteSpaceConfig whiteSpaceConfig
@Inject protected GeneratorNodeProcessor processor
public void generateTracedFile(IFileSystemAccess2 fsa, java.lang.String path, org.eclipse.emf.ecore.EObject rootTrace, org.eclipse.xtend2.lib.StringConcatenationClient code)
public void generateTracedFile(IFileSystemAccess2 fsa, java.lang.String path, CompositeGeneratorNode rootNode)
public CompositeGeneratorNode trace(org.eclipse.emf.ecore.EObject obj)
obj.location.tracepublic CompositeGeneratorNode trace(org.eclipse.emf.ecore.EObject obj, org.eclipse.xtend2.lib.StringConcatenationClient code)
obj.trace.appendTemplate('''some template''')public ILocationData location(org.eclipse.emf.ecore.EObject obj)
fullTextRegion of the given EObject.public ILocationData location(org.eclipse.emf.ecore.EObject obj, org.eclipse.emf.ecore.EStructuralFeature feature, int idx)
obj - the EObject containing the featurefeature - the EStructuralFeature to traceidx - the index of the value to trace, in case the feature contains a list, should be -1
otherwise.fullTextRegion of the given feature in the given EObject.