Search in sources :

Example 26 with Condition

use of com.intellij.openapi.util.Condition in project go-lang-idea-plugin by go-lang-plugin-org.

the class GoIdFilter method createIdFilter.

private static IdFilter createIdFilter(@NotNull Project project, @NotNull Key<CachedValue<IdFilter>> cacheKey, @NotNull Condition<VirtualFile> filterCondition) {
    return CachedValuesManager.getManager(project).getCachedValue(project, cacheKey, () -> {
        BitSet bitSet = new BitSet();
        ContentIterator iterator = fileOrDir -> {
            if (filterCondition.value(fileOrDir)) {
                addToBitSet(bitSet, fileOrDir);
            }
            ProgressManager.checkCanceled();
            return true;
        };
        FileBasedIndex.getInstance().iterateIndexableFiles(iterator, project, null);
        return CachedValueProvider.Result.create(new GoIdFilter(bitSet), ProjectRootManager.getInstance(project), VirtualFileManager.VFS_STRUCTURE_MODIFICATIONS);
    }, false);
}
Also used : ProgressManager(com.intellij.openapi.progress.ProgressManager) GoTestFinder(com.goide.runconfig.testing.GoTestFinder) VirtualFile(com.intellij.openapi.vfs.VirtualFile) ContentIterator(com.intellij.openapi.roots.ContentIterator) Key(com.intellij.openapi.util.Key) GlobalSearchScope(com.intellij.psi.search.GlobalSearchScope) IdFilter(com.intellij.util.indexing.IdFilter) VirtualFileManager(com.intellij.openapi.vfs.VirtualFileManager) CachedValuesManager(com.intellij.psi.util.CachedValuesManager) CachedValueProvider(com.intellij.psi.util.CachedValueProvider) Nullable(org.jetbrains.annotations.Nullable) CachedValue(com.intellij.psi.util.CachedValue) Project(com.intellij.openapi.project.Project) BitSet(java.util.BitSet) Logger(com.intellij.openapi.diagnostic.Logger) ProjectRootManager(com.intellij.openapi.roots.ProjectRootManager) VirtualFileWithId(com.intellij.openapi.vfs.VirtualFileWithId) NotNull(org.jetbrains.annotations.NotNull) FileBasedIndex(com.intellij.util.indexing.FileBasedIndex) Condition(com.intellij.openapi.util.Condition) ContentIterator(com.intellij.openapi.roots.ContentIterator) BitSet(java.util.BitSet)

Example 27 with Condition

use of com.intellij.openapi.util.Condition in project android by JetBrains.

the class ResourceFolderRepository method equalFilesItems.

