Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
265,400
ProgressIndicatorUtilService (@NotNull Application application) { return application.getService(ProgressIndicatorUtilService.class); }
getInstance
265,401
void (@NotNull Object action) { cancelActionsToBeCancelledBeforeWrite(); }
beforeWriteActionStart
265,402
void () { if (!myWriteActionCancellations.isEmpty()) { throw new AssertionError("Cancellations are not empty! " + myWriteActionCancellations); } }
dispose
265,403
AccessToken () { if (isWriteActionRunningOrPending(myApplication)) { throwCannotWriteException(); } myNoWriteActionCounter.incrementAndGet(); return new AccessToken() { @Override public void finish() { myNoWriteActionCounter.decrementAndGet(); } }; }
prohibitWriteActionsInside
265,404
void () { myNoWriteActionCounter.decrementAndGet(); }
finish
265,405
void () { throw new IllegalStateException("Write actions are prohibited"); }
throwCannotWriteException
265,406
DataContext () { return myParent; }
getParent
265,407
DataContext (@NotNull String dataId, @NotNull Object data, DataContext parent) { return new SimpleDataContext(Map.of(dataId, data), parent); }
getSimpleContext
265,408
DataContext (@NotNull Map<String, Object> dataId2data, @Nullable DataContext parent) { return new SimpleDataContext(dataId2data, parent); }
getSimpleContext
265,409
DataContext (@NotNull Project project) { return getSimpleContext(CommonDataKeys.PROJECT, project); }
getProjectContext
265,410
Builder () { return new Builder(null); }
builder
265,411
Builder (@Nullable DataContext parent) { myParent = parent; return this; }
setParent
265,412
Builder (@NotNull DataContext dataContext, DataKey<?> @NotNull ... keys) { if (keys.length == 0) { throw new IllegalArgumentException("Keys argument must not be empty"); } for (DataKey<?> key : keys) { //noinspection unchecked add((DataKey<Object>)key, dataContext.getData(key)); } return this; }
addAll
265,413
DataContext () { if (myMap == null && myParent == null) return EMPTY_CONTEXT; return new SimpleDataContext(myMap != null ? myMap : Collections.emptyMap(), myParent); }
build
265,414
void () { System.setProperty("sun.awt.exception.handler", AWTExceptionHandler.class.getName()); }
register
265,415
void (Throwable e) { // error has already been logged // do nothing, do not crash AWT }
handle
265,416
FileTypeManagerEx () { return (FileTypeManagerEx)getInstance(); }
getInstanceEx
265,417
void (@Nullable NullableFunction<? super List<VirtualFile>, UnlockOption> unlocker) { ourCustomUnlocker = unlocker; }
setCustomUnlocker
265,418
Collection<VirtualFile> (@NotNull Collection<? extends VirtualFile> files) { if (isAllAccessAllowed()) return Collections.emptyList(); List<VirtualFile> deniedFiles = new ArrayList<>(); for (VirtualFile o : files) { if (!isWriteAccessAllowed(o, myProject)) { deniedFiles.add(o); } } if (deniedFiles.isEmpty()) { return C...
requestWriting
265,419
boolean (@NotNull VirtualFile file, @NotNull Project project) { if (LightEdit.owns(project)) return true; if (isAllAccessAllowed()) return true; if (file.isDirectory()) return true; if (!(file.getFileSystem() instanceof LocalFileSystem)) return true; // do not block e.g., HttpFileSystem, LightFileSystem etc. if (file.g...
isWriteAccessAllowed
265,420
boolean (@NotNull VirtualFile file, @NotNull Project project) { for (NonProjectFileWritingAccessExtension each : NonProjectFileWritingAccessExtension.EP_NAME.getExtensionList(project)) { if (each.isWritable(file)) { return true; } if (each.isNotWritable(file)) { return false; } } ProjectFileIndex fileIndex = ProjectFil...
isProjectFile
265,421
void (VirtualFile... allowedFiles) { allowWriting(Arrays.asList(allowedFiles)); }
allowWriting
265,422
void (Iterable<? extends VirtualFile> allowedFiles) { for (VirtualFile eachAllowed : allowedFiles) { ACCESS_ALLOWED.getValue(eachAllowed).incrementAndGet(); } }
allowWriting
265,423
void (@NotNull Runnable runnable) { Application app = getApp(); ACCESS_ALLOWED.getValue(app).incrementAndGet(); try { runnable.run(); } finally { ACCESS_ALLOWED.getValue(app).decrementAndGet(); } }
disableChecksDuring
265,424
void (@NotNull Disposable disposable) { enableChecksInTests(false, disposable); }
enableChecksInTests
265,425
void (@Nullable Boolean honourRecentFiles, @NotNull Disposable disposable) { getApp().putUserData(ENABLE_IN_TESTS, Boolean.TRUE); getApp().putUserData(HONOUR_RECENT_FILES_IN_TESTS, honourRecentFiles); getApp().putUserData(ACCESS_ALLOWED, null); Disposer.register(disposable, () -> { getApp().putUserData(ENABLE_IN_TESTS,...
enableChecksInTests
265,426
boolean () { Application app = getApp(); // disable checks in tests, if not asked if (app.isUnitTestMode() && app.getUserData(ENABLE_IN_TESTS) != Boolean.TRUE) { return true; } return ACCESS_ALLOWED.getValue(app).get() > 0; }
isAllAccessAllowed
265,427
Application () { return ApplicationManager.getApplication(); }
getApp
265,428
void (@NotNull VirtualFileEvent event) { unlock(event); }
fileCreated
265,429
void (@NotNull VirtualFileCopyEvent event) { unlock(event); }
fileCopied
265,430
void (@NotNull VirtualFileEvent event) { if (!event.isFromRefresh() && !event.getFile().isDirectory()) allowWriting(Collections.singletonList(event.getFile())); }
unlock
265,431
void (@NotNull NewVirtualFileSystem vfs, @NotNull String path, @NotNull Consumer<? super @Nullable NewVirtualFile> consumer) { ProcessIOExecutorService.INSTANCE.execute(() -> { Pair<NewVirtualFile, Iterable<String>> rootAndPath = prepare(vfs, path); if (rootAndPath == null) { consumer.accept(null); } else { refreshAndF...
refreshAndFindFileByPath
265,432
void (@Nullable NewVirtualFile file, @NotNull Iterator<String> path, @NotNull Consumer<? super @Nullable NewVirtualFile> consumer) { if (file == null || !path.hasNext()) { consumer.accept(file); return; } String pathElement = path.next(); if (pathElement.isEmpty() || ".".equals(pathElement)) { refreshAndFindFileByPath(...
refreshAndFindFileByPath
265,433
record (@NotNull NewVirtualFile root, @NotNull String pathFromRoot) {}
PathFromRoot
265,434
PathFromRoot (@NotNull NewVirtualFileSystem vfs, @NotNull String path) { String normalizedPath = vfs.normalize(path); if (normalizedPath == null || normalizedPath.isBlank()) { return null; } String rootPath = vfs.extractRootPath(normalizedPath); if (rootPath.isBlank() || rootPath.length() > normalizedPath.length()) { L...
extractRootFromPath
265,435
void (@NotNull NewVirtualFileSystem vfs, boolean asynchronous) { VirtualFile[] roots = ManagingFS.getInstance().getRoots(vfs); if (roots.length > 0) { RefreshQueue.getInstance().refresh(asynchronous, true, null, roots); } }
refresh
265,436
void (@NotNull VirtualFile file) { var event = new VFileContentChangeEvent(REFRESH_REQUESTOR, file, file.getModificationStamp(), -1); RefreshQueue.getInstance().processEvents(false, List.of(event)); }
forceSyncRefresh
265,437
String (@NotNull ArchiveFileSystem vfs, @NotNull String entryPath) { return vfs.extractLocalPath(entryPath); }
getLocalPath
265,438
void (@NotNull String rootPath, @NotNull Consumer<? super String> consumer) { int index = rootPath.lastIndexOf('/'); while (index > 0) { String containingDirectoryPath = rootPath.substring(0, index); consumer.accept(containingDirectoryPath); index = rootPath.lastIndexOf('/', index - 1); } }
forEachDirectoryComponent
265,439
void () { if (ourSubscribed.getAndSet(true)) return; Application app = ApplicationManager.getApplication(); if (app.isDisposed()) return; // we might perform a shutdown activity that includes visiting archives (IDEA-181620) MessageBusConnection connection = app.getMessageBus().connect(app); connection.subscribe(Virtual...
checkSubscription
265,440
void (@NotNull List<? extends @NotNull VFileEvent> events) { InvalidationState state = null; synchronized (ourLock) { for (var event : events) { if (!(event.getFileSystem() instanceof LocalFileSystem)) continue; if (!(event instanceof VFileContentChangeEvent contentChangeEvent)) continue; String path = contentChangeEve...
after
265,441
void (@NotNull IdeaPluginDescriptor pluginDescriptor, boolean isUpdate) { synchronized (ourLock) { // avoid leaking ArchiveFileSystem registered by plugin, e.g. TgzFileSystem from Kubernetes plugin ourHandlerCache.clear(); } }
pluginUnloaded
265,442
void (@NotNull String path, @NotNull ArchiveFileSystem vfs) { if (myRootsToRefresh == null) myRootsToRefresh = new HashSet<>(); myRootsToRefresh.add(Pair.create(path, vfs)); }
registerPathToRefresh
265,443
void () { if (myRootsToRefresh != null) { List<@NotNull NewVirtualFile> rootsToRefresh = ContainerUtil.mapNotNull( myRootsToRefresh, pathAndFs -> ManagingFS.getInstance().findRoot(pathAndFs.second.composeRootPath(pathAndFs.first), pathAndFs.second)); for (@NotNull NewVirtualFile root : rootsToRefresh) { root.markDirtyR...
scheduleRefresh
265,444
void (@NotNull String localPath) { if (!ApplicationManager.getApplication().isUnitTestMode()) throw new IllegalStateException(); synchronized (ourLock) { InvalidationState state = invalidate(null, localPath); if (state == null) throw new IllegalArgumentException(localPath + " not in " + ourHandlerCache.keySet()); } }
releaseHandler
265,445
List<VFileEvent> (@NotNull VFileEvent event, @NotNull List<? super Runnable> outApplyActions) { if (!(event instanceof VFileDeleteEvent || event instanceof VFileMoveEvent || event instanceof VFilePropertyChangeEvent propertyChangeEvent && VirtualFile.PROP_NAME.equals(propertyChangeEvent.getPropertyName()))) { return Co...
getJarInvalidationEvents
265,446
void () { }
resetChangedPaths
265,447
void (Map<String, Boolean> map) { if (this.mapLanguageBreadcrumbs != map) { this.mapLanguageBreadcrumbs.clear(); this.mapLanguageBreadcrumbs.putAll(map); } }
setLanguageBreadcrumbsMap
265,448
OsSpecificState () { return this; }
getState
265,449
void (@NotNull OsSpecificState state) { CARET_STOP_OPTIONS = state.CARET_STOP_OPTIONS; }
loadState
265,450
EditorSettingsExternalizable () { return ApplicationManager.getApplication().getService(EditorSettingsExternalizable.class); }
getInstance
265,451
void (@NotNull PropertyChangeListener listener, @NotNull Disposable disposable) { myPropertyChangeSupport.addPropertyChangeListener(listener); Disposer.register(disposable, () -> myPropertyChangeSupport.removePropertyChangeListener(listener)); }
addPropertyChangeListener
265,452
void (String propertyName, boolean oldValue, boolean newValue) { myPropertyChangeSupport.firePropertyChange(propertyName, oldValue, newValue); }
firePropertyChange
265,453
OptionSet () { return myOptions; }
getState
265,454
void (@NotNull OptionSet state) { myOptions = state; parseRawSoftWraps(); }
loadState
265,455
void () { myPlacesToUseSoftWraps.clear(); if (StringUtil.isEmpty(myOptions.USE_SOFT_WRAPS)) { return; } String[] placeNames = myOptions.USE_SOFT_WRAPS.split(COMPOSITE_PROPERTY_SEPARATOR); for (String placeName : placeNames) { try { SoftWrapAppliancePlaces place = SoftWrapAppliancePlaces.valueOf(placeName); myPlacesToUs...
parseRawSoftWraps
265,456
void () { StringBuilder buffer = new StringBuilder(); for (SoftWrapAppliancePlaces placeToStore : myPlacesToUseSoftWraps) { buffer.append(placeToStore).append(COMPOSITE_PROPERTY_SEPARATOR); } if (!buffer.isEmpty()) { buffer.setLength(buffer.length() - 1); } String newValue = buffer.toString(); String old = myOptions.US...
storeRawSoftWraps
265,457
OptionSet () { return myOptions; }
getOptions
265,458
boolean () { return myOptions.IS_RIGHT_MARGIN_SHOWN; }
isRightMarginShown
265,459
void (boolean val) { boolean old = myOptions.IS_RIGHT_MARGIN_SHOWN; if (old == val) return; myOptions.IS_RIGHT_MARGIN_SHOWN = val; myPropertyChangeSupport.firePropertyChange(PropNames.PROP_IS_RIGHT_MARGIN_SHOWN, old, val); }
setRightMarginShown
265,460
boolean () { return myOptions.ARE_LINE_NUMBERS_SHOWN; }
isLineNumbersShown
265,461
void (boolean val) { boolean old = myOptions.ARE_LINE_NUMBERS_SHOWN; if (old == val) return; myOptions.ARE_LINE_NUMBERS_SHOWN = val; myPropertyChangeSupport.firePropertyChange(PropNames.PROP_ARE_LINE_NUMBERS_SHOWN, old, val); }
setLineNumbersShown
265,462
void (EditorSettings.LineNumerationType val) { EditorSettings.LineNumerationType old = myOptions.LINE_NUMERATION; if (old == val) return; myOptions.LINE_NUMERATION = val; myPropertyChangeSupport.firePropertyChange(PropNames.PROP_LINE_NUMERATION, old, val); }
setLineNumeration
265,463
boolean () { return myOptions.ARE_GUTTER_ICONS_SHOWN; }
areGutterIconsShown
265,464
void (boolean val) { boolean old = myOptions.ARE_GUTTER_ICONS_SHOWN; if (old == val) return; myOptions.ARE_GUTTER_ICONS_SHOWN = val; myPropertyChangeSupport.firePropertyChange(PropNames.PROP_ARE_GUTTER_ICONS_SHOWN, old, val); }
setGutterIconsShown
265,465
boolean () { return myOptions.IS_FOLDING_OUTLINE_SHOWN; }
isFoldingOutlineShown
265,466
void (boolean val) { boolean old = myOptions.IS_FOLDING_OUTLINE_SHOWN; if (old == val) return; myOptions.IS_FOLDING_OUTLINE_SHOWN = val; myPropertyChangeSupport.firePropertyChange(PropNames.PROP_IS_FOLDING_OUTLINE_SHOWN, old, val); }
setFoldingOutlineShown
265,467
boolean () { return myOptions.IS_FOLDING_OUTLINE_SHOWN_ONLY_ON_HOVER; }
isFoldingOutlineShownOnlyOnHover
265,468
void (boolean val) { boolean old = myOptions.IS_FOLDING_OUTLINE_SHOWN_ONLY_ON_HOVER; if (old == val) return; myOptions.IS_FOLDING_OUTLINE_SHOWN_ONLY_ON_HOVER = val; myPropertyChangeSupport.firePropertyChange(PropNames.PROP_IS_FOLDING_OUTLINE_SHOWN_ONLY_ON_HOVER, old, val); }
setFoldingOutlineShownOnlyOnHover
265,469
boolean () { return myOptions.IS_FOLDING_ENDINGS_SHOWN; }
isFoldingEndingsShown
265,470
void (boolean val) { boolean old = myOptions.IS_FOLDING_ENDINGS_SHOWN; if (old == val) return; myOptions.IS_FOLDING_ENDINGS_SHOWN = val; myPropertyChangeSupport.firePropertyChange(PropNames.PROP_IS_FOLDING_ENDINGS_SHOWN, old, val); }
setFoldingEndingsShown
265,471
boolean () { return myOptions.SHOW_BREADCRUMBS_ABOVE; }
isBreadcrumbsAbove
265,472
boolean (boolean value) { boolean old = myOptions.SHOW_BREADCRUMBS_ABOVE; if (old == value) return false; myOptions.SHOW_BREADCRUMBS_ABOVE = value; myPropertyChangeSupport.firePropertyChange(PropNames.PROP_SHOW_BREADCRUMBS_ABOVE, old, value); return true; }
setBreadcrumbsAbove
265,473
boolean () { return myOptions.SHOW_BREADCRUMBS; }
isBreadcrumbsShown
265,474
boolean (boolean value) { boolean old = myOptions.SHOW_BREADCRUMBS; if (old == value) return false; myOptions.SHOW_BREADCRUMBS = value; myPropertyChangeSupport.firePropertyChange(PropNames.PROP_SHOW_BREADCRUMBS, old, value); return true; }
setBreadcrumbsShown
265,475
boolean (String languageID) { Boolean visible = myOptions.mapLanguageBreadcrumbs.get(languageID); if (visible == null) { Boolean defaultVisible = myDefaultBreadcrumbVisibility.get(languageID); if (defaultVisible == null) { for (BreadcrumbsProvider provider : BreadcrumbsProvider.EP_NAME.getExtensionList()) { for (Langua...
isBreadcrumbsShownFor
265,476
void () { myDefaultBreadcrumbVisibility.clear(); }
resetDefaultBreadcrumbVisibility
265,477
boolean (String languageID) { return myOptions.mapLanguageBreadcrumbs.containsKey(languageID); }
hasBreadcrumbSettings
265,478
boolean (String languageID, boolean value) { Boolean visible = myOptions.mapLanguageBreadcrumbs.put(languageID, value); boolean newValue = (visible == null || visible) != value; if (newValue) { myPropertyChangeSupport.firePropertyChange(PROP_BREADCRUMBS_PER_LANGUAGE, visible, (Boolean)value); } return newValue; }
setBreadcrumbsShownFor
265,479
boolean () { return myOptions.ENABLE_RENDERED_DOC; }
isDocCommentRenderingEnabled
265,480
void (boolean value) { boolean oldValue = myOptions.ENABLE_RENDERED_DOC; myOptions.ENABLE_RENDERED_DOC = value; if (oldValue != value) { myPropertyChangeSupport.firePropertyChange(PROP_DOC_COMMENT_RENDERING, oldValue, value); } }
setDocCommentRenderingEnabled
265,481
boolean () { return myOptions.IS_BLOCK_CURSOR; }
isBlockCursor
265,482
void (boolean val) { boolean old = myOptions.IS_BLOCK_CURSOR; if (old == val) return; myOptions.IS_BLOCK_CURSOR = val; myPropertyChangeSupport.firePropertyChange(PropNames.PROP_IS_BLOCK_CURSOR, old, val); }
setBlockCursor
265,483
boolean () { return myOptions.IS_FULL_LINE_HEIGHT_CURSOR; }
isFullLineHeightCursor
265,484
void (boolean val) { boolean old = myOptions.IS_FULL_LINE_HEIGHT_CURSOR; if (old == val) return; myOptions.IS_FULL_LINE_HEIGHT_CURSOR = val; myPropertyChangeSupport.firePropertyChange(PropNames.PROP_IS_FULL_LINE_HEIGHT_CURSOR, old, val); }
setFullLineHeightCursor
265,485
boolean () { return true; }
isCaretRowShown
265,486
int () { return myBlockIndent; }
getBlockIndent
265,487
void (int blockIndent) { myBlockIndent = blockIndent; }
setBlockIndent
265,488
boolean () { return myOptions.SMART_HOME; }
isSmartHome
265,489
void (boolean val) { boolean old = myOptions.SMART_HOME; if (old == val) return; myOptions.SMART_HOME = val; myPropertyChangeSupport.firePropertyChange(PropNames.PROP_SMART_HOME, old, val); }
setSmartHome
265,490
boolean () { return isUseSoftWraps(SoftWrapAppliancePlaces.MAIN_EDITOR); }
isUseSoftWraps
265,491
boolean (@NotNull SoftWrapAppliancePlaces place) { return myPlacesToUseSoftWraps.contains(place); }
isUseSoftWraps
265,492
void (boolean use) { setUseSoftWraps(use, SoftWrapAppliancePlaces.MAIN_EDITOR); }
setUseSoftWraps
265,493
void (boolean use, @NotNull SoftWrapAppliancePlaces place) { boolean update = use ^ myPlacesToUseSoftWraps.contains(place); if (!update) { return; } if (use) { myPlacesToUseSoftWraps.add(place); } else { myPlacesToUseSoftWraps.remove(place); } storeRawSoftWraps(); if (place == SoftWrapAppliancePlaces.MAIN_EDITOR) { set...
setUseSoftWraps
265,494
boolean () { return myOptions.USE_CUSTOM_SOFT_WRAP_INDENT; }
isUseCustomSoftWrapIndent
265,495
void (boolean use) { boolean old = myOptions.USE_CUSTOM_SOFT_WRAP_INDENT; if (old == use) return; myOptions.USE_CUSTOM_SOFT_WRAP_INDENT = use; myPropertyChangeSupport.firePropertyChange(PropNames.PROP_USE_CUSTOM_SOFT_WRAP_INDENT, old, use); }
setUseCustomSoftWrapIndent
265,496
int () { return myOptions.CUSTOM_SOFT_WRAP_INDENT; }
getCustomSoftWrapIndent
265,497
void (int indent) { int old = myOptions.CUSTOM_SOFT_WRAP_INDENT; if (old == indent) return; myOptions.CUSTOM_SOFT_WRAP_INDENT = indent; myPropertyChangeSupport.firePropertyChange(PropNames.PROP_CUSTOM_SOFT_WRAP_INDENT, old, indent); }
setCustomSoftWrapIndent
265,498
int () { return myOptions.VERTICAL_SCROLL_OFFSET; }
getVerticalScrollOffset
265,499
void (int offset) { int old = myOptions.VERTICAL_SCROLL_OFFSET; if (old == offset) return; myOptions.VERTICAL_SCROLL_OFFSET = offset; myPropertyChangeSupport.firePropertyChange(PropNames.PROP_VERTICAL_SCROLL_OFFSET, old, offset); }
setVerticalScrollOffset