Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
26,400 | ResourceBundleWithCachedFiles (@NotNull final String baseName, @Nullable final String extension, @NotNull final PsiDirectory baseDirectory) { final ResourceBundleManager bundleBaseNameManager = ResourceBundleManager.getInstance(baseDirectory.getProject()); final List<PropertiesFile> bundleFiles = Stream .of(baseDirecto... | getResourceBundle |
26,401 | boolean (@Nullable PsiFile file) { return getPropertiesFile(file) != null; } | isPropertiesFile |
26,402 | PropertiesFile (@NotNull VirtualFile file, @NotNull Project project) { return getPropertiesFile(PsiManager.getInstance(project).findFile(file)); } | getPropertiesFile |
26,403 | PropertiesFile (@Nullable PsiFile file) { if (!canBePropertyFile(file)) return null; return file instanceof PropertiesFile ? (PropertiesFile)file : XmlPropertiesFileImpl.getPropertiesFile(file); } | getPropertiesFile |
26,404 | boolean (PsiFile file) { return file instanceof PropertiesFile || file instanceof XmlFile && file.getFileType() == XmlFileType.INSTANCE; } | canBePropertyFile |
26,405 | PropertiesFile (@Nullable PsiElement element) { if (!(element instanceof PsiFile)) return null; return getPropertiesFile((PsiFile)element); } | getPropertiesFile |
26,406 | List<IProperty> (@NotNull final Project project, @NotNull final String key) { GlobalSearchScope scope = GlobalSearchScope.allScope(project); List<IProperty> properties = new ArrayList<>(PropertyKeyIndex.getInstance().getProperties(key, project, scope)); final Set<VirtualFile> files = new HashSet<>(); FileBasedIndex.get... | findPropertiesByKey |
26,407 | ResourceBundle (final @NotNull String url, final @NotNull Project project) { final int idx = url.lastIndexOf('/'); if (idx == -1) return null; final String baseDirectoryName = url.substring(0, idx); final String baseName = url.substring(idx + 1); final VirtualFile baseDirectoryVirtualFile = VirtualFileManager.getInstan... | createByUrl |
26,408 | boolean (final @NotNull Collection<? extends IProperty> properties) { String previousKey = null; for (IProperty property : properties) { final String key = property.getKey(); if (key == null) { return false; } if (previousKey != null && String.CASE_INSENSITIVE_ORDER.compare(previousKey, key) > 0) { return false; } prev... | isAlphaSorted |
26,409 | IProperty (@Nullable PsiElement element) { if (element instanceof IProperty) { return (IProperty)element; } if (element instanceof PomTargetPsiElement) { final PomTarget target = ((PomTargetPsiElement)element).getTarget(); if (target instanceof XmlProperty) { return (IProperty)target; } } return null; } | getProperty |
26,410 | ResourceBundle () { return myBundle; } | getBundle |
26,411 | List<PropertiesFile> () { return myFiles; } | getFiles |
26,412 | String () { return PropertiesBundle.message("remove.property.intention.text"); } | getFamilyName |
26,413 | void (@NotNull ActionContext context, @NotNull Property property, @NotNull ModPsiUpdater updater) { property.delete(); } | invoke |
26,414 | CustomResourceBundle (final CustomResourceBundleState state, final Project project) { List<PropertiesFile> files = ContainerUtil.mapNotNull(state.getFiles(VirtualFileManager.getInstance()), virtualFile -> PropertiesImplUtil.getPropertiesFile(virtualFile, project)); return files.size() < 2 ? null : new CustomResourceBun... | fromState |
26,415 | List<PropertiesFile> () { return myFiles; } | getPropertiesFiles |
26,416 | PropertiesFile () { //noinspection ConstantConditions return ContainerUtil.getFirstItem(myFiles); } | getDefaultPropertiesFile |
26,417 | String () { return myBaseName; } | getBaseName |
26,418 | VirtualFile () { VirtualFile baseDir = null; for (PropertiesFile file : myFiles) { final VirtualFile currentBaseDir = file.getContainingFile().getVirtualFile().getParent(); if (baseDir == null) { baseDir = currentBaseDir; } else if (!baseDir.equals(currentBaseDir)) { return null; } } return baseDir; } | getBaseDirectory |
26,419 | boolean () { for (PropertiesFile file : myFiles) { if (!file.getContainingFile().isValid()) { return false; } } return true; } | isValid |
26,420 | boolean (final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final CustomResourceBundle resourceBundle = (CustomResourceBundle)o; return resourceBundle.getPropertiesFiles().equals(getPropertiesFiles()) && resourceBundle.getBaseName().equals(getBaseName()); } | equals |
26,421 | int () { return myFiles.hashCode() * 31 + myBaseName.hashCode(); } | hashCode |
26,422 | void (@NotNull PsiElement element, @NotNull AnnotationHolder holder) { if (!(element instanceof Property property)) return; PropertiesFile propertiesFile = property.getPropertiesFile(); final String key = property.getUnescapedKey(); if (key == null) return; Collection<IProperty> others = propertiesFile.findPropertiesBy... | annotate |
26,423 | void (final ASTNode node, final AnnotationHolder holder, PropertiesHighlighter highlighter) { Lexer lexer = highlighter.getHighlightingLexer(); final String s = node.getText(); lexer.start(s); while (lexer.getTokenType() != null) { IElementType elementType = lexer.getTokenType(); TextAttributesKey[] keys = highlighter.... | highlightTokens |
26,424 | String () { return PropertiesBundle.message("unescape"); } | getFamilyName |
26,425 | ModCommand (@NotNull ActionContext context) { return ModCommand.psiUpdate(context, updater -> { updater.getWritable(context.file()).getViewProvider().getDocument().deleteString(startOffset, startOffset + 1); }); } | perform |
26,426 | List<PropertiesFile> () { return PropertiesImplUtil.getResourceBundleFiles(getDefaultPropertiesFile()); } | getPropertiesFiles |
26,427 | PropertiesFile () { return Objects.requireNonNull(PropertiesImplUtil.getPropertiesFile(myDefaultPropertiesFile.getElement())); } | getDefaultPropertiesFile |
26,428 | String () { return ResourceBundleManager.getInstance(getProject()).getBaseName(Objects.requireNonNull(myDefaultPropertiesFile.getElement())); } | getBaseName |
26,429 | VirtualFile () { return getDefaultPropertiesFile().getVirtualFile().getParent(); } | getBaseDirectory |
26,430 | boolean () { return myValid && PropertiesImplUtil.getPropertiesFile(myDefaultPropertiesFile.getElement()) != null; } | isValid |
26,431 | void () { myValid = false; } | invalidate |
26,432 | boolean (final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final ResourceBundleImpl resourceBundle = (ResourceBundleImpl)o; if (!myDefaultPropertiesFile.equals(resourceBundle.myDefaultPropertiesFile)) return false; return true; } | equals |
26,433 | int () { return myDefaultPropertiesFile.hashCode(); } | hashCode |
26,434 | String () { return getBaseDirectory() + "/" + getBaseName(); } | getUrl |
26,435 | String () { return "ResourceBundleImpl:" + getBaseName(); } | toString |
26,436 | void (@NotNull PsiReferenceRegistrar registrar) { registrar.registerReferenceProvider(psiElement(PropertyValueImpl.class), new PsiReferenceProvider() { @Override public boolean acceptsTarget(@NotNull PsiElement target) { return false; // web references do not point to any real PsiElement } @Override public PsiReference... | registerReferenceProviders |
26,437 | boolean (@NotNull PsiElement target) { return false; // web references do not point to any real PsiElement } | acceptsTarget |
26,438 | void (@NotNull final PsiTreeChangeEvent event) { final PsiElement child = event.getChild(); if (!(child instanceof PsiFile)) { if (child instanceof PsiDirectory) { if (event.getOldParent() instanceof PsiDirectory && event.getNewParent() instanceof PsiDirectory) { final String fromDirUrl = ((PsiDirectory)event.getOldPar... | childMoved |
26,439 | String (PsiElement element) { return !(element instanceof PsiDirectory) ? null : ((PsiDirectory)element).getVirtualFile().getUrl(); } | getUrl |
26,440 | void (@NotNull PsiTreeChangeEvent event) { final PsiElement child = event.getChild(); if (!(child instanceof PsiFile psiFile)) { if (child instanceof PsiDirectory) { final String deletedDirUrl = ((PsiDirectory)child).getVirtualFile().getUrl() + "/"; for (String dissociatedFileUrl : new SmartList<>(myState.getDissociate... | beforeChildRemoval |
26,441 | void () { } | dispose |
26,442 | ResourceBundleManager (final Project project) { return project.getService(ResourceBundleManager.class); } | getInstance |
26,443 | String (final @NotNull PropertiesFile propertiesFile) { return ReadAction.compute(() -> { final PsiDirectory directory = propertiesFile.getParent(); final String packageQualifiedName = PropertiesUtil.getPackageQualifiedName(directory); if (packageQualifiedName == null) { return null; } final StringBuilder qName = new S... | getFullName |
26,444 | String (@NotNull final PsiFile file) { final VirtualFile vFile = file.getVirtualFile(); final CustomResourceBundleState customResourceBundle = getCustomResourceBundleState(vFile); if (customResourceBundle != null) { return customResourceBundle.getBaseName(); } if (isDefaultDissociated(vFile)) { return vFile.getNameWith... | getBaseName |
26,445 | void (final @NotNull ResourceBundle resourceBundle) { closeResourceBundleEditors(resourceBundle); if (resourceBundle instanceof CustomResourceBundle) { final CustomResourceBundleState state = getCustomResourceBundleState(resourceBundle.getDefaultPropertiesFile().getVirtualFile()); LOG.assertTrue(state != null); myState... | dissociateResourceBundle |
26,446 | void (final @NotNull List<? extends PropertiesFile> propertiesFiles, final String baseName) { if (propertiesFiles.isEmpty()) { throw new IllegalStateException(); } myState.getCustomResourceBundles() .add(new CustomResourceBundleState().addAll(ContainerUtil.map(propertiesFiles, file -> file.getVirtualFile().getUrl())).s... | combineToResourceBundle |
26,447 | ResourceBundle (final @NotNull List<? extends PropertiesFile> propertiesFiles, final String baseName) { combineToResourceBundle(propertiesFiles, baseName); return propertiesFiles.get(0).getResourceBundle(); } | combineToResourceBundleAndGet |
26,448 | CustomResourceBundle (final @NotNull PropertiesFile file) { final VirtualFile virtualFile = file.getVirtualFile(); if (virtualFile == null) { return null; } final CustomResourceBundleState state = getCustomResourceBundleState(virtualFile); return state == null ? null : CustomResourceBundle.fromState(state, file.getProj... | getCustomResourceBundle |
26,449 | boolean (final @NotNull VirtualFile virtualFile) { if (myState.getDissociatedFiles().isEmpty() && myState.getCustomResourceBundles().isEmpty()) { return false; } final String url = virtualFile.getUrl(); return myState.getDissociatedFiles().contains(url) || getCustomResourceBundleState(virtualFile) != null; } | isDefaultDissociated |
26,450 | CustomResourceBundleState (final @NotNull VirtualFile virtualFile) { if (myState.getCustomResourceBundles().isEmpty()) { return null; } final String url = virtualFile.getUrl(); for (CustomResourceBundleState customResourceBundleState : myState.getCustomResourceBundles()) { if (customResourceBundleState.getFileUrls().co... | getCustomResourceBundleState |
26,451 | ResourceBundleManagerState () { return myState.isEmpty() ? null : myState; } | getState |
26,452 | void (@NotNull ResourceBundleManagerState state) { myState = state.removeNonExistentFiles(); } | loadState |
26,453 | void (@NotNull ResourceBundle resourceBundle) { final FileEditorManager fileEditorManager = FileEditorManager.getInstance(resourceBundle.getProject()); fileEditorManager.closeFile(new ResourceBundleAsVirtualFile(resourceBundle)); for (final PropertiesFile propertiesFile : resourceBundle.getPropertiesFiles()) { fileEdit... | closeResourceBundleEditors |
26,454 | String () { return HASH_COMMENT_PREFIX; } | getLineCommentPrefix |
26,455 | String () { return null; } | getBlockCommentPrefix |
26,456 | String () { return null; } | getBlockCommentSuffix |
26,457 | String () { return null; } | getCommentedBlockCommentPrefix |
26,458 | String () { return null; } | getCommentedBlockCommentSuffix |
26,459 | CommenterDataHolder (int startLine, int endLine, @NotNull Document document, @NotNull PsiFile file) { return null; } | createLineCommentingState |
26,460 | CommenterDataHolder (int selectionStart, int selectionEnd, @NotNull Document document, @NotNull PsiFile file) { return null; } | createBlockCommentingState |
26,461 | void (int line, int offset, @NotNull Document document, @NotNull CommenterDataHolder data) { document.insertString(offset, HASH_COMMENT_PREFIX); } | commentLine |
26,462 | void (int line, int offset, @NotNull Document document, @NotNull CommenterDataHolder data) { document.deleteString(offset, offset + HASH_COMMENT_PREFIX.length()); } | uncommentLine |
26,463 | boolean (int line, int offset, @NotNull Document document, @NotNull CommenterDataHolder data) { return CharArrayUtil.regionMatches(document.getCharsSequence(), offset, HASH_COMMENT_PREFIX) || CharArrayUtil.regionMatches(document.getCharsSequence(), offset, EXCLAMATION_COMMENT_PREFIX); } | isLineCommented |
26,464 | String (int line, @NotNull Document document, @NotNull CommenterDataHolder data) { return HASH_COMMENT_PREFIX; } | getCommentPrefix |
26,465 | TextRange (int selectionStart, int selectionEnd, @NotNull Document document, @NotNull CommenterDataHolder data) { throw new UnsupportedOperationException(); } | getBlockCommentRange |
26,466 | String (int selectionStart, @NotNull Document document, @NotNull CommenterDataHolder data) { return getBlockCommentPrefix(); } | getBlockCommentPrefix |
26,467 | String (int selectionEnd, @NotNull Document document, @NotNull CommenterDataHolder data) { return getBlockCommentSuffix(); } | getBlockCommentSuffix |
26,468 | void (int startOffset, int endOffset, Document document, CommenterDataHolder data) { throw new UnsupportedOperationException(); } | uncommentBlockComment |
26,469 | TextRange (int startOffset, int endOffset, Document document, CommenterDataHolder data) { throw new UnsupportedOperationException(); } | insertBlockComment |
26,470 | IElementType () { return PropertiesTokenTypes.END_OF_LINE_COMMENT; } | getLineCommentTokenType |
26,471 | IElementType () { return null; } | getBlockCommentTokenType |
26,472 | IElementType () { return null; } | getDocumentationCommentTokenType |
26,473 | String () { return null; } | getDocumentationCommentPrefix |
26,474 | String () { return null; } | getDocumentationCommentLinePrefix |
26,475 | String () { return null; } | getDocumentationCommentSuffix |
26,476 | boolean (PsiComment element) { return false; } | isDocumentationComment |
26,477 | String () { return PropertiesBundle.message("properties.files.inspection.group.display.name"); } | getGroupDisplayName |
26,478 | String () { return myBaseName; } | getBaseName |
26,479 | Set<String> () { return myFileUrls; } | getFileUrls |
26,480 | List<VirtualFile> (@NotNull final VirtualFileManager manager) { return ContainerUtil.mapNotNull(getFileUrls(), url -> manager.findFileByUrl(url)); } | getFiles |
26,481 | CustomResourceBundleState (final VirtualFileManager virtualFileManager) { final List<String> existentFiles = ContainerUtil.filter(myFileUrls, url -> virtualFileManager.findFileByUrl(url) != null); if (existentFiles.isEmpty()) { return null; } final CustomResourceBundleState customResourceBundleState = new CustomResourc... | removeNonExistentFiles |
26,482 | CustomResourceBundleState (final Collection<String> urls) { myFileUrls.addAll(urls); return this; } | addAll |
26,483 | CustomResourceBundleState (String baseName) { myBaseName = baseName; return this; } | setBaseName |
26,484 | String (final PsiFile psiFile) { PsiDirectory directory = ReadAction.compute(() -> psiFile.getParent()); if (directory == null) return null; String packageQualifiedName = PropertiesUtil.getPackageQualifiedName(directory); if (packageQualifiedName == null) return null; StringBuilder qName = new StringBuilder(packageQual... | evaluateBundleName |
26,485 | String (final PsiFile psiFile) { return ResourceBundleManager.getInstance(psiFile.getProject()).getBaseName(psiFile); } | evaluateBundleName |
26,486 | TextRange (@NotNull PropertyImpl element) { ASTNode valueNode = element.getValueNode(); if (valueNode == null) return TextRange.from(element.getTextLength(), 0); TextRange range = valueNode.getTextRange(); return TextRange.from(range.getStartOffset() - element.getTextRange().getStartOffset(), range.getLength()); } | getRangeInElement |
26,487 | PropertiesReferenceManager (@NotNull Project project) { return project.getService(PropertiesReferenceManager.class); } | getInstance |
26,488 | List<PropertiesFile> (@NotNull Module module, @NotNull String bundleName) { ConcurrentMap<String, List<PropertiesFile>> map = CachedValuesManager.getManager(module.getProject()).getCachedValue(module, () -> { ConcurrentMap<String, List<PropertiesFile>> factoryMap = ConcurrentFactoryMap.createMap( bundleName1 -> findPro... | findPropertiesFiles |
26,489 | List<PropertiesFile> (@NotNull GlobalSearchScope searchScope, @NotNull String bundleName, @NotNull BundleNameEvaluator bundleNameEvaluator) { final ArrayList<PropertiesFile> result = new ArrayList<>(); processPropertiesFiles(searchScope, (baseName, propertiesFile) -> { if (baseName.equals(bundleName)) { result.add(prop... | findPropertiesFiles |
26,490 | PropertiesFile (@NotNull Module module, @NotNull String bundleName, @Nullable Locale locale) { List<PropertiesFile> propFiles = findPropertiesFiles(module, bundleName); if (locale != null) { for(PropertiesFile propFile: propFiles) { if (propFile.getLocale().equals(locale)) { return propFile; } } } // fallback to defaul... | findPropertiesFile |
26,491 | boolean (@NotNull final PropertiesFileProcessor processor) { return processPropertiesFiles(GlobalSearchScope.allScope(myPsiManager.getProject()), processor, BundleNameEvaluator.DEFAULT); } | processAllPropertiesFiles |
26,492 | boolean (@NotNull final GlobalSearchScope searchScope, @NotNull final PropertiesFileProcessor processor, @NotNull final BundleNameEvaluator evaluator) { for(VirtualFile file:FileTypeIndex.getFiles(PropertiesFileType.INSTANCE, searchScope)) { if (!processFile(file, evaluator, processor)) return false; } if (!myDumbServi... | processPropertiesFiles |
26,493 | boolean (@NotNull VirtualFile file, @NotNull BundleNameEvaluator evaluator, @NotNull PropertiesFileProcessor processor) { final PsiFile psiFile = myPsiManager.findFile(file); PropertiesFile propertiesFile = PropertiesImplUtil.getPropertiesFile(psiFile); if (propertiesFile != null) { final String qName = evaluator.evalu... | processFile |
26,494 | PropertiesQuickFixFactory () { return ApplicationManager.getApplication().getService(PropertiesQuickFixFactory.class); } | getInstance |
26,495 | List<PropertiesFile> () { if (myBundleName == null) { return null; } return retrievePropertyFilesByBundleName(myBundleName, myElement); } | getPropertiesFiles |
26,496 | List<PropertiesFile> (String bundleName, PsiElement element) { return I18nUtil.propertiesFilesByBundleName(bundleName, element); } | retrievePropertyFilesByBundleName |
26,497 | List<PropertiesFile> (@Nullable String resourceBundleName, @NotNull PsiElement context) { if (resourceBundleName == null) return Collections.emptyList(); PsiFile containingFile = context.getContainingFile(); PsiElement containingFileContext = InjectedLanguageManager.getInstance(containingFile.getProject()).getInjection... | propertiesFilesByBundleName |
26,498 | List<String> (@NotNull Project project, @NotNull Set<? extends Module> contextModules) { List<String> relevantPaths = new ArrayList<>(); List<String> otherPaths = new ArrayList<>(); final ProjectFileIndex projectFileIndex = ProjectRootManager.getInstance(project).getFileIndex(); PropertiesFileProcessor processor = (bas... | defaultSuggestPropertiesFiles |
26,499 | void (PropertyReferenceBase propertyReference, final PropertiesFile propertiesFile, final Set<Object> variants) { if (propertiesFile == null) return; VirtualFile virtualFile = propertiesFile.getVirtualFile(); if (virtualFile == null || !ProjectRootManager.getInstance(propertiesFile.getProject()).getFileIndex().isInCont... | addVariantsFromFile |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.