void (@NotNull MultiHostRegistrar registrar, @NotNull PsiElement context) { XmlAttributeValue value = (XmlAttributeValue)context; PsiElement parent1 = value.getParent(); if (parent1 instanceof XmlAttribute) { @NonNls String attrName = ((XmlAttribute)parent1).getLocalName(); if ("jsInBraces".equals(attrName)) { registrar.startInjecting(js); String text = value.getText(); int index = 0; while (text.indexOf('{', index) != -1) { int lbrace = text.indexOf('{', index); int rbrace = text.indexOf('}', index); registrar.addPlace("", "", (PsiLanguageInjectionHost)value, new TextRange(lbrace + 1, rbrace)); index = rbrace + 1; } registrar.doneInjecting(); } } } @Override @NotNull public List<? extends Class<? extends PsiElement>> elementsToInjectIn() { return Collections.singletonList(XmlAttributeValue.class); } }