org.eclipse.xtext.formatting2.regionaccess.IEObjectRegion Java Examples

The following examples show how to use org.eclipse.xtext.formatting2.regionaccess.IEObjectRegion. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: InsertionPointFinder.java    From xtext-core with Eclipse Public License 2.0 6 votes vote down vote up
public IHiddenRegion findInsertionPoint(ISerializationContext ctx, IEObjectRegion obj, AbstractElement ins) {
	ISerState insertionState = findState(ctx, ins);
	Set<AbstractElement> followers = collectAdjacent(insertionState, s -> s.getFollowers());
	Set<AbstractElement> precendents = collectAdjacent(insertionState, s -> s.getPrecedents());
	List<IAstRegion> regions = Lists.newArrayList(obj.getAstRegions());
	if (regions.isEmpty()) {
		return obj.getPreviousHiddenRegion();
	}
	if (followers.contains(regions.get(0).getGrammarElement())) {
		return obj.getPreviousHiddenRegion();
	}
	if (precendents.contains(regions.get(regions.size() - 1).getGrammarElement())) {
		return obj.getNextHiddenRegion();
	}
	for (int i = 0; i < regions.size() - 1; i++) {
		IAstRegion leading = regions.get(i);
		IAstRegion trailing = regions.get(i + 1);
		if (precendents.contains(leading.getGrammarElement()) && followers.contains(trailing.getGrammarElement())) {
			return leading.getNextHiddenRegion();
		}
	}
	return null;
}
 
Example #2
Source File: PartialSerializer.java    From xtext-core with Eclipse Public License 2.0 6 votes vote down vote up
protected IAstRegion findRegion(IEObjectRegion owner, FeatureChange change) {
	EStructuralFeature feature = change.getFeature();
	if (feature instanceof EReference && ((EReference) feature).isContainment()) {
		ITextRegionAccess access = owner.getTextRegionAccess();
		EObject oldValue = change.getReferenceValue();
		if (oldValue != null) {
			return access.regionForEObject(oldValue);
		}
		for (IAstRegion astRegion : owner.getAstRegions()) {
			if (astRegion instanceof IEObjectRegion) {
				if (feature.equals(astRegion.getContainingFeature())) {
					return  astRegion;
				}
			}
		}
		return null;
	} else {
		return owner.getRegionFor().feature(feature);
	}
}
 
Example #3
Source File: TextRegionAccessToString.java    From xtext-core with Eclipse Public License 2.0 6 votes vote down vote up
protected String toString(ITextSegment region) {
	String result;
	if (region instanceof IEObjectRegion)
		result = toString((IEObjectRegion) region);
	else if (region instanceof ISemanticRegion)
		result = toString((ISemanticRegion) region);
	else if (region instanceof IHiddenRegion)
		result = toString((IHiddenRegion) region);
	else if (region instanceof IWhitespace)
		result = toString((IWhitespace) region);
	else if (region instanceof IComment)
		result = toString((IComment) region);
	else if (region != null)
		result = region.getClass().getName() + "@" + Integer.toHexString(System.identityHashCode(region));
	else
		result = "null";
	if (hightlightOrigin && region == origin)
		return ">>>" + result + "<<<";
	return result;
}
 
Example #4
Source File: StringBasedTextRegionAccessDiffAppender.java    From xtext-core with Eclipse Public License 2.0 6 votes vote down vote up
protected AbstractEObjectRegion getOrCreateEObjectRegion(EObject eobj, IEObjectRegion original,
		ITextRegionAccess access) {
	AbstractEObjectRegion eobjRegion = result.regionForEObject(eobj);
	if (eobjRegion == null) {
		if (access == null) {
			access = result.getOriginalTextRegionAccess();
		}
		if (original == null) {
			original = access.regionForEObject(eobj);
		}
		if (original != null) {
			eobjRegion = new StringEObjectRegion(result, original.getGrammarElement(), eobj);
			result.add(eobjRegion);
			AbstractEObjectRegion parent = getOrCreateEObjectRegion(eobj.eContainer(), null,
					original.getTextRegionAccess());
			if (parent != null) {
				parent.addChild(eobjRegion);
			}
		}
	}
	return eobjRegion;
}
 
