Search in sources :

Example 76 with THashSet

use of gnu.trove.THashSet in project intellij-community by JetBrains.

the class DefaultArrangementSettingsSerializer method deserializeTokensDefinition.

@Nullable
private Set<StdArrangementRuleAliasToken> deserializeTokensDefinition(@NotNull Element element, @NotNull ArrangementSettings defaultSettings) {
    if (!(defaultSettings instanceof ArrangementExtendableSettings)) {
        return null;
    }
    final Element tokensRoot = element.getChild(TOKENS_ELEMENT_NAME);
    if (tokensRoot == null) {
        return ((ArrangementExtendableSettings) myDefaultSettings).getRuleAliases();
    }
    final Set<StdArrangementRuleAliasToken> tokenDefinitions = new THashSet<>();
    final List<Element> tokens = tokensRoot.getChildren(TOKEN_ELEMENT_NAME);
    for (Element token : tokens) {
        final Attribute id = token.getAttribute(TOKEN_ID);
        final Attribute name = token.getAttribute(TOKEN_NAME);
        assert id != null && name != null : "Can not find id for token: " + token;
        final Element rules = token.getChild(RULES_ELEMENT_NAME);
        final List<StdArrangementMatchRule> tokenRules = rules == null ? ContainerUtil.<StdArrangementMatchRule>emptyList() : deserializeRules(rules, null);
        tokenDefinitions.add(new StdArrangementRuleAliasToken(id.getValue(), name.getValue(), tokenRules));
    }
    return tokenDefinitions;
}
Also used : Attribute(org.jdom.Attribute) Element(org.jdom.Element) THashSet(gnu.trove.THashSet) Nullable(org.jetbrains.annotations.Nullable)

Example 77 with THashSet

use of gnu.trove.THashSet in project intellij-community by JetBrains.

the class IntentionListStep method wrapActionsTo.

private boolean wrapActionsTo(@NotNull List<HighlightInfo.IntentionActionDescriptor> newDescriptors, @NotNull Set<IntentionActionWithTextCaching> cachedActions, boolean callUpdate) {
    boolean changed = false;
    if (myEditor == null) {
        LOG.assertTrue(!callUpdate);
        for (HighlightInfo.IntentionActionDescriptor descriptor : newDescriptors) {
            changed |= cachedActions.add(wrapAction(descriptor, myFile, myFile, null));
        }
    } else {
        final int caretOffset = myEditor.getCaretModel().getOffset();
        final int fileOffset = caretOffset > 0 && caretOffset == myFile.getTextLength() ? caretOffset - 1 : caretOffset;
        PsiElement element;
        final PsiElement hostElement;
        if (myFile instanceof PsiCompiledElement) {
            hostElement = element = myFile;
        } else if (PsiDocumentManager.getInstance(myProject).isUncommited(myEditor.getDocument())) {
            //???
            FileViewProvider viewProvider = myFile.getViewProvider();
            hostElement = element = viewProvider.findElementAt(fileOffset, viewProvider.getBaseLanguage());
        } else {
            hostElement = myFile.getViewProvider().findElementAt(fileOffset, myFile.getLanguage());
            element = InjectedLanguageUtil.findElementAtNoCommit(myFile, fileOffset);
        }
        PsiFile injectedFile;
        Editor injectedEditor;
        if (element == null || element == hostElement) {
            injectedFile = myFile;
            injectedEditor = myEditor;
        } else {
            injectedFile = element.getContainingFile();
            injectedEditor = InjectedLanguageUtil.getInjectedEditorForInjectedFile(myEditor, injectedFile);
        }
        for (Iterator<IntentionActionWithTextCaching> iterator = cachedActions.iterator(); iterator.hasNext(); ) {
            IntentionActionWithTextCaching cachedAction = iterator.next();
            IntentionAction action = cachedAction.getAction();
            if (!ShowIntentionActionsHandler.availableFor(myFile, myEditor, action) && (hostElement == element || element != null && !ShowIntentionActionsHandler.availableFor(injectedFile, injectedEditor, action))) {
                iterator.remove();
                changed = true;
            }
        }
        Set<IntentionActionWithTextCaching> wrappedNew = new THashSet<>(newDescriptors.size(), ACTION_TEXT_AND_CLASS_EQUALS);
        for (HighlightInfo.IntentionActionDescriptor descriptor : newDescriptors) {
            final IntentionAction action = descriptor.getAction();
            if (element != null && element != hostElement && (!callUpdate || ShowIntentionActionsHandler.availableFor(injectedFile, injectedEditor, action))) {
                IntentionActionWithTextCaching cachedAction = wrapAction(descriptor, element, injectedFile, injectedEditor);
                wrappedNew.add(cachedAction);
                changed |= cachedActions.add(cachedAction);
            } else if (hostElement != null && (!callUpdate || ShowIntentionActionsHandler.availableFor(myFile, myEditor, action))) {
                IntentionActionWithTextCaching cachedAction = wrapAction(descriptor, hostElement, myFile, myEditor);
                wrappedNew.add(cachedAction);
                changed |= cachedActions.add(cachedAction);
            }
        }
        for (Iterator<IntentionActionWithTextCaching> iterator = cachedActions.iterator(); iterator.hasNext(); ) {
            IntentionActionWithTextCaching cachedAction = iterator.next();
            if (!wrappedNew.contains(cachedAction)) {
                // action disappeared
                iterator.remove();
                changed = true;
            }
        }
    }
    return changed;
}
Also used : HighlightInfo(com.intellij.codeInsight.daemon.impl.HighlightInfo) THashSet(gnu.trove.THashSet) Editor(com.intellij.openapi.editor.Editor)