// Not a super-robust comparator. Compares a subset of the repo state for testing.
// Returns false if a difference is found.
// Returns true if the repositories are roughly equivalent.
@VisibleForTesting
boolean equalFilesItems(ResourceFolderRepository other) {
    File myResourceDirFile = VfsUtilCore.virtualToIoFile(myResourceDir);
    File otherResourceDir = VfsUtilCore.virtualToIoFile(other.myResourceDir);
    if (!FileUtil.filesEqual(myResourceDirFile, otherResourceDir)) {
        return false;
    }
    if (myResourceFiles.size() != other.myResourceFiles.size()) {
        return false;
    }
    for (Map.Entry<VirtualFile, ResourceFile> fileEntry : myResourceFiles.entrySet()) {
        ResourceFile otherResFile = other.myResourceFiles.get(fileEntry.getKey());
        if (otherResFile == null) {
            return false;
        }
        if (!FileUtil.filesEqual(fileEntry.getValue().getFile(), otherResFile.getFile())) {
            return false;
        }
    }
    if (myItems.size() != other.myItems.size()) {
        return false;
    }
    for (Map.Entry<ResourceType, ListMultimap<String, ResourceItem>> entry : myItems.entrySet()) {
        ListMultimap<String, ResourceItem> ownEntries = entry.getValue();
        ListMultimap<String, ResourceItem> otherEntries = other.myItems.get(entry.getKey());
        if (otherEntries == null || otherEntries.size() != ownEntries.size()) {
            return false;
        }
        for (Map.Entry<String, ResourceItem> itemEntry : ownEntries.entries()) {
            List<ResourceItem> otherItemsList = otherEntries.get(itemEntry.getKey());
            if (otherItemsList == null) {
                return false;
            }
            final ResourceItem item = itemEntry.getValue();
            if (!ContainerUtil.exists(otherItemsList, new Condition<ResourceItem>() {

                @Override
                public boolean value(ResourceItem resourceItem) {
                    // Use #compareTo instead of #equals because #equals compares pointers of mSource.
                    if (resourceItem.compareTo(item) != 0) {
                        return false;
                    }
                    // Skip ID type resources, where the ResourceValues are not important and where blob writing doesn't preserve the value.
                    if (item.getType() != ResourceType.ID) {
                        ResourceValue resValue = item.getResourceValue(false);
                        ResourceValue otherResValue = resourceItem.getResourceValue(false);
                        if (resValue == null || otherResValue == null) {
                            if (resValue != otherResValue) {
                                return false;
                            }
                        } else {
                            String resValueStr = resValue.getValue();
                            String otherResValueStr = otherResValue.getValue();
                            if (resValueStr == null || otherResValueStr == null) {
                                if (resValueStr != otherResValueStr) {
                                    return false;
                                }
                            } else {
                                if (!resValueStr.equals(otherResValueStr)) {
                                    return false;
                                }
                            }
                        }
                    }
                    // We can only compareValueWith (compare equivalence of XML nodes) for VALUE items.
                    // For others, the XML node may be different before and after serialization.
                    ResourceFile source = item.getSource();
                    ResourceFile otherSource = resourceItem.getSource();
                    if (source != null && otherSource != null) {
                        ResourceFolderType ownFolderType = ResourceHelper.getFolderType(source);
                        ResourceFolderType otherFolderType = ResourceHelper.getFolderType(otherSource);
                        if (otherFolderType != ownFolderType) {
                            return false;
                        }
                        if (otherFolderType == VALUES) {
                            return resourceItem.compareValueWith(item);
                        }
                    }
                    return true;
                }
            })) {
                return false;
            }
        }
    }
    // Only compare the keys.
    return myDataBindingResourceFiles.keySet().equals(other.myDataBindingResourceFiles.keySet());
}
Also used : VirtualFile(com.intellij.openapi.vfs.VirtualFile) Condition(com.intellij.openapi.util.Condition) ResourceType(com.android.resources.ResourceType) ResourceFolderType(com.android.resources.ResourceFolderType) ResourceValue(com.android.ide.common.rendering.api.ResourceValue) VirtualFile(com.intellij.openapi.vfs.VirtualFile) File(java.io.File) VisibleForTesting(com.android.annotations.VisibleForTesting)

Example 28 with Condition

use of com.intellij.openapi.util.Condition in project android by JetBrains.

the class ChooseResourceDialog method updateFilter.

