boolean (Editor editor, String tagTemplate, String relativePath, PsiElement parent) { for (PsiElement element : parent.getChildren()) { if (element instanceof XmlTag tag) { if (tagTemplate.startsWith("<" + tag.getName() + " ")) { final String attrName = HtmlUtil.SCRIPT_TAG_NAME.equals(tag.getName()) ? "src" : "href"; String path = tag.getAttributeValue(attrName); if (StringUtil.equals(path, relativePath)) { final LogicalPosition position = getPosition(editor, tag, attrName); editor.getScrollingModel().scrollTo(position, ScrollType.MAKE_VISIBLE); final int flags = HintManager.HIDE_BY_ANY_KEY | HintManager.HIDE_BY_TEXT_CHANGE | HintManager.HIDE_BY_SCROLLING; final LightweightHint hint = new LightweightHint(HintUtil.createInformationLabel( HtmlToolsBundle.message("html.drop.handler.hint.text.file.already.linked", relativePath))); final Point point = HintManagerImpl.getHintPosition(hint, editor, position, HintManager.ABOVE); HintManagerImpl.getInstanceImpl().showEditorHint(hint, editor, point, flags, 0, false); return true; } } } } return false; }