Class PlatformMethodCallInlayHintSupplier
java.lang.Object
com.github._1c_syntax.bsl.languageserver.inlayhints.AbstractMethodCallInlayHintSupplier
com.github._1c_syntax.bsl.languageserver.inlayhints.PlatformMethodCallInlayHintSupplier
- All Implemented Interfaces:
InlayHintSupplier
@Component
public class PlatformMethodCallInlayHintSupplier
extends AbstractMethodCallInlayHintSupplier
Inlay-hint'ы с именами параметров для вызовов ПЛАТФОРМЕННЫХ методов и
глобальных функций (по аналогии с
SourceDefinedMethodCallInlayHintSupplier,
но для не-source-defined символов: СтрНайти("a","b","",1),
Сообщение.Сообщить(), Новый Массив(5) и т.п.).
Резолв члена выполняется через TypeService.memberAt(DocumentContext, Position), что
покрывает три кейса:
BSLParser.GlobalMethodCallContext— глобальная функция (СтрНайти, Сообщить, ПолучитьСообщенияПользователю …);BSLParser.MethodCallContext— доступ через точку (Объект.Метод());BSLParser.NewExpressionContext— конструктор (Новый Тип(...)) — обрабатывается отдельно черезTypeService.getConstructors(TypeRef, FileType).
Source-defined вызовы покрываются другим supplier'ом и здесь
фильтруются — TypeService.memberAt(DocumentContext, Position) для них возвращает
MemberDescriptor с непустым sourceSymbol.
-
Field Summary
Fields inherited from class AbstractMethodCallInlayHintSupplier
configurationFields inherited from interface InlayHintSupplier
INLAY_HINT_SUPPLIER -
Constructor Summary
ConstructorsConstructorDescriptionPlatformMethodCallInlayHintSupplier(LanguageServerConfiguration configuration, TypeService typeService, Resources resources) -
Method Summary
Modifier and TypeMethodDescriptiongetInlayHints(DocumentContext documentContext, InlayHintParams params) Получить inlay hints, доступные в документе.Methods inherited from class AbstractMethodCallInlayHintSupplier
showDefaultValues, showParametersWithTheSameNameMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface InlayHintSupplier
getId
-
Constructor Details
-
PlatformMethodCallInlayHintSupplier
public PlatformMethodCallInlayHintSupplier(LanguageServerConfiguration configuration, TypeService typeService, Resources resources)
-
-
Method Details
-
getInlayHints
Description copied from interface:InlayHintSupplierПолучить inlay hints, доступные в документе.- Parameters:
documentContext- Контекст документа, для которого надо рассчитать inlay hints.params- Параметры запроса.- Returns:
- Список inlay hints в документе.
-