Example #5
Source File: AbstractFormatter2.java    From xtext-core with Eclipse Public License 2.0 6 votes vote down vote up
protected boolean isInRequestedRange(EObject obj) {
	Collection<ITextRegion> regions = request.getRegions();
	if (regions.isEmpty())
		return true;
	ITextRegionAccess access = request.getTextRegionAccess();
	IEObjectRegion objRegion = access.regionForEObject(obj);
	if (objRegion == null)
		return false;
	IHiddenRegion previousHidden = objRegion.getPreviousHiddenRegion();
	IHiddenRegion nextHidden = objRegion.getNextHiddenRegion();
	int objOffset = previousHidden != null ? previousHidden.getOffset() : 0;
	int objEnd = nextHidden != null ? nextHidden.getEndOffset() : access.regionForRootEObject().getEndOffset();
	for (ITextRegion region : regions) {
		int regionOffset = region.getOffset();
		int regionEnd = regionOffset + region.getLength();
		if (regionOffset <= objEnd && regionEnd >= objOffset)
			return true;
	}
	return false;
}
 
Example #6
Source File: FormattableDocument.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public <T extends EObject> T append(T owner, Procedure1<? super IHiddenRegionFormatter> after) {
	if (owner != null) {
		IEObjectRegion region = getTextRegionAccess().regionForEObject(owner);
		if (region != null) {
			IHiddenRegion gap = region.getNextHiddenRegion();
			set(gap, after);
		}
	}
	return owner;
}
 
Example #7
Source File: ReferenceUpdater.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
protected void updateAllReferences(IReferenceUpdaterContext context) {
	IEObjectRegion root = context.getModifyableDocument().getOriginalTextRegionAccess().regionForRootEObject();
	ISemanticRegion current = root.getPreviousHiddenRegion().getNextSemanticRegion();
	while (current != null) {
		EStructuralFeature feature = current.getContainingFeature();
		if (feature instanceof EReference && !((EReference) feature).isContainment()) {
			IUpdatableReference updatable = createUpdatableReference(current);
			if (updatable != null && needsUpdating(context, updatable)) {
				context.updateReference(updatable);
			}
		}
		current = current.getNextSemanticRegion();
	}
}
 
Example #8
Source File: PartialSerializer.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
protected List<IAstRegion> findRegions(IEObjectRegion owner, FeatureChange change) {
	EStructuralFeature feature = change.getFeature();
	if (feature instanceof EReference && ((EReference) feature).isContainment()) {
		ITextRegionAccess access = owner.getTextRegionAccess();
		Set<EObject> children = Sets.newHashSet();
		for (ListChange lc : change.getListChanges()) {
			children.addAll(lc.getReferenceValues());
		}
		List<IEObjectRegion> result = Lists.newArrayList();
		for (EObject obj : children) {
			IEObjectRegion region = access.regionForEObject(obj);
			if (region != null) {
				result.add(region);
			}
		}
		for (IAstRegion astRegion : owner.getAstRegions()) {
			if (astRegion instanceof IEObjectRegion) {
				if (feature.equals(astRegion.getContainingFeature())) {
					result.add((IEObjectRegion) astRegion);
				}
			}
		}
		Collections.sort(result, (a, b) -> a.getOffset() - b.getOffset());
		return ImmutableList.copyOf(result);
	} else {
		return ImmutableList.copyOf(owner.getRegionFor().features(feature));
	}
}
 
Example #9
Source File: PartialSerializer.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
protected List<SerializationStrategy> trySerializeIndividualFeatures(EObjectChange change, IEObjectRegion original,
		ISerializationContext context, IConstraint constraint) {
	List<SerializationStrategy> result = Lists.newArrayList();
	EObject object = change.getEObject();
	for (FeatureChange featureChange : change.getChanges()) {
		EStructuralFeature feature = featureChange.getFeature();
		List<SerializationStrategy> values = null;
		// if (feature instanceof EReference && ((EReference)
		// feature).isContainment()) {
		// if (feature.isMany()) {
		// values = trySerializeMultiValueContainment(object, featureChange,
		// original, constraint);
		// } else {
		// values = trySerializeSingleValue(object, featureChange, original,
		// constraint);
		// }
		// } else {
		if (feature.isMany()) {
			values = trySerializeMultiValue(object, featureChange, original, constraint);
		} else {
			values = trySerializeSingleValue(object, featureChange, original, constraint);
		}
		// }
		if (values == null) {
			return null;
		}
		result.addAll(values);
	}
	return result;
}
 
