Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
241,200
int (@NotNull CharSequence text, int start, int end) { for (; start < end; start++) { char c = text.charAt(start); if (c != ' ' && c != '\t' && c != '\n' && c != '\r') { return start; } } return -1; }
findFirstNonSpaceOffsetInRange
241,201
void (@NotNull Editor editor, boolean isWithSelection) { moveCaretToLineEnd(editor, isWithSelection, true); }
moveCaretToLineEnd
241,202
void (@NotNull Editor editor, boolean isWithSelection, boolean ignoreTrailingWhitespace) { Document document = editor.getDocument(); SelectionModel selectionModel = editor.getSelectionModel(); int selectionStart = selectionModel.getLeadSelectionOffset(); CaretModel caretModel = editor.getCaretModel(); LogicalPosition b...
moveCaretToLineEnd
241,203
void (@NotNull Editor editor, boolean isWithSelection, boolean camel) { moveToNextCaretStop(editor, EditorSettingsExternalizable.getInstance().getCaretStopOptions().getForwardPolicy(), isWithSelection, camel); }
moveCaretToNextWord
241,204
void (@NotNull Editor editor, @NotNull CaretStopPolicy caretStopPolicy, boolean isWithSelection, boolean isCamel) { Document document = editor.getDocument(); SelectionModel selectionModel = editor.getSelectionModel(); int selectionStart = selectionModel.getLeadSelectionOffset(); CaretModel caretModel = editor.getCaretM...
moveToNextCaretStop
241,205
void (@NotNull Editor editor, boolean isWithSelection, int selectionStart, @NotNull LogicalPosition blockSelectionStart) { SelectionModel selectionModel = editor.getSelectionModel(); CaretModel caretModel = editor.getCaretModel(); if (isWithSelection) { if (editor.isColumnMode() && !caretModel.supportsMultipleCarets())...
setupSelection
241,206
void (@NotNull Editor editor) { final CaretModel caretModel = editor.getCaretModel(); final VisualPosition pos = caretModel.getVisualPosition(); VisualPosition prevPos = editor.getUserData(PREV_POS); if (prevPos != null) { int columnShift = pos.line == prevPos.line ? pos.column - prevPos.column : 0; int caret = caretMo...
selectNonexpandableFold
241,207
void (@NotNull Editor editor, boolean isWithSelection, boolean camel) { moveToPreviousCaretStop(editor, EditorSettingsExternalizable.getInstance().getCaretStopOptions().getBackwardPolicy(), isWithSelection, camel); }
moveCaretToPreviousWord
241,208
void (@NotNull Editor editor, @NotNull CaretStopPolicy caretStopPolicy, boolean isWithSelection, boolean isCamel) { SelectionModel selectionModel = editor.getSelectionModel(); int selectionStart = selectionModel.getLeadSelectionOffset(); CaretModel caretModel = editor.getCaretModel(); LogicalPosition blockSelectionStar...
moveToPreviousCaretStop
241,209
void (@NotNull Editor editor, boolean isWithSelection) { int lineHeight = editor.getLineHeight(); Rectangle visibleArea = getVisibleArea(editor); editor.getScrollingModel().scrollVertically(adjustYToVisualLineBase(editor, visibleArea.y - visibleArea.height / lineHeight * lineHeight)); int lineShift = calcVisualLineIncr...
moveCaretPageUp
241,210
void (@NotNull Editor editor, boolean isWithSelection) { int lineHeight = editor.getLineHeight(); Rectangle visibleArea = getVisibleArea(editor); int allowedBottom = ((EditorEx)editor).getContentSize().height - visibleArea.height; editor.getScrollingModel().scrollVertically( Math.min(allowedBottom, adjustYToVisualLineB...
moveCaretPageDown
241,211
void (@NotNull Editor editor, @Nullable Project project) { editor.getCaretModel().removeSecondaryCarets(); editor.getCaretModel().moveToOffset(0); editor.getSelectionModel().removeSelection(); ScrollingModel scrollingModel = editor.getScrollingModel(); scrollingModel.disableAnimation(); scrollingModel.scrollToCaret(Scr...
moveCaretToTextStart
241,212
void (@NotNull Editor editor, @Nullable Project project) { editor.getCaretModel().removeSecondaryCarets(); int offset = editor.getDocument().getTextLength(); if (editor instanceof EditorImpl) { editor.getCaretModel().moveToLogicalPosition(editor.offsetToLogicalPosition(offset).leanForward(true)); } else { editor.getCar...
moveCaretToTextEnd
241,213
int (@NotNull Editor editor, int y) { int visualLineBaseY = editor.visualLineToY(editor.yToVisualLine(y)); return y > visualLineBaseY && y < visualLineBaseY + editor.getLineHeight() ? visualLineBaseY : y; }
adjustYToVisualLineBase
241,214
int (@NotNull Editor editor, int visualLine, int yIncrement) { int startY = editor.visualLineToY(visualLine) + (yIncrement > 0 ? editor.getLineHeight() - 1 : 0); int targetY = startY + yIncrement; int targetVisualLine = editor.yToVisualLine(targetY); int targetVisualLineBase = editor.visualLineToY(targetVisualLine); if...
calcVisualLineIncrement
241,215
void (@NotNull Editor editor, boolean isWithSelection) { SelectionModel selectionModel = editor.getSelectionModel(); int selectionStart = selectionModel.getLeadSelectionOffset(); CaretModel caretModel = editor.getCaretModel(); LogicalPosition blockSelectionStart = caretModel.getLogicalPosition(); Rectangle visibleArea ...
moveCaretPageTop
241,216
void (@NotNull Editor editor, boolean isWithSelection) { SelectionModel selectionModel = editor.getSelectionModel(); int selectionStart = selectionModel.getLeadSelectionOffset(); CaretModel caretModel = editor.getCaretModel(); LogicalPosition blockSelectionStart = caretModel.getLogicalPosition(); Rectangle visibleArea ...
moveCaretPageBottom
241,217
Rectangle (@NotNull Editor editor) { ScrollingModel model = editor.getScrollingModel(); return EditorCoreUtil.isTrueSmoothScrollingEnabled() ? model.getVisibleAreaOnScrollingFinished() : model.getVisibleArea(); }
getVisibleArea
241,218
boolean (@NotNull CharSequence text, int offset) { return 0 < offset && offset < text.length() && isWhitespace(text.charAt(offset - 1)) && isWhitespace(text.charAt(offset)); }
isBetweenWhitespaces
241,219
boolean (@NotNull CharSequence text, int offset, boolean isCamel) { return isWordBoundary(text, offset, isCamel, true); }
isWordStart
241,220
boolean (@NotNull CharSequence text, int offset, boolean isCamel) { return isWordBoundary(text, offset, isCamel, false); }
isWordEnd
241,221
boolean (@NotNull CharSequence text, int offset, boolean isCamel, boolean isStart) { if (offset < 0 || offset > text.length()) return false; final char prev = offset > 0 ? text.charAt(offset - 1) : 0; final char curr = offset < text.length() ? text.charAt(offset) : 0; final char word = isStart ? curr : prev; final char...
isWordBoundary
241,222
boolean (@NotNull CharSequence text, int offset, boolean isStart) { if (offset <= 0 || offset >= text.length()) return false; final char prev = text.charAt(offset - 1); final char curr = text.charAt(offset); final char next = offset + 1 < text.length() ? text.charAt(offset + 1) : 0; // 0x00 is not lowercase. final char...
isHumpBound
241,223
boolean (char c) { return isLowerCase(c) || isDigit(c); }
isLowerCaseOrDigit
241,224
boolean (char c) { return !(isJavaIdentifierPart(c) || isWhitespace(c)); }
isPunctuation
241,225
void (@NotNull Editor editor) { editor.getCaretModel().moveToLogicalPosition(EditorUtil.calcCaretLineRange(editor).first); }
moveCaretToLineStartIgnoringSoftWraps
241,226
void (final @NotNull Editor editor, final int offset) { FoldingModel foldingModel = editor.getFoldingModel(); while (true) { FoldRegion region = foldingModel.getCollapsedRegionAtOffset(offset); if (region == null || region.shouldNeverExpand()) break; foldingModel.runBatchFoldingOperation(() -> region.setExpanded(true))...
makePositionVisible
241,227
void (@NotNull Caret caret, int offset, boolean withSelection) { if (withSelection) { caret.setSelection(caret.getLeadSelectionOffset(), offset); } else { caret.removeSelection(); } caret.moveToOffset(offset); EditorModificationUtilEx.scrollToCaret(caret.getEditor()); }
moveCaret
241,228
void (@NotNull Editor editor, @NotNull Caret caret, DataContext dataContext) { if (IntentionPreviewUtils.getPreviewEditor() != editor) { CommandProcessor.getInstance().setCurrentCommandName(EditorBundle.message("typing.command.name")); } insertNewLineAtCaret(editor); }
executeWriteAction
241,229
boolean (@NotNull Editor editor, @NotNull Caret caret, DataContext dataContext) { return !editor.isOneLineMode(); }
isEnabledForCaret
241,230
void (Editor editor) { EditorUIUtil.hideCursorInEditor(editor); Document document = editor.getDocument(); if(!editor.isInsertMode()) { int caretLine = editor.getCaretModel().getLogicalPosition().line; int lineCount = document.getLineCount(); if(caretLine < lineCount) { if (caretLine == lineCount - 1) { document.insertS...
insertNewLineAtCaret
241,231
void (@NotNull Editor editor, @Nullable Caret caret, DataContext dataContext) { if (!(editor instanceof EditorEx ex)) { return; } ex.setStickySelection(!ex.isStickySelection()); }
doExecute
241,232
void (final @NotNull Editor editor, @Nullable Caret caret, DataContext dataContext) { if (!editor.getCaretModel().supportsMultipleCarets()) { EditorActionUtil.moveCaretPageUp(editor, true); return; } if (editor.isColumnMode()) { int lines = editor.getScrollingModel().getVisibleArea().height / editor.getLineHeight(); Cl...
doExecute
241,233
void (@NotNull EditorMouseEvent e) { if (e.getArea() != EditorMouseEventArea.EDITING_AREA || !e.isOverText()) return; Editor editor = e.getEditor(); LogicalPosition logicalPosition = e.getLogicalPosition(); int offset = e.getOffset(); for (RangeHighlighter highlighter : editor.getMarkupModel().getAllHighlighters()) { S...
mouseMoved
241,234
boolean (@NotNull Editor editor, @NotNull Caret caret, DataContext dataContext) { Editor hostEditor = editor instanceof EditorWindow ? ((EditorWindow)editor).getDelegate() : editor; return hostEditor.getUserData(Holder.LISTENER_ADDED) != null || myDelegate.isEnabled(editor, caret, dataContext); }
isEnabledForCaret
241,235
void (@NotNull Editor editor, @Nullable Caret caret, DataContext dataContext) { Editor hostEditor = editor instanceof EditorWindow ? ((EditorWindow)editor).getDelegate() : editor; if (hostEditor.getUserData(Holder.LISTENER_ADDED) != null) { cleanup(hostEditor); } else { myDelegate.execute(editor, caret, dataContext); }...
doExecute
241,236
boolean (@NotNull Editor editor, @NotNull Caret caret, DataContext dataContext) { return editor instanceof EditorEx; }
isEnabledForCaret
241,237
void (@NotNull Editor editor, @Nullable Caret caret, DataContext dataContext) { if (editor.getUserData(Holder.LISTENER_ADDED) != null) cleanup(editor); HighlighterIterator it = editor.getHighlighter().createIterator(0); while (!it.atEnd()) { RangeHighlighter h = editor.getMarkupModel().addRangeHighlighter(it.getStart()...
doExecute
241,238
void (Editor editor) { editor.putUserData(Holder.LISTENER_ADDED, null); editor.removeEditorMouseMotionListener(Holder.MOUSE_MOTION_LISTENER); for (RangeHighlighter rangeHighlighter : editor.getMarkupModel().getAllHighlighters()) { if (rangeHighlighter.getUserData(Holder.TOKEN_NAME) != null) rangeHighlighter.dispose(); ...
cleanup
241,239
void (@NotNull Editor editor, @NotNull Caret caret, DataContext dataContext) { if (caret.hasSelection()) { delete(editor, caret, caret.getSelectionStart(), caret.getSelectionEnd()); return; } final Document doc = editor.getDocument(); int caretOffset = caret.getOffset(); if ((myToLineStart && (caretOffset == 0)) || (!m...
executeWriteAction
241,240
void (@NotNull Editor editor, @NotNull Caret caret, int start, int end) { CopyPasteManager.getInstance().stopKillRings(); editor.getDocument().deleteString(start, end); // in case the caret was in the virtual space, we force it to go back to the real offset caret.moveToOffset(start); }
delete
241,241
void (@NotNull Editor editor, @NotNull Caret caret, DataContext dataContext) { if (EditorUtil.isPasswordEditor(editor)) { int selectionStartOffset = caret.getLeadSelectionOffset(); caret.moveToOffset(myNext ? editor.getDocument().getTextLength() : 0); if (myWithSelection) caret.setSelection(selectionStartOffset, caret....
doExecute
241,242
void (@NotNull Editor editor, @NotNull Caret caret, DataContext dataContext) { EditorActionUtil.moveCaretToLineStart(editor, false); }
doExecute
241,243
void (@NotNull Editor editor, @NotNull Caret caret, DataContext dataContext) { if (caret == editor.getCaretModel().getPrimaryCaret()) { EditorActionUtil.moveCaretRelativelyAndScroll(editor, 0, 1, false); } else { editor.getCaretModel().moveCaretRelatively(0, 1, false, false, false); } }
doExecute
241,244
void (@NotNull Editor editor, @NotNull Caret caret, DataContext dataContext) { duplicateLineOrSelectedBlockAtCaret(editor); }
executeWriteAction
241,245
boolean (@NotNull Editor editor, @NotNull Caret caret, DataContext dataContext) { return !editor.isOneLineMode() || editor.getSelectionModel().hasSelection(); }
isEnabledForCaret
241,246
void (Editor editor) { Document document = editor.getDocument(); CaretModel caretModel = editor.getCaretModel(); ScrollingModel scrollingModel = editor.getScrollingModel(); if (editor.getSelectionModel().hasSelection()) { int start = editor.getSelectionModel().getSelectionStart(); int end = editor.getSelectionModel().g...
duplicateLineOrSelectedBlockAtCaret
241,247
TextRange (@NotNull Editor editor, @NotNull VisualPosition rangeStart, @NotNull VisualPosition rangeEnd) { TextRange range = EditorUtil.calcSurroundingTextRange(editor, rangeStart, rangeEnd); String s = editor.getDocument().getText(range); int offset = editor.getCaretModel().getOffset(); int newOffset = offset + range....
duplicateLinesRange
241,248
void (final Editor editor, final Presentation presentation, final DataContext dataContext) { super.update(editor, presentation, dataContext); if (editor.getSelectionModel().hasSelection()) { presentation.setText(EditorBundle.message("action.duplicate.selection"), true); } else { presentation.setText(EditorBundle.messag...
update
241,249
boolean (@NotNull Editor editor, @NotNull Caret caret, DataContext dataContext) { return !ModifierKeyDoubleClickHandler.getInstance().isRunningAction() || EditorSettingsExternalizable.getInstance().addCaretsOnDoubleCtrl(); }
isEnabledForCaret
241,250
void (@NotNull Editor editor, @NotNull Caret caret, DataContext dataContext) { EditorActionUtil.moveCaretToLineStart(editor, true); }
doExecute
241,251
boolean (@NotNull AnActionEvent e) { return EditorSettingsExternalizable.getInstance().getBidiTextDirection() == myDirection; }
isSelected
241,252
void (@NotNull AnActionEvent e, boolean state) { if (myDirection != EditorSettingsExternalizable.getInstance().getBidiTextDirection()) { EditorSettingsExternalizable.getInstance().setBidiTextDirection(myDirection); EditorFactory.getInstance().refreshAllEditors(); } }
setSelected
241,253
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
241,254
void (Editor editor, boolean state) { editor.getSettings().setIndentGuidesShown(state); }
setOption
241,255
boolean (Editor editor) { return editor.getSettings().isIndentGuidesShown(); }
getOption
241,256
void (@NotNull Editor editor, @Nullable Caret caret, DataContext dataContext) { EditorActionUtil.scrollRelatively(editor, -1, 0, false); }
doExecute
241,257
void (final @NotNull Editor editor, @Nullable Caret caret, DataContext dataContext) { final Ref<Boolean> toLowerCase = new Ref<>(Boolean.FALSE); runForCaret(editor, caret, c -> { if (!c.hasSelection()) { c.selectWordAtCaret(true); } int selectionStartOffset = c.getSelectionStart(); int selectionEndOffset = c.getSelecti...
executeWriteAction
241,258
void (Editor editor, Caret caret, CaretAction action) { if (caret == null) { editor.getCaretModel().runForEachCaret(action); } else { action.perform(caret); } }
runForCaret
241,259
String (Editor editor, int startOffset, int endOffset, final boolean lower) { CharSequence text = editor.getDocument().getImmutableCharSequence(); EditorHighlighter highlighter = editor.getHighlighter(); HighlighterIterator iterator = highlighter.createIterator(startOffset); StringBuilder builder = new StringBuilder(en...
toCase
241,260
void (final @NotNull Editor editor, @Nullable Caret caret, DataContext dataContext) { SelectionToCopy selectionToCopy = CopyAction.prepareSelectionToCut(editor); if (selectionToCopy == null) { return; } CopyAction.copyToClipboard(editor, EditorCopyPasteHelper.getInstance()::getSelectionTransferable, selectionToCopy); E...
executeWriteAction
241,261
void (@NotNull Editor editor, @NotNull Caret caret, DataContext dataContext) { EditorActionUtil.moveCaretPageDown(editor, false); }
doExecute
241,262
boolean (@NotNull Editor editor, @NotNull Caret caret, DataContext dataContext) { return !editor.isOneLineMode(); }
isEnabledForCaret
241,263
void (@NotNull Editor editor, @NotNull Caret caret, DataContext dataContext) { Document document = editor.getDocument(); int currentLine = caret.getLogicalPosition().line; int lineCount = document.getLineCount(); if (isLineEmpty(document, currentLine)) { while (++currentLine < lineCount) { if (!isLineEmpty(document, cu...
doExecute
241,264
void (final @NotNull AnActionEvent e) { final DataContext dataContext = e.getDataContext(); Project project = CommonDataKeys.PROJECT.getData(dataContext); Component focusedComponent = e.getData(PlatformCoreDataKeys.CONTEXT_COMPONENT); Editor editor = CommonDataKeys.EDITOR.getData(dataContext); if (!(focusedComponent in...
actionPerformed
241,265
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
241,266
void (@NotNull AnActionEvent e) { final boolean enabled = isEnabled(e); if (ActionPlaces.isPopupPlace(e.getPlace())) { e.getPresentation().setVisible(enabled); } else { e.getPresentation().setEnabled(enabled); } }
update
241,267
boolean (@NotNull AnActionEvent e) { Object component = e.getData(PlatformCoreDataKeys.CONTEXT_COMPONENT); if (!(component instanceof JComponent)) return false; Editor editor = e.getData(CommonDataKeys.EDITOR); if (editor != null) return !editor.isViewer(); Action pasteAction = ((JComponent)component).getActionMap().ge...
isEnabled
241,268
int () { return DialogWrapper.NEXT_USER_EXIT_CODE; }
getPasteSimpleExitCode
241,269
String (final Transferable content) { try { return (String)content.getTransferData(DataFlavor.stringFlavor); } catch (UnsupportedFlavorException | IOException e1) { return ""; } }
getStringRepresentationFor
241,270
List<Transferable> () { return Arrays.asList(CopyPasteManager.getInstance().getAllContents()); }
getContents
241,271
void (final Transferable content) { CopyPasteManagerEx.getInstanceEx().removeContent(content); }
removeContentAt
241,272
void (ActionEvent e) { close(getPasteSimpleExitCode()); }
doAction
241,273
void (@NotNull Editor editor, @Nullable Caret caret, DataContext dataContext) { EditorActionUtil.scrollRelatively(editor, -1, 0, true); }
doExecute
241,274
void (@NotNull Editor editor, @NotNull Caret caret, DataContext dataContext) { EditorActionUtil.moveCaretPageBottom(editor, false); }
doExecute
241,275
void (@NotNull Editor editor, @NotNull Caret caret, DataContext dataContext) { CaretModel caretModel = editor.getCaretModel(); Document document = editor.getDocument(); int selectionStart = caret.getSelectionStart(); int startLine = document.getLineNumber(selectionStart); int selectionEnd = caret.getSelectionEnd(); int...
doExecute
241,276
void (@NotNull AnActionEvent e) { super.update(e); if (ActionPlaces.isPopupPlace(e.getPlace())) { Presentation presentation = e.getPresentation(); presentation.setVisible(presentation.isEnabled()); } }
update
241,277
void (@NotNull Editor editor, @Nullable Caret caret, DataContext dataContext) { if (caret == null ? editor.getSelectionModel().hasSelection(true) : caret.hasSelection()) { EditorUIUtil.hideCursorInEditor(editor); CommandProcessor.getInstance().setCurrentCommandGroupId(EditorActionUtil.DELETE_COMMAND_GROUP); CopyPasteMa...
executeWriteAction
241,278
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
241,279
void (@NotNull AnActionEvent e) { super.update(e); if (!e.isFromActionToolbar()) { e.getPresentation().setIcon(null); } if (ActionPlaces.UNKNOWN.equals(e.getPlace())) { e.getPresentation().setText(ActionsBundle.messagePointer("action.EditorGutterToggleLocalSoftWraps.gutterText")); } e.getPresentation().setEnabled(getEd...
update
241,280
void (@NotNull Editor editor, @NotNull Caret caret, DataContext dataContext) { Runnable runnable = () -> { if (caret.hasSelection() && (!(editor instanceof EditorEx) || !((EditorEx)editor).isStickySelection()) && !Registry.is("editor.action.caretMovement.UpDownIgnoreSelectionBoundaries", false)) { int targetOffset = my...
doExecute
241,281
boolean (@NotNull Editor editor, @NotNull Caret caret, DataContext dataContext) { return !editor.isOneLineMode(); }
isEnabledForCaret
241,282
void (@NotNull Editor editor, @NotNull Caret caret, DataContext dataContext) { }
doExecute
241,283
void (@NotNull AnActionEvent e) { // actual logic is implemented in EditorImpl }
actionPerformed
241,284
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
241,285
void (@NotNull AnActionEvent e) { e.getPresentation().setEnabled(false); }
update
241,286
void (@NotNull Editor editor, @NotNull Caret caret, DataContext dataContext) { Document document = editor.getDocument(); int currentLine = caret.getLogicalPosition().line; boolean atLineStart = caret.getLogicalPosition().column == 0; if (isLineEmpty(document, currentLine) || atLineStart) { while (--currentLine >= 0) { ...
doExecute
241,287
void (Editor editor, boolean state) { editor.getSettings().setGutterIconsShown(state); }
setOption
241,288
boolean (Editor editor) { return editor.getSettings().areGutterIconsShown(); }
getOption
241,289
void (@NotNull Editor editor, @NotNull Caret caret, DataContext dataContext) { Project project = CommonDataKeys.PROJECT.getData(dataContext); unindentSelection(editor, project); }
executeWriteAction
241,290
boolean (@NotNull Editor editor, @NotNull Caret caret, DataContext dataContext) { return !editor.isViewer() && !editor.isOneLineMode() && !((EditorEx)editor).isEmbeddedIntoDialogWrapper(); }
isEnabledForCaret
241,291
void (Editor editor, Project project) { int oldSelectionStart = editor.getSelectionModel().getSelectionStart(); int oldSelectionEnd = editor.getSelectionModel().getSelectionEnd(); if(!editor.getSelectionModel().hasSelection()) { oldSelectionStart = editor.getCaretModel().getOffset(); oldSelectionEnd = oldSelectionStart...
unindentSelection
241,292
boolean (@NotNull AnActionEvent e) { return EditorSettingsExternalizable.getInstance().isIndentGuidesShown(); }
isSelected
241,293
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
241,294
void (@NotNull AnActionEvent e, boolean state) { EditorSettingsExternalizable.getInstance().setIndentGuidesShown(state); Editor editor = e.getData(CommonDataKeys.EDITOR); if (editor != null && editor.getSettings().isIndentGuidesShown() != state) { editor.getSettings().setIndentGuidesShown(state); } Project project = e....
setSelected
241,295
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
241,296
void (@NotNull AnActionEvent e) { VirtualFile file = e.getData(CommonDataKeys.VIRTUAL_FILE); boolean enabled = file != null && file.getBOM() == null && CharsetToolkit.getPossibleBom(file.getCharset()) != null; // support adding BOM to a single file only for the time being e.getPresentation().setEnabled(enabled); e.getP...
update
241,297
void (@NotNull AnActionEvent e) { VirtualFile file = e.getData(CommonDataKeys.VIRTUAL_FILE); if (file == null) return; doAddBOM(file); }
actionPerformed
241,298
void (@NotNull VirtualFile virtualFile) { byte[] bom = virtualFile.getBOM(); if (bom != null) return; Charset charset = virtualFile.getCharset(); byte[] possibleBom = CharsetToolkit.getPossibleBom(charset); if (possibleBom == null) return; virtualFile.setBOM(possibleBom); try { byte[] bytes = virtualFile.contentsToByte...
doAddBOM
241,299
void (@NotNull Editor editor, @Nullable Caret caret, DataContext dataContext) { List<Caret> carets = editor.getCaretModel().getAllCarets(); if (editor.isColumnMode() && editor.getCaretModel().supportsMultipleCarets()) { if (caret == null) { // normally we're always called with null caret caret = carets.get(0) == editor...
doExecute