private void updateFilter() {
    ResourcePanel panel = getSelectedPanel();
    final String text = mySearchField.getText();
    if (text.isEmpty()) {
        if (!panel.isFiltered()) {
            return;
        }
        panel.setFilter(null);
        return;
    }
    if (panel.getType() == ResourceType.COLOR) {
        Condition<ResourceChooserItem> colorCondition = null;
        if (text.startsWith("#")) {
            final Color color = ResourceHelper.parseColor(text);
            if (color != null) {
                colorCondition = item -> {
                    assert item.getType() == ResourceType.COLOR;
                    return ResourceHelper.resolveMultipleColors(getResourceResolver(), item.getResourceValue(), myModule.getProject()).contains(color);
                };
            }
        }
        if (colorCondition != null) {
            panel.setFilter(colorCondition);
            return;
        }
    }
    Condition<ResourceChooserItem> condition = item -> {
        if (item.getType() == ResourceType.STRING) {
            String string = ResourceHelper.resolveStringValue(getResourceResolver(), item.getResourceUrl());
            if (StringUtil.containsIgnoreCase(string, text)) {
                return true;
            }
        }
        return StringUtil.containsIgnoreCase(item.getName(), text);
    };
    panel.setFilter(condition);
}
Also used : CreateXmlResourcePanel(org.jetbrains.android.actions.CreateXmlResourcePanel) CreateXmlResourcePanel(org.jetbrains.android.actions.CreateXmlResourcePanel) AllIcons(com.intellij.icons.AllIcons) ResourceResolver(com.android.ide.common.resources.ResourceResolver) XmlFile(com.intellij.psi.xml.XmlFile) ResourceItem(com.android.ide.common.res2.ResourceItem) VirtualFile(com.intellij.openapi.vfs.VirtualFile) ResourceFolderType(com.android.resources.ResourceFolderType) ModalityState(com.intellij.openapi.application.ModalityState) CreateXmlResourceDialog(org.jetbrains.android.actions.CreateXmlResourceDialog) ResourceType(com.android.resources.ResourceType) JBLabel(com.intellij.ui.components.JBLabel) Border(javax.swing.border.Border) ProjectResourceRepository(com.android.tools.idea.res.ProjectResourceRepository) ImageIO(javax.imageio.ImageIO) CompoundBorder(javax.swing.border.CompoundBorder) Logger(com.intellij.openapi.diagnostic.Logger) Module(com.intellij.openapi.module.Module) MultiMap(com.intellij.util.containers.MultiMap) ValidationInfo(com.intellij.openapi.ui.ValidationInfo) XmlTag(com.intellij.psi.xml.XmlTag) TableModel(javax.swing.table.TableModel) HtmlBuilderHelper(com.android.tools.idea.rendering.HtmlBuilderHelper) ResourceHelper(com.android.tools.idea.res.ResourceHelper) PropertiesComponent(com.intellij.ide.util.PropertiesComponent) AndroidBundle(org.jetbrains.android.util.AndroidBundle) ImmutableMap(com.google.common.collect.ImmutableMap) BufferedImage(java.awt.image.BufferedImage) ItemResourceValue(com.android.ide.common.rendering.api.ItemResourceValue) ResourceComponent(com.android.tools.idea.editors.theme.ui.ResourceComponent) RenderTask(com.android.tools.idea.rendering.RenderTask) com.intellij.ui(com.intellij.ui) LocalFileSystem(com.intellij.openapi.vfs.LocalFileSystem) IAndroidTarget(com.android.sdklib.IAndroidTarget) ListPopup(com.intellij.openapi.ui.popup.ListPopup) Nullable(org.jetbrains.annotations.Nullable) DefaultTableCellRenderer(javax.swing.table.DefaultTableCellRenderer) List(java.util.List) com.intellij.util.ui(com.intellij.util.ui) ResourceUrl(com.android.ide.common.resources.ResourceUrl) java.awt.event(java.awt.event) ApplicationManager(com.intellij.openapi.application.ApplicationManager) NotNull(org.jetbrains.annotations.NotNull) Configuration(com.android.tools.idea.configurations.Configuration) IconDetector(com.android.tools.lint.checks.IconDetector) DocumentListener(com.intellij.openapi.editor.event.DocumentListener) java.util(java.util) AndroidBaseLayoutRefactoringAction(org.jetbrains.android.refactoring.AndroidBaseLayoutRefactoringAction) TableColumnModel(javax.swing.table.TableColumnModel) SdkConstants(com.android.SdkConstants) com.android.tools.idea.editors.theme(com.android.tools.idea.editors.theme) ScreenReader(com.intellij.util.ui.accessibility.ScreenReader) AndroidJavaDocRenderer(com.android.tools.idea.javadoc.AndroidJavaDocRenderer) CreateResourceFileAction(org.jetbrains.android.actions.CreateResourceFileAction) Lists(com.google.common.collect.Lists) DialogWrapper(com.intellij.openapi.ui.DialogWrapper) AbstractBorder(javax.swing.border.AbstractBorder) AndroidExtractStyleAction(org.jetbrains.android.refactoring.AndroidExtractStyleAction) AndroidResourceUtil(org.jetbrains.android.util.AndroidResourceUtil) AbstractTableModel(javax.swing.table.AbstractTableModel) AppResourceRepository(com.android.tools.idea.res.AppResourceRepository) Project(com.intellij.openapi.project.Project) ConfigurationManager(com.android.tools.idea.configurations.ConfigurationManager) DocumentEvent(javax.swing.event.DocumentEvent) ResourceNameValidator(com.android.tools.idea.res.ResourceNameValidator) PsiDocumentManager(com.intellij.psi.PsiDocumentManager) PlatformIcons(com.intellij.util.PlatformIcons) TreeGrid(com.android.tools.adtui.treegrid.TreeGrid) AndroidTargetData(org.jetbrains.android.sdk.AndroidTargetData) ResourceValue(com.android.ide.common.rendering.api.ResourceValue) SearchField(com.android.tools.idea.ui.SearchField) StringUtil(com.intellij.openapi.util.text.StringUtil) HtmlBuilder(com.android.utils.HtmlBuilder) SwatchComponent(com.android.tools.swing.ui.SwatchComponent) AndroidFacet(org.jetbrains.android.facet.AndroidFacet) IOException(java.io.IOException) OnePixelDivider(com.intellij.openapi.ui.OnePixelDivider) Maps(com.google.common.collect.Maps) File(java.io.File) java.awt(java.awt) DrawableRendererEditor(com.android.tools.idea.editors.theme.attributes.editors.DrawableRendererEditor) com.intellij.openapi.actionSystem(com.intellij.openapi.actionSystem) JBTable(com.intellij.ui.table.JBTable) AndroidIcons(icons.AndroidIcons) JBPopupFactory(com.intellij.openapi.ui.popup.JBPopupFactory) GraphicalResourceRendererEditor(com.android.tools.idea.editors.theme.attributes.editors.GraphicalResourceRendererEditor) AbstractTreeStructure(com.intellij.ide.util.treeView.AbstractTreeStructure) SimpleDataContext(com.intellij.openapi.actionSystem.impl.SimpleDataContext) Condition(com.intellij.openapi.util.Condition) AndroidUtils(org.jetbrains.android.util.AndroidUtils) javax.swing(javax.swing)