Example #10
Source File: PartialSerializer.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
protected List<SerializationStrategy> trySerializeEObject(EObjectChange change, ITextRegionDiffBuilder result,
		SerializationContextMap<IConstraint> constraints) {
	List<SerializationStrategy> strategies = Lists.newArrayList();
	EObject obj = change.getEObject();
	IEObjectRegion originalEObjectRegion = result.getOriginalTextRegionAccess().regionForEObject(obj);
	ISerializationContext modified = getSerializationContext(obj);
	if (originalEObjectRegion == null) {
		return null;
	}
	ISerializationContext original = getSerializationContext(originalEObjectRegion);
	if (!original.equals(modified)) {
		strategies.add(new SerializeRecursiveStrategy(originalEObjectRegion, obj, modified));
		return strategies;
	}
	IConstraint constraint = constraints.get(modified);
	List<SerializationStrategy> features = trySerializeIndividualFeatures(change, originalEObjectRegion, modified,
			constraint);
	if (features == null) {
		strategies.add(new SerializeRecursiveStrategy(originalEObjectRegion, obj, modified));
		return strategies;
	}
	strategies.addAll(features);
	for (EObjectChange child : change.getChildren()) {
		List<SerializationStrategy> c = trySerializeEObject(child, result, constraints);
		if (c == null) {
			return Collections.singletonList(new SerializeRecursiveStrategy(originalEObjectRegion, obj, modified));
		} else {
			strategies.addAll(c);
		}
	}
	return strategies;
}
 
Example #11
Source File: PartialSerializer.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
protected ISerializationContext getSerializationContext(IEObjectRegion region) {
	EObject grammarElement = region.getGrammarElement();
	if (grammarElement instanceof RuleCall) {
		grammarElement = ((RuleCall) grammarElement).getRule();
	}
	return SerializationContext.fromEObject(grammarElement, region.getSemanticElement());
}
 
Example #12
Source File: SemanticRegionFinderTest.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
@Test
public void regionForFeatureCrossReference() throws Exception {
	AssignedAction mixed = parseAs("6 (ref foo) action (foo) end", AssignedAction.class);
	IEObjectRegion finder = toAccess(mixed).regionForEObject(mixed.getChild());
	ISemanticRegion actual = finder.getRegionFor().feature(RegionaccesstestlanguagePackage.Literals.MIXED__REF);
	List<ISemanticRegion> actuals = finder.getRegionFor()
			.features(RegionaccesstestlanguagePackage.Literals.MIXED__REF);
	assertEquals("foo", actual, actuals);
}
 
Example #13
Source File: FormattableDocument.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public <T extends EObject> T surround(T owner, Procedure1<? super IHiddenRegionFormatter> beforeAndAfter) {
	if (owner != null && !owner.eIsProxy()) {
		IEObjectRegion region = getTextRegionAccess().regionForEObject(owner);
		if (region == null)
			return owner;
		IHiddenRegion previous = region.getPreviousHiddenRegion();
		IHiddenRegion next = region.getNextHiddenRegion();
		set(previous, next, beforeAndAfter);
	}
	return owner;
}
 
Example #14
Source File: FormattableDocument.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public <T extends EObject> T prepend(T owner, Procedure1<? super IHiddenRegionFormatter> before) {
	if (owner != null) {
		IEObjectRegion region = getTextRegionAccess().regionForEObject(owner);
		if (region != null) {
			IHiddenRegion gap = region.getPreviousHiddenRegion();
			set(gap, before);
		}
	}
	return owner;
}
 
Example #15
Source File: FormattableDocument.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public <T extends EObject> T interior(T object, Procedure1<? super IHiddenRegionFormatter> init) {
	if (object != null) {
		IEObjectRegion objRegion = getTextRegionAccess().regionForEObject(object);
		if (objRegion != null) {
			IHiddenRegion previous = objRegion.getPreviousHiddenRegion();
			IHiddenRegion next = objRegion.getNextHiddenRegion();
			if (previous != null && next != null && previous != next) {
				interior(previous.getNextSemanticRegion(), next.getPreviousSemanticRegion(), init);
			}
		}
	}
	return object;
}
 
