public class TestClass { //or any other method for that matter public static void main(String[] args) { LocationData ld=new LocationData(); ld.zips.add("12345"); //adds zipcode of "12345" } }
public ILocationData createLocation(int offset, int length, int lineNumber, int endLineNumber, URI path) { return new LocationData(offset, length, lineNumber, endLineNumber, path); }
public TraceRegion(int myOffset, int myLength, int myLineNumber, int myEndLineNumber, int associatedOffset, int associatedLength, int associatedLineNumber, int associatedEndLineNumber, @Nullable AbstractTraceRegion parent, @Nullable URI associatedPath) { this(myOffset, myLength, myLineNumber, myEndLineNumber, new LocationData(associatedOffset, associatedLength, associatedLineNumber, associatedEndLineNumber, associatedPath), parent); }
LocationData data = new LocationData() data.setLatitude(latitude); //etc. points.add(data);
private List<ILocationData> copyLocationData(TreeAppendable delegate, boolean useOriginalLocations) { if (useOriginalLocations) { return Lists.newArrayList(delegate.getLocationData()); } else { List<ILocationData> result = Lists.newArrayList(); for(ILocationData locationData: delegate.getLocationData()) { result.add(new LocationData(locationData, null)); } return result; } }
public AbstractTraceRegion getTraceRegion() { ILocationData locationData = new LocationData(originOffset, originLength, originLineNumber, originEndLineNumber, originURI); AbstractTraceRegion result = new TraceRegion(0, delegate.length(), 0, Strings.countLineBreaks(delegate), locationData, null); return result; }
protected void setCurrentAppendable(/* @Nullable */ RichStringLiteral origin) { if (currentAppendable == null && origin != null) { ITextRegionWithLineInformation region = (ITextRegionWithLineInformation) getLocationInFileProvider().getSignificantTextRegion(origin, XbasePackage.Literals.XSTRING_LITERAL__VALUE, 0); currentAppendable = appendable.trace(new LocationData(region, null), true); } }
protected static ILocationData createLocationData(ITraceURIConverter converter, EObject object, ITextRegionWithLineInformation textRegion) { Resource resource = object.eResource(); SourceRelativeURI uriForTrace = null; if (converter != null) { uriForTrace = converter.getURIForTrace(resource); } ILocationData newData = new LocationData(textRegion, uriForTrace); return newData; }
LocationData locationData = new LocationData(); String key = keys.next(); JSONObject innerJObject = jObject.getJSONObject(key);
public LocationData createLocationData(AbstractTraceRegion region, URI myPath) { return new LocationData(region.getMyOffset(), region.getMyLength(), region.getMyLineNumber(), region.getMyEndLineNumber(), myPath); }
return new LocationData(region.getOffset(), region.getLength(), region.getLineNumber(), region.getEndLineNumber(), path);
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; }
int _lineNumber = it.getLineNumber(); int _endLineNumber = it.getEndLineNumber(); LocationData _locationData = new LocationData(_offset, _length, _lineNumber, _endLineNumber, null); _xifexpression_1 = appendable.trace(_locationData); } else {
int splittedLength = nextLocation.getLength() - nextLength; int splittedBeginLine = nextEndLine; ILocationData splitted = new LocationData(currentEndOffset, splittedLength, splittedBeginLine, nextLocation.getEndLineNumber(), nextLocation.getPath()); for(int j = i + 1; j < locations.size() && splitted != null; j++) { ILocationData shiftMe = locations.get(j).getFirst();
protected ILocationData toLocationData(List<INode> nodes) { ITextRegionWithLineInformation result = ITextRegionWithLineInformation.EMPTY_REGION; for (INode node : nodes) { if (!isHidden(node)) { ITextRegionWithLineInformation region = node.getTextRegionWithLineInformation(); if (region.getLength() != 0) { result = result.merge(new TextRegionWithLineInformation(region.getOffset(), region.getLength(), region.getLineNumber() - 1, region.getEndLineNumber() - 1)); } } } if (result.getLength() == 0) return null; return new LocationData(result.getOffset(), result.getLength(), result.getLineNumber(), result.getEndLineNumber(), null); }
documentationTrace = documentationTrace.merge(node.getTextRegionWithLineInformation()); LocationData _locationData = new LocationData(documentationTrace, null); appendable.trace(_locationData).append(doc.toString()); _xblockexpression_1 = appendable.newLine();
ITextRegion region = locationProvider.getFullTextRegion(type, TypesPackage.Literals.JVM_PARAMETERIZED_TYPE_REFERENCE__TYPE, 0); if (region instanceof ITextRegionWithLineInformation) { ((ITreeAppendable) tracedAppendable).trace(new LocationData((ITextRegionWithLineInformation) region, null)).append(jvmType); } else { tracedAppendable.append(jvmType);