Example 29 with Condition

use of com.intellij.openapi.util.Condition in project android by JetBrains.

the class ModuleResourceRepositoryTest method testOverlayUpdates2.

public void testOverlayUpdates2() {
    // Like testOverlayUpdates1, but rather than testing changes to layout resources (file-based resource)
    // perform document edits in value-documents
    myFixture.copyFileToProject(LAYOUT, "res/layout/layout1.xml");
    myFixture.copyFileToProject(LAYOUT_OVERLAY, "res2/layout/layout1.xml");
    VirtualFile values1 = myFixture.copyFileToProject(VALUES, "res/values/values.xml");
    VirtualFile values2 = myFixture.copyFileToProject(VALUES_OVERLAY1, "res2/values/values.xml");
    VirtualFile values3 = myFixture.copyFileToProject(VALUES_OVERLAY2, "res3/values/nameDoesNotMatter.xml");
    final VirtualFile values3No = myFixture.copyFileToProject(VALUES_OVERLAY2_NO, "res3/values-no/values.xml");
    VirtualFile res1 = values1.getParent().getParent();
    VirtualFile res2 = values2.getParent().getParent();
    VirtualFile res3 = values3.getParent().getParent();
    ModuleResourceRepository resources = ModuleResourceRepository.createForTest(myFacet, Arrays.asList(res1, res2, res3));
    PsiFile psiValues1 = PsiManager.getInstance(getProject()).findFile(values1);
    assertNotNull(psiValues1);
    PsiFile psiValues2 = PsiManager.getInstance(getProject()).findFile(values2);
    assertNotNull(psiValues2);
    PsiFile psiValues3 = PsiManager.getInstance(getProject()).findFile(values3);
    assertNotNull(psiValues3);
    PsiFile psiValues3No = PsiManager.getInstance(getProject()).findFile(values3No);
    assertNotNull(psiValues3No);
    // Initial state; sanity check from #testOverlays()
    assertStringIs(resources, "title_layout_changes", "Layout Changes");
    // Overridden in res2
    assertStringIs(resources, "title_crossfade", "Complex Crossfade");
    // Overridden in res3
    assertStringIs(resources, "title_zoom", "Zoom!");
    // Overridden in res2
    assertStringIs(resources, "unique_string", "Unique");
    // Overridden in res3
    assertStringIs(resources, "another_unique_string", "Another Unique", false);
    // res3 (not unique because we have a values-no item too)
    assertStringIs(resources, "app_name", "Very Different App Name", false);
    // Value resource check:
    // Verify that an edit in a value file, both in a non-overridden and an overridden
    // value, is observed; and that an override in an overridden value is not observed.
    assertTrue(resources.hasResourceItem(ResourceType.STRING, "app_name"));
    assertTrue(resources.hasResourceItem(ResourceType.STRING, "title_layout_changes"));
    ResourceItem appName = getFirstItem(resources, ResourceType.STRING, "app_name");
    assertItemIsInDir(res3, appName);
    // res3 (not unique because we have a values-no item too)
    assertStringIs(resources, "app_name", "Very Different App Name", false);
    long generation = resources.getModificationCount();
    final PsiDocumentManager documentManager = PsiDocumentManager.getInstance(getProject());
    final Document document = documentManager.getDocument(psiValues3);
    assertNotNull(document);
    WriteCommandAction.runWriteCommandAction(null, new Runnable() {

        @Override
        public void run() {
            int offset = document.getText().indexOf("Very Different App Name");
            document.insertString(offset, "Not ");
            documentManager.commitDocument(document);
        }
    });
    // The first edit to psiValues3 causes ResourceFolderRepository to transition from non-Psi -> Psi which requires a rescan.
    assertTrue(resources.isScanPending(psiValues3));
    UIUtil.dispatchAllInvocationEvents();
    assertTrue(resources.getModificationCount() > generation);
    // Should still be defined in res3 but have new value.
    // The order of items may have swapped if a full rescan is done.
    List<ResourceItem> list = resources.getResourceItem(ResourceType.STRING, "app_name");
    assertNotNull(list);
    assertSize(2, list);
    appName = ContainerUtil.find(list, new Condition<ResourceItem>() {

        @Override
        public boolean value(ResourceItem resourceItem) {
            return resourceItem.getQualifiers().isEmpty();
        }
    });
    assertNotNull(appName);
    assertItemIsInDir(res3, appName);
    ResourceValue appNameResourceValue = appName.getResourceValue(false);
    assertNotNull(appNameResourceValue);
    assertEquals("Not Very Different App Name", appNameResourceValue.getValue());
    // Try renaming the item name.
    generation = resources.getModificationCount();
    WriteCommandAction.runWriteCommandAction(null, new Runnable() {

        @Override
        public void run() {
            int offset = document.getText().indexOf("app_name");
            document.insertString(offset, "r");
            documentManager.commitDocument(document);
        }
    });
    assertTrue(resources.getModificationCount() > generation);
    assertTrue(resources.hasResourceItem(ResourceType.STRING, "rapp_name"));
    appName = getFirstItem(resources, ResourceType.STRING, "app_name");
    // The item is still under res3, but now it's in the Norwegian translation
    assertEquals("no", appName.getSource().getQualifiers());
    assertStringIs(resources, "app_name", "Forskjellig Navn", false);
    // Delete that file:
    generation = resources.getModificationCount();
    WriteCommandAction.runWriteCommandAction(null, new Runnable() {

        @Override
        public void run() {
            try {
                values3No.delete(this);
            } catch (IOException e) {
                fail(e.toString());
            }
        }
    });
    assertTrue(resources.getModificationCount() > generation);
    // Now the item is no longer available in res3; should fallback to res 2
    appName = getFirstItem(resources, ResourceType.STRING, "app_name");
    assertItemIsInDir(res2, appName);
    assertStringIs(resources, "app_name", "Different App Name", false);
    // Check that editing an overridden attribute does not count as a change
    final Document document2 = documentManager.getDocument(psiValues1);
    assertNotNull(document2);
    WriteCommandAction.runWriteCommandAction(null, new Runnable() {

        @Override
        public void run() {
            int offset = document2.getText().indexOf("Animations Demo");
            document2.insertString(offset, "Cool ");
            documentManager.commitDocument(document2);
        }
    });
    // The first edit to psiValues1 causes ResourceFolderRepository to transition from non-Psi -> Psi which requires a rescan.
    assertTrue(resources.isScanPending(psiValues1));
    UIUtil.dispatchAllInvocationEvents();
    // Unaffected by above change
    assertStringIs(resources, "app_name", "Different App Name", false);
    // Finally check that editing an non-overridden attribute also gets picked up as a change
    generation = resources.getModificationCount();
    // Observe after the rescan, so that an edit causes a generation bump.
    assertStringIs(resources, "title_layout_changes", "Layout Changes");
    WriteCommandAction.runWriteCommandAction(null, new Runnable() {

        @Override
        public void run() {
            int offset = document2.getText().indexOf("Layout Changes");
            document2.insertString(offset, "New ");
            documentManager.commitDocument(document2);
        }
    });
    assertTrue(resources.getModificationCount() > generation);
    assertStringIs(resources, "title_layout_changes", "New Layout Changes", false);
}
Also used : VirtualFile(com.intellij.openapi.vfs.VirtualFile) Condition(com.intellij.openapi.util.Condition) IOException(java.io.IOException) Document(com.intellij.openapi.editor.Document) ResourceValue(com.android.ide.common.rendering.api.ResourceValue) PsiFile(com.intellij.psi.PsiFile) ResourceItem(com.android.ide.common.res2.ResourceItem) PsiDocumentManager(com.intellij.psi.PsiDocumentManager)

