Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
27,200
PsiDirectory (ResourceBundle resourceBundle) { PsiDirectory containingDirectory = null; for (PropertiesFile propertiesFile : resourceBundle.getPropertiesFiles()) { if (containingDirectory == null) { containingDirectory = propertiesFile.getContainingFile().getContainingDirectory(); } else if (!containingDirectory.isEqui...
getResourceBundlePlacementDirectory
27,201
String () { return PropertiesBundle.message("create.resource.bundle.dialog.error"); }
getErrorTitle
27,202
String (@NotNull PsiDirectory directory, @NotNull String newName) { return PropertiesBundle.message("create.resource.bundle.dialog.action.name", newName); }
getActionName
27,203
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
27,204
void (@NotNull AnActionEvent e) { ResourceBundle resourceBundle = getResourceBundle(e); e.getPresentation().setEnabledAndVisible(resourceBundle != null && CreateResourceBundleDialogComponent.getResourceBundlePlacementDirectory(resourceBundle) != null); }
update
27,205
void (@NotNull AnActionEvent e) { final ResourceBundle resourceBundle = getResourceBundle(e); if (resourceBundle == null) return; Project project = e.getProject(); if (project == null) return; new CreateResourceBundleDialogComponent.Dialog(project, null, resourceBundle).show(); }
actionPerformed
27,206
ResourceBundle (@NotNull AnActionEvent e) { final Navigatable[] data = e.getData(CommonDataKeys.NAVIGATABLE_ARRAY); if (data == null || data.length != 1) return null; if (!(data[0] instanceof ResourceBundleAwareNode)) return null; return ((ResourceBundleAwareNode)data[0]).getResourceBundle(); }
getResourceBundle
27,207
FormattingModel (@NotNull FormattingContext formattingContext) { final ASTNode root = TreeUtil.getFileElement((TreeElement)SourceTreeToPsiMap.psiElementToTree(formattingContext.getPsiElement())); PsiFile containingFile = formattingContext.getContainingFile(); final FormattingDocumentModelImpl documentModel = Formatting...
createModel
27,208
PsiBasedStripTrailingSpacesFilter (@NotNull Document document) { return new PsiBasedStripTrailingSpacesFilter(document) { @Override protected void process(@NotNull PsiFile psiFile) { new PsiRecursiveElementVisitor() { @Override public void visitElement(@NotNull PsiElement element) { if (element instanceof PropertyImpl)...
createFilter
27,209
void (@NotNull PsiFile psiFile) { new PsiRecursiveElementVisitor() { @Override public void visitElement(@NotNull PsiElement element) { if (element instanceof PropertyImpl) { final ASTNode valueNode = ((PropertyImpl)element).getValueNode(); if (valueNode != null) { disableRange(valueNode.getTextRange(), true); } } super...
process
27,210
void (@NotNull PsiElement element) { if (element instanceof PropertyImpl) { final ASTNode valueNode = ((PropertyImpl)element).getValueNode(); if (valueNode != null) { disableRange(valueNode.getTextRange(), true); } } super.visitElement(element); }
visitElement
27,211
boolean (@NotNull Language language) { return language.is(PropertiesLanguage.INSTANCE); }
isApplicableTo
27,212
List<Block> () { return Collections.emptyList(); }
buildChildren
27,213
Spacing (@Nullable Block child1, @NotNull Block child2) { return null; }
getSpacing
27,214
boolean () { return true; }
isLeaf
27,215
Indent () { return Indent.getAbsoluteNoneIndent(); }
getIndent
27,216
List<Block> () { final List<Block> result = new ArrayList<>(); ASTNode child = myNode.getFirstChildNode(); while (child != null) { if (!(child instanceof PsiWhiteSpace)) { if (child.getElementType() == PropertiesElementTypes.PROPERTIES_LIST) { ASTNode propertyNode = child.getFirstChildNode(); while (propertyNode != nul...
buildChildren
27,217
void (ASTNode propertyNode, List<? super Block> collector) { final ASTNode[] nonWhiteSpaces = propertyNode.getChildren(TokenSet.create(PropertiesTokenTypes.KEY_CHARACTERS, PropertiesTokenTypes.KEY_VALUE_SEPARATOR, PropertiesTokenTypes.VALUE_CHARACTERS)); final Alignment alignment = mySettings.getCommonSettings(Properti...
collectPropertyBlock
27,218
Spacing (@Nullable Block child1, @NotNull Block child2) { if (child1 == null) { return null; } return mySettings.getCustomSettings(PropertiesCodeStyleSettings.class).SPACES_AROUND_KEY_VALUE_DELIMITER && (isSeparator(child1) || isSeparator(child2)) || isKeyValue(child1, child2) ? Spacing.createSpacing(1, 1, 0, true, 0) ...
getSpacing
27,219
boolean (Block maybeKey, Block maybeValue) { if (!(maybeKey instanceof PropertyBlock) || !PropertiesTokenTypes.KEY_CHARACTERS.equals(((PropertyBlock)maybeKey).getNode().getElementType())) { return false; } return maybeValue instanceof PropertyBlock && PropertiesTokenTypes.VALUE_CHARACTERS.equals(((PropertyBlock)maybeVa...
isKeyValue
27,220
boolean (Block block) { return block instanceof PropertyBlock && PropertiesTokenTypes.KEY_VALUE_SEPARATOR.equals(((PropertyBlock)block).getNode().getElementType()); }
isSeparator
27,221
boolean () { return false; }
isLeaf
27,222
StructureViewBuilder (@NotNull final PsiFile psiFile) { PropertiesFileImpl file = (PropertiesFileImpl)psiFile; String separator = PropertiesSeparatorManager.getInstance(file.getProject()).getSeparator(file.getResourceBundle()); return new StructureViewBuilder() { @Override @NotNull public StructureView createStructureV...
getStructureViewBuilder
27,223
StructureView (FileEditor fileEditor, @NotNull Project project) { return new PropertiesFileStructureViewComponent(project, file, fileEditor, separator); }
createStructureView
27,224
boolean (@NotNull TemplateActionContext templateActionContext) { final PsiFile file = templateActionContext.getFile(); return file instanceof PropertiesFile && !(file.findElementAt(templateActionContext.getStartOffset()) instanceof PsiWhiteSpace); }
isInContext
27,225
Tokenizer (PsiElement element) { if (element instanceof PropertyValueImpl) { return myPropertyValueTokenizer; } if (element instanceof PropertyKeyImpl) { return myPropertyTokenizer; } if (element instanceof Property) { return EMPTY_TOKENIZER; } return super.getTokenizer(element); }
getTokenizer
27,226
String () { return PropertiesBundle.message("copy.property.value.to.clipboard.intention.family.name"); }
getFamilyName
27,227
ModCommand (@NotNull ActionContext context) { final Property property = CopyPropertyValueToClipboardIntention.getProperty(context); if (property == null) return ModCommand.nop(); final String value = property.getUnescapedValue(); if (value == null) return ModCommand.nop(); return ModCommand.copyToClipboard(value); }
perform
27,228
String () { return PropertiesBundle.message("copy.property.key.to.clipboard.intention.family.name"); }
getFamilyName
27,229
ModCommand (@NotNull ActionContext context) { final Property property = CopyPropertyValueToClipboardIntention.getProperty(context); if (property == null) return ModCommand.nop(); final String key = property.getUnescapedKey(); if (key == null) return ModCommand.nop(); return ModCommand.copyToClipboard(key); }
perform
27,230
PsiElement (@NotNull PsiElement element) { return null; }
adjustElementToCopy
27,231
String (@NotNull PsiElement element) { return element instanceof Property ? ((Property)element).getKey() : null; }
getQualifiedName
27,232
PsiElement (@NotNull String fqn, @NotNull Project project) { return null; }
qualifiedNameToElement
27,233
boolean (final Object element, final VirtualFile vFile) { if (element instanceof ResourceBundle bundle) { final List<PropertiesFile> propertiesFiles = bundle.getPropertiesFiles(); for (PropertiesFile file : propertiesFiles) { final VirtualFile virtualFile = file.getVirtualFile(); if (virtualFile == null) continue; if (...
elementContainsFile
27,234
int (final Object element, final boolean isSortByType) { return -1; }
getElementWeight
27,235
String (final Object element) { return null; }
getElementLocation
27,236
boolean (final Object element) { if (element instanceof ResourceBundle resourceBundle) { List<PropertiesFile> propertiesFiles = resourceBundle.getPropertiesFiles(); if (propertiesFiles.size() == 1) { //todo result.add(new PsiFileNode(myProject, propertiesFiles.iterator().next(), this)); return true; } } return false; }
isInvalidElement
27,237
String () { return "resource_bundle"; }
getFavoriteTypeId
27,238
String (final Object element) { if (element instanceof ResourceBundleImpl) { return ((ResourceBundleImpl)element).getUrl(); } else if (element instanceof PsiFile[] files) { ResourceBundle bundle = null; for (PsiFile file : files) { PropertiesFile propertiesFile = PropertiesImplUtil.getPropertiesFile(file); if (properti...
getElementUrl
27,239
String (final Object element) { return null; }
getElementModuleName
27,240
Object[] (final Project project, final String url, final String moduleName) { return new Object[]{PropertiesImplUtil.createByUrl(url, project)}; }
createPathFromUrl
27,241
CodeStyleConfigurable (@NotNull CodeStyleSettings baseSettings, @NotNull CodeStyleSettings modelSettings) { return new CodeStyleAbstractConfigurable(baseSettings, modelSettings, PropertiesBundle.message("properties.files.code.style.node.title")) { @Override public String getHelpTopic() { return "reference.settingsdialo...
createConfigurable
27,242
String () { return "reference.settingsdialog.codestyle.properties"; }
getHelpTopic
27,243
CodeStyleAbstractPanel (@NotNull CodeStyleSettings settings) { return new PropertiesCodeStyleSettingsPanel(settings); }
createPanel
27,244
CustomCodeStyleSettings (@NotNull CodeStyleSettings settings) { return new PropertiesCodeStyleSettings(settings); }
createCustomSettings
27,245
Language () { return PropertiesLanguage.INSTANCE; }
getLanguage
27,246
void (@NotNull CodeStyleSettingsCustomizable consumer, @NotNull SettingsType settingsType) { consumer.showStandardOptions("ALIGN_GROUP_FIELD_DECLARATIONS"); consumer.showCustomOption(PropertiesCodeStyleSettings.class, "SPACES_AROUND_KEY_VALUE_DELIMITER", PropertiesBundle.message("insert.space.around.key.value.delimiter...
customizeSettings
27,247
String (@NotNull SettingsType settingsType) { return """ key1=value some_key=some_value #commentaries last.key=some text here"""; }
getCodeSample
27,248
CodeStyleFieldAccessor (@NotNull Object codeStyleObject, @NotNull Field field) { if (codeStyleObject instanceof PropertiesCodeStyleSettings) { if ("KEY_VALUE_DELIMITER_CODE".equals(field.getName())) { return new MagicIntegerConstAccessor( codeStyleObject, field, new int[] {0, 1, 2}, new String[] {"equals", "colon", "sp...
getAccessor
27,249
void () { addOption("ALIGN_GROUP_FIELD_DECLARATIONS", PropertiesBundle.message("align.properties.in.column.code.style.option")); }
initTables
27,250
Language () { return PropertiesLanguage.INSTANCE; }
getDefaultLanguage
27,251
boolean (PsiElement element) { return element instanceof IProperty; }
handlesElement
27,252
NonCodeUsageSearchInfo (@NotNull PsiElement element, PsiElement @NotNull [] allElementsToDelete, @NotNull List<? super UsageInfo> result) { SafeDeleteProcessor.findGenericElementUsages(element, result, allElementsToDelete); return new NonCodeUsageSearchInfo(SafeDeleteProcessor.getDefaultInsideDeletedCondition(allElemen...
findUsages
27,253
Collection<PsiElement> (@NotNull PsiElement element, @NotNull Collection<? extends PsiElement> allElementsToDelete, boolean askUser) { final IProperty property = (IProperty)element; final String key = property.getKey(); if (key == null) { return null; } final PropertiesFile file = property.getPropertiesFile(); if (file...
getAdditionalElementsToDelete
27,254
Collection<String> (@NotNull PsiElement element, PsiElement @NotNull [] allElementsToDelete) { return null; }
findConflicts
27,255
boolean (PsiElement element) { return RefactoringSettings.getInstance().SAFE_DELETE_SEARCH_IN_COMMENTS; }
isToSearchInComments
27,256
void (PsiElement element, boolean enabled) { RefactoringSettings.getInstance().SAFE_DELETE_SEARCH_IN_COMMENTS = enabled; }
setToSearchInComments
27,257
boolean (PsiElement element) { return RefactoringSettings.getInstance().SAFE_DELETE_SEARCH_IN_NON_JAVA; }
isToSearchForTextOccurrences
27,258
void (PsiElement element, boolean enabled) { RefactoringSettings.getInstance().SAFE_DELETE_SEARCH_IN_NON_JAVA = enabled; }
setToSearchForTextOccurrences
27,259
boolean (final PsiElement element) { return element instanceof PropertiesFile; }
handlesElement
27,260
NonCodeUsageSearchInfo (@NotNull final PsiElement element, final PsiElement @NotNull [] allElementsToDelete, final @NotNull List<? super UsageInfo> result) { PropertiesFile file = (PropertiesFile) element; List<PsiElement> elements = new ArrayList<>(); elements.add(file.getContainingFile()); for (IProperty property : f...
findUsages
27,261
Collection<PsiElement> (@NotNull final PsiElement element, final @NotNull Collection<? extends PsiElement> allElementsToDelete) { return Collections.singletonList(element); }
getElementsToSearch
27,262
Collection<PsiElement> (@NotNull final PsiElement element, final @NotNull Collection<? extends PsiElement> allElementsToDelete, final boolean askUser) { return null; }
getAdditionalElementsToDelete
27,263
Collection<String> (@NotNull final PsiElement element, final PsiElement @NotNull [] allElementsToDelete) { return null; }
findConflicts
27,264
UsageInfo[] (final @NotNull Project project, final UsageInfo @NotNull [] usages) { return usages; }
preprocessUsages
27,265
boolean (PsiElement element) { return RefactoringSettings.getInstance().SAFE_DELETE_SEARCH_IN_COMMENTS; }
isToSearchInComments
27,266
boolean (PsiElement element) { return RefactoringSettings.getInstance().SAFE_DELETE_SEARCH_IN_NON_JAVA; }
isToSearchForTextOccurrences
27,267
void (PsiElement element, boolean enabled) { RefactoringSettings.getInstance().SAFE_DELETE_SEARCH_IN_COMMENTS = enabled; }
setToSearchInComments
27,268
void (PsiElement element, boolean enabled) { RefactoringSettings.getInstance().SAFE_DELETE_SEARCH_IN_NON_JAVA = enabled; }
setToSearchForTextOccurrences
27,269
boolean (@NotNull PsiElement element) { return true; }
isSafeDeleteAvailable
27,270
boolean (@NotNull PsiElement element, @Nullable PsiElement context) { return true; }
isMemberInplaceRenameAvailable
27,271
boolean (@NotNull final PsiElement element) { return element instanceof IProperty || (element instanceof PomTargetPsiElement && ((PomTargetPsiElement)element).getTarget() instanceof XmlProperty); }
canProcessElement
27,272
void (@NotNull final PsiElement element, @NotNull final String newName, @NotNull final Map<PsiElement, String> allRenames) { ResourceBundle resourceBundle = Objects.requireNonNull(PropertiesImplUtil.getProperty(element)).getPropertiesFile().getResourceBundle(); final Map<PsiElement, String> allRenamesCopy = new LinkedH...
prepareRenaming
27,273
void (@NotNull PsiElement element, @NotNull final String newName, @NotNull Map<? extends PsiElement, String> allRenames, @NotNull List<UsageInfo> result) { allRenames.forEach((key, value) -> { final PropertiesFile propertiesFile = PropertiesImplUtil.getPropertiesFile(key.getContainingFile()); if (propertiesFile == null...
findCollisions
27,274
String () { return PropertiesBundle.message("rename.hides.existing.property.conflict", value); }
getDescription
27,275
boolean (@NotNull PsiElement element) { return PropertiesRefactoringSettings.getInstance().RENAME_SEARCH_IN_COMMENTS; }
isToSearchInComments
27,276
void (@NotNull PsiElement element, boolean enabled) { PropertiesRefactoringSettings.getInstance().RENAME_SEARCH_IN_COMMENTS = enabled; }
setToSearchInComments
27,277
void (PsiElement @NotNull [] elements, @NotNull GlobalCompilingVisitor globalVisitor) { if (elements.length > 1) throw new MalformedPatternException(); final CompiledPattern pattern = globalVisitor.getContext().getPattern(); for (PsiElement element : elements) { if (element instanceof PsiComment comment) { final String...
compile
27,278
PsiElementVisitor (@NotNull GlobalMatchingVisitor globalVisitor) { return new PsiElementVisitor() { @Override public void visitElement(@NotNull PsiElement element) { if (element instanceof Property) { Property other = globalVisitor.getElement(Property.class); final PsiElement key = element.getFirstChild(); if (globalVi...
createMatchingVisitor
27,279
void (@NotNull PsiElement element) { if (element instanceof Property) { Property other = globalVisitor.getElement(Property.class); final PsiElement key = element.getFirstChild(); if (globalVisitor.setResult(globalVisitor.match(key, other.getFirstChild()))) { final PsiElement value = element.getLastChild(); if (value in...
visitElement
27,280
void (@NotNull PsiComment comment) { final PsiElement other = globalVisitor.getElement(); final MatchingHandler handler = comment.getUserData(CompiledPattern.HANDLER_KEY); globalVisitor.setResult(handler instanceof LiteralWithSubstitutionHandler ? handler.match(comment, other, globalVisitor.getMatchContext()) : globalV...
visitComment
27,281
CompiledPattern () { return new CompiledPattern() { { setStrategy(PropertiesMatchingStrategy.INSTANCE); } @Override public String @NotNull [] getTypedVarPrefixes() { return new String[] {TYPED_VAR_PREFIX}; } @Override public boolean isTypedVar(@NotNull String str) { return str.startsWith(TYPED_VAR_PREFIX); } }; }
createCompiledPattern
27,282
boolean (@NotNull String str) { return str.startsWith(TYPED_VAR_PREFIX); }
isTypedVar
27,283
boolean (@NotNull Language language) { return language == PropertiesLanguage.INSTANCE; }
isMyLanguage
27,284
StructuralReplaceHandler (@NotNull Project project, @NotNull ReplaceOptions replaceOptions) { return new DocumentBasedReplaceHandler(project); }
getReplaceHandler
27,285
boolean (PsiElement start) { return start.getLanguage() == PropertiesLanguage.INSTANCE; }
continueMatching
27,286
boolean (PsiElement element, PsiElement elementToMatchWith) { return false; }
shouldSkip
27,287
void (final @NotNull AnActionEvent e) { final List<PropertiesFile> initialPropertiesFiles = getPropertiesFiles(e); final List<PropertiesFile> propertiesFiles = initialPropertiesFiles == null ? new ArrayList<>() : new ArrayList<>(initialPropertiesFiles); final List<ResourceBundle> resourceBundles = getResourceBundles(e)...
actionPerformed
27,288
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
27,289
void (final @NotNull AnActionEvent e) { final Collection<PropertiesFile> propertiesFiles = getPropertiesFiles(e); final List<ResourceBundle> resourceBundles = getResourceBundles(e); int elementCount = 0; if (propertiesFiles != null) { elementCount += propertiesFiles.size(); } if (resourceBundles != null) { elementCount...
update
27,290
boolean () { return true; }
isDumbAware
27,291
boolean (final String newBaseName) { return !newBaseName.isEmpty() && checkBaseName(newBaseName) == null; }
checkInput
27,292
String () { return myFailedFile; }
getFailedFile
27,293
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
27,294
void (@NotNull final AnActionEvent e) { final Project project = e.getProject(); if (project == null) { return; } final Collection<ResourceBundle> resourceBundles = extractResourceBundles(e); assert resourceBundles.size() > 0; dissociate(resourceBundles, project); }
actionPerformed
27,295
void (@NotNull final AnActionEvent e) { final Collection<ResourceBundle> resourceBundles = extractResourceBundles(e); if (!resourceBundles.isEmpty()) { final String actionText = resourceBundles.size() == 1 ? PropertiesBundle.message("action.DissociateResourceBundleSingle.text", ContainerUtil.getFirstItem(resourceBundle...
update
27,296
void (final Collection<? extends ResourceBundle> resourceBundles, final Project project) { final Set<PsiFileSystemItem> toUpdateInProjectView = new HashSet<>(); for (ResourceBundle resourceBundle : resourceBundles) { for (final PropertiesFile propertiesFile : resourceBundle.getPropertiesFiles()) { PsiDirectory containi...
dissociate
27,297
Collection<ResourceBundle> (final AnActionEvent event) { final Set<ResourceBundle> targetResourceBundles = new HashSet<>(); final ResourceBundle[] chosenResourceBundles = event.getData(ResourceBundle.ARRAY_DATA_KEY); if (chosenResourceBundles != null) { for (ResourceBundle resourceBundle : chosenResourceBundles) { if (...
extractResourceBundles
27,298
String () { return "Properties"; }
getName
27,299
String () { return PropertiesBundle.message("filetype.properties.description"); }
getDescription