Example 78 with THashSet

use of gnu.trove.THashSet in project intellij-community by JetBrains.

the class ExportHTMLAction method dump2xml.

private void dump2xml(final String outputDirectoryName) {
    try {
        final File outputDir = new File(outputDirectoryName);
        if (!outputDir.exists() && !outputDir.mkdirs()) {
            throw new IOException("Cannot create \'" + outputDir + "\'");
        }
        final InspectionTreeNode root = myView.getTree().getRoot();
        final IOException[] ex = new IOException[1];
        final Set<InspectionToolWrapper> visitedWrappers = new THashSet<>();
        TreeUtil.traverse(root, node -> {
            if (node instanceof InspectionNode) {
                InspectionNode toolNode = (InspectionNode) node;
                Element problems = new Element(PROBLEMS);
                InspectionToolWrapper toolWrapper = toolNode.getToolWrapper();
                if (!visitedWrappers.add(toolWrapper))
                    return true;
                final Set<InspectionToolWrapper> toolWrappers = getWorkedTools(toolNode);
                for (InspectionToolWrapper wrapper : toolWrappers) {
                    InspectionToolPresentation presentation = myView.getGlobalInspectionContext().getPresentation(wrapper);
                    final ExcludedInspectionTreeNodesManager excludedManager = myView.getExcludedManager();
                    if (!toolNode.isExcluded(excludedManager)) {
                        presentation.exportResults(problems, e -> excludedManager.containsRefEntity(e, toolWrapper), excludedManager::containsProblemDescriptor);
                    }
                }
                PathMacroManager.getInstance(myView.getProject()).collapsePaths(problems);
                try {
                    if (problems.getContentSize() != 0) {
                        JDOMUtil.writeDocument(new Document(problems), outputDirectoryName + File.separator + toolWrapper.getShortName() + InspectionApplication.XML_EXTENSION, CodeStyleSettingsManager.getSettings(null).getLineSeparator());
                    }
                } catch (IOException e) {
                    ex[0] = e;
                }
            }
            return true;
        });
        if (ex[0] != null) {
            throw ex[0];
        }
        final Element element = new Element(InspectionApplication.INSPECTIONS_NODE);
        final String profileName = myView.getCurrentProfileName();
        if (profileName != null) {
            element.setAttribute(InspectionApplication.PROFILE, profileName);
        }
        JDOMUtil.write(element, new File(outputDirectoryName, InspectionApplication.DESCRIPTIONS + InspectionApplication.XML_EXTENSION), CodeStyleSettingsManager.getSettings(null).getLineSeparator());
    } catch (IOException e) {
        ApplicationManager.getApplication().invokeLater(() -> Messages.showErrorDialog(myView, e.getMessage()));
    }
}
Also used : Element(org.jdom.Element) IOException(java.io.IOException) Document(org.jdom.Document) THashSet(gnu.trove.THashSet) File(java.io.File) InspectionToolWrapper(com.intellij.codeInspection.ex.InspectionToolWrapper)

