Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
288,400 | boolean () { return mySecondary; } | isSecondary |
288,401 | boolean () { return false; } | isJVMDebuggingSupported |
288,402 | Charset (@Nullable Project project, @Nullable VirtualFile file, @NotNull String content) { return null; } | extractCharsetFromFileContent |
288,403 | Charset (@Nullable Project project, @Nullable VirtualFile file, @NotNull CharSequence content) { return extractCharsetFromFileContent(project, file, content.toString()); } | extractCharsetFromFileContent |
288,404 | boolean (LanguageFileType fileType) { Class<?> ftClass = fileType.getClass(); String methodName = "extractCharsetFromFileContent"; Class<?> declaring1 = ReflectionUtil.getMethodDeclaringClass(ftClass, methodName, Project.class, VirtualFile.class, String.class); Class<?> declaring2 = ReflectionUtil.getMethodDeclaringClass(ftClass, methodName, Project.class, VirtualFile.class, CharSequence.class); return !LanguageFileType.class.equals(declaring1) || !LanguageFileType.class.equals(declaring2); } | overridesExtractCharsetFromContent |
288,405 | Charset (@Nullable Project project, @Nullable VirtualFile virtualFile, @Nullable FileType fileType, @NotNull CharSequence text) { if (fileType instanceof LanguageFileType && // otherwise the default implementations will always convert CharSequence to String unnecessarily, producing garbage ourSupportsCharsetDetection.computeIfAbsent(fileType.getName(), __ -> overridesExtractCharsetFromContent((LanguageFileType)fileType))) { return ((LanguageFileType)fileType).extractCharsetFromFileContent(project, virtualFile, text); } return null; } | extractCharsetFromFileContent |
288,406 | void () { ApplicationManager.getApplication().invokeLater(() -> FileDocumentManager.getInstance().reloadBinaryFiles(), ModalityState.nonModal()); } | notifyDecompilerSetChange |
288,407 | BinaryFileTypeDecompilers () { return ApplicationManager.getApplication().getService(BinaryFileTypeDecompilers.class); } | getInstance |
288,408 | String () { return filetype; } | getKey |
288,409 | String () { return "UNKNOWN"; } | getName |
288,410 | String () { return CoreBundle.message("filetype.unknown.description"); } | getDescription |
288,411 | String () { return ""; } | getDefaultExtension |
288,412 | Icon () { return IconManager.getInstance().getPlatformIcon(PlatformIcons.UnknownFileType); } | getIcon |
288,413 | boolean () { return true; } | isBinary |
288,414 | boolean () { return instanceGetter != null; } | isInstanceSupplierSet |
288,415 | boolean (@NotNull VirtualFile file, @NotNull FileType type) { return file.getFileType() == type; } | isFileOfType |
288,416 | FileTypeRegistry () { Supplier<? extends FileTypeRegistry> instanceGetter = FileTypeRegistry.instanceGetter; if (instanceGetter == null) { // in tests FileTypeManager service maybe not preloaded, so, ourInstanceGetter is not set //noinspection deprecation return ApplicationManager.getApplication().getServiceByClassName("com.intellij.openapi.fileTypes.FileTypeManager"); } return instanceGetter.get(); } | getInstance |
288,417 | FileType (@NotNull VirtualFile file, byte @Nullable [] content) { return getFileTypeByFile(file); } | getFileTypeByFile |
288,418 | FileType (@NotNull CharSequence fileNameSeq) { return getFileTypeByFileName(fileNameSeq.toString()); } | getFileTypeByFileName |
288,419 | String (@NotNull FileType key) { return key.getName(); } | getKey |
288,420 | String (final @NotNull FileType key) { return key.getName(); } | keyToString |
288,421 | List<T> (@NotNull FileType t) { return forKey(t); } | allForFileType |
288,422 | T (@NotNull FileType t) { final List<T> all = allForFileType(t); return all.isEmpty() ? null : all.get(0); } | forFileType |
288,423 | String () { return "fakeExtension"; } | getDefaultExtension |
288,424 | Icon () { return null; } | getIcon |
288,425 | boolean () { return true; } | isBinary |
288,426 | boolean () { return true; } | isReadOnly |
288,427 | FileDocumentManager () { return ApplicationManager.getApplication().getService(FileDocumentManager.class); } | getInstance |
288,428 | boolean (Processor<? super Document> processor) { for (Document doc : getUnsavedDocuments()) { if (!processor.process(doc)) return false; } return true; } | processUnsavedDocuments |
288,429 | void (@NotNull Document document) { VirtualFile file = Objects.requireNonNull(getFile(document)); reloadFromDisk(document, ProjectLocator.getInstance().guessProjectForFile(file)); } | reloadFromDisk |
288,430 | WriteAccessStatus (@NotNull Document document, @Nullable Project project) { return requestWriting(document, project) ? WriteAccessStatus.WRITABLE : WriteAccessStatus.NON_WRITABLE; } | requestWritingStatus |
288,431 | boolean (@NotNull Document document, @NotNull Project project) { return getInstance().requestWriting(document, project); } | fileForDocumentCheckedOutSuccessfully |
288,432 | void () { } | reloadBinaryFiles |
288,433 | boolean () {return myWithWriteAccess;} | hasWriteAccess |
288,434 | String (@NotNull String schemeName) { return Strings.trimStart(schemeName, EDITABLE_COPY_PREFIX); } | getBaseName |
288,435 | void () { Application app = ApplicationManager.getApplication(); if (app != null) { ExtensionPoint<KeyedLazyInstance<VirtualFileSystem>> extensionPoint = app.getExtensionArea().getExtensionPointIfRegistered(VirtualFileSystem.EP_NAME.getName()); MessageBusConnection connection; if (extensionPoint != null) { Disposable extensionDisposable = ExtensionPointUtil.createExtensionDisposable(this, extensionPoint, ep -> ep.getKey().equals(getProtocol())); connection = app.getMessageBus().connect(extensionDisposable); } else { connection = app.getMessageBus().connect(); } connection.subscribe( VirtualFileManager.VFS_CHANGES, new BulkVirtualFileListenerAdapter(myEventDispatcher.getMulticaster(), this)); } } | startEventPropagation |
288,436 | void (@NotNull VirtualFileListener listener) { myEventDispatcher.addListener(listener); } | addVirtualFileListener |
288,437 | void (@NotNull VirtualFileListener listener) { myEventDispatcher.removeListener(listener); } | removeVirtualFileListener |
288,438 | void (Object requestor, @NotNull VirtualFile file, @NotNull String propertyName, Object oldValue, Object newValue) { assertWriteAccessAllowed(); VirtualFilePropertyEvent event = new VirtualFilePropertyEvent(requestor, file, propertyName, oldValue, newValue); myEventDispatcher.getMulticaster().propertyChanged(event); } | firePropertyChanged |
288,439 | void (Object requestor, @NotNull VirtualFile file, long oldModificationStamp) { assertWriteAccessAllowed(); VirtualFileEvent event = new VirtualFileEvent(requestor, file, file.getParent(), oldModificationStamp, file.getModificationStamp()); myEventDispatcher.getMulticaster().contentsChanged(event); } | fireContentsChanged |
288,440 | void (@Nullable Object requestor, @NotNull VirtualFile file) { assertWriteAccessAllowed(); VirtualFileEvent event = new VirtualFileEvent(requestor, file, file.getParent(), 0, 0); myEventDispatcher.getMulticaster().fileCreated(event); } | fireFileCreated |
288,441 | void (Object requestor, @NotNull VirtualFile file, @NotNull String fileName, VirtualFile parent) { assertWriteAccessAllowed(); VirtualFileEvent event = new VirtualFileEvent(requestor, file, parent, 0, 0); myEventDispatcher.getMulticaster().fileDeleted(event); } | fireFileDeleted |
288,442 | void (Object requestor, @NotNull VirtualFile file, VirtualFile oldParent) { assertWriteAccessAllowed(); VirtualFileMoveEvent event = new VirtualFileMoveEvent(requestor, file, oldParent, file.getParent()); myEventDispatcher.getMulticaster().fileMoved(event); } | fireFileMoved |
288,443 | void (@Nullable Object requestor, @NotNull VirtualFile originalFile, @NotNull VirtualFile createdFile) { assertWriteAccessAllowed(); VirtualFileCopyEvent event = new VirtualFileCopyEvent(requestor, originalFile, createdFile); myEventDispatcher.getMulticaster().fileCopied(event); } | fireFileCopied |
288,444 | void (Object requestor, @NotNull VirtualFile file, @NotNull String propertyName, Object oldValue, Object newValue) { assertWriteAccessAllowed(); VirtualFilePropertyEvent event = new VirtualFilePropertyEvent(requestor, file, propertyName, oldValue, newValue); myEventDispatcher.getMulticaster().beforePropertyChange(event); } | fireBeforePropertyChange |
288,445 | void (Object requestor, @NotNull VirtualFile file) { assertWriteAccessAllowed(); VirtualFileEvent event = new VirtualFileEvent(requestor, file, file.getParent(), 0, 0); myEventDispatcher.getMulticaster().beforeContentsChange(event); } | fireBeforeContentsChange |
288,446 | void (Object requestor, @NotNull VirtualFile file) { assertWriteAccessAllowed(); VirtualFileEvent event = new VirtualFileEvent(requestor, file, file.getParent(), 0, 0); myEventDispatcher.getMulticaster().beforeFileDeletion(event); } | fireBeforeFileDeletion |
288,447 | void (Object requestor, @NotNull VirtualFile file, VirtualFile newParent) { assertWriteAccessAllowed(); VirtualFileMoveEvent event = new VirtualFileMoveEvent(requestor, file, file.getParent(), newParent); myEventDispatcher.getMulticaster().beforeFileMovement(event); } | fireBeforeFileMovement |
288,448 | void () { ApplicationManager.getApplication().assertWriteAccessAllowed(); } | assertWriteAccessAllowed |
288,449 | boolean () { return true; } | isReadOnly |
288,450 | UnsupportedOperationException (String op, VirtualFile vFile) { return new UnsupportedOperationException(op + '(' + vFile + ") not supported by " + getClass().getName()); } | unsupported |
288,451 | VirtualFile () { return myFile; } | getFile |
288,452 | String () { return myFile.getName(); } | getFileName |
288,453 | long () { return myOldModificationStamp; } | getOldModificationStamp |
288,454 | long () { return myNewModificationStamp; } | getNewModificationStamp |
288,455 | boolean () { return myRequestor == REFRESH_REQUESTOR; } | isFromRefresh |
288,456 | boolean () { return myRequestor instanceof SavingRequestor; } | isFromSave |
288,457 | int () { return ourMaxIntellisenseFileSize; } | getMaxIntellisenseFileSize |
288,458 | void (int sizeInBytes) { if (!ApplicationManager.getApplication().isUnitTestMode()) { throw new IllegalStateException("cannot change max setMaxIntellisenseFileSize while running"); } ourMaxIntellisenseFileSize = sizeInBytes; } | setMaxIntellisenseFileSize |
288,459 | VirtualFileSystem () { return ourLocal.get(); } | local |
288,460 | VirtualFileSystem () { return ourJar.get(); } | jar |
288,461 | VirtualFile () { return myOriginalFile; } | getOriginalFile |
288,462 | VirtualFileSetFactory () { return ApplicationManager.getApplication().getService(VirtualFileSetFactory.class); } | getInstance |
288,463 | VirtualFile () { return myOldParent; } | getOldParent |
288,464 | VirtualFile () { return myNewParent; } | getNewParent |
288,465 | void () { ThreadingAssertions.assertEventDispatchThread(); // we might show a dialog Application app = ApplicationManager.getApplication(); if (!app.isWriteAccessAllowed()) return; if (app.isUnitTestMode() && Registry.is("tests.assert.clear.read.only.status.outside.write.action")) { LOG.error("ensureFilesWritable should be called outside write action"); } } | checkThreading |
288,466 | OperationStatus (@NotNull Collection<? extends VirtualFile> originalFiles, @NotNull Collection<? extends VirtualFile> files) { List<VirtualFile> readOnlyFiles = new ArrayList<>(); for (VirtualFile file : files) { if (file.exists()) { if (!file.isWritable()) { readOnlyFiles.add(file); } } } // we shouldn't report success if files for which write operation is requested are still non-writable assert !readOnlyFiles.isEmpty() || ContainerUtil.and(originalFiles, file -> file == null || file.isWritable()) : "Original files: " + originalFiles + ", files: " + files; return new OperationStatusImpl(VfsUtilCore.toVirtualFileArray(readOnlyFiles)); } | createResultStatus |
288,467 | OperationStatus (@NotNull Collection<? extends VirtualFile> originalFiles) { if (originalFiles.isEmpty()) { return new OperationStatusImpl(VirtualFile.EMPTY_ARRAY); } checkThreading(); Set<VirtualFile> realFiles = new HashSet<>(originalFiles.size()); for (VirtualFile file : originalFiles) { if (file instanceof LightVirtualFile) { VirtualFile originalFile = ((LightVirtualFile)file).getOriginalFile(); if (originalFile != null) { file = originalFile; } } if (file instanceof VirtualFileWindow) { file = ((VirtualFileWindow)file).getDelegate(); } if (file instanceof BackedVirtualFile) { file = ((BackedVirtualFile)file).getOriginFile(); } if (file != null) { realFiles.add(file); } } Collection<? extends VirtualFile> files = new ArrayList<>(realFiles); if (!myProject.isDefault()) { OperationStatusImpl status = WritingAccessProvider.EP.computeSafeIfAny(myProject, provider -> { Collection<VirtualFile> denied = ContainerUtil.filter(files, virtualFile -> !provider.isPotentiallyWritable(virtualFile)); if (denied.isEmpty()) { denied = provider.requestWriting(files); } if (!denied.isEmpty()) { return new OperationStatusImpl(VfsUtilCore.toVirtualFileArray(denied), provider.getReadOnlyMessage(), provider.getHyperlinkListener()); } return null; }); if (status != null) { return status; } } return ensureFilesWritable(originalFiles, files); } | ensureFilesWritable |
288,468 | OperationStatus (@NotNull Collection<? extends VirtualFile> originalFiles, Collection<? extends VirtualFile> files) { return createResultStatus(originalFiles, files); } | ensureFilesWritable |
288,469 | boolean () { return myReadonlyFiles.length > 0; } | hasReadonlyFiles |
288,470 | String () { if (hasReadonlyFiles()) { if (!Strings.isEmpty(myReadOnlyReason)) { return myReadOnlyReason; } if (myReadonlyFiles.length > 1) { StringBuilder buf = new StringBuilder(); for (VirtualFile file : myReadonlyFiles) { buf.append('\n'); buf.append(file.getPresentableUrl()); } return CoreBundle.message("failed.to.make.the.following.files.writable.error.message", buf.toString()); } else { return CoreBundle.message("failed.to.make.file.writable.error.message", myReadonlyFiles[0].getPresentableUrl()); } } throw new RuntimeException("No readonly files"); } | getReadonlyFilesMessage |
288,471 | int (final int expected, final float f) { final long s = Math.max(2, nextPowerOfTwo((long)Math.ceil(expected / f))); if (s > (1 << 30)) throw new IllegalArgumentException("Too large (" + expected + " expected elements with load factor " + f + ")"); return (int)s; } | arraySize |
288,472 | long (long x) { if (x == 0) return 1; x--; x |= x >> 1; x |= x >> 2; x |= x >> 4; x |= x >> 8; x |= x >> 16; return (x | x >> 32) + 1; } | nextPowerOfTwo |
288,473 | int (final int n, final float f) { /* We must guarantee that there is always at least * one free entry (even with pathological load factors). */ return Math.min((int)Math.ceil(n * f), n - 1); } | maxFill |
288,474 | int (final int x) { final int h = x * INT_PHI; return h ^ (h >>> 16); } | mix |
288,475 | void (@NotNull VirtualFileEvent event) { onFileChange(event.getFile()); } | contentsChanged |
288,476 | void (@NotNull VirtualFileEvent event) { onFileChange(event.getFile()); } | fileCreated |
288,477 | void (@NotNull VirtualFileEvent event) { onBeforeFileChange(event.getFile()); } | beforeFileDeletion |
288,478 | void (@NotNull VirtualFileMoveEvent event) { onBeforeFileChange(event.getFile()); } | beforeFileMovement |
288,479 | void (@NotNull VirtualFileMoveEvent event) { onFileChange(event.getFile()); } | fileMoved |
288,480 | void (@NotNull VirtualFileCopyEvent event) { onFileChange(event.getFile()); } | fileCopied |
288,481 | void (@NotNull VirtualFileEvent event) { onFileChange(event.getFile()); } | fileDeleted |
288,482 | void (@NotNull VirtualFileEvent event) { onBeforeFileChange(event.getFile()); } | beforeContentsChange |
288,483 | boolean (@NotNull VirtualFile file) { return true; } | accept |
288,484 | String () { return "ALL"; } | toString |
288,485 | boolean (@NotNull VirtualFile file) { return false; } | accept |
288,486 | String () { return "NONE"; } | toString |
288,487 | String (@NotNull String path) { return path.replace('/', File.separatorChar); } | extractPresentableUrl |
288,488 | void (@NotNull VirtualFileListener listener, @NotNull Disposable disposable) { addVirtualFileListener(listener); Disposer.register(disposable, () -> removeVirtualFileListener(listener)); } | addVirtualFileListener |
288,489 | boolean () { return true; } | isCaseSensitive |
288,490 | boolean (@NotNull String name) { return !name.isEmpty() && name.indexOf('\\') < 0 && name.indexOf('/') < 0; } | isValidName |
288,491 | Collection<VirtualFile> (@NotNull Collection<? extends VirtualFile> files) { return requestWriting(files.toArray(VirtualFile.EMPTY_ARRAY)); } | requestWriting |
288,492 | Collection<VirtualFile> (VirtualFile @NotNull ... files) { throw new AbstractMethodError("requestWriting(List<VirtualFile>) not implemented"); } | requestWriting |
288,493 | boolean (@NotNull VirtualFile file) { return true; } | isPotentiallyWritable |
288,494 | boolean (@NotNull VirtualFile file, @Nullable Project project) { return project == null || project.isDefault() || EP.findFirstSafe(project, provider -> !provider.isPotentiallyWritable(file)) == null; } | isPotentiallyWritable |
288,495 | String () { return StringUtil.toLowerCase(toString()); } | getName |
288,496 | String (Object o) { return o == null ? "-" : String.valueOf(o.hashCode()); } | hashCode |
288,497 | String () { return myPropertyName; } | getPropertyName |
288,498 | Object () { return myOldValue; } | getOldValue |
288,499 | Object () { return myNewValue; } | getNewValue |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.