@Override public TreeAppendable trace(EObject object) { return trace(object, false); }
@Override public TreeAppendable trace(EObject object, boolean useForDebugging) { return trace(object, ILocationInFileProviderExtension.RegionDescription.FULL, useForDebugging); }
@Override public ITreeAppendable trace(ILocationData location) { return trace(location, false); }
@Override public ITreeAppendable trace(ILocationData location, boolean useForDebugging) { return trace(Collections.singleton(location), useForDebugging); }
public TreeAppendable trace(EObject object, ILocationInFileProviderExtension.RegionDescription region, boolean useForDebugging) { // TODO use locationProvider from service registry Set<ILocationData> locationData = createAllLocationData(traceURIConverter, locationProvider, jvmModelAssociations, object, region); if (locationData.isEmpty()) return this; return trace(locationData, useForDebugging); }
@Override public ITreeAppendable trace(Iterable<? extends EObject> objects) { if (Iterables.isEmpty(objects)) throw new IllegalArgumentException("List of objects may not be empty"); int size = Iterables.size(objects); if (size == 1) return trace(objects.iterator().next(), false); Set<ILocationData> newData = new LinkedHashSet<ILocationData>(size); for(EObject object: objects) { ILocationData locationData = createLocationData(traceURIConverter, locationProvider, object, ILocationInFileProviderExtension.RegionDescription.FULL); if (locationData != null) newData.add(locationData); } if (newData.isEmpty() && !isUseForDebugging()) return this; return trace(newData, false); }
@Override public ITreeAppendable trace(EObject object, EStructuralFeature feature, int indexInList) { ITextRegion textRegion = locationProvider.getFullTextRegion(object, feature, indexInList); if (!(textRegion instanceof ITextRegionWithLineInformation)) { if (log.isDebugEnabled()) log.debug("location provider returned text region without line information. Synthesized dummy data.", new Exception()); textRegion = new TextRegionWithLineInformation(textRegion.getOffset(), textRegion.getLength(), 0, 0); } if (textRegion == ITextRegion.EMPTY_REGION) { return this; } ILocationData newData = createLocationData(traceURIConverter, object, (ITextRegionWithLineInformation) textRegion); return trace(Collections.singleton(newData), false); }
public ITreeAppendable traceSignificant(final ITreeAppendable appendable, final EObject source, final boolean useForDebugging) { ITreeAppendable _xifexpression = null; if ((appendable instanceof TreeAppendable)) { _xifexpression = ((TreeAppendable)appendable).trace(source, ILocationInFileProviderExtension.RegionDescription.SIGNIFICANT, useForDebugging); } else { ITreeAppendable _xblockexpression = null; { ITextRegion _significantTextRegion = this.locationProvider.getSignificantTextRegion(source); final ITextRegionWithLineInformation it = ((ITextRegionWithLineInformation) _significantTextRegion); ITreeAppendable _xifexpression_1 = null; if (((it != null) && (it != ITextRegion.EMPTY_REGION))) { int _offset = it.getOffset(); int _length = it.getLength(); int _lineNumber = it.getLineNumber(); int _endLineNumber = it.getEndLineNumber(); LocationData _locationData = new LocationData(_offset, _length, _lineNumber, _endLineNumber, null); _xifexpression_1 = appendable.trace(_locationData, useForDebugging); } else { _xifexpression_1 = appendable; } _xblockexpression = _xifexpression_1; } _xifexpression = _xblockexpression; } return _xifexpression; }
public ITreeAppendable traceWithComments(final ITreeAppendable appendable, final EObject source) { ITreeAppendable _xifexpression = null; if ((appendable instanceof TreeAppendable)) { _xifexpression = ((TreeAppendable)appendable).trace(source, ILocationInFileProviderExtension.RegionDescription.INCLUDING_COMMENTS, false); } else { ITreeAppendable _xblockexpression = null;