Example 79 with THashSet

use of gnu.trove.THashSet in project intellij-community by JetBrains.

the class SingleInspectionProfilePanel method updateOptionsAndDescriptionPanel.

private void updateOptionsAndDescriptionPanel(final TreePath... paths) {
    if (myProfile == null || paths == null || paths.length == 0) {
        return;
    }
    final TreePath path = paths[0];
    if (path == null)
        return;
    final List<InspectionConfigTreeNode> nodes = InspectionsAggregationUtil.getInspectionsNodes(paths);
    if (!nodes.isEmpty()) {
        final InspectionConfigTreeNode singleNode = paths.length == 1 && ((InspectionConfigTreeNode) paths[0].getLastPathComponent()).getDefaultDescriptor() != null ? ContainerUtil.getFirstItem(nodes) : null;
        if (singleNode != null) {
            final Descriptor descriptor = singleNode.getDefaultDescriptor();
            LOG.assertTrue(descriptor != null);
            if (descriptor.loadDescription() != null) {
                // need this in order to correctly load plugin-supplied descriptions
                final Descriptor defaultDescriptor = singleNode.getDefaultDescriptor();
                final String description = defaultDescriptor.loadDescription();
                try {
                    if (!readHTML(myBrowser, SearchUtil.markup(toHTML(myBrowser, description, false), myProfileFilter.getFilter()))) {
                        readHTML(myBrowser, toHTML(myBrowser, "<b>" + UNDER_CONSTRUCTION + "</b>", false));
                    }
                } catch (Throwable t) {
                    LOG.error("Failed to load description for: " + defaultDescriptor.getToolWrapper().getTool().getClass() + "; description: " + description, t);
                }
            } else {
                readHTML(myBrowser, toHTML(myBrowser, "Can't find inspection description.", false));
            }
        } else {
            readHTML(myBrowser, toHTML(myBrowser, "Multiple inspections are selected. You can edit them as a single inspection.", false));
        }
        myOptionsPanel.removeAll();
        final Project project = myProjectProfileManager.getProject();
        final JPanel severityPanel = new JPanel(new GridBagLayout());
        final JPanel configPanelAnchor = new JPanel(new GridLayout());
        final Set<String> scopesNames = new THashSet<>();
        for (final InspectionConfigTreeNode node : nodes) {
            final List<ScopeToolState> nonDefaultTools = myProfile.getNonDefaultTools(node.getDefaultDescriptor().getKey().toString(), project);
            for (final ScopeToolState tool : nonDefaultTools) {
                scopesNames.add(tool.getScopeName());
            }
        }
        final double severityPanelWeightY;
        if (scopesNames.isEmpty()) {
            final LevelChooserAction severityLevelChooser = new LevelChooserAction(myProfile.getProfileManager().getOwnSeverityRegistrar(), includeDoNotShow(nodes)) {

                @Override
                protected void onChosen(final HighlightSeverity severity) {
                    final HighlightDisplayLevel level = HighlightDisplayLevel.find(severity);
                    for (final InspectionConfigTreeNode node : nodes) {
                        final HighlightDisplayKey key = node.getDefaultDescriptor().getKey();
                        final NamedScope scope = node.getDefaultDescriptor().getScope();
                        final boolean toUpdate = myProfile.getErrorLevel(key, scope, project) != level;
                        myProfile.setErrorLevel(key, level, null, project);
                        if (toUpdate)
                            node.dropCache();
                    }
                    myTreeTable.updateUI();
                }
            };
            final HighlightSeverity severity = ScopesAndSeveritiesTable.getSeverity(ContainerUtil.map(nodes, node -> node.getDefaultDescriptor().getState()));
            severityLevelChooser.setChosen(severity);
            final ScopesChooser scopesChooser = new ScopesChooser(ContainerUtil.map(nodes, node -> node.getDefaultDescriptor()), myProfile, project, null) {

                @Override
                protected void onScopesOrderChanged() {
                    myTreeTable.updateUI();
                    updateOptionsAndDescriptionPanel();
                }

                @Override
                protected void onScopeAdded() {
                    myTreeTable.updateUI();
                    updateOptionsAndDescriptionPanel();
                }
            };
            severityPanel.add(new JLabel(InspectionsBundle.message("inspection.severity")), new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.VERTICAL, JBUI.insets(10, 0), 0, 0));
            final JComponent severityLevelChooserComponent = severityLevelChooser.createCustomComponent(severityLevelChooser.getTemplatePresentation());
            severityPanel.add(severityLevelChooserComponent, new GridBagConstraints(1, 0, 1, 1, 0, 1, GridBagConstraints.WEST, GridBagConstraints.BOTH, JBUI.insets(10, 0), 0, 0));
            final JComponent scopesChooserComponent = scopesChooser.createCustomComponent(scopesChooser.getTemplatePresentation());
            severityPanel.add(scopesChooserComponent, new GridBagConstraints(2, 0, 1, 1, 0, 1, GridBagConstraints.WEST, GridBagConstraints.BOTH, JBUI.insets(10, 0), 0, 0));
            final JLabel label = new JLabel("", SwingConstants.RIGHT);
            severityPanel.add(label, new GridBagConstraints(3, 0, 1, 1, 1, 0, GridBagConstraints.EAST, GridBagConstraints.BOTH, JBUI.insets(2, 0), 0, 0));
            severityPanelWeightY = 0.0;
            if (singleNode != null) {
                setConfigPanel(configPanelAnchor, myProfile.getToolDefaultState(singleNode.getDefaultDescriptor().getKey().toString(), project));
            }
        } else {
            if (singleNode != null) {
                for (final Descriptor descriptor : singleNode.getDescriptors().getNonDefaultDescriptors()) {
                    descriptor.loadConfig();
                }
            }
            final JTable scopesAndScopesAndSeveritiesTable = new ScopesAndSeveritiesTable(new ScopesAndSeveritiesTable.TableSettings(nodes, myProfile, project) {

                @Override
                protected void onScopeChosen(@NotNull final ScopeToolState state) {
                    setConfigPanel(configPanelAnchor, state);
                    configPanelAnchor.revalidate();
                    configPanelAnchor.repaint();
                }

                @Override
                protected void onSettingsChanged() {
                    update(false);
                }

                @Override
                protected void onScopeAdded() {
                    update(true);
                }

                @Override
                protected void onScopesOrderChanged() {
                    update(true);
                }

                @Override
                protected void onScopeRemoved(final int scopesCount) {
                    update(scopesCount == 1);
                }

                private void update(final boolean updateOptionsAndDescriptionPanel) {
                    Queue<InspectionConfigTreeNode> q = new Queue<>(nodes.size());
                    for (InspectionConfigTreeNode node : nodes) {
                        q.addLast(node);
                    }
                    while (!q.isEmpty()) {
                        final InspectionConfigTreeNode inspectionConfigTreeNode = q.pullFirst();
                        inspectionConfigTreeNode.dropCache();
                        final TreeNode parent = inspectionConfigTreeNode.getParent();
                        if (parent != null && parent.getParent() != null) {
                            q.addLast((InspectionConfigTreeNode) parent);
                        }
                    }
                    myTreeTable.updateUI();
                    if (updateOptionsAndDescriptionPanel) {
                        updateOptionsAndDescriptionPanel();
                    }
                }
            });
            final ToolbarDecorator wrappedTable = ToolbarDecorator.createDecorator(scopesAndScopesAndSeveritiesTable).disableUpDownActions().setRemoveActionUpdater(new AnActionButtonUpdater() {

                @Override
                public boolean isEnabled(AnActionEvent e) {
                    final int selectedRow = scopesAndScopesAndSeveritiesTable.getSelectedRow();
                    final int rowCount = scopesAndScopesAndSeveritiesTable.getRowCount();
                    return rowCount - 1 != selectedRow;
                }
            });
            final JPanel panel = wrappedTable.createPanel();
            panel.setMinimumSize(new Dimension(getMinimumSize().width, 3 * scopesAndScopesAndSeveritiesTable.getRowHeight()));
            severityPanel.add(new JBLabel("Severity by Scope"), new GridBagConstraints(0, 0, 1, 1, 1.0, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, JBUI.insets(5, 0, 2, 10), 0, 0));
            severityPanel.add(panel, new GridBagConstraints(0, 1, 1, 1, 0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, JBUI.insets(0, 0, 0, 0), 0, 0));
            severityPanelWeightY = 0.3;
        }
        myOptionsPanel.add(severityPanel, new GridBagConstraints(0, 0, 1, 1, 1.0, severityPanelWeightY, GridBagConstraints.WEST, GridBagConstraints.BOTH, JBUI.insets(0, 2, 0, 0), 0, 0));
        if (configPanelAnchor.getComponentCount() != 0) {
            configPanelAnchor.setBorder(IdeBorderFactory.createTitledBorder("Options", false, new JBInsets(7, 0, 0, 0)));
        }
        GuiUtils.enableChildren(myOptionsPanel, isThoughOneNodeEnabled(nodes));
        if (configPanelAnchor.getComponentCount() != 0 || scopesNames.isEmpty()) {
            myOptionsPanel.add(configPanelAnchor, new GridBagConstraints(0, 1, 1, 1, 1.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, JBUI.insets(0, 2, 0, 0), 0, 0));
        }
        myOptionsPanel.revalidate();
    } else {
        initOptionsAndDescriptionPanel();
    }
    myOptionsPanel.repaint();
}
Also used : JBInsets(com.intellij.util.ui.JBInsets) UIUtil(com.intellij.util.ui.UIUtil) com.intellij.codeInspection.ex(com.intellij.codeInspection.ex) AllIcons(com.intellij.icons.AllIcons) ScopesAndSeveritiesTable(com.intellij.profile.codeInspection.ui.table.ScopesAndSeveritiesTable) InspectionProfileManager(com.intellij.profile.codeInspection.InspectionProfileManager) HighlightSeverity(com.intellij.lang.annotation.HighlightSeverity) THashSet(gnu.trove.THashSet) ItemListener(java.awt.event.ItemListener) THashMap(gnu.trove.THashMap) JBLabel(com.intellij.ui.components.JBLabel) Queue(com.intellij.util.containers.Queue) JBUI(com.intellij.util.ui.JBUI) ProjectInspectionProfileManager(com.intellij.profile.codeInspection.ProjectInspectionProfileManager) Disposer(com.intellij.openapi.util.Disposer) SearchableOptionsRegistrar(com.intellij.ide.ui.search.SearchableOptionsRegistrar) Logger(com.intellij.openapi.diagnostic.Logger) InspectionsConfigTreeComparator(com.intellij.profile.codeInspection.ui.inspectionsTree.InspectionsConfigTreeComparator) InspectionsFilter(com.intellij.profile.codeInspection.ui.filter.InspectionsFilter) DefaultTreeModel(javax.swing.tree.DefaultTreeModel) InspectionsConfigTreeRenderer(com.intellij.profile.codeInspection.ui.inspectionsTree.InspectionsConfigTreeRenderer) ItemEvent(java.awt.event.ItemEvent) HintUtil(com.intellij.codeInsight.hint.HintUtil) TreePath(javax.swing.tree.TreePath) com.intellij.ide(com.intellij.ide) HighlightDisplayKey(com.intellij.codeInsight.daemon.HighlightDisplayKey) HighlightInfoType(com.intellij.codeInsight.daemon.impl.HighlightInfoType) com.intellij.ui(com.intellij.ui) SearchUtil(com.intellij.ide.ui.search.SearchUtil) BaseInspectionProfileManager(com.intellij.profile.codeInspection.BaseInspectionProfileManager) InspectionsBundle(com.intellij.codeInspection.InspectionsBundle) Nullable(org.jetbrains.annotations.Nullable) List(java.util.List) TextAttributes(com.intellij.openapi.editor.markup.TextAttributes) ApplicationManager(com.intellij.openapi.application.ApplicationManager) NotNull(org.jetbrains.annotations.NotNull) InspectionFilterAction(com.intellij.profile.codeInspection.ui.filter.InspectionFilterAction) Settings(com.intellij.openapi.options.ex.Settings) SeverityRegistrar(com.intellij.codeInsight.daemon.impl.SeverityRegistrar) java.util(java.util) TreeNode(javax.swing.tree.TreeNode) NonNls(org.jetbrains.annotations.NonNls) ContainerUtil(com.intellij.util.containers.ContainerUtil) InspectionConfigTreeNode(com.intellij.profile.codeInspection.ui.inspectionsTree.InspectionConfigTreeNode) Comparing(com.intellij.openapi.util.Comparing) NamedScope(com.intellij.psi.search.scope.packageSet.NamedScope) JDOMUtil(com.intellij.openapi.util.JDOMUtil) Project(com.intellij.openapi.project.Project) TreeUtil(com.intellij.util.ui.tree.TreeUtil) JBCheckBox(com.intellij.ui.components.JBCheckBox) StringUtil(com.intellij.openapi.util.text.StringUtil) Convertor(com.intellij.util.containers.Convertor) javax.swing.event(javax.swing.event) IOException(java.io.IOException) HighlightDisplayLevel(com.intellij.codeHighlighting.HighlightDisplayLevel) Disposable(com.intellij.openapi.Disposable) InspectionsConfigTreeTable(com.intellij.profile.codeInspection.ui.inspectionsTree.InspectionsConfigTreeTable) java.awt(java.awt) com.intellij.openapi.actionSystem(com.intellij.openapi.actionSystem) TextAttributesKey(com.intellij.openapi.editor.colors.TextAttributesKey) DumbAwareAction(com.intellij.openapi.project.DumbAwareAction) StringReader(java.io.StringReader) Element(org.jdom.Element) Alarm(com.intellij.util.Alarm) javax.swing(javax.swing) HighlightSeverity(com.intellij.lang.annotation.HighlightSeverity) HighlightDisplayKey(com.intellij.codeInsight.daemon.HighlightDisplayKey) JBInsets(com.intellij.util.ui.JBInsets) NamedScope(com.intellij.psi.search.scope.packageSet.NamedScope) JBLabel(com.intellij.ui.components.JBLabel) TreeNode(javax.swing.tree.TreeNode) InspectionConfigTreeNode(com.intellij.profile.codeInspection.ui.inspectionsTree.InspectionConfigTreeNode) Queue(com.intellij.util.containers.Queue) HighlightDisplayLevel(com.intellij.codeHighlighting.HighlightDisplayLevel) ScopesAndSeveritiesTable(com.intellij.profile.codeInspection.ui.table.ScopesAndSeveritiesTable) THashSet(gnu.trove.THashSet) InspectionConfigTreeNode(com.intellij.profile.codeInspection.ui.inspectionsTree.InspectionConfigTreeNode) Project(com.intellij.openapi.project.Project) TreePath(javax.swing.tree.TreePath)

