@Override public boolean equals(Object other) { if (other == null) return false; if (other == this) return true; if (other instanceof Triple<?,?,?>) { Triple<?,?,?> r = (Triple<?,?,?>) other; if (!super.equals(other)) return false; return third==null?r.getThird()==null : third.equals(r.getThird()); } return false; }
@Override public boolean equals(Object other) { if (other == null) return false; if (other == this) return true; if (other instanceof Triple<?,?,?>) { Triple<?,?,?> r = (Triple<?,?,?>) other; if (!super.equals(other)) return false; return third==null?r.getThird()==null : third.equals(r.getThird()); } return false; }
@Override public int hashCode() { return super.hashCode()+ 17*(third==null?0:getThird().hashCode()); }
@Override public int hashCode() { return super.hashCode()+ 17*(third==null?0:getThird().hashCode()); }
public String getLinkText() { return linkingHelper.getCrossRefNodeAsString(triple.getThird(), true); }
@Override public String toString() { return "Triple("+getFirst()+","+getSecond()+","+getThird()+")"; }
@Override public String toString() { return "Triple("+getFirst()+","+getSecond()+","+getThird()+")"; }
protected void refreshAttributes() { Collections.sort(highlightings, this); for (Triple<String, String, TextStyle> highlighting : highlightings) { preferenceStoreAccessor.populateTextStyle(highlighting.getFirst(), new TextStyle(), highlighting.getThird()); } }
public SemanticNodeIterator(EObject obj) { INode start = NodeModelUtils.findActualNodeFor(obj); if (start != null) { this.next = findNext(start, false); while (this.next != null && this.next.getThird() == obj) this.next = findNext(this.next.getFirst(), false); } else this.next = null; }
protected Diagnostic createDiagnostic(Triple<EObject, EReference, INode> triple, DiagnosticMessage message) { Diagnostic diagnostic = new XtextLinkingDiagnostic(triple.getThird(), message.getMessage(), message.getIssueCode(), message.getIssueData()); return diagnostic; }
Throwable throwable = result.getThird();
triple.getFirst(), reference, triple.getThird());
boolean _tripleEquals = (_bundleName == null); if (_tripleEquals) { manifest.setBundleName(entry.getThird());
@Override public TreeAppendable append(JvmType type) { if(type.eIsProxy()) { String fragment = ((InternalEObject)type).eProxyURI().fragment(); Triple<EObject, EReference, INode> unresolvedLink = encoder.decode(getState().getResource(), fragment); if(unresolvedLink != null) { INode linkNode = unresolvedLink.getThird(); if(linkNode != null) { append(NodeModelUtils.getTokenText(linkNode)); return this; } } append("unresolved type"); return this; } return super.append(type); }
if (_isCrossLinkFragment) { final Triple<EObject, EReference, INode> triple = this.encoder.decode(it.eResource(), uri.fragment()); final List<EObject> candidates = this.linkingService.getLinkedObjects(triple.getFirst(), triple.getSecond(), triple.getThird()); boolean _isEmpty = candidates.isEmpty(); boolean _not = (!_isEmpty);
public void createSequence(EObject context, EObject semanticObject) { SemanticNodeIterator ni = new SemanticNodeIterator(semanticObject); while (ni.hasNext()) { Triple<INode, AbstractElement, EObject> node = ni.next(); if (node.getSecond() instanceof RuleCall) { RuleCall rc = (RuleCall) node.getSecond(); if (rc.getRule().getType().getClassifier() instanceof EClass) acceptSemantic(semanticObject, rc, node.getThird(), node.getFirst()); else if (GrammarUtil.containingCrossReference(node.getSecond()) != null) { EStructuralFeature feature = FeatureFinderUtil .getFeature(node.getSecond(), semanticObject.eClass()); acceptSemantic(semanticObject, rc, semanticObject.eGet(feature), node.getFirst()); } else { String strVal = NodeModelUtils.getTokenText(node.getFirst()); Object val = valueConverter.toValue(strVal, rc.getRule().getName(), node.getFirst()); acceptSemantic(semanticObject, rc, val, node.getFirst()); } } else if (node.getSecond() instanceof Keyword) acceptSemantic(semanticObject, node.getSecond(), node.getFirst().getText(), node.getFirst()); else if (node.getSecond() instanceof Action) { acceptSemantic(semanticObject, node.getSecond(), semanticObject, node.getFirst()); } } }