private Stream<ElmReference> getReferencesFromNonSinglePath(List<ElmUpperCaseId> children) { ElmUpperCaseId lastChild = children.get(children.size() - 1); children.remove(children.size() - 1); int moduleTextLength = this.getTextLength() - lastChild.getTextLength() - 1; if (moduleTextLength < 0) { moduleTextLength = 0; } ElmReference reference = new ElmAbsoluteTypeReference(lastChild, children); return Stream.concat( Stream.of( new ElmContainingModuleReference( this, new TextRange(0, moduleTextLength), children.size(), reference)), Stream.of(reference.referenceInAncestor(this))); }
private static Stream<ElmReference> getReferencesFromSingleId(ElmUpperCaseId element) { if (ElmCoreLibrary.isBuiltIn(element.getText())) { return Stream.empty(); } else { return Stream.of(new ElmTypeReference(element)); } }