Example 30 with Condition

use of com.intellij.openapi.util.Condition in project intellij-plugins by JetBrains.

the class DartAnalysisServerService method doConfigureImportedLibraries.

private static void doConfigureImportedLibraries(@NotNull final Project project, @NotNull final Collection<String> filePaths) {
    final DartSdk sdk = DartSdk.getDartSdk(project);
    if (sdk == null)
        return;
    final ProjectFileIndex fileIndex = ProjectRootManager.getInstance(project).getFileIndex();
    final SortedSet<String> folderPaths = new TreeSet<>();
    final Collection<String> rootsToAddToLib = new THashSet<>();
    for (final String path : filePaths) {
        if (path != null) {
            folderPaths.add(PathUtil.getParentPath(FileUtil.toSystemIndependentName(path)));
        }
    }
    outer: for (final String path : folderPaths) {
        final VirtualFile vFile = LocalFileSystem.getInstance().findFileByPath(path);
        if (!path.startsWith(sdk.getHomePath() + "/") && (vFile == null || !fileIndex.isInContent(vFile))) {
            for (String configuredPath : rootsToAddToLib) {
                if (path.startsWith(configuredPath + "/")) {
                    // folderPaths is sorted so subfolders go after parent folder
                    continue outer;
                }
            }
            rootsToAddToLib.add(path);
        }
    }
    final Processor<? super PsiFileSystemItem> falseProcessor = (Processor<PsiFileSystemItem>) item -> false;
    final Condition<Module> moduleFilter = module -> DartSdkLibUtil.isDartSdkEnabled(module) && !FilenameIndex.processFilesByName(PubspecYamlUtil.PUBSPEC_YAML, false, falseProcessor, module.getModuleContentScope(), project, null);
    final DartFileListener.DartLibInfo libInfo = new DartFileListener.DartLibInfo(true);
    libInfo.addRoots(rootsToAddToLib);
    final Library library = DartFileListener.updatePackagesLibraryRoots(project, libInfo);
    DartFileListener.updateDependenciesOnDartPackagesLibrary(project, moduleFilter, library);
}
Also used : VirtualFile(com.intellij.openapi.vfs.VirtualFile) DartFileType(com.jetbrains.lang.dart.DartFileType) UIUtil(com.intellij.util.ui.UIUtil) HtmlUtil(com.intellij.xml.util.HtmlUtil) DartSdk(com.jetbrains.lang.dart.sdk.DartSdk) Logging(com.google.dart.server.utilities.logging.Logging) VirtualFile(com.intellij.openapi.vfs.VirtualFile) ModalityState(com.intellij.openapi.application.ModalityState) Document(com.intellij.openapi.editor.Document) THashSet(gnu.trove.THashSet) DocumentEvent(com.intellij.openapi.editor.event.DocumentEvent) THashMap(gnu.trove.THashMap) FileEditorManagerEvent(com.intellij.openapi.fileEditor.FileEditorManagerEvent) Library(com.intellij.openapi.roots.libraries.Library) Task(com.intellij.openapi.progress.Task) DartProblemsView(com.jetbrains.lang.dart.ide.errorTreeView.DartProblemsView) ApplicationInfo(com.intellij.openapi.application.ApplicationInfo) ApplicationNamesInfo(com.intellij.openapi.application.ApplicationNamesInfo) FileUtil(com.intellij.openapi.util.io.FileUtil) Logger(com.intellij.openapi.diagnostic.Logger) Module(com.intellij.openapi.module.Module) ProjectRootManager(com.intellij.openapi.roots.ProjectRootManager) org.dartlang.analysis.server.protocol(org.dartlang.analysis.server.protocol) DebugPrintStream(com.google.dart.server.internal.remote.DebugPrintStream) DartSdkUpdateChecker(com.jetbrains.lang.dart.sdk.DartSdkUpdateChecker) RemoteAnalysisServerImpl(com.google.dart.server.internal.remote.RemoteAnalysisServerImpl) ProgressManager(com.intellij.openapi.progress.ProgressManager) DumbService(com.intellij.openapi.project.DumbService) QueueProcessor(com.intellij.util.concurrency.QueueProcessor) DartYamlFileTypeFactory(com.jetbrains.lang.dart.DartYamlFileTypeFactory) AnalysisServer(com.google.dart.server.generated.AnalysisServer) DartSdkUtil(com.jetbrains.lang.dart.sdk.DartSdkUtil) LocalFileSystem(com.intellij.openapi.vfs.LocalFileSystem) DartBundle(com.jetbrains.lang.dart.DartBundle) Nullable(org.jetbrains.annotations.Nullable) CountDownLatch(java.util.concurrent.CountDownLatch) ProgressIndicator(com.intellij.openapi.progress.ProgressIndicator) Contract(org.jetbrains.annotations.Contract) ServiceManager(com.intellij.openapi.components.ServiceManager) DartPubActionBase(com.jetbrains.lang.dart.ide.actions.DartPubActionBase) EditorFactory(com.intellij.openapi.editor.EditorFactory) ApplicationManager(com.intellij.openapi.application.ApplicationManager) Registry(com.intellij.openapi.util.registry.Registry) com.intellij.util(com.intellij.util) NotNull(org.jetbrains.annotations.NotNull) Ref(com.intellij.openapi.util.Ref) PsiFileSystemItem(com.intellij.psi.PsiFileSystemItem) Consumer(com.intellij.util.Consumer) DartFileListener(com.jetbrains.lang.dart.DartFileListener) com.google.dart.server(com.google.dart.server) DocumentListener(com.intellij.openapi.editor.event.DocumentListener) java.util(java.util) TObjectIntHashMap(gnu.trove.TObjectIntHashMap) ProjectFileIndex(com.intellij.openapi.roots.ProjectFileIndex) FilenameIndex(com.intellij.psi.search.FilenameIndex) StdioServerSocket(com.google.dart.server.internal.remote.StdioServerSocket) SearchScope(com.intellij.psi.search.SearchScope) ContainerUtil(com.intellij.util.containers.ContainerUtil) DartQuickAssistIntention(com.jetbrains.lang.dart.assists.DartQuickAssistIntention) FileEditorManager(com.intellij.openapi.fileEditor.FileEditorManager) Lists(com.google.common.collect.Lists) Comparing(com.intellij.openapi.util.Comparing) EvictingQueue(com.google.common.collect.EvictingQueue) IntentionManager(com.intellij.codeInsight.intention.IntentionManager) Project(com.intellij.openapi.project.Project) FileEditorManagerListener(com.intellij.openapi.fileEditor.FileEditorManagerListener) Uninterruptibles(com.google.common.util.concurrent.Uninterruptibles) DartSdkLibUtil(com.jetbrains.lang.dart.sdk.DartSdkLibUtil) StringUtil(com.intellij.openapi.util.text.StringUtil) FileDocumentManager(com.intellij.openapi.fileEditor.FileDocumentManager) Disposable(com.intellij.openapi.Disposable) File(java.io.File) DartFeedbackBuilder(com.jetbrains.lang.dart.ide.errorTreeView.DartFeedbackBuilder) TimeUnit(java.util.concurrent.TimeUnit) PubspecYamlUtil(com.jetbrains.lang.dart.util.PubspecYamlUtil) QuickAssistSet(com.jetbrains.lang.dart.assists.QuickAssistSet) Condition(com.intellij.openapi.util.Condition) QueueProcessor(com.intellij.util.concurrency.QueueProcessor) THashSet(gnu.trove.THashSet) DartSdk(com.jetbrains.lang.dart.sdk.DartSdk) ProjectFileIndex(com.intellij.openapi.roots.ProjectFileIndex) DartFileListener(com.jetbrains.lang.dart.DartFileListener) Library(com.intellij.openapi.roots.libraries.Library) Module(com.intellij.openapi.module.Module)

Aggregations

Condition (com.intellij.openapi.util.Condition)48 NotNull (org.jetbrains.annotations.NotNull)26 Nullable (org.jetbrains.annotations.Nullable)23 Project (com.intellij.openapi.project.Project)21 VirtualFile (com.intellij.openapi.vfs.VirtualFile)21 List (java.util.List)16 StringUtil (com.intellij.openapi.util.text.StringUtil)15 ContainerUtil (com.intellij.util.containers.ContainerUtil)14 javax.swing (javax.swing)13 PsiElement (com.intellij.psi.PsiElement)11 Module (com.intellij.openapi.module.Module)10 java.util (java.util)10 Logger (com.intellij.openapi.diagnostic.Logger)9 ApplicationManager (com.intellij.openapi.application.ApplicationManager)8 NonNls (org.jetbrains.annotations.NonNls)8 GlobalSearchScope (com.intellij.psi.search.GlobalSearchScope)7 Collection (java.util.Collection)7 ModalityState (com.intellij.openapi.application.ModalityState)6 Document (com.intellij.openapi.editor.Document)6 DialogWrapper (com.intellij.openapi.ui.DialogWrapper)6