Example 80 with THashSet

use of gnu.trove.THashSet in project intellij-community by JetBrains.

the class InspectionsAggregationUtil method getInspectionsNodes.

private static List<InspectionConfigTreeNode> getInspectionsNodes(final Queue<InspectionConfigTreeNode> queue) {
    final Set<InspectionConfigTreeNode> nodes = new THashSet<>();
    while (!queue.isEmpty()) {
        final InspectionConfigTreeNode node = queue.pullFirst();
        if (node.getDescriptors() == null) {
            for (int i = 0; i < node.getChildCount(); i++) {
                final InspectionConfigTreeNode childNode = (InspectionConfigTreeNode) node.getChildAt(i);
                queue.addLast(childNode);
            }
        } else {
            nodes.add(node);
        }
    }
    return new ArrayList<>(nodes);
}
Also used : ArrayList(java.util.ArrayList) THashSet(gnu.trove.THashSet) InspectionConfigTreeNode(com.intellij.profile.codeInspection.ui.inspectionsTree.InspectionConfigTreeNode)

Aggregations

THashSet (gnu.trove.THashSet)239 NotNull (org.jetbrains.annotations.NotNull)65 VirtualFile (com.intellij.openapi.vfs.VirtualFile)62 Project (com.intellij.openapi.project.Project)35 File (java.io.File)35 THashMap (gnu.trove.THashMap)31 Nullable (org.jetbrains.annotations.Nullable)31 Module (com.intellij.openapi.module.Module)29 IOException (java.io.IOException)24 PsiElement (com.intellij.psi.PsiElement)21 PsiFile (com.intellij.psi.PsiFile)18 GlobalSearchScope (com.intellij.psi.search.GlobalSearchScope)16 java.util (java.util)16 Element (org.jdom.Element)14 Pair (com.intellij.openapi.util.Pair)13 Logger (com.intellij.openapi.diagnostic.Logger)12 ContainerUtil (com.intellij.util.containers.ContainerUtil)12 Document (com.intellij.openapi.editor.Document)11 Library (com.intellij.openapi.roots.libraries.Library)11 StringUtil (com.intellij.openapi.util.text.StringUtil)10