use of com.github._1c_syntax.bsl.languageserver.context.symbol.Exportable in project bsl-language-server by 1c-syntax.
the class ReferenceIndex method isReferenceAccessible.
private static boolean isReferenceAccessible(Reference reference) {
if (!reference.isSourceDefinedSymbolReference()) {
return true;
}
SourceDefinedSymbol to = reference.getSourceDefinedSymbol().orElseThrow();
SourceDefinedSymbol from = reference.getFrom();
if (to.getOwner().equals(from.getOwner())) {
return true;
}
if (to instanceof Exportable) {
return ((Exportable) to).isExport();
}
return true;
}
Aggregations