Example #16
Source File: StringBasedTextRegionAccessDiffBuilder.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public void replace(IHiddenRegion originalFirst, IHiddenRegion originalLast, ITextRegionAccess acc) {
	checkOriginal(originalFirst);
	checkOriginal(originalLast);
	IEObjectRegion substituteRoot = acc.regionForRootEObject();
	IHiddenRegion substituteFirst = substituteRoot.getPreviousHiddenRegion();
	IHiddenRegion substituteLast = substituteRoot.getNextHiddenRegion();
	replace(originalFirst, originalLast, substituteFirst, substituteLast);
}
 
Example #17
Source File: StringBasedTextRegionAccessDiffBuilder.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public StringBasedTextRegionAccessDiff create() {
	StringBasedTextRegionAccessDiffAppender appender = createAppender();
	IEObjectRegion root = original.regionForRootEObject();
	appender.copyAndAppend(root.getPreviousHiddenRegion(), PREVIOUS);
	appender.copyAndAppend(root.getPreviousHiddenRegion(), CONTAINER);
	List<Rewrite> rws = createList();
	IHiddenRegion last = null;
	for (Rewrite rw : rws) {
		boolean diff = rw.isDiff();
		if (diff) {
			appender.beginDiff();
		}
		if (rw instanceof Insert) {
			Insert ins = (Insert) rw;
			IHiddenRegion f = ins.getInsertFirst();
			IHiddenRegion l = ins.getInsertLast();
			appender.copyAndAppend(f, NEXT);
			if (f != l) {
				appender.copyAndAppend(f.getNextSemanticRegion(), l.getPreviousSemanticRegion());
			}
			appender.copyAndAppend(l, PREVIOUS);
		}
		if (diff) {
			appender.endDiff();
		}
		if (rw.originalLast != last) {
			appender.copyAndAppend(rw.originalLast, CONTAINER);
		}
		last = rw.originalLast;
	}
	appender.copyAndAppend(root.getNextHiddenRegion(), NEXT);
	StringBasedTextRegionAccessDiff result = appender.finish();
	AbstractEObjectRegion newRoot = result.regionForEObject(root.getSemanticElement());
	result.setRootEObject(newRoot);
	return result;
}
 
Example #18
Source File: TextRegionAccessToString.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
protected String toString(IEObjectRegion region) {
	EObject obj = region.getSemanticElement();
	StringBuilder builder = new StringBuilder(Strings.padEnd(toClassWithName(obj), textWidth, ' ') + " ");
	EObject element = region.getGrammarElement();
	if (element instanceof AbstractElement)
		builder.append(grammarToString.apply((AbstractElement) element));
	else if (element instanceof AbstractRule)
		builder.append(((AbstractRule) element).getName());
	else
		builder.append(": ERROR: No grammar element.");
	List<String> segments = Lists.newArrayList();
	EObject current = obj;
	while (current.eContainer() != null) {
		EObject container = current.eContainer();
		EStructuralFeature containingFeature = current.eContainingFeature();
		StringBuilder segment = new StringBuilder();
		segment.append(toClassWithName(container));
		segment.append("/");
		segment.append(containingFeature.getName());
		if (containingFeature.isMany()) {
			int index = ((List<?>) container.eGet(containingFeature)).indexOf(current);
			segment.append("[" + index + "]");
		}
		current = container;
		segments.add(segment.toString());
	}
	if (!segments.isEmpty()) {
		builder.append(" path:");
		builder.append(Joiner.on("=").join(segments));
	}
	return builder.toString();
}
 
