Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
251,900 | DocumentWindow (@NotNull DocumentWindow document) { Place shreds = ((DocumentWindowImpl)document).getShreds(); Project project = shreds.getHostPointer().getProject(); DocumentEx delegate = ((PsiDocumentManagerBase)PsiDocumentManager.getInstance(project)).getLastCommittedDocument(document.getDelegate()); Place place = n... | freezeWindow |
251,901 | int (@NotNull List<TextRange> result, int start, int length) { if (length > 0) { int lastIndex = result.size() - 1; TextRange lastRange = lastIndex >= 0 ? result.get(lastIndex) : null; if (lastRange != null && lastRange.getEndOffset() == start) { result.set(lastIndex, lastRange.grown(length)); } else { result.add(TextR... | appendRange |
251,902 | void (@NotNull Project project) { InjectedLanguageManagerImpl cachedManager = (InjectedLanguageManagerImpl)project.getServiceIfCreated(InjectedLanguageManager.class); if (cachedManager == null) { return; } try { assert cachedManager.myInjectorsClone.isEmpty() : cachedManager.myInjectorsClone; } finally { cachedManager.... | pushInjectors |
251,903 | void (@NotNull Project project) { InjectedLanguageManagerImpl cachedManager = (InjectedLanguageManagerImpl)project.getServiceIfCreated(InjectedLanguageManager.class); if (cachedManager == null) { return; } try { ClassMapCachingNulls<MultiHostInjector> cached = cachedManager.cachedInjectors; if (cached == null) { return... | checkInjectorsAreDisposed |
251,904 | void (@NotNull MultiHostRegistrar injectionPlacesRegistrar, @NotNull PsiElement context) { PsiLanguageInjectionHost host = (PsiLanguageInjectionHost)context; InjectedLanguagePlaces placesRegistrar = (language, rangeInsideHost, prefix, suffix) -> injectionPlacesRegistrar .startInjecting(language) .addPlace(prefix, suffi... | getLanguagesToInject |
251,905 | PsiElement (@NotNull PsiElement host, @NotNull PsiFile containingFile) { if (containingFile instanceof DummyHolder) { PsiElement context = containingFile.getContext(); if (context != null) { PsiFile topFile = context.getContainingFile(); topFile.getNode(); //load tree TextRange textRange = host.getTextRange().shiftRigh... | loadTree |
251,906 | List<TokenInfo> (@NotNull PsiFile file) { return file.getUserData(HIGHLIGHT_TOKENS); } | getHighlightTokens |
251,907 | String (@NotNull PsiFile file, @Nullable PsiElement startElement, @Nullable PsiElement endElement) { InjectedLanguageManager manager = InjectedLanguageManager.getInstance(file.getProject()); if (manager.getInjectionHost(file) == null) { return file.getText().substring(startElement == null ? 0 : startElement.getTextRang... | getUnescapedText |
251,908 | void (@NotNull PsiElement element) { if (element == startElement) myState = Boolean.TRUE; if (element == endElement) myState = Boolean.FALSE; if (Boolean.FALSE == myState) return; if (Boolean.TRUE == myState && element.getFirstChild() == null) { sb.append(getUnescapedLeafText(element, false)); } else { super.visitEleme... | visitElement |
251,909 | record (@NotNull IElementType type, @NotNull ProperTextRange rangeInsideInjectionHost, int shredIndex, TextAttributesKey @NotNull [] textAttributesKeys) { } | TokenInfo |
251,910 | void (@NotNull PsiFile file, @NotNull List<TokenInfo> tokens) { file.putUserData(HIGHLIGHT_TOKENS, tokens); } | setHighlightTokens |
251,911 | Place (@NotNull PsiFile injectedFile) { FileViewProvider viewProvider = injectedFile.getViewProvider(); return getShreds(viewProvider); } | getShreds |
251,912 | Place (@NotNull FileViewProvider viewProvider) { if (!(viewProvider instanceof InjectedFileViewProvider myFileViewProvider)) return null; return getShreds(myFileViewProvider.getDocument()); } | getShreds |
251,913 | Place (@NotNull DocumentWindow document) { return ((DocumentWindowImpl)document).getShreds(); } | getShreds |
251,914 | boolean (@NotNull PsiElement host, @NotNull PsiLanguageInjectionHost.InjectedPsiVisitor visitor) { PsiFile containingFile = host.getContainingFile(); PsiUtilCore.ensureValid(containingFile); return enumerate(host, containingFile, true, visitor); } | enumerate |
251,915 | boolean (@NotNull PsiElement host, @NotNull PsiFile containingFile, boolean probeUp, @NotNull PsiLanguageInjectionHost.InjectedPsiVisitor visitor) { //do not inject into nonphysical files except during completion if (!containingFile.isPhysical() && containingFile.getOriginalFile() == containingFile) { PsiElement contex... | enumerate |
251,916 | boolean (@NotNull Project project, @NotNull Document hostDocument, int hostOffset) { PsiFile hostPsiFile = PsiDocumentManager.getInstance(project).getCachedPsiFile(hostDocument); if (hostPsiFile == null || !hostPsiFile.isValid()) return false; List<DocumentWindow> documents = InjectedLanguageManager.getInstance(project... | mightHaveInjectedFragmentAtCaret |
251,917 | PsiElement (@NotNull PsiFile file, int offset) { FileViewProvider viewProvider = file.getViewProvider(); Trinity<PsiElement, PsiElement, Language> result = null; if (!(viewProvider instanceof InjectedFileViewProvider)) { PsiDocumentManager documentManager = PsiDocumentManager.getInstance(file.getProject()); result = tr... | findElementAtNoCommit |
251,918 | void (@NotNull PsiElement element, @NotNull PsiFile hostPsiFile, boolean probeUp, @NotNull PsiLanguageInjectionHost.InjectedPsiVisitor visitor) { ReadActionCache.getInstance().allowInWriteAction( () -> probeElementsUpInner(element, hostPsiFile, probeUp, visitor) ); } | probeElementsUp |
251,919 | void (@NotNull PsiElement element, @NotNull PsiFile hostPsiFile, boolean probeUp, @NotNull PsiLanguageInjectionHost.InjectedPsiVisitor visitor) { element = skipNonInjectablePsi(element, probeUp); if (element == null) return; InjectedLanguageManagerImpl injectedManager = InjectedLanguageManagerImpl.getInstanceImpl(hostP... | probeElementsUpInner |
251,920 | void (@NotNull PsiElement from, @Nullable PsiElement upUntil, @NotNull PsiFile hostFile, @Nullable InjectionResult result) { Supplier<InjectionResult> cachedRef = result == null || result.isEmpty() ? getEmptyInjectionResult(hostFile) : new SoftReference<>(result); for (PsiElement e = from; e != upUntil && e != null; e ... | cacheResults |
251,921 | void (@Nullable InjectionResult result) { if (result != null && result.files != null) { for (PsiFile injectedPsiFile : result.files) { injectedPsiFile.getViewProvider().putUserData(INJECTION_HOLDER_BACK_REFERENCE, result); } } } | preventResultFromGCWhileInjectedPsiIsReachable |
251,922 | InjectionResult (@NotNull PsiFile host) { return CachedValuesManager.getCachedValue(host, INJECTION_RESULT_KEY, () -> Result.createSingleDependency(new InjectionResult(host, null, null), PsiModificationTracker.MODIFICATION_COUNT) ); } | getEmptyInjectionResult |
251,923 | boolean (@NotNull PsiElement element, boolean probeUp) { return stopLookingForInjection(element) || element.getFirstChild() != null || probeUp; } | isInjectable |
251,924 | boolean (@NotNull PsiElement element) { return element instanceof PsiFileSystemItem || element instanceof PsiLanguageInjectionHost; } | stopLookingForInjection |
251,925 | boolean (@NotNull PsiElement hostElement, @NotNull Place place) { TextRange hostElementRange = hostElement.getTextRange(); boolean intersects = false; for (PsiLanguageInjectionHost.Shred shred : place) { PsiLanguageInjectionHost shredHost = shred.getHost(); if (shredHost != null && shredHost.getTextRange().intersects(h... | intersects |
251,926 | PsiElement (@NotNull PsiFile hostFile, int offset) { if (hostFile instanceof PsiCompiledElement) return null; Project project = hostFile.getProject(); if (InjectedLanguageManager.getInstance(project).isInjectedFragment(hostFile)) return null; PsiDocumentManager documentManager = PsiDocumentManager.getInstance(project);... | findInjectedElementNoCommit |
251,927 | PsiElement (@NotNull PsiElement element, @NotNull PsiFile hostFile, int hostOffset, @NotNull PsiDocumentManager documentManager) { Ref<PsiElement> out = new Ref<>(); enumerate(element, hostFile, true, (injectedPsi, places) -> { for (PsiLanguageInjectionHost.Shred place : places) { TextRange hostRange = place.getHost().... | findInside |
251,928 | ConcurrentList<DocumentWindow> (@NotNull PsiFile hostPsiFile) { // modification of cachedInjectedDocuments must be under InjectedLanguageManagerImpl.ourInjectionPsiLock only List<DocumentWindow> injected = hostPsiFile.getUserData(INJECTED_DOCS_KEY); if (injected == null) { injected = ((UserDataHolderEx)hostPsiFile).put... | getCachedInjectedDocuments |
251,929 | List<DocumentWindow> (@NotNull PsiFile hostPsiFile, @NotNull TextRange range) { List<DocumentWindow> injected = getCachedInjectedDocuments(hostPsiFile); return ContainerUtil.filter(injected, inj-> Arrays.stream(inj.getHostRanges()).anyMatch(range::intersects)); } | getCachedInjectedDocumentsInRange |
251,930 | void (@NotNull PsiFile file) { file.putUserData(INJECTED_DOCS_KEY, null); } | clearCachedInjectedFragmentsForFile |
251,931 | void (@NotNull Project project, @NotNull DocumentWindow documentWindow) { if (project.isDisposed()) return; VirtualFileWindowImpl virtualFile = (VirtualFileWindowImpl)Objects.requireNonNull(FileDocumentManager.getInstance().getFile(documentWindow)); PsiManagerEx psiManagerEx = PsiManagerEx.getInstanceEx(project); Debug... | clearCaches |
251,932 | PsiFile (@NotNull PsiElement element) { PsiFile containingFile = element.getContainingFile(); if (containingFile == null) return null; if (containingFile.getViewProvider() instanceof InjectedFileViewProvider) { PsiElement host = InjectedLanguageManager.getInstance(containingFile.getProject()).getInjectionHost(containin... | getTopLevelFile |
251,933 | boolean (@NotNull PsiLanguageInjectionHost host) { if (!host.isPhysical()) return false; Ref<Boolean> result = Ref.create(false); enumerate(host, (injectedPsi, places) -> result.set(true)); return result.get().booleanValue(); } | hasInjections |
251,934 | boolean (@NotNull PsiElement element) { PsiFile injectedFile = element.getContainingFile(); if (injectedFile == null) return false; Project project = injectedFile.getProject(); InjectedLanguageManager languageManager = InjectedLanguageManager.getInstance(project); if (!languageManager.isInjectedFragment(injectedFile)) ... | isInInjectedLanguagePrefixSuffix |
251,935 | void (boolean isPhysical) { if (isPhysical) myDefaultResolveScopesCache.clear(); } | beforePsiChanged |
251,936 | GlobalSearchScope (@NotNull VirtualFile key) { VirtualFile file = key; VirtualFile original = key instanceof LightVirtualFile ? ((LightVirtualFile)key).getOriginalFile() : null; if (original != null) { file = original; } GlobalSearchScope scope = null; for (ResolveScopeProvider resolveScopeProvider : ResolveScopeProvid... | createScopeByFile |
251,937 | GlobalSearchScope (@NotNull VirtualFile vFile) { return myDefaultResolveScopesCache.get(vFile); } | getResolveScopeFromProviders |
251,938 | GlobalSearchScope (@NotNull VirtualFile vFile) { ProjectFileIndex projectFileIndex = myProjectRootManager.getFileIndex(); Module module = projectFileIndex.getModuleForFile(vFile); if (module != null) { boolean includeTests = TestSourcesFilter.isTestSources(vFile, myProject); return GlobalSearchScope.moduleWithDependenc... | getInherentResolveScope |
251,939 | GlobalSearchScope (@NotNull PsiElement element) { ProgressIndicatorProvider.checkCanceled(); if (element instanceof PsiDirectory) { return getResolveScopeFromProviders(((PsiDirectory)element).getVirtualFile()); } PsiFile containingFile = element.getContainingFile(); if (containingFile instanceof PsiCodeFragment) { Glob... | getResolveScope |
251,940 | GlobalSearchScope (@NotNull PsiFile psiFile) { if (psiFile instanceof FileResolveScopeProvider) { return ((FileResolveScopeProvider)psiFile).getFileResolveScope(); } if (!psiFile.getOriginalFile().isPhysical() && !psiFile.getViewProvider().isPhysical()) { return withFile(psiFile, GlobalSearchScope.allScope(myProject));... | getPsiFileResolveScope |
251,941 | GlobalSearchScope (PsiFile containingFile, GlobalSearchScope scope) { return PsiSearchScopeUtil.isInScope(scope, containingFile) ? scope : scope.uniteWith(GlobalSearchScope.fileScope(myProject, containingFile.getViewProvider().getVirtualFile())); } | withFile |
251,942 | GlobalSearchScope (@NotNull VirtualFile vFile) { PsiFile psiFile = myManager.findFile(vFile); assert psiFile != null : "directory=" + vFile.isDirectory() + "; " + myProject+"; vFile="+vFile+"; type="+vFile.getFileType(); return getResolveScopeFromProviders(vFile); } | getDefaultResolveScope |
251,943 | GlobalSearchScope (@NotNull PsiElement element) { VirtualFile vDirectory; VirtualFile virtualFile; PsiFile containingFile; GlobalSearchScope allScope = GlobalSearchScope.allScope(myManager.getProject()); if (element instanceof PsiDirectory) { vDirectory = ((PsiDirectory)element).getVirtualFile(); virtualFile = null; co... | getUseScope |
251,944 | void () { } | dispose |
251,945 | String (final @NotNull PsiElement element, final @NotNull ElementDescriptionLocation location) { if (!(location instanceof NonCodeSearchDescriptionLocation ncdLocation)) return null; if (element instanceof PsiDirectory) { if (ncdLocation.isNonJava()) { final String qName = PsiDirectoryFactory.getInstance(element.getPro... | getElementDescription |
251,946 | void (@NotNull PsiElement element, @NotNull String stringToSearch, @NotNull GlobalSearchScope searchScope, @NotNull Collection<? super UsageInfo> results, @NotNull UsageInfoFactory factory) { FindUsagesHelper.processTextOccurrences(element, stringToSearch, searchScope, factory, t -> { results.add(t); return true; }); } | addTextOccurrences |
251,947 | boolean ( @NotNull Processor<? super UsageInfo> processor, @NotNull PsiElement element, @NotNull SearchScope searchScope, @NotNull String stringToSearch, @NotNull UsageInfoFactory factory ) { return processUsagesInStringsAndComments(element, searchScope, stringToSearch, false, (commentOrLiteral, textRange) -> { UsageIn... | processUsagesInStringsAndComments |
251,948 | boolean (@NotNull PsiElement element, @NotNull SearchScope searchScope, @NotNull String stringToSearch, boolean includeReferences, @NotNull PairProcessor<? super PsiElement, ? super TextRange> processor) { PsiSearchHelper helper = PsiSearchHelper.getInstance(element.getProject()); SearchScope scope = helper.getUseScope... | processUsagesInStringsAndComments |
251,949 | boolean (@NotNull String identifier, @NotNull SearchScope searchScope, PsiSearchHelper helper, final Processor<? super PsiElement> processor) { TextOccurenceProcessor occurenceProcessor = (element, offsetInElement) -> { if (isStringLiteralElement(element)) { return processor.process(element); } return true; }; return h... | processStringLiteralsContainingIdentifier |
251,950 | boolean (@NotNull PsiElement element) { final ParserDefinition definition = LanguageParserDefinitions.INSTANCE.forLanguage(element.getLanguage()); if (definition == null) { return false; } final ASTNode node = element.getNode(); return node != null && definition.getStringLiteralElements().contains(node.getElementType()... | isStringLiteralElement |
251,951 | boolean (PsiElement scope, String stringToSearch, boolean allowReferences, PairProcessor<? super PsiElement, ? super TextRange> processor) { String text = scope.getText(); for (int offset = 0; offset < text.length(); offset++) { offset = text.indexOf(stringToSearch, offset); if (offset < 0) break; final PsiReference re... | processTextIn |
251,952 | void (@NotNull PsiElement element, @NotNull SearchScope searchScope, @NotNull String stringToSearch, @NotNull Collection<? super UsageInfo> results, @NotNull UsageInfoFactory factory) { Object lock = new Object(); processUsagesInStringsAndComments(element, searchScope, stringToSearch, false, (commentOrLiteral, textRang... | addUsagesInStringsAndComments |
251,953 | String () { return name; } | getName |
251,954 | String () { return originalName; } | getOriginalName |
251,955 | boolean () { return passAsParameter; } | isPassAsParameter |
251,956 | ElementDescriptionProvider () { return DefaultNonCodeSearchElementDescriptionProvider.INSTANCE; } | getDefaultProvider |
251,957 | boolean () { return myNonJava; } | isNonJava |
251,958 | void (@NotNull PsiElement namedElement, String newName, UsageInfo[] usages, @Nullable RefactoringElementListener listener) { PsiWritableMetaData writableMetaData = null; if (namedElement instanceof PsiMetaOwner) { final PsiMetaData metaData = ((PsiMetaOwner)namedElement).getMetaData(); if (metaData instanceof PsiWritab... | doRenameGenericNamedElement |
251,959 | void (@NotNull PsiElement namedElement, String newName, @NotNull PsiReference ref) { if (ref instanceof BindablePsiReference) { boolean fallback = true; if (!(ref instanceof FragmentaryPsiReference && ((FragmentaryPsiReference)ref).isFragmentOnlyRename())) { try { ref.bindToElement(namedElement); fallback = false; } ca... | renameReference |
251,960 | void (UsageInfo info, String newName) { if (info.getElement() == null) return; PsiReference ref = info.getReference(); if (ref == null) return; ref.handleElementRename(newName); } | rename |
251,961 | UsageInfo (@NotNull PsiElement element, @NotNull PsiReference ref, @NotNull PsiElement referenceElement) { return new MoveRenameUsageInfo(referenceElement, ref, ref.getRangeInElement().getStartOffset(), ref.getRangeInElement().getEndOffset(), element, ref.resolve() == null && !(ref instanceof PsiPolyVariantReference &&... | createMoveRenameUsageInfo |
251,962 | FindSettings () { return ApplicationManager.getApplication().getService(FindSettings.class); } | getInstance |
251,963 | boolean () { return SEARCH_OVERLOADED_METHODS; } | isSearchOverloadedMethods |
251,964 | void (boolean search) { SEARCH_OVERLOADED_METHODS = search; } | setSearchOverloadedMethods |
251,965 | void (@NotNull FindSettingsImpl state) { XmlSerializerUtil.copyBean(state, this); } | loadState |
251,966 | FindSettingsImpl () { return this; } | getState |
251,967 | boolean () { return SKIP_RESULTS_WHEN_ONE_USAGE; } | isSkipResultsWithOneUsage |
251,968 | void (boolean skip) { SKIP_RESULTS_WHEN_ONE_USAGE = skip; } | setSkipResultsWithOneUsage |
251,969 | void (String scope) { SEARCH_SCOPE = scope; } | setDefaultScopeName |
251,970 | boolean () { return FIND_DIRECTION_FORWARD.equals(FIND_DIRECTION); } | isForward |
251,971 | void (boolean findDirectionForward) { FIND_DIRECTION = findDirectionForward ? FIND_DIRECTION_FORWARD : FIND_DIRECTION_BACKWARD; } | setForward |
251,972 | boolean () { return FIND_ORIGIN_FROM_CURSOR.equals(FIND_ORIGIN); } | isFromCursor |
251,973 | void (boolean findFromCursor) { FIND_ORIGIN = findFromCursor ? FIND_ORIGIN_FROM_CURSOR : FIND_ORIGIN_ENTIRE_SCOPE; } | setFromCursor |
251,974 | boolean () { return FIND_SCOPE_GLOBAL.equals(FIND_SCOPE); } | isGlobal |
251,975 | void (boolean findGlobalScope) { FIND_SCOPE = findGlobalScope ? FIND_SCOPE_GLOBAL : FIND_SCOPE_SELECTED; } | setGlobal |
251,976 | boolean () { return CASE_SENSITIVE_SEARCH; } | isCaseSensitive |
251,977 | void (boolean caseSensitiveSearch) { CASE_SENSITIVE_SEARCH = caseSensitiveSearch; } | setCaseSensitive |
251,978 | boolean () { return LOCAL_CASE_SENSITIVE_SEARCH; } | isLocalCaseSensitive |
251,979 | boolean () { return LOCAL_WHOLE_WORDS_ONLY; } | isLocalWholeWordsOnly |
251,980 | void (final boolean caseSensitiveSearch) { LOCAL_CASE_SENSITIVE_SEARCH = caseSensitiveSearch; } | setLocalCaseSensitive |
251,981 | void (final boolean wholeWordsOnly) { LOCAL_WHOLE_WORDS_ONLY = wholeWordsOnly; } | setLocalWholeWordsOnly |
251,982 | boolean () { return PRESERVE_CASE_REPLACE; } | isPreserveCase |
251,983 | void (boolean preserveCase) { PRESERVE_CASE_REPLACE = preserveCase; } | setPreserveCase |
251,984 | boolean () { return WHOLE_WORDS_ONLY; } | isWholeWordsOnly |
251,985 | void (boolean wholeWordsOnly) { WHOLE_WORDS_ONLY = wholeWordsOnly; } | setWholeWordsOnly |
251,986 | boolean () { return REGULAR_EXPRESSIONS; } | isRegularExpressions |
251,987 | void (boolean regularExpressions) { REGULAR_EXPRESSIONS = regularExpressions; } | setRegularExpressions |
251,988 | boolean () { return LOCAL_REGULAR_EXPRESSIONS; } | isLocalRegularExpressions |
251,989 | void (boolean regularExpressions) { LOCAL_REGULAR_EXPRESSIONS = regularExpressions; } | setLocalRegularExpressions |
251,990 | void (boolean b) { WITH_SUBDIRECTORIES = b; } | setWithSubdirectories |
251,991 | boolean () { return WITH_SUBDIRECTORIES; } | isWithSubdirectories |
251,992 | void (@NotNull FindModel model) { model.setCaseSensitive(isCaseSensitive()); model.setForward(isForward()); model.setFromCursor(isFromCursor()); model.setGlobal(isGlobal()); model.setRegularExpressions(isRegularExpressions()); model.setWholeWordsOnly(isWholeWordsOnly()); FindModel.SearchContext searchContext = isInComm... | initModelBySetings |
251,993 | void (@Nullable @NlsSafe String fileMask) { FILE_MASK = fileMask; FindInProjectSettingsBase.addRecentStringToList(fileMask, recentFileMasks); } | setFileMask |
251,994 | String () { return SEARCH_SCOPE; } | getCustomScope |
251,995 | boolean () { return STRING_LITERALS_ONLY; } | isInStringLiteralsOnly |
251,996 | boolean () { return COMMENTS_ONLY; } | isInCommentsOnly |
251,997 | void (boolean selected) { COMMENTS_ONLY = selected; } | setInCommentsOnly |
251,998 | void (boolean selected) { STRING_LITERALS_ONLY = selected; } | setInStringLiteralsOnly |
251,999 | void (final String SEARCH_SCOPE) { this.SEARCH_SCOPE = SEARCH_SCOPE; } | setCustomScope |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.