void (@NotNull MultiHostRegistrar registrar, @NotNull PsiElement context) { if (!(context instanceof JsonStringLiteral)) return; if (!JsonSchemaService.isSchemaFile(context.getContainingFile())) return; JsonOriginalPsiWalker walker = JsonOriginalPsiWalker.INSTANCE; ThreeState isName = walker.isName(context); JsonPointerPosition position = walker.findPosition(context, isName == ThreeState.NO); if (position == null || position.isEmpty()) return; if (isName == ThreeState.YES) { if ("patternProperties".equals(position.getLastName())) { if (isNestedInPropertiesList(position)) return; injectForHost(registrar, (JsonStringLiteral)context, EcmaScriptRegexpLanguage.INSTANCE); } } else if (isName == ThreeState.NO) { if ("pattern".equals(position.getLastName())) { if (isNestedInPropertiesList(position)) return; injectForHost(registrar, (JsonStringLiteral)context, EcmaScriptRegexpLanguage.INSTANCE); } } }