Example #19
Source File: RichStringToLineModel.java    From xtext-xtend with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public void announceNextLiteral(final RichStringLiteral object) {
  super.announceNextLiteral(object);
  if (((this.lastLiteralEndOffset > 0) && (this.contentStartOffset < 0))) {
    this.contentStartOffset = this.lastLiteralEndOffset;
  }
  IEObjectRegion _regionForEObject = this.nodeModelAccess.regionForEObject(object);
  ISemanticRegionsFinder _regionFor = null;
  if (_regionForEObject!=null) {
    _regionFor=_regionForEObject.getRegionFor();
  }
  ISemanticRegion _feature = null;
  if (_regionFor!=null) {
    _feature=_regionFor.feature(XbasePackage.Literals.XSTRING_LITERAL__VALUE);
  }
  final ISemanticRegion node = _feature;
  if ((node != null)) {
    int _offset = node.getOffset();
    int _literalPrefixLenght = this.literalPrefixLenght(node);
    int _plus = (_offset + _literalPrefixLenght);
    this.offset = _plus;
    int _endOffset = node.getEndOffset();
    int _literalPostfixLenght = this.literalPostfixLenght(node);
    int _minus = (_endOffset - _literalPostfixLenght);
    this.lastLiteralEndOffset = _minus;
  }
  this.content = true;
}
 
Example #20
Source File: RichStringFormatter.java    From xtext-xtend with Eclipse Public License 2.0 5 votes vote down vote up
protected boolean hasSyntaxError(final IEObjectRegion region) {
  if (region instanceof NodeEObjectRegion) {
    return _hasSyntaxError((NodeEObjectRegion)region);
  } else if (region != null) {
    return _hasSyntaxError(region);
  } else {
    throw new IllegalArgumentException("Unhandled parameter types: " +
      Arrays.<Object>asList(region).toString());
  }
}
 
Example #21
Source File: RichStringFormatter.java    From xtext-xtend with Eclipse Public License 2.0 4 votes vote down vote up
protected boolean _hasSyntaxError(final IEObjectRegion region) {
  return false;
}
 
Example #22
Source File: FormattableDocument.java    From xtext-core with Eclipse Public License 2.0 4 votes vote down vote up
@Override
public void formatConditionally(EObject owner, ISubFormatter... formatters) {
	IEObjectRegion region = getTextRegionAccess().regionForEObject(owner);
	if (region != null)
		formatConditionally(region.getOffset(), region.getLength(), formatters);
}
 
Example #23
Source File: NodeSemanticRegion.java    From xtext-core with Eclipse Public License 2.0 4 votes vote down vote up
@Override
public IEObjectRegion getEObjectRegion() {
	return eObjectTokens;
}
 
Example #24
Source File: NodeSemanticRegion.java    From xtext-core with Eclipse Public License 2.0 4 votes vote down vote up
@Override
public IEObjectRegion getContainingRegion() {
	return eObjectTokens;
}
 
Example #25
Source File: NodeModelBasedRegionAccess.java    From xtext-core with Eclipse Public License 2.0 4 votes vote down vote up
@Override
public IEObjectRegion regionForRootEObject() {
	return regionForEObject(resource.getContents().get(0));
}
 
Example #26
Source File: StringSemanticRegion.java    From xtext-core with Eclipse Public License 2.0 4 votes vote down vote up
@Override
public IEObjectRegion getEObjectRegion() {
	return eObjectRegion;
}
 
Example #27
Source File: StringSemanticRegion.java    From xtext-core with Eclipse Public License 2.0 4 votes vote down vote up
@Override
public IEObjectRegion getContainingRegion() {
	return eObjectRegion;
}
 
