Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
304,600
XmlTag (final @NotNull UpdateParameterInfoContext context) { final XmlTag tag = findXmlTag(context.getFile(), context.getOffset()); if (tag != null) { final PsiElement currentXmlTag = context.getParameterOwner(); if (currentXmlTag == null || currentXmlTag == tag) return tag; } return null; }
findElementForUpdatingParameterInfo
304,601
void (final @NotNull XmlTag parameterOwner, final @NotNull UpdateParameterInfoContext context) { context.setParameterOwner(parameterOwner); }
updateParameterInfo
304,602
void (XmlElementDescriptor o, final @NotNull ParameterInfoUIContext context) { XmlTag parameterOwner = (XmlTag)context.getParameterOwner(); updateElementDescriptor(o, context, s -> parameterOwner != null && parameterOwner.getAttributeValue(s) != null); }
updateUI
304,603
void (XmlElementDescriptor descriptor, ParameterInfoUIContext context, Function<? super String, Boolean> attributePresentFun) { final XmlAttributeDescriptor[] attributes = descriptor != null ? getSortedDescriptors(descriptor) : XmlAttributeDescriptor.EMPTY; StringBuilder buffer = new StringBuilder(); int highlightStart...
updateElementDescriptor
304,604
boolean (HighlighterIterator iterator, int offset) { if (myBaseQuoteHandler.isClosingQuote(iterator, offset)) return true; return false; }
isClosingQuote
304,605
boolean (HighlighterIterator iterator, int offset) { if (myBaseQuoteHandler.isOpeningQuote(iterator, offset)) return true; return false; }
isOpeningQuote
304,606
boolean (Editor editor, HighlighterIterator iterator, int offset) { if (myBaseQuoteHandler.hasNonClosedLiteral(editor,iterator, offset)) return true; return false; }
hasNonClosedLiteral
304,607
boolean (HighlighterIterator iterator) { if (myBaseQuoteHandler.isInsideLiteral(iterator)) return true; return false; }
isInsideLiteral
304,608
String (@NotNull PsiFile file) { if (hasHtml(file) || supportsXmlTypedHandlers(file)) { return getQuoteStyleForFile(file).quote; } return "\""; }
getAttributeQuote
304,609
boolean (@NotNull PsiElement e) { return e instanceof XmlToken && !HtmlSelectioner.canSelectElement(e); }
canSelect
304,610
List<TextRange> (@NotNull PsiElement e, @NotNull CharSequence editorText, int cursorOffset, @NotNull Editor editor) { XmlToken token = (XmlToken)e; if (shouldSelectToken(token)) { List<TextRange> ranges = super.select(e, editorText, cursorOffset, editor); SelectWordUtil.addWordSelection(editor.getSettings().isCamelWord...
select
304,611
boolean (final XmlToken token) { return token.getTokenType() != XmlTokenType.XML_DATA_CHARACTERS && token.getTokenType() != XmlTokenType.XML_START_TAG_START && token.getTokenType() != XmlTokenType.XML_END_TAG_START && token.getTokenType() != XmlTokenType.XML_EMPTY_ELEMENT_END && token.getTokenType() != XmlTokenType.XML...
shouldSelectToken
304,612
boolean (final @NotNull PsiElement e) { return e instanceof XmlToken && ((XmlToken)e).getTokenType() == XmlTokenType.XML_DATA_CHARACTERS; }
canSelect
304,613
List<TextRange> (final @NotNull PsiElement e, final @NotNull CharSequence editorText, final int cursorOffset, final @NotNull Editor editor) { return PlainTextLineSelectioner.selectPlainTextLine(e, editorText, cursorOffset); }
select
304,614
Result (final @NotNull PsiFile file, final @NotNull Editor editor, final @NotNull Ref<Integer> caretOffset, final @NotNull Ref<Integer> caretAdvance, final @NotNull DataContext dataContext, final EditorActionHandler originalHandler) { final Project project = CommonDataKeys.PROJECT.getData(dataContext); if ((file instan...
preprocessEnter
304,615
boolean (Project project, Editor editor, PsiFile file, int offset) { if (offset == 0) return false; CharSequence chars = editor.getDocument().getCharsSequence(); if (chars.charAt(offset - 1) != '>') return false; EditorHighlighter highlighter = editor.getHighlighter(); HighlighterIterator iterator = highlighter.createI...
isBetweenXmlTags
304,616
boolean (Project project, Editor editor, PsiFile file, HighlighterIterator iterator) { if (iterator.getTokenType() != XmlTokenType.XML_TAG_END) { return false; } PsiDocumentManager.getInstance(project).commitDocument(editor.getDocument()); final PsiElement element = file.findElementAt(iterator.getStart()); if (element ...
isAtTheEndOfEmptyTag
304,617
boolean (@NotNull PsiElement e) { return e instanceof CompositePsiElement && ((CompositePsiElement)e).getElementType() == XmlElementType.XML_CDATA; }
canSelect
304,618
List<TextRange> (@NotNull PsiElement e, @NotNull CharSequence editorText, int cursorOffset, @NotNull Editor editor) { List<TextRange> result = super.select(e, editorText, cursorOffset, editor); PsiElement[] children = e.getChildren(); PsiElement first = null; PsiElement last = null; for (PsiElement child : children) { ...
select
304,619
Result (char c, @NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file, @NotNull FileType fileType) { var currentCaret = editor.getCaretModel().getCurrentCaret(); var quoteInsertedAt = currentCaret.getUserData(QUOTE_INSERTED_AT); if (quoteInsertedAt != null) { currentCaret.putUserData(QUOTE_INSERTED_AT...
beforeCharTyped
304,620
Result (char c, @NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file) { if (needToInsertQuotes) { int offset = editor.getCaretModel().getOffset(); PsiElement fileContext = file.getContext(); String toInsert = tryCompleteQuotes(fileContext); boolean showPopup = true; boolean showParameterInfo = false;...
charTyped
304,621
String (@NotNull PsiFile file) { return XmlEditUtil.getAttributeQuote(file); }
getDefaultQuote
304,622
AttributeValuePresentation (@NotNull Editor editor, @NotNull PsiFile file, @NotNull String quote) { PsiElement atParent = getAttributeCandidate(editor, file, true); XmlAttributeDescriptor descriptor; if (atParent instanceof XmlAttribute) { XmlTag parent = ((XmlAttribute)atParent).getParent(); return XmlExtension.getExt...
getValuePresentation
304,623
record (char quote, int position) {}
QuoteInfo
304,624
void (Editor editor) { Project project = editor.getProject(); if (project == null || !(editor instanceof EditorImpl)) { return; } Document document = editor.getDocument(); VirtualFile file = FileDocumentManager.getInstance().getFile(document); Language language = findXmlLikeLanguage(project, file); if (language != null...
createSynchronizerFor
304,625
void () { for (Editor editor : EditorFactory.getInstance().getAllEditors()) { TagNameSynchronizer synchronizer = editor.getUserData(SYNCHRONIZER_KEY); if (synchronizer != null) { Disposer.dispose(synchronizer); } createSynchronizerFor(editor); } }
recreateSynchronizers
304,626
Stream<TagNameSynchronizer> (@Nullable Document document) { if (document == null || !WebEditorOptions.getInstance().isSyncTagEditing()) { return Stream.empty(); } return EditorFactory.getInstance().editors(document, null) .map(editor -> editor.getUserData(SYNCHRONIZER_KEY)) .filter(Objects::nonNull); }
findSynchronizers
304,627
Language (Project project, VirtualFile file) { final PsiFile psiFile = file != null && file.isValid() ? PsiManager.getInstance(project).findFile(file) : null; if (psiFile != null) { for (Language language : psiFile.getViewProvider().getLanguages()) { if ((ContainerUtil.find(SUPPORTED_LANGUAGES, language::isKindOf) != n...
findXmlLikeLanguage
304,628
void (@NotNull Document document, @NotNull Runnable runnable) { document.putUserData(SKIP_COMMAND, Boolean.TRUE); try { runnable.run(); } finally { document.putUserData(SKIP_COMMAND, null); } }
runWithoutCancellingSyncTagsEditing
304,629
void (@NotNull EditorFactoryEvent event) { ReadAction.compute(() -> { createSynchronizerFor(event.getEditor()); return null; }); }
editorCreated
304,630
void (@NotNull CommandEvent event) { findSynchronizers(event.getDocument()).forEach(synchronizer -> synchronizer.beforeCommandFinished()); }
beforeCommandFinished
304,631
void (@NotNull IdeaPluginDescriptor pluginDescriptor) { recreateSynchronizers(); }
pluginLoaded
304,632
void (@NotNull IdeaPluginDescriptor pluginDescriptor, boolean isUpdate) { recreateSynchronizers(); }
pluginUnloaded
304,633
void () { myEditor.putUserData(SYNCHRONIZER_KEY, null); allMarkers.clear(); }
dispose
304,634
void () { Disposer.register(myEditor.getDisposable(), this); myEditor.getDocument().addDocumentListener(this, this); myEditor.getCaretModel().addCaretListener(this, this); myEditor.putUserData(SYNCHRONIZER_KEY, this); for (Caret caret : myEditor.getCaretModel().getAllCarets()) { Couple<RangeMarker> markers = getMarkers...
listenForDocumentChanges
304,635
void (@NotNull CaretEvent event) { Caret caret = event.getCaret(); if (caret != null) { clearMarkers(caret); } }
caretRemoved
304,636
void (@NotNull DocumentEvent event) { if (!WebEditorOptions.getInstance().isSyncTagEditing()) return; final Document document = event.getDocument(); Project project = Objects.requireNonNull(myEditor.getProject()); if (myApplying || project.isDefault() || UndoManager.getInstance(project).isUndoInProgress() || !PomModelI...
beforeDocumentChange
304,637
boolean (Couple<RangeMarker> markers, int offset, int oldLength) { RangeMarker leader = markers.first; return leader.isValid() && offset >= leader.getStartOffset() && offset + oldLength <= leader.getEndOffset(); }
fitsInMarker
304,638
Couple<RangeMarker> (Caret caret) { return caret.getUserData(MARKERS_KEY); }
getMarkers
304,639
void (Caret caret, Couple<RangeMarker> markers) { caret.putUserData(MARKERS_KEY, markers); allMarkers.add(markers.first); allMarkers.add(markers.second); }
setMarkers
304,640
void (Caret caret) { Couple<RangeMarker> markers = caret.getUserData(MARKERS_KEY); if (markers != null) { allMarkers.remove(markers.first); allMarkers.remove(markers.second); markers.first.dispose(); markers.second.dispose(); caret.putUserData(MARKERS_KEY, null); } }
clearMarkers
304,641
RangeMarker (Caret caret) { final int offset = caret.getOffset(); final Document document = myEditor.getDocument(); final CharSequence sequence = document.getCharsSequence(); int start = -1; boolean seenColon = false; for (int i = offset - 1; i >= Math.max(0, offset - 50); i--) { try { final char c = sequence.charAt(i)...
createTagNameMarker
304,642
RangeMarker (RangeMarker leader, PsiFile file, Document document) { final TextRange leaderRange = leader.getTextRange(); final int offset = leader.getStartOffset(); PsiElement element = findNameElement(InjectedLanguageUtilBase.findElementAtNoCommit(file, offset)); TextRange support = findSupportRange(element); if (!isS...
findSupport
304,643
PsiElement (@Nullable PsiElement element) { return element instanceof OuterLanguageElement ? TemplateLanguageUtil.getSameLanguageTreeNext(element) : element; }
findNameElement
304,644
boolean (char c) { if (XmlUtil.isValidTagNameChar(c)) return true; final XmlExtension extension = getXmlExtension(); if (extension == null) return false; return extension.isValidTagNameChar(c); }
isValidTagNameChar
304,645
RangeMarker (RangeMarker leader, PsiElement element, Document document) { int offset = leader.getStartOffset(); if (offset != leader.getEndOffset() || element == null || offset == 0) return null; XmlTag tag = tryCast(element.getParent(), XmlTag.class); CharSequence contents = document.getCharsSequence(); if (tag != nul...
findSupportForEmptyTag
304,646
boolean (@NotNull Document document, @NotNull TextRange leader, @Nullable TextRange support) { if (support == null) return false; return document.getText(leader).equals(document.getText(support)); }
isSupportRangeValid
304,647
int (@NotNull PsiElement support) { PsiElement current = support; while (current.getPrevSibling() instanceof OuterLanguageElement) { current = current.getPrevSibling(); } return current.getTextRange().getStartOffset(); }
findSupportRangeStart
304,648
int (@NotNull PsiElement support) { PsiElement current = support; while (current.getNextSibling() instanceof OuterLanguageElement) { current = current.getNextSibling(); } return current.getTextRange().getEndOffset(); }
findSupportRangeEnd
304,649
boolean (final PsiElement e) { return !(e instanceof XmlElement); }
value
304,650
boolean (@NotNull PsiFile file, @NotNull Editor editor, @NotNull String selectedText, char c) { if (selectedText.startsWith("<") && selectedText.endsWith(">")) { SelectionModel model = editor.getSelectionModel(); int startIndex = model.getSelectionStart(); PsiElement start = file.findElementAt(startIndex); int endIndex...
skipReplacementQuotesOrBraces
304,651
boolean (HighlighterIterator iterator, int offset) { return iterator.getTokenType() == XmlTokenType.XML_ATTRIBUTE_VALUE_END_DELIMITER; }
isClosingQuote
304,652
boolean (HighlighterIterator iterator, int offset) { return iterator.getTokenType() == XmlTokenType.XML_ATTRIBUTE_VALUE_START_DELIMITER; }
isOpeningQuote
304,653
boolean (Editor editor, HighlighterIterator iterator, int offset) { return true; }
hasNonClosedLiteral
304,654
boolean (HighlighterIterator iterator) { return false; }
isInsideLiteral
304,655
boolean (@NotNull PsiElement e) { return e instanceof XmlTag; }
canSelect
304,656
List<TextRange> (@NotNull PsiElement e, @NotNull CharSequence editorText, int cursorOffset, @NotNull Editor editor) { List<TextRange> result = super.select(e, editorText, cursorOffset, editor); PsiElement[] children = e.getChildren(); addTagContentSelection(children, result, editorText); PsiElement prev = e.getPrevSibl...
select
304,657
void (final PsiElement[] children, final List<? super TextRange> result, final CharSequence editorText) { PsiElement first = null; PsiElement last = null; for (PsiElement child : children) { if (child instanceof XmlToken token) { if (token.getTokenType() == XmlTokenType.XML_TAG_END) { first = token.getNextSibling(); } ...
addTagContentSelection
304,658
Result (char c, @NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file) { if (c == '?' && file.getLanguage() == XMLLanguage.INSTANCE) { int offset = editor.getCaretModel().getOffset(); if (offset >= 2 && editor.getDocument().getCharsSequence().charAt(offset - 2) == '<') { PsiDocumentManager.getInstance...
charTyped
304,659
Result (final char c, final @NotNull Project project, @NotNull Editor editor, @NotNull PsiFile editedFile, final @NotNull FileType fileType) { final WebEditorOptions webEditorOptions = WebEditorOptions.getInstance(); if (c == '>' && webEditorOptions != null && webEditorOptions.isAutomaticallyInsertClosingTag() && fileC...
beforeCharTyped
304,660
Result (@NotNull Project project, XmlTag tag, String name, PsiFile file, @NotNull Editor editor) { return Result.CONTINUE; }
insertTagContent
304,661
boolean (@Nullable PsiFile editedFile) { if (editedFile == null) return false; if (editedFile.getLanguage() instanceof XMLLanguage) { return true; } if (HtmlUtil.supportsXmlTypedHandlers(editedFile)) { return true; } final FileViewProvider provider = editedFile.getViewProvider(); if (provider.getBaseLanguage() instance...
fileContainsXmlLanguage
304,662
Result (char charTyped, @NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file) { if (charTyped != '&' || !(file instanceof HtmlFileImpl)) { return Result.CONTINUE; } PsiElement element = file.findElementAt(editor.getCaretModel().getOffset()); if (element == null) { return Result.CONTINUE; } IElementTy...
checkAutoPopup
304,663
boolean (@NotNull PsiElement e) { return e instanceof XmlAttribute || e instanceof XmlAttributeValue; }
canSelect
304,664
boolean (@NotNull PsiElement e) { return canSelectElement(e); }
canSelect
304,665
boolean (final PsiElement e) { if (e instanceof XmlToken) { return HtmlUtil.hasHtml(e.getContainingFile()) || HtmlUtil.supportsXmlTypedHandlers(e.getContainingFile()); } return false; }
canSelectElement
304,666
List<TextRange> (@NotNull PsiElement e, @NotNull CharSequence editorText, int cursorOffset, @NotNull Editor editor) { List<TextRange> result; if (!(e instanceof XmlToken) || XmlTokenSelectioner.shouldSelectToken((XmlToken)e) || ((XmlToken)e).getTokenType() == XmlTokenType.XML_DATA_CHARACTERS) { result = super.select(e,...
select
304,667
void (PsiElement e, List<? super TextRange> result) { XmlTag tag = PsiTreeUtil.getParentOfType(e, XmlTag.class, true); while (tag != null) { result.add(tag.getTextRange()); final ASTNode tagStartEnd = XmlChildRole.START_TAG_END_FINDER.findChild(tag.getNode()); final ASTNode tagEndStart = XmlChildRole.CLOSING_TAG_START_...
addTagSelection2
304,668
void (@NotNull List<? super TextRange> result, @NotNull Editor editor, int cursorOffset, @NotNull CharSequence editorText, @Nullable PsiElement e) { final XmlAttribute attribute = PsiTreeUtil.getParentOfType(e, XmlAttribute.class); if (attribute != null) { result.add(attribute.getTextRange()); final XmlAttributeValue v...
addAttributeSelection
304,669
int (@NotNull PsiElement element, @NotNull CharSequence text, int cursorOffset) { if (WebEditorOptions.getInstance().isSelectWholeCssIdentifierOnDoubleClick()) { final XmlAttribute attribute = PsiTreeUtil.getParentOfType(element, XmlAttribute.class); final XmlAttributeValue attributeValue = PsiTreeUtil.getParentOfType(...
getMinimalTextRangeLength
304,670
String () { return HtmlUtil.CLASS_ATTRIBUTE_NAME; }
getClassAttributeName
304,671
void (@NotNull List<? super TextRange> result, @NotNull Editor editor, int cursorOffset, @NotNull CharSequence editorText, @NotNull XmlAttributeValue attributeValue) { final TextRange attributeValueTextRange = attributeValue.getTextRange(); final LinkedList<TextRange> wordRanges = new LinkedList<>(); SelectWordUtil.add...
addClassAttributeRanges
304,672
void (final Project project, final Editor editor) { AutoPopupController.getInstance(project).autoPopupMemberLookup(editor, file -> { int offset = editor.getCaretModel().getOffset(); PsiElement lastElement = InjectedLanguageUtil.findElementAtNoCommit(file, offset - 1); if (lastElement instanceof PsiFile) { //the very en...
autoPopupXmlLookup
304,673
boolean (final PsiElement element, final PsiFile file, final Ref<Boolean> isRelevantLanguage, final Ref<Boolean> isAnt) { Boolean isAntFile = isAnt.get(); if (isAntFile == null) { isAntFile = XmlUtil.isAntFile(file); isAnt.set(isAntFile); } Boolean result = isRelevantLanguage.get(); if (result == null) { Language langu...
isLanguageRelevant
304,674
Result (final char c, final @NotNull Project project, final @NotNull Editor editor, final @NotNull PsiFile editedFile, final @NotNull FileType fileType) { if (c == '/' && XmlGtTypedHandler.fileContainsXmlLanguage(editedFile)) { PsiDocumentManager.getInstance(project).commitAllDocuments(); PsiFile file = PsiDocumentMana...
beforeCharTyped
304,675
Result (final char c, final @NotNull Project project, final @NotNull Editor editor, final @NotNull PsiFile editedFile) { if (!WebEditorOptions.getInstance().isAutoCloseTag()) return Result.CONTINUE; if (c == '/' && XmlGtTypedHandler.fileContainsXmlLanguage(editedFile)) { PsiDocumentManager.getInstance(project).commitAl...
charTyped
304,676
boolean (XmlTag tag, XmlTag tag1, int offset) { if (tag1 == null || tag1 == tag || tag1.getTextOffset() <= tag.getTextOffset()) return false; if (hasUnclosedParent(tag1)) return true; if (XmlUtil.getTokenOfType(tag1, XmlTokenType.XML_EMPTY_ELEMENT_END) != null) return false; XmlToken element = XmlTagUtil.getEndTagNameE...
shouldReplace
304,677
boolean (XmlTag tag) { String name = tag.getName(); while (tag != null) { if (XmlUtil.getTokenOfType(tag, XmlTokenType.XML_EMPTY_ELEMENT_END) == null && XmlTagUtil.getEndTagNameElement(tag) == null && name.equals(tag.getName())) { return true; } tag = tag.getParentTag(); } return false; }
hasUnclosedParent
304,678
void (@NotNull Editor editor) { Project project = editor.getProject(); if (project != null) { PsiDocumentManager documentManager = PsiDocumentManager.getInstance(project); Document document = editor.getDocument(); documentManager.commitDocument(document); int lineOffset = document.getLineStartOffset(document.getLineNum...
autoIndent
304,679
boolean (@NotNull PsiElement e) { return e instanceof XmlAttlistDecl || e instanceof XmlElementDecl; }
canSelect
304,680
List<TextRange> (@NotNull PsiElement e, @NotNull CharSequence editorText, int cursorOffset, @NotNull Editor editor) { PsiElement[] children = e.getChildren(); PsiElement first = null; PsiElement last = null; for (PsiElement child : children) { if (child instanceof XmlToken token) { if (token.getTokenType() == XmlTokenT...
select
304,681
boolean (final @NotNull Editor editor, final @NotNull PsiFile file, final @NotNull MoveInfo info, final boolean down) { if (!super.checkAvailable(editor, file, info, down)) return false; // updated moved range end to cover multiline tag start final Document document = editor.getDocument(); int movedLineStart = document...
checkAvailable
304,682
TextRange (@NotNull XmlTag parent) { return parent.getValue().getTextRange(); }
getTagContentRange
304,683
boolean (MoveInfo info, XmlTag moved, XmlTag target, boolean down) { if (target.getParent() == moved) { // we are going to jump into our own children // this can mean that target computed incorrectly XmlTag next = down ? PsiTreeUtil.getNextSiblingOfType(moved, XmlTag.class) : PsiTreeUtil.getPrevSiblingOfType(moved, Xml...
moveTags
304,684
boolean (PsiElement movedEndElement, PsiElement movedStartElement) { final XmlText text = PsiTreeUtil.getParentOfType(movedStartElement, XmlText.class); final XmlText text2 = PsiTreeUtil.getParentOfType(movedEndElement, XmlText.class); // Let's do not care about injections for this mover if ( ( text != null && Injected...
checkInjections
304,685
void (final Document document, final @NotNull MoveInfo info, final int offset) { if (offset + 1 < document.getTextLength()) { final int line = document.getLineNumber(offset + 1); final LineRange toMove2 = info.toMove2; if (toMove2 == null) return; info.toMove2 = new LineRange(toMove2.startLine, MathUtil.clamp(line, toM...
updatedMovedIntoEnd
304,686
int (final Document document, int movedLineStart, final int offset, final @NotNull MoveInfo info, final boolean down) { final int line = document.getLineNumber(offset); final LineRange toMove = info.toMove; int delta = toMove.startLine - line; info.toMove = new LineRange(Math.min(line, toMove.startLine), toMove.endLine...
updateMovedRegionStart
304,687
int (final Document document, int movedLineStart, final int valueStart, final @NotNull MoveInfo info, final boolean down) { final int line = document.getLineNumber(valueStart); final LineRange toMove = info.toMove; int delta = line - toMove.endLine; info.toMove = new LineRange(toMove.startLine, Math.max(line, toMove.en...
updateMovedRegionEnd
304,688
void (@NotNull ProgressIndicator progress) { if (ApplicationManager.getApplication().isUnitTestMode()) { return; } if (!WebEditorOptions.getInstance().isTagTreeHighlightingEnabled()) { return; } int offset = myEditor.getCaretModel().getOffset(); PsiElement[] elements = PsiFileBreadcrumbsCollector.getLinePsiElements(myE...
doCollectInformation
304,689
boolean (@Nullable PsiElement element) { if (element == null) return false; IElementType type = element.getNode().getElementType(); if (type == XmlTokenType.XML_NAME || type == XmlTokenType.XML_TAG_NAME) return isTagStartOrEnd(element.getNextSibling()) || isTagStartOrEnd(element.getPrevSibling()); return type == XmlTok...
isTagStartOrEnd
304,690
void () { List<HighlightInfo> infos = getHighlights(); UpdateHighlightersUtil.setHighlightersToSingleEditor(myProject, myEditor, 0, myFile.getTextLength(), infos, getColorsScheme(), getId()); }
doApplyInformationToEditor
304,691
List<HighlightInfo> () { clearLineMarkers(myEditor); int count = myPairsToHighlight.size(); List<HighlightInfo> highlightInfos = new ArrayList<>(count * 2); MarkupModel markupModel = myEditor.getMarkupModel(); Color[] baseColors = XmlTagTreeHighlightingUtil.getBaseColors(); Color[] colorsForEditor = count > 1 ? toColor...
getHighlights
304,692
void (Editor editor) { List<RangeHighlighter> oldHighlighters = editor.getUserData(TAG_TREE_HIGHLIGHTERS_IN_EDITOR_KEY); if (oldHighlighters != null) { MarkupModelEx markupModel = (MarkupModelEx)editor.getMarkupModel(); for (RangeHighlighter highlighter : oldHighlighters) { if (markupModel.containsHighlighter(highlight...
clearLineMarkers
304,693
HighlightInfo (Color color, @NotNull TextRange range) { TextAttributes attributes = new TextAttributes(null, color, null, null, Font.PLAIN); return HighlightInfo.newHighlightInfo(TYPE).range(range).textAttributes(attributes) .severity(HighlightInfoType.ELEMENT_UNDER_CARET_SEVERITY).createUnconditionally(); }
createHighlightInfo
304,694
RangeHighlighter (MarkupModel mm, @NotNull TextRange range, Color color) { RangeHighlighter highlighter = mm.addRangeHighlighter(null, range.getStartOffset(), range.getEndOffset(), 0, HighlighterTargetArea.LINES_IN_RANGE); highlighter.setLineMarkerRenderer((__, g, r) -> { g.setColor(color); g.fillRect(r.x - 1, r.y, 2, ...
createHighlighter
304,695
Color (int gray, Color color) { //noinspection UseJBColor return color == null ? null : new Color( toLineMarkerColor(gray, color.getRed()), toLineMarkerColor(gray, color.getGreen()), toLineMarkerColor(gray, color.getBlue())); }
toLineMarkerColor
304,696
int (int gray, int color) { int value = (int)(gray * 0.6 + 0.32 * color); return value < 0 ? 0 : Math.min(value, 255); }
toLineMarkerColor
304,697
Color[] (Color[] baseColors) { Color[] colors = new Color[baseColors.length]; for (int i = 0; i < colors.length; i++) { colors[i] = toLineMarkerColor(239, baseColors[i]); } return colors; }
toColorsForLineMarkers
304,698
Color[] (Color[] baseColors) { Color tagBackground = myEditor.getBackgroundColor(); Color[] resultColors = new Color[baseColors.length]; // todo: make configurable double transparency = WebEditorOptions.getInstance().getTagTreeHighlightingOpacity() * 0.01; for (int i = 0; i < resultColors.length; i++) { Color color = b...
toColorsForEditor
304,699
void (Editor editor, @NotNull Project project) { MarkupModel markupModel = DocumentMarkupModel.forDocument(editor.getDocument(), project, true); for (RangeHighlighter highlighter : markupModel.getAllHighlighters()) { HighlightInfo info = HighlightInfo.fromRangeHighlighter(highlighter); if (info == null) continue; if (i...
clearHighlightingAndLineMarkers