Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
26,500 | Set<Object> (final PropertyReferenceBase propertyReference) { final Set<Object> variants = new ObjectOpenCustomHashSet<>(new Hash.Strategy<>() { @Override public int hashCode(@Nullable Object object) { if (object instanceof IProperty) { String key = ((IProperty)object).getKey(); return key == null ? 0 : key.hashCode(); } else { return 0; } } @Override public boolean equals(@Nullable Object o1, @Nullable Object o2) { if (o1 == o2) { return true; } return o1 instanceof IProperty && o2 instanceof IProperty && Objects.equals(((IProperty)o1).getKey(), ((IProperty)o2).getKey()); } }); List<PropertiesFile> propertiesFileList = propertyReference.getPropertiesFiles(); if (propertiesFileList == null) { PropertiesReferenceManager .getInstance(propertyReference.getElement().getProject()).processAllPropertiesFiles((baseName, propertiesFile) -> { addVariantsFromFile(propertyReference, propertiesFile, variants); return true; }); } else { for (PropertiesFile propFile : propertiesFileList) { addVariantsFromFile(propertyReference, propFile, variants); } } return variants; } | getPropertiesKeys |
26,501 | int (@Nullable Object object) { if (object instanceof IProperty) { String key = ((IProperty)object).getKey(); return key == null ? 0 : key.hashCode(); } else { return 0; } } | hashCode |
26,502 | boolean (@Nullable Object o1, @Nullable Object o2) { if (o1 == o2) { return true; } return o1 instanceof IProperty && o2 instanceof IProperty && Objects.equals(((IProperty)o1).getKey(), ((IProperty)o2).getKey()); } | equals |
26,503 | PsiElement () { ResolveResult[] resolveResults = multiResolve(false); return resolveResults.length == 1 ? resolveResults[0].getElement() : null; } | resolve |
26,504 | String () { return myKey; } | getKeyText |
26,505 | boolean (final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; PropertyReferenceBase other = (PropertyReferenceBase)o; return getElement() == other.getElement() && getKeyText().equals(other.getKeyText()); } | equals |
26,506 | int () { return getKeyText().hashCode(); } | hashCode |
26,507 | PsiElement () { return myElement; } | getElement |
26,508 | TextRange () { return myTextRange; } | getRangeInElement |
26,509 | String () { return myKey; } | getCanonicalText |
26,510 | boolean (@NotNull PsiElement element) { if (!isProperty(element)) return false; for (ResolveResult result : multiResolve(false)) { final PsiElement el = result.getElement(); if (el != null && el.isEquivalentTo(element)) return true; } return false; } | isReferenceTo |
26,511 | void (Object property, Set<Object> variants) { variants.add(property); } | addKey |
26,512 | void (final boolean soft) { mySoft = soft; } | setSoft |
26,513 | boolean () { return mySoft; } | isSoft |
26,514 | String () { return PropertiesBundle.message("unresolved.property.key"); } | getUnresolvedMessagePattern |
26,515 | boolean (PsiElement element) { if (element instanceof IProperty) { return true; } if (element instanceof PomTargetPsiElement) { return ((PomTargetPsiElement)element).getTarget() instanceof XmlProperty; } if (element instanceof XmlTag && ((XmlTag)element).getName().equals(XmlPropertiesFileImpl.ENTRY_TAG_NAME)) { return PropertiesImplUtil.isPropertiesFile(element.getContainingFile()); } return false; } | isProperty |
26,516 | boolean (@NotNull PsiElement target) { return target instanceof IProperty || target instanceof PomTargetPsiElement && ((PomTargetPsiElement)target).getTarget() instanceof IProperty; } | isPropertyPsi |
26,517 | ActionUpdateThread () { return ActionUpdateThread.BGT; } | getActionUpdateThread |
26,518 | void (@NotNull DataContext dataContext) { final ResourceBundle[] resourceBundles = ResourceBundle.ARRAY_DATA_KEY.getData(dataContext); if (resourceBundles != null && resourceBundles.length != 0) { final Project project = CommonDataKeys.PROJECT.getData(dataContext); LOG.assertTrue(project != null); final PsiElement[] toDelete = Arrays .stream(resourceBundles) .flatMap(rb -> rb.getPropertiesFiles().stream()) .map(PropertiesFile::getContainingFile) .toArray(PsiElement[]::new); SafeDeleteHandler.invoke(project, toDelete, true, () -> { final FileEditorManager fileEditorManager = FileEditorManager.getInstance(project); for (ResourceBundle bundle : resourceBundles) { fileEditorManager.closeFile(new ResourceBundleAsVirtualFile(bundle)); } }); } } | deleteElement |
26,519 | boolean (@NotNull DataContext dataContext) { final Project project = CommonDataKeys.PROJECT.getData(dataContext); return project != null; } | canDeleteElement |
26,520 | void (final String separator) { mySeparator = separator; } | setSeparator |
26,521 | String () { return mySeparator; } | getSeparator |
26,522 | Collection<Group> (@NotNull AbstractTreeNode<?> parent, @NotNull Collection<TreeElement> children) { List<Key> keys = new ArrayList<>(); String parentPrefix; int parentPrefixLength; if (parent.getValue() instanceof PropertiesPrefixGroup) { parentPrefix = ((PropertiesPrefixGroup)parent.getValue()).getPrefix(); parentPrefixLength = StringUtil.split(parentPrefix, mySeparator).size(); } else { parentPrefix = ""; parentPrefixLength = 0; } for (TreeElement element : children) { final String text = getPropertyUnescapedKey(element); if (text == null) continue; boolean expected = text.startsWith(parentPrefix) || text.startsWith(mySeparator); if (!expected) LOG.error("unexpected text: " + text + "; parentPrefix=" + parentPrefix + "; mySeparator=" + mySeparator); List<String> words = StringUtil.split(text, mySeparator); keys.add(new Key(words, element)); } if (keys.isEmpty()) return ContainerUtil.emptyList(); keys.sort((k1, k2) -> { List<String> o1 = k1.words; List<String> o2 = k2.words; for (int i = 0; i < Math.max(o1.size(), o2.size()); i++) { if (i == o1.size()) return 1; if (i == o2.size()) return -1; String s1 = o1.get(i); String s2 = o2.get(i); int res = s1.compareTo(s2); if (res != 0) return res; } return 0; }); List<Group> groups = new ArrayList<>(); int groupStart = 0; for (int i = 0; i <= keys.size(); i++) { if (!isEndOfGroup(i, keys, parentPrefixLength)) { continue; } // find longest group prefix List<String> firstKey = groupStart == keys.size() ? Collections.emptyList() : keys.get(groupStart).words; List<TreeElement> groupChildren = new SmartList<>(); groupChildren.add(keys.get(groupStart).node); int prefixLen = firstKey.size(); for (int j = groupStart+1; j < i; j++) { List<String> prevKey = keys.get(j-1).words; List<String> nextKey = keys.get(j).words; for (int k = parentPrefixLength; k < prefixLen; k++) { String word = k < nextKey.size() ? nextKey.get(k) : null; String wordInPrevKey = k < prevKey.size() ? prevKey.get(k) : null; if (!Comparing.strEqual(word, wordInPrevKey)) { prefixLen = k; break; } } groupChildren.add(keys.get(j).node); } String[] strings = firstKey.subList(0,prefixLen).toArray(new String[prefixLen]); String prefix = StringUtil.join(strings, mySeparator); String presentableName = prefix.substring(parentPrefix.length()); presentableName = StringUtil.trimStart(presentableName, mySeparator); if (i - groupStart > 1) { groups.add(new PropertiesPrefixGroup(groupChildren, prefix, presentableName, mySeparator)); } else if (groupStart != keys.size()) { TreeElement node = keys.get(groupStart).node; ((PropertyStructureViewElement)node).setPresentableName(presentableName); } groupStart = i; } return groups; } | group |
26,523 | boolean (final int i, final List<Key> keys, final int parentPrefixLength) { if (i == keys.size()) return true; if (i == 0) return false; List<String> words = keys.get(i).words; List<String> prevWords = keys.get(i - 1).words; if (prevWords.size() == parentPrefixLength) return true; if (words.size() == parentPrefixLength) return true; return !Comparing.strEqual(words.get(parentPrefixLength), prevWords.get(parentPrefixLength)); } | isEndOfGroup |
26,524 | ActionPresentation () { return new ActionPresentationData(PropertiesBundle.message("structure.view.group.by.prefixes.action.name"), PropertiesBundle.message("structure.view.group.by.prefixes.action.description"), AllIcons.Actions.GroupByPrefix); } | getPresentation |
26,525 | String () { return ID; } | getName |
26,526 | Comparator () { return Sorter.ALPHA_SORTER.getComparator(); } | getComparator |
26,527 | boolean () { return true; } | isVisible |
26,528 | record (List<String> words, TreeElement node) { } | Key |
26,529 | String (@NotNull TreeElement element) { if (!(element instanceof StructureViewTreeElement)) { return null; } Object value = ((StructureViewTreeElement)element).getValue(); if (!(value instanceof IProperty)) { return null; } return ((IProperty) value).getUnescapedKey(); } | getPropertyUnescapedKey |
26,530 | PropertiesSeparatorManager (final Project project) { return project.getService(PropertiesSeparatorManager.class); } | getInstance |
26,531 | String (@NotNull ResourceBundleImpl resourceBundle) { return guessSeparator(resourceBundle); } | create |
26,532 | String (final ResourceBundle resourceBundle) { if (!(resourceBundle instanceof ResourceBundleImpl resourceBundleImpl)) { return "."; } String separator = myUserDefinedSeparators.getSeparators().get(resourceBundleImpl.getUrl()); return separator == null ? Objects.requireNonNull(myGuessedSeparators.get(resourceBundleImpl)) : separator; } | getSeparator |
26,533 | String (final ResourceBundleImpl resourceBundle) { final Int2LongOpenHashMap charCounts = new Int2LongOpenHashMap(); for (PropertiesFile propertiesFile : resourceBundle.getPropertiesFiles()) { if (propertiesFile == null) continue; List<IProperty> properties = propertiesFile.getProperties(); for (IProperty property : properties) { String key = property.getUnescapedKey(); if (key == null) continue; for (int i =0; i<key.length(); i++) { char c = key.charAt(i); if (!Character.isLetterOrDigit(c)) { charCounts.put(c, charCounts.get(c) + 1); } } } } final char[] mostProbableChar = new char[]{'.'}; charCounts.keySet().forEach(new IntConsumer() { long count = -1; @Override public void accept(int ch) { long charCount = charCounts.get(ch); if (charCount > count) { count = charCount; mostProbableChar[0] = (char)ch; } } }); if (mostProbableChar[0] == 0) { mostProbableChar[0] = '.'; } return Character.toString(mostProbableChar[0]); } | guessSeparator |
26,534 | void (int ch) { long charCount = charCounts.get(ch); if (charCount > count) { count = charCount; mostProbableChar[0] = (char)ch; } } | accept |
26,535 | void (ResourceBundle resourceBundle, String separator) { if (resourceBundle instanceof ResourceBundleImpl) { myUserDefinedSeparators.getSeparators().put(((ResourceBundleImpl)resourceBundle).getUrl(), separator); } } | setSeparator |
26,536 | void (@NotNull final PropertiesSeparatorManagerState state) { myUserDefinedSeparators = state.decode(); } | loadState |
26,537 | PropertiesSeparatorManagerState () { return myUserDefinedSeparators.isEmpty() ? null : myUserDefinedSeparators.encode(); } | getState |
26,538 | boolean () { return mySeparators.isEmpty(); } | isEmpty |
26,539 | PropertiesSeparatorManagerState () { PropertiesSeparatorManagerState encodedState = new PropertiesSeparatorManagerState(); for (final Map.Entry<String, String> entry : mySeparators.entrySet()) { String separator = entry.getValue(); StringBuilder encoded = new StringBuilder(separator.length()); for (int i=0;i<separator.length();i++) { char c = separator.charAt(i); encoded.append("\\u"); encoded.append(String.format("%04x", (int) c)); } encodedState.getSeparators().put(entry.getKey(), encoded.toString()); } return encodedState; } | encode |
26,540 | PropertiesSeparatorManagerState () { PropertiesSeparatorManagerState decoded = new PropertiesSeparatorManagerState(); for (final Map.Entry<String, String> entry : mySeparators.entrySet()) { String separator = entry.getValue(); separator = decodeSeparator(separator); if (separator == null) { continue; } final String url = entry.getKey(); decoded.getSeparators().put(url, separator); } return decoded; } | decode |
26,541 | String (String separator) { if (separator.length() % 6 != 0) { return null; } StringBuilder result = new StringBuilder(); int pos = 0; while (pos < separator.length()) { String encodedCharacter = separator.substring(pos, pos+6); if (!encodedCharacter.startsWith("\\u")) { return null; } char code = (char) Integer.parseInt(encodedCharacter.substring(2), 16); result.append(code); pos += 6; } return result.toString(); } | decodeSeparator |
26,542 | Comparator () { return (o1, o2) -> { int weight1 = o1 instanceof PropertiesPrefixGroup ? 1 : 0; int weight2 = o2 instanceof PropertiesPrefixGroup ? 1 : 0; return weight1 - weight2; }; } | getComparator |
26,543 | boolean () { return true; } | isVisible |
26,544 | ActionPresentation () { String name = StructureViewBundle.message("action.sort.by.type"); return new ActionPresentationData(name, name, AllIcons.ObjectBrowser.SortByType); } | getPresentation |
26,545 | String () { return KIND_SORTER_ID; } | getName |
26,546 | void (String separator) { myByWordPrefixesGrouper.setSeparator(separator); PropertiesSeparatorManager separatorManager = PropertiesSeparatorManager.getInstance(getPsiFile().getProject()); separatorManager.setSeparator(((PropertiesFileImpl)getPsiFile()).getResourceBundle(), separator); } | setSeparator |
26,547 | String () { return myByWordPrefixesGrouper.getSeparator(); } | getSeparator |
26,548 | void (boolean state) { myGroupingState = state; } | setGroupingActive |
26,549 | StructureViewTreeElement () { return new PropertiesFileStructureViewElement((PropertiesFileImpl)getPsiFile(), () -> myGroupingState); } | getRoot |
26,550 | boolean (StructureViewTreeElement element) { return false; } | isAlwaysShowsPlus |
26,551 | boolean (StructureViewTreeElement element) { return false; } | isAlwaysLeaf |
26,552 | String () { return myPresentableName; } | getPresentableName |
26,553 | String () { return mySeparator; } | getSeparator |
26,554 | String () { return myPrefix; } | getPrefix |
26,555 | ItemPresentation () { return new ItemPresentation() { @Override public String getPresentableText() { return myPresentableName; } @Override public Icon getIcon(boolean open) { return AllIcons.Nodes.Tag; } }; } | getPresentation |
26,556 | String () { return myPresentableName; } | getPresentableText |
26,557 | Icon (boolean open) { return AllIcons.Nodes.Tag; } | getIcon |
26,558 | Collection<TreeElement> () { return myProperties; } | getChildren |
26,559 | boolean (final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final PropertiesPrefixGroup group = (PropertiesPrefixGroup)o; if (!myPrefix.equals(group.myPrefix)) return false; return true; } | equals |
26,560 | int () { return myPrefix.hashCode(); } | hashCode |
26,561 | Collection<StructureViewTreeElement> () { List<? extends IProperty> properties = getElement().getProperties(); Collection<StructureViewTreeElement> elements = new ArrayList<>(properties.size()); for (IProperty property : properties) { elements.add(new PropertyStructureViewElement(property, myGrouped)); } return elements; } | getChildrenBase |
26,562 | String () { return getElement().getName(); } | getPresentableText |
26,563 | ItemPresentation () { return new ItemPresentation() { @Override public String getPresentableText() { return PropertiesFileStructureViewElement.this.getPresentableText(); } @Override public Icon getIcon(boolean open) { return getElement().getIcon(0); } }; } | getPresentation |
26,564 | String () { return PropertiesFileStructureViewElement.this.getPresentableText(); } | getPresentableText |
26,565 | Icon (boolean open) { return getElement().getIcon(0); } | getIcon |
26,566 | Property (@NotNull final PropertyStub stub) { return new PropertyImpl(stub, this); } | createPsi |
26,567 | PropertyStub (@NotNull final Property psi, final StubElement parentStub) { return new PropertyStubImpl(parentStub, psi.getKey()); } | createStub |
26,568 | String () { return "properties.prop"; } | getExternalId |
26,569 | void (@NotNull final PropertyStub stub, @NotNull final IndexSink sink) { sink.occurrence(PropertyKeyIndex.KEY, PropertyImpl.unescape(stub.getKey())); } | indexStub |
26,570 | PropertyStub (@NotNull LighterAST tree, @NotNull LighterASTNode node, @NotNull StubElement<?> parentStub) { LighterASTNode keyNode = LightTreeUtil.firstChildOfType(tree, node, PropertiesTokenTypes.KEY_CHARACTERS); String key = intern(tree.getCharTable(), keyNode); return new PropertyStubImpl(parentStub, key); } | createStub |
26,571 | String (@NotNull CharTable table, @NotNull LighterASTNode node) { assert node instanceof LighterASTTokenNode : node; return table.intern(((LighterASTTokenNode)node).getText()).toString(); } | intern |
26,572 | void (PsiBuilder builder) { if (builder.getTokenType() == PropertiesTokenTypes.KEY_CHARACTERS) { final PsiBuilder.Marker prop = builder.mark(); parseKey(builder); if (builder.getTokenType() == PropertiesTokenTypes.KEY_VALUE_SEPARATOR) { parseKeyValueSeparator(builder); } if (builder.getTokenType() == PropertiesTokenTypes.VALUE_CHARACTERS) { parseValue(builder); } prop.done(PropertiesElementTypes.PROPERTY); } else { builder.advanceLexer(); builder.error(PropertiesBundle.message("property.key.expected.parsing.error.message")); } } | parseProperty |
26,573 | void (final PsiBuilder builder) { LOG.assertTrue(builder.getTokenType() == PropertiesTokenTypes.KEY_VALUE_SEPARATOR); builder.advanceLexer(); } | parseKeyValueSeparator |
26,574 | void (final PsiBuilder builder) { if (builder.getTokenType() == PropertiesTokenTypes.VALUE_CHARACTERS) { builder.advanceLexer(); } } | parseValue |
26,575 | void (final PsiBuilder builder) { LOG.assertTrue(builder.getTokenType() == PropertiesTokenTypes.KEY_CHARACTERS); builder.advanceLexer(); } | parseKey |
26,576 | FlyweightCapableTreeStructure<LighterASTNode> (ASTNode chameleon) { PsiElement psi = chameleon.getPsi(); assert psi != null : "Bad chameleon: " + chameleon; Project project = psi.getProject(); PsiBuilderFactory factory = PsiBuilderFactory.getInstance(); PsiBuilder builder = factory.createBuilder(project, chameleon); ParserDefinition parserDefinition = LanguageParserDefinitions.INSTANCE.forLanguage(getLanguage()); assert parserDefinition != null : this; PropertiesParser parser = new PropertiesParser(); return parser.parseLight(this, builder); } | parseContentsLight |
26,577 | Lexer (Project project) { return new PropertiesLexer(); } | createLexer |
26,578 | IFileElementType () { return FILE_ELEMENT_TYPE; } | getFileNodeType |
26,579 | TokenSet () { return PropertiesTokenTypes.WHITESPACES; } | getWhitespaceTokens |
26,580 | TokenSet () { return PropertiesTokenTypes.COMMENTS; } | getCommentTokens |
26,581 | TokenSet () { return TokenSet.EMPTY; } | getStringLiteralElements |
26,582 | PsiParser (final Project project) { return new PropertiesParser(); } | createParser |
26,583 | PsiFile (@NotNull FileViewProvider viewProvider) { return new PropertiesFileImpl(viewProvider); } | createFile |
26,584 | SpaceRequirements (ASTNode left, ASTNode right) { if (left.getElementType() == PropertiesTokenTypes.END_OF_LINE_COMMENT) { return SpaceRequirements.MUST_LINE_BREAK; } return SpaceRequirements.MAY; } | spaceExistenceTypeBetweenTokens |
26,585 | PsiElement (ASTNode node) { final IElementType type = node.getElementType(); if (type == PropertiesElementTypes.PROPERTY) { return new PropertyImpl(node); } else if (type == PropertiesElementTypes.PROPERTIES_LIST) { return new PropertiesListImpl(node); } throw new AssertionError("Alien element type [" + type + "]. Can't create Property PsiElement for that."); } | createElement |
26,586 | CharSequence (LighterASTNode newNode, FlyweightCapableTreeStructure<LighterASTNode> structure) { Ref<LighterASTNode[]> childrenRef = Ref.create(null); int childrenCount = structure.getChildren(newNode, childrenRef); LighterASTNode[] children = childrenRef.get(); try { for (LighterASTNode aChildren : children) { if (aChildren.getTokenType() == PropertiesTokenTypes.KEY_CHARACTERS) { return ((LighterASTTokenNode)aChildren).getText(); } } return null; } finally { structure.disposeChildren(children, childrenCount); } } | findKeyCharacters |
26,587 | ASTNode (@NotNull IElementType root, @NotNull PsiBuilder builder) { doParse(root, builder); return builder.getTreeBuilt(); } | parse |
26,588 | FlyweightCapableTreeStructure<LighterASTNode> (IElementType root, PsiBuilder builder) { doParse(root, builder); return builder.getLightTree(); } | parseLight |
26,589 | void (IElementType root, PsiBuilder builder) { builder.putUserData(PsiBuilderImpl.CUSTOM_COMPARATOR, MATCH_BY_KEY); final PsiBuilder.Marker rootMarker = builder.mark(); final PsiBuilder.Marker propertiesList = builder.mark(); if(builder.eof()){ propertiesList.setCustomEdgeTokenBinders(WhitespacesBinders.GREEDY_LEFT_BINDER, WhitespacesBinders.GREEDY_RIGHT_BINDER); } else{ propertiesList.setCustomEdgeTokenBinders(WhitespacesBinders.GREEDY_LEFT_BINDER, null); } while (!builder.eof()) { Parsing.parseProperty(builder); } propertiesList.done(PropertiesElementTypes.PROPERTIES_LIST); rootMarker.done(root); } | doParse |
26,590 | PropertiesList (@NotNull final PropertiesListStub stub) { return new PropertiesListImpl(stub); } | createPsi |
26,591 | PropertiesListStub (@NotNull final PropertiesList psi, final StubElement parentStub) { return new PropertiesListStubImpl(parentStub); } | createStub |
26,592 | String () { return "properties.propertieslist"; } | getExternalId |
26,593 | void (@NotNull final PropertiesListStub stub, @NotNull final IndexSink sink) { } | indexStub |
26,594 | PropertiesListStub (@NotNull LighterAST tree, @NotNull LighterASTNode node, @NotNull StubElement<?> parentStub) { return new PropertiesListStubImpl(parentStub); } | createStub |
26,595 | boolean (@NotNull PsiElement element, @NotNull String toolId) { Property property = PsiTreeUtil.getParentOfType(element, Property.class, false); PropertiesFile file; if (property == null) { PsiFile containingFile = element.getContainingFile(); if (containingFile instanceof PropertiesFile) { file = (PropertiesFile)containingFile; } else { return false; } } else { PsiElement prev = property.getPrevSibling(); while (prev instanceof PsiWhiteSpace || prev instanceof PsiComment) { if (prev instanceof PsiComment) { @NonNls String text = prev.getText(); if (text.contains("suppress") && text.contains("\"" + toolId + "\"")) return true; } prev = prev.getPrevSibling(); } file = property.getPropertiesFile(); } PsiElement leaf = file.getContainingFile().findElementAt(0); while (leaf instanceof PsiWhiteSpace) leaf = leaf.getNextSibling(); while (leaf instanceof PsiComment) { @NonNls String text = leaf.getText(); if (text.contains("suppress") && text.contains("\"" + toolId + "\"") && text.contains("file")) { return true; } leaf = leaf.getNextSibling(); if (leaf instanceof PsiWhiteSpace) leaf = leaf.getNextSibling(); // comment before first property get bound to the file, not property if (leaf instanceof PropertiesList && leaf.getFirstChild() == property && text.contains("suppress") && text.contains("\"" + toolId + "\"")) { return true; } } return false; } | isSuppressedFor |
26,596 | String () { return PropertiesBundle.message("unused.property.suppress.for.property"); } | getFamilyName |
26,597 | void (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { final PsiElement element = descriptor.getStartElement(); final PsiFile file = element.getContainingFile(); final Property property = PsiTreeUtil.getParentOfType(element, Property.class); LOG.assertTrue(property != null); final int start = property.getTextRange().getStartOffset(); @NonNls final Document doc = PsiDocumentManager.getInstance(project).getDocument(file); LOG.assertTrue(doc != null); final int line = doc.getLineNumber(start); final int lineStart = doc.getLineStartOffset(line); doc.insertString(lineStart, "# suppress inspection \"" + shortName + "\"\n"); } | applyFix |
26,598 | boolean (@NotNull Project project, @NotNull PsiElement context) { final Property property = PsiTreeUtil.getParentOfType(context, Property.class); return property != null && property.isValid(); } | isAvailable |
26,599 | boolean () { return false; } | isSuppressAll |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.