Example #28
Source File: RegionAccessDiffTest.java    From xtext-core with Eclipse Public License 2.0 4 votes vote down vote up
@Test
public void testSerializeChildObject() throws Exception {
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("2 foo");
  _builder.newLine();
  final ITextRegionAccess access = this._regionAccessTestHelper.toTextRegionAccess(_builder);
  final Procedure1<ITextRegionDiffBuilder> _function = (ITextRegionDiffBuilder it) -> {
    EObject _semanticElement = access.regionForRootEObject().getSemanticElement();
    final Delegate child = ((Delegation) _semanticElement).getDelegate();
    final IEObjectRegion childRegion = access.regionForEObject(child);
    child.setName("baaaz");
    final ITextRegionAccess textRegions = this.serializer.serializeToRegions(child);
    it.replace(childRegion.getPreviousHiddenRegion(), childRegion.getNextHiddenRegion(), textRegions);
  };
  ITextRegionAccess _modify = this._regionAccessTestHelper.modify(access, _function);
  StringConcatenation _builder_1 = new StringConcatenation();
  _builder_1.append("0 0   H");
  _builder_1.newLine();
  _builder_1.append("      ");
  _builder_1.append("B Delegation Root");
  _builder_1.newLine();
  _builder_1.append("0 1    S \"2\"        Delegation:\'2\'");
  _builder_1.newLine();
  _builder_1.append("1 1 1  H \" \"        Whitespace:TerminalRule\'WS\'");
  _builder_1.newLine();
  _builder_1.append("       ");
  _builder_1.append("B Delegate\'baaaz\' Delegate path:Delegation/delegate");
  _builder_1.newLine();
  _builder_1.append("2 5 1   S \"baaaz\"    Delegate:name=ID");
  _builder_1.newLine();
  _builder_1.append("       ");
  _builder_1.append("E Delegate\'baaaz\' Delegate path:Delegation/delegate");
  _builder_1.newLine();
  _builder_1.append("      ");
  _builder_1.append("E Delegation Root");
  _builder_1.newLine();
  _builder_1.append("7 0 1 H");
  _builder_1.newLine();
  _builder_1.append("------------ diff 1 ------------");
  _builder_1.newLine();
  _builder_1.append("1 1  H \" \"        Whitespace:TerminalRule\'WS\'");
  _builder_1.newLine();
  _builder_1.append("2 3  S \"foo\"      Delegate:name=ID");
  _builder_1.newLine();
  _builder_1.append("5 0  H");
  _builder_1.newLine();
  this._regionAccessTestHelper.operator_tripleEquals(_modify, _builder_1);
}
 
Example #29
Source File: RegionAccessDiffTest.java    From xtext-core with Eclipse Public License 2.0 4 votes vote down vote up
@Test
public void testSerializeRootObject() throws Exception {
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("3 foo");
  _builder.newLine();
  final ITextRegionAccess access = this._regionAccessTestHelper.toTextRegionAccess(_builder);
  final Procedure1<ITextRegionDiffBuilder> _function = (ITextRegionDiffBuilder it) -> {
    final IEObjectRegion root = access.regionForRootEObject();
    EObject _semanticElement = root.getSemanticElement();
    final Delegate rootObj = ((Delegate) _semanticElement);
    rootObj.setName("baaaz");
    final ITextRegionAccess textRegions = this.serializer.serializeToRegions(rootObj);
    it.replace(root.getPreviousHiddenRegion(), root.getNextHiddenRegion(), textRegions);
  };
  ITextRegionAccess _modify = this._regionAccessTestHelper.modify(access, _function);
  StringConcatenation _builder_1 = new StringConcatenation();
  _builder_1.append("0 0 1 H");
  _builder_1.newLine();
  _builder_1.append("      ");
  _builder_1.append("B Delegate\'baaaz\' Root");
  _builder_1.newLine();
  _builder_1.append("0 1 1  S \"3\"        Unassigned:\'3\'");
  _builder_1.newLine();
  _builder_1.append("1 1 1  H \" \"        Whitespace:TerminalRule\'WS\'");
  _builder_1.newLine();
  _builder_1.append("2 5 1  S \"baaaz\"    Delegate:name=ID");
  _builder_1.newLine();
  _builder_1.append("      ");
  _builder_1.append("E Delegate\'baaaz\' Root");
  _builder_1.newLine();
  _builder_1.append("7 0 1 H");
  _builder_1.newLine();
  _builder_1.append("------------ diff 1 ------------");
  _builder_1.newLine();
  _builder_1.append("0 0 H");
  _builder_1.newLine();
  _builder_1.append("0 1 S \"3\"        Unassigned:\'3\'");
  _builder_1.newLine();
  _builder_1.append("1 1 H \" \"        Whitespace:TerminalRule\'WS\'");
  _builder_1.newLine();
  _builder_1.append("2 3 S \"foo\"      Delegate:name=ID");
  _builder_1.newLine();
  _builder_1.append("5 0 H");
  _builder_1.newLine();
  this._regionAccessTestHelper.operator_tripleEquals(_modify, _builder_1);
}
 
Example #30
Source File: StringBasedRegionAccess.java    From xtext-core with Eclipse Public License 2.0 4 votes vote down vote up
@Override
public IEObjectRegion regionForRootEObject() {
	return root;
}