public void after(EObject after) { this.type = LocatorType.AFTER; this.after = after; this.before = null; addLocator(this); }
protected void addLocatorSemantic(ElementLocator locator) { List<AbstractElement> before = getAbstractElements(locator.before); List<AbstractElement> after = getAbstractElements(locator.after); if (before != null && after != null) for (AbstractElement b : before) for (AbstractElement a : after) addLocatorSemantic(locator, b, a); else if (before != null) for (AbstractElement b : before) addLocatorSemantic(locator, b, null); else if (after != null) for (AbstractElement a : after) addLocatorSemantic(locator, null, a); }
protected void addLocator(ElementLocator locator) { if ((locator.before instanceof AbstractRule && hiddenTokenHelper.isComment((AbstractRule) locator.before)) || (locator.after instanceof AbstractRule && hiddenTokenHelper.isComment((AbstractRule) locator.after))) addLocatorComment(locator); else addLocatorSemantic(locator); }
public void before(EObject right) { this.type = LocatorType.BEFORE; this.before = right; this.after = null; addLocator(this); }
public void around(EObject ele) { this.type = LocatorType.AROUND; this.after = ele; this.before = ele; addLocator(this); }
public void between(EObject left, EObject right) { this.type = LocatorType.BETWEEN; this.after = left; this.before = right; addLocator(this); }
public void bounds(EObject left, EObject right) { this.type = LocatorType.BOUNDS; this.after = left; this.before = right; addLocator(this); }
public void range(EObject left, EObject right) { type = LocatorType.RANGE; this.after = left; this.before = right; addLocator(this); }