Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
26,700 | ASTNode () { return ArrayUtil.getFirstElement(getNode().getChildren(PROPERTIES_LIST_SET)); } | getPropertiesList |
26,701 | IProperty (@NotNull String key) { return propertiesByKey(key).findFirst().orElse(null); } | findPropertyByKey |
26,702 | List<IProperty> (@NotNull String key) { return propertiesByKey(key).collect(Collectors.toList()); } | findPropertiesByKey |
26,703 | ResourceBundle () { return PropertiesImplUtil.getResourceBundle(this); } | getResourceBundle |
26,704 | Locale () { return PropertiesUtil.getLocale(this); } | getLocale |
26,705 | IProperty (@NotNull String key, @NotNull String value, @NotNull PropertyKeyValueFormat format) { return (IProperty)addProperty(PropertiesElementFactory.createProperty(getProject(), key, value, null, format)); } | addProperty |
26,706 | IProperty (@NotNull String key, @NotNull String value, @Nullable IProperty anchor) { return (IProperty)addPropertyAfter(PropertiesElementFactory.createProperty(getProject(), key, value, null), anchor); } | addPropertyAfter |
26,707 | void (ASTNode anchorBefore) { ASTNode propertiesList = getPropertiesList(); if (anchorBefore == null && propertiesList.getFirstChildNode() == null) { getNode().addChild(ASTFactory.whitespace("\n"), propertiesList); } else { propertiesList.addChild(ASTFactory.whitespace("\n"), anchorBefore); } } | insertLineBreakBefore |
26,708 | boolean () { ASTNode propertiesList = getPropertiesList(); ASTNode lastChild = propertiesList.getLastChildNode(); if (lastChild != null) { return !lastChild.getText().endsWith("\n"); } ASTNode prev = propertiesList.getTreePrev(); return prev == null || !PropertiesTokenTypes.WHITESPACES.contains(prev.getElementType()); } | haveToAddNewLine |
26,709 | boolean () { return PropertiesImplUtil.isAlphaSorted(getProperties()); } | isAlphaSorted |
26,710 | IProperty (@NotNull IProperty property) { List<IProperty> properties = getProperties(); if (properties.isEmpty()) return null; if (PropertiesImplUtil.isAlphaSorted(properties)) { final int insertIndex = Collections.binarySearch(getProperties(), property, (p1, p2) -> { final String k1 = p1.getKey(); final String k2 = p2.getKey(); LOG.assertTrue(k1 != null && k2 != null); return String.CASE_INSENSITIVE_ORDER.compare(k1, k2); }); return insertIndex == -1 ? null : getProperties().get(insertIndex < 0 ? -insertIndex - 2 : insertIndex); } return ContainerUtil.getLastItem(properties); } | findInsertionPosition |
26,711 | boolean () { Project project = getProject(); if (DumbService.isDumb(project)) return false; VirtualFile file = getVirtualFile(); return file != null && ProjectFileIndex.getInstance(project).isInContent(file) && !InjectedLanguageManager.getInstance(project).isInjectedFragment(getContainingFile()); } | shouldReadIndex |
26,712 | PropertiesRefactoringSettings () { return ApplicationManager.getApplication().getService(PropertiesRefactoringSettings.class); } | getInstance |
26,713 | PropertiesRefactoringSettings () { return this; } | getState |
26,714 | void (@NotNull PropertiesRefactoringSettings state) { XmlSerializerUtil.copyBean(state, this); } | loadState |
26,715 | String (@NonNls final String name, final PsiNamedElement element) { return myResourceBundleManager.getBaseName((PsiFile)element); } | nameToCanonicalName |
26,716 | String (@NonNls final String canonicalName, final PsiNamedElement element) { final String oldCanonicalName = myResourceBundleManager.getBaseName((PsiFile)element); final String oldName = element.getName(); assert oldName != null; return canonicalName + oldName.substring(oldCanonicalName.length()); } | canonicalNameToName |
26,717 | String (PsiNamedElement element, NameSuggester suggester, String newClassName, String oldClassName) { final String elementName = element.getName(); if (elementName == null) { return newClassName; } final String baseClassNameSuffix = oldClassName.substring(myOldBaseName.length()); if (baseClassNameSuffix.length() >= newClassName.length()) { return newClassName; } final String newBaseName = newClassName.substring(0, newClassName.length() - baseClassNameSuffix.length()); return newBaseName + elementName.substring(myOldBaseName.length()); } | suggestNameForElement |
26,718 | boolean () { return true; } | isSelectedByDefault |
26,719 | String () { return PropertiesBundle.message("resource.bundle.renamer"); } | getDialogTitle |
26,720 | String () { return PropertiesBundle.message("resource.bundle.renamer.dialog.description"); } | getDialogDescription |
26,721 | String () { return PropertiesBundle.message("resource.bundle.renamer.entity.name"); } | entityName |
26,722 | void (final @NotNull PsiElement psiElement, final @NotNull Project project) { if (psiElement.isValid()) { PsiElementRenameHandler.invoke(psiElement, project, psiElement.getContainingFile(), null); } } | renameResourceBundleKey |
26,723 | void (final @NotNull ResourceBundle resourceBundle, final @NotNull Project project) { Messages.showInputDialog(project, PropertiesBundle.message("rename.bundle.enter.new.resource.bundle.base.name.prompt.text"), PropertiesBundle.message("rename.resource.bundle.dialog.title"), Messages.getQuestionIcon(), resourceBundle.getBaseName(), new ResourceBundleBaseNameInputValidator(project, resourceBundle)); } | renameResourceBundleBaseName |
26,724 | void (final List<? extends PsiElement> psiElements, final String section, final int sectionPosition) { if (psiElements.isEmpty()) { return; } final Project project = psiElements.get(0).getProject(); Messages.showInputDialog(project, PropertiesBundle.message("rename.bundle.enter.new.resource.bundle.section.name.prompt.text"), PropertiesBundle.message("rename.resource.bundle.section.dialog.title"), Messages.getQuestionIcon(), section, new ResourceBundleKeySectionInputValidator(psiElements, section, sectionPosition, project)); } | renameResourceBundleKeySection |
26,725 | boolean (final String inputString) { return true; } | checkInput |
26,726 | boolean (final String inputString) { RenameProcessor renameProcessor = null; for (final PsiElement psiElement : myPsiElements) { assert psiElement instanceof PsiNamedElement; final String oldName = ((PsiNamedElement)psiElement).getName(); assert oldName != null; final String newName = oldName.substring(0, mySectionPosition) + inputString + oldName.substring(mySectionPosition + mySection.length()); if (renameProcessor == null) { renameProcessor = new RenameProcessor(myProject, psiElement, newName, false, false); } else { renameProcessor.addElement(psiElement, newName); } } assert renameProcessor != null; renameProcessor.setCommandName(PropertiesBundle.message("rename.resource.bundle.section.dialog.title")); renameProcessor.doRun(); return true; } | canClose |
26,727 | boolean (String inputString) { return inputString.indexOf(File.separatorChar) < 0 && inputString.indexOf('/') < 0; } | checkInput |
26,728 | boolean (final String inputString) { final List<PropertiesFile> propertiesFiles = myResourceBundle.getPropertiesFiles(); for (PropertiesFile propertiesFile : propertiesFiles) { if (!FileModificationService.getInstance().prepareFileForWrite(propertiesFile.getContainingFile())) return false; } RenameProcessor renameProcessor = null; final String baseName = myResourceBundle.getBaseName(); for (PropertiesFile propertiesFile : propertiesFiles) { final VirtualFile virtualFile = propertiesFile.getVirtualFile(); if (virtualFile == null) { continue; } final String newName = inputString + virtualFile.getNameWithoutExtension().substring(baseName.length()) + "." + virtualFile.getExtension(); if (renameProcessor == null) { renameProcessor = new RenameProcessor(myProject, propertiesFile.getContainingFile(), newName, false, false); continue; } renameProcessor.addElement(propertiesFile.getContainingFile(), newName); } if (renameProcessor == null) { LOG.assertTrue(false); return true; } renameProcessor.setCommandName(PropertiesBundle.message("rename.resource.bundle.dialog.title")); renameProcessor.doRun(); return true; } | canClose |
26,729 | boolean (@NotNull final PsiElement element) { if (!(element instanceof PsiFile)) { return false; } final PropertiesFile file = PropertiesImplUtil.getPropertiesFile(element); if (file == null) { return false; } final ResourceBundle resourceBundle = file.getResourceBundle(); return resourceBundle.getBaseDirectory() != null && resourceBundle.getPropertiesFiles().size() != 1; } | isApplicable |
26,730 | String () { return PropertiesBundle.message("resource.bundle.renamer.option"); } | getOptionName |
26,731 | boolean () { return true; } | isEnabled |
26,732 | void (final boolean enabled) { } | setEnabled |
26,733 | AutomaticRenamer (final PsiElement element, final String newName, final Collection<UsageInfo> usages) { final PropertiesFile propertiesFile = PropertiesImplUtil.getPropertiesFile((PsiFile)element); assert propertiesFile != null; return new ResourceBundleRenamer(propertiesFile, newName); } | createRenamer |
26,734 | Lexer (@NotNull final OccurrenceConsumer consumer) { return createIndexingLexer(consumer); } | createLexer |
26,735 | Lexer (OccurrenceConsumer consumer) { return new PropertiesFilterLexer(new PropertiesLexer(), consumer); } | createIndexingLexer |
26,736 | Lexer (@NotNull OccurrenceConsumer consumer) { return PropertiesIdIndexer.createIndexingLexer(consumer); } | createLexer |
26,737 | void () { final IElementType tokenType = getDelegate().getTokenType(); if (tokenType == PropertiesTokenTypes.KEY_CHARACTERS) { scanWordsInToken(UsageSearchContext.IN_CODE | UsageSearchContext.IN_FOREIGN_LANGUAGES | UsageSearchContext.IN_PLAIN_TEXT, false, false); } else if (PropertiesTokenTypes.COMMENTS.contains(tokenType)) { scanWordsInToken(UsageSearchContext.IN_COMMENTS | UsageSearchContext.IN_PLAIN_TEXT, false, false); advanceTodoItemCountsInToken(); } else { scanWordsInToken(UsageSearchContext.IN_CODE | UsageSearchContext.IN_FOREIGN_LANGUAGES | UsageSearchContext.IN_PLAIN_TEXT, false, false); } getDelegate().advance(); } | advance |
26,738 | void (String name, boolean state) { if (GroupByWordPrefixes.ID.equals(name)) { ((PropertiesGroupingStructureViewModel)getTreeModel()).setGroupingActive(state); } super.setActionActive(name, state); } | setActionActive |
26,739 | void (@NotNull DefaultActionGroup result) { super.addGroupByActions(result); result.add(new ChangeGroupSeparatorAction()); } | addGroupByActions |
26,740 | ActionUpdateThread () { return ActionUpdateThread.BGT; } | getActionUpdateThread |
26,741 | void (@NotNull AnActionEvent e) { String separator = getCurrentSeparator(); Presentation presentation = e.getPresentation(); presentation.setText(PropertiesBundle.message("group.by.0", separator), false); presentation.setIcon(EmptyIcon.ICON_16); } | update |
26,742 | void () { removeAll(); for (final @NlsSafe String separator : myPredefinedSeparators) { if (separator.equals(getCurrentSeparator())) continue; AnAction action = new AnAction() { @Override public void actionPerformed(@NotNull AnActionEvent e) { ((PropertiesGroupingStructureViewModel)getTreeModel()).setSeparator(separator); setActionActive(GroupByWordPrefixes.ID, true); refillActionGroup(); rebuild(); } }; action.getTemplatePresentation().setText(separator, false); add(action); } add(new SelectSeparatorAction()); } | refillActionGroup |
26,743 | void (@NotNull AnActionEvent e) { ((PropertiesGroupingStructureViewModel)getTreeModel()).setSeparator(separator); setActionActive(GroupByWordPrefixes.ID, true); refillActionGroup(); rebuild(); } | actionPerformed |
26,744 | void (@NotNull AnActionEvent e) { String[] strings = ArrayUtilRt.toStringArray(myPredefinedSeparators); String current = getCurrentSeparator(); String separator = Messages.showEditableChooseDialog(PropertiesBundle.message("select.property.separator.dialog.text"), PropertiesBundle.message("select.property.separator.dialog.title"), Messages.getQuestionIcon(), strings, current, null); if (separator == null) { return; } myPredefinedSeparators.add(separator); refillActionGroup(); } | actionPerformed |
26,745 | ResourceBundle () { return myResourceBundle; } | getResourceBundle |
26,746 | VirtualFileSystem () { return LocalFileSystem.getInstance(); } | getFileSystem |
26,747 | String () { return getName(); } | getPath |
26,748 | String () { return myResourceBundle.isValid() ? myResourceBundle.getBaseName() : ""; } | getName |
26,749 | boolean (final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final ResourceBundleAsVirtualFile resourceBundleAsVirtualFile = (ResourceBundleAsVirtualFile)o; if (!myResourceBundle.equals(resourceBundleAsVirtualFile.myResourceBundle)) return false; return true; } | equals |
26,750 | int () { return myResourceBundle.hashCode(); } | hashCode |
26,751 | void (Object requestor, @NotNull String newName) { throw new UnsupportedOperationException(); } | rename |
26,752 | boolean () { return true; } | isWritable |
26,753 | boolean () { return false; } | isDirectory |
26,754 | boolean () { if (myResourceBundle instanceof ResourceBundleImpl && !myResourceBundle.isValid()) { return false; } for (PropertiesFile propertiesFile : myResourceBundle.getPropertiesFiles()) { final VirtualFile virtualFile = propertiesFile.getVirtualFile(); if (virtualFile == null || !virtualFile.isValid()) { return false; } } return true; } | isValid |
26,755 | VirtualFile () { return myResourceBundle.isValid() ? myResourceBundle.getBaseDirectory() : null; } | getParent |
26,756 | VirtualFile[] () { return EMPTY_ARRAY; } | getChildren |
26,757 | VirtualFile (Object requestor, @NotNull String name) { throw new UnsupportedOperationException(); } | createChildDirectory |
26,758 | VirtualFile (Object requestor, @NotNull String name) { throw new UnsupportedOperationException(); } | createChildData |
26,759 | void (Object requestor) { //todo } | delete |
26,760 | void (Object requestor, @NotNull VirtualFile newParent) { //todo } | move |
26,761 | InputStream () { throw new UnsupportedOperationException(); } | getInputStream |
26,762 | OutputStream (Object requestor, long newModificationStamp, long newTimeStamp) { throw new UnsupportedOperationException(); } | getOutputStream |
26,763 | long () { return 0; } | getModificationStamp |
26,764 | long () { return 0; } | getTimeStamp |
26,765 | long () { return 0; } | getLength |
26,766 | void (boolean asynchronous, boolean recursive, Runnable postRunnable) { List<VirtualFile> files = ContainerUtil.mapNotNull(myResourceBundle.getPropertiesFiles(), file -> file.getVirtualFile()); if (!files.isEmpty()) { RefreshQueue.getInstance().refresh(false, false, postRunnable, files); } } | refresh |
26,767 | void (@NotNull List<FoldingDescriptor> descriptors, @NotNull PsiElement root, @NotNull Document document, boolean quick) { } | buildLanguageFoldRegions |
26,768 | String (@NotNull ASTNode node, @NotNull TextRange range) { return ""; } | getLanguagePlaceholderText |
26,769 | boolean (@NotNull ASTNode node) { return false; } | isRegionCollapsedByDefault |
26,770 | boolean (@NotNull ASTNode node) { return node.getElementType() == PropertiesParserDefinition.FILE_ELEMENT_TYPE; } | isCustomFoldingRoot |
26,771 | boolean (PsiElement[] elements, boolean fromUpdate) { String propertyName = null; for (PsiElement element : elements) { final IProperty property = PropertiesImplUtil.getProperty(element); if (property == null) { return false; } else if (propertyName == null) { propertyName = property.getKey(); } else if (!propertyName.equals(property.getKey())) { return false; } } return propertyName != null; } | canCopy |
26,772 | void (PsiElement[] elements, PsiDirectory defaultTargetDirectory) { final IProperty representative = PropertiesImplUtil.getProperty(elements[0]); if (representative == null) return; final String key = representative.getKey(); if (key == null) { return; } final ResourceBundle resourceBundle = representative.getPropertiesFile().getResourceBundle(); final List<IProperty> properties = ContainerUtil.mapNotNull(resourceBundle.getPropertiesFiles(), propertiesFile -> propertiesFile.findPropertyByKey(key)); final PropertiesCopyDialog dlg = new PropertiesCopyDialog(properties, resourceBundle); if (!properties.isEmpty() && dlg.showAndGet()) { final String propertyNewName = dlg.getCurrentPropertyName(); final ResourceBundle destinationResourceBundle = dlg.getCurrentResourceBundle(); copyPropertyToAnotherBundle(properties, propertyNewName, destinationResourceBundle); } } | doCopy |
26,773 | void (PsiElement element) { } | doClone |
26,774 | void (@NotNull Collection<? extends IProperty> properties, @NotNull final String newName, @NotNull ResourceBundle targetResourceBundle) { final Map<IProperty, PropertiesFile> propertiesFileMapping = new HashMap<>(); for (IProperty property : properties) { final PropertiesFile containingFile = property.getPropertiesFile(); final PropertiesFile matched = findWithMatchedSuffix(containingFile, targetResourceBundle); if (matched != null) { propertiesFileMapping.put(property, matched); } } final Project project = targetResourceBundle.getProject(); if (properties.size() != propertiesFileMapping.size() && Messages.NO == Messages.showYesNoDialog(project, PropertiesBundle.message("copy.resource.bundles.are.not.matched.message"), PropertiesBundle.message("copy.resource.bundles.are.not.matched.title"), null)) { return; } if (!propertiesFileMapping.isEmpty()) { WriteCommandAction.runWriteCommandAction(project, () -> { if (!FileModificationService.getInstance().preparePsiElementsForWrite(ContainerUtil.map(propertiesFileMapping.values(), PropertiesFile::getContainingFile))) return; for (Map.Entry<IProperty, PropertiesFile> entry : propertiesFileMapping.entrySet()) { final String value = entry.getKey().getValue(); final PropertiesFile target = entry.getValue(); target.addProperty(newName, value); } }); final IProperty representativeFromSourceBundle = ContainerUtil.getFirstItem(properties); LOG.assertTrue(representativeFromSourceBundle != null); final ResourceBundle sourceResourceBundle = representativeFromSourceBundle.getPropertiesFile().getResourceBundle(); updateBundleEditors(newName, targetResourceBundle, sourceResourceBundle, project); } } | copyPropertyToAnotherBundle |
26,775 | void (@NotNull String newName, @NotNull ResourceBundle targetResourceBundle, @NotNull ResourceBundle sourceResourceBundle, @NotNull Project project) { } | updateBundleEditors |
26,776 | PropertiesFile (@NotNull PropertiesFile searchFile, @NotNull ResourceBundle resourceBundle) { final String targetSuffix = getPropertiesFileSuffix(searchFile, searchFile.getResourceBundle().getBaseName()); final String baseName = resourceBundle.getBaseName(); for (PropertiesFile propertiesFile : resourceBundle.getPropertiesFiles()) { if (getPropertiesFileSuffix(propertiesFile, baseName).equals(targetSuffix)) { return propertiesFile; } } return null; } | findWithMatchedSuffix |
26,777 | String (PropertiesFile searchFile, String baseName) { String suffix = FileUtilRt.getNameWithoutExtension(searchFile.getContainingFile().getName()); suffix = StringUtil.trimStart(suffix, baseName); return suffix; } | getPropertiesFileSuffix |
26,778 | ValidationInfo () { if (StringUtil.isEmpty(myCurrentPropertyName)) { return new ValidationInfo(PropertiesBundle.message("copy.property.name.must.be.not.empty.error")); } return PropertiesUtil.containsProperty(myCurrentResourceBundle, myCurrentPropertyName) ? new ValidationInfo(PropertiesBundle.message("copy.property.with.name.0.already.exists.conflict", myCurrentPropertyName)) : null; } | doValidate |
26,779 | String () { return myCurrentPropertyName; } | getCurrentPropertyName |
26,780 | ResourceBundle () { return myCurrentResourceBundle; } | getCurrentResourceBundle |
26,781 | JComponent () { JLabel informationalLabel = new JLabel(); informationalLabel.setText(PropertiesBundle.message("copy.property.0.label", ContainerUtil.getFirstItem(myProperties).getName())); informationalLabel.setFont(informationalLabel.getFont().deriveFont(Font.BOLD)); final Collection<PropertiesFile> propertiesFiles = new ArrayList<>(); GlobalSearchScope searchScope = ProjectScope.getContentScope(myProject); PropertiesReferenceManager .getInstance(myProject) .processPropertiesFiles(searchScope, (baseName, propertiesFile) -> { propertiesFiles.add(propertiesFile); return true; }, BundleNameEvaluator.BASE_NAME); PsiFileSystemItem[] resourceBundlesAsFileSystemItems = propertiesFiles .stream() .map(PropertiesFile::getResourceBundle) .distinct() .filter(b -> b.getBaseDirectory() != null) .sorted(Comparator.comparing(ResourceBundle::getBaseName)) .map(ResourceBundleAsFileSystemItem::new) .toArray(PsiFileSystemItem[]::new); final ComboBox<PsiFileSystemItem> resourceBundleComboBox = new ComboBox<>(resourceBundlesAsFileSystemItems); ComboboxSpeedSearch search = new ComboboxSpeedSearch(resourceBundleComboBox, null) { @Override protected String getElementText(Object element) { return ((PsiFileSystemItem)element).getName(); } }; search.setupListeners(); resourceBundleComboBox.setRenderer(new GotoFileCellRenderer(500) { @Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { final Component component = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); UIUtil.setBackgroundRecursively(component, isSelected ? UIUtil.getListSelectionBackground(true) : resourceBundleComboBox.getBackground()); return component; } }); resourceBundleComboBox.addItemListener(new ItemListener() { @Override public void itemStateChanged(@NotNull ItemEvent e) { myCurrentResourceBundle = ((ResourceBundleAsFileSystemItem)e.getItem()).getResourceBundle(); } }); resourceBundleComboBox.setSelectedItem(new ResourceBundleAsFileSystemItem(myCurrentResourceBundle)); myPropertyNameTextField = new JBTextField(ContainerUtil.getFirstItem(myProperties).getKey()); myPropertyNameTextField.getDocument().addDocumentListener(new DocumentAdapter() { @Override protected void textChanged(@NotNull DocumentEvent e) { myCurrentPropertyName = myPropertyNameTextField.getText(); } }); return FormBuilder .createFormBuilder() .addComponent(informationalLabel) .addLabeledComponent(PropertiesBundle.message("copy.destination.new.name.label"), myPropertyNameTextField, UIUtil.LARGE_VGAP) .addLabeledComponent(PropertiesBundle.message("copy.destination.resource.bundle.label"), resourceBundleComboBox) .getPanel(); } | createCenterPanel |
26,782 | String (Object element) { return ((PsiFileSystemItem)element).getName(); } | getElementText |
26,783 | Component (JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { final Component component = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); UIUtil.setBackgroundRecursively(component, isSelected ? UIUtil.getListSelectionBackground(true) : resourceBundleComboBox.getBackground()); return component; } | getListCellRendererComponent |
26,784 | void (@NotNull ItemEvent e) { myCurrentResourceBundle = ((ResourceBundleAsFileSystemItem)e.getItem()).getResourceBundle(); } | itemStateChanged |
26,785 | void (@NotNull DocumentEvent e) { myCurrentPropertyName = myPropertyNameTextField.getText(); } | textChanged |
26,786 | JComponent () { return myPropertyNameTextField; } | getPreferredFocusedComponent |
26,787 | ResourceBundle () { return myResourceBundle; } | getResourceBundle |
26,788 | String () { return myResourceBundle.getBaseName(); } | getName |
26,789 | PsiFileSystemItem () { VirtualFile dir = myResourceBundle.getBaseDirectory(); return dir == null ? null : PsiManager.getInstance(getProject()).findDirectory(dir); } | getParent |
26,790 | VirtualFile () { return new ResourceBundleAsVirtualFile(myResourceBundle); } | getVirtualFile |
26,791 | boolean (@NotNull PsiElementProcessor<? super PsiFileSystemItem> processor) { for (PropertiesFile propertiesFile : myResourceBundle.getPropertiesFiles()) { if (!propertiesFile.getContainingFile().processChildren(processor)) { return false; } } return true; } | processChildren |
26,792 | Icon (int flags) { return AllIcons.Nodes.ResourceBundle; } | getIcon |
26,793 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ResourceBundleAsFileSystemItem item = (ResourceBundleAsFileSystemItem)o; return myResourceBundle.equals(item.myResourceBundle); } | equals |
26,794 | int () { return myResourceBundle.hashCode(); } | hashCode |
26,795 | Lexer () { return new PropertiesValueHighlightingLexer(); } | getHighlightingLexer |
26,796 | void (String key, String value) { if (ApplicationManager.getApplication().isUnitTestMode() && myKeysOrder != null) { LOG.assertTrue(!myKeysOrder.contains(key)); } final PropertiesFile propertiesFile = myResourceBundle.getDefaultPropertiesFile(); if (myAlphaSorted) { myCodeStyleManager.reformat(propertiesFile.addProperty(key, value).getPsiElement()); } else { insertPropertyLast(key, value, propertiesFile); if (myOrdered) { myKeysOrder.add(key); } } } | insertNewProperty |
26,797 | void (@NotNull String key, @NotNull String value, @NotNull String anchor) { if (myAlphaSorted || !myOrdered) { throw new IllegalStateException("Can't insert new properties by anchor while resource bundle is alpha-sorted"); } final PropertiesFile file = myResourceBundle.getDefaultPropertiesFile(); final IProperty anchorProperty = file.findPropertyByKey(anchor); file.addPropertyAfter(key, value, anchorProperty); final int anchorIndex = myKeysOrder.indexOf(anchor); myKeysOrder.add(anchorIndex + 1, key); } | insertAfter |
26,798 | void (String key, PropertiesFile file) { final IProperty property = file.findPropertyByKey(key); if (property != null && myKeysOrder != null) { boolean keyExistInOtherPropertiesFiles = false; for (PropertiesFile propertiesFile : myResourceBundle.getPropertiesFiles()) { if (!propertiesFile.equals(file) && propertiesFile.findPropertyByKey(key) != null) { keyExistInOtherPropertiesFiles = true; break; } } if (!keyExistInOtherPropertiesFiles) { myKeysOrder.remove(key); } } if (property != null) { PsiElement anElement = property.getPsiElement(); if (anElement instanceof PomTargetPsiElement) { final PomTarget xmlProperty = ((PomTargetPsiElement)anElement).getTarget(); LOG.assertTrue(xmlProperty instanceof XmlProperty); anElement = ((XmlProperty)xmlProperty).getNavigationElement(); } anElement.delete(); } } | deletePropertyIfExist |
26,799 | void (String key, String value, PropertiesFile propertiesFile) { final List<IProperty> properties = propertiesFile.getProperties(); final IProperty lastProperty = properties.isEmpty() ? null : properties.get(properties.size() - 1); myCodeStyleManager.reformat(propertiesFile.addPropertyAfter(key, value, lastProperty).getPsiElement()); } | insertPropertyLast |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.