Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
287,500 | void (@NotNull VirtualFile file) { if (file instanceof VirtualFileWindow || !Registry.is("ast.loading.filter", false)) { return; } Supplier<String> disallowedInfo = myDisallowedInfo.get(); if (disallowedInfo == null) { // loading was not disabled in current thread } else if (myForcedAllowedFiles.get().contains(file)) { // loading was disabled but then re-enabled for file } else { AstLoadingException throwable = new AstLoadingException(); LOG.error("Tree access disabled", throwable, new Attachment("debugInfo", buildDebugInfo(file, disallowedInfo))); } } | assertTreeLoadingAllowed |
287,501 | String (@NotNull VirtualFile file, @NotNull Supplier<String> disabledInfo) { @NonNls StringBuilder debugInfo = new StringBuilder(); debugInfo.append("Accessed file path: ").append(file.getPath()); String additionalInfo = disabledInfo.get(); if (additionalInfo != null) { debugInfo.append('\n').append("Additional info: \n").append(additionalInfo); } return debugInfo.toString(); } | buildDebugInfo |
287,502 | boolean (@NotNull Processor<? super T> consumer) { return delegateProcessResults(myOriginal, new MyProcessor(consumer)); } | processResults |
287,503 | AsyncFuture<Boolean> (@NotNull Processor<? super T> consumer) { return myOriginal.forEachAsync(new MyProcessor(consumer)); } | forEachAsync |
287,504 | boolean (final T t) { return !myFilter.value(t) || myConsumer.process(t); } | process |
287,505 | Void () { myDelegate.run(); return null; } | call |
287,506 | Runnable () { return myDelegate; } | getDelegate |
287,507 | String () { return myDelegate.toString(); } | toString |
287,508 | void () { String error = !EDT.isCurrentThreadEdt() || isAlwaysAllowed() || isSlowOperationAllowed() ? null : ERROR_EDT; if (error == null || isAlreadyReported()) return; LOG.error(error); } | assertSlowOperationsAreAllowed |
287,509 | void () { String error = isAlwaysAllowed() ? null : EDT.isCurrentThreadEdt() ? (isSlowOperationAllowed() ? null : ERROR_EDT) : (ApplicationManager.getApplication().isReadAccessAllowed() ? ERROR_RA : null); if (error == null || isAlreadyReported()) return; LOG.error(error); } | assertNonCancelableSlowOperationsAreAllowed |
287,510 | boolean () { boolean forceAssert = isInSection(FORCE_ASSERT); if (!forceAssert && !Registry.is("ide.slow.operations.assertion", true)) { return true; } Application application = ApplicationManager.getApplication(); if (application.isWriteAccessAllowed() && !Registry.is("ide.slow.operations.assertion.write.action")) { return true; } if (ourStack.isEmpty() && !Registry.is("ide.slow.operations.assertion.other", false)) { return true; } for (String activity : ourStack) { if (RESET.equals(activity)) { break; } if (!Registry.is("ide.slow.operations.assertion." + activity, true)) { return true; } } return false; } | isSlowOperationAllowed |
287,511 | boolean () { if (ourTargetClass != null && !ourReportedClasses.add(ourTargetClass)) { return true; } Throwable throwable = new Throwable(); return ThrowableInterner.intern(throwable) != throwable; } | isAlreadyReported |
287,512 | boolean (@NotNull String sectionName) { EDT.assertIsEdt(); for (String activity : ourStack) { if (RESET.equals(activity)) { break; } if (sectionName.equals(activity)) { return true; } } return false; } | isInSection |
287,513 | boolean () { if (ourAlwaysAllow == 1) { return true; } if (ourAlwaysAllow == 0) { return false; } if (!LoadingState.APP_STARTED.isOccurred()) { return true; } Application application = ApplicationManager.getApplication(); boolean result = System.getenv("TEAMCITY_VERSION") != null || application.isUnitTestMode() || application.isCommandLine() || !application.isEAP() && !application.isInternal() && !SystemProperties .getBooleanProperty(IDEA_PLUGIN_SANDBOX_MODE, false); ourAlwaysAllow = result ? 1 : 0; return result; } | isAlwaysAllowed |
287,514 | AccessToken (@NotNull @NonNls String ytIssueId) { return startSection(KNOWN_ISSUE); } | knownIssue |
287,515 | AccessToken (@NotNull Object target) { if (!EDT.isCurrentThreadEdt()) { return AccessToken.EMPTY_ACCESS_TOKEN; } String prev = ourTargetClass; ourTargetClass = target.getClass().getName(); return new AccessToken() { @Override public void finish() { //noinspection AssignmentToStaticFieldFromInstanceMethod ourTargetClass = prev; } }; } | reportOnceIfViolatedFor |
287,516 | void () { //noinspection AssignmentToStaticFieldFromInstanceMethod ourTargetClass = prev; } | finish |
287,517 | AccessToken (@NotNull @NonNls String activityName) { return startSection(activityName); } | allowSlowOperations |
287,518 | AccessToken (@NotNull @NonNls String sectionName) { if (!EDT.isCurrentThreadEdt()) { return AccessToken.EMPTY_ACCESS_TOKEN; } FList<String> prev = ourStack; ourStack = prev.prepend(sectionName); return new AccessToken() { @Override public void finish() { //noinspection AssignmentToStaticFieldFromInstanceMethod ourStack = prev; } }; } | startSection |
287,519 | void () { //noinspection AssignmentToStaticFieldFromInstanceMethod ourStack = prev; } | finish |
287,520 | boolean (@Nullable String error) { return Strings.areSameInstance(ERROR_EDT, error) || Strings.areSameInstance(ERROR_RA, error); } | isMyMessage |
287,521 | String () { return getPlatformPrefix(IDEA_PREFIX); } | getPlatformPrefix |
287,522 | String (@Nullable String defaultPrefix) { return System.getProperty(PLATFORM_PREFIX_KEY, defaultPrefix); } | getPlatformPrefix |
287,523 | void () { // IJ CE doesn't have prefix if we start IDE from the source code. // The proper fix is to set the prefix in all CE run configurations but for keeping compatibility set it indirectly System.setProperty(PLATFORM_PREFIX_KEY, getPlatformPrefix(IDEA_CE_PREFIX)); } | setDefaultPrefixForCE |
287,524 | boolean () { ApplicationInfo appInfo = ApplicationInfo.getInstance(); return appInfo != null && appInfo.getShortCompanyName().equals("JetBrains"); } | isJetBrainsProduct |
287,525 | boolean () { return isIdeaUltimate() || isIdeaCommunity() || is(IDEA_EDU_PREFIX); } | isIntelliJ |
287,526 | boolean () { return is(IDEA_PREFIX); } | isIdeaUltimate |
287,527 | boolean () { return is(IDEA_CE_PREFIX); } | isIdeaCommunity |
287,528 | boolean () { return is(IDEA_EDU_PREFIX); } | isIdeaEducational |
287,529 | boolean () { return is(RUBY_PREFIX); } | isRubyMine |
287,530 | boolean () { return is(APPCODE_PREFIX); } | isAppCode |
287,531 | boolean () { return is(AQUA_PREFIX); } | isAqua |
287,532 | boolean () { return is(CLION_PREFIX); } | isCLion |
287,533 | boolean () { return is(MOBILE_IDE_PREFIX); } | isMobileIde |
287,534 | boolean () { return isAppCode() || isCLion() || isMobileIde(); } | isCidr |
287,535 | boolean () { return is(PYCHARM_PREFIX) || isPyCharmCommunity() || isPyCharmEducational() || isDataSpell(); } | isPyCharm |
287,536 | boolean () { return is(PYCHARM_PREFIX); } | isPyCharmPro |
287,537 | boolean () { return is(PYCHARM_CE_PREFIX); } | isPyCharmCommunity |
287,538 | boolean () { return is(DATASPELL_PREFIX); } | isDataSpell |
287,539 | boolean () { return is(PYCHARM_EDU_PREFIX); } | isPyCharmEducational |
287,540 | boolean () { return is(PHP_PREFIX); } | isPhpStorm |
287,541 | boolean () { return is(WEB_PREFIX); } | isWebStorm |
287,542 | boolean () { return is(DBE_PREFIX); } | isDataGrip |
287,543 | boolean () { return is(RIDER_PREFIX); } | isRider |
287,544 | boolean () { return is(GOIDE_PREFIX); } | isGoIde |
287,545 | boolean () { return is(JETBRAINS_CLIENT_PREFIX); } | isJetBrainsClient |
287,546 | boolean () { return is(GATEWAY_PREFIX); } | isGateway |
287,547 | boolean () { return isIdeaCommunity() || isPyCharmCommunity(); } | isCommunityEdition |
287,548 | boolean () { return COMMERCIAL_EDITIONS.contains(getPlatformPrefix()); } | isCommercialEdition |
287,549 | boolean () { return is(FLEET_PREFIX); } | isFleetBackend |
287,550 | boolean () { return is(RUSTROVER_PREFIX); } | isRustRover |
287,551 | boolean (String idePrefix) { return idePrefix.equals(getPlatformPrefix()); } | is |
287,552 | Collection<T> () { return Arrays.asList(myArray); } | findAll |
287,553 | T () { return myArray.length > 0 ? myArray[0] : null; } | findFirst |
287,554 | boolean (final @NotNull Processor<? super T> consumer) { return ContainerUtil.process(myArray, consumer); } | forEach |
287,555 | boolean (final @NotNull Processor<? super Result> consumer) { for (QueryExecutor<Result, Parameter> executor : myExecutors) { try { ProgressManager.checkCanceled(); if (!executor.execute(myParameters, consumer)) { return false; } } catch (ProcessCanceledException | IndexNotReadyException e) { throw e; } catch (Exception e) { LOG.error(e); } } return true; } | processResults |
287,556 | Query<Result> (@NotNull QueryWrapper<Result> wrapper) { return new ExecutorsQuery<>(myParameters, ContainerUtil.map(myExecutors, e -> e.wrap(wrapper))); } | wrap |
287,557 | Collection<T> () { return myCollection; } | findAll |
287,558 | T () { final Iterator<T> i = iterator(); return i.hasNext() ? i.next() : null; } | findFirst |
287,559 | boolean (final @NotNull Processor<? super T> consumer) { return ContainerUtil.process(myCollection, consumer); } | forEach |
287,560 | boolean (T t) { ProgressManager.checkCanceled(); return super.process(t); } | process |
287,561 | String () { return key; } | getKey |
287,562 | Queries () { return ApplicationManager.getApplication().getService(Queries.class); } | getInstance |
287,563 | void (@NotNull QueryExecutor<Result, Parameters> executor) { myExecutors.add(executor); } | registerExecutor |
287,564 | void (@NotNull QueryExecutor<Result, Parameters> executor) { myExecutors.remove(executor); } | unregisterExecutor |
287,565 | Query<Result> (@NotNull Parameters parameters) { return new ExecutorsQuery<>(parameters, getExecutors()); } | createQuery |
287,566 | boolean () { return !getExecutors().isEmpty(); } | hasAnyExecutors |
287,567 | Query<Result> (@NotNull Parameters parameters) { return new UniqueResultsQuery<Result, Result>(createQuery(parameters)); } | createUniqueResultsQuery |
287,568 | Query<VirtualFile> (final VirtualFile parentDirectory, final String fileName, final int levels, final long timeout) { if (parentDirectory == null) return new EmptyQuery<>(); final QueryExecutor<VirtualFile, String> executor = (queryParameters, consumer) -> { final long endTime = timeout < 0 ? -1L : System.currentTimeMillis() + timeout; return processFileRecursively(parentDirectory, 1, levels, file -> { if (endTime > 0 && System.currentTimeMillis() > endTime) return false; if (file.getName().equals(fileName)) { if (!consumer.process(file)) return false; } return true; }); }; return new ExecutorsQuery<>(fileName, Collections.singletonList(executor)); } | findFileRecursively |
287,569 | boolean (final VirtualFile parentDirectory, final int curLevel, final int maxLevel, final Processor<? super VirtualFile> processor) { final VirtualFile[] files = parentDirectory.getChildren(); if (files != null) { for (VirtualFile file : files) { if (file.isDirectory()) { if (curLevel < maxLevel) { if (!processFileRecursively(file, curLevel + 1, maxLevel, processor)) { return false; } } } else if (!processor.process(file)) { return false; } } } return true; } | processFileRecursively |
287,570 | void (VirtualFile @NotNull ... files) { reparseFiles(Arrays.asList(files)); } | reparseFiles |
287,571 | void (@NotNull Collection<? extends VirtualFile> files) { ApplicationManager.getApplication().runWriteAction(() -> { // files must be processed under one write action to prevent firing event for invalid files. Set<VFilePropertyChangeEvent> events = new HashSet<>(); for (VirtualFile file : files) { if (file != null && !file.isDirectory() && file.isValid()) { events.add(new VFilePropertyChangeEvent(FORCE_RELOAD_REQUESTOR, file, VirtualFile.PROP_NAME, file.getName(), file.getName())); } } BulkFileListener publisher = ApplicationManager.getApplication().getMessageBus().syncPublisher(VirtualFileManager.VFS_CHANGES); List<VFileEvent> eventList = Collections.unmodifiableList(new ArrayList<>(events)); publisher.before(eventList); publisher.after(eventList); ForcefulReparseModificationTracker.increment(); }); } | reparseFiles |
287,572 | String (@NotNull Class<?> aClass) { String pathForClass = PathManager.getJarPathForClass(aClass); assert pathForClass != null : aClass; return pathForClass; } | getJarPathForClass |
287,573 | String (@NonNls String path) { return FileUtil.toCanonicalPath(path); } | getCanonicalPath |
287,574 | boolean (@NotNull String fileName) { return PathUtilRt.isValidFileName(fileName, true); } | isValidFileName |
287,575 | boolean (@NotNull String fileName, boolean strict) { return PathUtilRt.isValidFileName(fileName, strict); } | isValidFileName |
287,576 | String (@Nullable String path) { return path == null ? null : FileUtilRt.toSystemIndependentName(path); } | toSystemIndependentName |
287,577 | String (@NotNull String path) { if (SystemInfoRt.isWindows && OSAgnosticPathUtil.isAbsoluteDosPath(path) && Character.isUpperCase(path.charAt(0))) { return Character.toLowerCase(path.charAt(0)) + path.substring(1); } return path; } | driveLetterToLowerCase |
287,578 | String (@NotNull String name, @Nullable String extension) { return extension == null || extension.isEmpty() ? name : name + '.' + extension; } | makeFileName |
287,579 | ModificationTracker () { return ApplicationManager.getApplication().getService(ForcefulReparseModificationTracker.class); } | getInstance |
287,580 | void () { ((SimpleModificationTracker)getInstance()).incModificationCount(); } | increment |
287,581 | boolean (@NotNull Processor<? super T> consumer) { return delegateProcessResults(myOriginal, new MyProcessor(createSet(), consumer)); } | processResults |
287,582 | Set<M> () { if (myHashingStrategy == null) { return Collections.synchronizedSet(new HashSet<>()); } return Collections.synchronizedSet(CollectionFactory.createCustomHashingStrategySet(myHashingStrategy)); } | createSet |
287,583 | AsyncFuture<Boolean> (@NotNull Processor<? super T> consumer) { return myOriginal.forEachAsync(new MyProcessor(createSet(), consumer)); } | forEachAsync |
287,584 | boolean (final T t) { ProgressManager.checkCanceled(); // in case of exception do not mark the element as processed, we couldn't recover otherwise M m = myMapper.fun(t); if (myProcessedElements.contains(m)) return true; boolean result = myConsumer.process(t); myProcessedElements.add(m); return result; } | process |
287,585 | String () { return "UniqueQuery: "+myOriginal; } | toString |
287,586 | boolean (@NotNull Processor<? super Result> consumer) { return wrapper.wrapExecution(c -> AbstractQuery.delegateProcessResults(query, c), consumer); } | processResults |
287,587 | Runnable (@NotNull Runnable delegate, @Nullable PsiElement disposable) { return create(delegate, (Object)disposable); } | create |
287,588 | Runnable (@NotNull Runnable delegate, @Nullable Project disposable) { return create(delegate, (Object)disposable); } | create |
287,589 | Runnable (@NotNull Runnable delegate, @Nullable Module disposable) { return create(delegate, (Object)disposable); } | create |
287,590 | Runnable (@NotNull Runnable delegate, @Nullable Object disposable) { if (disposable == null) { return delegate; } //noinspection SSBasedInspection if (delegate instanceof DumbAware) { return DumbAwareRunnable.create((Runnable & DumbAware)delegate, disposable); } if (delegate instanceof PossiblyDumbAware) { return PossiblyDumbAwareRunnable.create((Runnable & PossiblyDumbAware)delegate, disposable); } return new DisposeAwareRunnable<>(delegate, disposable); } | create |
287,591 | void () { Object res = get(); if (res == null) return; if (res instanceof PsiElement) { if (!((PsiElement)res).isValid()) return; } else if (res instanceof ComponentManager) { if (((ComponentManager)res).isDisposed()) return; } myDelegate.run(); } | run |
287,592 | boolean () { return myDelegate.isDumbAware(); } | isDumbAware |
287,593 | void (@NotNull PsiElement host, boolean enabled) { host.putUserData(INJECT_LANGUAGE_ACTION_ENABLED_FOR_HOST, enabled); } | enableInjectLanguageAction |
287,594 | boolean (@NotNull PsiElement host) { return !Boolean.FALSE.equals(host.getUserData(INJECT_LANGUAGE_ACTION_ENABLED_FOR_HOST)); } | isInjectLanguageActionEnabled |
287,595 | void (@NotNull PsiFile topLevelFile, boolean enabled) { topLevelFile.putUserData(INSPECT_INJECTED_FILES, enabled); } | setInspectInjectedFiles |
287,596 | boolean (@NotNull PsiFile file) { return !Boolean.FALSE.equals(file.getUserData(INSPECT_INJECTED_FILES)); } | shouldInspectInjectedFiles |
287,597 | void (@NotNull PsiFile topLevelFile, boolean enabled) { topLevelFile.putUserData(COLLECT_LINE_MARKERS_FOR_INJECTED_FILES, enabled); } | setCollectLineMarkersForInjectedFiles |
287,598 | boolean (@NotNull PsiFile file) { return !Boolean.FALSE.equals(file.getUserData(COLLECT_LINE_MARKERS_FOR_INJECTED_FILES)); } | shouldCollectLineMarkersForInjectedFiles |
287,599 | void (@NotNull FileViewProvider topLevelViewProvider, boolean enabled) { topLevelViewProvider.putUserData(DO_POSTPROCESS_FORMATTING_ONLY_FOR_INJECTED_FRAGMENTS, enabled); } | setFormatOnlyInjectedCode |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.