Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
292,800 | boolean (Object obj) { return obj.getClass() == StructuralSearchInspectionToolWrapper.class && ((StructuralSearchInspectionToolWrapper)obj).myTool.getShortName().equals(myTool.getShortName()); } | equals |
292,801 | LocalInspectionToolWrapper () { final StructuralSearchFakeInspection inspection = (StructuralSearchFakeInspection)getTool(); final List<Configuration> copies = new SmartList<>(); for (Configuration configuration : inspection.getConfigurations()) { copies.add(configuration.copy()); } return new StructuralSearchInspectionToolWrapper(copies); } | createCopy |
292,802 | String () { return getTool().getDisplayName(); } | getDisplayName |
292,803 | boolean () { return true; } | isEnabledByDefault |
292,804 | String () { return getTool().getID(); } | getID |
292,805 | String () { return getTool().getGroupDisplayName(); } | getGroupDisplayName |
292,806 | boolean () { return ((StructuralSearchFakeInspection)myTool).isCleanup(); } | isCleanupTool |
292,807 | SSBasedInspection (@NotNull InspectionProfile profile) { return (SSBasedInspection)CustomInspectionActions.getInspection(profile, SHORT_NAME); } | getStructuralSearchInspection |
292,808 | String () { return getGeneralGroupName(); } | getGroupDisplayName |
292,809 | String () { return SHORT_NAME; } | getShortName |
292,810 | void (@NotNull GlobalInspectionContext context) { super.initialize(context); mySessionProfile = ((GlobalInspectionContextBase)context).getCurrentProfile(); } | initialize |
292,811 | void (@NotNull Project project) { super.cleanup(project); mySessionProfile = null; myCompiledPatterns.clear(); } | cleanup |
292,812 | void (@NotNull LocalInspectionToolSession session, @NotNull ProblemsHolder problemsHolder) { final Map<Configuration, Matcher> compiledPatterns = session.getUserData(COMPILED_PATTERNS); if (compiledPatterns != null) { checkInCompiledPatterns(compiledPatterns); } } | inspectionFinished |
292,813 | PsiElementVisitor (@NotNull ProblemsHolder holder, boolean isOnTheFly, @NotNull LocalInspectionToolSession session) { if (myConfigurations.isEmpty()) return PsiElementVisitor.EMPTY_VISITOR; final PsiFile file = holder.getFile(); final FileType fileType = file.getFileType(); if (fileType instanceof PlainTextLikeFileType) return PsiElementVisitor.EMPTY_VISITOR; final Project project = holder.getProject(); final InspectionProfileImpl profile = (mySessionProfile != null && !isOnTheFly) ? mySessionProfile : InspectionProfileManager.getInstance(project).getCurrentProfile(); final List<Configuration> configurations = new SmartList<>(); for (Configuration configuration : myConfigurations) { if (configuration.getFileType() != fileType && !configuration.getMatchOptions().isSearchInjectedCode()) continue; final ToolsImpl tools = profile.getToolsOrNull(configuration.getUuid(), project); if (tools != null && tools.isEnabled(file)) { configurations.add(configuration); register(configuration); } } if (configurations.isEmpty()) return PsiElementVisitor.EMPTY_VISITOR; Set<SmartPsiElementPointer<?>> duplicates = ContainerUtil.newConcurrentSet(); final Map<Configuration, Matcher> compiledPatterns = checkOutCompiledPatterns(configurations, project, holder, duplicates); session.putUserData(COMPILED_PATTERNS, compiledPatterns); return new SSBasedVisitor(compiledPatterns, holder, duplicates); } | buildVisitor |
292,814 | void (@NotNull Configuration configuration) { if (configuration.getOrder() != 0) { // not a main configuration containing meta data return; } // modify from single (event) thread, to prevent race conditions. ApplicationManager.getApplication().invokeLater(() -> { final String shortName = configuration.getUuid(); final HighlightDisplayKey key = HighlightDisplayKey.find(shortName); if (key != null) { if (!isMetaDataChanged(configuration, key)) return; HighlightDisplayKey.unregister(shortName); } final String suppressId = configuration.getSuppressId(); final String name = configuration.getName(); if (suppressId == null) { HighlightDisplayKey.register(shortName, () -> name, SHORT_NAME); } else { HighlightDisplayKey.register(shortName, () -> name, suppressId, SHORT_NAME); } }, ModalityState.nonModal()); } | register |
292,815 | boolean (@NotNull Configuration configuration, @NotNull HighlightDisplayKey key) { if (StringUtil.isEmpty(configuration.getSuppressId())) { if (!SHORT_NAME.equals(key.getID())) return true; } else if (!configuration.getSuppressId().equals(key.getID())) return true; return !configuration.getName().equals(HighlightDisplayKey.getDisplayNameByKey(key)); } | isMetaDataChanged |
292,816 | List<LocalInspectionToolWrapper> () { return getConfigurations().stream() .filter(configuration -> configuration.getOrder() == 0) .map(configuration -> new StructuralSearchInspectionToolWrapper(getConfigurationsWithUuid(configuration.getUuid()))) .collect(Collectors.toList()); } | getChildren |
292,817 | LocalQuickFix (@NotNull Project project, @NotNull MatchResult matchResult, @NotNull Configuration configuration) { if (!(configuration instanceof ReplaceConfiguration)) return null; return new StructuralQuickFix(project, matchResult, configuration.getReplaceOptions()); } | createQuickFix |
292,818 | Configuration (@NotNull Configuration configuration) { if (configuration.getOrder() == 0) { return configuration; } final String uuid = configuration.getUuid(); return myConfigurations.stream().filter(c -> c.getOrder() == 0 && uuid.equals(c.getUuid())).findFirst().orElse(configuration); } | getMainConfiguration |
292,819 | List<Configuration> () { return new SmartList<>(myConfigurations); } | getConfigurations |
292,820 | List<Configuration> (@NotNull String uuid) { return ContainerUtil.sorted(ContainerUtil.filter(myConfigurations, c -> uuid.equals(c.getUuid())), Comparator.comparingInt(Configuration::getOrder)); } | getConfigurationsWithUuid |
292,821 | boolean (@NotNull Configuration configuration) { if (myConfigurations.contains(configuration)) { return false; } myConfigurations.add(configuration); myWriteSorted = true; return true; } | addConfiguration |
292,822 | boolean (@NotNull Collection<? extends Configuration> configurations) { boolean modified = false; for (Configuration configuration : configurations) { modified |= addConfiguration(configuration); } return modified; } | addConfigurations |
292,823 | boolean (@NotNull Configuration configuration) { final boolean removed = myConfigurations.remove(configuration); if (removed) myWriteSorted = true; return removed; } | removeConfiguration |
292,824 | boolean (@NotNull String uuid) { final boolean removed = myConfigurations.removeIf(c -> c.getUuid().equals(uuid)); if (removed) myWriteSorted = true; return removed; } | removeConfigurationsWithUuid |
292,825 | InspectionMetaDataDialog (Project project, @Nullable Configuration configuration) { final List<Configuration> configurations = getConfigurations(); final Function<String, @Nullable @NlsContexts.DialogMessage String> nameValidator = name -> { for (Configuration current : configurations) { if (current.getOrder() == 0 && current.getName().equals(name) && (configuration == null || !current.getUuid().equals(configuration.getUuid()))) { return SSRBundle.message("inspection.with.name.exists.warning", name); } } return null; }; if (configuration == null) { return new InspectionMetaDataDialog(project, nameValidator); } return new InspectionMetaDataDialog(project, nameValidator, configuration.getName(), configuration.getDescription(), configuration.getProblemDescriptor(), configuration.getSuppressId()); } | createMetaDataDialog |
292,826 | String () { return CommonQuickFixBundle.message("fix.replace.with.x", myReplacementInfo.getReplacement()); } | getName |
292,827 | void (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { final PsiElement element = descriptor.getPsiElement(); if (element != null) { myReplacer.replace(myReplacementInfo); } } | applyFix |
292,828 | String () { //noinspection DialogTitleCapitalization return SSRBundle.message("SSRInspection.family.name"); } | getFamilyName |
292,829 | void (@NotNull MatchResult result) { if (!duplicates.add(result.getMatchRef())) { return; } registerProblem(result, myConfiguration, myHolder); } | newMatch |
292,830 | void (@NotNull MatchResult matchResult, @NotNull Configuration configuration, @NotNull ProblemsHolder holder) { final PsiElement element = matchResult.getMatch(); PsiFile containingFile = element.getContainingFile(); PsiFile templateFile = PsiUtilCore.getTemplateLanguageFile(containingFile); if (!element.isPhysical() || holder.getFile() != containingFile && holder.getFile() != templateFile) { return; } final LocalQuickFix fix = createQuickFix(element.getProject(), matchResult, configuration); final Configuration mainConfiguration = getMainConfiguration(configuration); final String name = ObjectUtils.notNull(mainConfiguration.getProblemDescriptor(), mainConfiguration.getName()); final InspectionManager manager = holder.getManager(); final ProblemDescriptor descriptor = manager.createProblemDescriptor(element, name, fix, GENERIC_ERROR_OR_WARNING, holder.isOnTheFly()); final String toolName = configuration.getUuid(); holder.registerProblem(new ProblemDescriptorWithReporterName((ProblemDescriptorBase)descriptor, toolName)); } | registerProblem |
292,831 | void () { duplicates.clear(); } | matchingFinished |
292,832 | Matcher (@NotNull Configuration configuration, @NotNull Project project) { try { final MatchOptions matchOptions = configuration.getMatchOptions(); final CompiledPattern compiledPattern = PatternCompiler.compilePattern(project, matchOptions, false, true); return (compiledPattern == null) ? null : new Matcher(project, matchOptions, compiledPattern); } catch (StructuralSearchException e) { LOG.warn("Malformed structural search inspection pattern \"" + configuration.getName() + '"', e); return null; } } | buildCompiledConfiguration |
292,833 | void (@NotNull Map<Configuration, Matcher> compiledPatterns) { for (Map.Entry<Configuration, Matcher> entry : compiledPatterns.entrySet()) { final Configuration configuration = entry.getKey(); final Matcher matcher = entry.getValue(); if (matcher == null) { myCompiledPatterns.putValue(configuration, Matcher.EMPTY); } else { matcher.getMatchContext().getSink().matchingFinished(); myCompiledPatterns.putValue(configuration, matcher); } } } | checkInCompiledPatterns |
292,834 | Collection<V> () { return new ConcurrentLinkedDeque<>(); } | createCollection |
292,835 | void (@NotNull PsiElement element) { if (LexicalNodesFilter.getInstance().accepts(element)) return; for (Map.Entry<Configuration, Matcher> entry : myCompiledOptions.entrySet()) { Matcher matcher = entry.getValue(); if (matcher == null) continue; MatchingStrategy strategy = matcher.getMatchContext().getPattern().getStrategy(); if (!strategy.continueMatching(element)) continue; Configuration configuration = entry.getKey(); processElement(element, configuration, matcher); } } | visitElement |
292,836 | void (@Nullable PsiElement element, @NotNull Configuration configuration, @NotNull Matcher matcher) { final NodeIterator matchedNodes = SsrFilteringNodeIterator.create(element); if (!matcher.checkIfShouldAttemptToMatch(matchedNodes)) { return; } final MatchContext matchContext = matcher.getMatchContext(); final int nodeCount = matchContext.getPattern().getNodeCount(); try { matcher.processMatchesInElement(new CountingNodeIterator(nodeCount, matchedNodes)); } catch (StructuralSearchException e) { if (myProblemsReported.add(configuration.getName())) { // don't overwhelm the user with messages final String message = e.getMessage().replace(ScriptSupport.UUID, ""); NotificationGroupManager.getInstance() .getNotificationGroup(UIUtil.SSR_NOTIFICATION_GROUP_ID) .createNotification(SSRBundle.message("inspection.script.problem", message, configuration.getName()), NotificationType.ERROR) .setImportant(true) .notify(element != null ? element.getProject() : null); } } finally { matchedNodes.reset(); } } | processElement |
292,837 | String () { return myMainConfiguration.getName(); } | getDisplayName |
292,838 | String () { return myMainConfiguration.getUuid(); } | getShortName |
292,839 | boolean () { return true; } | isEnabledByDefault |
292,840 | boolean () { return isCleanupAllowed() && myMainConfiguration.isCleanup(); } | isCleanup |
292,841 | boolean () { return ContainerUtil.exists(myConfigurations, c -> c instanceof ReplaceConfiguration); } | isCleanupAllowed |
292,842 | String () { final HighlightDisplayKey key = HighlightDisplayKey.find(getShortName()); if (key != null) { return key.getID(); // to avoid using a new suppress id before it is registered. } final String suppressId = myMainConfiguration.getSuppressId(); return !StringUtil.isEmpty(suppressId) ? suppressId : SSBasedInspection.SHORT_NAME; } | getID |
292,843 | String () { return SSBasedInspection.SHORT_NAME; } | getMainToolId |
292,844 | String () { return SSRBundle.message("structural.search.group.name"); } | getGroupDisplayName |
292,845 | String () { final String description = myMainConfiguration.getDescription(); if (StringUtil.isEmpty(description)) { return SSRBundle.message("no.description.message"); } return description; } | getStaticDescription |
292,846 | List<Configuration> () { return Collections.unmodifiableList(myConfigurations); } | getConfigurations |
292,847 | JComponent () { final MyListModel model = new MyListModel(); final JButton button = new JButton(SSRBundle.message("edit.metadata.button")); button.addActionListener(__ -> performEditMetaData(button)); final JList<Configuration> list = new JBList<>(model) { @Override protected String itemToText(int index, Configuration value) { return ConfigurationUtil.toXml(value); } }; list.setCellRenderer(new ConfigurationCellRenderer()); final JPanel listPanel = ToolbarDecorator.createDecorator(list) .setAddAction(b -> performAdd(list, b)) .setAddActionName(SSRBundle.message("add.pattern.action")) .setRemoveAction(b -> performRemove(list)) .setRemoveActionUpdater(e -> list.getSelectedValuesList().size() < list.getModel().getSize()) .setEditAction(b -> performEdit(list)) .setMoveUpAction(b -> performMove(list, true)) .setMoveDownAction(b -> performMove(list, false)) .createPanel(); new DoubleClickListener() { @Override protected boolean onDoubleClick(@NotNull MouseEvent e) { performEdit(list); return true; } }.installOn(list); final JPanel panel = new FormBuilder() .addComponent(button) .addLabeledComponentFillVertically(SSRBundle.message("templates.title"), listPanel) .getPanel(); panel.setBorder(JBUI.Borders.emptyTop(10)); return panel; } | createOptionsPanel |
292,848 | String (int index, Configuration value) { return ConfigurationUtil.toXml(value); } | itemToText |
292,849 | boolean (@NotNull MouseEvent e) { performEdit(list); return true; } | onDoubleClick |
292,850 | void (@NotNull Component context) { final Project project = CommonDataKeys.PROJECT.getData(DataManager.getInstance().getDataContext(context)); final InspectionProfileModifiableModel profile = InspectionProfileUtil.getInspectionProfile(context); if (profile == null) { return; } final SSBasedInspection inspection = SSBasedInspection.getStructuralSearchInspection(profile); final InspectionMetaDataDialog dialog = inspection.createMetaDataDialog(project, myMainConfiguration); if (isCleanupAllowed()) { dialog.showCleanupOption(myMainConfiguration.isCleanup()); } if (!dialog.showAndGet()) { return; } final String name = dialog.getName(); for (Configuration c : myConfigurations) { c.setName(name); } myMainConfiguration.setDescription(dialog.getDescription()); myMainConfiguration.setProblemDescriptor(dialog.getProblemDescriptor()); myMainConfiguration.setSuppressId(dialog.getSuppressId()); myMainConfiguration.setCleanup(dialog.isCleanup()); inspection.removeConfigurationsWithUuid(myMainConfiguration.getUuid()); inspection.addConfigurations(myConfigurations); profile.setModified(true); CustomInspectionActions.fireProfileChanged(profile); } | performEditMetaData |
292,851 | void (@NotNull JList<Configuration> list, boolean up) { final MyListModel model = (MyListModel)list.getModel(); final List<Configuration> values = list.getSelectedValuesList(); final Comparator<Configuration> c = Comparator.comparingInt(Configuration::getOrder); values.sort(up ? c : c.reversed()); final int[] indices = new int[values.size()]; for (int i = 0, size = values.size(); i < size; i++) { final Configuration value = values.get(i); final int order = value.getOrder(); model.swap(order, order + (up ? -1 : +1)); indices[i] = value.getOrder(); } myMainConfiguration = moveMetaData(myMainConfiguration, myConfigurations.get(0)); list.setSelectedIndices(indices); list.scrollRectToVisible(list.getCellBounds(indices[0], indices[indices.length - 1])); model.fireContentsChanged(list); saveChangesToProfile(list); } | performMove |
292,852 | Configuration (@NotNull Configuration source, @NotNull Configuration target) { if (source == target) return source; target.setDescription(source.getDescription()); target.setSuppressId(source.getSuppressId()); target.setProblemDescriptor(source.getProblemDescriptor()); target.setCleanup(source.isCleanup()); source.setDescription(null); source.setSuppressId(null); source.setProblemDescriptor(null); return target; } | moveMetaData |
292,853 | void (@NotNull JList<Configuration> list, @NotNull AnActionButton b) { final AnAction[] children = new AnAction[]{new AddTemplateAction(list, false), new AddTemplateAction(list, true)}; final RelativePoint point = b.getPreferredPopupPoint(); JBPopupFactory.getInstance().createActionGroupPopup(null, new DefaultActionGroup(children), DataManager.getInstance().getDataContext(b.getContextComponent()), JBPopupFactory.ActionSelectionAid.SPEEDSEARCH, true).show(point); } | performAdd |
292,854 | void (@NotNull JList<Configuration> list) { boolean metaData = false; for (Configuration configuration : list.getSelectedValuesList()) { if (configuration.getOrder() == 0) { metaData = true; } myConfigurations.remove(configuration); } if (metaData) { myMainConfiguration = moveMetaData(myMainConfiguration, myConfigurations.get(0)); } final int size = myConfigurations.size(); for (int i = 0; i < size; i++){ myConfigurations.get(i).setOrder(i); } final int maxIndex = list.getMaxSelectionIndex(); if (maxIndex != list.getMinSelectionIndex()) { list.setSelectedIndex(maxIndex); } ((MyListModel)list.getModel()).fireContentsChanged(list); if (list.getSelectedIndex() >= size) { list.setSelectedIndex(size - 1); } final int index = list.getSelectedIndex(); list.scrollRectToVisible(list.getCellBounds(index, index)); saveChangesToProfile(list); } | performRemove |
292,855 | void (@NotNull JList<Configuration> list) { final Project project = CommonDataKeys.PROJECT.getData(DataManager.getInstance().getDataContext(list)); if (project == null) return; final int index = list.getSelectedIndex(); if (index < 0) return; final Configuration configuration = myConfigurations.get(index); if (configuration == null) return; final SearchContext searchContext = new SearchContext(project); final StructuralSearchDialog dialog = new StructuralSearchDialog(searchContext, !(configuration instanceof SearchConfiguration), true); dialog.loadConfiguration(configuration); if (!dialog.showAndGet()) return; final Configuration newConfiguration = dialog.getConfiguration(); if (configuration.getOrder() == 0) { myMainConfiguration = newConfiguration; } myConfigurations.set(index, newConfiguration); ((MyListModel)list.getModel()).fireContentsChanged(list); saveChangesToProfile(list); } | performEdit |
292,856 | void (@NotNull JList<Configuration> list) { final InspectionProfileModifiableModel profile = InspectionProfileUtil.getInspectionProfile(list); if (profile == null) return; final SSBasedInspection inspection = SSBasedInspection.getStructuralSearchInspection(profile); inspection.removeConfigurationsWithUuid(myMainConfiguration.getUuid()); inspection.addConfigurations(myConfigurations); profile.setModified(true); } | saveChangesToProfile |
292,857 | void (@NotNull AnActionEvent e) { final Project project = e.getData(CommonDataKeys.PROJECT); assert project != null; final SearchContext context = new SearchContext(project); final StructuralSearchDialog dialog = new StructuralSearchDialog(context, myReplace, true); if (!dialog.showAndGet()) return; final Configuration configuration = dialog.getConfiguration(); configuration.setUuid(myMainConfiguration.getUuid()); configuration.setName(myMainConfiguration.getName()); configuration.setDescription(null); configuration.setSuppressId(null); configuration.setProblemDescriptor(null); final MyListModel model = (MyListModel)myList.getModel(); final int size = model.getSize(); configuration.setOrder(size); final InspectionProfileModifiableModel profile = InspectionProfileUtil.getInspectionProfile(myList); if (profile == null) return; if (SSBasedInspection.getStructuralSearchInspection(profile).addConfiguration(configuration)) { myConfigurations.add(configuration); model.fireContentsChanged(myList); myList.setSelectedIndex(size); myList.scrollRectToVisible(myList.getCellBounds(size, size)); profile.setModified(true); } else { final int index = myConfigurations.indexOf(configuration); if (index >= 0) { myList.setSelectedIndex(index); } } } | actionPerformed |
292,858 | int () { return myConfigurations.size(); } | getSize |
292,859 | Configuration (int index) { return myConfigurations.get(index); } | getElementAt |
292,860 | void (Object source) { fireContentsChanged(source, -1, -1); } | fireContentsChanged |
292,861 | void (int first, int second) { if (second == -1) return; final Configuration one = myConfigurations.get(first); final Configuration two = myConfigurations.get(second); final int order = one.getOrder(); one.setOrder(two.getOrder()); two.setOrder(order); myConfigurations.set(second, one); myConfigurations.set(first, two); } | swap |
292,862 | boolean (String typeImage, String typeImage2) { return compareWithNoDifferenceToPackage(typeImage, typeImage2, false); } | compareWithNoDifferenceToPackage |
292,863 | boolean (String typeImage, @NonNls String typeImage2, boolean ignoreCase) { if (typeImage == null || typeImage2 == null) return Objects.equals(typeImage, typeImage2); final boolean endsWith = ignoreCase ? StringUtil.endsWithIgnoreCase(typeImage2, typeImage) : typeImage2.endsWith(typeImage); return endsWith && ( typeImage.length() == typeImage2.length() || typeImage2.charAt(typeImage2.length()-typeImage.length() - 1)=='.' // package separator ); } | compareWithNoDifferenceToPackage |
292,864 | void (@NotNull XmlText text) { myMatchingVisitor.setResult(myMatchingVisitor.getMatchContext().getPattern().isTypedVar(text) ? myMatchingVisitor.handleTypedElement(text, myMatchingVisitor.getElement()) : myMatchingVisitor.matchSequentially(text.getFirstChild(), myMatchingVisitor.getElement().getFirstChild())); } | visitXmlText |
292,865 | void (@NotNull XmlComment comment) { super.visitXmlComment(comment); final PsiElement element = myMatchingVisitor.getElement(); if (!(element instanceof XmlComment other)) return; final XmlToken text = XmlUtil.getTokenOfType(comment, XmlTokenType.XML_COMMENT_CHARACTERS); assert text != null; final CompiledPattern pattern = myMatchingVisitor.getMatchContext().getPattern(); final boolean typedVar = pattern.isTypedVar(text); if (typedVar) { final SubstitutionHandler handler = (SubstitutionHandler)pattern.getHandler(text); myMatchingVisitor.setResult(handler.handle(XmlUtil.getTokenOfType(other, XmlTokenType.XML_COMMENT_CHARACTERS), myMatchingVisitor.getMatchContext())); } else { myMatchingVisitor.setResult(myMatchingVisitor.matchText(MatchUtil.normalize(text.getText()), MatchUtil.normalize(other.getCommentText()))); } } | visitXmlComment |
292,866 | XmlToken (XmlTag tag) { PsiElement child = tag.getFirstChild(); while (child != null) { if (child instanceof XmlToken token) { IElementType tokenType = token.getTokenType(); if (tokenType == XmlTokenType.XML_NAME || tokenType == XmlTokenType.XML_TAG_NAME) { // regular xml parser uses XML_NAME, but xml nested in js (JSX) uses XML_TAG_NAME return token; } } child = child.getNextSibling(); } return null; } | getTagNameToken |
292,867 | void (PsiElement node) { myMatchedNodes.add(node); } | addMatchedNode |
292,868 | void (PsiElement node) { myMatchedNodes.remove(node); } | removeMatchedNode |
292,869 | void () { mySavedMatchedNodes.push(myMatchedNodes); myMatchedNodes = new SmartList<>(); } | saveMatchedNodes |
292,870 | void () { myMatchedNodes = mySavedMatchedNodes.tryPop(); } | restoreMatchedNodes |
292,871 | void () { myMatchedNodes.clear(); } | clearMatchedNodes |
292,872 | GlobalMatchingVisitor () { return matcher; } | getMatcher |
292,873 | MatchOptions () { return options; } | getOptions |
292,874 | void (@NotNull MatchOptions options) { this.options = options; } | setOptions |
292,875 | MatchResultImpl () { if (previousResults.isEmpty()) { return null; } else { int index = previousResults.size() - 1; MatchResultImpl result = previousResults.get(index); // may contain nulls while (result == null && index > 0) { index--; result = previousResults.get(index); } return result; } } | getPreviousResult |
292,876 | MatchResultImpl () { if (result==null) result = new MatchResultImpl(); return result; } | getResult |
292,877 | void () { previousResults.push(result); result = null; } | pushResult |
292,878 | void () { result = previousResults.pop(); } | popResult |
292,879 | void (MatchResultImpl result) { this.result = result; if (result == null) { pattern.clearHandlersState(); } } | setResult |
292,880 | boolean () { return result!=null; } | hasResult |
292,881 | CompiledPattern () { return pattern; } | getPattern |
292,882 | void (@NotNull CompiledPattern pattern) { this.pattern = pattern; } | setPattern |
292,883 | MatchResultSink () { return sink; } | getSink |
292,884 | void (@NotNull MatchResultSink sink) { this.sink = sink; } | setSink |
292,885 | void () { result = null; } | clear |
292,886 | boolean () { return shouldRecursivelyMatch; } | shouldRecursivelyMatch |
292,887 | void (boolean shouldRecursivelyMatch) { this.shouldRecursivelyMatch = shouldRecursivelyMatch; } | setShouldRecursivelyMatch |
292,888 | void (@NotNull MatchedElementsListener matchedElementsListener) { myMatchedElementsListenerStack.push(matchedElementsListener); } | pushMatchedElementsListener |
292,889 | void () { myMatchedElementsListenerStack.pop(); } | popMatchedElementsListener |
292,890 | void (@NotNull Collection<? extends PsiElement> matchedElements) { if (!myMatchedElementsListenerStack.isEmpty()) { myMatchedElementsListenerStack.peek().matchedElements(matchedElements); } } | notifyMatchedElements |
292,891 | void () { if (!myMatchedNodes.isEmpty() && !dispatchTargetMatch(getResult())) { dispatchCompleteMatch(); } } | dispatchMatched |
292,892 | boolean (@NotNull MatchResult result) { boolean dispatched = false; for (MatchResult r : result.getChildren()) { if ((r.isScopeMatch() && !r.isTarget()) || r.isMultipleMatch()) { dispatched |= dispatchTargetMatch(r); } else if (r.isTarget()) { getSink().newMatch(r); dispatched = true; } } return dispatched; } | dispatchTargetMatch |
292,893 | void () { final MatchResultImpl result = getResult(); final boolean complexMatch = myMatchedNodes.size() > 1; final PsiElement match = myMatchedNodes.get(0); if (!complexMatch) { result.setMatch(match); result.setMatchImage(match.getText()); } else { for (final PsiElement matchStatement : myMatchedNodes) { result.addChild(new MatchResultImpl(MatchResult.LINE_MATCH, matchStatement.getText(), matchStatement, 0, -1, false)); } result.setMatch(match); result.setMatchImage(match.getText()); result.setName(MatchResult.MULTI_LINE_MATCH); } getSink().newMatch(result); } | dispatchCompleteMatch |
292,894 | boolean (@NotNull final String str) { return str.trim().startsWith(XML_TYPED_VAR_PREFIX); } | isTypedVar |
292,895 | String () { return matchImage; } | getMatchImage |
292,896 | PsiElement () { if (matchRef == null) { return null; } return matchRef.getElement(); } | getMatch |
292,897 | void (@NotNull SmartPsiElementPointer<?> matchStart) { matchRef = matchStart; } | setMatchRef |
292,898 | void (PsiElement element) { matchRef = SmartPointerManager.getInstance(element.getProject()).createSmartPsiElementPointer(element); } | setMatch |
292,899 | String () { return name; } | getName |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.