diff --git a/.idea/libraries/Gradle.xml b/.idea/libraries/Gradle.xml index 5edf4faa43f1..35d271432636 100644 --- a/.idea/libraries/Gradle.xml +++ b/.idea/libraries/Gradle.xml @@ -1,31 +1,35 @@ - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + + \ No newline at end of file diff --git a/build/groovy/org/jetbrains/intellij/build/CommunityLibraryLicenses.groovy b/build/groovy/org/jetbrains/intellij/build/CommunityLibraryLicenses.groovy index c3f3e7d6b00b..f160c9cdab99 100644 --- a/build/groovy/org/jetbrains/intellij/build/CommunityLibraryLicenses.groovy +++ b/build/groovy/org/jetbrains/intellij/build/CommunityLibraryLicenses.groovy @@ -125,9 +125,9 @@ class CommunityLibraryLicenses { new LibraryLicense(name: "Gherkin", libraryName: "Gherkin", version: "2.12.2", license: "MIT", licenseUrl: "http://www.apache.org/licenses/LICENSE-2.0.txt", url: "https://github.com/cucumber/gherkin"), new LibraryLicense(name: "Google Feedback", libraryName: "GoogleFeedback.jar", version: "", license: "TBD"), - new LibraryLicense(name: "gradle-tooling-api-2.13.jar", version: "2.13", license: "Apache 2.0", url: "http://gradle.org/", + new LibraryLicense(name: "gradle-tooling-api-2.14.1.jar", version: "2.14.1", license: "Apache 2.0", url: "http://gradle.org/", licenseUrl: "http://gradle.org/license"), - new LibraryLicense(name: "Gradle", version: "2.13", license: "Apache 2.0", url: "http://gradle.org/", + new LibraryLicense(name: "Gradle", version: "2.14.1", license: "Apache 2.0", url: "http://gradle.org/", licenseUrl: "http://gradle.org/license"), new LibraryLicense(name: "GradleGuava", version: "14.0.1", license: "Apache 2.0", url: "http://code.google.com/p/guava-libraries/", licenseUrl: "http://apache.org/licenses/LICENSE-2.0"), diff --git a/build/scripts/download_jre.gant b/build/scripts/download_jre.gant index 227963c90c4e..b3b58bb65d60 100644 --- a/build/scripts/download_jre.gant +++ b/build/scripts/download_jre.gant @@ -24,6 +24,10 @@ target('default': 'Downloads custom JRE build from Teamcity server') { echo "Unsupported platform, JRE download skipped" return } + if (jreArchitecture == "disable") { + echo "JRE update disabled" + return + } if (!(jreArchitecture == "64" || jreArchitecture == "32" && platform == "win")) { echo "Acceptable architecture (32 or 64 bit) is not defined, JRE download skipped" return diff --git a/images/src/org/intellij/images/icons/ImagesFileType.png b/images/src/org/intellij/images/icons/ImagesFileType.png index 23d5bf71d79b..d11fc7b8f1dd 100644 Binary files a/images/src/org/intellij/images/icons/ImagesFileType.png and b/images/src/org/intellij/images/icons/ImagesFileType.png differ diff --git a/images/src/org/intellij/images/icons/ImagesFileType.svg b/images/src/org/intellij/images/icons/ImagesFileType.svg new file mode 100644 index 000000000000..b87954c95e9d --- /dev/null +++ b/images/src/org/intellij/images/icons/ImagesFileType.svg @@ -0,0 +1,9 @@ + + ImagesFileType + + + + + + + diff --git a/images/src/org/intellij/images/icons/ImagesFileType@2x.png b/images/src/org/intellij/images/icons/ImagesFileType@2x.png index 31eea0cfd6a4..d9ffaaf4d7f4 100644 Binary files a/images/src/org/intellij/images/icons/ImagesFileType@2x.png and b/images/src/org/intellij/images/icons/ImagesFileType@2x.png differ diff --git a/images/src/org/intellij/images/icons/ImagesFileType@2x.svg b/images/src/org/intellij/images/icons/ImagesFileType@2x.svg new file mode 100644 index 000000000000..485b919d4312 --- /dev/null +++ b/images/src/org/intellij/images/icons/ImagesFileType@2x.svg @@ -0,0 +1,9 @@ + + ImagesFileType@2x + + + + + + + diff --git a/java/compiler/impl/src/com/intellij/task/impl/InternalProjectTaskRunner.java b/java/compiler/impl/src/com/intellij/task/impl/InternalProjectTaskRunner.java index 646594e2d4f8..5aa4c074f6d2 100644 --- a/java/compiler/impl/src/com/intellij/task/impl/InternalProjectTaskRunner.java +++ b/java/compiler/impl/src/com/intellij/task/impl/InternalProjectTaskRunner.java @@ -22,6 +22,7 @@ import com.intellij.execution.runners.ExecutionEnvironment; import com.intellij.openapi.compiler.CompileScope; import com.intellij.openapi.compiler.CompileStatusNotification; import com.intellij.openapi.compiler.CompilerManager; +import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.module.Module; import com.intellij.openapi.project.Project; import com.intellij.openapi.vfs.VirtualFile; @@ -45,6 +46,8 @@ import java.util.stream.Stream; * @since 5/11/2016 */ public class InternalProjectTaskRunner extends ProjectTaskRunner { + private static final Logger LOG = Logger.getInstance(InternalProjectTaskRunner.class); + @Override public void run(@NotNull Project project, @NotNull ProjectTaskContext context, @@ -89,39 +92,60 @@ public class InternalProjectTaskRunner extends ProjectTaskRunner { if (!ContainerUtil.isEmpty(buildTasks)) { - List toMake = new SmartList<>(); - List toCompile = new SmartList<>(); + List modules = new SmartList<>(); + + Boolean isIncrementalBuild = null; + Boolean includeDependentModules = null; + Boolean includeRuntimeDependencies = null; for (ProjectTask buildProjectTask : buildTasks) { ModuleBuildTask moduleBuildTask = (ModuleBuildTask)buildProjectTask; - - if (moduleBuildTask.isIncrementalBuild()) { - toMake.add(moduleBuildTask.getModule()); + assertModuleBuildSettings(moduleBuildTask, isIncrementalBuild, includeDependentModules, includeRuntimeDependencies); + modules.add(moduleBuildTask.getModule()); + if (!moduleBuildTask.isIncrementalBuild()) { + isIncrementalBuild = false; } - else { - toCompile.add(moduleBuildTask.getModule()); + if (moduleBuildTask.isIncludeDependentModules()) { + includeDependentModules = true; + } + if (moduleBuildTask.isIncludeRuntimeDependencies()) { + includeRuntimeDependencies = true; } } CompilerManager compilerManager = CompilerManager.getInstance(project); - if (!toMake.isEmpty()) { - CompileScope scope = createScope(project, compilerManager, context, toMake); - // TODO handle multiple notifications + CompileScope scope = createScope( + compilerManager, context, modules, includeDependentModules != null, includeRuntimeDependencies != null); + if (isIncrementalBuild == null) { compilerManager.make(scope, compileNotification); } - if (!toCompile.isEmpty()) { - CompileScope scope = createScope(project, compilerManager, context, toCompile); - // TODO handle multiple notifications + else { compilerManager.compile(scope, compileNotification); } } } + private static void assertModuleBuildSettings(ModuleBuildTask moduleBuildTask, + Boolean isIncrementalBuild, + Boolean includeDependentModules, + Boolean includeRuntimeDependencies) { + if (isIncrementalBuild != null && moduleBuildTask.isIncrementalBuild()) { + LOG.warn("Incremental build setting for the module '" + moduleBuildTask.getModule().getName() + "' will be ignored"); + } + if (includeDependentModules != null && !moduleBuildTask.isIncludeDependentModules()) { + LOG.warn("'Module '" + moduleBuildTask.getModule().getName() + "' will be built along with dependent modules"); + } + if (includeRuntimeDependencies != null && !moduleBuildTask.isIncludeRuntimeDependencies()) { + LOG.warn("'Module '" + moduleBuildTask.getModule().getName() + "' will be built along with runtime dependencies"); + } + } - private static CompileScope createScope(Project project, - CompilerManager compilerManager, + private static CompileScope createScope(CompilerManager compilerManager, ProjectTaskContext context, - Collection modules) { - CompileScope scope = compilerManager.createModuleGroupCompileScope(project, modules.toArray(new Module[modules.size()]), true); + Collection modules, + boolean includeDependentModules, + boolean includeRuntimeDependencies) { + CompileScope scope = compilerManager.createModulesCompileScope( + modules.toArray(new Module[modules.size()]), includeDependentModules, includeRuntimeDependencies); RunConfiguration configuration = context.getRunConfiguration(); if (configuration != null) { scope.putUserData(CompilerManager.RUN_CONFIGURATION_KEY, configuration); diff --git a/java/compiler/impl/src/com/intellij/task/impl/ModuleBuildTaskImpl.java b/java/compiler/impl/src/com/intellij/task/impl/ModuleBuildTaskImpl.java index 6ae30a5512ef..49132691e61c 100644 --- a/java/compiler/impl/src/com/intellij/task/impl/ModuleBuildTaskImpl.java +++ b/java/compiler/impl/src/com/intellij/task/impl/ModuleBuildTaskImpl.java @@ -26,10 +26,21 @@ import org.jetbrains.annotations.NotNull; public class ModuleBuildTaskImpl extends AbstractBuildTask implements ModuleBuildTask { @NotNull private final Module myModule; + private final boolean myIncludeDependentModules; + private final boolean myIncludeRuntimeDependencies; public ModuleBuildTaskImpl(@NotNull Module module, boolean isIncrementalBuild) { + this(module, isIncrementalBuild, false, false); + } + + public ModuleBuildTaskImpl(@NotNull Module module, + boolean isIncrementalBuild, + boolean includeDependentModules, + boolean includeRuntimeDependencies) { super(isIncrementalBuild); myModule = module; + myIncludeDependentModules = includeDependentModules; + myIncludeRuntimeDependencies = includeRuntimeDependencies; } @NotNull @@ -38,6 +49,16 @@ public class ModuleBuildTaskImpl extends AbstractBuildTask implements ModuleBuil return myModule; } + @Override + public boolean isIncludeDependentModules() { + return myIncludeDependentModules; + } + + @Override + public boolean isIncludeRuntimeDependencies() { + return myIncludeRuntimeDependencies; + } + @NotNull @Override public String getPresentableName() { diff --git a/java/compiler/impl/src/com/intellij/task/impl/ProjectTaskManagerImpl.java b/java/compiler/impl/src/com/intellij/task/impl/ProjectTaskManagerImpl.java index 21eff5a8ff59..b370a4d22851 100644 --- a/java/compiler/impl/src/com/intellij/task/impl/ProjectTaskManagerImpl.java +++ b/java/compiler/impl/src/com/intellij/task/impl/ProjectTaskManagerImpl.java @@ -25,6 +25,7 @@ import com.intellij.packaging.artifacts.Artifact; import com.intellij.task.*; import com.intellij.util.Consumer; import com.intellij.util.SmartList; +import com.intellij.util.containers.ContainerUtil; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -50,12 +51,12 @@ public class ProjectTaskManagerImpl extends ProjectTaskManager { @Override public void build(@NotNull Module[] modules, @Nullable ProjectTaskNotification callback) { - run(createModulesBuildTask(true, modules), callback); + run(createModulesBuildTask(modules, true, true, false), callback); } @Override public void rebuild(@NotNull Module[] modules, @Nullable ProjectTaskNotification callback) { - run(createModulesBuildTask(false, modules), callback); + run(createModulesBuildTask(modules, false, false, false), callback); } @Override @@ -91,14 +92,26 @@ public class ProjectTaskManagerImpl extends ProjectTaskManager { @Override public ProjectTask createAllModulesBuildTask(boolean isIncrementalBuild, Project project) { - return createModulesBuildTask(isIncrementalBuild, ModuleManager.getInstance(project).getModules()); + return createModulesBuildTask(ModuleManager.getInstance(project).getModules(), isIncrementalBuild, false, false); } @Override - public ProjectTask createModulesBuildTask(boolean isIncrementalBuild, Module... modules) { + public ProjectTask createModulesBuildTask(Module module, + boolean isIncrementalBuild, + boolean includeDependentModules, + boolean includeRuntimeDependencies) { + return createModulesBuildTask(ContainerUtil.ar(module), isIncrementalBuild, includeDependentModules, includeRuntimeDependencies); + } + + @Override + public ProjectTask createModulesBuildTask(Module[] modules, + boolean isIncrementalBuild, + boolean includeDependentModules, + boolean includeRuntimeDependencies) { return modules.length == 1 - ? new ModuleBuildTaskImpl(modules[0], isIncrementalBuild) - : new ProjectTaskList(map(list(modules), module -> new ModuleBuildTaskImpl(module, isIncrementalBuild))); + ? new ModuleBuildTaskImpl(modules[0], isIncrementalBuild, includeDependentModules, includeRuntimeDependencies) + : new ProjectTaskList(map(list(modules), module -> + new ModuleBuildTaskImpl(module, isIncrementalBuild, includeDependentModules, includeRuntimeDependencies))); } @Override diff --git a/java/compiler/openapi/src/com/intellij/task/ModuleBuildTask.java b/java/compiler/openapi/src/com/intellij/task/ModuleBuildTask.java index ad08c7d474f1..c0e74d10454d 100644 --- a/java/compiler/openapi/src/com/intellij/task/ModuleBuildTask.java +++ b/java/compiler/openapi/src/com/intellij/task/ModuleBuildTask.java @@ -25,4 +25,8 @@ import org.jetbrains.annotations.NotNull; public interface ModuleBuildTask extends BuildTask { @NotNull Module getModule(); + + boolean isIncludeDependentModules(); + + boolean isIncludeRuntimeDependencies(); } diff --git a/java/compiler/openapi/src/com/intellij/task/ProjectTaskManager.java b/java/compiler/openapi/src/com/intellij/task/ProjectTaskManager.java index fe3d8474f128..46570c3911de 100644 --- a/java/compiler/openapi/src/com/intellij/task/ProjectTaskManager.java +++ b/java/compiler/openapi/src/com/intellij/task/ProjectTaskManager.java @@ -91,7 +91,15 @@ public abstract class ProjectTaskManager { public abstract ProjectTask createAllModulesBuildTask(boolean isIncrementalBuild, Project project); - public abstract ProjectTask createModulesBuildTask(boolean isIncrementalBuild, Module... modules); + public abstract ProjectTask createModulesBuildTask(Module module, + boolean isIncrementalBuild, + boolean includeDependentModules, + boolean includeRuntimeDependencies); + + public abstract ProjectTask createModulesBuildTask(Module[] modules, + boolean isIncrementalBuild, + boolean includeDependentModules, + boolean includeRuntimeDependencies); public abstract ProjectTask createArtifactsBuildTask(boolean isIncrementalBuild, Artifact... artifacts); diff --git a/java/execution/impl/src/com/intellij/compiler/options/CompileStepBeforeRun.java b/java/execution/impl/src/com/intellij/compiler/options/CompileStepBeforeRun.java index 6aaf886ef996..96d42d2aaf75 100644 --- a/java/execution/impl/src/com/intellij/compiler/options/CompileStepBeforeRun.java +++ b/java/execution/impl/src/com/intellij/compiler/options/CompileStepBeforeRun.java @@ -164,7 +164,7 @@ public class CompileStepBeforeRun extends BeforeRunTaskProvider myInTypeReferences; private Set myInstanceReferences; private List myClassExporters; + private RefModule myRefModule; RefClassImpl(PsiClass psiClass, RefManager manager) { super(psiClass, manager); + myRefModule = manager.getRefModule(ModuleUtilCore.findModuleForPsiElement(psiClass)); } @Override @@ -226,6 +228,12 @@ public class RefClassImpl extends RefJavaElementImpl implements RefClass { return (PsiClass)super.getElement(); } + @Nullable + @Override + public RefModule getModule() { + return myRefModule; + } + private static boolean isSelfInheritor(PsiClass psiClass, ArrayList visited) { if (visited.contains(psiClass)) return true; diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/reference/RefImplicitConstructorImpl.java b/java/java-analysis-impl/src/com/intellij/codeInspection/reference/RefImplicitConstructorImpl.java index 1783d36d0a0b..80af5c532a9a 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/reference/RefImplicitConstructorImpl.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/reference/RefImplicitConstructorImpl.java @@ -34,8 +34,10 @@ import org.jetbrains.annotations.Nullable; public class RefImplicitConstructorImpl extends RefMethodImpl implements RefImplicitConstructor { + private final RefClass myOwnerClass; RefImplicitConstructorImpl(@NotNull RefClass ownerClass) { super(InspectionsBundle.message("inspection.reference.implicit.constructor.name", ownerClass.getName()), ownerClass); + myOwnerClass = ownerClass; } @Override diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/reference/RefMethodImpl.java b/java/java-analysis-impl/src/com/intellij/codeInspection/reference/RefMethodImpl.java index 701f97358019..88e3a763927b 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/reference/RefMethodImpl.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/reference/RefMethodImpl.java @@ -57,24 +57,20 @@ public class RefMethodImpl extends RefJavaElementImpl implements RefMethod { private RefParameter[] myParameters; private String myReturnValueTemplate; - protected final RefClass myOwnerClass; RefMethodImpl(@NotNull RefClass ownerClass, PsiMethod method, RefManager manager) { super(method, manager); ((RefClassImpl)ownerClass).add(this); - - myOwnerClass = ownerClass; } // To be used only from RefImplicitConstructor. protected RefMethodImpl(@NotNull String name, @NotNull RefClass ownerClass) { super(name, ownerClass); - myOwnerClass = ownerClass; ((RefClassImpl)ownerClass).add(this); - addOutReference(getOwnerClass()); - ((RefClassImpl)getOwnerClass()).addInReference(this); + addOutReference(ownerClass); + ((RefClassImpl)ownerClass).addInReference(this); setConstructor(true); } diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/sameParameterValue/SameParameterValueInspectionBase.java b/java/java-analysis-impl/src/com/intellij/codeInspection/sameParameterValue/SameParameterValueInspectionBase.java index f5a46f1734a0..7a0ade4c627a 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/sameParameterValue/SameParameterValueInspectionBase.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/sameParameterValue/SameParameterValueInspectionBase.java @@ -24,6 +24,7 @@ import com.intellij.codeInspection.reference.*; import com.intellij.openapi.progress.EmptyProgressIndicator; import com.intellij.profile.codeInspection.InspectionProjectProfileManager; import com.intellij.psi.*; +import com.intellij.util.ObjectUtils; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -246,7 +247,7 @@ public class SameParameterValueInspectionBase extends GlobalJavaBatchInspectionT PsiParameter parameter, String value) { final String name = parameter.getName(); - return manager.createProblemDescriptor(parameter, + return manager.createProblemDescriptor(ObjectUtils.notNull(parameter.getNameIdentifier(), parameter), InspectionsBundle.message("inspection.same.parameter.problem.descriptor", "" + name + "", "" + value + ""), diff --git a/java/java-analysis-impl/src/com/intellij/refactoring/util/duplicates/DuplicatesFinder.java b/java/java-analysis-impl/src/com/intellij/refactoring/util/duplicates/DuplicatesFinder.java index 539075b5fd12..ded7d252ae48 100644 --- a/java/java-analysis-impl/src/com/intellij/refactoring/util/duplicates/DuplicatesFinder.java +++ b/java/java-analysis-impl/src/com/intellij/refactoring/util/duplicates/DuplicatesFinder.java @@ -401,12 +401,10 @@ public class DuplicatesFinder { final PsiType type1 = ((PsiNewExpression)pattern).getType(); final PsiType type2 = ((PsiNewExpression)candidate).getType(); if (type1 == null || type2 == null) return false; - final PsiJavaCodeReferenceElement classReference1 = ((PsiNewExpression)pattern).getClassReference(); - final PsiJavaCodeReferenceElement classReference2 = ((PsiNewExpression)candidate).getClassReference(); - if (classReference1 != null && classReference2 != null) { - final PsiElement resolved1 = classReference1.resolve(); - final PsiElement resolved2 = classReference2.resolve(); - if (!pattern.getManager().areElementsEquivalent(resolved1, resolved2)) return false; + final PsiMethod constructor1 = ((PsiNewExpression)pattern).resolveConstructor(); + final PsiMethod constructor2 = ((PsiNewExpression)candidate).resolveConstructor(); + if (constructor1 != null && constructor2 != null) { + if (!pattern.getManager().areElementsEquivalent(constructor1, constructor2)) return false; } else { if (!canTypesBeEquivalent(type1, type2)) return false; diff --git a/java/java-impl/src/com/intellij/codeInsight/daemon/impl/ParameterNameHintsManager.java b/java/java-impl/src/com/intellij/codeInsight/daemon/impl/ParameterNameHintsManager.java index ed494a786136..6cfe9cd1593d 100644 --- a/java/java-impl/src/com/intellij/codeInsight/daemon/impl/ParameterNameHintsManager.java +++ b/java/java-impl/src/com/intellij/codeInsight/daemon/impl/ParameterNameHintsManager.java @@ -15,7 +15,8 @@ */ package com.intellij.codeInsight.daemon.impl; -import com.intellij.openapi.util.Couple; +import com.intellij.codeInsight.hints.filtering.Matcher; +import com.intellij.codeInsight.hints.filtering.MatcherConstructor; import com.intellij.psi.*; import com.intellij.psi.tree.IElementType; import com.intellij.psi.util.TypeConversionUtil; @@ -26,22 +27,25 @@ import org.jetbrains.annotations.Nullable; import java.util.Collections; import java.util.List; import java.util.Set; +import java.util.stream.Collectors; +import java.util.stream.Stream; -import static com.intellij.openapi.util.text.StringUtil.containsIgnoreCase; import static com.intellij.psi.CommonClassNames.JAVA_LANG_STRING; public class ParameterNameHintsManager { - private static final List> COMMONLY_USED_PARAMETER_PAIR = ContainerUtil.newArrayList( - Couple.of("begin", "end"), - Couple.of("start", "end"), - Couple.of("first", "last"), - Couple.of("first", "second"), - Couple.of("from", "to"), - Couple.of("key", "value"), - Couple.of("min", "max"), - Couple.of("format", "arg") - ); - + + private static List MATCHERS = Stream.of( + "(begin*, end*)", + "(start*, end*)", + "(first*, last*)", + "(first*, second*)", + "(from*, to*)", + "(min*, max*)", + "(key, value)", + "(format, arg)" + ).map((s) -> MatcherConstructor.INSTANCE.createMatcher(s)) + .collect(Collectors.toList()); + private static final Set COMMON_METHOD_NAMES = ContainerUtil.newHashSet("set", "print", "println"); @NotNull @@ -173,7 +177,7 @@ public class ParameterNameHintsManager { final int totalDescriptors = descriptors.size(); if (totalDescriptors == 1 && shouldIgnoreSingleHint(parameters, descriptors) - || totalDescriptors == 2 && parameters.length == 2 && isParamPairToIgnore(descriptors.get(0), descriptors.get(1))) + || totalDescriptors == 2 && parameters.length == 2 && isParamPairToIgnore(descriptors)) { return ContainerUtil.emptyList(); } @@ -206,18 +210,13 @@ public class ParameterNameHintsManager { return new InlayInfo(paramName, callArgument.getTextRange().getStartOffset(), callArgument); } - private static boolean isParamPairToIgnore(InlayInfo first, InlayInfo second) { - String firstParamName = first.getText(); - String secondParamName = second.getText(); + private static boolean isParamPairToIgnore(List descriptors) { + List params = descriptors + .stream() + .map((e) -> e.getText()) + .collect(Collectors.toList()); - for (Couple knownPair : COMMONLY_USED_PARAMETER_PAIR) { - if (containsIgnoreCase(firstParamName, knownPair.first) - && containsIgnoreCase(secondParamName, knownPair.second)) { - return true; - } - } - - return false; + return MATCHERS.stream().anyMatch((e) -> e.isMatching("", params)); } private static boolean shouldInlineParameterName(@NotNull PsiExpression argument, diff --git a/java/java-impl/src/com/intellij/codeInspection/streamMigration/MigrateToStreamFix.java b/java/java-impl/src/com/intellij/codeInspection/streamMigration/MigrateToStreamFix.java index aeb404a75230..2bdbe16a8973 100644 --- a/java/java-impl/src/com/intellij/codeInspection/streamMigration/MigrateToStreamFix.java +++ b/java/java-impl/src/com/intellij/codeInspection/streamMigration/MigrateToStreamFix.java @@ -19,18 +19,16 @@ import com.intellij.codeInsight.FileModificationService; import com.intellij.codeInspection.LambdaCanBeMethodReferenceInspection; import com.intellij.codeInspection.LocalQuickFix; import com.intellij.codeInspection.ProblemDescriptor; -import com.intellij.codeInspection.streamMigration.StreamApiMigrationInspection.InitializerUsageStatus; -import com.intellij.codeInspection.streamMigration.StreamApiMigrationInspection.Operation; -import com.intellij.codeInspection.streamMigration.StreamApiMigrationInspection.TerminalBlock; +import com.intellij.codeInspection.streamMigration.StreamApiMigrationInspection.*; import com.intellij.openapi.project.Project; import com.intellij.psi.*; import com.intellij.psi.codeStyle.CodeStyleManager; import com.intellij.psi.codeStyle.JavaCodeStyleManager; +import com.intellij.psi.controlFlow.*; import com.intellij.psi.util.PsiTreeUtil; import com.siyeh.ig.psiutils.ExpressionUtils; import one.util.streamex.StreamEx; import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; import java.util.List; import java.util.ListIterator; @@ -49,65 +47,61 @@ abstract class MigrateToStreamFix implements LocalQuickFix { @Override public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) { PsiElement element = descriptor.getPsiElement(); - if (element instanceof PsiForeachStatement) { - PsiForeachStatement foreachStatement = (PsiForeachStatement)element; - PsiStatement body = foreachStatement.getBody(); - final PsiExpression iteratedValue = foreachStatement.getIteratedValue(); - if (body != null && iteratedValue != null) { - final PsiParameter parameter = foreachStatement.getIterationParameter(); - TerminalBlock tb = TerminalBlock.from(parameter, body); - if (!FileModificationService.getInstance().preparePsiElementForWrite(foreachStatement)) return; - PsiElement result = migrate(project, descriptor, foreachStatement, iteratedValue, body, tb); - if(result != null) { - simplifyAndFormat(project, result); - } + if (element instanceof PsiLoopStatement) { + PsiLoopStatement loopStatement = (PsiLoopStatement)element; + StreamSource source = StreamSource.tryCreate(loopStatement); + PsiStatement body = loopStatement.getBody(); + if(body == null || source == null) return; + TerminalBlock tb = TerminalBlock.from(source, body); + if (!FileModificationService.getInstance().preparePsiElementForWrite(loopStatement)) return; + PsiElement result = migrate(project, loopStatement, body, tb); + if(result != null) { + simplifyAndFormat(project, result); } } } abstract PsiElement migrate(@NotNull Project project, - @NotNull ProblemDescriptor descriptor, - @NotNull PsiForeachStatement foreachStatement, - @NotNull PsiExpression iteratedValue, - @NotNull PsiStatement body, - @NotNull TerminalBlock tb); + @NotNull PsiLoopStatement loopStatement, + @NotNull PsiStatement body, + @NotNull TerminalBlock tb); static PsiElement replaceWithNumericAddition(@NotNull Project project, - PsiForeachStatement foreachStatement, + PsiLoopStatement loopStatement, PsiVariable var, StringBuilder builder, PsiType expressionType) { PsiElementFactory elementFactory = JavaPsiFacade.getElementFactory(project); - restoreComments(foreachStatement, foreachStatement.getBody()); - InitializerUsageStatus status = StreamApiMigrationInspection.getInitializerUsageStatus(var, foreachStatement); + restoreComments(loopStatement, loopStatement.getBody()); + InitializerUsageStatus status = StreamApiMigrationInspection.getInitializerUsageStatus(var, loopStatement); if (status != InitializerUsageStatus.UNKNOWN) { PsiExpression initializer = var.getInitializer(); if (ExpressionUtils.isZero(initializer)) { PsiType type = var.getType(); String replacement = (type.equals(expressionType) ? "" : "(" + type.getCanonicalText() + ") ") + builder; - return replaceInitializer(foreachStatement, var, initializer, replacement, status); + return replaceInitializer(loopStatement, var, initializer, replacement, status); } } - return foreachStatement.replace(elementFactory.createStatementFromText(var.getName() + "+=" + builder + ";", foreachStatement)); + return loopStatement.replace(elementFactory.createStatementFromText(var.getName() + "+=" + builder + ";", loopStatement)); } - static PsiElement replaceInitializer(PsiForeachStatement foreachStatement, + static PsiElement replaceInitializer(PsiLoopStatement loopStatement, PsiVariable var, PsiExpression initializer, String replacement, InitializerUsageStatus status) { - Project project = foreachStatement.getProject(); + Project project = loopStatement.getProject(); PsiElementFactory elementFactory = JavaPsiFacade.getElementFactory(project); if(status == InitializerUsageStatus.DECLARED_JUST_BEFORE) { - initializer.replace(elementFactory.createExpressionFromText(replacement, foreachStatement)); - removeLoop(foreachStatement); + initializer.replace(elementFactory.createExpressionFromText(replacement, loopStatement)); + removeLoop(loopStatement); return var; } else { if(status == InitializerUsageStatus.AT_WANTED_PLACE_ONLY) { initializer.delete(); } return - foreachStatement.replace(elementFactory.createStatementFromText(var.getName() + " = " + replacement + ";", foreachStatement)); + loopStatement.replace(elementFactory.createStatementFromText(var.getName() + " = " + replacement + ";", loopStatement)); } } @@ -117,34 +111,26 @@ abstract class MigrateToStreamFix implements LocalQuickFix { CodeStyleManager.getInstance(project).reformat(JavaCodeStyleManager.getInstance(project).shortenClassReferences(result)); } - static void restoreComments(PsiForeachStatement foreachStatement, PsiStatement body) { - final PsiElement parent = foreachStatement.getParent(); + static void restoreComments(PsiLoopStatement loopStatement, PsiStatement body) { + final PsiElement parent = loopStatement.getParent(); for (PsiElement comment : PsiTreeUtil.findChildrenOfType(body, PsiComment.class)) { - parent.addBefore(comment, foreachStatement); + parent.addBefore(comment, loopStatement); } } @NotNull - static StringBuilder generateStream(PsiExpression iteratedValue, @Nullable Operation lastOperation) { - return generateStream(iteratedValue, lastOperation, false); + static StringBuilder generateStream(@NotNull Operation lastOperation) { + return generateStream(lastOperation, false); } @NotNull - static StringBuilder generateStream(PsiExpression iteratedValue, @Nullable Operation lastOperation, boolean noStreamForEmpty) { + static StringBuilder generateStream(@NotNull Operation lastOperation, boolean noStreamForEmpty) { StringBuilder buffer = new StringBuilder(); - final PsiType iteratedValueType = iteratedValue.getType(); - if (iteratedValueType instanceof PsiArrayType) { - buffer.append("java.util.Arrays.stream(").append(iteratedValue.getText()).append(")"); + if(noStreamForEmpty && lastOperation instanceof CollectionStream) { + return buffer.append(lastOperation.getExpression().getText()); } - else { - buffer.append(getIteratedValueText(iteratedValue)); - if (!noStreamForEmpty || lastOperation != null) { - buffer.append(".stream()"); - } - } - PsiElementFactory factory = JavaPsiFacade.getElementFactory(iteratedValue.getProject()); List replacements = - StreamEx.iterate(lastOperation, Objects::nonNull, Operation::getPreviousOp).map(op -> op.createReplacement(factory)).toList(); + StreamEx.iterate(lastOperation, Objects::nonNull, Operation::getPreviousOp).map(Operation::createReplacement).toList(); for(ListIterator it = replacements.listIterator(replacements.size()); it.hasPrevious(); ) { buffer.append(it.previous()); } @@ -158,7 +144,7 @@ abstract class MigrateToStreamFix implements LocalQuickFix { iteratedValue instanceof PsiParenthesizedExpression ? iteratedValue.getText() : "(" + iteratedValue.getText() + ")"; } - static void removeLoop(@NotNull PsiForeachStatement statement) { + static void removeLoop(@NotNull PsiLoopStatement statement) { PsiElement parent = statement.getParent(); if (parent instanceof PsiLabeledStatement) { parent.delete(); @@ -167,4 +153,16 @@ abstract class MigrateToStreamFix implements LocalQuickFix { statement.delete(); } } + + static boolean isReachable(PsiReturnStatement target) { + ControlFlow flow; + try { + flow = ControlFlowFactory.getInstance(target.getProject()) + .getControlFlow(target.getParent(), LocalsOrMyInstanceFieldsControlFlowPolicy.getInstance()); + } + catch (AnalysisCanceledException e) { + return true; + } + return ControlFlowUtil.isInstructionReachable(flow, flow.getStartOffset(target), 0); + } } diff --git a/java/java-impl/src/com/intellij/codeInspection/streamMigration/ReplaceWithCollectFix.java b/java/java-impl/src/com/intellij/codeInspection/streamMigration/ReplaceWithCollectFix.java index 4dd8e7c06070..74c85641b701 100644 --- a/java/java-impl/src/com/intellij/codeInspection/streamMigration/ReplaceWithCollectFix.java +++ b/java/java-impl/src/com/intellij/codeInspection/streamMigration/ReplaceWithCollectFix.java @@ -15,8 +15,8 @@ */ package com.intellij.codeInspection.streamMigration; -import com.intellij.codeInspection.ProblemDescriptor; import com.intellij.codeInspection.streamMigration.StreamApiMigrationInspection.InitializerUsageStatus; +import com.intellij.codeInspection.streamMigration.StreamApiMigrationInspection.MapOp; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.text.StringUtil; @@ -58,42 +58,41 @@ class ReplaceWithCollectFix extends MigrateToStreamFix { @Override PsiElement migrate(@NotNull Project project, - @NotNull ProblemDescriptor descriptor, - @NotNull PsiForeachStatement foreachStatement, - @NotNull PsiExpression iteratedValue, - @NotNull PsiStatement body, - @NotNull StreamApiMigrationInspection.TerminalBlock tb) { + @NotNull PsiLoopStatement loopStatement, + @NotNull PsiStatement body, + @NotNull StreamApiMigrationInspection.TerminalBlock tb) { final PsiElementFactory elementFactory = JavaPsiFacade.getElementFactory(project); - final PsiType iteratedValueType = iteratedValue.getType(); final PsiMethodCallExpression methodCallExpression = tb.getSingleMethodCall(); if (methodCallExpression == null) return null; - restoreComments(foreachStatement, body); - if (!tb.hasOperations() && StreamApiMigrationInspection.isAddAllCall(tb)) { + restoreComments(loopStatement, body); + if (!tb.hasOperations() && StreamApiMigrationInspection.isAddAllCall(tb) && loopStatement instanceof PsiForeachStatement) { + PsiExpression iteratedValue = ((PsiForeachStatement)loopStatement).getIteratedValue(); + if (iteratedValue == null) return null; + final PsiType iteratedValueType = iteratedValue.getType(); final PsiExpression qualifierExpression = methodCallExpression.getMethodExpression().getQualifierExpression(); final String qualifierText = qualifierExpression != null ? qualifierExpression.getText() : ""; final String collectionText = iteratedValueType instanceof PsiArrayType ? "java.util.Arrays.asList(" + iteratedValue.getText() + ")" : getIteratedValueText(iteratedValue); final String callText = StringUtil.getQualifiedName(qualifierText, "addAll(" + collectionText + ");"); - return foreachStatement.replace(elementFactory.createStatementFromText(callText, foreachStatement)); + return loopStatement.replace(elementFactory.createStatementFromText(callText, loopStatement)); } PsiExpression itemToAdd = methodCallExpression.getArgumentList().getExpressions()[0]; PsiType addedType = getAddedElementType(methodCallExpression); if (addedType == null) addedType = itemToAdd.getType(); - final StringBuilder builder = - generateStream(iteratedValue, new StreamApiMigrationInspection.MapOp(tb.getLastOperation(), itemToAdd, tb.getVariable(), addedType)); + StringBuilder builder = generateStream(new MapOp(tb.getLastOperation(), itemToAdd, tb.getVariable(), addedType)); final PsiExpression qualifierExpression = methodCallExpression.getMethodExpression().getQualifierExpression(); final PsiLocalVariable variable = StreamApiMigrationInspection.extractCollectionVariable(qualifierExpression); if (variable != null) { - InitializerUsageStatus status = StreamApiMigrationInspection.getInitializerUsageStatus(variable, foreachStatement); + InitializerUsageStatus status = StreamApiMigrationInspection.getInitializerUsageStatus(variable, loopStatement); if(status != InitializerUsageStatus.UNKNOWN) { PsiExpression initializer = variable.getInitializer(); LOG.assertTrue(initializer != null); PsiMethodCallExpression toArrayExpression = - StreamApiMigrationInspection.extractToArrayExpression(foreachStatement, methodCallExpression); + StreamApiMigrationInspection.extractToArrayExpression(loopStatement, methodCallExpression); if(toArrayExpression != null) { PsiType type = initializer.getType(); if(type instanceof PsiClassType) { @@ -113,7 +112,7 @@ class ReplaceWithCollectFix extends MigrateToStreamFix { } PsiElement result = toArrayExpression.replace(elementFactory.createExpressionFromText(builder.toString(), toArrayExpression)); - removeLoop(foreachStatement); + removeLoop(loopStatement); if(status != InitializerUsageStatus.AT_WANTED_PLACE) { variable.delete(); } @@ -121,7 +120,7 @@ class ReplaceWithCollectFix extends MigrateToStreamFix { } } } - PsiElement nextStatement = PsiTreeUtil.skipSiblingsForward(foreachStatement, PsiComment.class, PsiWhiteSpace.class); + PsiElement nextStatement = PsiTreeUtil.skipSiblingsForward(loopStatement, PsiComment.class, PsiWhiteSpace.class); String comparatorText = StreamApiMigrationInspection.tryExtractSortComparatorText(nextStatement, variable); if(comparatorText != null) { builder.append(".sorted(").append(comparatorText).append(")"); @@ -130,7 +129,7 @@ class ReplaceWithCollectFix extends MigrateToStreamFix { String callText = builder.append(".collect(java.util.stream.Collectors.") .append(createInitializerReplacementText(qualifierExpression.getType(), initializer)) .append(")").toString(); - return replaceInitializer(foreachStatement, variable, initializer, callText, status); + return replaceInitializer(loopStatement, variable, initializer, callText, status); } } final String qualifierText = qualifierExpression != null ? qualifierExpression.getText() + "." : ""; @@ -147,7 +146,7 @@ class ReplaceWithCollectFix extends MigrateToStreamFix { elementFactory.createExpressionFromText(qualifierText + "add(" + varName + ")", qualifierExpression); final String callText = builder.append(".forEach(").append(varName).append("->").append(forEachBody.getText()).append(");").toString(); - return foreachStatement.replace(elementFactory.createStatementFromText(callText, foreachStatement)); + return loopStatement.replace(elementFactory.createStatementFromText(callText, loopStatement)); } private static String createInitializerReplacementText(PsiType varType, PsiExpression initializer) { diff --git a/java/java-impl/src/com/intellij/codeInspection/streamMigration/ReplaceWithCountFix.java b/java/java-impl/src/com/intellij/codeInspection/streamMigration/ReplaceWithCountFix.java index 836aa8b629b8..137630e080de 100644 --- a/java/java-impl/src/com/intellij/codeInspection/streamMigration/ReplaceWithCountFix.java +++ b/java/java-impl/src/com/intellij/codeInspection/streamMigration/ReplaceWithCountFix.java @@ -15,7 +15,6 @@ */ package com.intellij.codeInspection.streamMigration; -import com.intellij.codeInspection.ProblemDescriptor; import com.intellij.openapi.project.Project; import com.intellij.psi.*; import org.jetbrains.annotations.NotNull; @@ -33,18 +32,15 @@ class ReplaceWithCountFix extends MigrateToStreamFix { @Override PsiElement migrate(@NotNull Project project, - @NotNull ProblemDescriptor descriptor, - @NotNull PsiForeachStatement foreachStatement, - @NotNull PsiExpression iteratedValue, - @NotNull PsiStatement body, - @NotNull StreamApiMigrationInspection.TerminalBlock tb) { + @NotNull PsiLoopStatement loopStatement, + @NotNull PsiStatement body, + @NotNull StreamApiMigrationInspection.TerminalBlock tb) { PsiExpression operand = StreamApiMigrationInspection.extractIncrementedLValue(tb.getSingleExpression(PsiExpression.class)); if (!(operand instanceof PsiReferenceExpression)) return null; PsiElement element = ((PsiReferenceExpression)operand).resolve(); if (!(element instanceof PsiLocalVariable)) return null; PsiLocalVariable var = (PsiLocalVariable)element; - final StringBuilder builder = generateStream(iteratedValue, tb.getLastOperation()); - builder.append(".count()"); - return replaceWithNumericAddition(project, foreachStatement, var, builder, PsiType.LONG); + StringBuilder builder = generateStream(tb.getLastOperation()).append(".count()"); + return replaceWithNumericAddition(project, loopStatement, var, builder, PsiType.LONG); } } diff --git a/java/java-impl/src/com/intellij/codeInspection/streamMigration/ReplaceWithFindFirstFix.java b/java/java-impl/src/com/intellij/codeInspection/streamMigration/ReplaceWithFindFirstFix.java index 68fcfca7a556..2a60250cc194 100644 --- a/java/java-impl/src/com/intellij/codeInspection/streamMigration/ReplaceWithFindFirstFix.java +++ b/java/java-impl/src/com/intellij/codeInspection/streamMigration/ReplaceWithFindFirstFix.java @@ -16,10 +16,10 @@ package com.intellij.codeInspection.streamMigration; import com.intellij.codeInsight.PsiEquivalenceUtil; -import com.intellij.codeInspection.ProblemDescriptor; import com.intellij.codeInspection.streamMigration.StreamApiMigrationInspection.InitializerUsageStatus; import com.intellij.openapi.project.Project; import com.intellij.psi.*; +import com.intellij.psi.util.PsiTreeUtil; import com.intellij.refactoring.util.RefactoringUtil; import com.siyeh.ig.psiutils.ExpressionUtils; import org.jetbrains.annotations.NotNull; @@ -36,28 +36,29 @@ class ReplaceWithFindFirstFix extends MigrateToStreamFix { @Override PsiElement migrate(@NotNull Project project, - @NotNull ProblemDescriptor descriptor, - @NotNull PsiForeachStatement foreachStatement, - @NotNull PsiExpression iteratedValue, - @NotNull PsiStatement body, - @NotNull StreamApiMigrationInspection.TerminalBlock tb) { + @NotNull PsiLoopStatement loopStatement, + @NotNull PsiStatement body, + @NotNull StreamApiMigrationInspection.TerminalBlock tb) { PsiStatement statement = tb.getSingleStatement(); PsiElementFactory elementFactory = JavaPsiFacade.getElementFactory(project); - String stream = generateStream(iteratedValue, tb.getLastOperation()).append(".findFirst()").toString(); + StringBuilder builder = generateStream(tb.getLastOperation()); + String stream = builder.append(".findFirst()").toString(); if (statement instanceof PsiReturnStatement) { PsiReturnStatement returnStatement = (PsiReturnStatement)statement; PsiExpression value = returnStatement.getReturnValue(); if (value == null) return null; - PsiReturnStatement nextReturnStatement = StreamApiMigrationInspection.getNextReturnStatement(foreachStatement); + PsiReturnStatement nextReturnStatement = StreamApiMigrationInspection.getNextReturnStatement(loopStatement); if (nextReturnStatement == null) return null; PsiExpression orElseExpression = nextReturnStatement.getReturnValue(); if (!ExpressionUtils.isSimpleExpression(orElseExpression)) return null; stream = generateOptionalUnwrap(stream, tb, value, orElseExpression, null); - restoreComments(foreachStatement, body); - if (nextReturnStatement.getParent() == foreachStatement.getParent()) { + restoreComments(loopStatement, body); + boolean sibling = nextReturnStatement.getParent() == loopStatement.getParent(); + PsiElement replacement = loopStatement.replace(elementFactory.createStatementFromText("return " + stream + ";", loopStatement)); + if(sibling || !isReachable(nextReturnStatement)) { nextReturnStatement.delete(); } - return foreachStatement.replace(elementFactory.createStatementFromText("return " + stream + ";", foreachStatement)); + return replacement; } else { PsiStatement[] statements = tb.getStatements(); @@ -66,9 +67,9 @@ class ReplaceWithFindFirstFix extends MigrateToStreamFix { if (assignment == null) { if(!(statements[0] instanceof PsiExpressionStatement)) return null; PsiExpression expression = ((PsiExpressionStatement)statements[0]).getExpression(); - restoreComments(foreachStatement, body); - return foreachStatement.replace(elementFactory.createStatementFromText( - stream + ".ifPresent(" + LambdaUtil.createLambda(tb.getVariable(), expression) + ");", foreachStatement)); + restoreComments(loopStatement, body); + return loopStatement.replace(elementFactory.createStatementFromText( + stream + ".ifPresent(" + LambdaUtil.createLambda(tb.getVariable(), expression) + ");", loopStatement)); } PsiExpression lValue = assignment.getLExpression(); if (!(lValue instanceof PsiReferenceExpression)) return null; @@ -77,17 +78,28 @@ class ReplaceWithFindFirstFix extends MigrateToStreamFix { PsiVariable var = (PsiVariable)element; PsiExpression value = assignment.getRExpression(); if (value == null) return null; - restoreComments(foreachStatement, body); - InitializerUsageStatus status = StreamApiMigrationInspection.getInitializerUsageStatus(var, foreachStatement); + restoreComments(loopStatement, body); + InitializerUsageStatus status = StreamApiMigrationInspection.getInitializerUsageStatus(var, loopStatement); if (status != InitializerUsageStatus.UNKNOWN) { PsiExpression initializer = var.getInitializer(); if (initializer != null) { String replacementText = generateOptionalUnwrap(stream, tb, value, initializer, var.getType()); - return replaceInitializer(foreachStatement, var, initializer, replacementText, status); + return replaceInitializer(loopStatement, var, initializer, replacementText, status); } } - return foreachStatement.replace(elementFactory.createStatementFromText( - var.getName() + " = " + generateOptionalUnwrap(stream, tb, value, lValue, var.getType()) + ";", foreachStatement)); + PsiAssignmentExpression previousAssignment = + ExpressionUtils.getAssignment(PsiTreeUtil.skipSiblingsBackward(loopStatement, PsiWhiteSpace.class, PsiComment.class)); + if(previousAssignment != null) { + PsiExpression prevRValue = previousAssignment.getRExpression(); + PsiExpression prevLValue = previousAssignment.getLExpression(); + if(prevRValue != null && prevLValue instanceof PsiReferenceExpression && ((PsiReferenceExpression)prevLValue).resolve() == var) { + previousAssignment.delete(); + return loopStatement.replace(elementFactory.createStatementFromText( + var.getName() + " = " + generateOptionalUnwrap(stream, tb, value, prevRValue, var.getType()) + ";", loopStatement)); + } + } + return loopStatement.replace(elementFactory.createStatementFromText( + var.getName() + " = " + generateOptionalUnwrap(stream, tb, value, lValue, var.getType()) + ";", loopStatement)); } } diff --git a/java/java-impl/src/com/intellij/codeInspection/streamMigration/ReplaceWithForeachCallFix.java b/java/java-impl/src/com/intellij/codeInspection/streamMigration/ReplaceWithForeachCallFix.java index 6abacc64aa3e..becd6fd93e57 100644 --- a/java/java-impl/src/com/intellij/codeInspection/streamMigration/ReplaceWithForeachCallFix.java +++ b/java/java-impl/src/com/intellij/codeInspection/streamMigration/ReplaceWithForeachCallFix.java @@ -15,7 +15,6 @@ */ package com.intellij.codeInspection.streamMigration; -import com.intellij.codeInspection.ProblemDescriptor; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.project.Project; import com.intellij.psi.*; @@ -41,24 +40,22 @@ class ReplaceWithForeachCallFix extends MigrateToStreamFix { @Override PsiElement migrate(@NotNull Project project, - @NotNull ProblemDescriptor descriptor, - @NotNull PsiForeachStatement foreachStatement, - @NotNull PsiExpression iteratedValue, - @NotNull PsiStatement body, - @NotNull StreamApiMigrationInspection.TerminalBlock tb) { - restoreComments(foreachStatement, body); + @NotNull PsiLoopStatement loopStatement, + @NotNull PsiStatement body, + @NotNull StreamApiMigrationInspection.TerminalBlock tb) { + restoreComments(loopStatement, body); final PsiElementFactory elementFactory = JavaPsiFacade.getElementFactory(project); - StringBuilder buffer = generateStream(iteratedValue, tb.getLastOperation(), true); + StringBuilder buffer = generateStream(tb.getLastOperation(), true); PsiElement block = tb.convertToElement(elementFactory); buffer.append(".").append(myForEachMethodName).append("("); final String functionalExpressionText = tb.getVariable().getName() + " -> " + wrapInBlock(block); PsiExpressionStatement callStatement = (PsiExpressionStatement)elementFactory - .createStatementFromText(buffer.toString() + functionalExpressionText + ");", foreachStatement); - callStatement = (PsiExpressionStatement)foreachStatement.replace(callStatement); + .createStatementFromText(buffer.toString() + functionalExpressionText + ");", loopStatement); + callStatement = (PsiExpressionStatement)loopStatement.replace(callStatement); final PsiExpressionList argumentList = ((PsiCallExpression)callStatement.getExpression()).getArgumentList(); LOG.assertTrue(argumentList != null, callStatement.getText()); diff --git a/java/java-impl/src/com/intellij/codeInspection/streamMigration/ReplaceWithMatchFix.java b/java/java-impl/src/com/intellij/codeInspection/streamMigration/ReplaceWithMatchFix.java index d2a482e78190..1d0b0a14bfff 100644 --- a/java/java-impl/src/com/intellij/codeInspection/streamMigration/ReplaceWithMatchFix.java +++ b/java/java-impl/src/com/intellij/codeInspection/streamMigration/ReplaceWithMatchFix.java @@ -15,7 +15,6 @@ */ package com.intellij.codeInspection.streamMigration; -import com.intellij.codeInspection.ProblemDescriptor; import com.intellij.codeInspection.streamMigration.StreamApiMigrationInspection.InitializerUsageStatus; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.project.Project; @@ -46,74 +45,78 @@ class ReplaceWithMatchFix extends MigrateToStreamFix { @Override PsiElement migrate(@NotNull Project project, - @NotNull ProblemDescriptor descriptor, - @NotNull PsiForeachStatement foreachStatement, - @NotNull PsiExpression iteratedValue, - @NotNull PsiStatement body, - @NotNull StreamApiMigrationInspection.TerminalBlock tb) { + @NotNull PsiLoopStatement loopStatement, + @NotNull PsiStatement body, + @NotNull StreamApiMigrationInspection.TerminalBlock tb) { PsiElementFactory elementFactory = JavaPsiFacade.getElementFactory(project); + StringBuilder builder = generateStream(tb.getLastOperation()); if(tb.getSingleStatement() instanceof PsiReturnStatement) { PsiReturnStatement returnStatement = (PsiReturnStatement)tb.getSingleStatement(); PsiExpression value = returnStatement.getReturnValue(); if (ExpressionUtils.isLiteral(value, Boolean.TRUE) || ExpressionUtils.isLiteral(value, Boolean.FALSE)) { boolean foundResult = (boolean)((PsiLiteralExpression)value).getValue(); - PsiReturnStatement nextReturnStatement = StreamApiMigrationInspection.getNextReturnStatement(foreachStatement); + PsiReturnStatement nextReturnStatement = StreamApiMigrationInspection.getNextReturnStatement(loopStatement); if (nextReturnStatement != null) { PsiExpression returnValue = nextReturnStatement.getReturnValue(); if(returnValue == null) return null; String methodName = foundResult ? "anyMatch" : "noneMatch"; - String streamText = generateStream(iteratedValue, tb.getLastOperation()).toString(); - streamText = addTerminalOperation(streamText, methodName, foreachStatement, tb); - restoreComments(foreachStatement, body); - if (nextReturnStatement.getParent() == foreachStatement.getParent()) { + String streamText = addTerminalOperation(builder.toString(), methodName, loopStatement, tb); + restoreComments(loopStatement, body); + if (nextReturnStatement.getParent() == loopStatement.getParent()) { if(!ExpressionUtils.isLiteral(returnValue, !foundResult)) { streamText+= (foundResult ? "||" : "&&") + ParenthesesUtils.getText(returnValue, ParenthesesUtils.AND_PRECEDENCE); } - removeLoop(foreachStatement); + removeLoop(loopStatement); return returnValue.replace(elementFactory.createExpressionFromText(streamText, nextReturnStatement)); } - return foreachStatement.replace(elementFactory.createStatementFromText("return " + streamText + ";", foreachStatement)); + PsiElement result = loopStatement.replace(elementFactory.createStatementFromText("return " + streamText + ";", loopStatement)); + if(!isReachable(nextReturnStatement)) { + nextReturnStatement.delete(); + } + return result; } } } PsiStatement[] statements = tb.getStatements(); - if (!(statements.length == 1 || (statements.length == 2 && ControlFlowUtils.statementBreaksLoop(statements[1], foreachStatement)))) { + if (!(statements.length == 1 || (statements.length == 2 && ControlFlowUtils.statementBreaksLoop(statements[1], loopStatement)))) { return null; } - restoreComments(foreachStatement, body); - String streamText = generateStream(iteratedValue, tb.getLastOperation()).toString(); - streamText = addTerminalOperation(streamText, "anyMatch", foreachStatement, tb); + restoreComments(loopStatement, body); + String streamText = addTerminalOperation(builder.toString(), "anyMatch", loopStatement, tb); PsiStatement statement = statements[0]; PsiAssignmentExpression assignment = ExpressionUtils.getAssignment(statement); if(assignment != null) { PsiExpression lValue = assignment.getLExpression(); PsiExpression rValue = assignment.getRExpression(); - if (!(lValue instanceof PsiReferenceExpression) || rValue == null) return null; - PsiElement maybeVar = ((PsiReferenceExpression)lValue).resolve(); - if(maybeVar instanceof PsiVariable) { - // Simplify single assignments like this: - // boolean flag = false; - // for(....) if(...) {flag = true; break;} - PsiVariable var = (PsiVariable)maybeVar; - PsiExpression initializer = var.getInitializer(); - InitializerUsageStatus status = StreamApiMigrationInspection.getInitializerUsageStatus(var, foreachStatement); - if(initializer != null && status != InitializerUsageStatus.UNKNOWN) { - String replacement; - if(ExpressionUtils.isLiteral(initializer, Boolean.FALSE) && - ExpressionUtils.isLiteral(rValue, Boolean.TRUE)) { - replacement = streamText; - } else if(ExpressionUtils.isLiteral(initializer, Boolean.TRUE) && - ExpressionUtils.isLiteral(rValue, Boolean.FALSE)) { - replacement = "!"+streamText; - } else { - replacement = streamText + "?" + rValue.getText() + ":" + initializer.getText(); + if ((lValue instanceof PsiReferenceExpression) && rValue != null) { + PsiElement maybeVar = ((PsiReferenceExpression)lValue).resolve(); + if (maybeVar instanceof PsiVariable) { + // Simplify single assignments like this: + // boolean flag = false; + // for(....) if(...) {flag = true; break;} + PsiVariable var = (PsiVariable)maybeVar; + PsiExpression initializer = var.getInitializer(); + InitializerUsageStatus status = StreamApiMigrationInspection.getInitializerUsageStatus(var, loopStatement); + if (initializer != null && status != InitializerUsageStatus.UNKNOWN) { + String replacement; + if (ExpressionUtils.isLiteral(initializer, Boolean.FALSE) && + ExpressionUtils.isLiteral(rValue, Boolean.TRUE)) { + replacement = streamText; + } + else if (ExpressionUtils.isLiteral(initializer, Boolean.TRUE) && + ExpressionUtils.isLiteral(rValue, Boolean.FALSE)) { + replacement = "!" + streamText; + } + else { + replacement = streamText + "?" + rValue.getText() + ":" + initializer.getText(); + } + return replaceInitializer(loopStatement, var, initializer, replacement, status); } - return replaceInitializer(foreachStatement, var, initializer, replacement, status); } } } String replacement = "if(" + streamText + "){" + statement.getText() + "}"; - return foreachStatement.replace(elementFactory.createStatementFromText(replacement, foreachStatement)); + return loopStatement.replace(elementFactory.createStatementFromText(replacement, loopStatement)); } private static String addTerminalOperation(String origStream, String methodName, @NotNull PsiElement contextElement, diff --git a/java/java-impl/src/com/intellij/codeInspection/streamMigration/ReplaceWithSumFix.java b/java/java-impl/src/com/intellij/codeInspection/streamMigration/ReplaceWithSumFix.java index 6c83570b1f2c..63cf08b98b11 100644 --- a/java/java-impl/src/com/intellij/codeInspection/streamMigration/ReplaceWithSumFix.java +++ b/java/java-impl/src/com/intellij/codeInspection/streamMigration/ReplaceWithSumFix.java @@ -15,7 +15,7 @@ */ package com.intellij.codeInspection.streamMigration; -import com.intellij.codeInspection.ProblemDescriptor; +import com.intellij.codeInspection.streamMigration.StreamApiMigrationInspection.MapOp; import com.intellij.openapi.project.Project; import com.intellij.psi.*; import org.jetbrains.annotations.NotNull; @@ -33,11 +33,9 @@ class ReplaceWithSumFix extends MigrateToStreamFix { @Override PsiElement migrate(@NotNull Project project, - @NotNull ProblemDescriptor descriptor, - @NotNull PsiForeachStatement foreachStatement, - @NotNull PsiExpression iteratedValue, - @NotNull PsiStatement body, - @NotNull StreamApiMigrationInspection.TerminalBlock tb) { + @NotNull PsiLoopStatement loopStatement, + @NotNull PsiStatement body, + @NotNull StreamApiMigrationInspection.TerminalBlock tb) { PsiAssignmentExpression assignment = tb.getSingleExpression(PsiAssignmentExpression.class); if (assignment == null) return null; PsiVariable var = StreamApiMigrationInspection.extractAccumulator(assignment); @@ -50,9 +48,8 @@ class ReplaceWithSumFix extends MigrateToStreamFix { if (!type.equals(PsiType.DOUBLE) && !type.equals(PsiType.LONG)) { type = PsiType.INT; } - final StringBuilder builder = - generateStream(iteratedValue, new StreamApiMigrationInspection.MapOp(tb.getLastOperation(), addend, tb.getVariable(), type)); + StringBuilder builder = generateStream(new MapOp(tb.getLastOperation(), addend, tb.getVariable(), type)); builder.append(".sum()"); - return replaceWithNumericAddition(project, foreachStatement, var, builder, type); + return replaceWithNumericAddition(project, loopStatement, var, builder, type); } } diff --git a/java/java-impl/src/com/intellij/codeInspection/streamMigration/StreamApiMigrationInspection.java b/java/java-impl/src/com/intellij/codeInspection/streamMigration/StreamApiMigrationInspection.java index f4fb53ad8339..d84181e06202 100644 --- a/java/java-impl/src/com/intellij/codeInspection/streamMigration/StreamApiMigrationInspection.java +++ b/java/java-impl/src/com/intellij/codeInspection/streamMigration/StreamApiMigrationInspection.java @@ -32,6 +32,7 @@ import com.intellij.psi.controlFlow.*; import com.intellij.psi.search.GlobalSearchScope; import com.intellij.psi.search.LocalSearchScope; import com.intellij.psi.search.searches.ReferencesSearch; +import com.intellij.psi.tree.IElementType; import com.intellij.psi.util.InheritanceUtil; import com.intellij.psi.util.PsiTreeUtil; import com.intellij.psi.util.PsiUtil; @@ -43,6 +44,7 @@ import com.intellij.util.containers.IntArrayList; import com.siyeh.ig.psiutils.BoolUtils; import com.siyeh.ig.psiutils.ControlFlowUtils; import com.siyeh.ig.psiutils.ExpressionUtils; +import com.siyeh.ig.psiutils.ParenthesesUtils; import one.util.streamex.EntryStream; import one.util.streamex.StreamEx; import org.jetbrains.annotations.Contract; @@ -123,7 +125,7 @@ public class StreamApiMigrationInspection extends BaseJavaBatchLocalInspectionTo } static boolean isReferencedInOperations(PsiElement element, TerminalBlock tb) { - return ReferencesSearch.search(element, new LocalSearchScope(tb.intermediateExpressions().toArray(PsiElement[]::new))) + return ReferencesSearch.search(element, new LocalSearchScope(tb.intermediateAndSourceExpressions().toArray(PsiElement[]::new))) .findFirst() != null; } @@ -350,7 +352,10 @@ public class StreamApiMigrationInspection extends BaseJavaBatchLocalInspectionTo return dependsOnCollection[0]; } - private static boolean isTrivial(PsiStatement body, PsiParameter parameter) { + @Contract("_, null -> false") + private static boolean isTrivial(PsiStatement body, PsiLoopStatement loopStatement) { + if(!(loopStatement instanceof PsiForeachStatement)) return false; + PsiParameter parameter = ((PsiForeachStatement)loopStatement).getIterationParameter(); //method reference final PsiExpression candidate = new LambdaCanBeMethodReferenceInspection() .canBeMethodReferenceProblem(body instanceof PsiBlockStatement ? ((PsiBlockStatement)body).getCodeBlock() : body, @@ -385,6 +390,27 @@ public class StreamApiMigrationInspection extends BaseJavaBatchLocalInspectionTo return consumerClass != null ? psiFacade.getElementFactory().createType(consumerClass, variable.getType()) : null; } + static boolean isVariableSuitableForStream(PsiVariable variable, PsiStatement statement) { + PsiElement declaration = variable.getParent(); + // For-loop initializer is not effectively final, but suitable for stream conversion + if(declaration instanceof PsiDeclarationStatement) { + PsiElement grandParent = declaration.getParent(); + if (grandParent instanceof PsiForStatement) { + PsiForStatement forStatement = (PsiForStatement)grandParent; + if (forStatement.getInitialization() == declaration) { + PsiStatement body = forStatement.getBody(); + if(body != null && PsiTreeUtil.isAncestor(statement, body, false)) { + return ReferencesSearch.search(variable, new LocalSearchScope(body)).forEach(ref -> { + PsiElement element = ref.getElement(); + return !(element instanceof PsiExpression) || !PsiUtil.isAccessedForWriting((PsiExpression)element); + }); + } + } + } + } + return HighlightControlFlowUtil.isEffectivelyFinal(variable, statement, null); + } + @Contract("null -> null") static PsiLocalVariable extractCollectionVariable(PsiExpression qualifierExpression) { if (qualifierExpression instanceof PsiReferenceExpression) { @@ -465,26 +491,22 @@ public class StreamApiMigrationInspection extends BaseJavaBatchLocalInspectionTo @Override public void visitForeachStatement(PsiForeachStatement statement) { super.visitForeachStatement(statement); - final PsiExpression iteratedValue = statement.getIteratedValue(); + processLoop(statement); + } + + @Override + public void visitForStatement(PsiForStatement statement) { + super.visitForStatement(statement); + processLoop(statement); + } + + void processLoop(PsiLoopStatement statement) { final PsiStatement body = statement.getBody(); - if (iteratedValue == null || body == null) return; - - final PsiType iteratedValueType = iteratedValue.getType(); - final PsiClass iteratorClass = PsiUtil.resolveClassInClassTypeOnly(iteratedValueType); - PsiClass collectionClass = null; - final boolean isArray; - if(iteratedValueType instanceof PsiArrayType) { - if(!isSupported(((PsiArrayType)iteratedValueType).getComponentType())) return; - isArray = true; - } else { - collectionClass = JavaPsiFacade.getInstance(body.getProject()).findClass(CommonClassNames.JAVA_UTIL_COLLECTION, statement.getResolveScope()); - if (collectionClass != null && InheritanceUtil.isInheritorOrSelf(iteratorClass, collectionClass, true)) { - isArray = false; - } else return; - } + if(body == null) return; + StreamSource source = StreamSource.tryCreate(statement); + if(source == null) return; if (!ExceptionUtil.getThrownCheckedExceptions(body).isEmpty()) return; - - TerminalBlock tb = TerminalBlock.from(statement.getIterationParameter(), body); + TerminalBlock tb = TerminalBlock.from(source, body); if(tb.isEmpty()) return; final ControlFlow controlFlow; @@ -502,7 +524,7 @@ public class StreamApiMigrationInspection extends BaseJavaBatchLocalInspectionTo int startOffset = controlFlow.getStartOffset(body); int endOffset = controlFlow.getEndOffset(body); final List nonFinalVariables = StreamEx.of(ControlFlowUtil.getUsedVariables(controlFlow, startOffset, endOffset)) - .remove(variable -> HighlightControlFlowUtil.isEffectivelyFinal(variable, body, null)).toList(); + .remove(variable -> isVariableSuitableForStream(variable, statement)).toList(); if (exitPoints.isEmpty()) { if(getIncrementedVariable(tb, nonFinalVariables) != null) { @@ -514,8 +536,8 @@ public class StreamApiMigrationInspection extends BaseJavaBatchLocalInspectionTo if(!nonFinalVariables.isEmpty()) { return; } - if ((isArray || !isRawSubstitution(iteratedValueType, collectionClass)) && isCollectCall(tb)) { - boolean addAll = !tb.hasOperations() && isAddAllCall(tb); + if (isCollectCall(tb)) { + boolean addAll = statement instanceof PsiForeachStatement && !tb.hasOperations() && isAddAllCall(tb); String methodName; if(addAll) { methodName = "addAll"; @@ -535,7 +557,7 @@ public class StreamApiMigrationInspection extends BaseJavaBatchLocalInspectionTo } // do not replace for(T e : arr) {} with Arrays.stream(arr).forEach(e -> {}) even if flag is set else if (SUGGEST_FOREACH && - (tb.hasOperations() || (!isArray && (REPLACE_TRIVIAL_FOREACH || !isTrivial(body, statement.getIterationParameter()))))) { + (tb.hasOperations() || (!(source instanceof ArrayStream) && (REPLACE_TRIVIAL_FOREACH || !isTrivial(body, statement))))) { ReplaceWithForeachCallFix forEachFix = new ReplaceWithForeachCallFix("forEach"); LocalQuickFix[] fixes = {forEachFix}; if (tb.hasOperations()) { //for .stream() @@ -548,8 +570,8 @@ public class StreamApiMigrationInspection extends BaseJavaBatchLocalInspectionTo if (nonFinalVariables.isEmpty() && tb.getSingleStatement() instanceof PsiReturnStatement) { handleSingleReturn(statement, tb); } - // Intermediate ops should not refer to non-final variables - if (tb.intermediateExpressions() + // Source and intermediate ops should not refer to non-final variables + if (tb.intermediateAndSourceExpressions() .flatCollection(expr -> PsiTreeUtil.collectElementsOfType(expr, PsiReferenceExpression.class)) .map(PsiReferenceExpression::resolve).anyMatch(nonFinalVariables::contains)) { return; @@ -561,7 +583,7 @@ public class StreamApiMigrationInspection extends BaseJavaBatchLocalInspectionTo return; } if (ReferencesSearch.search(tb.getVariable(), new LocalSearchScope(statements)).findFirst() == null - && exitPoints.size() == 1 && exitPoints.contains(breakStatement)) { + && exitPoints.size() == 1 && exitPoints.contains(breakStatement)) { registerProblem(statement, "anyMatch", new ReplaceWithMatchFix("anyMatch")); return; } @@ -583,14 +605,14 @@ public class StreamApiMigrationInspection extends BaseJavaBatchLocalInspectionTo } } - boolean canCollect(PsiForeachStatement statement, PsiMethodCallExpression methodCallExpression) { + boolean canCollect(PsiLoopStatement statement, PsiMethodCallExpression methodCallExpression) { if(methodCallExpression == null) return false; PsiLocalVariable variable = extractCollectionVariable(methodCallExpression.getMethodExpression().getQualifierExpression()); if(variable == null) return false; return getInitializerUsageStatus(variable, statement) != UNKNOWN; } - void handleSingleReturn(PsiForeachStatement statement, TerminalBlock tb) { + void handleSingleReturn(PsiLoopStatement statement, TerminalBlock tb) { PsiReturnStatement returnStatement = (PsiReturnStatement)tb.getSingleStatement(); PsiExpression value = returnStatement.getReturnValue(); PsiReturnStatement nextReturnStatement = getNextReturnStatement(statement); @@ -616,7 +638,10 @@ public class StreamApiMigrationInspection extends BaseJavaBatchLocalInspectionTo } if (!isVariableReferenced(tb.getVariable(), value)) { Operation lastOp = tb.getLastOperation(); - if(!REPLACE_TRIVIAL_FOREACH && lastOp == null || (lastOp instanceof FilterOp && lastOp.getPreviousOp() == null)) return; + if (!REPLACE_TRIVIAL_FOREACH && lastOp instanceof StreamSource || + (lastOp instanceof FilterOp && lastOp.getPreviousOp() instanceof StreamSource)) { + return; + } registerProblem(statement, "anyMatch", new ReplaceWithMatchFix("anyMatch")); } if(nextReturnStatement != null && ExpressionUtils.isSimpleExpression(nextReturnStatement.getReturnValue()) @@ -625,13 +650,8 @@ public class StreamApiMigrationInspection extends BaseJavaBatchLocalInspectionTo } } - private boolean isRawSubstitution(PsiType iteratedValueType, PsiClass collectionClass) { - return iteratedValueType instanceof PsiClassType && PsiUtil - .isRawSubstitutor(collectionClass, TypeConversionUtil.getSuperClassSubstitutor(collectionClass, (PsiClassType)iteratedValueType)); - } - @NotNull - private TextRange getRange(PsiForeachStatement statement) { + private TextRange getRange(PsiLoopStatement statement) { boolean wholeStatement = false; if(myIsOnTheFly) { if (myKey == null) { @@ -643,18 +663,28 @@ public class StreamApiMigrationInspection extends BaseJavaBatchLocalInspectionTo wholeStatement = HighlightDisplayLevel.DO_NOT_SHOW.equals(level); } } - PsiExpression iteratedValue = statement.getIteratedValue(); - LOG.assertTrue(iteratedValue != null); - PsiJavaToken rParenth = statement.getRParenth(); - if(wholeStatement && rParenth != null) { - return new TextRange(statement.getTextOffset(), rParenth.getTextOffset() + 1); + if(statement instanceof PsiForeachStatement) { + PsiJavaToken rParenth = ((PsiForeachStatement)statement).getRParenth(); + if (wholeStatement && rParenth != null) { + return new TextRange(statement.getTextOffset(), rParenth.getTextOffset() + 1); + } + PsiExpression iteratedValue = ((PsiForeachStatement)statement).getIteratedValue(); + LOG.assertTrue(iteratedValue != null); + return iteratedValue.getTextRange(); + } else if(statement instanceof PsiForStatement) { + PsiJavaToken rParenth = ((PsiForStatement)statement).getRParenth(); + if (wholeStatement && rParenth != null) { + return new TextRange(statement.getTextOffset(), rParenth.getTextOffset() + 1); + } + PsiStatement initialization = ((PsiForStatement)statement).getInitialization(); + LOG.assertTrue(initialization != null); + return initialization.getTextRange(); + } else { + throw new IllegalStateException("Unexpected statement type: "+statement); } - return iteratedValue.getTextRange(); } - private void registerProblem(PsiForeachStatement statement, String methodName, LocalQuickFix... fixes) { - PsiExpression iteratedValue = statement.getIteratedValue(); - LOG.assertTrue(iteratedValue != null); + private void registerProblem(PsiLoopStatement statement, String methodName, LocalQuickFix... fixes) { myHolder.registerProblem(statement, getRange(statement).shiftRight(-statement.getTextOffset()), "Can be replaced with '" + methodName + "' call", fixes); } @@ -700,7 +730,7 @@ public class StreamApiMigrationInspection extends BaseJavaBatchLocalInspectionTo } @Nullable - static PsiMethodCallExpression extractToArrayExpression(PsiForeachStatement statement, PsiMethodCallExpression expression) { + static PsiMethodCallExpression extractToArrayExpression(PsiLoopStatement statement, PsiMethodCallExpression expression) { // return collection.toArray() or collection.toArray(new Type[0]) or collection.toArray(new Type[collection.size()]); PsiElement nextElement = PsiTreeUtil.skipSiblingsForward(statement, PsiComment.class, PsiWhiteSpace.class); PsiExpression toArrayCandidate; @@ -799,7 +829,7 @@ public class StreamApiMigrationInspection extends BaseJavaBatchLocalInspectionTo return StreamEx.of(myExpression); } - abstract String createReplacement(PsiElementFactory factory); + abstract String createReplacement(); } static class FilterOp extends Operation { @@ -815,7 +845,8 @@ public class StreamApiMigrationInspection extends BaseJavaBatchLocalInspectionTo } @Override - public String createReplacement(PsiElementFactory factory) { + public String createReplacement() { + PsiElementFactory factory = JavaPsiFacade.getElementFactory(myExpression.getProject()); PsiExpression intermediate = makeIntermediateExpression(factory); PsiExpression expression = myNegated ? factory.createExpressionFromText(BoolUtils.getNegatedExpressionText(intermediate), myExpression) : intermediate; @@ -858,7 +889,7 @@ public class StreamApiMigrationInspection extends BaseJavaBatchLocalInspectionTo } @Override - public String createReplacement(PsiElementFactory factory) { + public String createReplacement() { if (isIdentityMapping(myVariable, myExpression)) { if (!(myType instanceof PsiPrimitiveType)) { return myVariable.getType() instanceof PsiPrimitiveType ? ".boxed()" : ""; @@ -894,20 +925,33 @@ public class StreamApiMigrationInspection extends BaseJavaBatchLocalInspectionTo static class FlatMapOp extends Operation { private final PsiLoopStatement myLoop; + private final StreamSource mySource; - FlatMapOp(@Nullable Operation previousOp, PsiExpression expression, PsiVariable variable, PsiLoopStatement loop) { - super(previousOp, expression, variable); + FlatMapOp(@Nullable Operation previousOp, StreamSource source, PsiVariable variable, PsiLoopStatement loop) { + super(previousOp, source.getExpression(), variable); myLoop = loop; + mySource = source; } @Override - public String createReplacement(PsiElementFactory factory) { - return ".flatMap(" + myVariable.getName() + " -> " + getStreamExpression() + ")"; + public String createReplacement() { + String operation = "flatMap"; + PsiType type = mySource.getVariable().getType(); + if(type instanceof PsiPrimitiveType && !type.equals(myVariable.getType())) { + if(type.equals(PsiType.INT)) { + operation = "flatMapToInt"; + } else if(type.equals(PsiType.LONG)) { + operation = "flatMapToLong"; + } else if(type.equals(PsiType.DOUBLE)) { + operation = "flatMapToDouble"; + } + } + return "." + operation + "(" + myVariable.getName() + " -> " + getStreamExpression() + ")"; } @NotNull String getStreamExpression() { - return myExpression.getText() + ".stream()"; + return mySource.createReplacement(); } boolean breaksMe(PsiBreakStatement statement) { @@ -915,35 +959,155 @@ public class StreamApiMigrationInspection extends BaseJavaBatchLocalInspectionTo } } - static class ArrayFlatMapOp extends FlatMapOp { - ArrayFlatMapOp(@Nullable Operation previousOp, PsiExpression expression, PsiVariable variable, PsiLoopStatement loop) { - super(previousOp, expression, variable, loop); + abstract static class StreamSource extends Operation { + protected StreamSource(PsiVariable variable, PsiExpression expression) { + super(null, expression, variable); } - @Override - public String createReplacement(PsiElementFactory factory) { - String operation = "flatMap"; - PsiType type = myExpression.getType(); - if(type instanceof PsiArrayType) { - PsiType componentType = ((PsiArrayType)type).getComponentType(); - if(componentType instanceof PsiPrimitiveType) { - if(componentType.equals(PsiType.INT)) { - operation = "flatMapToInt"; - } else if(componentType.equals(PsiType.LONG)) { - operation = "flatMapToLong"; - } else if(componentType.equals(PsiType.DOUBLE)) { - operation = "flatMapToDouble"; - } - } + @Contract("null -> null") + static StreamSource tryCreate(PsiLoopStatement statement) { + if(statement instanceof PsiForStatement) { + return CountingLoop.from((PsiForStatement)statement); } - return "." + operation + "(" + myVariable.getName() + " -> " + getStreamExpression() + ")"; + if(statement instanceof PsiForeachStatement) { + ArrayStream source = ArrayStream.from((PsiForeachStatement)statement); + return source == null ? CollectionStream.from((PsiForeachStatement)statement) : source; + } + return null; + } + } + + static class ArrayStream extends StreamSource { + private ArrayStream(PsiVariable variable, PsiExpression expression) { + super(variable, expression); } @Override - @NotNull - String getStreamExpression() { + String createReplacement() { return "java.util.Arrays.stream("+myExpression.getText() + ")"; } + + @Nullable + public static ArrayStream from(PsiForeachStatement statement) { + PsiExpression iteratedValue = statement.getIteratedValue(); + if (iteratedValue == null) return null; + + PsiType iteratedValueType = iteratedValue.getType(); + PsiParameter parameter = statement.getIterationParameter(); + + if (!(iteratedValueType instanceof PsiArrayType) || + !isSupported(((PsiArrayType)iteratedValueType).getComponentType()) || + ((parameter.getType() instanceof PsiPrimitiveType) && + !parameter.getType().equals(((PsiArrayType)iteratedValueType).getComponentType()))) { + return null; + } + + return new ArrayStream(parameter, iteratedValue); + } + } + + static class CollectionStream extends StreamSource { + + private CollectionStream(PsiVariable variable, PsiExpression expression) { + super(variable, expression); + } + + @Override + String createReplacement() { + return ParenthesesUtils.getText(myExpression, ParenthesesUtils.POSTFIX_PRECEDENCE) + ".stream()"; + } + + @Contract("null, _ -> false") + static boolean isRawSubstitution(PsiType iteratedValueType, PsiClass collectionClass) { + return iteratedValueType instanceof PsiClassType && PsiUtil + .isRawSubstitutor(collectionClass, TypeConversionUtil.getSuperClassSubstitutor(collectionClass, (PsiClassType)iteratedValueType)); + } + + @Nullable + public static CollectionStream from(PsiForeachStatement statement) { + PsiExpression iteratedValue = statement.getIteratedValue(); + if (iteratedValue == null) return null; + + PsiType iteratedValueType = iteratedValue.getType(); + PsiClass collectionClass = + JavaPsiFacade.getInstance(statement.getProject()).findClass(CommonClassNames.JAVA_UTIL_COLLECTION, statement.getResolveScope()); + PsiClass iteratorClass = PsiUtil.resolveClassInClassTypeOnly(iteratedValueType); + if (collectionClass == null || + !InheritanceUtil.isInheritorOrSelf(iteratorClass, collectionClass, true) || + isRawSubstitution(iteratedValueType, collectionClass)) { + return null; + } + return new CollectionStream(statement.getIterationParameter(), iteratedValue); + } + } + + static class CountingLoop extends StreamSource { + final PsiExpression myBound; + final boolean myIncluding; + + private CountingLoop(PsiLocalVariable counter, PsiExpression initializer, PsiExpression bound, boolean including) { + super(counter, initializer); + myBound = bound; + myIncluding = including; + } + + @Override + StreamEx expressions() { + return StreamEx.of(myExpression, myBound); + } + + @Override + public String createReplacement() { + String className = myVariable.getType().equals(PsiType.LONG) ? "java.util.stream.LongStream" : "java.util.stream.IntStream"; + String methodName = myIncluding ? "rangeClosed" : "range"; + return className+"."+methodName+"("+myExpression.getText()+", "+myBound.getText()+")"; + } + + @Nullable + public static CountingLoop from(PsiForStatement forStatement) { + // check that initialization is for(int/long i = ;...;...) + if(!(forStatement.getInitialization() instanceof PsiDeclarationStatement)) return null; + PsiDeclarationStatement initialization = (PsiDeclarationStatement)forStatement.getInitialization(); + if(initialization.getDeclaredElements().length != 1) return null; + PsiElement declaration = initialization.getDeclaredElements()[0]; + if(!(declaration instanceof PsiLocalVariable)) return null; + PsiLocalVariable counter = (PsiLocalVariable)declaration; + if(!counter.getType().equals(PsiType.INT) && !counter.getType().equals(PsiType.LONG)) return null; + + PsiExpression initializer = counter.getInitializer(); + if(initializer == null) return null; + + // check that increment is like for(...;...;i++) + if(!(forStatement.getUpdate() instanceof PsiExpressionStatement)) return null; + PsiExpression lValue = extractIncrementedLValue(((PsiExpressionStatement)forStatement.getUpdate()).getExpression()); + if(!(lValue instanceof PsiReferenceExpression) || ((PsiReferenceExpression)lValue).resolve() != counter) return null; + + // check that condition is like for(...;i subList.stream().anyMatch(condition)).forEach(subList -> ...) - TerminalBlock withFlatMapFilter = withFlatMap.extractFilter(); - if(withFlatMapFilter != null && !withFlatMapFilter.isEmpty()) { - PsiStatement[] statements = withFlatMapFilter.getStatements(); - PsiStatement lastStatement = statements[statements.length-1]; - if (lastStatement instanceof PsiBreakStatement && op.breaksMe((PsiBreakStatement)lastStatement) && - ReferencesSearch.search(withFlatMapFilter.getVariable(), new LocalSearchScope(statements)).findFirst() == null) { - return new TerminalBlock(new CompoundFilterOp((FilterOp)withFlatMapFilter.getLastOperation(), op), - myVariable, Arrays.copyOfRange(statements, 0, statements.length-1)); - } - } + if(getSingleStatement() instanceof PsiLoopStatement) { + PsiLoopStatement loopStatement = (PsiLoopStatement)getSingleStatement(); + StreamSource source = StreamSource.tryCreate(loopStatement); + final PsiStatement body = loopStatement.getBody(); + if(source == null || body == null) return null; + // flatMap from primitive to primitive is supported only if primitive types match + // otherwise it would be necessary to create bogus step like + // .mapToObj(var -> blahblah.stream()).flatMap(Function.identity()) + if(myVariable.getType() instanceof PsiPrimitiveType && !myVariable.getType().equals(source.getVariable().getType())) return null; + FlatMapOp op = new FlatMapOp(myPreviousOp, source, myVariable, loopStatement); + TerminalBlock withFlatMap = new TerminalBlock(op, source.getVariable(), body); + if(ReferencesSearch.search(myVariable, new LocalSearchScope(body)).findFirst() == null) { + return withFlatMap; + } else { + // Try extract nested filter like this: + // for(List subList : list) for(T t : subList) if(condition.test(t)) { ...; break; } + // if t is not used in "...", then this could be converted to + // list.stream().filter(subList -> subList.stream().anyMatch(condition)).forEach(subList -> ...) + TerminalBlock withFlatMapFilter = withFlatMap.extractFilter(); + if(withFlatMapFilter != null && !withFlatMapFilter.isEmpty()) { + PsiStatement[] statements = withFlatMapFilter.getStatements(); + PsiStatement lastStatement = statements[statements.length-1]; + if (lastStatement instanceof PsiBreakStatement && op.breaksMe((PsiBreakStatement)lastStatement) && + ReferencesSearch.search(withFlatMapFilter.getVariable(), new LocalSearchScope(statements)).findFirst() == null) { + return new TerminalBlock(new CompoundFilterOp((FilterOp)withFlatMapFilter.getLastOperation(), op), + myVariable, Arrays.copyOfRange(statements, 0, statements.length-1)); } } } @@ -1121,7 +1272,7 @@ public class StreamApiMigrationInspection extends BaseJavaBatchLocalInspectionTo return null; } - @Nullable + @NotNull public Operation getLastOperation() { return myPreviousOp; } @@ -1141,7 +1292,7 @@ public class StreamApiMigrationInspection extends BaseJavaBatchLocalInspectionTo } public boolean hasOperations() { - return myPreviousOp != null; + return !(myPreviousOp instanceof StreamSource); } public boolean isEmpty() { @@ -1163,6 +1314,13 @@ public class StreamApiMigrationInspection extends BaseJavaBatchLocalInspectionTo * @return stream of physical expressions used in intermediate operations in arbitrary order */ public StreamEx intermediateExpressions() { + return operations().remove(StreamSource.class::isInstance).flatMap(Operation::expressions); + } + + /** + * @return stream of physical expressions used in stream source and intermediate operations in arbitrary order + */ + public StreamEx intermediateAndSourceExpressions() { return operations().flatMap(Operation::expressions); } @@ -1184,8 +1342,8 @@ public class StreamApiMigrationInspection extends BaseJavaBatchLocalInspectionTo } @NotNull - public static TerminalBlock from(PsiVariable variable, PsiStatement statement) { - return new TerminalBlock(null, variable, statement).extractOperations(); + public static TerminalBlock from(StreamSource source, PsiStatement body) { + return new TerminalBlock(source, source.myVariable, body).extractOperations(); } } } diff --git a/java/java-impl/src/com/intellij/javadoc/JavadocHelper.java b/java/java-impl/src/com/intellij/javadoc/JavadocHelper.java index 9d192a1fecb4..b96d77cac98f 100644 --- a/java/java-impl/src/com/intellij/javadoc/JavadocHelper.java +++ b/java/java-impl/src/com/intellij/javadoc/JavadocHelper.java @@ -107,16 +107,15 @@ public class JavadocHelper { } final CodeStyleSettings codeStyleSettings = CodeStyleSettingsManager.getInstance(psiFile.getProject()).getCurrentSettings(); - final int indentSize = codeStyleSettings.getIndentSize(psiFile.getFileType()); int column; if (codeStyleSettings.JD_ALIGN_PARAM_COMMENTS) { column = Math.max(descriptionStartColumn, parameterNameEndColumn); if (column <= parameterNameEndColumn) { - column = parameterNameEndColumn + indentSize; + column = parameterNameEndColumn + 1; } } else { - column = anchor.parameterNameEndPosition.column + indentSize; + column = anchor.parameterNameEndPosition.column + 1; } return new LogicalPosition(anchor.parameterNameEndPosition.line, column); } diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/InferenceSession.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/InferenceSession.java index 55843bf91337..702d88c7a345 100644 --- a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/InferenceSession.java +++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/InferenceSession.java @@ -169,9 +169,9 @@ public class InferenceSession { return elementFactory.createType(parameter); } - public void initExpressionConstraints(PsiParameter[] parameters, PsiExpression[] args, PsiElement parent, PsiMethod method) { + public void initExpressionConstraints(PsiParameter[] parameters, PsiExpression[] args, PsiElement parent) { final MethodCandidateInfo.CurrentCandidateProperties currentProperties = getCurrentProperties(parent); - initExpressionConstraints(parameters, args, parent, method, currentProperties != null && currentProperties.isVarargs()); + initExpressionConstraints(parameters, args, parent, null, currentProperties != null && currentProperties.isVarargs()); } public void initExpressionConstraints(PsiParameter[] parameters, @@ -382,7 +382,6 @@ public class InferenceSession { final Ref errorMessage = new Ref(); final PsiType targetType = getTargetTypeFromParent(parent, errorMessage, false); if (targetType == null && errorMessage.get() != null) { - registerIncompatibleErrorMessage(errorMessage.get()); return; } @@ -393,6 +392,7 @@ public class InferenceSession { } if (!repeatInferencePhases()) { + resolveBounds(getInputInferenceVariablesFromTopLevelFunctionalExpressions(args, properties), initialSubstitutor); return; } @@ -405,34 +405,37 @@ public class InferenceSession { } if (!additionalConstraints.isEmpty() && !proceedWithAdditionalConstraints(additionalConstraints, ignoredConstraints)) { + resolveBounds(getInputInferenceVariablesFromTopLevelFunctionalExpressions(args, properties), initialSubstitutor); return; } } } - final PsiSubstitutor substitutor = resolveBounds(myInferenceVariables, initialSubstitutor); - if (substitutor != null) { - if (myContext != null) { - myContext.putUserData(ERASED, myErased); - } - final Map map = substitutor.getSubstitutionMap(); - for (PsiTypeParameter parameter : map.keySet()) { - final PsiType mapping = map.get(parameter); - PsiTypeParameter param; - if (parameter instanceof InferenceVariable) { - ((InferenceVariable)parameter).setInstantiation(mapping); - if (((InferenceVariable)parameter).getCallContext() != myContext) { - //don't include in result substitutor foreign inference variables - continue; + resolveBounds(myInferenceVariables, initialSubstitutor); + } + + private Collection getInputInferenceVariablesFromTopLevelFunctionalExpressions(PsiExpression[] args, MethodCandidateInfo.CurrentCandidateProperties properties) { + if (args == null) return Collections.emptyList(); + final PsiMethod method = properties.getMethod(); + final PsiParameter[] parameters = method.getParameterList().getParameters(); + final HashSet dependencies = new HashSet(); + for (int i = 0; i < args.length; i++) { + PsiExpression arg = args[i]; + if (arg instanceof PsiLambdaExpression && !((PsiLambdaExpression)arg).hasFormalParameterTypes() || + arg instanceof PsiMethodReferenceExpression && !((PsiMethodReferenceExpression)arg).isExact()) { + final PsiSubstitutor nestedSubstitutor = myInferenceSessionContainer.findNestedSubstitutor(arg, myInferenceSubstitution); + final PsiType parameterType = nestedSubstitutor.substitute(getParameterType(parameters, i, mySiteSubstitutor, properties.isVarargs())); + final PsiClassType.ClassResolveResult result = PsiUtil.resolveGenericsClassInType(parameterType); + final PsiMethod interfaceMethod = LambdaUtil.getFunctionalInterfaceMethod(result); + if (interfaceMethod != null) { + final PsiSubstitutor substitutor = LambdaUtil.getSubstitutor(interfaceMethod, result); + for (PsiParameter parameter : interfaceMethod.getParameterList().getParameters()) { + collectDependencies(substitutor.substitute(parameter.getType()), dependencies); } - param = ((InferenceVariable)parameter).getParameter(); } - else { - param = parameter; - } - mySiteSubstitutor = mySiteSubstitutor.put(param, mapping); } } + return dependencies; } private boolean isOverloadCheck() { @@ -1106,8 +1109,8 @@ public class InferenceSession { return false; } - private PsiSubstitutor resolveBounds(final Collection inferenceVariables, - PsiSubstitutor substitutor) { + private void resolveBounds(final Collection inferenceVariables, + @NotNull PsiSubstitutor substitutor) { final Collection allVars = new ArrayList(inferenceVariables); while (!allVars.isEmpty()) { final List vars = InferenceVariablesOrder.resolveOrder(allVars, this); @@ -1132,15 +1135,36 @@ public class InferenceSession { } if (!initFreshVariables(substitutor, unresolved)) { - return null; + return; } myIncorporationPhase.forgetCaptures(vars); if (!repeatInferencePhases()) { - return null; + return; } } - return substitutor; + + if (myContext != null) { + myContext.putUserData(ERASED, myErased); + } + + final Map map = substitutor.getSubstitutionMap(); + for (PsiTypeParameter parameter : map.keySet()) { + final PsiType mapping = map.get(parameter); + PsiTypeParameter param; + if (parameter instanceof InferenceVariable) { + ((InferenceVariable)parameter).setInstantiation(mapping); + if (((InferenceVariable)parameter).getCallContext() != myContext) { + //don't include in result substitutor foreign inference variables + continue; + } + param = ((InferenceVariable)parameter).getParameter(); + } + else { + param = parameter; + } + mySiteSubstitutor = mySiteSubstitutor.put(param, mapping); + } } private boolean initFreshVariables(PsiSubstitutor substitutor, List vars) { diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/InferenceSessionContainer.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/InferenceSessionContainer.java index 801b0791796d..fcf4496e1e17 100644 --- a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/InferenceSessionContainer.java +++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/InferenceSessionContainer.java @@ -138,7 +138,7 @@ public class InferenceSessionContainer { } final InferenceSession inferenceSession = new InferenceSession(typeParameters, partialSubstitutor, parent.getManager(), parent, policy); - inferenceSession.initExpressionConstraints(parameters, arguments, parent, null); + inferenceSession.initExpressionConstraints(parameters, arguments, parent); return inferenceSession.infer(parameters, arguments, parent); } diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/PsiGraphInferenceHelper.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/PsiGraphInferenceHelper.java index eab17977301b..a97a3e5cf474 100644 --- a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/PsiGraphInferenceHelper.java +++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/PsiGraphInferenceHelper.java @@ -51,7 +51,7 @@ public class PsiGraphInferenceHelper implements PsiInferenceHelper { } else { final InferenceSession inferenceSession = new InferenceSession(new PsiTypeParameter[]{typeParameter}, partialSubstitutor, myManager, null); - inferenceSession.initExpressionConstraints(parameters, arguments, null, null); + inferenceSession.initExpressionConstraints(parameters, arguments, null); substitutor = inferenceSession.infer(); } return substitutor.substitute(typeParameter); diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/graphInference/ChainedInference.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/graphInference/ChainedInference.java index 4525426bf58e..49c813e2a878 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/graphInference/ChainedInference.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/graphInference/ChainedInference.java @@ -3,8 +3,8 @@ import java.util.*; class Main { void foo(List list) { - bar(list, i -> i.intValue(), i -> i.unknown()); - bar1(list, i -> i.intValue(), i -> i.unknown()); + bar(list, i -> i.intValue(), i -> i.unknown()); + bar1(list, i -> i.intValue(), i -> i.unknown()); } R bar(List list, diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/highlighting/ReturnTypeCompatibility.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/highlighting/ReturnTypeCompatibility.java index 0c75ae1d7d6e..6ee3add7c1fe 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/highlighting/ReturnTypeCompatibility.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/highlighting/ReturnTypeCompatibility.java @@ -57,7 +57,7 @@ class ReturnTypeCompatibility { } public static void main(String[] args) { - call(i-> {return i;}); + call(i-> {return i;}); } } diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/InferTypeParametersFromFunctionalInterfaceInputs.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/InferTypeParametersFromFunctionalInterfaceInputs.java new file mode 100644 index 000000000000..7df4595a8607 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/InferTypeParametersFromFunctionalInterfaceInputs.java @@ -0,0 +1,21 @@ +import java.util.Map; +import java.util.function.Function; +import java.util.stream.Stream; + +class A { + { + run(A.class, this, (o) -> { + o.meth(); + }); + + + Map map = Stream.iterate(5, t -> t + 5); + } + + + void meth() {} + + T run(Class c, T t, Function f) { + return f.apply(t); + } +} diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterAnyMatchArrayAssignment.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterAnyMatchArrayAssignment.java new file mode 100644 index 000000000000..6364503ce775 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterAnyMatchArrayAssignment.java @@ -0,0 +1,12 @@ +// "Replace with anyMatch()" "true" + +import java.util.List; + +public class Main { + public void testAssignment(List data) { + String[] found = {"no"}; + if (data.stream().map(String::trim).anyMatch(trimmed -> !trimmed.isEmpty())) { + found[0] = "yes"; + } + } +} \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterAnyMatchUnreachableReturn.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterAnyMatchUnreachableReturn.java new file mode 100644 index 000000000000..93a1eb0c5706 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterAnyMatchUnreachableReturn.java @@ -0,0 +1,13 @@ +// "Replace with anyMatch()" "true" + +import java.util.List; + +public class Main { + boolean find(List data) { + if(data != null) { + return data.stream().map(String::trim).anyMatch(trimmed -> trimmed.startsWith("xyz")); + } else { + throw new IllegalArgumentException(); + } + } +} diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterFindFirstReAssignment.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterFindFirstReAssignment.java new file mode 100644 index 000000000000..4851693aa34b --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterFindFirstReAssignment.java @@ -0,0 +1,20 @@ +// "Replace with findFirst()" "true" + +import java.util.List; +import java.util.Map; +import java.util.Objects; + +public class Main { + private int getInitialSize() {return 0;} + + public void testMap(Map> map) throws Exception { + int firstSize = 10; + + System.out.println(firstSize); + + // loop + // comment + firstSize = map.values().stream().filter(Objects::nonNull).findFirst().map(List::size).orElse(getInitialSize()); + System.out.println(firstSize); + } +} \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterFindFirstReturnUnreachable.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterFindFirstReturnUnreachable.java new file mode 100644 index 000000000000..45ebed51b091 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterFindFirstReturnUnreachable.java @@ -0,0 +1,15 @@ +// "Replace with findFirst()" "true" + +import java.util.Collection; +import java.util.List; + +public class Main { + public static String find(List> list) { + if(list == null) { + System.out.println("oops"); + return ""; + } else { + return list.stream().flatMap(Collection::stream).filter(string -> string.startsWith("ABC")).findFirst().orElse(null); + } + } +} \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterFlatMapForLoop.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterFlatMapForLoop.java new file mode 100644 index 000000000000..ed773c1fc647 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterFlatMapForLoop.java @@ -0,0 +1,11 @@ +// "Replace with findFirst()" "true" + +import java.util.Arrays; +import java.util.List; +import java.util.stream.IntStream; + +public class Main { + public String testNestedForLoop(int[] data, List info) { + return Arrays.stream(data).flatMap(val -> IntStream.rangeClosed(0, val)).mapToObj(info::get).filter(str -> !str.isEmpty()).findFirst().orElse(null); + } +} \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterForLoop.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterForLoop.java new file mode 100644 index 000000000000..6b3a851e108e --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterForLoop.java @@ -0,0 +1,12 @@ +// "Replace with collect" "true" + +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.IntStream; + +public class Main { + public void testForLoop(List input) { + List result = IntStream.range(0, 10).mapToObj(i -> input.get(i).length()).collect(Collectors.toList()); + } +} \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterForLoopBoxed.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterForLoopBoxed.java new file mode 100644 index 000000000000..770bd8e3b061 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterForLoopBoxed.java @@ -0,0 +1,12 @@ +// "Replace with collect" "true" + +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.IntStream; + +public class Main { + public void testForLoop() { + List result = IntStream.rangeClosed(0, 10).boxed().collect(Collectors.toList()); + } +} \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterForLoopShortBound.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterForLoopShortBound.java new file mode 100644 index 000000000000..553dc8174c79 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterForLoopShortBound.java @@ -0,0 +1,14 @@ +// "Replace with collect" "true" + +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.IntStream; + +public class Main { + public void testForLoop(List input) { + List result; + short s = (short)input.size(); + result = IntStream.range(0, s).mapToObj(i -> input.get(i).length()).collect(Collectors.toList()); + } +} \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterPrimitiveArray.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterPrimitiveArray.java new file mode 100644 index 000000000000..014c665a2163 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterPrimitiveArray.java @@ -0,0 +1,8 @@ +import java.util.Arrays; + +// "Replace with forEach" "true" +public class Main { + public void test(int[] arr) { + Arrays.stream(arr).filter(i -> i > 0).forEach(System.out::println); + } +} \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeAnyMatchArrayAssignment.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeAnyMatchArrayAssignment.java new file mode 100644 index 000000000000..1fe81627f086 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeAnyMatchArrayAssignment.java @@ -0,0 +1,16 @@ +// "Replace with anyMatch()" "true" + +import java.util.List; + +public class Main { + public void testAssignment(List data) { + String[] found = {"no"}; + for(String str : data) { + String trimmed = str.trim(); + if(!trimmed.isEmpty()) { + found[0] = "yes"; + break; + } + } + } +} \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeAnyMatchUnreachableReturn.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeAnyMatchUnreachableReturn.java new file mode 100644 index 000000000000..2fa660e42389 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeAnyMatchUnreachableReturn.java @@ -0,0 +1,19 @@ +// "Replace with anyMatch()" "true" + +import java.util.List; + +public class Main { + boolean find(List data) { + if(data != null) { + for (String e : data) { + String trimmed = e.trim(); + if (trimmed.startsWith("xyz")) { + return true; + } + } + } else { + throw new IllegalArgumentException(); + } + return false; + } +} diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeFindFirstReAssignment.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeFindFirstReAssignment.java new file mode 100644 index 000000000000..d1cd5f35eff2 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeFindFirstReAssignment.java @@ -0,0 +1,25 @@ +// "Replace with findFirst()" "true" + +import java.util.List; +import java.util.Map; + +public class Main { + private int getInitialSize() {return 0;} + + public void testMap(Map> map) throws Exception { + int firstSize = 10; + + System.out.println(firstSize); + + firstSize = getInitialSize(); + // loop + for(List list : map.values()) { + if(list != null) { + firstSize = list.size(); + // comment + break; + } + } + System.out.println(firstSize); + } +} \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeFindFirstReturnUnreachable.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeFindFirstReturnUnreachable.java new file mode 100644 index 000000000000..a47317fbd733 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeFindFirstReturnUnreachable.java @@ -0,0 +1,21 @@ +// "Replace with findFirst()" "true" + +import java.util.List; + +public class Main { + public static String find(List> list) { + if(list == null) { + System.out.println("oops"); + return ""; + } else { + for (List innerList : list) { + for (String string : innerList) { + if (string.startsWith("ABC")) { + return string; + } + } + } + } + return null; + } +} \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeFindFirstUsedInBound.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeFindFirstUsedInBound.java new file mode 100644 index 000000000000..8e8690af49c3 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeFindFirstUsedInBound.java @@ -0,0 +1,18 @@ +// "Replace with findFirst()" "false" + +public class Main { + public boolean check(int value) { + return value == 3; + } + + public void find() { + int end = 10; + for(int i=0; i info) { + for(int val : data) { + for(int x = 0; x <= val; x++) { + String str = info.get(x); + if(!str.isEmpty()) { + return str; + } + } + } + return null; + } +} \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeForLoop.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeForLoop.java new file mode 100644 index 000000000000..10c9c38a60b1 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeForLoop.java @@ -0,0 +1,13 @@ +// "Replace with collect" "true" + +import java.util.ArrayList; +import java.util.List; + +public class Main { + public void testForLoop(List input) { + List result = new ArrayList<>(); + for (int i = 0; i < 10; i++) { + result.add(input.get(i).length()); + } + } +} \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeForLoopBoxed.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeForLoopBoxed.java new file mode 100644 index 000000000000..e51f6d3667be --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeForLoopBoxed.java @@ -0,0 +1,13 @@ +// "Replace with collect" "true" + +import java.util.ArrayList; +import java.util.List; + +public class Main { + public void testForLoop() { + List result = new ArrayList<>(); + for (int i = 0; 10 >= i; i++) { + result.add(i); + } + } +} \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeForLoopFloatBound.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeForLoopFloatBound.java new file mode 100644 index 000000000000..97d09fca2eda --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeForLoopFloatBound.java @@ -0,0 +1,14 @@ +// "Replace with collect" "false" + +import java.util.ArrayList; +import java.util.List; + +public class Main { + public void testForLoop(List input) { + List result = new ArrayList<>(); + float s = (float)input.size(); + for (int i = 0; i < s; i++) { + result.add(input.get(i).length()); + } + } +} \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeForLoopShortBound.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeForLoopShortBound.java new file mode 100644 index 000000000000..18e38151d432 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeForLoopShortBound.java @@ -0,0 +1,14 @@ +// "Replace with collect" "true" + +import java.util.ArrayList; +import java.util.List; + +public class Main { + public void testForLoop(List input) { + List result = new ArrayList<>(); + short s = (short)input.size(); + for (int i = 0; i < s; i++) { + result.add(input.get(i).length()); + } + } +} \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeForLoopUpdated.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeForLoopUpdated.java new file mode 100644 index 000000000000..24ad53592047 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeForLoopUpdated.java @@ -0,0 +1,13 @@ +// "Replace with collect" "false" + +import java.util.ArrayList; +import java.util.List; + +public class Main { + public void testForLoop(List input) { + List result = new ArrayList<>(); + for (int i = 0; i < 10; i++) { + result.add(input.get(i++).length()); + } + } +} \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeForLoopWrongBound.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeForLoopWrongBound.java new file mode 100644 index 000000000000..c19b9f975bea --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeForLoopWrongBound.java @@ -0,0 +1,13 @@ +// "Replace with collect" "false" + +import java.util.ArrayList; +import java.util.List; + +public class Main { + public void testForLoop(List input) { + List result = new ArrayList<>(); + for (int i = 0; i > 10; i++) { + result.add(input.get(i).length()); + } + } +} \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeForLoopWrongIncrement.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeForLoopWrongIncrement.java new file mode 100644 index 000000000000..1c213239e97c --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeForLoopWrongIncrement.java @@ -0,0 +1,13 @@ +// "Replace with collect" "false" + +import java.util.ArrayList; +import java.util.List; + +public class Main { + public void testForLoop(List input) { + List result = new ArrayList<>(); + for (int i = 0; i < 10; i+=2) { + result.add(input.get(i).length()); + } + } +} \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeForLoopWrongInitializer.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeForLoopWrongInitializer.java new file mode 100644 index 000000000000..021899c429a2 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeForLoopWrongInitializer.java @@ -0,0 +1,13 @@ +// "Replace with collect" "false" + +import java.util.ArrayList; +import java.util.List; + +public class Main { + public void testForLoop(List input) { + List result = new ArrayList<>(); + for (int i = 0, j=0; i < 10; i++) { + result.add(input.get(i).length()); + } + } +} \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforePrimitiveArray.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforePrimitiveArray.java index 16a9a198f4c1..1ce9d739ffed 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforePrimitiveArray.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforePrimitiveArray.java @@ -1,7 +1,7 @@ -// "Replace with forEach" "false" +// "Replace with forEach" "true" public class Main { public void test(int[] arr) { - for(int i : arr) { + for(int i : arr) { if(i > 0) { System.out.println(i); } diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforePrimitiveArrayWrongType.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforePrimitiveArrayWrongType.java new file mode 100644 index 000000000000..21c93cb842be --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforePrimitiveArrayWrongType.java @@ -0,0 +1,10 @@ +// "Replace with forEach" "false" +public class Main { + public void test(int[] arr) { + for(float i : arr) { + if(i > 0) { + System.out.println(i); + } + } + } +} \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeSumAccessOuterFor.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeSumAccessOuterFor.java new file mode 100644 index 000000000000..82623b227e99 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeSumAccessOuterFor.java @@ -0,0 +1,18 @@ +// "Replace with sum()" "false" + +import java.util.List; + +public class Main { + public long testFor(List> list) { + long count = 0; + for (int i = 0; i < list.size(); i++) { + for (String s : list.get(i)) { + String trimmed = s.trim(); + if (trimmed.isEmpty()) { + count += i; + } + } + } + return count; + } +} \ No newline at end of file diff --git a/java/java-tests/testData/projectView/contentRootUnderExcluded/B.txt b/java/java-tests/testData/projectView/contentRootUnderExcluded/B.txt new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/java/java-tests/testData/projectView/contentRootUnderExcluded/exc/excluded.txt b/java/java-tests/testData/projectView/contentRootUnderExcluded/exc/excluded.txt new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/java/java-tests/testData/projectView/contentRootUnderExcluded/exc/gen/A.java b/java/java-tests/testData/projectView/contentRootUnderExcluded/exc/gen/A.java new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/NewLambdaHighlightingTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/NewLambdaHighlightingTest.java index a0b9d5249f20..570ba856ae38 100644 --- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/NewLambdaHighlightingTest.java +++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/NewLambdaHighlightingTest.java @@ -187,7 +187,7 @@ public class NewLambdaHighlightingTest extends LightDaemonAnalyzerTestCase { } public void testAcceptInferredVariablesBeforeAdditionalConstraintsLeadToFail() throws Exception { - doTest(false); + doTest(); } public void testEnsureNoCaptureIsPerformedOverTargetTypeOfCastExpressionWhichMarksFunctionalExpression() throws Exception { @@ -335,13 +335,13 @@ public class NewLambdaHighlightingTest extends LightDaemonAnalyzerTestCase { doTest(); } - private void doTest() { - doTest(false); + public void testInferTypeParametersFromFunctionalInterfaceInputs() throws Exception { + doTest(); } - private void doTest(boolean warnings) { + private void doTest() { IdeaTestUtil.setTestVersion(JavaSdkVersion.JDK_1_8, getModule(), getTestRootDisposable()); - doTest(BASE_PATH + "/" + getTestName(false) + ".java", warnings, false); + doTest(BASE_PATH + "/" + getTestName(false) + ".java", false, false); } /* diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/editorActions/FixDocCommentTest.groovy b/java/java-tests/testSrc/com/intellij/codeInsight/editorActions/FixDocCommentTest.groovy index f294f865fd24..2b4a795c944e 100644 --- a/java/java-tests/testSrc/com/intellij/codeInsight/editorActions/FixDocCommentTest.groovy +++ b/java/java-tests/testSrc/com/intellij/codeInsight/editorActions/FixDocCommentTest.groovy @@ -95,7 +95,7 @@ class Test { expected: '''\ class Test { /** - * @param i + * @param i * @param j */ void test(int i, int j) { @@ -251,7 +251,7 @@ class Test { expected: '''\ class Test { /** - * @param i + * @param i */ void test(int i) { } @@ -272,7 +272,7 @@ class Test { expected: '''\ class Test { /** - * @param i + * @param i * @param j * @param k */ @@ -399,7 +399,7 @@ class Test { /** * My description * @author me - * @param + * @param */ class Test { }''') @@ -420,7 +420,7 @@ class Test { * My description * @author me * @param type description - * @param + * @param */ class Test { }''') @@ -467,7 +467,7 @@ class Test { expected: '''\ class Test { /** - * @param i + * @param i * @param j */ public void test(int i, int j) { @@ -491,7 +491,7 @@ class Test { class Test { /** * @param A description - * @param + * @param */ void test() { } @@ -515,7 +515,7 @@ class Test { /** * Class description * @author Zigmund - * @param + * @param * @param multi-line * description */ @@ -575,7 +575,7 @@ class Test { expected: '''\ class Test { /** - * @param i + * @param i */ void test(int i) { } diff --git a/java/java-tests/testSrc/com/intellij/openapi/roots/impl/DirectoryIndexTest.java b/java/java-tests/testSrc/com/intellij/openapi/roots/impl/DirectoryIndexTest.java index 20da5e4a3194..8970f16fb4a7 100644 --- a/java/java-tests/testSrc/com/intellij/openapi/roots/impl/DirectoryIndexTest.java +++ b/java/java-tests/testSrc/com/intellij/openapi/roots/impl/DirectoryIndexTest.java @@ -712,16 +712,20 @@ public class DirectoryIndexTest extends IdeaTestCase { assertIteratedContent(myFileIndex, Arrays.asList(fileSourceRoot, fileTestSourceRoot), Collections.singletonList(fileRoot)); } - private static void assertIteratedContent(ProjectFileIndex fileIndex, + private void assertIteratedContent(Module module, @Nullable List contains, @Nullable List doesntContain) { + assertIteratedContent(ModuleRootManager.getInstance(module).getFileIndex(), contains, doesntContain); + assertIteratedContent(myFileIndex, contains, doesntContain); + } + + private static void assertIteratedContent(FileIndex fileIndex, @Nullable List contains, @Nullable List doesntContain) { final Set collected = new THashSet<>(); - fileIndex.iterateContent(new ContentIterator() { - @Override - public boolean processFile(VirtualFile fileOrDir) { - collected.add(fileOrDir); - return true; + fileIndex.iterateContent(fileOrDir -> { + if (!collected.add(fileOrDir)) { + fail(fileOrDir + " visited twice"); } + return true; }); if (contains != null) assertContainsElements(collected, contains); if (doesntContain != null) assertDoesntContain(collected, doesntContain); @@ -856,10 +860,61 @@ public class DirectoryIndexTest extends IdeaTestCase { assertTrue(myFileIndex.isInSource(fileSourceRoot)); } - public void testContentRootUnderExcludedRoot() { - VirtualFile dirUnderExcluded = createChildDirectory(myExcludeDir, "generated"); - PsiTestUtil.addSourceContentToRoots(myModule2, dirUnderExcluded); - checkInfo(dirUnderExcluded, myModule2, false, false, "", JavaSourceRootType.SOURCE, myModule2, myModule3); + public void testSourceContentRootsUnderExcludedRoot() { + VirtualFile contentRoot = createChildDirectory(myExcludeDir, "content"); + PsiTestUtil.addContentRoot(myModule2, contentRoot); + checkInfo(contentRoot, myModule2, false, false, null, null, myModule2, myModule3); + VirtualFile excludedFile = createChildData(myExcludeDir, "excluded.txt"); + + VirtualFile sourceRoot = createChildDirectory(myExcludeDir, "src"); + VirtualFile sourceFile = createChildData(sourceRoot, "source.txt"); + PsiTestUtil.addSourceRoot(myModule2, sourceRoot); + assertEquals(myModule2Dir, assertInProject(sourceRoot).getContentRoot()); + checkInfo(sourceRoot, myModule2, false, false, "", JavaSourceRootType.SOURCE, myModule2, myModule3); + + VirtualFile contentSourceRoot = createChildDirectory(myExcludeDir, "content-src"); + VirtualFile contentSourceFile = createChildData(sourceRoot, "content-source.txt"); + PsiTestUtil.addSourceContentToRoots(myModule2, contentSourceRoot); + checkInfo(contentSourceRoot, myModule2, false, false, "", JavaSourceRootType.SOURCE, myModule2, myModule3); + + assertIteratedContent(myModule2, Arrays.asList(sourceFile, contentSourceFile, sourceRoot, contentSourceRoot), + Arrays.asList(excludedFile, myExcludeDir)); + } + + public void testSourceContentRootsUnderExcludedRootUnderSourceRoot() { + VirtualFile excluded = createChildDirectory(myModule2Dir, "excluded"); + PsiTestUtil.addExcludedRoot(myModule2, excluded); + VirtualFile excludedFile = createChildData(excluded, "excluded.txt"); + + VirtualFile contentRoot = createChildDirectory(excluded, "content"); + PsiTestUtil.addContentRoot(myModule2, contentRoot); + checkInfo(contentRoot, myModule2, false, false, null, null); + + VirtualFile sourceRoot = createChildDirectory(excluded, "src"); + PsiTestUtil.addSourceRoot(myModule2, sourceRoot); + VirtualFile sourceFile = createChildData(sourceRoot, "source.txt"); + assertEquals(myModule2Dir, assertInProject(sourceRoot).getContentRoot()); + checkInfo(sourceRoot, myModule2, false, false, "", JavaSourceRootType.SOURCE, myModule2, myModule3); + + VirtualFile contentSourceRoot = createChildDirectory(excluded, "content-src"); + VirtualFile contentSourceFile = createChildData(contentSourceRoot, "content-source.txt"); + PsiTestUtil.addSourceContentToRoots(myModule2, contentSourceRoot); + checkInfo(contentSourceRoot, myModule2, false, false, "", JavaSourceRootType.SOURCE, myModule2, myModule3); + + assertIteratedContent(myModule2, Arrays.asList(sourceFile, contentSourceFile, sourceRoot, contentSourceRoot), + Arrays.asList(excludedFile, myExcludeDir)); + } + + public void testExcludedSourceRootUnderExcluded() { + VirtualFile excluded = createChildDirectory(myModule2Dir, "excluded"); + PsiTestUtil.addExcludedRoot(myModule2, excluded); + + VirtualFile src = createChildDirectory(excluded, "src"); + VirtualFile sourceFile = createChildData(src, "src.txt"); + PsiTestUtil.addSourceRoot(myModule2, src); + PsiTestUtil.addExcludedRoot(myModule2, src); + assertExcluded(src, myModule2); + assertIteratedContent(myModule2, null, Arrays.asList(sourceFile)); } private void checkInfo(VirtualFile file, diff --git a/java/java-tests/testSrc/com/intellij/projectView/ProjectTreeStructureTest.java b/java/java-tests/testSrc/com/intellij/projectView/ProjectTreeStructureTest.java index 46fb031dd4bd..5eecadf0d209 100644 --- a/java/java-tests/testSrc/com/intellij/projectView/ProjectTreeStructureTest.java +++ b/java/java-tests/testSrc/com/intellij/projectView/ProjectTreeStructureTest.java @@ -142,20 +142,44 @@ public class ProjectTreeStructureTest extends BaseProjectViewTestCase { ModuleManagerImpl.getInstanceImpl(myProject).setModuleGroupPath(module, new String[]{"modules"}); PsiTestUtil.addContentRoot(module, mainModuleRoot.findFileByRelativePath("src/com/package1/p2/p3")); - TestProjectTreeStructure structure = new TestProjectTreeStructure(myProject, getTestRootDisposable()); - structure.setShowLibraryContents(false); + myStructure.setShowLibraryContents(false); + myStructure.hideExcludedFiles(); - String structureContent = PlatformTestUtil.print(structure, structure.getRootElement(), 0, null, 10, ' ', myPrintInfo).toString(); + assertStructureEqual("Project\n" + + " nested_module.iml\n" + + " noDuplicateModules\n" + + " src\n" + + " com\n" + + " package1\n" + + " Test.java\n" + + " testNoDuplicateModules.iml\n"); + } - Assert.assertFalse(structureContent.contains("modules")); - assertEquals("Project\n" + - " noDuplicateModules\n" + - " src\n" + - " com\n" + - " package1\n" + - " Test.java\n" + - " nested_module.iml\n" + - " testNoDuplicateModules.iml\n", - structureContent); + public void testContentRootUnderExcluded() { + VirtualFile mainModuleRoot = ModuleRootManager.getInstance(myModule).getContentRoots()[0]; + + PsiTestUtil.addExcludedRoot(myModule, mainModuleRoot.findFileByRelativePath("exc")); + + PsiTestUtil.addContentRoot(myModule, mainModuleRoot.findFileByRelativePath("exc/gen")); + + myStructure.setShowLibraryContents(false); + + assertStructureEqual("Project\n" + + " contentRootUnderExcluded\n" + + " B.txt\n" + + " exc\n" + + " excluded.txt\n" + + " gen\n" + + " A.java\n" + + " testContentRootUnderExcluded.iml\n"); + + myStructure.hideExcludedFiles(); + assertStructureEqual("Project\n" + + " Module\n" + + " contentRootUnderExcluded\n" + + " B.txt\n" + + " gen\n" + + " A.java\n" + + " testContentRootUnderExcluded.iml\n"); } } diff --git a/java/testFramework/src/com/intellij/projectView/BaseProjectViewTestCase.java b/java/testFramework/src/com/intellij/projectView/BaseProjectViewTestCase.java index 70fec7bcf19f..0c6d1f8fa17d 100644 --- a/java/testFramework/src/com/intellij/projectView/BaseProjectViewTestCase.java +++ b/java/testFramework/src/com/intellij/projectView/BaseProjectViewTestCase.java @@ -65,9 +65,17 @@ public abstract class BaseProjectViewTestCase extends TestSourceBasedTestCase { return myStructure; } - private void assertStructureEqual(PsiDirectory root, String expected, int maxRowCount, AbstractTreeStructure structure) { + private void assertStructureEqual(PsiDirectory root, String expected, int maxRowCount, AbstractProjectTreeStructure structure) { assertNotNull(root); - PsiDirectoryNode rootNode = new PsiDirectoryNode(myProject, root, (ViewSettings)structure); + PsiDirectoryNode rootNode = new PsiDirectoryNode(myProject, root, structure); + assertStructureEqual(expected, maxRowCount, rootNode); + } + + protected void assertStructureEqual(String expected) { + assertStructureEqual(expected, -1, myStructure.getRootElement()); + } + + private void assertStructureEqual(String expected, int maxRowCount, Object rootNode) { ProjectViewTestUtil.assertStructureEqual(myStructure, expected, maxRowCount, PlatformTestUtil.createComparator(myPrintInfo), rootNode, myPrintInfo); } diff --git a/jps/jps-builders/src/org/jetbrains/jps/builders/artifacts/ArtifactBuildTaskProvider.java b/jps/jps-builders/src/org/jetbrains/jps/builders/artifacts/ArtifactBuildTaskProvider.java index 5d0ff6cc85c6..84972eb29617 100644 --- a/jps/jps-builders/src/org/jetbrains/jps/builders/artifacts/ArtifactBuildTaskProvider.java +++ b/jps/jps-builders/src/org/jetbrains/jps/builders/artifacts/ArtifactBuildTaskProvider.java @@ -22,6 +22,10 @@ import org.jetbrains.jps.model.artifact.JpsArtifact; import java.util.List; /** + * Allows to perform additional tasks when artifacts are built. Implementations of this class are registered as Java services, by creating + * a file META-INF/services/org.jetbrains.jps.builders.artifacts.ArtifactBuildTaskProvider containing the qualified name of your + * implementation class. + * * @author nik */ public abstract class ArtifactBuildTaskProvider { @@ -38,6 +42,13 @@ public abstract class ArtifactBuildTaskProvider { } } + /** + * Returns list of tasks which need to be executed during {@code buildPhase} when {@code artifact} is building. Firstly tasks returned for + * {@link ArtifactBuildPhase#PRE_PROCESSING PRE_PROCESSING} are executed, then files specified in the artifact layout are copied to the output directory. + * If all files in the artifact output were up to date, i.e. no copying was performed, the build finishes. Otherwise all tasks returned for + * {@link ArtifactBuildPhase#FINISHING_BUILD FINISHING_BUILD} are executed and then all tasks returned for + * {@link ArtifactBuildPhase#POST_PROCESSING POST_PROCESSING} are executed. + */ @NotNull public abstract List createArtifactBuildTasks(@NotNull JpsArtifact artifact, @NotNull ArtifactBuildPhase buildPhase); } diff --git a/jps/jps-builders/src/org/jetbrains/jps/indices/impl/ModuleExcludeIndexImpl.java b/jps/jps-builders/src/org/jetbrains/jps/indices/impl/ModuleExcludeIndexImpl.java index bfb234ce59e4..ae17f7860549 100644 --- a/jps/jps-builders/src/org/jetbrains/jps/indices/impl/ModuleExcludeIndexImpl.java +++ b/jps/jps-builders/src/org/jetbrains/jps/indices/impl/ModuleExcludeIndexImpl.java @@ -26,6 +26,7 @@ import org.jetbrains.jps.model.java.JpsJavaExtensionService; import org.jetbrains.jps.model.java.JpsJavaModuleExtension; import org.jetbrains.jps.model.java.JpsJavaProjectExtension; import org.jetbrains.jps.model.module.JpsModule; +import org.jetbrains.jps.model.module.JpsModuleSourceRoot; import org.jetbrains.jps.util.JpsPathUtil; import java.io.File; @@ -67,6 +68,11 @@ public class ModuleExcludeIndexImpl implements ModuleExcludeIndex { moduleContent.add(contentRoot); contentToModule.put(contentRoot, module); } + for (JpsModuleSourceRoot root : module.getSourceRoots()) { + File sourceRoot = root.getFile(); + moduleContent.add(sourceRoot); + contentToModule.put(sourceRoot, module); + } myModuleToExcludesMap.put(module, moduleExcludes); myModuleToContentMap.put(module, moduleContent); myExcludedRoots.addAll(moduleExcludes); diff --git a/jps/jps-builders/testData/output/sourceRootUnderExcluded/exc/src/B.java b/jps/jps-builders/testData/output/sourceRootUnderExcluded/exc/src/B.java new file mode 100644 index 000000000000..ef5f49869300 --- /dev/null +++ b/jps/jps-builders/testData/output/sourceRootUnderExcluded/exc/src/B.java @@ -0,0 +1,3 @@ +class B { + A a; +} \ No newline at end of file diff --git a/jps/jps-builders/testData/output/sourceRootUnderExcluded/sourceRootUnderExcluded.iml b/jps/jps-builders/testData/output/sourceRootUnderExcluded/sourceRootUnderExcluded.iml new file mode 100644 index 000000000000..5752f113727d --- /dev/null +++ b/jps/jps-builders/testData/output/sourceRootUnderExcluded/sourceRootUnderExcluded.iml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/jps/jps-builders/testData/output/sourceRootUnderExcluded/sourceRootUnderExcluded.ipr b/jps/jps-builders/testData/output/sourceRootUnderExcluded/sourceRootUnderExcluded.ipr new file mode 100644 index 000000000000..8d3cc788cfde --- /dev/null +++ b/jps/jps-builders/testData/output/sourceRootUnderExcluded/sourceRootUnderExcluded.ipr @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/jps/jps-builders/testData/output/sourceRootUnderExcluded/src/A.java b/jps/jps-builders/testData/output/sourceRootUnderExcluded/src/A.java new file mode 100644 index 000000000000..398760c55b90 --- /dev/null +++ b/jps/jps-builders/testData/output/sourceRootUnderExcluded/src/A.java @@ -0,0 +1,3 @@ +class A { + B b; +} \ No newline at end of file diff --git a/jps/jps-builders/testSrc/org/jetbrains/jps/builders/rebuild/ModuleRebuildTest.kt b/jps/jps-builders/testSrc/org/jetbrains/jps/builders/rebuild/ModuleRebuildTest.kt index 078a823fe18a..9b0658807a05 100644 --- a/jps/jps-builders/testSrc/org/jetbrains/jps/builders/rebuild/ModuleRebuildTest.kt +++ b/jps/jps-builders/testSrc/org/jetbrains/jps/builders/rebuild/ModuleRebuildTest.kt @@ -69,6 +69,17 @@ class ModuleRebuildTest: JpsRebuildTestCase() { }) } + fun testSourceRootUnderExcluded() { + doTest("sourceRootUnderExcluded/sourceRootUnderExcluded.ipr", fs { + dir("production") { + dir("sourceRootUnderExcluded") { + file("A.class") + file("B.class") + } + } + }) + } + fun testResourceCopying() { doTest("resourceCopying/resourceCopying.ipr", fs { dir("production") { diff --git a/jps/jps-builders/testSrc/org/jetbrains/jps/indices/ModuleExcludeIndexTest.java b/jps/jps-builders/testSrc/org/jetbrains/jps/indices/ModuleExcludeIndexTest.java index a7858910f3a5..abf828ad8195 100644 --- a/jps/jps-builders/testSrc/org/jetbrains/jps/indices/ModuleExcludeIndexTest.java +++ b/jps/jps-builders/testSrc/org/jetbrains/jps/indices/ModuleExcludeIndexTest.java @@ -19,6 +19,7 @@ import com.intellij.openapi.util.io.FileUtil; import org.jetbrains.annotations.NotNull; import org.jetbrains.jps.indices.impl.ModuleExcludeIndexImpl; import org.jetbrains.jps.model.JpsJavaModelTestCase; +import org.jetbrains.jps.model.java.JavaSourceRootType; import org.jetbrains.jps.model.java.JpsJavaModuleExtension; import org.jetbrains.jps.model.module.JpsModule; import org.jetbrains.jps.util.JpsPathUtil; @@ -138,6 +139,24 @@ public class ModuleExcludeIndexTest extends JpsJavaModelTestCase { assertFalse(index.isExcludedFromModule(innerRoot, inner)); } + public void testSourceRootUnderExcluded() { + File project = new File(myRoot, "project"); + File exc = new File(project, "exc"); + File src = new File(exc, "src"); + JpsModule module = addModule(); + addContentRoot(module, project); + addExcludedRoot(module, exc); + addSourceRoot(module, src); + assertNotExcluded(src); + + addExcludedRoot(module, src); + assertExcluded(src); + } + + private static void addSourceRoot(JpsModule module, File src) { + module.addSourceRoot(JpsPathUtil.pathToUrl(src.getAbsolutePath()), JavaSourceRootType.SOURCE); + } + private static void addExcludedRoot(JpsModule module, File root) { module.getExcludeRootsList().addUrl(JpsPathUtil.pathToUrl(root.getAbsolutePath())); } diff --git a/json/src/com/jetbrains/jsonSchema/impl/JsonBySchemaObjectAnnotator.java b/json/src/com/jetbrains/jsonSchema/impl/JsonBySchemaObjectAnnotator.java index b889494eb67a..67caf00eebca 100644 --- a/json/src/com/jetbrains/jsonSchema/impl/JsonBySchemaObjectAnnotator.java +++ b/json/src/com/jetbrains/jsonSchema/impl/JsonBySchemaObjectAnnotator.java @@ -1,3 +1,18 @@ +/* + * Copyright 2000-2016 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.jetbrains.jsonSchema.impl; import com.intellij.json.psi.*; @@ -244,7 +259,8 @@ class JsonBySchemaObjectAnnotator implements Annotator { } private boolean checkForEnum(JsonValue value, JsonSchemaObject schema) { - if (schema.getEnum() == null) return true; + //enum values + pattern -> don't check enum values + if (schema.getEnum() == null || schema.getPattern() != null) return true; final String text = value.getText(); final List objects = schema.getEnum(); for (Object object : objects) { diff --git a/platform/analysis-impl/src/com/intellij/codeInspection/reference/RefDirectoryImpl.java b/platform/analysis-impl/src/com/intellij/codeInspection/reference/RefDirectoryImpl.java index 3cbfb282631d..2e21b9c33931 100644 --- a/platform/analysis-impl/src/com/intellij/codeInspection/reference/RefDirectoryImpl.java +++ b/platform/analysis-impl/src/com/intellij/codeInspection/reference/RefDirectoryImpl.java @@ -26,8 +26,10 @@ import com.intellij.openapi.module.ModuleUtilCore; import com.intellij.psi.PsiDirectory; import com.intellij.psi.PsiElement; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; public class RefDirectoryImpl extends RefElementImpl implements RefDirectory{ + private RefModule myRefModule; protected RefDirectoryImpl(PsiDirectory psiElement, RefManager refManager) { super(psiElement.getName(), psiElement, refManager); final PsiDirectory parentDirectory = psiElement.getParentDirectory(); @@ -38,13 +40,10 @@ public class RefDirectoryImpl extends RefElementImpl implements RefDirectory{ return; } } - final Module module = ModuleUtilCore.findModuleForPsiElement(psiElement); - if (module != null) { - final RefModuleImpl refModule = (RefModuleImpl)refManager.getRefModule(module); - if (refModule != null) { - refModule.add(this); - return; - } + myRefModule = refManager.getRefModule(ModuleUtilCore.findModuleForPsiElement(psiElement)); + if (myRefModule != null) { + ((RefModuleImpl)myRefModule).add(this); + return; } ((RefProjectImpl)refManager.getRefProject()).add(this); } @@ -54,6 +53,12 @@ public class RefDirectoryImpl extends RefElementImpl implements RefDirectory{ ApplicationManager.getApplication().runReadAction(() -> visitor.visitDirectory(this)); } + @Nullable + @Override + public RefModule getModule() { + return myRefModule; + } + @Override protected void initialize() { } diff --git a/platform/analysis-impl/src/com/intellij/codeInspection/reference/RefElementImpl.java b/platform/analysis-impl/src/com/intellij/codeInspection/reference/RefElementImpl.java index ceab3be73205..5bf052b6f5a7 100644 --- a/platform/analysis-impl/src/com/intellij/codeInspection/reference/RefElementImpl.java +++ b/platform/analysis-impl/src/com/intellij/codeInspection/reference/RefElementImpl.java @@ -61,14 +61,12 @@ public abstract class RefElementImpl extends RefEntityImpl implements RefElement private String[] mySuppressions = null; private boolean myIsDeleted ; - private final Module myModule; protected static final int IS_REACHABLE_MASK = 0x40; protected RefElementImpl(@NotNull String name, @NotNull RefElement owner) { super(name, owner.getRefManager()); myID = null; myFlags = 0; - myModule = ModuleUtilCore.findModuleForPsiElement(owner.getElement()); } protected RefElementImpl(PsiFile file, RefManager manager) { @@ -79,7 +77,6 @@ public abstract class RefElementImpl extends RefEntityImpl implements RefElement super(name, manager); myID = SmartPointerManager.getInstance(manager.getProject()).createSmartPsiElementPointer(element); myFlags = 0; - myModule = ModuleUtilCore.findModuleForPsiElement(element); } @Override @@ -114,7 +111,8 @@ public abstract class RefElementImpl extends RefEntityImpl implements RefElement @Override public RefModule getModule() { - return myManager.getRefModule(myModule); + final RefEntity owner = getOwner(); + return owner instanceof RefElement ? ((RefElement)owner).getModule() : null; } @Override diff --git a/platform/core-api/src/com/intellij/openapi/editor/colors/TextAttributesKey.java b/platform/core-api/src/com/intellij/openapi/editor/colors/TextAttributesKey.java index a27033869b19..ee7237406924 100644 --- a/platform/core-api/src/com/intellij/openapi/editor/colors/TextAttributesKey.java +++ b/platform/core-api/src/com/intellij/openapi/editor/colors/TextAttributesKey.java @@ -21,15 +21,14 @@ import com.intellij.openapi.editor.markup.TextAttributes; import com.intellij.openapi.util.JDOMExternalizerUtil; import com.intellij.openapi.util.NullableLazyValue; import com.intellij.openapi.util.VolatileNullableLazyValue; -import com.intellij.util.ConcurrencyUtil; import com.intellij.util.containers.ContainerUtil; +import gnu.trove.THashSet; import org.jdom.Element; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.TestOnly; -import java.util.HashSet; import java.util.Set; import java.util.concurrent.ConcurrentMap; @@ -38,7 +37,7 @@ import java.util.concurrent.ConcurrentMap; * A type of item with a distinct highlighting in an editor or in other views. */ public final class TextAttributesKey implements Comparable { - private static final Logger LOG = Logger.getInstance("#" + TextAttributesKey.class.getName()); + private static final Logger LOG = Logger.getInstance(TextAttributesKey.class); private static final TextAttributes NULL_ATTRIBUTES = new TextAttributes(); private static final ConcurrentMap ourRegistry = ContainerUtil.newConcurrentMap(); @@ -69,7 +68,14 @@ public final class TextAttributesKey implements Comparable { @NotNull public static TextAttributesKey find(@NotNull @NonNls String externalName) { - return ConcurrencyUtil.cacheOrGet(ourRegistry, externalName, new TextAttributesKey(externalName)); + TextAttributesKey v = ourRegistry.get(externalName); + if (v != null) { + return v; + } + + v = new TextAttributesKey(externalName); + TextAttributesKey prev = ourRegistry.putIfAbsent(externalName, v); + return prev == null ? v : prev; } public String toString() { @@ -182,14 +188,15 @@ public final class TextAttributesKey implements Comparable { return key; } + @Nullable public TextAttributesKey getFallbackAttributeKey() { return myFallbackAttributeKey; } - public void setFallbackAttributeKey(TextAttributesKey fallbackAttributeKey) { + public void setFallbackAttributeKey(@Nullable TextAttributesKey fallbackAttributeKey) { myFallbackAttributeKey = fallbackAttributeKey; if (fallbackAttributeKey != null) { - checkDependencies(fallbackAttributeKey, new HashSet()); + checkDependencies(fallbackAttributeKey, new THashSet()); } } @@ -204,33 +211,30 @@ public final class TextAttributesKey implements Comparable { TextAttributes getDefaultAttributes(TextAttributesKey key); } - private void checkDependencies(@Nullable TextAttributesKey key, Set referencedKeys) { - if (key != null) { - if (!referencedKeys.contains(key)) { - referencedKeys.add(key); - TextAttributesKey fallbackKey = key.getFallbackAttributeKey(); - if (fallbackKey != null) { - checkDependencies(fallbackKey, referencedKeys); - } - } - else { - StringBuilder sb = new StringBuilder(); - sb.append("Cyclic TextAttributesKey dependency found: "); - printDependencyLoop(sb, key); - myFallbackAttributeKey = null; - LOG.error(sb.toString()); + private void checkDependencies(@NotNull TextAttributesKey key, @NotNull Set referencedKeys) { + if (referencedKeys.add(key)) { + TextAttributesKey fallbackKey = key.getFallbackAttributeKey(); + if (fallbackKey != null) { + checkDependencies(fallbackKey, referencedKeys); } } + else { + StringBuilder sb = new StringBuilder(); + sb.append("Cyclic TextAttributesKey dependency found: "); + printDependencyLoop(sb, key); + myFallbackAttributeKey = null; + LOG.error(sb.toString()); + } } - private void printDependencyLoop(@NotNull StringBuilder stringBuilder, - @NotNull TextAttributesKey currNode) { + private void printDependencyLoop(@NotNull StringBuilder stringBuilder, @NotNull TextAttributesKey currNode) { stringBuilder.append(currNode.getExternalName()).append("->"); TextAttributesKey fallbackKey = currNode.getFallbackAttributeKey(); if (fallbackKey == this) { stringBuilder.append(getExternalName()); - return; } - printDependencyLoop(stringBuilder, fallbackKey); + else if (fallbackKey != null) { + printDependencyLoop(stringBuilder, fallbackKey); + } } } diff --git a/platform/core-api/src/com/intellij/openapi/editor/markup/TextAttributes.java b/platform/core-api/src/com/intellij/openapi/editor/markup/TextAttributes.java index e17502174ca8..83537ad7dc2a 100644 --- a/platform/core-api/src/com/intellij/openapi/editor/markup/TextAttributes.java +++ b/platform/core-api/src/com/intellij/openapi/editor/markup/TextAttributes.java @@ -16,7 +16,6 @@ package com.intellij.openapi.editor.markup; import com.intellij.openapi.diagnostic.Logger; -import com.intellij.openapi.util.InvalidDataException; import org.intellij.lang.annotations.JdkConstants; import org.jdom.Element; import org.jetbrains.annotations.Contract; @@ -32,8 +31,7 @@ public class TextAttributes implements Cloneable { private static final Logger LOG = Logger.getInstance("#com.intellij.openapi.editor.markup.TextAttributes"); public static final TextAttributes ERASE_MARKER = new TextAttributes(); - - private boolean myEnforceEmpty; + public static final TextAttributes USE_INHERITED_MARKER = new TextAttributes(); @SuppressWarnings("NullableProblems") @NotNull @@ -71,9 +69,8 @@ public class TextAttributes implements Cloneable { this(null, null, null, EffectType.BOXED, Font.PLAIN); } - private TextAttributes(@NotNull AttributesFlyweight attributesFlyweight, boolean enforced) { + private TextAttributes(@NotNull AttributesFlyweight attributesFlyweight) { myAttrs = attributesFlyweight; - myEnforceEmpty = enforced; } public TextAttributes(@NotNull Element element) { @@ -97,14 +94,6 @@ public class TextAttributes implements Cloneable { return getForegroundColor() == null && getBackgroundColor() == null && getEffectColor() == null && getFontType() == Font.PLAIN; } - public boolean isFallbackEnabled() { - return isEmpty() && !myEnforceEmpty; - } - - public boolean containsValue() { - return !isEmpty() || myEnforceEmpty; - } - public void reset() { setForegroundColor(null); setBackgroundColor(null); @@ -179,7 +168,7 @@ public class TextAttributes implements Cloneable { @Override public TextAttributes clone() { - return new TextAttributes(myAttrs, myEnforceEmpty); + return new TextAttributes(myAttrs); } public boolean equals(Object obj) { @@ -194,17 +183,8 @@ public class TextAttributes implements Cloneable { return myAttrs.hashCode(); } - public void readExternal(Element element) { - try { - myAttrs = AttributesFlyweight.create(element); - } - catch (InvalidDataException e) { - throw new RuntimeException(e); - } - - if (isEmpty()) { - myEnforceEmpty = true; - } + public void readExternal(@NotNull Element element) { + myAttrs = AttributesFlyweight.create(element); } public void writeExternal(Element element) { @@ -216,17 +196,4 @@ public class TextAttributes implements Cloneable { return "[" + getForegroundColor() + "," + getBackgroundColor() + "," + getFontType() + "," + getEffectType() + "," + getEffectColor() + "," + getErrorStripeColor() + "]"; } - - /** - * Enforces empty attributes instead of treating empty values as undefined. - * - * @param enforceEmpty True if empty values should be used as is (fallback is disabled). - */ - public void setEnforceEmpty(boolean enforceEmpty) { - myEnforceEmpty = enforceEmpty; - } - - public boolean isEnforceEmpty() { - return myEnforceEmpty; - } } diff --git a/platform/editor-ui-ex/src/com/intellij/openapi/editor/colors/impl/AbstractColorsScheme.java b/platform/editor-ui-ex/src/com/intellij/openapi/editor/colors/impl/AbstractColorsScheme.java index 4505c1311ffe..9bffdf146b2b 100644 --- a/platform/editor-ui-ex/src/com/intellij/openapi/editor/colors/impl/AbstractColorsScheme.java +++ b/platform/editor-ui-ex/src/com/intellij/openapi/editor/colors/impl/AbstractColorsScheme.java @@ -48,6 +48,7 @@ import java.util.List; import static com.intellij.openapi.editor.colors.CodeInsightColors.*; import static com.intellij.openapi.editor.colors.EditorColors.*; +import static com.intellij.openapi.editor.markup.TextAttributes.USE_INHERITED_MARKER; import static com.intellij.openapi.util.Couple.of; import static com.intellij.ui.ColorUtil.fromHex; @@ -79,7 +80,7 @@ public abstract class AbstractColorsScheme implements EditorColorsScheme, Serial private int myVersion = CURR_VERSION; protected Map myColorsMap = ContainerUtilRt.newHashMap(); - protected Map myAttributesMap = ContainerUtilRt.newHashMap(); + protected Map myAttributesMap = new THashMap<>(); @NonNls private static final String EDITOR_FONT = "font"; @NonNls private static final String CONSOLE_FONT = "console-font"; @@ -180,7 +181,7 @@ public abstract class AbstractColorsScheme implements EditorColorsScheme, Serial newScheme.setFont(type, font); } - newScheme.myAttributesMap = new HashMap<>(myAttributesMap); + newScheme.myAttributesMap = new THashMap<>(myAttributesMap); newScheme.myColorsMap = new HashMap<>(myColorsMap); newScheme.myVersion = myVersion; } @@ -403,14 +404,16 @@ public abstract class AbstractColorsScheme implements EditorColorsScheme, Serial public void readAttributes(@NotNull Element childNode) { for (Element e : childNode.getChildren(OPTION_ELEMENT)) { - TextAttributesKey key = TextAttributesKey.find(e.getAttributeValue(NAME_ATTR)); Element valueElement = e.getChild(VALUE_ELEMENT); - TextAttributes attr = myValueReader.read(TextAttributes.class, valueElement); - String baseKeyName = e.getAttributeValue(BASE_ATTRIBUTES_ATTR); - if (baseKeyName != null) { - // For now inheritance overriding is not supported, just make sure that empty attributes mean inheritance. - attr.setEnforceEmpty(false); + TextAttributesKey key = TextAttributesKey.find(e.getAttributeValue(NAME_ATTR)); + if (valueElement == null) { + if (e.getAttributeValue(BASE_ATTRIBUTES_ATTR) != null) { + myAttributesMap.put(key, USE_INHERITED_MARKER); + } + continue; } + + TextAttributes attr = myValueReader.read(TextAttributes.class, valueElement); myAttributesMap.put(key, attr); migrateErrorStripeColorFrom14(key, attr); } @@ -623,24 +626,54 @@ public abstract class AbstractColorsScheme implements EditorColorsScheme, Serial private void writeAttributes(@NotNull Element attrElements) throws WriteExternalException { List list = new ArrayList<>(myAttributesMap.keySet()); list.sort(null); - for (TextAttributesKey key: list) { - TextAttributes defaultAttr = myParentScheme != null ? myParentScheme.getAttributes(key) : new TextAttributes(); + for (TextAttributesKey key : list) { + TextAttributes attributes = myAttributesMap.get(key); TextAttributesKey baseKey = key.getFallbackAttributeKey(); - TextAttributes defaultFallbackAttr = - baseKey != null && myParentScheme instanceof AbstractColorsScheme ? - ((AbstractColorsScheme)myParentScheme).getFallbackAttributes(baseKey) : null; - TextAttributes value = myAttributesMap.get(key); - if (baseKey != null && value.isFallbackEnabled()) { - if (isParentOverwritingInheritance(key)) { - attrElements.addContent(new Element(OPTION_ELEMENT).setAttribute(NAME_ATTR, key.getExternalName()).setAttribute(BASE_ATTRIBUTES_ATTR, baseKey.getExternalName())); + if (attributes == USE_INHERITED_MARKER) { + if (baseKey != null) { + attrElements.addContent(new Element(OPTION_ELEMENT) + .setAttribute(NAME_ATTR, key.getExternalName()) + .setAttribute(BASE_ATTRIBUTES_ATTR, baseKey.getExternalName())); + } + continue; + } + + if (myParentScheme != null) { + // fallback attributes must be not used, otherwise derived scheme as copy will not have such ke + TextAttributes parentAttributes = myParentScheme instanceof AbstractColorsScheme + ? ((AbstractColorsScheme)myParentScheme).getDirectlyDefinedAttributes(key) + : myParentScheme.getAttributes(key); + if (parentAttributes != null && attributes.equals(parentAttributes)) { + continue; } } - else { - if (value.containsValue() && !value.equals(defaultAttr) || defaultAttr == defaultFallbackAttr) { - Element valueElement = new Element(VALUE_ELEMENT); - value.writeExternal(valueElement); - attrElements.addContent(new Element(OPTION_ELEMENT).setAttribute(NAME_ATTR, key.getExternalName()).addContent(valueElement)); + + Element valueElement = new Element(VALUE_ELEMENT); + attributes.writeExternal(valueElement); + attrElements.addContent(new Element(OPTION_ELEMENT).setAttribute(NAME_ATTR, key.getExternalName()).addContent(valueElement)); + } + } + + public void optimizeAttributeMap() { + EditorColorsScheme parentScheme = myParentScheme; + if (parentScheme == null) { + return; + } + + for (TextAttributesKey key : new ArrayList<>(myAttributesMap.keySet())) { + TextAttributes attributes = myAttributesMap.get(key); + if (attributes == USE_INHERITED_MARKER) { + if (key.getFallbackAttributeKey() == null) { + myAttributesMap.remove(key); } + continue; + } + + TextAttributes parentAttributes = parentScheme instanceof DefaultColorsScheme + ? ((DefaultColorsScheme)parentScheme).getAttributes(key, false) + : parentScheme.getAttributes(key); + if (Comparing.equal(parentAttributes, attributes)) { + myAttributesMap.remove(key); } } } @@ -661,15 +694,6 @@ public abstract class AbstractColorsScheme implements EditorColorsScheme, Serial return metaInfoElement; } - private boolean isParentOverwritingInheritance(@NotNull TextAttributesKey key) { - TextAttributes parentAttrs = - myParentScheme instanceof AbstractColorsScheme ? ((AbstractColorsScheme)myParentScheme).getDirectlyDefinedAttributes(key) : null; - if (parentAttrs != null) { - return !parentAttrs.isFallbackEnabled(); - } - return false; - } - protected Color getOwnColor(ColorKey key) { return myColorsMap.get(key); } @@ -698,7 +722,6 @@ public abstract class AbstractColorsScheme implements EditorColorsScheme, Serial } } return true; - } @NotNull @@ -756,15 +779,13 @@ public abstract class AbstractColorsScheme implements EditorColorsScheme, Serial myConsoleLineSpacing = lineSpacing; } - protected TextAttributes getFallbackAttributes(TextAttributesKey fallbackKey) { - if (fallbackKey == null) return null; + protected TextAttributes getFallbackAttributes(@NotNull TextAttributesKey fallbackKey) { TextAttributes fallbackAttributes = getDirectlyDefinedAttributes(fallbackKey); - if (fallbackAttributes != null) { - if (!fallbackAttributes.isFallbackEnabled() || fallbackKey.getFallbackAttributeKey() == null) { - return fallbackAttributes; - } + TextAttributesKey fallbackKeyFallbackKey = fallbackKey.getFallbackAttributeKey(); + if (fallbackAttributes != null && (fallbackAttributes != USE_INHERITED_MARKER || fallbackKeyFallbackKey == null)) { + return fallbackAttributes; } - return getFallbackAttributes(fallbackKey.getFallbackAttributeKey()); + return fallbackKeyFallbackKey == null ? null : getFallbackAttributes(fallbackKeyFallbackKey); } /** @@ -782,10 +803,6 @@ public abstract class AbstractColorsScheme implements EditorColorsScheme, Serial return myParentScheme instanceof AbstractColorsScheme ? ((AbstractColorsScheme)myParentScheme).getDirectlyDefinedAttributes(key) : null; } - protected static boolean containsValue(@Nullable TextAttributes attributes) { - return attributes != null && attributes.containsValue(); - } - public boolean isSaveNeeded() { return myIsSaveNeeded; } diff --git a/platform/editor-ui-ex/src/com/intellij/openapi/editor/colors/impl/DefaultColorsScheme.java b/platform/editor-ui-ex/src/com/intellij/openapi/editor/colors/impl/DefaultColorsScheme.java index c3254814cf81..b55ea1def50a 100644 --- a/platform/editor-ui-ex/src/com/intellij/openapi/editor/colors/impl/DefaultColorsScheme.java +++ b/platform/editor-ui-ex/src/com/intellij/openapi/editor/colors/impl/DefaultColorsScheme.java @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package com.intellij.openapi.editor.colors.impl; import com.intellij.openapi.editor.colors.ColorKey; @@ -37,14 +36,23 @@ public class DefaultColorsScheme extends AbstractColorsScheme implements ReadOnl @Override @Nullable public TextAttributes getAttributes(TextAttributesKey key) { - if (key == null) return null; + return key == null ? null : getAttributes(key, true); + } + + @Nullable + public TextAttributes getAttributes(@NotNull TextAttributesKey key, boolean isUseDefault) { TextAttributes attrs = myAttributesMap.get(key); if (attrs == null) { if (key.getFallbackAttributeKey() != null) { attrs = getFallbackAttributes(key.getFallbackAttributeKey()); - if (attrs != null && !attrs.isFallbackEnabled()) return attrs; + if (attrs != null && attrs != TextAttributes.USE_INHERITED_MARKER) { + return attrs; + } + } + + if (isUseDefault) { + attrs = getKeyDefaults(key); } - attrs = getKeyDefaults(key); } return attrs; } diff --git a/platform/editor-ui-ex/src/com/intellij/openapi/editor/colors/impl/EditorColorsSchemeImpl.java b/platform/editor-ui-ex/src/com/intellij/openapi/editor/colors/impl/EditorColorsSchemeImpl.java index 9cbbf30fbc54..f214856982c6 100644 --- a/platform/editor-ui-ex/src/com/intellij/openapi/editor/colors/impl/EditorColorsSchemeImpl.java +++ b/platform/editor-ui-ex/src/com/intellij/openapi/editor/colors/impl/EditorColorsSchemeImpl.java @@ -26,6 +26,8 @@ import org.jetbrains.annotations.Nullable; import java.awt.*; +import static com.intellij.openapi.editor.markup.TextAttributes.USE_INHERITED_MARKER; + public class EditorColorsSchemeImpl extends AbstractColorsScheme implements ExternalizableScheme { public EditorColorsSchemeImpl(EditorColorsScheme parentScheme) { super(parentScheme); @@ -33,7 +35,7 @@ public class EditorColorsSchemeImpl extends AbstractColorsScheme implements Exte @Override public void setAttributes(@NotNull TextAttributesKey key, TextAttributes attributes) { - if (!attributes.equals(getAttributes(key))) { + if (attributes == USE_INHERITED_MARKER || !attributes.equals(getAttributes(key))) { myAttributesMap.put(key, attributes); } } @@ -47,30 +49,24 @@ public class EditorColorsSchemeImpl extends AbstractColorsScheme implements Exte @Override public TextAttributes getAttributes(@Nullable TextAttributesKey key) { - TextAttributes attributes = key == null ? null : getOwnAttributes(key); - return attributes == null ? myParentScheme.getAttributes(key) : attributes; - } - - @Nullable - private TextAttributes getOwnAttributes(@NotNull TextAttributesKey key) { - TextAttributesKey fallbackKey = key.getFallbackAttributeKey(); - TextAttributes attributes = getDirectlyDefinedAttributes(key); - if (fallbackKey == null) { - if (containsValue(attributes)) { + if (key != null) { + TextAttributesKey fallbackKey = key.getFallbackAttributeKey(); + TextAttributes attributes = getDirectlyDefinedAttributes(key); + if (fallbackKey == null) { return attributes; } + else { + if (attributes != null && attributes != USE_INHERITED_MARKER) { + return attributes; + } + + attributes = getFallbackAttributes(fallbackKey); + if (attributes != null) { + return attributes; + } + } } - else { - if (containsValue(attributes) && !attributes.isFallbackEnabled()) { - return attributes; - } - - attributes = getFallbackAttributes(fallbackKey); - if (containsValue(attributes)) { - return attributes; - } - } - return null; + return myParentScheme.getAttributes(key); } @Nullable diff --git a/platform/editor-ui-ex/src/com/intellij/openapi/editor/colors/impl/TextAttributesReader.java b/platform/editor-ui-ex/src/com/intellij/openapi/editor/colors/impl/TextAttributesReader.java index 39f2830ed2dc..d4fba4aae952 100644 --- a/platform/editor-ui-ex/src/com/intellij/openapi/editor/colors/impl/TextAttributesReader.java +++ b/platform/editor-ui-ex/src/com/intellij/openapi/editor/colors/impl/TextAttributesReader.java @@ -53,25 +53,22 @@ class TextAttributesReader extends ValueElementReader { */ @Override public T read(Class type, Element element) { - if (TextAttributes.class.equals(type)) { - TextAttributes attributes = new TextAttributes(); - if (element != null) { - attributes.setAttributes( - readChild(Color.class, element, FOREGROUND), - readChild(Color.class, element, BACKGROUND), - readChild(Color.class, element, EFFECT_COLOR), - readChild(Color.class, element, ERROR_STRIPE), - Effect.read(this, element), - FontStyle.read(this, element)); - // needed for compatibility with TextAttributes(Element) - if (attributes.isEmpty()) { - attributes.setEnforceEmpty(true); - } - } - //noinspection unchecked - return (T)attributes; + if (!TextAttributes.class.equals(type)) { + return super.read(type, element); } - return super.read(type, element); + + TextAttributes attributes = new TextAttributes(); + if (element != null) { + attributes.setAttributes( + readChild(Color.class, element, FOREGROUND), + readChild(Color.class, element, BACKGROUND), + readChild(Color.class, element, EFFECT_COLOR), + readChild(Color.class, element, ERROR_STRIPE), + Effect.read(this, element), + FontStyle.read(this, element)); + } + //noinspection unchecked + return (T)attributes; } /** diff --git a/platform/icons/src/debugger/threads.png b/platform/icons/src/debugger/threads.png index ae6d1ce31c08..d48a648153a6 100644 Binary files a/platform/icons/src/debugger/threads.png and b/platform/icons/src/debugger/threads.png differ diff --git a/platform/icons/src/debugger/threads.svg b/platform/icons/src/debugger/threads.svg new file mode 100644 index 000000000000..2f2441f7fde8 --- /dev/null +++ b/platform/icons/src/debugger/threads.svg @@ -0,0 +1,11 @@ + + threads + + + + + + + + + diff --git a/platform/icons/src/debugger/threads@2x.png b/platform/icons/src/debugger/threads@2x.png index 70abbe525d18..234d3a07cb64 100644 Binary files a/platform/icons/src/debugger/threads@2x.png and b/platform/icons/src/debugger/threads@2x.png differ diff --git a/platform/icons/src/debugger/threads@2x.svg b/platform/icons/src/debugger/threads@2x.svg new file mode 100644 index 000000000000..b5b595753b04 --- /dev/null +++ b/platform/icons/src/debugger/threads@2x.svg @@ -0,0 +1,11 @@ + + threads@2x + + + + + + + + + diff --git a/platform/icons/src/fileTypes/any_type.png b/platform/icons/src/fileTypes/any_type.png index 02b958974c57..4c4889568288 100644 Binary files a/platform/icons/src/fileTypes/any_type.png and b/platform/icons/src/fileTypes/any_type.png differ diff --git a/platform/icons/src/fileTypes/any_type.svg b/platform/icons/src/fileTypes/any_type.svg new file mode 100644 index 000000000000..d07ddd729c39 --- /dev/null +++ b/platform/icons/src/fileTypes/any_type.svg @@ -0,0 +1,7 @@ + + any_type + + + + + diff --git a/platform/icons/src/fileTypes/any_type@2x.png b/platform/icons/src/fileTypes/any_type@2x.png index f2492feab779..220065bd9a60 100644 Binary files a/platform/icons/src/fileTypes/any_type@2x.png and b/platform/icons/src/fileTypes/any_type@2x.png differ diff --git a/platform/icons/src/fileTypes/any_type@2x.svg b/platform/icons/src/fileTypes/any_type@2x.svg new file mode 100644 index 000000000000..ff56fdfaceb9 --- /dev/null +++ b/platform/icons/src/fileTypes/any_type@2x.svg @@ -0,0 +1,7 @@ + + any_type@2x + + + + + diff --git a/platform/icons/src/fileTypes/archive.png b/platform/icons/src/fileTypes/archive.png index 79baf02db126..f0df27ac56c2 100644 Binary files a/platform/icons/src/fileTypes/archive.png and b/platform/icons/src/fileTypes/archive.png differ diff --git a/platform/icons/src/fileTypes/archive.svg b/platform/icons/src/fileTypes/archive.svg new file mode 100644 index 000000000000..ae6319705850 --- /dev/null +++ b/platform/icons/src/fileTypes/archive.svg @@ -0,0 +1,24 @@ + + archive + + + + + + + + + + + + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/archive@2x.png b/platform/icons/src/fileTypes/archive@2x.png index 477352c86b52..0e000ab28b7c 100644 Binary files a/platform/icons/src/fileTypes/archive@2x.png and b/platform/icons/src/fileTypes/archive@2x.png differ diff --git a/platform/icons/src/fileTypes/archive@2x.svg b/platform/icons/src/fileTypes/archive@2x.svg new file mode 100644 index 000000000000..2f9a7038b816 --- /dev/null +++ b/platform/icons/src/fileTypes/archive@2x.svg @@ -0,0 +1,24 @@ + + archive@2x + + + + + + + + + + + + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/as.png b/platform/icons/src/fileTypes/as.png index 55a8e06a9754..77b189d1683b 100644 Binary files a/platform/icons/src/fileTypes/as.png and b/platform/icons/src/fileTypes/as.png differ diff --git a/platform/icons/src/fileTypes/as.svg b/platform/icons/src/fileTypes/as.svg new file mode 100644 index 000000000000..463309853be4 --- /dev/null +++ b/platform/icons/src/fileTypes/as.svg @@ -0,0 +1,12 @@ + + as + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/as@2x.png b/platform/icons/src/fileTypes/as@2x.png index 09d9dadc7456..4e989a26d538 100644 Binary files a/platform/icons/src/fileTypes/as@2x.png and b/platform/icons/src/fileTypes/as@2x.png differ diff --git a/platform/icons/src/fileTypes/as@2x.svg b/platform/icons/src/fileTypes/as@2x.svg new file mode 100644 index 000000000000..12634b3e2b40 --- /dev/null +++ b/platform/icons/src/fileTypes/as@2x.svg @@ -0,0 +1,12 @@ + + as@2x + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/aspectj.png b/platform/icons/src/fileTypes/aspectj.png index 35c17dd9435e..cd76194bde73 100644 Binary files a/platform/icons/src/fileTypes/aspectj.png and b/platform/icons/src/fileTypes/aspectj.png differ diff --git a/platform/icons/src/fileTypes/aspectj.svg b/platform/icons/src/fileTypes/aspectj.svg new file mode 100644 index 000000000000..e41822b948f0 --- /dev/null +++ b/platform/icons/src/fileTypes/aspectj.svg @@ -0,0 +1,14 @@ + + aspectj + + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/aspectj@2x.png b/platform/icons/src/fileTypes/aspectj@2x.png index 9e80ae360082..0fb6df73dae8 100644 Binary files a/platform/icons/src/fileTypes/aspectj@2x.png and b/platform/icons/src/fileTypes/aspectj@2x.png differ diff --git a/platform/icons/src/fileTypes/aspectj@2x.svg b/platform/icons/src/fileTypes/aspectj@2x.svg new file mode 100644 index 000000000000..b476a86d7b16 --- /dev/null +++ b/platform/icons/src/fileTypes/aspectj@2x.svg @@ -0,0 +1,14 @@ + + aspectj@2x + + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/config.png b/platform/icons/src/fileTypes/config.png index e423144c408c..4c8668d22abd 100644 Binary files a/platform/icons/src/fileTypes/config.png and b/platform/icons/src/fileTypes/config.png differ diff --git a/platform/icons/src/fileTypes/config.svg b/platform/icons/src/fileTypes/config.svg new file mode 100644 index 000000000000..884094780fe4 --- /dev/null +++ b/platform/icons/src/fileTypes/config.svg @@ -0,0 +1,10 @@ + + config + + + + + + + + diff --git a/platform/icons/src/fileTypes/config@2x.png b/platform/icons/src/fileTypes/config@2x.png index 3f42280fc1fc..4465aecd114f 100644 Binary files a/platform/icons/src/fileTypes/config@2x.png and b/platform/icons/src/fileTypes/config@2x.png differ diff --git a/platform/icons/src/fileTypes/config@2x.svg b/platform/icons/src/fileTypes/config@2x.svg new file mode 100644 index 000000000000..81b4c669c396 --- /dev/null +++ b/platform/icons/src/fileTypes/config@2x.svg @@ -0,0 +1,10 @@ + + config@2x + + + + + + + + diff --git a/platform/icons/src/fileTypes/css.png b/platform/icons/src/fileTypes/css.png index 70b76b22ed32..0268aceb1b8c 100644 Binary files a/platform/icons/src/fileTypes/css.png and b/platform/icons/src/fileTypes/css.png differ diff --git a/platform/icons/src/fileTypes/css.svg b/platform/icons/src/fileTypes/css.svg new file mode 100644 index 000000000000..a84fcfdaed57 --- /dev/null +++ b/platform/icons/src/fileTypes/css.svg @@ -0,0 +1,15 @@ + + css + + + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/css@2x.png b/platform/icons/src/fileTypes/css@2x.png index 9d49167f735a..215083e37b11 100644 Binary files a/platform/icons/src/fileTypes/css@2x.png and b/platform/icons/src/fileTypes/css@2x.png differ diff --git a/platform/icons/src/fileTypes/css@2x.svg b/platform/icons/src/fileTypes/css@2x.svg new file mode 100644 index 000000000000..e42113f96db3 --- /dev/null +++ b/platform/icons/src/fileTypes/css@2x.svg @@ -0,0 +1,15 @@ + + css@2x + + + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/custom.png b/platform/icons/src/fileTypes/custom.png index cccc9e83cb91..dbb3245af4a9 100644 Binary files a/platform/icons/src/fileTypes/custom.png and b/platform/icons/src/fileTypes/custom.png differ diff --git a/platform/icons/src/fileTypes/custom.svg b/platform/icons/src/fileTypes/custom.svg new file mode 100644 index 000000000000..54d7fbab0c59 --- /dev/null +++ b/platform/icons/src/fileTypes/custom.svg @@ -0,0 +1,14 @@ + + custom + + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/custom@2x.png b/platform/icons/src/fileTypes/custom@2x.png index c10a9fc6ca61..e1a5d8726095 100644 Binary files a/platform/icons/src/fileTypes/custom@2x.png and b/platform/icons/src/fileTypes/custom@2x.png differ diff --git a/platform/icons/src/fileTypes/custom@2x.svg b/platform/icons/src/fileTypes/custom@2x.svg new file mode 100644 index 000000000000..c935b180efbb --- /dev/null +++ b/platform/icons/src/fileTypes/custom@2x.svg @@ -0,0 +1,14 @@ + + custom@2x + + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/diagram.png b/platform/icons/src/fileTypes/diagram.png index 236363a94ffa..01b6e160220c 100644 Binary files a/platform/icons/src/fileTypes/diagram.png and b/platform/icons/src/fileTypes/diagram.png differ diff --git a/platform/icons/src/fileTypes/diagram.svg b/platform/icons/src/fileTypes/diagram.svg new file mode 100644 index 000000000000..132674ab13a0 --- /dev/null +++ b/platform/icons/src/fileTypes/diagram.svg @@ -0,0 +1,13 @@ + + diagram + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/diagram@2x.png b/platform/icons/src/fileTypes/diagram@2x.png index 8385d11fa40d..02405d127fd6 100644 Binary files a/platform/icons/src/fileTypes/diagram@2x.png and b/platform/icons/src/fileTypes/diagram@2x.png differ diff --git a/platform/icons/src/fileTypes/diagram@2x.svg b/platform/icons/src/fileTypes/diagram@2x.svg new file mode 100644 index 000000000000..c0fbda31e748 --- /dev/null +++ b/platform/icons/src/fileTypes/diagram@2x.svg @@ -0,0 +1,13 @@ + + diagram@2x + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/dtd.png b/platform/icons/src/fileTypes/dtd.png index 41aaa0f73970..f35ad489f356 100644 Binary files a/platform/icons/src/fileTypes/dtd.png and b/platform/icons/src/fileTypes/dtd.png differ diff --git a/platform/icons/src/fileTypes/dtd.svg b/platform/icons/src/fileTypes/dtd.svg new file mode 100644 index 000000000000..553dd9d7468d --- /dev/null +++ b/platform/icons/src/fileTypes/dtd.svg @@ -0,0 +1,13 @@ + + dtd + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/dtd@2x.png b/platform/icons/src/fileTypes/dtd@2x.png index 36300e6c1b18..7b47ed5d4d3a 100644 Binary files a/platform/icons/src/fileTypes/dtd@2x.png and b/platform/icons/src/fileTypes/dtd@2x.png differ diff --git a/platform/icons/src/fileTypes/dtd@2x.svg b/platform/icons/src/fileTypes/dtd@2x.svg new file mode 100644 index 000000000000..cacb2adfebe7 --- /dev/null +++ b/platform/icons/src/fileTypes/dtd@2x.svg @@ -0,0 +1,13 @@ + + dtd@2x + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/facelets.png b/platform/icons/src/fileTypes/facelets.png index e2ca7ae10ff0..1697d57336b7 100644 Binary files a/platform/icons/src/fileTypes/facelets.png and b/platform/icons/src/fileTypes/facelets.png differ diff --git a/platform/icons/src/fileTypes/facelets.svg b/platform/icons/src/fileTypes/facelets.svg new file mode 100644 index 000000000000..812e76422421 --- /dev/null +++ b/platform/icons/src/fileTypes/facelets.svg @@ -0,0 +1,17 @@ + + facelets + + + + + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/facelets@2x.png b/platform/icons/src/fileTypes/facelets@2x.png index e50ae31dce1c..5036063a5408 100644 Binary files a/platform/icons/src/fileTypes/facelets@2x.png and b/platform/icons/src/fileTypes/facelets@2x.png differ diff --git a/platform/icons/src/fileTypes/facelets@2x.svg b/platform/icons/src/fileTypes/facelets@2x.svg new file mode 100644 index 000000000000..db3cf834ea15 --- /dev/null +++ b/platform/icons/src/fileTypes/facelets@2x.svg @@ -0,0 +1,17 @@ + + facelets@2x + + + + + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/facesConfig.png b/platform/icons/src/fileTypes/facesConfig.png index 5083e175e788..1697d57336b7 100644 Binary files a/platform/icons/src/fileTypes/facesConfig.png and b/platform/icons/src/fileTypes/facesConfig.png differ diff --git a/platform/icons/src/fileTypes/facesConfig.svg b/platform/icons/src/fileTypes/facesConfig.svg new file mode 100644 index 000000000000..7f44c0286498 --- /dev/null +++ b/platform/icons/src/fileTypes/facesConfig.svg @@ -0,0 +1,17 @@ + + facesConfig + + + + + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/facesConfig@2x.png b/platform/icons/src/fileTypes/facesConfig@2x.png index 4c5c197046b4..5036063a5408 100644 Binary files a/platform/icons/src/fileTypes/facesConfig@2x.png and b/platform/icons/src/fileTypes/facesConfig@2x.png differ diff --git a/platform/icons/src/fileTypes/facesConfig@2x.svg b/platform/icons/src/fileTypes/facesConfig@2x.svg new file mode 100644 index 000000000000..fa569a69955e --- /dev/null +++ b/platform/icons/src/fileTypes/facesConfig@2x.svg @@ -0,0 +1,17 @@ + + facesConfig@2x + + + + + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/htaccess.png b/platform/icons/src/fileTypes/htaccess.png index d66f2653f0a7..69a4786d19e0 100644 Binary files a/platform/icons/src/fileTypes/htaccess.png and b/platform/icons/src/fileTypes/htaccess.png differ diff --git a/platform/icons/src/fileTypes/htaccess.svg b/platform/icons/src/fileTypes/htaccess.svg new file mode 100644 index 000000000000..68af61d006a5 --- /dev/null +++ b/platform/icons/src/fileTypes/htaccess.svg @@ -0,0 +1,22 @@ + + + + + + + + + + htaccess + + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/htaccess@2x.png b/platform/icons/src/fileTypes/htaccess@2x.png index 219c5d9c03ec..56aead15ba36 100644 Binary files a/platform/icons/src/fileTypes/htaccess@2x.png and b/platform/icons/src/fileTypes/htaccess@2x.png differ diff --git a/platform/icons/src/fileTypes/htaccess@2x.svg b/platform/icons/src/fileTypes/htaccess@2x.svg new file mode 100644 index 000000000000..a84cf860086a --- /dev/null +++ b/platform/icons/src/fileTypes/htaccess@2x.svg @@ -0,0 +1,22 @@ + + + + + + + + + + htaccess@2x + + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/html.png b/platform/icons/src/fileTypes/html.png index e0afbe5beb6f..02bd4e3c5279 100644 Binary files a/platform/icons/src/fileTypes/html.png and b/platform/icons/src/fileTypes/html.png differ diff --git a/platform/icons/src/fileTypes/html.svg b/platform/icons/src/fileTypes/html.svg new file mode 100644 index 000000000000..58fa01fc20a3 --- /dev/null +++ b/platform/icons/src/fileTypes/html.svg @@ -0,0 +1,13 @@ + + html + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/html@2x.png b/platform/icons/src/fileTypes/html@2x.png index 1c7665a2dc09..1089d2d8884d 100644 Binary files a/platform/icons/src/fileTypes/html@2x.png and b/platform/icons/src/fileTypes/html@2x.png differ diff --git a/platform/icons/src/fileTypes/html@2x.svg b/platform/icons/src/fileTypes/html@2x.svg new file mode 100644 index 000000000000..bed12d93e92d --- /dev/null +++ b/platform/icons/src/fileTypes/html@2x.svg @@ -0,0 +1,13 @@ + + html@2x + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/idl.png b/platform/icons/src/fileTypes/idl.png index 02306d4cb341..7be4cfe8c562 100644 Binary files a/platform/icons/src/fileTypes/idl.png and b/platform/icons/src/fileTypes/idl.png differ diff --git a/platform/icons/src/fileTypes/idl.svg b/platform/icons/src/fileTypes/idl.svg new file mode 100644 index 000000000000..18b6082b8469 --- /dev/null +++ b/platform/icons/src/fileTypes/idl.svg @@ -0,0 +1,15 @@ + + idl + + + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/idl@2x.png b/platform/icons/src/fileTypes/idl@2x.png index 2af4de150c1d..f69e806c9ec7 100644 Binary files a/platform/icons/src/fileTypes/idl@2x.png and b/platform/icons/src/fileTypes/idl@2x.png differ diff --git a/platform/icons/src/fileTypes/idl@2x.svg b/platform/icons/src/fileTypes/idl@2x.svg new file mode 100644 index 000000000000..7a9744dbfcd7 --- /dev/null +++ b/platform/icons/src/fileTypes/idl@2x.svg @@ -0,0 +1,15 @@ + + idl@2x + + + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/java.png b/platform/icons/src/fileTypes/java.png index ddb3b8eb4c22..d3141d2817fa 100644 Binary files a/platform/icons/src/fileTypes/java.png and b/platform/icons/src/fileTypes/java.png differ diff --git a/platform/icons/src/fileTypes/java.svg b/platform/icons/src/fileTypes/java.svg new file mode 100644 index 000000000000..a039eb0497ad --- /dev/null +++ b/platform/icons/src/fileTypes/java.svg @@ -0,0 +1,13 @@ + + java + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/java@2x.png b/platform/icons/src/fileTypes/java@2x.png index cfed18788c0e..52c85a49f1b7 100644 Binary files a/platform/icons/src/fileTypes/java@2x.png and b/platform/icons/src/fileTypes/java@2x.png differ diff --git a/platform/icons/src/fileTypes/java@2x.svg b/platform/icons/src/fileTypes/java@2x.svg new file mode 100644 index 000000000000..d42092aab352 --- /dev/null +++ b/platform/icons/src/fileTypes/java@2x.svg @@ -0,0 +1,13 @@ + + java@2x + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/javaClass.png b/platform/icons/src/fileTypes/javaClass.png index 58ef27bb26bf..3c498c3a8a25 100644 Binary files a/platform/icons/src/fileTypes/javaClass.png and b/platform/icons/src/fileTypes/javaClass.png differ diff --git a/platform/icons/src/fileTypes/javaClass.svg b/platform/icons/src/fileTypes/javaClass.svg new file mode 100644 index 000000000000..2389655e5339 --- /dev/null +++ b/platform/icons/src/fileTypes/javaClass.svg @@ -0,0 +1,14 @@ + + javaClass + + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/javaClass@2x.png b/platform/icons/src/fileTypes/javaClass@2x.png index a23f1a97be37..ddacd6dedece 100644 Binary files a/platform/icons/src/fileTypes/javaClass@2x.png and b/platform/icons/src/fileTypes/javaClass@2x.png differ diff --git a/platform/icons/src/fileTypes/javaClass@2x.svg b/platform/icons/src/fileTypes/javaClass@2x.svg new file mode 100644 index 000000000000..b5b8de16afca --- /dev/null +++ b/platform/icons/src/fileTypes/javaClass@2x.svg @@ -0,0 +1,14 @@ + + javaClass@2x + + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/javaOutsideSource.png b/platform/icons/src/fileTypes/javaOutsideSource.png index 168732b77306..b874d12c7090 100644 Binary files a/platform/icons/src/fileTypes/javaOutsideSource.png and b/platform/icons/src/fileTypes/javaOutsideSource.png differ diff --git a/platform/icons/src/fileTypes/javaOutsideSource.svg b/platform/icons/src/fileTypes/javaOutsideSource.svg new file mode 100644 index 000000000000..f69e08a54649 --- /dev/null +++ b/platform/icons/src/fileTypes/javaOutsideSource.svg @@ -0,0 +1,16 @@ + + javaOutsideSource + + + + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/javaOutsideSource@2x.png b/platform/icons/src/fileTypes/javaOutsideSource@2x.png index ed8e4fb1e383..a60049f82332 100644 Binary files a/platform/icons/src/fileTypes/javaOutsideSource@2x.png and b/platform/icons/src/fileTypes/javaOutsideSource@2x.png differ diff --git a/platform/icons/src/fileTypes/javaOutsideSource@2x.svg b/platform/icons/src/fileTypes/javaOutsideSource@2x.svg new file mode 100644 index 000000000000..0ac2ad4cffd6 --- /dev/null +++ b/platform/icons/src/fileTypes/javaOutsideSource@2x.svg @@ -0,0 +1,13 @@ + + javaOutsideSource@2x + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/javaScript.png b/platform/icons/src/fileTypes/javaScript.png index 7c863d158e09..5005fdc1d486 100644 Binary files a/platform/icons/src/fileTypes/javaScript.png and b/platform/icons/src/fileTypes/javaScript.png differ diff --git a/platform/icons/src/fileTypes/javaScript.svg b/platform/icons/src/fileTypes/javaScript.svg new file mode 100644 index 000000000000..84d4decaa976 --- /dev/null +++ b/platform/icons/src/fileTypes/javaScript.svg @@ -0,0 +1,14 @@ + + javaScript + + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/javaScript@2x.png b/platform/icons/src/fileTypes/javaScript@2x.png index 3ea7140a8dc6..3a0d166b7f46 100644 Binary files a/platform/icons/src/fileTypes/javaScript@2x.png and b/platform/icons/src/fileTypes/javaScript@2x.png differ diff --git a/platform/icons/src/fileTypes/javaScript@2x.svg b/platform/icons/src/fileTypes/javaScript@2x.svg new file mode 100644 index 000000000000..a231eb16f75e --- /dev/null +++ b/platform/icons/src/fileTypes/javaScript@2x.svg @@ -0,0 +1,14 @@ + + javaScript@2x + + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/json.png b/platform/icons/src/fileTypes/json.png index a0cbb1b109b5..47135629fe17 100644 Binary files a/platform/icons/src/fileTypes/json.png and b/platform/icons/src/fileTypes/json.png differ diff --git a/platform/icons/src/fileTypes/json.svg b/platform/icons/src/fileTypes/json.svg new file mode 100644 index 000000000000..97111ac52197 --- /dev/null +++ b/platform/icons/src/fileTypes/json.svg @@ -0,0 +1,24 @@ + + json + + + + + + + + + + + + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/json@2x.png b/platform/icons/src/fileTypes/json@2x.png index c279308802e4..2b887d8c227f 100644 Binary files a/platform/icons/src/fileTypes/json@2x.png and b/platform/icons/src/fileTypes/json@2x.png differ diff --git a/platform/icons/src/fileTypes/json@2x.svg b/platform/icons/src/fileTypes/json@2x.svg new file mode 100644 index 000000000000..c654cc76589c --- /dev/null +++ b/platform/icons/src/fileTypes/json@2x.svg @@ -0,0 +1,16 @@ + + json@2x + + + + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/jsp.png b/platform/icons/src/fileTypes/jsp.png index 2bae0013c4ed..834508607c92 100644 Binary files a/platform/icons/src/fileTypes/jsp.png and b/platform/icons/src/fileTypes/jsp.png differ diff --git a/platform/icons/src/fileTypes/jsp.svg b/platform/icons/src/fileTypes/jsp.svg new file mode 100644 index 000000000000..8226dc5a6a80 --- /dev/null +++ b/platform/icons/src/fileTypes/jsp.svg @@ -0,0 +1,17 @@ + + jsp + + + + + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/jsp@2x.png b/platform/icons/src/fileTypes/jsp@2x.png index 3d143c71496b..efc54a58267b 100644 Binary files a/platform/icons/src/fileTypes/jsp@2x.png and b/platform/icons/src/fileTypes/jsp@2x.png differ diff --git a/platform/icons/src/fileTypes/jsp@2x.svg b/platform/icons/src/fileTypes/jsp@2x.svg new file mode 100644 index 000000000000..9340a4eb5260 --- /dev/null +++ b/platform/icons/src/fileTypes/jsp@2x.svg @@ -0,0 +1,17 @@ + + jsp@2x + + + + + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/jspx.png b/platform/icons/src/fileTypes/jspx.png index edad4125c042..c4339d33eb4b 100644 Binary files a/platform/icons/src/fileTypes/jspx.png and b/platform/icons/src/fileTypes/jspx.png differ diff --git a/platform/icons/src/fileTypes/jspx.svg b/platform/icons/src/fileTypes/jspx.svg new file mode 100644 index 000000000000..4aa311830c9a --- /dev/null +++ b/platform/icons/src/fileTypes/jspx.svg @@ -0,0 +1,17 @@ + + jspx + + + + + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/jspx@2x.png b/platform/icons/src/fileTypes/jspx@2x.png index 02bed05a28a6..21a4372a4125 100644 Binary files a/platform/icons/src/fileTypes/jspx@2x.png and b/platform/icons/src/fileTypes/jspx@2x.png differ diff --git a/platform/icons/src/fileTypes/jspx@2x.svg b/platform/icons/src/fileTypes/jspx@2x.svg new file mode 100644 index 000000000000..a39f366a0a43 --- /dev/null +++ b/platform/icons/src/fileTypes/jspx@2x.svg @@ -0,0 +1,17 @@ + + jspx@2x + + + + + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/manifest.png b/platform/icons/src/fileTypes/manifest.png index acf5227558c7..c3f9632bd518 100644 Binary files a/platform/icons/src/fileTypes/manifest.png and b/platform/icons/src/fileTypes/manifest.png differ diff --git a/platform/icons/src/fileTypes/manifest.svg b/platform/icons/src/fileTypes/manifest.svg new file mode 100644 index 000000000000..70539c0c507a --- /dev/null +++ b/platform/icons/src/fileTypes/manifest.svg @@ -0,0 +1,16 @@ + + manifest + + + + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/manifest@2x.png b/platform/icons/src/fileTypes/manifest@2x.png index 243403c8c206..d002c006c43f 100644 Binary files a/platform/icons/src/fileTypes/manifest@2x.png and b/platform/icons/src/fileTypes/manifest@2x.png differ diff --git a/platform/icons/src/fileTypes/manifest@2x.svg b/platform/icons/src/fileTypes/manifest@2x.svg new file mode 100644 index 000000000000..7e98bd8b6516 --- /dev/null +++ b/platform/icons/src/fileTypes/manifest@2x.svg @@ -0,0 +1,16 @@ + + manifest@2x + + + + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/properties.png b/platform/icons/src/fileTypes/properties.png index bb8ebd60919a..51f4c711f031 100644 Binary files a/platform/icons/src/fileTypes/properties.png and b/platform/icons/src/fileTypes/properties.png differ diff --git a/platform/icons/src/fileTypes/properties.svg b/platform/icons/src/fileTypes/properties.svg new file mode 100644 index 000000000000..d8fdb5e5efb6 --- /dev/null +++ b/platform/icons/src/fileTypes/properties.svg @@ -0,0 +1,12 @@ + + properties + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/properties@2x.png b/platform/icons/src/fileTypes/properties@2x.png index 0207102b3d50..e61a055ee2f7 100644 Binary files a/platform/icons/src/fileTypes/properties@2x.png and b/platform/icons/src/fileTypes/properties@2x.png differ diff --git a/platform/icons/src/fileTypes/properties@2x.svg b/platform/icons/src/fileTypes/properties@2x.svg new file mode 100644 index 000000000000..fc8c1d911eb2 --- /dev/null +++ b/platform/icons/src/fileTypes/properties@2x.svg @@ -0,0 +1,12 @@ + + properties@2x + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/text.png b/platform/icons/src/fileTypes/text.png index 17988437e520..d82f616b252e 100644 Binary files a/platform/icons/src/fileTypes/text.png and b/platform/icons/src/fileTypes/text.png differ diff --git a/platform/icons/src/fileTypes/text.svg b/platform/icons/src/fileTypes/text.svg new file mode 100644 index 000000000000..0cfe600838c9 --- /dev/null +++ b/platform/icons/src/fileTypes/text.svg @@ -0,0 +1,10 @@ + + text + + + + + + + + diff --git a/platform/icons/src/fileTypes/text@2x.png b/platform/icons/src/fileTypes/text@2x.png index 8950bac515e8..3d74037a9fbe 100644 Binary files a/platform/icons/src/fileTypes/text@2x.png and b/platform/icons/src/fileTypes/text@2x.png differ diff --git a/platform/icons/src/fileTypes/text@2x.svg b/platform/icons/src/fileTypes/text@2x.svg new file mode 100644 index 000000000000..cbd31d660f23 --- /dev/null +++ b/platform/icons/src/fileTypes/text@2x.svg @@ -0,0 +1,10 @@ + + text@2x + + + + + + + + diff --git a/platform/icons/src/fileTypes/typeScript.png b/platform/icons/src/fileTypes/typeScript.png index 372bb5973458..9227d8eb5225 100644 Binary files a/platform/icons/src/fileTypes/typeScript.png and b/platform/icons/src/fileTypes/typeScript.png differ diff --git a/platform/icons/src/fileTypes/typeScript.svg b/platform/icons/src/fileTypes/typeScript.svg new file mode 100644 index 000000000000..4b33b502b26a --- /dev/null +++ b/platform/icons/src/fileTypes/typeScript.svg @@ -0,0 +1,14 @@ + + typeScript + + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/typeScript@2x.png b/platform/icons/src/fileTypes/typeScript@2x.png index 02d287377c64..6443a23cb55a 100644 Binary files a/platform/icons/src/fileTypes/typeScript@2x.png and b/platform/icons/src/fileTypes/typeScript@2x.png differ diff --git a/platform/icons/src/fileTypes/typeScript@2x.svg b/platform/icons/src/fileTypes/typeScript@2x.svg new file mode 100644 index 000000000000..82121cd4bb2f --- /dev/null +++ b/platform/icons/src/fileTypes/typeScript@2x.svg @@ -0,0 +1,14 @@ + + typeScript@2x + + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/uiForm.png b/platform/icons/src/fileTypes/uiForm.png index d08772349828..f4358650dad9 100644 Binary files a/platform/icons/src/fileTypes/uiForm.png and b/platform/icons/src/fileTypes/uiForm.png differ diff --git a/platform/icons/src/fileTypes/uiForm.svg b/platform/icons/src/fileTypes/uiForm.svg new file mode 100644 index 000000000000..b4c5f7e70ec7 --- /dev/null +++ b/platform/icons/src/fileTypes/uiForm.svg @@ -0,0 +1,7 @@ + + uiForm + + + + + diff --git a/platform/icons/src/fileTypes/uiForm@2x.png b/platform/icons/src/fileTypes/uiForm@2x.png index 379c7c3c3e64..a3dead2b4b6c 100644 Binary files a/platform/icons/src/fileTypes/uiForm@2x.png and b/platform/icons/src/fileTypes/uiForm@2x.png differ diff --git a/platform/icons/src/fileTypes/uiForm@2x.svg b/platform/icons/src/fileTypes/uiForm@2x.svg new file mode 100644 index 000000000000..98aa6520b9ad --- /dev/null +++ b/platform/icons/src/fileTypes/uiForm@2x.svg @@ -0,0 +1,7 @@ + + uiForm@2x + + + + + diff --git a/platform/icons/src/fileTypes/unknown.png b/platform/icons/src/fileTypes/unknown.png index 04c30c9facae..5914b62fc817 100644 Binary files a/platform/icons/src/fileTypes/unknown.png and b/platform/icons/src/fileTypes/unknown.png differ diff --git a/platform/icons/src/fileTypes/unknown.svg b/platform/icons/src/fileTypes/unknown.svg new file mode 100644 index 000000000000..2e94af2db6cd --- /dev/null +++ b/platform/icons/src/fileTypes/unknown.svg @@ -0,0 +1,11 @@ + + unknown + + + + + + + + + diff --git a/platform/icons/src/fileTypes/unknown@2x.png b/platform/icons/src/fileTypes/unknown@2x.png index 2d0413706071..550c20a78c70 100644 Binary files a/platform/icons/src/fileTypes/unknown@2x.png and b/platform/icons/src/fileTypes/unknown@2x.png differ diff --git a/platform/icons/src/fileTypes/unknown@2x.svg b/platform/icons/src/fileTypes/unknown@2x.svg new file mode 100644 index 000000000000..f1e332713938 --- /dev/null +++ b/platform/icons/src/fileTypes/unknown@2x.svg @@ -0,0 +1,11 @@ + + unknown@2x + + + + + + + + + diff --git a/platform/icons/src/fileTypes/wsdlFile.png b/platform/icons/src/fileTypes/wsdlFile.png index 0df81949be22..cd264129f36e 100644 Binary files a/platform/icons/src/fileTypes/wsdlFile.png and b/platform/icons/src/fileTypes/wsdlFile.png differ diff --git a/platform/icons/src/fileTypes/wsdlFile.svg b/platform/icons/src/fileTypes/wsdlFile.svg new file mode 100644 index 000000000000..0787361f294a --- /dev/null +++ b/platform/icons/src/fileTypes/wsdlFile.svg @@ -0,0 +1,14 @@ + + wsdlFile + + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/wsdlFile@2x.png b/platform/icons/src/fileTypes/wsdlFile@2x.png index 0e7975081dd6..1691d204596b 100644 Binary files a/platform/icons/src/fileTypes/wsdlFile@2x.png and b/platform/icons/src/fileTypes/wsdlFile@2x.png differ diff --git a/platform/icons/src/fileTypes/wsdlFile@2x.svg b/platform/icons/src/fileTypes/wsdlFile@2x.svg new file mode 100644 index 000000000000..277fbff9a938 --- /dev/null +++ b/platform/icons/src/fileTypes/wsdlFile@2x.svg @@ -0,0 +1,14 @@ + + wsdlFile@2x + + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/xhtml.png b/platform/icons/src/fileTypes/xhtml.png index 01f78cde41ba..0edbc11babb4 100644 Binary files a/platform/icons/src/fileTypes/xhtml.png and b/platform/icons/src/fileTypes/xhtml.png differ diff --git a/platform/icons/src/fileTypes/xhtml.svg b/platform/icons/src/fileTypes/xhtml.svg new file mode 100644 index 000000000000..692a70b37467 --- /dev/null +++ b/platform/icons/src/fileTypes/xhtml.svg @@ -0,0 +1,13 @@ + + xhtml + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/xhtml@2x.png b/platform/icons/src/fileTypes/xhtml@2x.png index b9c335c97acd..56895e6cb894 100644 Binary files a/platform/icons/src/fileTypes/xhtml@2x.png and b/platform/icons/src/fileTypes/xhtml@2x.png differ diff --git a/platform/icons/src/fileTypes/xhtml@2x.svg b/platform/icons/src/fileTypes/xhtml@2x.svg new file mode 100644 index 000000000000..0b8e088f25af --- /dev/null +++ b/platform/icons/src/fileTypes/xhtml@2x.svg @@ -0,0 +1,13 @@ + + xhtml@2x + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/xml.png b/platform/icons/src/fileTypes/xml.png index 029065ef4b62..0f438f8e3672 100644 Binary files a/platform/icons/src/fileTypes/xml.png and b/platform/icons/src/fileTypes/xml.png differ diff --git a/platform/icons/src/fileTypes/xml.svg b/platform/icons/src/fileTypes/xml.svg new file mode 100644 index 000000000000..65a01473f6a3 --- /dev/null +++ b/platform/icons/src/fileTypes/xml.svg @@ -0,0 +1,12 @@ + + xml + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/xml@2x.png b/platform/icons/src/fileTypes/xml@2x.png index 30565c2a6d16..c53f479dee65 100644 Binary files a/platform/icons/src/fileTypes/xml@2x.png and b/platform/icons/src/fileTypes/xml@2x.png differ diff --git a/platform/icons/src/fileTypes/xml@2x.svg b/platform/icons/src/fileTypes/xml@2x.svg new file mode 100644 index 000000000000..cc428f7426a2 --- /dev/null +++ b/platform/icons/src/fileTypes/xml@2x.svg @@ -0,0 +1,12 @@ + + xml@2x + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/xsdFile.png b/platform/icons/src/fileTypes/xsdFile.png index b9b0a4e43286..acf63e4a6c8f 100644 Binary files a/platform/icons/src/fileTypes/xsdFile.png and b/platform/icons/src/fileTypes/xsdFile.png differ diff --git a/platform/icons/src/fileTypes/xsdFile.svg b/platform/icons/src/fileTypes/xsdFile.svg new file mode 100644 index 000000000000..401406e89337 --- /dev/null +++ b/platform/icons/src/fileTypes/xsdFile.svg @@ -0,0 +1,15 @@ + + xsdFile + + + + + + + + + + + + + diff --git a/platform/icons/src/fileTypes/xsdFile@2x.png b/platform/icons/src/fileTypes/xsdFile@2x.png index 736fab3a32cf..8150c49bdafc 100644 Binary files a/platform/icons/src/fileTypes/xsdFile@2x.png and b/platform/icons/src/fileTypes/xsdFile@2x.png differ diff --git a/platform/icons/src/fileTypes/xsdFile@2x.svg b/platform/icons/src/fileTypes/xsdFile@2x.svg new file mode 100644 index 000000000000..1c615b057541 --- /dev/null +++ b/platform/icons/src/fileTypes/xsdFile@2x.svg @@ -0,0 +1,15 @@ + + xsdFile@2x + + + + + + + + + + + + + diff --git a/platform/icons/src/modules/ResourcesRoot.svg b/platform/icons/src/modules/ResourcesRoot.svg new file mode 100644 index 000000000000..db9370c58ee7 --- /dev/null +++ b/platform/icons/src/modules/ResourcesRoot.svg @@ -0,0 +1,12 @@ + + ResourcesRoot + + + + + + + + + + diff --git a/platform/icons/src/modules/ResourcesRoot@2x.svg b/platform/icons/src/modules/ResourcesRoot@2x.svg new file mode 100644 index 000000000000..6f0cffd88903 --- /dev/null +++ b/platform/icons/src/modules/ResourcesRoot@2x.svg @@ -0,0 +1,12 @@ + + ResourcesRoot@2x + + + + + + + + + + diff --git a/platform/icons/src/modules/edit.png b/platform/icons/src/modules/edit.png index 6ba0fd8284d3..b1b439c79348 100644 Binary files a/platform/icons/src/modules/edit.png and b/platform/icons/src/modules/edit.png differ diff --git a/platform/icons/src/modules/edit.svg b/platform/icons/src/modules/edit.svg new file mode 100644 index 000000000000..bb4f6e9c8ffc --- /dev/null +++ b/platform/icons/src/modules/edit.svg @@ -0,0 +1,7 @@ + + edit + + + + + diff --git a/platform/icons/src/modules/edit@2x.png b/platform/icons/src/modules/edit@2x.png index 1396b5821747..8dc75672793c 100644 Binary files a/platform/icons/src/modules/edit@2x.png and b/platform/icons/src/modules/edit@2x.png differ diff --git a/platform/icons/src/modules/edit@2x.svg b/platform/icons/src/modules/edit@2x.svg new file mode 100644 index 000000000000..36cf63e80748 --- /dev/null +++ b/platform/icons/src/modules/edit@2x.svg @@ -0,0 +1,7 @@ + + edit@2x + + + + + diff --git a/platform/icons/src/modules/editFolder.png b/platform/icons/src/modules/editFolder.png index 47c9d87b4100..7c444f87adef 100644 Binary files a/platform/icons/src/modules/editFolder.png and b/platform/icons/src/modules/editFolder.png differ diff --git a/platform/icons/src/modules/editFolder.svg b/platform/icons/src/modules/editFolder.svg new file mode 100644 index 000000000000..5fd1786d65a4 --- /dev/null +++ b/platform/icons/src/modules/editFolder.svg @@ -0,0 +1,18 @@ + + editFolder + + + + + + + + + + + + + + + + diff --git a/platform/icons/src/modules/editFolder@2x.png b/platform/icons/src/modules/editFolder@2x.png index 5f1dbe8a5a56..b21f4ab4d0dc 100644 Binary files a/platform/icons/src/modules/editFolder@2x.png and b/platform/icons/src/modules/editFolder@2x.png differ diff --git a/platform/icons/src/modules/editFolder@2x.svg b/platform/icons/src/modules/editFolder@2x.svg new file mode 100644 index 000000000000..ba5e5ecd5bab --- /dev/null +++ b/platform/icons/src/modules/editFolder@2x.svg @@ -0,0 +1,18 @@ + + editFolder@2x + + + + + + + + + + + + + + + + diff --git a/platform/icons/src/modules/excludeRoot.png b/platform/icons/src/modules/excludeRoot.png index 2b35b8ed0a93..cb21f49cef7a 100644 Binary files a/platform/icons/src/modules/excludeRoot.png and b/platform/icons/src/modules/excludeRoot.png differ diff --git a/platform/icons/src/modules/excludeRoot.svg b/platform/icons/src/modules/excludeRoot.svg new file mode 100644 index 000000000000..d766f2e16501 --- /dev/null +++ b/platform/icons/src/modules/excludeRoot.svg @@ -0,0 +1,6 @@ + + excludeRoot + + + + diff --git a/platform/icons/src/modules/excludeRoot@2x.png b/platform/icons/src/modules/excludeRoot@2x.png index 1641fb79cfb8..8685f120d2ef 100644 Binary files a/platform/icons/src/modules/excludeRoot@2x.png and b/platform/icons/src/modules/excludeRoot@2x.png differ diff --git a/platform/icons/src/modules/excludeRoot@2x.svg b/platform/icons/src/modules/excludeRoot@2x.svg new file mode 100644 index 000000000000..749c5c9cbe27 --- /dev/null +++ b/platform/icons/src/modules/excludeRoot@2x.svg @@ -0,0 +1,6 @@ + + excludeRoot@2x + + + + diff --git a/platform/icons/src/modules/excludedGeneratedRoot.png b/platform/icons/src/modules/excludedGeneratedRoot.png index bd49906d7f07..938df7fd3eeb 100644 Binary files a/platform/icons/src/modules/excludedGeneratedRoot.png and b/platform/icons/src/modules/excludedGeneratedRoot.png differ diff --git a/platform/icons/src/modules/excludedGeneratedRoot.svg b/platform/icons/src/modules/excludedGeneratedRoot.svg new file mode 100644 index 000000000000..1b6e6d7d31ca --- /dev/null +++ b/platform/icons/src/modules/excludedGeneratedRoot.svg @@ -0,0 +1,11 @@ + + excludedGeneratedRoot + + + + + + + + + diff --git a/platform/icons/src/modules/excludedGeneratedRoot@2x.png b/platform/icons/src/modules/excludedGeneratedRoot@2x.png index b6b9517bf388..b229c27cad3e 100644 Binary files a/platform/icons/src/modules/excludedGeneratedRoot@2x.png and b/platform/icons/src/modules/excludedGeneratedRoot@2x.png differ diff --git a/platform/icons/src/modules/excludedGeneratedRoot@2x.svg b/platform/icons/src/modules/excludedGeneratedRoot@2x.svg new file mode 100644 index 000000000000..b0b8881a8e34 --- /dev/null +++ b/platform/icons/src/modules/excludedGeneratedRoot@2x.svg @@ -0,0 +1,11 @@ + + excludedGeneratedRoot@2x + + + + + + + + + diff --git a/platform/icons/src/modules/generatedFolder.png b/platform/icons/src/modules/generatedFolder.png index 4432aa0f61b0..64cc5830839c 100644 Binary files a/platform/icons/src/modules/generatedFolder.png and b/platform/icons/src/modules/generatedFolder.png differ diff --git a/platform/icons/src/modules/generatedFolder.svg b/platform/icons/src/modules/generatedFolder.svg new file mode 100644 index 000000000000..5ed522d90382 --- /dev/null +++ b/platform/icons/src/modules/generatedFolder.svg @@ -0,0 +1,11 @@ + + generatedFolder + + + + + + + + + diff --git a/platform/icons/src/modules/generatedFolder@2x.png b/platform/icons/src/modules/generatedFolder@2x.png index 7134683d550c..832ae85f2e4a 100644 Binary files a/platform/icons/src/modules/generatedFolder@2x.png and b/platform/icons/src/modules/generatedFolder@2x.png differ diff --git a/platform/icons/src/modules/generatedFolder@2x.svg b/platform/icons/src/modules/generatedFolder@2x.svg new file mode 100644 index 000000000000..e45e7a4997ee --- /dev/null +++ b/platform/icons/src/modules/generatedFolder@2x.svg @@ -0,0 +1,11 @@ + + generatedFolder@2x + + + + + + + + + diff --git a/platform/icons/src/modules/generatedSourceRoot.png b/platform/icons/src/modules/generatedSourceRoot.png index 8c375d21b574..119a61319166 100644 Binary files a/platform/icons/src/modules/generatedSourceRoot.png and b/platform/icons/src/modules/generatedSourceRoot.png differ diff --git a/platform/icons/src/modules/generatedSourceRoot.svg b/platform/icons/src/modules/generatedSourceRoot.svg new file mode 100644 index 000000000000..a501b599d76b --- /dev/null +++ b/platform/icons/src/modules/generatedSourceRoot.svg @@ -0,0 +1,11 @@ + + generatedSourceRoot + + + + + + + + + diff --git a/platform/icons/src/modules/generatedSourceRoot@2x.png b/platform/icons/src/modules/generatedSourceRoot@2x.png index 14d347269027..7c16e1762593 100644 Binary files a/platform/icons/src/modules/generatedSourceRoot@2x.png and b/platform/icons/src/modules/generatedSourceRoot@2x.png differ diff --git a/platform/icons/src/modules/generatedSourceRoot@2x.svg b/platform/icons/src/modules/generatedSourceRoot@2x.svg new file mode 100644 index 000000000000..a3ce97d196b3 --- /dev/null +++ b/platform/icons/src/modules/generatedSourceRoot@2x.svg @@ -0,0 +1,11 @@ + + generatedSourceRoot@2x + + + + + + + + + diff --git a/platform/icons/src/modules/generatedTestRoot.png b/platform/icons/src/modules/generatedTestRoot.png index 51e6e3c1d082..f53dfe8ecff9 100644 Binary files a/platform/icons/src/modules/generatedTestRoot.png and b/platform/icons/src/modules/generatedTestRoot.png differ diff --git a/platform/icons/src/modules/generatedTestRoot.svg b/platform/icons/src/modules/generatedTestRoot.svg new file mode 100644 index 000000000000..7c7abb08f872 --- /dev/null +++ b/platform/icons/src/modules/generatedTestRoot.svg @@ -0,0 +1,11 @@ + + generatedTestRoot + + + + + + + + + diff --git a/platform/icons/src/modules/generatedTestRoot@2x.png b/platform/icons/src/modules/generatedTestRoot@2x.png index 8bc04728d96f..050ca2417cc5 100644 Binary files a/platform/icons/src/modules/generatedTestRoot@2x.png and b/platform/icons/src/modules/generatedTestRoot@2x.png differ diff --git a/platform/icons/src/modules/generatedTestRoot@2x.svg b/platform/icons/src/modules/generatedTestRoot@2x.svg new file mode 100644 index 000000000000..cbf3517d2298 --- /dev/null +++ b/platform/icons/src/modules/generatedTestRoot@2x.svg @@ -0,0 +1,11 @@ + + generatedTestRoot@2x + + + + + + + + + diff --git a/platform/icons/src/modules/library.png b/platform/icons/src/modules/library.png index eb8491f78163..f38567ccdd30 100644 Binary files a/platform/icons/src/modules/library.png and b/platform/icons/src/modules/library.png differ diff --git a/platform/icons/src/modules/library.svg b/platform/icons/src/modules/library.svg new file mode 100644 index 000000000000..14ee0bb9d9a7 --- /dev/null +++ b/platform/icons/src/modules/library.svg @@ -0,0 +1,10 @@ + + library + + + + + + + + diff --git a/platform/icons/src/modules/library@2x.png b/platform/icons/src/modules/library@2x.png index c24193e1c26e..c100b5cbdbaf 100644 Binary files a/platform/icons/src/modules/library@2x.png and b/platform/icons/src/modules/library@2x.png differ diff --git a/platform/icons/src/modules/library@2x.svg b/platform/icons/src/modules/library@2x.svg new file mode 100644 index 000000000000..3a6cc56fbfa8 --- /dev/null +++ b/platform/icons/src/modules/library@2x.svg @@ -0,0 +1,10 @@ + + library@2x + + + + + + + + diff --git a/platform/icons/src/modules/modulesNode.png b/platform/icons/src/modules/modulesNode.png index 5acd2698ca51..34c866bda2f5 100644 Binary files a/platform/icons/src/modules/modulesNode.png and b/platform/icons/src/modules/modulesNode.png differ diff --git a/platform/icons/src/modules/modulesNode.svg b/platform/icons/src/modules/modulesNode.svg new file mode 100644 index 000000000000..982f3c91c4af --- /dev/null +++ b/platform/icons/src/modules/modulesNode.svg @@ -0,0 +1,22 @@ + + modulesNode + + + + + + + + + + + + + + + + + + + + diff --git a/platform/icons/src/modules/modulesNode@2x.png b/platform/icons/src/modules/modulesNode@2x.png index 030ab4ae9b2a..2b4b47410b31 100644 Binary files a/platform/icons/src/modules/modulesNode@2x.png and b/platform/icons/src/modules/modulesNode@2x.png differ diff --git a/platform/icons/src/modules/modulesNode@2x.svg b/platform/icons/src/modules/modulesNode@2x.svg new file mode 100644 index 000000000000..ea60e4b13f47 --- /dev/null +++ b/platform/icons/src/modules/modulesNode@2x.svg @@ -0,0 +1,20 @@ + + modulesNode@2x + + + + + + + + + + + + + + + + + + diff --git a/platform/icons/src/modules/output.png b/platform/icons/src/modules/output.png index 3c681556bf3a..a3164851bc2d 100644 Binary files a/platform/icons/src/modules/output.png and b/platform/icons/src/modules/output.png differ diff --git a/platform/icons/src/modules/output.svg b/platform/icons/src/modules/output.svg new file mode 100644 index 000000000000..1b87600e39f6 --- /dev/null +++ b/platform/icons/src/modules/output.svg @@ -0,0 +1,13 @@ + + output + + + + + + + + + + + diff --git a/platform/icons/src/modules/output@2x.png b/platform/icons/src/modules/output@2x.png index 9a6051f22573..12b0e14f58fe 100644 Binary files a/platform/icons/src/modules/output@2x.png and b/platform/icons/src/modules/output@2x.png differ diff --git a/platform/icons/src/modules/output@2x.svg b/platform/icons/src/modules/output@2x.svg new file mode 100644 index 000000000000..6596c04fb9f5 --- /dev/null +++ b/platform/icons/src/modules/output@2x.svg @@ -0,0 +1,13 @@ + + output@2x + + + + + + + + + + + diff --git a/platform/icons/src/modules/resourcesRoot.png b/platform/icons/src/modules/resourcesRoot.png index 3a49f51834e6..ddd4be99777b 100644 Binary files a/platform/icons/src/modules/resourcesRoot.png and b/platform/icons/src/modules/resourcesRoot.png differ diff --git a/platform/icons/src/modules/resourcesRoot@2x.png b/platform/icons/src/modules/resourcesRoot@2x.png index 1964c2aca3f1..eecdbc135efa 100644 Binary files a/platform/icons/src/modules/resourcesRoot@2x.png and b/platform/icons/src/modules/resourcesRoot@2x.png differ diff --git a/platform/icons/src/modules/sourceFolder.png b/platform/icons/src/modules/sourceFolder.png index 1b12a110117e..25579935892d 100644 Binary files a/platform/icons/src/modules/sourceFolder.png and b/platform/icons/src/modules/sourceFolder.png differ diff --git a/platform/icons/src/modules/sourceFolder.svg b/platform/icons/src/modules/sourceFolder.svg new file mode 100644 index 000000000000..61055ce05ee4 --- /dev/null +++ b/platform/icons/src/modules/sourceFolder.svg @@ -0,0 +1,7 @@ + + sourceFolder + + + + + diff --git a/platform/icons/src/modules/sourceFolder@2x.png b/platform/icons/src/modules/sourceFolder@2x.png index cf1927d06e10..62e5d4d07843 100644 Binary files a/platform/icons/src/modules/sourceFolder@2x.png and b/platform/icons/src/modules/sourceFolder@2x.png differ diff --git a/platform/icons/src/modules/sourceFolder@2x.svg b/platform/icons/src/modules/sourceFolder@2x.svg new file mode 100644 index 000000000000..0679b7ab717e --- /dev/null +++ b/platform/icons/src/modules/sourceFolder@2x.svg @@ -0,0 +1,5 @@ + + sourceFolder@2x + + + diff --git a/platform/icons/src/modules/sourceRoot.png b/platform/icons/src/modules/sourceRoot.png index 4c9998629dab..34d1fbd08c74 100644 Binary files a/platform/icons/src/modules/sourceRoot.png and b/platform/icons/src/modules/sourceRoot.png differ diff --git a/platform/icons/src/modules/sourceRoot.svg b/platform/icons/src/modules/sourceRoot.svg new file mode 100644 index 000000000000..80270a375493 --- /dev/null +++ b/platform/icons/src/modules/sourceRoot.svg @@ -0,0 +1,6 @@ + + sourceRoot + + + + diff --git a/platform/icons/src/modules/sourceRoot@2x.png b/platform/icons/src/modules/sourceRoot@2x.png index 132421b45a0e..cf89466d1523 100644 Binary files a/platform/icons/src/modules/sourceRoot@2x.png and b/platform/icons/src/modules/sourceRoot@2x.png differ diff --git a/platform/icons/src/modules/sourceRoot@2x.svg b/platform/icons/src/modules/sourceRoot@2x.svg new file mode 100644 index 000000000000..d510705ee5cd --- /dev/null +++ b/platform/icons/src/modules/sourceRoot@2x.svg @@ -0,0 +1,6 @@ + + sourceRoot@2x + + + + diff --git a/platform/icons/src/modules/sources.png b/platform/icons/src/modules/sources.png index cac74d929640..720640d5a143 100644 Binary files a/platform/icons/src/modules/sources.png and b/platform/icons/src/modules/sources.png differ diff --git a/platform/icons/src/modules/sources.svg b/platform/icons/src/modules/sources.svg new file mode 100644 index 000000000000..e56e7968b5bd --- /dev/null +++ b/platform/icons/src/modules/sources.svg @@ -0,0 +1,10 @@ + + sources + + + + + + + + diff --git a/platform/icons/src/modules/sources@2x.png b/platform/icons/src/modules/sources@2x.png index 3a98915dcae6..548137eff45a 100644 Binary files a/platform/icons/src/modules/sources@2x.png and b/platform/icons/src/modules/sources@2x.png differ diff --git a/platform/icons/src/modules/sources@2x.svg b/platform/icons/src/modules/sources@2x.svg new file mode 100644 index 000000000000..97b6fbc6fbfc --- /dev/null +++ b/platform/icons/src/modules/sources@2x.svg @@ -0,0 +1,10 @@ + + sources@2x + + + + + + + + diff --git a/platform/icons/src/modules/testResourcesRoot.png b/platform/icons/src/modules/testResourcesRoot.png index ba94d2632ff8..1654d2fe7d4e 100644 Binary files a/platform/icons/src/modules/testResourcesRoot.png and b/platform/icons/src/modules/testResourcesRoot.png differ diff --git a/platform/icons/src/modules/testResourcesRoot.svg b/platform/icons/src/modules/testResourcesRoot.svg new file mode 100644 index 000000000000..e63c8574dfff --- /dev/null +++ b/platform/icons/src/modules/testResourcesRoot.svg @@ -0,0 +1,14 @@ + + testResourcesRoot + + + + + + + + + + + + diff --git a/platform/icons/src/modules/testResourcesRoot@2x.png b/platform/icons/src/modules/testResourcesRoot@2x.png index 258095f33e9e..282461036149 100644 Binary files a/platform/icons/src/modules/testResourcesRoot@2x.png and b/platform/icons/src/modules/testResourcesRoot@2x.png differ diff --git a/platform/icons/src/modules/testResourcesRoot@2x.svg b/platform/icons/src/modules/testResourcesRoot@2x.svg new file mode 100644 index 000000000000..f38b528e6f54 --- /dev/null +++ b/platform/icons/src/modules/testResourcesRoot@2x.svg @@ -0,0 +1,14 @@ + + testResourcesRoot@2x + + + + + + + + + + + + diff --git a/platform/icons/src/modules/testRoot.png b/platform/icons/src/modules/testRoot.png index e0cc91ee27d0..94a385ca3d41 100644 Binary files a/platform/icons/src/modules/testRoot.png and b/platform/icons/src/modules/testRoot.png differ diff --git a/platform/icons/src/modules/testRoot.svg b/platform/icons/src/modules/testRoot.svg new file mode 100644 index 000000000000..12e2d42db3b3 --- /dev/null +++ b/platform/icons/src/modules/testRoot.svg @@ -0,0 +1,6 @@ + + testRoot + + + + diff --git a/platform/icons/src/modules/testRoot@2x.png b/platform/icons/src/modules/testRoot@2x.png index a02498c63c9d..557af7fd3056 100644 Binary files a/platform/icons/src/modules/testRoot@2x.png and b/platform/icons/src/modules/testRoot@2x.png differ diff --git a/platform/icons/src/modules/testRoot@2x.svg b/platform/icons/src/modules/testRoot@2x.svg new file mode 100644 index 000000000000..57a808706ee7 --- /dev/null +++ b/platform/icons/src/modules/testRoot@2x.svg @@ -0,0 +1,6 @@ + + testRoot@2x + + + + diff --git a/platform/icons/src/modules/testSourceFolder.png b/platform/icons/src/modules/testSourceFolder.png index 412ee19caa18..a0eb98846553 100644 Binary files a/platform/icons/src/modules/testSourceFolder.png and b/platform/icons/src/modules/testSourceFolder.png differ diff --git a/platform/icons/src/modules/testSourceFolder.svg b/platform/icons/src/modules/testSourceFolder.svg new file mode 100644 index 000000000000..71a321c591f0 --- /dev/null +++ b/platform/icons/src/modules/testSourceFolder.svg @@ -0,0 +1,10 @@ + + testSourceFolder + + + + + + + + diff --git a/platform/icons/src/modules/testSourceFolder@2x.png b/platform/icons/src/modules/testSourceFolder@2x.png index 91179ff6d23f..91800344618b 100644 Binary files a/platform/icons/src/modules/testSourceFolder@2x.png and b/platform/icons/src/modules/testSourceFolder@2x.png differ diff --git a/platform/icons/src/modules/testSourceFolder@2x.svg b/platform/icons/src/modules/testSourceFolder@2x.svg new file mode 100644 index 000000000000..16c32a3746c2 --- /dev/null +++ b/platform/icons/src/modules/testSourceFolder@2x.svg @@ -0,0 +1,10 @@ + + testSourceFolder@2x + + + + + + + + diff --git a/platform/icons/src/modules/unmarkWebroot.png b/platform/icons/src/modules/unmarkWebroot.png index b5f129fe0081..a15189090ed5 100644 Binary files a/platform/icons/src/modules/unmarkWebroot.png and b/platform/icons/src/modules/unmarkWebroot.png differ diff --git a/platform/icons/src/modules/unmarkWebroot.svg b/platform/icons/src/modules/unmarkWebroot.svg new file mode 100644 index 000000000000..a03c04317783 --- /dev/null +++ b/platform/icons/src/modules/unmarkWebroot.svg @@ -0,0 +1,12 @@ + + unmarkWebroot + + + + + + + + + + diff --git a/platform/icons/src/modules/unmarkWebroot@2x.png b/platform/icons/src/modules/unmarkWebroot@2x.png index 6caa52ba0d74..75e756d1a5bb 100644 Binary files a/platform/icons/src/modules/unmarkWebroot@2x.png and b/platform/icons/src/modules/unmarkWebroot@2x.png differ diff --git a/platform/icons/src/modules/unmarkWebroot@2x.svg b/platform/icons/src/modules/unmarkWebroot@2x.svg new file mode 100644 index 000000000000..87a8cac79249 --- /dev/null +++ b/platform/icons/src/modules/unmarkWebroot@2x.svg @@ -0,0 +1,10 @@ + + unmarkWebroot@2x + + + + + + + + diff --git a/platform/icons/src/modules/webRoot.png b/platform/icons/src/modules/webRoot.png index ebae0f147db1..718800e644e7 100644 Binary files a/platform/icons/src/modules/webRoot.png and b/platform/icons/src/modules/webRoot.png differ diff --git a/platform/icons/src/modules/webRoot.svg b/platform/icons/src/modules/webRoot.svg new file mode 100644 index 000000000000..a79865d7297c --- /dev/null +++ b/platform/icons/src/modules/webRoot.svg @@ -0,0 +1,7 @@ + + webRoot + + + + + diff --git a/platform/icons/src/modules/webRoot@2x.png b/platform/icons/src/modules/webRoot@2x.png index 6b42f327e9f7..51f07acab79f 100644 Binary files a/platform/icons/src/modules/webRoot@2x.png and b/platform/icons/src/modules/webRoot@2x.png differ diff --git a/platform/icons/src/modules/webRoot@2x.svg b/platform/icons/src/modules/webRoot@2x.svg new file mode 100644 index 000000000000..b92b7e4ba5b4 --- /dev/null +++ b/platform/icons/src/modules/webRoot@2x.svg @@ -0,0 +1,9 @@ + + webRoot@2x + + + + + + + diff --git a/platform/icons/src/nodes/DataSource.png b/platform/icons/src/nodes/DataSource.png index a3be26670530..6fad36d3411c 100644 Binary files a/platform/icons/src/nodes/DataSource.png and b/platform/icons/src/nodes/DataSource.png differ diff --git a/platform/icons/src/nodes/DataSource@2x.png b/platform/icons/src/nodes/DataSource@2x.png index 529149066ce5..45c389ad7eea 100644 Binary files a/platform/icons/src/nodes/DataSource@2x.png and b/platform/icons/src/nodes/DataSource@2x.png differ diff --git a/platform/icons/src/nodes/DataTables.png b/platform/icons/src/nodes/DataTables.png index 2ee020a0ebf5..771ea11917ae 100644 Binary files a/platform/icons/src/nodes/DataTables.png and b/platform/icons/src/nodes/DataTables.png differ diff --git a/platform/icons/src/nodes/DataTables@2x.png b/platform/icons/src/nodes/DataTables@2x.png index 49475a82af35..37e2dd62ce3e 100644 Binary files a/platform/icons/src/nodes/DataTables@2x.png and b/platform/icons/src/nodes/DataTables@2x.png differ diff --git a/platform/icons/src/nodes/Module.png b/platform/icons/src/nodes/Module.png index 03395f08895c..58ef470d96c1 100644 Binary files a/platform/icons/src/nodes/Module.png and b/platform/icons/src/nodes/Module.png differ diff --git a/platform/icons/src/nodes/Module.svg b/platform/icons/src/nodes/Module.svg new file mode 100644 index 000000000000..422a96b6f014 --- /dev/null +++ b/platform/icons/src/nodes/Module.svg @@ -0,0 +1,11 @@ + + Module + + + + + + + + + diff --git a/platform/icons/src/nodes/Module@2x.png b/platform/icons/src/nodes/Module@2x.png index 9461927f630a..0088dcb725f0 100644 Binary files a/platform/icons/src/nodes/Module@2x.png and b/platform/icons/src/nodes/Module@2x.png differ diff --git a/platform/icons/src/nodes/Module@2x.svg b/platform/icons/src/nodes/Module@2x.svg new file mode 100644 index 000000000000..f30043c68ade --- /dev/null +++ b/platform/icons/src/nodes/Module@2x.svg @@ -0,0 +1,11 @@ + + Module@2x + + + + + + + + + diff --git a/platform/icons/src/nodes/SecurityRole.png b/platform/icons/src/nodes/SecurityRole.png index b9c4c02e52a2..b6249ec51748 100644 Binary files a/platform/icons/src/nodes/SecurityRole.png and b/platform/icons/src/nodes/SecurityRole.png differ diff --git a/platform/icons/src/nodes/SecurityRole@2x.png b/platform/icons/src/nodes/SecurityRole@2x.png index abd17790d393..3dcdac18ddc5 100644 Binary files a/platform/icons/src/nodes/SecurityRole@2x.png and b/platform/icons/src/nodes/SecurityRole@2x.png differ diff --git a/platform/icons/src/nodes/SecurityRole@2x_dark.png b/platform/icons/src/nodes/SecurityRole@2x_dark.png deleted file mode 100644 index 05501b46ae35..000000000000 Binary files a/platform/icons/src/nodes/SecurityRole@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/SecurityRole_dark.png b/platform/icons/src/nodes/SecurityRole_dark.png deleted file mode 100644 index 868a58927eb1..000000000000 Binary files a/platform/icons/src/nodes/SecurityRole_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/TreeClosed.png b/platform/icons/src/nodes/TreeClosed.png index c7933ec0b576..14b79f93c93d 100644 Binary files a/platform/icons/src/nodes/TreeClosed.png and b/platform/icons/src/nodes/TreeClosed.png differ diff --git a/platform/icons/src/nodes/TreeClosed.svg b/platform/icons/src/nodes/TreeClosed.svg new file mode 100644 index 000000000000..c2415c8e621b --- /dev/null +++ b/platform/icons/src/nodes/TreeClosed.svg @@ -0,0 +1,6 @@ + + folder + + + + diff --git a/platform/icons/src/nodes/TreeClosed@2x.png b/platform/icons/src/nodes/TreeClosed@2x.png index 87e26679f4b2..41a8bc8447ee 100644 Binary files a/platform/icons/src/nodes/TreeClosed@2x.png and b/platform/icons/src/nodes/TreeClosed@2x.png differ diff --git a/platform/icons/src/nodes/TreeClosed@2x.svg b/platform/icons/src/nodes/TreeClosed@2x.svg new file mode 100644 index 000000000000..c7372f904eab --- /dev/null +++ b/platform/icons/src/nodes/TreeClosed@2x.svg @@ -0,0 +1,6 @@ + + folder@2x + + + + diff --git a/platform/icons/src/nodes/TreeOpen.png b/platform/icons/src/nodes/TreeOpen.png index c7933ec0b576..14b79f93c93d 100644 Binary files a/platform/icons/src/nodes/TreeOpen.png and b/platform/icons/src/nodes/TreeOpen.png differ diff --git a/platform/icons/src/nodes/TreeOpen@2x.png b/platform/icons/src/nodes/TreeOpen@2x.png index 87e26679f4b2..41a8bc8447ee 100644 Binary files a/platform/icons/src/nodes/TreeOpen@2x.png and b/platform/icons/src/nodes/TreeOpen@2x.png differ diff --git a/platform/icons/src/nodes/abstractClass.png b/platform/icons/src/nodes/abstractClass.png index b634fab9a3ee..a73927320fdf 100644 Binary files a/platform/icons/src/nodes/abstractClass.png and b/platform/icons/src/nodes/abstractClass.png differ diff --git a/platform/icons/src/nodes/abstractClass.svg b/platform/icons/src/nodes/abstractClass.svg new file mode 100644 index 000000000000..4143b37b643d --- /dev/null +++ b/platform/icons/src/nodes/abstractClass.svg @@ -0,0 +1,9 @@ + + abstractClass + + + + + + + diff --git a/platform/icons/src/nodes/abstractClass@2x.png b/platform/icons/src/nodes/abstractClass@2x.png index 17927b72241f..cadde50090d7 100644 Binary files a/platform/icons/src/nodes/abstractClass@2x.png and b/platform/icons/src/nodes/abstractClass@2x.png differ diff --git a/platform/icons/src/nodes/abstractClass@2x.svg b/platform/icons/src/nodes/abstractClass@2x.svg new file mode 100644 index 000000000000..5532b4411142 --- /dev/null +++ b/platform/icons/src/nodes/abstractClass@2x.svg @@ -0,0 +1,9 @@ + + abstractClass@2x + + + + + + + diff --git a/platform/icons/src/nodes/abstractException.png b/platform/icons/src/nodes/abstractException.png index fa4c2d347055..4a3db0515191 100644 Binary files a/platform/icons/src/nodes/abstractException.png and b/platform/icons/src/nodes/abstractException.png differ diff --git a/platform/icons/src/nodes/abstractException.svg b/platform/icons/src/nodes/abstractException.svg new file mode 100644 index 000000000000..9921d8ed9f1e --- /dev/null +++ b/platform/icons/src/nodes/abstractException.svg @@ -0,0 +1,11 @@ + + abstractException + + + + + + + + + diff --git a/platform/icons/src/nodes/abstractException@2x.png b/platform/icons/src/nodes/abstractException@2x.png index 6733cd5658f2..9f0a04c525bf 100644 Binary files a/platform/icons/src/nodes/abstractException@2x.png and b/platform/icons/src/nodes/abstractException@2x.png differ diff --git a/platform/icons/src/nodes/abstractException@2x.svg b/platform/icons/src/nodes/abstractException@2x.svg new file mode 100644 index 000000000000..f1e51807580b --- /dev/null +++ b/platform/icons/src/nodes/abstractException@2x.svg @@ -0,0 +1,11 @@ + + abstractException@2x + + + + + + + + + diff --git a/platform/icons/src/nodes/abstractMethod.png b/platform/icons/src/nodes/abstractMethod.png index 65bb17da4577..5535098aa8f0 100644 Binary files a/platform/icons/src/nodes/abstractMethod.png and b/platform/icons/src/nodes/abstractMethod.png differ diff --git a/platform/icons/src/nodes/abstractMethod.svg b/platform/icons/src/nodes/abstractMethod.svg new file mode 100644 index 000000000000..82b0c71a6f58 --- /dev/null +++ b/platform/icons/src/nodes/abstractMethod.svg @@ -0,0 +1,11 @@ + + abstractMethod + + + + + + + + + diff --git a/platform/icons/src/nodes/abstractMethod@2x.png b/platform/icons/src/nodes/abstractMethod@2x.png index ab5c5ec55799..cfb1fc54fd64 100644 Binary files a/platform/icons/src/nodes/abstractMethod@2x.png and b/platform/icons/src/nodes/abstractMethod@2x.png differ diff --git a/platform/icons/src/nodes/abstractMethod@2x.svg b/platform/icons/src/nodes/abstractMethod@2x.svg new file mode 100644 index 000000000000..718e13b81953 --- /dev/null +++ b/platform/icons/src/nodes/abstractMethod@2x.svg @@ -0,0 +1,9 @@ + + abstractMethod@2x + + + + + + + diff --git a/platform/icons/src/nodes/advice.png b/platform/icons/src/nodes/advice.png index c8b26abca0a4..64b7d1daaaab 100644 Binary files a/platform/icons/src/nodes/advice.png and b/platform/icons/src/nodes/advice.png differ diff --git a/platform/icons/src/nodes/advice@2x.png b/platform/icons/src/nodes/advice@2x.png index aef37d03ec34..897d8192989a 100644 Binary files a/platform/icons/src/nodes/advice@2x.png and b/platform/icons/src/nodes/advice@2x.png differ diff --git a/platform/icons/src/nodes/advice@2x_dark.png b/platform/icons/src/nodes/advice@2x_dark.png deleted file mode 100644 index 94d856cf702b..000000000000 Binary files a/platform/icons/src/nodes/advice@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/advice_dark.png b/platform/icons/src/nodes/advice_dark.png deleted file mode 100644 index a880c49414d5..000000000000 Binary files a/platform/icons/src/nodes/advice_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/annotationtype.png b/platform/icons/src/nodes/annotationtype.png index 63115e4d2108..2a25be5ef5d2 100644 Binary files a/platform/icons/src/nodes/annotationtype.png and b/platform/icons/src/nodes/annotationtype.png differ diff --git a/platform/icons/src/nodes/annotationtype.svg b/platform/icons/src/nodes/annotationtype.svg new file mode 100644 index 000000000000..aa83c23b9a7d --- /dev/null +++ b/platform/icons/src/nodes/annotationtype.svg @@ -0,0 +1,13 @@ + + annotationtype + + + + + + + + + + + diff --git a/platform/icons/src/nodes/annotationtype@2x.png b/platform/icons/src/nodes/annotationtype@2x.png index 982b10005095..9032d69ff330 100644 Binary files a/platform/icons/src/nodes/annotationtype@2x.png and b/platform/icons/src/nodes/annotationtype@2x.png differ diff --git a/platform/icons/src/nodes/annotationtype@2x.svg b/platform/icons/src/nodes/annotationtype@2x.svg new file mode 100644 index 000000000000..32b6e1b78940 --- /dev/null +++ b/platform/icons/src/nodes/annotationtype@2x.svg @@ -0,0 +1,5 @@ + + annotationtype@2x + + + diff --git a/platform/icons/src/nodes/anonymousClass.png b/platform/icons/src/nodes/anonymousClass.png index f68c0208ecaa..faeedd87a526 100644 Binary files a/platform/icons/src/nodes/anonymousClass.png and b/platform/icons/src/nodes/anonymousClass.png differ diff --git a/platform/icons/src/nodes/anonymousClass.svg b/platform/icons/src/nodes/anonymousClass.svg new file mode 100644 index 000000000000..e7619bfeabd5 --- /dev/null +++ b/platform/icons/src/nodes/anonymousClass.svg @@ -0,0 +1,6 @@ + + anonymousClass + + + + diff --git a/platform/icons/src/nodes/anonymousClass@2x.png b/platform/icons/src/nodes/anonymousClass@2x.png index 3dbc13ecfba7..225a34185bc2 100644 Binary files a/platform/icons/src/nodes/anonymousClass@2x.png and b/platform/icons/src/nodes/anonymousClass@2x.png differ diff --git a/platform/icons/src/nodes/anonymousClass@2x.svg b/platform/icons/src/nodes/anonymousClass@2x.svg new file mode 100644 index 000000000000..8672a8c6bc7c --- /dev/null +++ b/platform/icons/src/nodes/anonymousClass@2x.svg @@ -0,0 +1,6 @@ + + anonymousClass@2x + + + + diff --git a/platform/icons/src/nodes/artifact.png b/platform/icons/src/nodes/artifact.png index 84b49e2539a3..cabeb1f2bd45 100644 Binary files a/platform/icons/src/nodes/artifact.png and b/platform/icons/src/nodes/artifact.png differ diff --git a/platform/icons/src/nodes/artifact@2x.png b/platform/icons/src/nodes/artifact@2x.png index 45565bf98884..1c85aba4062b 100644 Binary files a/platform/icons/src/nodes/artifact@2x.png and b/platform/icons/src/nodes/artifact@2x.png differ diff --git a/platform/icons/src/nodes/aspect.png b/platform/icons/src/nodes/aspect.png index 07896ecc9b25..febe3b06c794 100644 Binary files a/platform/icons/src/nodes/aspect.png and b/platform/icons/src/nodes/aspect.png differ diff --git a/platform/icons/src/nodes/aspect@2x.png b/platform/icons/src/nodes/aspect@2x.png index 7d388963efa7..efcb34208302 100644 Binary files a/platform/icons/src/nodes/aspect@2x.png and b/platform/icons/src/nodes/aspect@2x.png differ diff --git a/platform/icons/src/nodes/c_plocal.png b/platform/icons/src/nodes/c_plocal.png index 8f36dba192f2..4db90370b57f 100644 Binary files a/platform/icons/src/nodes/c_plocal.png and b/platform/icons/src/nodes/c_plocal.png differ diff --git a/platform/icons/src/nodes/c_plocal@2x.png b/platform/icons/src/nodes/c_plocal@2x.png index e4212284a59d..14cfb77a412e 100644 Binary files a/platform/icons/src/nodes/c_plocal@2x.png and b/platform/icons/src/nodes/c_plocal@2x.png differ diff --git a/platform/icons/src/nodes/c_private.png b/platform/icons/src/nodes/c_private.png index 700950f4461a..c07ea71ef730 100644 Binary files a/platform/icons/src/nodes/c_private.png and b/platform/icons/src/nodes/c_private.png differ diff --git a/platform/icons/src/nodes/c_private@2x.png b/platform/icons/src/nodes/c_private@2x.png index 31225bfceeee..fcd6f32edb66 100644 Binary files a/platform/icons/src/nodes/c_private@2x.png and b/platform/icons/src/nodes/c_private@2x.png differ diff --git a/platform/icons/src/nodes/c_protected.png b/platform/icons/src/nodes/c_protected.png index b3e1af68734e..ae1b4e92859d 100644 Binary files a/platform/icons/src/nodes/c_protected.png and b/platform/icons/src/nodes/c_protected.png differ diff --git a/platform/icons/src/nodes/c_protected@2x.png b/platform/icons/src/nodes/c_protected@2x.png index 1b37657e3de7..092cc2bfd59a 100644 Binary files a/platform/icons/src/nodes/c_protected@2x.png and b/platform/icons/src/nodes/c_protected@2x.png differ diff --git a/platform/icons/src/nodes/c_public.png b/platform/icons/src/nodes/c_public.png index dc3321d7e32d..f440a43a5d05 100644 Binary files a/platform/icons/src/nodes/c_public.png and b/platform/icons/src/nodes/c_public.png differ diff --git a/platform/icons/src/nodes/c_public@2x.png b/platform/icons/src/nodes/c_public@2x.png index 2e8bef6f6e74..416beaa510f6 100644 Binary files a/platform/icons/src/nodes/c_public@2x.png and b/platform/icons/src/nodes/c_public@2x.png differ diff --git a/platform/icons/src/nodes/class.png b/platform/icons/src/nodes/class.png index 98337ca8a14b..afe24da2d9ae 100644 Binary files a/platform/icons/src/nodes/class.png and b/platform/icons/src/nodes/class.png differ diff --git a/platform/icons/src/nodes/class.svg b/platform/icons/src/nodes/class.svg new file mode 100644 index 000000000000..5b5d4d926c1c --- /dev/null +++ b/platform/icons/src/nodes/class.svg @@ -0,0 +1,9 @@ + + class + + + + + + + diff --git a/platform/icons/src/nodes/class@2x.png b/platform/icons/src/nodes/class@2x.png index c1850285eb8c..7d6860a54f59 100644 Binary files a/platform/icons/src/nodes/class@2x.png and b/platform/icons/src/nodes/class@2x.png differ diff --git a/platform/icons/src/nodes/class@2x.svg b/platform/icons/src/nodes/class@2x.svg new file mode 100644 index 000000000000..606390360d68 --- /dev/null +++ b/platform/icons/src/nodes/class@2x.svg @@ -0,0 +1,9 @@ + + class@2x + + + + + + + diff --git a/platform/icons/src/nodes/classInitializer.png b/platform/icons/src/nodes/classInitializer.png index 7ec88939b6ad..85085b01a3e4 100644 Binary files a/platform/icons/src/nodes/classInitializer.png and b/platform/icons/src/nodes/classInitializer.png differ diff --git a/platform/icons/src/nodes/classInitializer.svg b/platform/icons/src/nodes/classInitializer.svg new file mode 100644 index 000000000000..540b81fae9f9 --- /dev/null +++ b/platform/icons/src/nodes/classInitializer.svg @@ -0,0 +1,10 @@ + + classInitializer + + + + + + + + diff --git a/platform/icons/src/nodes/classInitializer@2x.png b/platform/icons/src/nodes/classInitializer@2x.png index ad3371537a76..c1817e1c7c0a 100644 Binary files a/platform/icons/src/nodes/classInitializer@2x.png and b/platform/icons/src/nodes/classInitializer@2x.png differ diff --git a/platform/icons/src/nodes/classInitializer@2x.svg b/platform/icons/src/nodes/classInitializer@2x.svg new file mode 100644 index 000000000000..c245e1f9ae0f --- /dev/null +++ b/platform/icons/src/nodes/classInitializer@2x.svg @@ -0,0 +1,10 @@ + + classInitializer@2x + + + + + + + + diff --git a/platform/icons/src/nodes/compiledClassesFolder.png b/platform/icons/src/nodes/compiledClassesFolder.png index cdf8cad28422..6e04610b3c8a 100644 Binary files a/platform/icons/src/nodes/compiledClassesFolder.png and b/platform/icons/src/nodes/compiledClassesFolder.png differ diff --git a/platform/icons/src/nodes/compiledClassesFolder@2x.png b/platform/icons/src/nodes/compiledClassesFolder@2x.png index 38bda75893fc..50efb58e7380 100644 Binary files a/platform/icons/src/nodes/compiledClassesFolder@2x.png and b/platform/icons/src/nodes/compiledClassesFolder@2x.png differ diff --git a/platform/icons/src/nodes/compiledClassesFolder@2x_dark.png b/platform/icons/src/nodes/compiledClassesFolder@2x_dark.png deleted file mode 100644 index 59b2ef62c365..000000000000 Binary files a/platform/icons/src/nodes/compiledClassesFolder@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/compiledClassesFolder_dark.png b/platform/icons/src/nodes/compiledClassesFolder_dark.png deleted file mode 100644 index a8866e8698c8..000000000000 Binary files a/platform/icons/src/nodes/compiledClassesFolder_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/copyOfFolder.png b/platform/icons/src/nodes/copyOfFolder.png index 274487dfdda4..206ed6f2916f 100644 Binary files a/platform/icons/src/nodes/copyOfFolder.png and b/platform/icons/src/nodes/copyOfFolder.png differ diff --git a/platform/icons/src/nodes/copyOfFolder@2x.png b/platform/icons/src/nodes/copyOfFolder@2x.png index 3eab39281808..9567ab87b32f 100644 Binary files a/platform/icons/src/nodes/copyOfFolder@2x.png and b/platform/icons/src/nodes/copyOfFolder@2x.png differ diff --git a/platform/icons/src/nodes/customRegion.png b/platform/icons/src/nodes/customRegion.png index 944709320d08..1d4cc5c99e1a 100644 Binary files a/platform/icons/src/nodes/customRegion.png and b/platform/icons/src/nodes/customRegion.png differ diff --git a/platform/icons/src/nodes/customRegion@2x.png b/platform/icons/src/nodes/customRegion@2x.png index 24b5b4669483..ff3f48396f37 100644 Binary files a/platform/icons/src/nodes/customRegion@2x.png and b/platform/icons/src/nodes/customRegion@2x.png differ diff --git a/platform/icons/src/nodes/cvs_global.png b/platform/icons/src/nodes/cvs_global.png index 131c2b3fa223..b74ff10ba573 100644 Binary files a/platform/icons/src/nodes/cvs_global.png and b/platform/icons/src/nodes/cvs_global.png differ diff --git a/platform/icons/src/nodes/cvs_global@2x.png b/platform/icons/src/nodes/cvs_global@2x.png index 321e2f2db1f6..4ebe0ba4a7c6 100644 Binary files a/platform/icons/src/nodes/cvs_global@2x.png and b/platform/icons/src/nodes/cvs_global@2x.png differ diff --git a/platform/icons/src/nodes/cvs_roots.png b/platform/icons/src/nodes/cvs_roots.png index 88d558db42b6..5de59238c648 100644 Binary files a/platform/icons/src/nodes/cvs_roots.png and b/platform/icons/src/nodes/cvs_roots.png differ diff --git a/platform/icons/src/nodes/cvs_roots@2x.png b/platform/icons/src/nodes/cvs_roots@2x.png index a2c47a1531da..7b7bd5911862 100644 Binary files a/platform/icons/src/nodes/cvs_roots@2x.png and b/platform/icons/src/nodes/cvs_roots@2x.png differ diff --git a/platform/icons/src/nodes/dataColumn.png b/platform/icons/src/nodes/dataColumn.png index c298d2e92854..94178099b167 100644 Binary files a/platform/icons/src/nodes/dataColumn.png and b/platform/icons/src/nodes/dataColumn.png differ diff --git a/platform/icons/src/nodes/dataColumn@2x.png b/platform/icons/src/nodes/dataColumn@2x.png index 886eb39279b6..002e3694e9f7 100644 Binary files a/platform/icons/src/nodes/dataColumn@2x.png and b/platform/icons/src/nodes/dataColumn@2x.png differ diff --git a/platform/icons/src/nodes/dataSchema.png b/platform/icons/src/nodes/dataSchema.png index 7c9c24f16270..bd8e558c01d7 100644 Binary files a/platform/icons/src/nodes/dataSchema.png and b/platform/icons/src/nodes/dataSchema.png differ diff --git a/platform/icons/src/nodes/dataSchema@2x.png b/platform/icons/src/nodes/dataSchema@2x.png index d1f26b354e8e..1fc586bbdd79 100644 Binary files a/platform/icons/src/nodes/dataSchema@2x.png and b/platform/icons/src/nodes/dataSchema@2x.png differ diff --git a/platform/icons/src/nodes/dataSchema@2x_dark.png b/platform/icons/src/nodes/dataSchema@2x_dark.png deleted file mode 100644 index 2a5bb43af276..000000000000 Binary files a/platform/icons/src/nodes/dataSchema@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/dataSchema_dark.png b/platform/icons/src/nodes/dataSchema_dark.png deleted file mode 100644 index 98ae3056511c..000000000000 Binary files a/platform/icons/src/nodes/dataSchema_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/dataView.png b/platform/icons/src/nodes/dataView.png index 31e234b3c41c..ea1226bb5cf3 100644 Binary files a/platform/icons/src/nodes/dataView.png and b/platform/icons/src/nodes/dataView.png differ diff --git a/platform/icons/src/nodes/dataView@2x.png b/platform/icons/src/nodes/dataView@2x.png index 2161d8dba4bc..565929bffe62 100644 Binary files a/platform/icons/src/nodes/dataView@2x.png and b/platform/icons/src/nodes/dataView@2x.png differ diff --git a/platform/icons/src/nodes/dataView@2x_dark.png b/platform/icons/src/nodes/dataView@2x_dark.png deleted file mode 100644 index b7edc7cda5f6..000000000000 Binary files a/platform/icons/src/nodes/dataView@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/dataView_dark.png b/platform/icons/src/nodes/dataView_dark.png deleted file mode 100644 index c82a9c8d9b4b..000000000000 Binary files a/platform/icons/src/nodes/dataView_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/deploy.png b/platform/icons/src/nodes/deploy.png index c830dedb2b6d..599b1c180257 100644 Binary files a/platform/icons/src/nodes/deploy.png and b/platform/icons/src/nodes/deploy.png differ diff --git a/platform/icons/src/nodes/deploy@2x.png b/platform/icons/src/nodes/deploy@2x.png index 105ad09657a0..c5fa1d7e6e9a 100644 Binary files a/platform/icons/src/nodes/deploy@2x.png and b/platform/icons/src/nodes/deploy@2x.png differ diff --git a/platform/icons/src/nodes/desktop.png b/platform/icons/src/nodes/desktop.png index 87ff8cdbd5c7..cedf18eaabb8 100644 Binary files a/platform/icons/src/nodes/desktop.png and b/platform/icons/src/nodes/desktop.png differ diff --git a/platform/icons/src/nodes/desktop@2x.png b/platform/icons/src/nodes/desktop@2x.png index c789e0b9e9d9..13a112eaf16d 100644 Binary files a/platform/icons/src/nodes/desktop@2x.png and b/platform/icons/src/nodes/desktop@2x.png differ diff --git a/platform/icons/src/nodes/disabledPointcut.png b/platform/icons/src/nodes/disabledPointcut.png index c6446c307798..f3c413943e48 100644 Binary files a/platform/icons/src/nodes/disabledPointcut.png and b/platform/icons/src/nodes/disabledPointcut.png differ diff --git a/platform/icons/src/nodes/disabledPointcut@2x.png b/platform/icons/src/nodes/disabledPointcut@2x.png index 868956673f14..6207496a6c96 100644 Binary files a/platform/icons/src/nodes/disabledPointcut@2x.png and b/platform/icons/src/nodes/disabledPointcut@2x.png differ diff --git a/platform/icons/src/nodes/ejb.png b/platform/icons/src/nodes/ejb.png index 52e7bb1e6475..b53a47dd7d69 100644 Binary files a/platform/icons/src/nodes/ejb.png and b/platform/icons/src/nodes/ejb.png differ diff --git a/platform/icons/src/nodes/ejb@2x.png b/platform/icons/src/nodes/ejb@2x.png index b579a5684bac..cb5017f70be7 100644 Binary files a/platform/icons/src/nodes/ejb@2x.png and b/platform/icons/src/nodes/ejb@2x.png differ diff --git a/platform/icons/src/nodes/ejbBusinessMethod.png b/platform/icons/src/nodes/ejbBusinessMethod.png index 69275e0a59d6..67b80e24f75e 100644 Binary files a/platform/icons/src/nodes/ejbBusinessMethod.png and b/platform/icons/src/nodes/ejbBusinessMethod.png differ diff --git a/platform/icons/src/nodes/ejbBusinessMethod@2x.png b/platform/icons/src/nodes/ejbBusinessMethod@2x.png index 8b9369201597..00681b6cc36c 100644 Binary files a/platform/icons/src/nodes/ejbBusinessMethod@2x.png and b/platform/icons/src/nodes/ejbBusinessMethod@2x.png differ diff --git a/platform/icons/src/nodes/ejbCmpField.png b/platform/icons/src/nodes/ejbCmpField.png index 09c8ffef68ac..eea4cda61d61 100644 Binary files a/platform/icons/src/nodes/ejbCmpField.png and b/platform/icons/src/nodes/ejbCmpField.png differ diff --git a/platform/icons/src/nodes/ejbCmpField@2x.png b/platform/icons/src/nodes/ejbCmpField@2x.png index ebe22927db65..6eab43f470a0 100644 Binary files a/platform/icons/src/nodes/ejbCmpField@2x.png and b/platform/icons/src/nodes/ejbCmpField@2x.png differ diff --git a/platform/icons/src/nodes/ejbCmrField.png b/platform/icons/src/nodes/ejbCmrField.png index 518debf73a61..a61bfe631d0c 100644 Binary files a/platform/icons/src/nodes/ejbCmrField.png and b/platform/icons/src/nodes/ejbCmrField.png differ diff --git a/platform/icons/src/nodes/ejbCmrField@2x.png b/platform/icons/src/nodes/ejbCmrField@2x.png index 1c8e23623c43..f5ed3f61243c 100644 Binary files a/platform/icons/src/nodes/ejbCmrField@2x.png and b/platform/icons/src/nodes/ejbCmrField@2x.png differ diff --git a/platform/icons/src/nodes/ejbCreateMethod.png b/platform/icons/src/nodes/ejbCreateMethod.png index d360fa639f18..21b0be34232c 100644 Binary files a/platform/icons/src/nodes/ejbCreateMethod.png and b/platform/icons/src/nodes/ejbCreateMethod.png differ diff --git a/platform/icons/src/nodes/ejbCreateMethod@2x.png b/platform/icons/src/nodes/ejbCreateMethod@2x.png index 6e98320a0dbd..b759a7754515 100644 Binary files a/platform/icons/src/nodes/ejbCreateMethod@2x.png and b/platform/icons/src/nodes/ejbCreateMethod@2x.png differ diff --git a/platform/icons/src/nodes/ejbCreateMethod@2x_dark.png b/platform/icons/src/nodes/ejbCreateMethod@2x_dark.png deleted file mode 100644 index c74fc51b7525..000000000000 Binary files a/platform/icons/src/nodes/ejbCreateMethod@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/ejbCreateMethod_dark.png b/platform/icons/src/nodes/ejbCreateMethod_dark.png deleted file mode 100644 index 9fe6a71aa421..000000000000 Binary files a/platform/icons/src/nodes/ejbCreateMethod_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/ejbFinderMethod.png b/platform/icons/src/nodes/ejbFinderMethod.png index ffa862abf564..b60fc2defa9b 100644 Binary files a/platform/icons/src/nodes/ejbFinderMethod.png and b/platform/icons/src/nodes/ejbFinderMethod.png differ diff --git a/platform/icons/src/nodes/ejbFinderMethod@2x.png b/platform/icons/src/nodes/ejbFinderMethod@2x.png index 70c622a45359..27cb8ad34f58 100644 Binary files a/platform/icons/src/nodes/ejbFinderMethod@2x.png and b/platform/icons/src/nodes/ejbFinderMethod@2x.png differ diff --git a/platform/icons/src/nodes/ejbFinderMethod@2x_dark.png b/platform/icons/src/nodes/ejbFinderMethod@2x_dark.png deleted file mode 100644 index a4c5d352920d..000000000000 Binary files a/platform/icons/src/nodes/ejbFinderMethod@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/ejbFinderMethod_dark.png b/platform/icons/src/nodes/ejbFinderMethod_dark.png deleted file mode 100644 index a98b78035aa1..000000000000 Binary files a/platform/icons/src/nodes/ejbFinderMethod_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/ejbPrimaryKeyClass.png b/platform/icons/src/nodes/ejbPrimaryKeyClass.png index 1d61839900ca..fcb4292ecd7d 100644 Binary files a/platform/icons/src/nodes/ejbPrimaryKeyClass.png and b/platform/icons/src/nodes/ejbPrimaryKeyClass.png differ diff --git a/platform/icons/src/nodes/ejbPrimaryKeyClass@2x.png b/platform/icons/src/nodes/ejbPrimaryKeyClass@2x.png index d1ae16617e24..dde9dad8105b 100644 Binary files a/platform/icons/src/nodes/ejbPrimaryKeyClass@2x.png and b/platform/icons/src/nodes/ejbPrimaryKeyClass@2x.png differ diff --git a/platform/icons/src/nodes/ejbPrimaryKeyClass@2x_dark.png b/platform/icons/src/nodes/ejbPrimaryKeyClass@2x_dark.png deleted file mode 100644 index 4f132212ca9c..000000000000 Binary files a/platform/icons/src/nodes/ejbPrimaryKeyClass@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/ejbPrimaryKeyClass_dark.png b/platform/icons/src/nodes/ejbPrimaryKeyClass_dark.png deleted file mode 100644 index 9e272c64675e..000000000000 Binary files a/platform/icons/src/nodes/ejbPrimaryKeyClass_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/ejbReference.png b/platform/icons/src/nodes/ejbReference.png index 1aec01cb5e59..23d81d6f5038 100644 Binary files a/platform/icons/src/nodes/ejbReference.png and b/platform/icons/src/nodes/ejbReference.png differ diff --git a/platform/icons/src/nodes/ejbReference@2x.png b/platform/icons/src/nodes/ejbReference@2x.png index 312ed07ffe3d..82bab4f4c4ab 100644 Binary files a/platform/icons/src/nodes/ejbReference@2x.png and b/platform/icons/src/nodes/ejbReference@2x.png differ diff --git a/platform/icons/src/nodes/entryPoints.png b/platform/icons/src/nodes/entryPoints.png index 9494f2d0c72e..d34f05ab4f9b 100644 Binary files a/platform/icons/src/nodes/entryPoints.png and b/platform/icons/src/nodes/entryPoints.png differ diff --git a/platform/icons/src/nodes/entryPoints@2x.png b/platform/icons/src/nodes/entryPoints@2x.png index 0c4d123a1112..e657228bac18 100644 Binary files a/platform/icons/src/nodes/entryPoints@2x.png and b/platform/icons/src/nodes/entryPoints@2x.png differ diff --git a/platform/icons/src/nodes/enum.png b/platform/icons/src/nodes/enum.png index 4c3395aaa088..5c206c8045b5 100644 Binary files a/platform/icons/src/nodes/enum.png and b/platform/icons/src/nodes/enum.png differ diff --git a/platform/icons/src/nodes/enum.svg b/platform/icons/src/nodes/enum.svg new file mode 100644 index 000000000000..d926e8744db1 --- /dev/null +++ b/platform/icons/src/nodes/enum.svg @@ -0,0 +1,7 @@ + + enum + + + + + diff --git a/platform/icons/src/nodes/enum@2x.png b/platform/icons/src/nodes/enum@2x.png index 7945a770b4ae..575ed3a385eb 100644 Binary files a/platform/icons/src/nodes/enum@2x.png and b/platform/icons/src/nodes/enum@2x.png differ diff --git a/platform/icons/src/nodes/enum@2x.svg b/platform/icons/src/nodes/enum@2x.svg new file mode 100644 index 000000000000..58b7f6c283ba --- /dev/null +++ b/platform/icons/src/nodes/enum@2x.svg @@ -0,0 +1,7 @@ + + enum@2x + + + + + diff --git a/platform/icons/src/nodes/errorIntroduction.png b/platform/icons/src/nodes/errorIntroduction.png index bdca36e2deb9..ba834d794602 100644 Binary files a/platform/icons/src/nodes/errorIntroduction.png and b/platform/icons/src/nodes/errorIntroduction.png differ diff --git a/platform/icons/src/nodes/errorIntroduction@2x.png b/platform/icons/src/nodes/errorIntroduction@2x.png index 9ccf3bffec20..e4d808b4b49a 100644 Binary files a/platform/icons/src/nodes/errorIntroduction@2x.png and b/platform/icons/src/nodes/errorIntroduction@2x.png differ diff --git a/platform/icons/src/nodes/errorMark.png b/platform/icons/src/nodes/errorMark.png index a05eb087b8e9..d606a8de0bdb 100644 Binary files a/platform/icons/src/nodes/errorMark.png and b/platform/icons/src/nodes/errorMark.png differ diff --git a/platform/icons/src/nodes/errorMark@2x.png b/platform/icons/src/nodes/errorMark@2x.png index 11a6b2f99827..d25f8e958733 100644 Binary files a/platform/icons/src/nodes/errorMark@2x.png and b/platform/icons/src/nodes/errorMark@2x.png differ diff --git a/platform/icons/src/nodes/errorMark@2x_dark.png b/platform/icons/src/nodes/errorMark@2x_dark.png deleted file mode 100644 index f0a16ec084af..000000000000 Binary files a/platform/icons/src/nodes/errorMark@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/errorMark_dark.png b/platform/icons/src/nodes/errorMark_dark.png deleted file mode 100644 index 6b0014462a40..000000000000 Binary files a/platform/icons/src/nodes/errorMark_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/exceptionClass.png b/platform/icons/src/nodes/exceptionClass.png index a3736911d988..9c4b50cb93ed 100644 Binary files a/platform/icons/src/nodes/exceptionClass.png and b/platform/icons/src/nodes/exceptionClass.png differ diff --git a/platform/icons/src/nodes/exceptionClass.svg b/platform/icons/src/nodes/exceptionClass.svg new file mode 100644 index 000000000000..d44a1385707f --- /dev/null +++ b/platform/icons/src/nodes/exceptionClass.svg @@ -0,0 +1,11 @@ + + exceptionClass + + + + + + + + + diff --git a/platform/icons/src/nodes/exceptionClass@2x.png b/platform/icons/src/nodes/exceptionClass@2x.png index a050b47ed11a..67fe55b5d2d7 100644 Binary files a/platform/icons/src/nodes/exceptionClass@2x.png and b/platform/icons/src/nodes/exceptionClass@2x.png differ diff --git a/platform/icons/src/nodes/exceptionClass@2x.svg b/platform/icons/src/nodes/exceptionClass@2x.svg new file mode 100644 index 000000000000..2b3f7fb39ec7 --- /dev/null +++ b/platform/icons/src/nodes/exceptionClass@2x.svg @@ -0,0 +1,11 @@ + + exceptionClass@2x + + + + + + + + + diff --git a/platform/icons/src/nodes/excludedFromCompile.png b/platform/icons/src/nodes/excludedFromCompile.png index 78636a57165f..ae390a610b8c 100644 Binary files a/platform/icons/src/nodes/excludedFromCompile.png and b/platform/icons/src/nodes/excludedFromCompile.png differ diff --git a/platform/icons/src/nodes/excludedFromCompile@2x.png b/platform/icons/src/nodes/excludedFromCompile@2x.png index 660c825502a1..09b3bf68c7d9 100644 Binary files a/platform/icons/src/nodes/excludedFromCompile@2x.png and b/platform/icons/src/nodes/excludedFromCompile@2x.png differ diff --git a/platform/icons/src/nodes/excludedFromCompile@2x_dark.png b/platform/icons/src/nodes/excludedFromCompile@2x_dark.png deleted file mode 100644 index 41a1fcf2a185..000000000000 Binary files a/platform/icons/src/nodes/excludedFromCompile@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/excludedFromCompile_dark.png b/platform/icons/src/nodes/excludedFromCompile_dark.png deleted file mode 100644 index 4d6efbb6af96..000000000000 Binary files a/platform/icons/src/nodes/excludedFromCompile_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/extractedFolder.png b/platform/icons/src/nodes/extractedFolder.png index efe3736ad7af..a0cf2c75314b 100644 Binary files a/platform/icons/src/nodes/extractedFolder.png and b/platform/icons/src/nodes/extractedFolder.png differ diff --git a/platform/icons/src/nodes/extractedFolder@2x.png b/platform/icons/src/nodes/extractedFolder@2x.png index 7314f79db8ed..75cf4002adc2 100644 Binary files a/platform/icons/src/nodes/extractedFolder@2x.png and b/platform/icons/src/nodes/extractedFolder@2x.png differ diff --git a/platform/icons/src/nodes/extractedFolder@2x_dark.png b/platform/icons/src/nodes/extractedFolder@2x_dark.png deleted file mode 100644 index 1c3aaae597db..000000000000 Binary files a/platform/icons/src/nodes/extractedFolder@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/extractedFolder_dark.png b/platform/icons/src/nodes/extractedFolder_dark.png deleted file mode 100644 index 6880d030614b..000000000000 Binary files a/platform/icons/src/nodes/extractedFolder_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/field.png b/platform/icons/src/nodes/field.png index 7c91fcfc5b7f..b5a15b33a53c 100644 Binary files a/platform/icons/src/nodes/field.png and b/platform/icons/src/nodes/field.png differ diff --git a/platform/icons/src/nodes/field.svg b/platform/icons/src/nodes/field.svg new file mode 100644 index 000000000000..c621debe828c --- /dev/null +++ b/platform/icons/src/nodes/field.svg @@ -0,0 +1,17 @@ + + field + + + + + + + + + + + + + + + diff --git a/platform/icons/src/nodes/field@2x.png b/platform/icons/src/nodes/field@2x.png index f55d6f6cddd2..555dfee7f4a1 100644 Binary files a/platform/icons/src/nodes/field@2x.png and b/platform/icons/src/nodes/field@2x.png differ diff --git a/platform/icons/src/nodes/field@2x.svg b/platform/icons/src/nodes/field@2x.svg new file mode 100644 index 000000000000..1a7e6ee37a80 --- /dev/null +++ b/platform/icons/src/nodes/field@2x.svg @@ -0,0 +1,11 @@ + + field@2x + + + + + + + + + diff --git a/platform/icons/src/nodes/fieldPK.png b/platform/icons/src/nodes/fieldPK.png index c395c9d5893e..0f0a5cd57e89 100644 Binary files a/platform/icons/src/nodes/fieldPK.png and b/platform/icons/src/nodes/fieldPK.png differ diff --git a/platform/icons/src/nodes/fieldPK@2x.png b/platform/icons/src/nodes/fieldPK@2x.png index 379f65052f4c..6c141eaa7d9d 100644 Binary files a/platform/icons/src/nodes/fieldPK@2x.png and b/platform/icons/src/nodes/fieldPK@2x.png differ diff --git a/platform/icons/src/nodes/fieldPK@2x_dark.png b/platform/icons/src/nodes/fieldPK@2x_dark.png deleted file mode 100644 index 3c6326eb6293..000000000000 Binary files a/platform/icons/src/nodes/fieldPK@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/fieldPK_dark.png b/platform/icons/src/nodes/fieldPK_dark.png deleted file mode 100644 index 7d8fe4dcdfa9..000000000000 Binary files a/platform/icons/src/nodes/fieldPK_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/finalMark.png b/platform/icons/src/nodes/finalMark.png index 07108b11e771..46528820f11c 100644 Binary files a/platform/icons/src/nodes/finalMark.png and b/platform/icons/src/nodes/finalMark.png differ diff --git a/platform/icons/src/nodes/finalMark@2x.png b/platform/icons/src/nodes/finalMark@2x.png index b352d6e880b2..74a829a70f91 100644 Binary files a/platform/icons/src/nodes/finalMark@2x.png and b/platform/icons/src/nodes/finalMark@2x.png differ diff --git a/platform/icons/src/nodes/finalMark@2x_dark.png b/platform/icons/src/nodes/finalMark@2x_dark.png deleted file mode 100644 index 7191a2005f0e..000000000000 Binary files a/platform/icons/src/nodes/finalMark@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/finalMark_dark.png b/platform/icons/src/nodes/finalMark_dark.png deleted file mode 100644 index e66746abe465..000000000000 Binary files a/platform/icons/src/nodes/finalMark_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/folder.png b/platform/icons/src/nodes/folder.png index c7933ec0b576..14b79f93c93d 100644 Binary files a/platform/icons/src/nodes/folder.png and b/platform/icons/src/nodes/folder.png differ diff --git a/platform/icons/src/nodes/folder.svg b/platform/icons/src/nodes/folder.svg new file mode 100644 index 000000000000..150f6f487934 --- /dev/null +++ b/platform/icons/src/nodes/folder.svg @@ -0,0 +1,6 @@ + + folder + + + + diff --git a/platform/icons/src/nodes/folder@2x.png b/platform/icons/src/nodes/folder@2x.png index 87e26679f4b2..41a8bc8447ee 100644 Binary files a/platform/icons/src/nodes/folder@2x.png and b/platform/icons/src/nodes/folder@2x.png differ diff --git a/platform/icons/src/nodes/folder@2x.svg b/platform/icons/src/nodes/folder@2x.svg new file mode 100644 index 000000000000..aba2262d499c --- /dev/null +++ b/platform/icons/src/nodes/folder@2x.svg @@ -0,0 +1,6 @@ + + folder@2x + + + + diff --git a/platform/icons/src/nodes/function.png b/platform/icons/src/nodes/function.png index 056b38c4bf34..095800cf8d46 100644 Binary files a/platform/icons/src/nodes/function.png and b/platform/icons/src/nodes/function.png differ diff --git a/platform/icons/src/nodes/function.svg b/platform/icons/src/nodes/function.svg new file mode 100644 index 000000000000..b55c5d00a02c --- /dev/null +++ b/platform/icons/src/nodes/function.svg @@ -0,0 +1,9 @@ + + function + + + + + + + diff --git a/platform/icons/src/nodes/function@2x.png b/platform/icons/src/nodes/function@2x.png index a1806a522a92..82f16a416986 100644 Binary files a/platform/icons/src/nodes/function@2x.png and b/platform/icons/src/nodes/function@2x.png differ diff --git a/platform/icons/src/nodes/function@2x.svg b/platform/icons/src/nodes/function@2x.svg new file mode 100644 index 000000000000..073ec7f4429c --- /dev/null +++ b/platform/icons/src/nodes/function@2x.svg @@ -0,0 +1,7 @@ + + function@2x + + + + + diff --git a/platform/icons/src/nodes/homeFolder.png b/platform/icons/src/nodes/homeFolder.png index e0038480ced0..d47f59be0696 100644 Binary files a/platform/icons/src/nodes/homeFolder.png and b/platform/icons/src/nodes/homeFolder.png differ diff --git a/platform/icons/src/nodes/homeFolder@2x.png b/platform/icons/src/nodes/homeFolder@2x.png index b2f3d5f1e6c3..a706868a695a 100644 Binary files a/platform/icons/src/nodes/homeFolder@2x.png and b/platform/icons/src/nodes/homeFolder@2x.png differ diff --git a/platform/icons/src/nodes/ideaModule.png b/platform/icons/src/nodes/ideaModule.png index e125b1845e23..e8baa78af5e3 100644 Binary files a/platform/icons/src/nodes/ideaModule.png and b/platform/icons/src/nodes/ideaModule.png differ diff --git a/platform/icons/src/nodes/ideaModule.svg b/platform/icons/src/nodes/ideaModule.svg new file mode 100644 index 000000000000..62ec7d365425 --- /dev/null +++ b/platform/icons/src/nodes/ideaModule.svg @@ -0,0 +1,13 @@ + + ideaModule + + + + + + + + + + + diff --git a/platform/icons/src/nodes/ideaModule@2x.png b/platform/icons/src/nodes/ideaModule@2x.png index 3566e54bf6a2..d21693b8effd 100644 Binary files a/platform/icons/src/nodes/ideaModule@2x.png and b/platform/icons/src/nodes/ideaModule@2x.png differ diff --git a/platform/icons/src/nodes/ideaModule@2x.svg b/platform/icons/src/nodes/ideaModule@2x.svg new file mode 100644 index 000000000000..73641cdc91f0 --- /dev/null +++ b/platform/icons/src/nodes/ideaModule@2x.svg @@ -0,0 +1,13 @@ + + ideaModule@2x + + + + + + + + + + + diff --git a/platform/icons/src/nodes/ideaModule@2x_dark.png b/platform/icons/src/nodes/ideaModule@2x_dark.png deleted file mode 100644 index 1698eefa505e..000000000000 Binary files a/platform/icons/src/nodes/ideaModule@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/ideaModule_dark.png b/platform/icons/src/nodes/ideaModule_dark.png deleted file mode 100644 index 65d287b91b1b..000000000000 Binary files a/platform/icons/src/nodes/ideaModule_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/ideaProject.png b/platform/icons/src/nodes/ideaProject.png index f4b1dea8922d..94357674a957 100644 Binary files a/platform/icons/src/nodes/ideaProject.png and b/platform/icons/src/nodes/ideaProject.png differ diff --git a/platform/icons/src/nodes/ideaProject.svg b/platform/icons/src/nodes/ideaProject.svg new file mode 100644 index 000000000000..c7691060ef8b --- /dev/null +++ b/platform/icons/src/nodes/ideaProject.svg @@ -0,0 +1,12 @@ + + ideaProject + + + + + + + + + + diff --git a/platform/icons/src/nodes/ideaProject@2x.png b/platform/icons/src/nodes/ideaProject@2x.png index 49809d5b3563..34c0d4ba170d 100644 Binary files a/platform/icons/src/nodes/ideaProject@2x.png and b/platform/icons/src/nodes/ideaProject@2x.png differ diff --git a/platform/icons/src/nodes/ideaProject@2x.svg b/platform/icons/src/nodes/ideaProject@2x.svg new file mode 100644 index 000000000000..987894277a1c --- /dev/null +++ b/platform/icons/src/nodes/ideaProject@2x.svg @@ -0,0 +1,12 @@ + + ideaProject@2x + + + + + + + + + + diff --git a/platform/icons/src/nodes/ideaProject@2x_dark.png b/platform/icons/src/nodes/ideaProject@2x_dark.png deleted file mode 100644 index 1231559abca3..000000000000 Binary files a/platform/icons/src/nodes/ideaProject@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/ideaProject_dark.png b/platform/icons/src/nodes/ideaProject_dark.png deleted file mode 100644 index bff041062f01..000000000000 Binary files a/platform/icons/src/nodes/ideaProject_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/inspectionResults.png b/platform/icons/src/nodes/inspectionResults.png index a77b4aa64f9f..0799e7dc2a24 100644 Binary files a/platform/icons/src/nodes/inspectionResults.png and b/platform/icons/src/nodes/inspectionResults.png differ diff --git a/platform/icons/src/nodes/inspectionResults@2x.png b/platform/icons/src/nodes/inspectionResults@2x.png index a7e87d57ca49..6ec676ab70e9 100644 Binary files a/platform/icons/src/nodes/inspectionResults@2x.png and b/platform/icons/src/nodes/inspectionResults@2x.png differ diff --git a/platform/icons/src/nodes/interface.png b/platform/icons/src/nodes/interface.png index f98b1aa26a9d..cc9e10b2ca9a 100644 Binary files a/platform/icons/src/nodes/interface.png and b/platform/icons/src/nodes/interface.png differ diff --git a/platform/icons/src/nodes/interface.svg b/platform/icons/src/nodes/interface.svg new file mode 100644 index 000000000000..c6ee58bf7103 --- /dev/null +++ b/platform/icons/src/nodes/interface.svg @@ -0,0 +1,12 @@ + + interface + + + + + + + + + + diff --git a/platform/icons/src/nodes/interface@2x.png b/platform/icons/src/nodes/interface@2x.png index fdebfd6be32c..007046767d98 100644 Binary files a/platform/icons/src/nodes/interface@2x.png and b/platform/icons/src/nodes/interface@2x.png differ diff --git a/platform/icons/src/nodes/interface@2x.svg b/platform/icons/src/nodes/interface@2x.svg new file mode 100644 index 000000000000..d7fba46a1127 --- /dev/null +++ b/platform/icons/src/nodes/interface@2x.svg @@ -0,0 +1,11 @@ + + interface@2x + + + + + + + + + diff --git a/platform/icons/src/nodes/j2eeParameter.png b/platform/icons/src/nodes/j2eeParameter.png index 7ec88939b6ad..85085b01a3e4 100644 Binary files a/platform/icons/src/nodes/j2eeParameter.png and b/platform/icons/src/nodes/j2eeParameter.png differ diff --git a/platform/icons/src/nodes/j2eeParameter@2x.png b/platform/icons/src/nodes/j2eeParameter@2x.png index ad3371537a76..c1817e1c7c0a 100644 Binary files a/platform/icons/src/nodes/j2eeParameter@2x.png and b/platform/icons/src/nodes/j2eeParameter@2x.png differ diff --git a/platform/icons/src/nodes/jarDirectory.png b/platform/icons/src/nodes/jarDirectory.png index 9d519159ba94..4a724bfc8a36 100644 Binary files a/platform/icons/src/nodes/jarDirectory.png and b/platform/icons/src/nodes/jarDirectory.png differ diff --git a/platform/icons/src/nodes/jarDirectory@2x.png b/platform/icons/src/nodes/jarDirectory@2x.png index 070ed43835c3..9bedcf0cb5f6 100644 Binary files a/platform/icons/src/nodes/jarDirectory@2x.png and b/platform/icons/src/nodes/jarDirectory@2x.png differ diff --git a/platform/icons/src/nodes/jarDirectory@2x_dark.png b/platform/icons/src/nodes/jarDirectory@2x_dark.png deleted file mode 100644 index 204c2dabd486..000000000000 Binary files a/platform/icons/src/nodes/jarDirectory@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/jarDirectory_dark.png b/platform/icons/src/nodes/jarDirectory_dark.png deleted file mode 100644 index 6e0de1651c59..000000000000 Binary files a/platform/icons/src/nodes/jarDirectory_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/javaDocFolder.png b/platform/icons/src/nodes/javaDocFolder.png index 7c4af45ce291..87b6e95bf64c 100644 Binary files a/platform/icons/src/nodes/javaDocFolder.png and b/platform/icons/src/nodes/javaDocFolder.png differ diff --git a/platform/icons/src/nodes/javaDocFolder@2x.png b/platform/icons/src/nodes/javaDocFolder@2x.png index 4776453c0f79..64e475f29fa9 100644 Binary files a/platform/icons/src/nodes/javaDocFolder@2x.png and b/platform/icons/src/nodes/javaDocFolder@2x.png differ diff --git a/platform/icons/src/nodes/javaDocFolder@2x_dark.png b/platform/icons/src/nodes/javaDocFolder@2x_dark.png deleted file mode 100644 index 635fb96cc95e..000000000000 Binary files a/platform/icons/src/nodes/javaDocFolder@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/javaDocFolder_dark.png b/platform/icons/src/nodes/javaDocFolder_dark.png deleted file mode 100644 index 32156bf49a74..000000000000 Binary files a/platform/icons/src/nodes/javaDocFolder_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/jsf/component.png b/platform/icons/src/nodes/jsf/component.png index bc1bab9cfe5d..b3961dd3832d 100644 Binary files a/platform/icons/src/nodes/jsf/component.png and b/platform/icons/src/nodes/jsf/component.png differ diff --git a/platform/icons/src/nodes/jsf/component@2x.png b/platform/icons/src/nodes/jsf/component@2x.png index 35236c761ee7..d4dc8e41cc31 100644 Binary files a/platform/icons/src/nodes/jsf/component@2x.png and b/platform/icons/src/nodes/jsf/component@2x.png differ diff --git a/platform/icons/src/nodes/jsf/converter.png b/platform/icons/src/nodes/jsf/converter.png index c7133ab286cc..941c30a946bc 100644 Binary files a/platform/icons/src/nodes/jsf/converter.png and b/platform/icons/src/nodes/jsf/converter.png differ diff --git a/platform/icons/src/nodes/jsf/converter@2x.png b/platform/icons/src/nodes/jsf/converter@2x.png index 118cf98fc597..e500a2d818b7 100644 Binary files a/platform/icons/src/nodes/jsf/converter@2x.png and b/platform/icons/src/nodes/jsf/converter@2x.png differ diff --git a/platform/icons/src/nodes/jsf/converter@2x_dark.png b/platform/icons/src/nodes/jsf/converter@2x_dark.png deleted file mode 100644 index 3d0c7c03f26d..000000000000 Binary files a/platform/icons/src/nodes/jsf/converter@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/jsf/converter_dark.png b/platform/icons/src/nodes/jsf/converter_dark.png deleted file mode 100644 index 0c7a8f9d1df6..000000000000 Binary files a/platform/icons/src/nodes/jsf/converter_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/jsf/general.png b/platform/icons/src/nodes/jsf/general.png index 33cd4cb002ee..40093dc6b1c5 100644 Binary files a/platform/icons/src/nodes/jsf/general.png and b/platform/icons/src/nodes/jsf/general.png differ diff --git a/platform/icons/src/nodes/jsf/general@2x.png b/platform/icons/src/nodes/jsf/general@2x.png index 313ba25300cb..d48301fddb0a 100644 Binary files a/platform/icons/src/nodes/jsf/general@2x.png and b/platform/icons/src/nodes/jsf/general@2x.png differ diff --git a/platform/icons/src/nodes/jsf/general@2x_dark.png b/platform/icons/src/nodes/jsf/general@2x_dark.png deleted file mode 100644 index ac08bcb1def9..000000000000 Binary files a/platform/icons/src/nodes/jsf/general@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/jsf/general_dark.png b/platform/icons/src/nodes/jsf/general_dark.png deleted file mode 100644 index 77684351da08..000000000000 Binary files a/platform/icons/src/nodes/jsf/general_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/jsf/genericValue.png b/platform/icons/src/nodes/jsf/genericValue.png index 86ab9f9d284b..817e528af45c 100644 Binary files a/platform/icons/src/nodes/jsf/genericValue.png and b/platform/icons/src/nodes/jsf/genericValue.png differ diff --git a/platform/icons/src/nodes/jsf/genericValue@2x.png b/platform/icons/src/nodes/jsf/genericValue@2x.png index 8c6c66421dcc..7549e2390be8 100644 Binary files a/platform/icons/src/nodes/jsf/genericValue@2x.png and b/platform/icons/src/nodes/jsf/genericValue@2x.png differ diff --git a/platform/icons/src/nodes/jsf/managedBean.png b/platform/icons/src/nodes/jsf/managedBean.png index a5a5c583805c..4a1074cf49b1 100644 Binary files a/platform/icons/src/nodes/jsf/managedBean.png and b/platform/icons/src/nodes/jsf/managedBean.png differ diff --git a/platform/icons/src/nodes/jsf/managedBean@2x.png b/platform/icons/src/nodes/jsf/managedBean@2x.png index 4847abd94342..6b2bfbc2997d 100644 Binary files a/platform/icons/src/nodes/jsf/managedBean@2x.png and b/platform/icons/src/nodes/jsf/managedBean@2x.png differ diff --git a/platform/icons/src/nodes/jsf/navigationCase.png b/platform/icons/src/nodes/jsf/navigationCase.png index c8b99b7276e6..fc0200a368d4 100644 Binary files a/platform/icons/src/nodes/jsf/navigationCase.png and b/platform/icons/src/nodes/jsf/navigationCase.png differ diff --git a/platform/icons/src/nodes/jsf/navigationCase@2x.png b/platform/icons/src/nodes/jsf/navigationCase@2x.png index 0204d99fcda2..c9c9da170108 100644 Binary files a/platform/icons/src/nodes/jsf/navigationCase@2x.png and b/platform/icons/src/nodes/jsf/navigationCase@2x.png differ diff --git a/platform/icons/src/nodes/jsf/navigationRule.png b/platform/icons/src/nodes/jsf/navigationRule.png index 91d5365a99fb..34ba0cf8c2d9 100644 Binary files a/platform/icons/src/nodes/jsf/navigationRule.png and b/platform/icons/src/nodes/jsf/navigationRule.png differ diff --git a/platform/icons/src/nodes/jsf/navigationRule@2x.png b/platform/icons/src/nodes/jsf/navigationRule@2x.png index e98caa4b57ed..1fa2ec858acc 100644 Binary files a/platform/icons/src/nodes/jsf/navigationRule@2x.png and b/platform/icons/src/nodes/jsf/navigationRule@2x.png differ diff --git a/platform/icons/src/nodes/jsf/navigationRule@2x_dark.png b/platform/icons/src/nodes/jsf/navigationRule@2x_dark.png deleted file mode 100644 index 57340f85c8b8..000000000000 Binary files a/platform/icons/src/nodes/jsf/navigationRule@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/jsf/navigationRule_dark.png b/platform/icons/src/nodes/jsf/navigationRule_dark.png deleted file mode 100644 index e376f774710b..000000000000 Binary files a/platform/icons/src/nodes/jsf/navigationRule_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/jsf/renderKit.png b/platform/icons/src/nodes/jsf/renderKit.png index 8a3f74a2edf7..d34901705829 100644 Binary files a/platform/icons/src/nodes/jsf/renderKit.png and b/platform/icons/src/nodes/jsf/renderKit.png differ diff --git a/platform/icons/src/nodes/jsf/renderKit@2x.png b/platform/icons/src/nodes/jsf/renderKit@2x.png index 57c588a4eed0..aa99280d2133 100644 Binary files a/platform/icons/src/nodes/jsf/renderKit@2x.png and b/platform/icons/src/nodes/jsf/renderKit@2x.png differ diff --git a/platform/icons/src/nodes/jsf/renderKit@2x_dark.png b/platform/icons/src/nodes/jsf/renderKit@2x_dark.png deleted file mode 100644 index f993cdd7a200..000000000000 Binary files a/platform/icons/src/nodes/jsf/renderKit@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/jsf/renderKit_dark.png b/platform/icons/src/nodes/jsf/renderKit_dark.png deleted file mode 100644 index a068f47f447f..000000000000 Binary files a/platform/icons/src/nodes/jsf/renderKit_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/jsf/renderer.png b/platform/icons/src/nodes/jsf/renderer.png index 5a58bf477614..dbaef888801f 100644 Binary files a/platform/icons/src/nodes/jsf/renderer.png and b/platform/icons/src/nodes/jsf/renderer.png differ diff --git a/platform/icons/src/nodes/jsf/renderer@2x.png b/platform/icons/src/nodes/jsf/renderer@2x.png index 6ab5e2e154f5..6277c26ebe35 100644 Binary files a/platform/icons/src/nodes/jsf/renderer@2x.png and b/platform/icons/src/nodes/jsf/renderer@2x.png differ diff --git a/platform/icons/src/nodes/jsf/renderer@2x_dark.png b/platform/icons/src/nodes/jsf/renderer@2x_dark.png deleted file mode 100644 index 7dc1ce9971c3..000000000000 Binary files a/platform/icons/src/nodes/jsf/renderer@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/jsf/renderer_dark.png b/platform/icons/src/nodes/jsf/renderer_dark.png deleted file mode 100644 index 553ae998ba76..000000000000 Binary files a/platform/icons/src/nodes/jsf/renderer_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/jsf/validator.png b/platform/icons/src/nodes/jsf/validator.png index 6848eb3e52a2..f81fa49a2f6f 100644 Binary files a/platform/icons/src/nodes/jsf/validator.png and b/platform/icons/src/nodes/jsf/validator.png differ diff --git a/platform/icons/src/nodes/jsf/validator@2x.png b/platform/icons/src/nodes/jsf/validator@2x.png index d2bbc404ea37..9d69f8099d1d 100644 Binary files a/platform/icons/src/nodes/jsf/validator@2x.png and b/platform/icons/src/nodes/jsf/validator@2x.png differ diff --git a/platform/icons/src/nodes/jsr45.png b/platform/icons/src/nodes/jsr45.png index be6a2a1aba25..a0737e621eed 100644 Binary files a/platform/icons/src/nodes/jsr45.png and b/platform/icons/src/nodes/jsr45.png differ diff --git a/platform/icons/src/nodes/jsr45@2x.png b/platform/icons/src/nodes/jsr45@2x.png index 276d8b5fea8e..0c8498795001 100644 Binary files a/platform/icons/src/nodes/jsr45@2x.png and b/platform/icons/src/nodes/jsr45@2x.png differ diff --git a/platform/icons/src/nodes/jsr45@2x_dark.png b/platform/icons/src/nodes/jsr45@2x_dark.png deleted file mode 100644 index fc2413d69506..000000000000 Binary files a/platform/icons/src/nodes/jsr45@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/jsr45_dark.png b/platform/icons/src/nodes/jsr45_dark.png deleted file mode 100644 index a78804223c18..000000000000 Binary files a/platform/icons/src/nodes/jsr45_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/junitTestMark.png b/platform/icons/src/nodes/junitTestMark.png index 1614759f7f07..7e011a1aa95f 100644 Binary files a/platform/icons/src/nodes/junitTestMark.png and b/platform/icons/src/nodes/junitTestMark.png differ diff --git a/platform/icons/src/nodes/junitTestMark@2x.png b/platform/icons/src/nodes/junitTestMark@2x.png index 1c154ec4a5b2..c6b56ffc0a59 100644 Binary files a/platform/icons/src/nodes/junitTestMark@2x.png and b/platform/icons/src/nodes/junitTestMark@2x.png differ diff --git a/platform/icons/src/nodes/junitTestMark@2x_dark.png b/platform/icons/src/nodes/junitTestMark@2x_dark.png deleted file mode 100644 index e526dfbb1c7e..000000000000 Binary files a/platform/icons/src/nodes/junitTestMark@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/junitTestMark_dark.png b/platform/icons/src/nodes/junitTestMark_dark.png deleted file mode 100644 index b5062d6178a3..000000000000 Binary files a/platform/icons/src/nodes/junitTestMark_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/keymapAnt.png b/platform/icons/src/nodes/keymapAnt.png index 5baac07c6676..c374920ad43c 100644 Binary files a/platform/icons/src/nodes/keymapAnt.png and b/platform/icons/src/nodes/keymapAnt.png differ diff --git a/platform/icons/src/nodes/keymapAnt@2x.png b/platform/icons/src/nodes/keymapAnt@2x.png index 61b4326b7783..0e914f108d3e 100644 Binary files a/platform/icons/src/nodes/keymapAnt@2x.png and b/platform/icons/src/nodes/keymapAnt@2x.png differ diff --git a/platform/icons/src/nodes/keymapAnt@2x_dark.png b/platform/icons/src/nodes/keymapAnt@2x_dark.png deleted file mode 100644 index 42e819b3c92d..000000000000 Binary files a/platform/icons/src/nodes/keymapAnt@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/keymapAnt_dark.png b/platform/icons/src/nodes/keymapAnt_dark.png deleted file mode 100644 index 5cc19acb6ac4..000000000000 Binary files a/platform/icons/src/nodes/keymapAnt_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/keymapEditor.png b/platform/icons/src/nodes/keymapEditor.png index 47c9d87b4100..680783fbf37b 100644 Binary files a/platform/icons/src/nodes/keymapEditor.png and b/platform/icons/src/nodes/keymapEditor.png differ diff --git a/platform/icons/src/nodes/keymapEditor@2x.png b/platform/icons/src/nodes/keymapEditor@2x.png index 5f1dbe8a5a56..402be651f630 100644 Binary files a/platform/icons/src/nodes/keymapEditor@2x.png and b/platform/icons/src/nodes/keymapEditor@2x.png differ diff --git a/platform/icons/src/nodes/keymapMainMenu.png b/platform/icons/src/nodes/keymapMainMenu.png index 7092b76c7bf5..8d6be2d5af60 100644 Binary files a/platform/icons/src/nodes/keymapMainMenu.png and b/platform/icons/src/nodes/keymapMainMenu.png differ diff --git a/platform/icons/src/nodes/keymapMainMenu@2x.png b/platform/icons/src/nodes/keymapMainMenu@2x.png index 743047802ad0..4f6a2ad0e170 100644 Binary files a/platform/icons/src/nodes/keymapMainMenu@2x.png and b/platform/icons/src/nodes/keymapMainMenu@2x.png differ diff --git a/platform/icons/src/nodes/keymapOther.png b/platform/icons/src/nodes/keymapOther.png index 8ba92bb6928e..71615dd61a1c 100644 Binary files a/platform/icons/src/nodes/keymapOther.png and b/platform/icons/src/nodes/keymapOther.png differ diff --git a/platform/icons/src/nodes/keymapOther@2x.png b/platform/icons/src/nodes/keymapOther@2x.png index 6aea74f100d5..9c8d08d575d8 100644 Binary files a/platform/icons/src/nodes/keymapOther@2x.png and b/platform/icons/src/nodes/keymapOther@2x.png differ diff --git a/platform/icons/src/nodes/keymapTools.png b/platform/icons/src/nodes/keymapTools.png index 1c5d3aa05ec0..1620474158c3 100644 Binary files a/platform/icons/src/nodes/keymapTools.png and b/platform/icons/src/nodes/keymapTools.png differ diff --git a/platform/icons/src/nodes/keymapTools@2x.png b/platform/icons/src/nodes/keymapTools@2x.png index 7c47488a01d2..d50357875aad 100644 Binary files a/platform/icons/src/nodes/keymapTools@2x.png and b/platform/icons/src/nodes/keymapTools@2x.png differ diff --git a/platform/icons/src/nodes/keymapTools@2x_dark.png b/platform/icons/src/nodes/keymapTools@2x_dark.png deleted file mode 100644 index ad30fa0ad4f1..000000000000 Binary files a/platform/icons/src/nodes/keymapTools@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/keymapTools_dark.png b/platform/icons/src/nodes/keymapTools_dark.png deleted file mode 100644 index c76d8a474b8e..000000000000 Binary files a/platform/icons/src/nodes/keymapTools_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/locked.png b/platform/icons/src/nodes/locked.png index 106e1b486ad8..0ac9c45018ea 100644 Binary files a/platform/icons/src/nodes/locked.png and b/platform/icons/src/nodes/locked.png differ diff --git a/platform/icons/src/nodes/locked@2x.png b/platform/icons/src/nodes/locked@2x.png index 07a406953321..668c1a1b3069 100644 Binary files a/platform/icons/src/nodes/locked@2x.png and b/platform/icons/src/nodes/locked@2x.png differ diff --git a/platform/icons/src/nodes/locked@2x_dark.png b/platform/icons/src/nodes/locked@2x_dark.png deleted file mode 100644 index 75aac42aa260..000000000000 Binary files a/platform/icons/src/nodes/locked@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/locked_dark.png b/platform/icons/src/nodes/locked_dark.png deleted file mode 100644 index 041c5bb1f5d2..000000000000 Binary files a/platform/icons/src/nodes/locked_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/method.png b/platform/icons/src/nodes/method.png index b55765f939da..daa6f12bb1b4 100644 Binary files a/platform/icons/src/nodes/method.png and b/platform/icons/src/nodes/method.png differ diff --git a/platform/icons/src/nodes/method.svg b/platform/icons/src/nodes/method.svg new file mode 100644 index 000000000000..ad5b14f166d4 --- /dev/null +++ b/platform/icons/src/nodes/method.svg @@ -0,0 +1,11 @@ + + method + + + + + + + + + diff --git a/platform/icons/src/nodes/method@2x.png b/platform/icons/src/nodes/method@2x.png index 3921232f1020..cb3443c49a0d 100644 Binary files a/platform/icons/src/nodes/method@2x.png and b/platform/icons/src/nodes/method@2x.png differ diff --git a/platform/icons/src/nodes/method@2x.svg b/platform/icons/src/nodes/method@2x.svg new file mode 100644 index 000000000000..1fa83c478ade --- /dev/null +++ b/platform/icons/src/nodes/method@2x.svg @@ -0,0 +1,11 @@ + + method@2x + + + + + + + + + diff --git a/platform/icons/src/nodes/methodReference.png b/platform/icons/src/nodes/methodReference.png index 8deeecbb0004..48a6771caa30 100644 Binary files a/platform/icons/src/nodes/methodReference.png and b/platform/icons/src/nodes/methodReference.png differ diff --git a/platform/icons/src/nodes/methodReference.svg b/platform/icons/src/nodes/methodReference.svg new file mode 100644 index 000000000000..6b1510f60608 --- /dev/null +++ b/platform/icons/src/nodes/methodReference.svg @@ -0,0 +1,12 @@ + + methodReference + + + + + + + + + + diff --git a/platform/icons/src/nodes/methodReference@2x.png b/platform/icons/src/nodes/methodReference@2x.png index 2ee6214333f4..bd93ff155d34 100644 Binary files a/platform/icons/src/nodes/methodReference@2x.png and b/platform/icons/src/nodes/methodReference@2x.png differ diff --git a/platform/icons/src/nodes/methodReference@2x.svg b/platform/icons/src/nodes/methodReference@2x.svg new file mode 100644 index 000000000000..72815b07822e --- /dev/null +++ b/platform/icons/src/nodes/methodReference@2x.svg @@ -0,0 +1,14 @@ + + methodReference@2x + + + + + + + + + + + + diff --git a/platform/icons/src/nodes/moduleGroup.png b/platform/icons/src/nodes/moduleGroup.png index c323909e3b5d..92750aa6b99d 100644 Binary files a/platform/icons/src/nodes/moduleGroup.png and b/platform/icons/src/nodes/moduleGroup.png differ diff --git a/platform/icons/src/nodes/moduleGroup.svg b/platform/icons/src/nodes/moduleGroup.svg new file mode 100644 index 000000000000..bf46d8844e32 --- /dev/null +++ b/platform/icons/src/nodes/moduleGroup.svg @@ -0,0 +1,20 @@ + + moduleGroup + + + + + + + + + + + + + + + + + + diff --git a/platform/icons/src/nodes/moduleGroup@2x.png b/platform/icons/src/nodes/moduleGroup@2x.png index 696f6c6f1861..bf48e0b1cac7 100644 Binary files a/platform/icons/src/nodes/moduleGroup@2x.png and b/platform/icons/src/nodes/moduleGroup@2x.png differ diff --git a/platform/icons/src/nodes/moduleGroup@2x.svg b/platform/icons/src/nodes/moduleGroup@2x.svg new file mode 100644 index 000000000000..78a1bc515d45 --- /dev/null +++ b/platform/icons/src/nodes/moduleGroup@2x.svg @@ -0,0 +1,20 @@ + + moduleGroup@2x + + + + + + + + + + + + + + + + + + diff --git a/platform/icons/src/nodes/nativeLibrariesFolder.png b/platform/icons/src/nodes/nativeLibrariesFolder.png index b70cec57b9e2..f83c97a1df33 100644 Binary files a/platform/icons/src/nodes/nativeLibrariesFolder.png and b/platform/icons/src/nodes/nativeLibrariesFolder.png differ diff --git a/platform/icons/src/nodes/nativeLibrariesFolder@2x.png b/platform/icons/src/nodes/nativeLibrariesFolder@2x.png index ceb4f0e118d0..f0dc5c5669fc 100644 Binary files a/platform/icons/src/nodes/nativeLibrariesFolder@2x.png and b/platform/icons/src/nodes/nativeLibrariesFolder@2x.png differ diff --git a/platform/icons/src/nodes/nativeLibrariesFolder@2x_dark.png b/platform/icons/src/nodes/nativeLibrariesFolder@2x_dark.png deleted file mode 100644 index d9f38d03ab4f..000000000000 Binary files a/platform/icons/src/nodes/nativeLibrariesFolder@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/nativeLibrariesFolder_dark.png b/platform/icons/src/nodes/nativeLibrariesFolder_dark.png deleted file mode 100644 index d74b4ab68e3c..000000000000 Binary files a/platform/icons/src/nodes/nativeLibrariesFolder_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/newException.png b/platform/icons/src/nodes/newException.png index 5e44f987ef7c..cd9b0038cba9 100644 Binary files a/platform/icons/src/nodes/newException.png and b/platform/icons/src/nodes/newException.png differ diff --git a/platform/icons/src/nodes/newException@2x.png b/platform/icons/src/nodes/newException@2x.png index a63cd9a1aa62..97931cff7cb3 100644 Binary files a/platform/icons/src/nodes/newException@2x.png and b/platform/icons/src/nodes/newException@2x.png differ diff --git a/platform/icons/src/nodes/newFolder.png b/platform/icons/src/nodes/newFolder.png index c7933ec0b576..d111c34c1593 100644 Binary files a/platform/icons/src/nodes/newFolder.png and b/platform/icons/src/nodes/newFolder.png differ diff --git a/platform/icons/src/nodes/newFolder.svg b/platform/icons/src/nodes/newFolder.svg new file mode 100644 index 000000000000..5deb66460f63 --- /dev/null +++ b/platform/icons/src/nodes/newFolder.svg @@ -0,0 +1,6 @@ + + newFolder + + + + diff --git a/platform/icons/src/nodes/newFolder@2x.png b/platform/icons/src/nodes/newFolder@2x.png index 87e26679f4b2..42e807a20a38 100644 Binary files a/platform/icons/src/nodes/newFolder@2x.png and b/platform/icons/src/nodes/newFolder@2x.png differ diff --git a/platform/icons/src/nodes/newFolder@2x.svg b/platform/icons/src/nodes/newFolder@2x.svg new file mode 100644 index 000000000000..a94a49ef0d9b --- /dev/null +++ b/platform/icons/src/nodes/newFolder@2x.svg @@ -0,0 +1,6 @@ + + newFolder@2x + + + + diff --git a/platform/icons/src/nodes/newParameter.png b/platform/icons/src/nodes/newParameter.png index d9eb28826bb3..8fce68afe231 100644 Binary files a/platform/icons/src/nodes/newParameter.png and b/platform/icons/src/nodes/newParameter.png differ diff --git a/platform/icons/src/nodes/newParameter@2x.png b/platform/icons/src/nodes/newParameter@2x.png index ee7b833cc8e0..848a9d933182 100644 Binary files a/platform/icons/src/nodes/newParameter@2x.png and b/platform/icons/src/nodes/newParameter@2x.png differ diff --git a/platform/icons/src/nodes/package.png b/platform/icons/src/nodes/package.png index d24477686e75..25579935892d 100644 Binary files a/platform/icons/src/nodes/package.png and b/platform/icons/src/nodes/package.png differ diff --git a/platform/icons/src/nodes/package.svg b/platform/icons/src/nodes/package.svg new file mode 100644 index 000000000000..9d210bf4abfa --- /dev/null +++ b/platform/icons/src/nodes/package.svg @@ -0,0 +1,5 @@ + + package + + + diff --git a/platform/icons/src/nodes/package@2x.png b/platform/icons/src/nodes/package@2x.png index e85b6747b91a..62e5d4d07843 100644 Binary files a/platform/icons/src/nodes/package@2x.png and b/platform/icons/src/nodes/package@2x.png differ diff --git a/platform/icons/src/nodes/package@2x.svg b/platform/icons/src/nodes/package@2x.svg new file mode 100644 index 000000000000..c3194225dc3e --- /dev/null +++ b/platform/icons/src/nodes/package@2x.svg @@ -0,0 +1,5 @@ + + package@2x + + + diff --git a/platform/icons/src/nodes/padlock.png b/platform/icons/src/nodes/padlock.png index ba6bd350006c..70efa0f543b4 100644 Binary files a/platform/icons/src/nodes/padlock.png and b/platform/icons/src/nodes/padlock.png differ diff --git a/platform/icons/src/nodes/padlock@2x.png b/platform/icons/src/nodes/padlock@2x.png index 5a7d3747b197..2feb77c8fb96 100644 Binary files a/platform/icons/src/nodes/padlock@2x.png and b/platform/icons/src/nodes/padlock@2x.png differ diff --git a/platform/icons/src/nodes/padlock@2x_dark.png b/platform/icons/src/nodes/padlock@2x_dark.png deleted file mode 100644 index fc441c639139..000000000000 Binary files a/platform/icons/src/nodes/padlock@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/padlock_dark.png b/platform/icons/src/nodes/padlock_dark.png deleted file mode 100644 index cb884afeac84..000000000000 Binary files a/platform/icons/src/nodes/padlock_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/parameter.png b/platform/icons/src/nodes/parameter.png index 14f14f52094d..817e528af45c 100644 Binary files a/platform/icons/src/nodes/parameter.png and b/platform/icons/src/nodes/parameter.png differ diff --git a/platform/icons/src/nodes/parameter.svg b/platform/icons/src/nodes/parameter.svg new file mode 100644 index 000000000000..4e3847bf3cb0 --- /dev/null +++ b/platform/icons/src/nodes/parameter.svg @@ -0,0 +1,9 @@ + + parameter + + + + + + + diff --git a/platform/icons/src/nodes/parameter@2x.png b/platform/icons/src/nodes/parameter@2x.png index 0f705e08e244..7549e2390be8 100644 Binary files a/platform/icons/src/nodes/parameter@2x.png and b/platform/icons/src/nodes/parameter@2x.png differ diff --git a/platform/icons/src/nodes/parameter@2x.svg b/platform/icons/src/nodes/parameter@2x.svg new file mode 100644 index 000000000000..53e888f7d70f --- /dev/null +++ b/platform/icons/src/nodes/parameter@2x.svg @@ -0,0 +1,9 @@ + + parameter@2x + + + + + + + diff --git a/platform/icons/src/nodes/pinToolWindow.png b/platform/icons/src/nodes/pinToolWindow.png index 0b4e36249e22..ce689e25f50c 100644 Binary files a/platform/icons/src/nodes/pinToolWindow.png and b/platform/icons/src/nodes/pinToolWindow.png differ diff --git a/platform/icons/src/nodes/pinToolWindow@2x.png b/platform/icons/src/nodes/pinToolWindow@2x.png index c32109a88b73..0054842d0c4e 100644 Binary files a/platform/icons/src/nodes/pinToolWindow@2x.png and b/platform/icons/src/nodes/pinToolWindow@2x.png differ diff --git a/platform/icons/src/nodes/pinToolWindow@2x_dark.png b/platform/icons/src/nodes/pinToolWindow@2x_dark.png deleted file mode 100644 index 7e98ba00ca31..000000000000 Binary files a/platform/icons/src/nodes/pinToolWindow@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/pinToolWindow_dark.png b/platform/icons/src/nodes/pinToolWindow_dark.png deleted file mode 100644 index 3ad5024cb53e..000000000000 Binary files a/platform/icons/src/nodes/pinToolWindow_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/plugin.png b/platform/icons/src/nodes/plugin.png index c15a6a0bfc64..37de1e2cb798 100644 Binary files a/platform/icons/src/nodes/plugin.png and b/platform/icons/src/nodes/plugin.png differ diff --git a/platform/icons/src/nodes/plugin@2x.png b/platform/icons/src/nodes/plugin@2x.png index 83604cc023ed..bac5ce1e63a9 100644 Binary files a/platform/icons/src/nodes/plugin@2x.png and b/platform/icons/src/nodes/plugin@2x.png differ diff --git a/platform/icons/src/nodes/plugin@2x_dark.png b/platform/icons/src/nodes/plugin@2x_dark.png deleted file mode 100644 index c8d095c06de4..000000000000 Binary files a/platform/icons/src/nodes/plugin@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/pluginJB.png b/platform/icons/src/nodes/pluginJB.png index 562bd3ddfb53..b68a3eee1cce 100644 Binary files a/platform/icons/src/nodes/pluginJB.png and b/platform/icons/src/nodes/pluginJB.png differ diff --git a/platform/icons/src/nodes/pluginJB@2x.png b/platform/icons/src/nodes/pluginJB@2x.png index a1b7edf7a9c5..09adb7b53d21 100644 Binary files a/platform/icons/src/nodes/pluginJB@2x.png and b/platform/icons/src/nodes/pluginJB@2x.png differ diff --git a/platform/icons/src/nodes/pluginJB@2x_dark.png b/platform/icons/src/nodes/pluginJB@2x_dark.png deleted file mode 100644 index 0f933701633f..000000000000 Binary files a/platform/icons/src/nodes/pluginJB@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/pluginJB_dark.png b/platform/icons/src/nodes/pluginJB_dark.png deleted file mode 100644 index ac23935e14f9..000000000000 Binary files a/platform/icons/src/nodes/pluginJB_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/pluginLogo.png b/platform/icons/src/nodes/pluginLogo.png index 83604cc023ed..bac5ce1e63a9 100644 Binary files a/platform/icons/src/nodes/pluginLogo.png and b/platform/icons/src/nodes/pluginLogo.png differ diff --git a/platform/icons/src/nodes/pluginLogo@2x.png b/platform/icons/src/nodes/pluginLogo@2x.png index dc7af0466fd3..5be74b877a49 100644 Binary files a/platform/icons/src/nodes/pluginLogo@2x.png and b/platform/icons/src/nodes/pluginLogo@2x.png differ diff --git a/platform/icons/src/nodes/pluginLogo@2x_dark.png b/platform/icons/src/nodes/pluginLogo@2x_dark.png deleted file mode 100644 index 77b47a218e2a..000000000000 Binary files a/platform/icons/src/nodes/pluginLogo@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/pluginLogo_dark.png b/platform/icons/src/nodes/pluginLogo_dark.png deleted file mode 100644 index 11c6ab0a96ad..000000000000 Binary files a/platform/icons/src/nodes/pluginLogo_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/pluginRestart.png b/platform/icons/src/nodes/pluginRestart.png index a47d933dbeb1..28c7c87de36f 100644 Binary files a/platform/icons/src/nodes/pluginRestart.png and b/platform/icons/src/nodes/pluginRestart.png differ diff --git a/platform/icons/src/nodes/pluginRestart@2x.png b/platform/icons/src/nodes/pluginRestart@2x.png index 9fdbca4fc29d..0ff45a47f28b 100644 Binary files a/platform/icons/src/nodes/pluginRestart@2x.png and b/platform/icons/src/nodes/pluginRestart@2x.png differ diff --git a/platform/icons/src/nodes/pluginRestart@2x_dark.png b/platform/icons/src/nodes/pluginRestart@2x_dark.png deleted file mode 100644 index 6cacfec86ed4..000000000000 Binary files a/platform/icons/src/nodes/pluginRestart@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/pluginRestart_dark.png b/platform/icons/src/nodes/pluginRestart_dark.png deleted file mode 100644 index 92889f739e89..000000000000 Binary files a/platform/icons/src/nodes/pluginRestart_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/pluginUpdate.png b/platform/icons/src/nodes/pluginUpdate.png index 62f0a4fbfeac..8e8789b88a19 100644 Binary files a/platform/icons/src/nodes/pluginUpdate.png and b/platform/icons/src/nodes/pluginUpdate.png differ diff --git a/platform/icons/src/nodes/pluginUpdate@2x.png b/platform/icons/src/nodes/pluginUpdate@2x.png index c584a1993f75..9400965a80fa 100644 Binary files a/platform/icons/src/nodes/pluginUpdate@2x.png and b/platform/icons/src/nodes/pluginUpdate@2x.png differ diff --git a/platform/icons/src/nodes/pluginUpdate@2x_dark.png b/platform/icons/src/nodes/pluginUpdate@2x_dark.png deleted file mode 100644 index b9c0bafd57c3..000000000000 Binary files a/platform/icons/src/nodes/pluginUpdate@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/pluginUpdate_dark.png b/platform/icons/src/nodes/pluginUpdate_dark.png deleted file mode 100644 index fa917549a86a..000000000000 Binary files a/platform/icons/src/nodes/pluginUpdate_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/plugin_dark.png b/platform/icons/src/nodes/plugin_dark.png deleted file mode 100644 index 3eeb0530162a..000000000000 Binary files a/platform/icons/src/nodes/plugin_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/pluginnotinstalled.png b/platform/icons/src/nodes/pluginnotinstalled.png index 1733115b997f..07dcfa33c261 100644 Binary files a/platform/icons/src/nodes/pluginnotinstalled.png and b/platform/icons/src/nodes/pluginnotinstalled.png differ diff --git a/platform/icons/src/nodes/pluginnotinstalled@2x.png b/platform/icons/src/nodes/pluginnotinstalled@2x.png index 0969af41cf16..a077bb251cbe 100644 Binary files a/platform/icons/src/nodes/pluginnotinstalled@2x.png and b/platform/icons/src/nodes/pluginnotinstalled@2x.png differ diff --git a/platform/icons/src/nodes/pluginnotinstalled@2x_dark.png b/platform/icons/src/nodes/pluginnotinstalled@2x_dark.png deleted file mode 100644 index b0e1c0847143..000000000000 Binary files a/platform/icons/src/nodes/pluginnotinstalled@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/pluginnotinstalled_dark.png b/platform/icons/src/nodes/pluginnotinstalled_dark.png deleted file mode 100644 index 5f5042b70e79..000000000000 Binary files a/platform/icons/src/nodes/pluginnotinstalled_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/pluginobsolete.png b/platform/icons/src/nodes/pluginobsolete.png index 1f6f9e084b89..7b44a30d100b 100644 Binary files a/platform/icons/src/nodes/pluginobsolete.png and b/platform/icons/src/nodes/pluginobsolete.png differ diff --git a/platform/icons/src/nodes/pluginobsolete@2x.png b/platform/icons/src/nodes/pluginobsolete@2x.png index d3f56497c116..655b897135c9 100644 Binary files a/platform/icons/src/nodes/pluginobsolete@2x.png and b/platform/icons/src/nodes/pluginobsolete@2x.png differ diff --git a/platform/icons/src/nodes/pluginobsolete@2x_dark.png b/platform/icons/src/nodes/pluginobsolete@2x_dark.png deleted file mode 100644 index c7c82c6ad830..000000000000 Binary files a/platform/icons/src/nodes/pluginobsolete@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/pluginobsolete_dark.png b/platform/icons/src/nodes/pluginobsolete_dark.png deleted file mode 100644 index 5b6306306f11..000000000000 Binary files a/platform/icons/src/nodes/pluginobsolete_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/pointcut.png b/platform/icons/src/nodes/pointcut.png index 3a06c6880bd5..29968cc774e3 100644 Binary files a/platform/icons/src/nodes/pointcut.png and b/platform/icons/src/nodes/pointcut.png differ diff --git a/platform/icons/src/nodes/pointcut.svg b/platform/icons/src/nodes/pointcut.svg new file mode 100644 index 000000000000..9988cfb9860c --- /dev/null +++ b/platform/icons/src/nodes/pointcut.svg @@ -0,0 +1,9 @@ + + pointcut + + + + + + + diff --git a/platform/icons/src/nodes/pointcut@2x.png b/platform/icons/src/nodes/pointcut@2x.png index 23a3f03161da..dfc154ebf7cd 100644 Binary files a/platform/icons/src/nodes/pointcut@2x.png and b/platform/icons/src/nodes/pointcut@2x.png differ diff --git a/platform/icons/src/nodes/pointcut@2x.svg b/platform/icons/src/nodes/pointcut@2x.svg new file mode 100644 index 000000000000..a9472303c065 --- /dev/null +++ b/platform/icons/src/nodes/pointcut@2x.svg @@ -0,0 +1,11 @@ + + pointcut@2x + + + + + + + + + diff --git a/platform/icons/src/nodes/ppFile.png b/platform/icons/src/nodes/ppFile.png index c7933ec0b576..14b79f93c93d 100644 Binary files a/platform/icons/src/nodes/ppFile.png and b/platform/icons/src/nodes/ppFile.png differ diff --git a/platform/icons/src/nodes/ppFile@2x.png b/platform/icons/src/nodes/ppFile@2x.png index 87e26679f4b2..41a8bc8447ee 100644 Binary files a/platform/icons/src/nodes/ppFile@2x.png and b/platform/icons/src/nodes/ppFile@2x.png differ diff --git a/platform/icons/src/nodes/ppInvalid.png b/platform/icons/src/nodes/ppInvalid.png index 68eb2f7b6bd0..cdd7f7bdb6d9 100644 Binary files a/platform/icons/src/nodes/ppInvalid.png and b/platform/icons/src/nodes/ppInvalid.png differ diff --git a/platform/icons/src/nodes/ppInvalid@2x.png b/platform/icons/src/nodes/ppInvalid@2x.png index fc60823b4281..8e7fa466ceea 100644 Binary files a/platform/icons/src/nodes/ppInvalid@2x.png and b/platform/icons/src/nodes/ppInvalid@2x.png differ diff --git a/platform/icons/src/nodes/ppJar.png b/platform/icons/src/nodes/ppJar.png index 79baf02db126..f0df27ac56c2 100644 Binary files a/platform/icons/src/nodes/ppJar.png and b/platform/icons/src/nodes/ppJar.png differ diff --git a/platform/icons/src/nodes/ppJar.svg b/platform/icons/src/nodes/ppJar.svg new file mode 100644 index 000000000000..ae6319705850 --- /dev/null +++ b/platform/icons/src/nodes/ppJar.svg @@ -0,0 +1,24 @@ + + archive + + + + + + + + + + + + + + + + + + + + + + diff --git a/platform/icons/src/nodes/ppJar@2x.png b/platform/icons/src/nodes/ppJar@2x.png index 477352c86b52..0e000ab28b7c 100644 Binary files a/platform/icons/src/nodes/ppJar@2x.png and b/platform/icons/src/nodes/ppJar@2x.png differ diff --git a/platform/icons/src/nodes/ppJar@2x.svg b/platform/icons/src/nodes/ppJar@2x.svg new file mode 100644 index 000000000000..2f9a7038b816 --- /dev/null +++ b/platform/icons/src/nodes/ppJar@2x.svg @@ -0,0 +1,24 @@ + + archive@2x + + + + + + + + + + + + + + + + + + + + + + diff --git a/platform/icons/src/nodes/ppJar@2x_dark.png b/platform/icons/src/nodes/ppJar@2x_dark.png deleted file mode 100644 index 093ffee22117..000000000000 Binary files a/platform/icons/src/nodes/ppJar@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/ppJar_dark.png b/platform/icons/src/nodes/ppJar_dark.png deleted file mode 100644 index 97cfe96e2964..000000000000 Binary files a/platform/icons/src/nodes/ppJar_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/ppJdk.png b/platform/icons/src/nodes/ppJdk.png index 05082cf459d2..92cee080d156 100644 Binary files a/platform/icons/src/nodes/ppJdk.png and b/platform/icons/src/nodes/ppJdk.png differ diff --git a/platform/icons/src/nodes/ppJdk@2x.png b/platform/icons/src/nodes/ppJdk@2x.png index 30852f1bf840..ffa77f6a1d18 100644 Binary files a/platform/icons/src/nodes/ppJdk@2x.png and b/platform/icons/src/nodes/ppJdk@2x.png differ diff --git a/platform/icons/src/nodes/ppLib.png b/platform/icons/src/nodes/ppLib.png index 576d3e79a01c..f38567ccdd30 100644 Binary files a/platform/icons/src/nodes/ppLib.png and b/platform/icons/src/nodes/ppLib.png differ diff --git a/platform/icons/src/nodes/ppLib.svg b/platform/icons/src/nodes/ppLib.svg new file mode 100644 index 000000000000..14ee0bb9d9a7 --- /dev/null +++ b/platform/icons/src/nodes/ppLib.svg @@ -0,0 +1,10 @@ + + library + + + + + + + + diff --git a/platform/icons/src/nodes/ppLib@2x.png b/platform/icons/src/nodes/ppLib@2x.png index c8a4450175cb..c100b5cbdbaf 100644 Binary files a/platform/icons/src/nodes/ppLib@2x.png and b/platform/icons/src/nodes/ppLib@2x.png differ diff --git a/platform/icons/src/nodes/ppLib@2x.svg b/platform/icons/src/nodes/ppLib@2x.svg new file mode 100644 index 000000000000..3a6cc56fbfa8 --- /dev/null +++ b/platform/icons/src/nodes/ppLib@2x.svg @@ -0,0 +1,10 @@ + + library@2x + + + + + + + + diff --git a/platform/icons/src/nodes/ppLibFolder.png b/platform/icons/src/nodes/ppLibFolder.png index 169fcc996add..14260c960ee7 100644 Binary files a/platform/icons/src/nodes/ppLibFolder.png and b/platform/icons/src/nodes/ppLibFolder.png differ diff --git a/platform/icons/src/nodes/ppLibFolder.svg b/platform/icons/src/nodes/ppLibFolder.svg new file mode 100644 index 000000000000..b86ce7ef246d --- /dev/null +++ b/platform/icons/src/nodes/ppLibFolder.svg @@ -0,0 +1,9 @@ + + ppLibFolder + + + + + + + diff --git a/platform/icons/src/nodes/ppLibFolder@2x.png b/platform/icons/src/nodes/ppLibFolder@2x.png index 28e1e35160af..234f2c7f384e 100644 Binary files a/platform/icons/src/nodes/ppLibFolder@2x.png and b/platform/icons/src/nodes/ppLibFolder@2x.png differ diff --git a/platform/icons/src/nodes/ppLibFolder@2x.svg b/platform/icons/src/nodes/ppLibFolder@2x.svg new file mode 100644 index 000000000000..5e996e8a1046 --- /dev/null +++ b/platform/icons/src/nodes/ppLibFolder@2x.svg @@ -0,0 +1,9 @@ + + ppLibFolder@2x + + + + + + + diff --git a/platform/icons/src/nodes/ppWeb.png b/platform/icons/src/nodes/ppWeb.png index 7bfc4d3858e7..261bb034931b 100644 Binary files a/platform/icons/src/nodes/ppWeb.png and b/platform/icons/src/nodes/ppWeb.png differ diff --git a/platform/icons/src/nodes/ppWeb@2x.png b/platform/icons/src/nodes/ppWeb@2x.png index 28cef24ac185..9bfa3fb68fa0 100644 Binary files a/platform/icons/src/nodes/ppWeb@2x.png and b/platform/icons/src/nodes/ppWeb@2x.png differ diff --git a/platform/icons/src/nodes/ppWebLogo.png b/platform/icons/src/nodes/ppWebLogo.png index 28cef24ac185..9bfa3fb68fa0 100644 Binary files a/platform/icons/src/nodes/ppWebLogo.png and b/platform/icons/src/nodes/ppWebLogo.png differ diff --git a/platform/icons/src/nodes/ppWebLogo@2x.png b/platform/icons/src/nodes/ppWebLogo@2x.png index 80242ae18faa..308d8d245a5d 100644 Binary files a/platform/icons/src/nodes/ppWebLogo@2x.png and b/platform/icons/src/nodes/ppWebLogo@2x.png differ diff --git a/platform/icons/src/nodes/project.png b/platform/icons/src/nodes/project.png index 883d023748bc..6e230a45cbe8 100644 Binary files a/platform/icons/src/nodes/project.png and b/platform/icons/src/nodes/project.png differ diff --git a/platform/icons/src/nodes/project@2x.png b/platform/icons/src/nodes/project@2x.png index a434c3218ffe..20dd5ee725d0 100644 Binary files a/platform/icons/src/nodes/project@2x.png and b/platform/icons/src/nodes/project@2x.png differ diff --git a/platform/icons/src/nodes/project@2x_dark.png b/platform/icons/src/nodes/project@2x_dark.png deleted file mode 100644 index 895a792295ae..000000000000 Binary files a/platform/icons/src/nodes/project@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/project_dark.png b/platform/icons/src/nodes/project_dark.png deleted file mode 100644 index bd64265ed544..000000000000 Binary files a/platform/icons/src/nodes/project_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/property.png b/platform/icons/src/nodes/property.png index 3a06c6880bd5..29968cc774e3 100644 Binary files a/platform/icons/src/nodes/property.png and b/platform/icons/src/nodes/property.png differ diff --git a/platform/icons/src/nodes/property.svg b/platform/icons/src/nodes/property.svg new file mode 100644 index 000000000000..80436f979ab8 --- /dev/null +++ b/platform/icons/src/nodes/property.svg @@ -0,0 +1,9 @@ + + property + + + + + + + diff --git a/platform/icons/src/nodes/property@2x.png b/platform/icons/src/nodes/property@2x.png index 23a3f03161da..dfc154ebf7cd 100644 Binary files a/platform/icons/src/nodes/property@2x.png and b/platform/icons/src/nodes/property@2x.png differ diff --git a/platform/icons/src/nodes/property@2x.svg b/platform/icons/src/nodes/property@2x.svg new file mode 100644 index 000000000000..6902727f92ab --- /dev/null +++ b/platform/icons/src/nodes/property@2x.svg @@ -0,0 +1,11 @@ + + property@2x + + + + + + + + + diff --git a/platform/icons/src/nodes/propertyRead.png b/platform/icons/src/nodes/propertyRead.png index b7f4f0995db3..6d391283ad68 100644 Binary files a/platform/icons/src/nodes/propertyRead.png and b/platform/icons/src/nodes/propertyRead.png differ diff --git a/platform/icons/src/nodes/propertyRead.svg b/platform/icons/src/nodes/propertyRead.svg new file mode 100644 index 000000000000..3fd4d7bc2083 --- /dev/null +++ b/platform/icons/src/nodes/propertyRead.svg @@ -0,0 +1,12 @@ + + propertyRead + + + + + + + + + + diff --git a/platform/icons/src/nodes/propertyRead@2x.png b/platform/icons/src/nodes/propertyRead@2x.png index 1eff7852c7b0..9da7dd33590b 100644 Binary files a/platform/icons/src/nodes/propertyRead@2x.png and b/platform/icons/src/nodes/propertyRead@2x.png differ diff --git a/platform/icons/src/nodes/propertyRead@2x.svg b/platform/icons/src/nodes/propertyRead@2x.svg new file mode 100644 index 000000000000..bb61fdea0a8f --- /dev/null +++ b/platform/icons/src/nodes/propertyRead@2x.svg @@ -0,0 +1,10 @@ + + propertyRead@2x + + + + + + + + diff --git a/platform/icons/src/nodes/propertyReadStatic.png b/platform/icons/src/nodes/propertyReadStatic.png index 97104815a103..bd9e9d37e177 100644 Binary files a/platform/icons/src/nodes/propertyReadStatic.png and b/platform/icons/src/nodes/propertyReadStatic.png differ diff --git a/platform/icons/src/nodes/propertyReadStatic.svg b/platform/icons/src/nodes/propertyReadStatic.svg new file mode 100644 index 000000000000..56f9cb155a1a --- /dev/null +++ b/platform/icons/src/nodes/propertyReadStatic.svg @@ -0,0 +1,13 @@ + + propertyReadStatic + + + + + + + + + + + diff --git a/platform/icons/src/nodes/propertyReadStatic@2x.png b/platform/icons/src/nodes/propertyReadStatic@2x.png index 95ced57df97d..387bb87af6fe 100644 Binary files a/platform/icons/src/nodes/propertyReadStatic@2x.png and b/platform/icons/src/nodes/propertyReadStatic@2x.png differ diff --git a/platform/icons/src/nodes/propertyReadStatic@2x.svg b/platform/icons/src/nodes/propertyReadStatic@2x.svg new file mode 100644 index 000000000000..cbf6f9473de1 --- /dev/null +++ b/platform/icons/src/nodes/propertyReadStatic@2x.svg @@ -0,0 +1,11 @@ + + propertyReadStatic@2x + + + + + + + + + diff --git a/platform/icons/src/nodes/propertyReadWrite.png b/platform/icons/src/nodes/propertyReadWrite.png index 1611f5cbd1f0..84694a03e219 100644 Binary files a/platform/icons/src/nodes/propertyReadWrite.png and b/platform/icons/src/nodes/propertyReadWrite.png differ diff --git a/platform/icons/src/nodes/propertyReadWrite.svg b/platform/icons/src/nodes/propertyReadWrite.svg new file mode 100644 index 000000000000..d60ada2a9f39 --- /dev/null +++ b/platform/icons/src/nodes/propertyReadWrite.svg @@ -0,0 +1,13 @@ + + propertyReadWrite + + + + + + + + + + + diff --git a/platform/icons/src/nodes/propertyReadWrite@2x.png b/platform/icons/src/nodes/propertyReadWrite@2x.png index ac77fef28b26..c7a0b2a06b4c 100644 Binary files a/platform/icons/src/nodes/propertyReadWrite@2x.png and b/platform/icons/src/nodes/propertyReadWrite@2x.png differ diff --git a/platform/icons/src/nodes/propertyReadWrite@2x.svg b/platform/icons/src/nodes/propertyReadWrite@2x.svg new file mode 100644 index 000000000000..0b5a446fe7fd --- /dev/null +++ b/platform/icons/src/nodes/propertyReadWrite@2x.svg @@ -0,0 +1,11 @@ + + propertyReadWrite@2x + + + + + + + + + diff --git a/platform/icons/src/nodes/propertyReadWriteStatic.png b/platform/icons/src/nodes/propertyReadWriteStatic.png index 45f16756383e..1df33844d75a 100644 Binary files a/platform/icons/src/nodes/propertyReadWriteStatic.png and b/platform/icons/src/nodes/propertyReadWriteStatic.png differ diff --git a/platform/icons/src/nodes/propertyReadWriteStatic.svg b/platform/icons/src/nodes/propertyReadWriteStatic.svg new file mode 100644 index 000000000000..75aaa4f5ed56 --- /dev/null +++ b/platform/icons/src/nodes/propertyReadWriteStatic.svg @@ -0,0 +1,14 @@ + + propertyReadWriteStatic + + + + + + + + + + + + diff --git a/platform/icons/src/nodes/propertyReadWriteStatic@2x.png b/platform/icons/src/nodes/propertyReadWriteStatic@2x.png index 7d2542d7a296..3f8f249999b0 100644 Binary files a/platform/icons/src/nodes/propertyReadWriteStatic@2x.png and b/platform/icons/src/nodes/propertyReadWriteStatic@2x.png differ diff --git a/platform/icons/src/nodes/propertyReadWriteStatic@2x.svg b/platform/icons/src/nodes/propertyReadWriteStatic@2x.svg new file mode 100644 index 000000000000..db3acb329bd4 --- /dev/null +++ b/platform/icons/src/nodes/propertyReadWriteStatic@2x.svg @@ -0,0 +1,14 @@ + + propertyReadWriteStatic@2x + + + + + + + + + + + + diff --git a/platform/icons/src/nodes/propertyWrite.png b/platform/icons/src/nodes/propertyWrite.png index 4fb6179d4221..d152b42957d5 100644 Binary files a/platform/icons/src/nodes/propertyWrite.png and b/platform/icons/src/nodes/propertyWrite.png differ diff --git a/platform/icons/src/nodes/propertyWrite.svg b/platform/icons/src/nodes/propertyWrite.svg new file mode 100644 index 000000000000..a8f15e7e9fc2 --- /dev/null +++ b/platform/icons/src/nodes/propertyWrite.svg @@ -0,0 +1,12 @@ + + propertyWrite + + + + + + + + + + diff --git a/platform/icons/src/nodes/propertyWrite@2x.png b/platform/icons/src/nodes/propertyWrite@2x.png index 69d16ee6bd15..8ea023e4211d 100644 Binary files a/platform/icons/src/nodes/propertyWrite@2x.png and b/platform/icons/src/nodes/propertyWrite@2x.png differ diff --git a/platform/icons/src/nodes/propertyWrite@2x.svg b/platform/icons/src/nodes/propertyWrite@2x.svg new file mode 100644 index 000000000000..55f74c390340 --- /dev/null +++ b/platform/icons/src/nodes/propertyWrite@2x.svg @@ -0,0 +1,10 @@ + + propertyWrite@2x + + + + + + + + diff --git a/platform/icons/src/nodes/propertyWriteStatic.png b/platform/icons/src/nodes/propertyWriteStatic.png index 6005e9c86839..b053bfc8af19 100644 Binary files a/platform/icons/src/nodes/propertyWriteStatic.png and b/platform/icons/src/nodes/propertyWriteStatic.png differ diff --git a/platform/icons/src/nodes/propertyWriteStatic.svg b/platform/icons/src/nodes/propertyWriteStatic.svg new file mode 100644 index 000000000000..53652b08df7d --- /dev/null +++ b/platform/icons/src/nodes/propertyWriteStatic.svg @@ -0,0 +1,13 @@ + + propertyWriteStatic + + + + + + + + + + + diff --git a/platform/icons/src/nodes/propertyWriteStatic@2x.png b/platform/icons/src/nodes/propertyWriteStatic@2x.png index f7ee787ff8ce..f4e79de32f8c 100644 Binary files a/platform/icons/src/nodes/propertyWriteStatic@2x.png and b/platform/icons/src/nodes/propertyWriteStatic@2x.png differ diff --git a/platform/icons/src/nodes/propertyWriteStatic@2x.svg b/platform/icons/src/nodes/propertyWriteStatic@2x.svg new file mode 100644 index 000000000000..8dcacb4fe8df --- /dev/null +++ b/platform/icons/src/nodes/propertyWriteStatic@2x.svg @@ -0,0 +1,11 @@ + + propertyWriteStatic@2x + + + + + + + + + diff --git a/platform/icons/src/nodes/read-access.png b/platform/icons/src/nodes/read-access.png index 6eea4cecf481..3b5c9f057603 100644 Binary files a/platform/icons/src/nodes/read-access.png and b/platform/icons/src/nodes/read-access.png differ diff --git a/platform/icons/src/nodes/read-access@2x.png b/platform/icons/src/nodes/read-access@2x.png index 9916f0ea3bfc..d2008be3c864 100644 Binary files a/platform/icons/src/nodes/read-access@2x.png and b/platform/icons/src/nodes/read-access@2x.png differ diff --git a/platform/icons/src/nodes/resourceBundle.png b/platform/icons/src/nodes/resourceBundle.png index 521d4387f672..008c8c55f82e 100644 Binary files a/platform/icons/src/nodes/resourceBundle.png and b/platform/icons/src/nodes/resourceBundle.png differ diff --git a/platform/icons/src/nodes/resourceBundle.svg b/platform/icons/src/nodes/resourceBundle.svg new file mode 100644 index 000000000000..f9c58f149369 --- /dev/null +++ b/platform/icons/src/nodes/resourceBundle.svg @@ -0,0 +1,7 @@ + + resourceBundle + + + + + diff --git a/platform/icons/src/nodes/resourceBundle@2x.png b/platform/icons/src/nodes/resourceBundle@2x.png index 182528401f98..59c143f7d8be 100644 Binary files a/platform/icons/src/nodes/resourceBundle@2x.png and b/platform/icons/src/nodes/resourceBundle@2x.png differ diff --git a/platform/icons/src/nodes/resourceBundle@2x.svg b/platform/icons/src/nodes/resourceBundle@2x.svg new file mode 100644 index 000000000000..ab42627deeb3 --- /dev/null +++ b/platform/icons/src/nodes/resourceBundle@2x.svg @@ -0,0 +1,7 @@ + + resourceBundle@2x + + + + + diff --git a/platform/icons/src/nodes/runnableMark.png b/platform/icons/src/nodes/runnableMark.png index 52e0d60ffbd4..f4546d537a35 100644 Binary files a/platform/icons/src/nodes/runnableMark.png and b/platform/icons/src/nodes/runnableMark.png differ diff --git a/platform/icons/src/nodes/runnableMark@2x.png b/platform/icons/src/nodes/runnableMark@2x.png index 0c78a4a66c62..780e7dd854a0 100644 Binary files a/platform/icons/src/nodes/runnableMark@2x.png and b/platform/icons/src/nodes/runnableMark@2x.png differ diff --git a/platform/icons/src/nodes/runnableMark@2x_dark.png b/platform/icons/src/nodes/runnableMark@2x_dark.png deleted file mode 100644 index 5b39e5de83e5..000000000000 Binary files a/platform/icons/src/nodes/runnableMark@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/runnableMark_dark.png b/platform/icons/src/nodes/runnableMark_dark.png deleted file mode 100644 index 4876c09bb612..000000000000 Binary files a/platform/icons/src/nodes/runnableMark_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/rw-access.png b/platform/icons/src/nodes/rw-access.png index 1c2eb8d6d6a9..75f2b3c35a2d 100644 Binary files a/platform/icons/src/nodes/rw-access.png and b/platform/icons/src/nodes/rw-access.png differ diff --git a/platform/icons/src/nodes/rw-access@2x.png b/platform/icons/src/nodes/rw-access@2x.png index 50e7533d7c19..dc6513232f16 100644 Binary files a/platform/icons/src/nodes/rw-access@2x.png and b/platform/icons/src/nodes/rw-access@2x.png differ diff --git a/platform/icons/src/nodes/rw-access@2x_dark.png b/platform/icons/src/nodes/rw-access@2x_dark.png deleted file mode 100644 index a1e68df444f4..000000000000 Binary files a/platform/icons/src/nodes/rw-access@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/rw-access_dark.png b/platform/icons/src/nodes/rw-access_dark.png deleted file mode 100644 index 73789a3311eb..000000000000 Binary files a/platform/icons/src/nodes/rw-access_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/shared.png b/platform/icons/src/nodes/shared.png index b7c6eb8772c4..3ab3eef96c41 100644 Binary files a/platform/icons/src/nodes/shared.png and b/platform/icons/src/nodes/shared.png differ diff --git a/platform/icons/src/nodes/shared@2x.png b/platform/icons/src/nodes/shared@2x.png index a40b9e87ae7c..5403f46be625 100644 Binary files a/platform/icons/src/nodes/shared@2x.png and b/platform/icons/src/nodes/shared@2x.png differ diff --git a/platform/icons/src/nodes/shared@2x_dark.png b/platform/icons/src/nodes/shared@2x_dark.png deleted file mode 100644 index 3d196d042c87..000000000000 Binary files a/platform/icons/src/nodes/shared@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/shared_dark.png b/platform/icons/src/nodes/shared_dark.png deleted file mode 100644 index 8ed9ff86debc..000000000000 Binary files a/platform/icons/src/nodes/shared_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/sourceFolder.png b/platform/icons/src/nodes/sourceFolder.png index 1b12a110117e..1493b3143fa4 100644 Binary files a/platform/icons/src/nodes/sourceFolder.png and b/platform/icons/src/nodes/sourceFolder.png differ diff --git a/platform/icons/src/nodes/sourceFolder.svg b/platform/icons/src/nodes/sourceFolder.svg new file mode 100644 index 000000000000..60c8b94dfb42 --- /dev/null +++ b/platform/icons/src/nodes/sourceFolder.svg @@ -0,0 +1,7 @@ + + sourceFolder + + + + + diff --git a/platform/icons/src/nodes/sourceFolder@2x.png b/platform/icons/src/nodes/sourceFolder@2x.png index 3dd406846de8..5f16bc935ddb 100644 Binary files a/platform/icons/src/nodes/sourceFolder@2x.png and b/platform/icons/src/nodes/sourceFolder@2x.png differ diff --git a/platform/icons/src/nodes/sourceFolder@2x.svg b/platform/icons/src/nodes/sourceFolder@2x.svg new file mode 100644 index 000000000000..64ea3ed8c375 --- /dev/null +++ b/platform/icons/src/nodes/sourceFolder@2x.svg @@ -0,0 +1,7 @@ + + sourceFolder@2x + + + + + diff --git a/platform/icons/src/nodes/static.png b/platform/icons/src/nodes/static.png index f227f1a3d994..4618e069037b 100644 Binary files a/platform/icons/src/nodes/static.png and b/platform/icons/src/nodes/static.png differ diff --git a/platform/icons/src/nodes/static.svg b/platform/icons/src/nodes/static.svg new file mode 100644 index 000000000000..f51f0a50c67e --- /dev/null +++ b/platform/icons/src/nodes/static.svg @@ -0,0 +1,9 @@ + + static + + + + + + + diff --git a/platform/icons/src/nodes/static@2x.png b/platform/icons/src/nodes/static@2x.png index 8630520260a9..e81acce0725f 100644 Binary files a/platform/icons/src/nodes/static@2x.png and b/platform/icons/src/nodes/static@2x.png differ diff --git a/platform/icons/src/nodes/static@2x.svg b/platform/icons/src/nodes/static@2x.svg new file mode 100644 index 000000000000..63eb4ead709c --- /dev/null +++ b/platform/icons/src/nodes/static@2x.svg @@ -0,0 +1,9 @@ + + static@2x + + + + + + + diff --git a/platform/icons/src/nodes/staticMark.png b/platform/icons/src/nodes/staticMark.png index 349b0a85020d..d91297b007d4 100644 Binary files a/platform/icons/src/nodes/staticMark.png and b/platform/icons/src/nodes/staticMark.png differ diff --git a/platform/icons/src/nodes/staticMark@2x.png b/platform/icons/src/nodes/staticMark@2x.png index 2ea1c7f5172e..48312d5fd4c2 100644 Binary files a/platform/icons/src/nodes/staticMark@2x.png and b/platform/icons/src/nodes/staticMark@2x.png differ diff --git a/platform/icons/src/nodes/staticMark@2x_dark.png b/platform/icons/src/nodes/staticMark@2x_dark.png deleted file mode 100644 index 6e65adcc3f44..000000000000 Binary files a/platform/icons/src/nodes/staticMark@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/staticMark_dark.png b/platform/icons/src/nodes/staticMark_dark.png deleted file mode 100644 index b00eb95bb867..000000000000 Binary files a/platform/icons/src/nodes/staticMark_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/symlink.png b/platform/icons/src/nodes/symlink.png index 1bb3f5dac9ea..2971f3745b6c 100644 Binary files a/platform/icons/src/nodes/symlink.png and b/platform/icons/src/nodes/symlink.png differ diff --git a/platform/icons/src/nodes/symlink@2x.png b/platform/icons/src/nodes/symlink@2x.png index 8fbb0956f34d..68598720ed9d 100644 Binary files a/platform/icons/src/nodes/symlink@2x.png and b/platform/icons/src/nodes/symlink@2x.png differ diff --git a/platform/icons/src/nodes/symlink@2x_dark.png b/platform/icons/src/nodes/symlink@2x_dark.png deleted file mode 100644 index 5a64707ca39b..000000000000 Binary files a/platform/icons/src/nodes/symlink@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/symlink_dark.png b/platform/icons/src/nodes/symlink_dark.png deleted file mode 100644 index 91aadd14a7a9..000000000000 Binary files a/platform/icons/src/nodes/symlink_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/tabAlert.png b/platform/icons/src/nodes/tabAlert.png index 831ccd4ca20e..67259de72410 100644 Binary files a/platform/icons/src/nodes/tabAlert.png and b/platform/icons/src/nodes/tabAlert.png differ diff --git a/platform/icons/src/nodes/tabAlert@2x.png b/platform/icons/src/nodes/tabAlert@2x.png index c98bdd9ca905..ec00b1e7094e 100644 Binary files a/platform/icons/src/nodes/tabAlert@2x.png and b/platform/icons/src/nodes/tabAlert@2x.png differ diff --git a/platform/icons/src/nodes/tabAlert@2x_dark.png b/platform/icons/src/nodes/tabAlert@2x_dark.png deleted file mode 100644 index d662dfb4909c..000000000000 Binary files a/platform/icons/src/nodes/tabAlert@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/tabAlert_dark.png b/platform/icons/src/nodes/tabAlert_dark.png deleted file mode 100644 index 499a6823d176..000000000000 Binary files a/platform/icons/src/nodes/tabAlert_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/tabPin.png b/platform/icons/src/nodes/tabPin.png index e164d9b26c8c..3a4da8909211 100644 Binary files a/platform/icons/src/nodes/tabPin.png and b/platform/icons/src/nodes/tabPin.png differ diff --git a/platform/icons/src/nodes/tabPin@2x.png b/platform/icons/src/nodes/tabPin@2x.png index 1bc983cc9181..5236c0f58779 100644 Binary files a/platform/icons/src/nodes/tabPin@2x.png and b/platform/icons/src/nodes/tabPin@2x.png differ diff --git a/platform/icons/src/nodes/tabPin@2x_dark.png b/platform/icons/src/nodes/tabPin@2x_dark.png deleted file mode 100644 index 5a025800cb5d..000000000000 Binary files a/platform/icons/src/nodes/tabPin@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/tabPin_dark.png b/platform/icons/src/nodes/tabPin_dark.png deleted file mode 100644 index 8d55e33c012b..000000000000 Binary files a/platform/icons/src/nodes/tabPin_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/testSourceFolder.png b/platform/icons/src/nodes/testSourceFolder.png index 80baa67446e4..8a3726862797 100644 Binary files a/platform/icons/src/nodes/testSourceFolder.png and b/platform/icons/src/nodes/testSourceFolder.png differ diff --git a/platform/icons/src/nodes/testSourceFolder@2x.png b/platform/icons/src/nodes/testSourceFolder@2x.png index 3cb5d524050b..861b65234374 100644 Binary files a/platform/icons/src/nodes/testSourceFolder@2x.png and b/platform/icons/src/nodes/testSourceFolder@2x.png differ diff --git a/platform/icons/src/nodes/undeploy.png b/platform/icons/src/nodes/undeploy.png index cf9cb1221f84..4f82d905f35a 100644 Binary files a/platform/icons/src/nodes/undeploy.png and b/platform/icons/src/nodes/undeploy.png differ diff --git a/platform/icons/src/nodes/undeploy@2x.png b/platform/icons/src/nodes/undeploy@2x.png index 2c2ec080b84d..cfda17ef0456 100644 Binary files a/platform/icons/src/nodes/undeploy@2x.png and b/platform/icons/src/nodes/undeploy@2x.png differ diff --git a/platform/icons/src/nodes/unknownJdk.png b/platform/icons/src/nodes/unknownJdk.png index a0cd9974c0b9..2ed600cb04bd 100644 Binary files a/platform/icons/src/nodes/unknownJdk.png and b/platform/icons/src/nodes/unknownJdk.png differ diff --git a/platform/icons/src/nodes/unknownJdk.svg b/platform/icons/src/nodes/unknownJdk.svg new file mode 100644 index 000000000000..741ca736fb33 --- /dev/null +++ b/platform/icons/src/nodes/unknownJdk.svg @@ -0,0 +1,10 @@ + + unknownJdk + + + + + + + + diff --git a/platform/icons/src/nodes/unknownJdk@2x.png b/platform/icons/src/nodes/unknownJdk@2x.png index c9b390414e2a..b91030d704f9 100644 Binary files a/platform/icons/src/nodes/unknownJdk@2x.png and b/platform/icons/src/nodes/unknownJdk@2x.png differ diff --git a/platform/icons/src/nodes/unknownJdk@2x.svg b/platform/icons/src/nodes/unknownJdk@2x.svg new file mode 100644 index 000000000000..390489716e4a --- /dev/null +++ b/platform/icons/src/nodes/unknownJdk@2x.svg @@ -0,0 +1,10 @@ + + unknownJdk@2x + + + + + + + + diff --git a/platform/icons/src/nodes/unknownJdk@2x_dark.png b/platform/icons/src/nodes/unknownJdk@2x_dark.png deleted file mode 100644 index 22c6dfd93e29..000000000000 Binary files a/platform/icons/src/nodes/unknownJdk@2x_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/unknownJdk_dark.png b/platform/icons/src/nodes/unknownJdk_dark.png deleted file mode 100644 index f5d401035ac5..000000000000 Binary files a/platform/icons/src/nodes/unknownJdk_dark.png and /dev/null differ diff --git a/platform/icons/src/nodes/upFolder.png b/platform/icons/src/nodes/upFolder.png index 859969d3dc6f..20b91117d5ae 100644 Binary files a/platform/icons/src/nodes/upFolder.png and b/platform/icons/src/nodes/upFolder.png differ diff --git a/platform/icons/src/nodes/upFolder.svg b/platform/icons/src/nodes/upFolder.svg new file mode 100644 index 000000000000..df693e734b16 --- /dev/null +++ b/platform/icons/src/nodes/upFolder.svg @@ -0,0 +1,9 @@ + + upFolder + + + + + + + diff --git a/platform/icons/src/nodes/upFolder@2x.png b/platform/icons/src/nodes/upFolder@2x.png index 14d04d79c1e4..4135152c1051 100644 Binary files a/platform/icons/src/nodes/upFolder@2x.png and b/platform/icons/src/nodes/upFolder@2x.png differ diff --git a/platform/icons/src/nodes/upFolder@2x.svg b/platform/icons/src/nodes/upFolder@2x.svg new file mode 100644 index 000000000000..998019074af8 --- /dev/null +++ b/platform/icons/src/nodes/upFolder@2x.svg @@ -0,0 +1,9 @@ + + upFolder@2x + + + + + + + diff --git a/platform/icons/src/nodes/upLevel.png b/platform/icons/src/nodes/upLevel.png index 704406857f38..e6750324c6a4 100644 Binary files a/platform/icons/src/nodes/upLevel.png and b/platform/icons/src/nodes/upLevel.png differ diff --git a/platform/icons/src/nodes/upLevel@2x.png b/platform/icons/src/nodes/upLevel@2x.png index ff027796f9c4..df1d14623fb8 100644 Binary files a/platform/icons/src/nodes/upLevel@2x.png and b/platform/icons/src/nodes/upLevel@2x.png differ diff --git a/platform/icons/src/nodes/variable.png b/platform/icons/src/nodes/variable.png index 074107ae1882..bcb96d96135e 100644 Binary files a/platform/icons/src/nodes/variable.png and b/platform/icons/src/nodes/variable.png differ diff --git a/platform/icons/src/nodes/variable.svg b/platform/icons/src/nodes/variable.svg new file mode 100644 index 000000000000..5280e6440848 --- /dev/null +++ b/platform/icons/src/nodes/variable.svg @@ -0,0 +1,7 @@ + + variable + + + + + diff --git a/platform/icons/src/nodes/variable@2x.png b/platform/icons/src/nodes/variable@2x.png index 9bff27eacdaa..d1b7114b6afe 100644 Binary files a/platform/icons/src/nodes/variable@2x.png and b/platform/icons/src/nodes/variable@2x.png differ diff --git a/platform/icons/src/nodes/variable@2x.svg b/platform/icons/src/nodes/variable@2x.svg new file mode 100644 index 000000000000..31a86827272f --- /dev/null +++ b/platform/icons/src/nodes/variable@2x.svg @@ -0,0 +1,7 @@ + + variable@2x + + + + + diff --git a/platform/icons/src/nodes/warningIntroduction.png b/platform/icons/src/nodes/warningIntroduction.png index 48af6656908e..9f275a4e7916 100644 Binary files a/platform/icons/src/nodes/warningIntroduction.png and b/platform/icons/src/nodes/warningIntroduction.png differ diff --git a/platform/icons/src/nodes/warningIntroduction@2x.png b/platform/icons/src/nodes/warningIntroduction@2x.png index 166bdb3637a1..485542787a5a 100644 Binary files a/platform/icons/src/nodes/warningIntroduction@2x.png and b/platform/icons/src/nodes/warningIntroduction@2x.png differ diff --git a/platform/icons/src/nodes/webFolder.png b/platform/icons/src/nodes/webFolder.png index 6285deed2039..af559d0b70bb 100644 Binary files a/platform/icons/src/nodes/webFolder.png and b/platform/icons/src/nodes/webFolder.png differ diff --git a/platform/icons/src/nodes/webFolder.svg b/platform/icons/src/nodes/webFolder.svg new file mode 100644 index 000000000000..08f444f502c0 --- /dev/null +++ b/platform/icons/src/nodes/webFolder.svg @@ -0,0 +1,7 @@ + + webFolder + + + + + diff --git a/platform/icons/src/nodes/webFolder@2x.png b/platform/icons/src/nodes/webFolder@2x.png index b6a687c8ca00..a2448c2a2c77 100644 Binary files a/platform/icons/src/nodes/webFolder@2x.png and b/platform/icons/src/nodes/webFolder@2x.png differ diff --git a/platform/icons/src/nodes/webFolder@2x.svg b/platform/icons/src/nodes/webFolder@2x.svg new file mode 100644 index 000000000000..0467cb49f64e --- /dev/null +++ b/platform/icons/src/nodes/webFolder@2x.svg @@ -0,0 +1,9 @@ + + webFolder@2x + + + + + + + diff --git a/platform/icons/src/nodes/weblistener.png b/platform/icons/src/nodes/weblistener.png index 0836cdde914f..92b3f383d33f 100644 Binary files a/platform/icons/src/nodes/weblistener.png and b/platform/icons/src/nodes/weblistener.png differ diff --git a/platform/icons/src/nodes/weblistener@2x.png b/platform/icons/src/nodes/weblistener@2x.png index b09ab823488b..7db6aa9eb0ef 100644 Binary files a/platform/icons/src/nodes/weblistener@2x.png and b/platform/icons/src/nodes/weblistener@2x.png differ diff --git a/platform/icons/src/nodes/write-access.png b/platform/icons/src/nodes/write-access.png index da8cfc66a615..be14d0aa73e7 100644 Binary files a/platform/icons/src/nodes/write-access.png and b/platform/icons/src/nodes/write-access.png differ diff --git a/platform/icons/src/nodes/write-access@2x.png b/platform/icons/src/nodes/write-access@2x.png index e302cdc3bd86..438c853df671 100644 Binary files a/platform/icons/src/nodes/write-access@2x.png and b/platform/icons/src/nodes/write-access@2x.png differ diff --git a/platform/icons/src/toolwindows/toolWindowChanges.png b/platform/icons/src/toolwindows/toolWindowChanges.png index dd459d0025f0..d1cb6f7413d9 100644 Binary files a/platform/icons/src/toolwindows/toolWindowChanges.png and b/platform/icons/src/toolwindows/toolWindowChanges.png differ diff --git a/platform/icons/src/toolwindows/toolWindowChanges@2x.png b/platform/icons/src/toolwindows/toolWindowChanges@2x.png index c7474de5c719..fa63ee8e6758 100644 Binary files a/platform/icons/src/toolwindows/toolWindowChanges@2x.png and b/platform/icons/src/toolwindows/toolWindowChanges@2x.png differ diff --git a/platform/icons/src/toolwindows/toolWindowChanges@2x_dark.png b/platform/icons/src/toolwindows/toolWindowChanges@2x_dark.png index 470142ff9091..ab35ec6f9d85 100644 Binary files a/platform/icons/src/toolwindows/toolWindowChanges@2x_dark.png and b/platform/icons/src/toolwindows/toolWindowChanges@2x_dark.png differ diff --git a/platform/icons/src/toolwindows/toolWindowChanges_dark.png b/platform/icons/src/toolwindows/toolWindowChanges_dark.png index 8b6ff5a10d25..952c31ce17a2 100644 Binary files a/platform/icons/src/toolwindows/toolWindowChanges_dark.png and b/platform/icons/src/toolwindows/toolWindowChanges_dark.png differ diff --git a/platform/lang-impl/src/com/intellij/application/options/colors/ColorAndFontOptions.java b/platform/lang-impl/src/com/intellij/application/options/colors/ColorAndFontOptions.java index e3fc61515212..2cee88f55c6f 100644 --- a/platform/lang-impl/src/com/intellij/application/options/colors/ColorAndFontOptions.java +++ b/platform/lang-impl/src/com/intellij/application/options/colors/ColorAndFontOptions.java @@ -839,7 +839,7 @@ public class ColorAndFontOptions extends SearchableConfigurable.Parent.Abstract if (scheme == null) { scheme = getScheme(); } - scheme.setAttributes(key, isInherited() ? new TextAttributes() : getTextAttributes()); + scheme.setAttributes(key, isInherited() ? USE_INHERITED_MARKER : getTextAttributes()); } @Override @@ -866,11 +866,6 @@ public class ColorAndFontOptions extends SearchableConfigurable.Parent.Abstract public Pair getBaseAttributeDescriptor() { return myBaseAttributeDescriptor; } - - @Override - public void setInherited(boolean isInherited) { - super.setInherited(isInherited); - } } private static class GetSetColor { @@ -1174,7 +1169,7 @@ public class ColorAndFontOptions extends SearchableConfigurable.Parent.Abstract if (myParentScheme instanceof AbstractColorsScheme) { TextAttributes ownAttrs = ((AbstractColorsScheme)myParentScheme).getDirectlyDefinedAttributes(key); if (ownAttrs != null) { - return ownAttrs.isFallbackEnabled(); + return ownAttrs == TextAttributes.USE_INHERITED_MARKER; } } TextAttributes attributes = getAttributes(key); diff --git a/platform/lang-impl/src/com/intellij/application/options/colors/TextAttributesDescription.java b/platform/lang-impl/src/com/intellij/application/options/colors/TextAttributesDescription.java index 85ca6d564168..70e4ddc91e71 100644 --- a/platform/lang-impl/src/com/intellij/application/options/colors/TextAttributesDescription.java +++ b/platform/lang-impl/src/com/intellij/application/options/colors/TextAttributesDescription.java @@ -101,10 +101,4 @@ public abstract class TextAttributesDescription extends ColorAndFontDescription protected TextAttributes getTextAttributes() { return myAttributes; } - - @Override - public void setInherited(boolean isInherited) { - super.setInherited(isInherited); - myAttributes.setEnforceEmpty(!isInherited); - } } diff --git a/platform/lang-impl/src/com/intellij/codeInsight/editorActions/moveUpDown/MoverWrapper.java b/platform/lang-impl/src/com/intellij/codeInsight/editorActions/moveUpDown/MoverWrapper.java index 00bab74b4f6d..0b641a7756dc 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/editorActions/moveUpDown/MoverWrapper.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/editorActions/moveUpDown/MoverWrapper.java @@ -54,96 +54,97 @@ class MoverWrapper { assert myInfo.toMove2 != null; myMover.beforeMove(editor, myInfo, myIsDown); final Document document = editor.getDocument(); - - final int start = StatementUpDownMover.getLineStartSafeOffset(document, myInfo.toMove.startLine); - final int end = StatementUpDownMover.getLineStartSafeOffset(document, myInfo.toMove.endLine); - String textToInsert = document.getCharsSequence().subSequence(start, end).toString(); - if (!StringUtil.endsWithChar(textToInsert,'\n')) textToInsert += '\n'; - - final int start2 = document.getLineStartOffset(myInfo.toMove2.startLine); - final int end2 = StatementUpDownMover.getLineStartSafeOffset(document,myInfo.toMove2.endLine); - String textToInsert2 = document.getCharsSequence().subSequence(start2, end2).toString(); - if (!StringUtil.endsWithChar(textToInsert2,'\n')) textToInsert2 += '\n'; - - TextRange range = new TextRange(start, end); - TextRange range2 = new TextRange(start2, end2); - if (range.intersectsStrict(range2) && !range.equals(range2)) { - LOGGER.error("Wrong move ranges requested by " + myMover, - new Attachment("ranges.txt", - start + ":" + end + "(" + textToInsert + ")\n" + start2 + ":" + end2 + "(" + textToInsert2 + ")")); - return; - } - - myInfo.range1 = document.createRangeMarker(start, end); - myInfo.range2 = document.createRangeMarker(start2, end2); - if (myInfo.range1.getStartOffset() < myInfo.range2.getStartOffset()) { - myInfo.range1.setGreedyToLeft(true); - myInfo.range1.setGreedyToRight(false); - myInfo.range2.setGreedyToLeft(true); - myInfo.range2.setGreedyToRight(true); - } - else { - myInfo.range1.setGreedyToLeft(true); - myInfo.range1.setGreedyToRight(true); - myInfo.range2.setGreedyToLeft(true); - myInfo.range2.setGreedyToRight(false); - } - - final CaretModel caretModel = editor.getCaretModel(); - final int caretRelativePos = caretModel.getOffset() - start; - final SelectionModel selectionModel = editor.getSelectionModel(); - final int selectionStart = selectionModel.getSelectionStart(); - final int selectionEnd = selectionModel.getSelectionEnd(); - final boolean hasSelection = selectionModel.hasSelection(); - - // to prevent flicker - caretModel.moveToOffset(0); - - // There is a possible case that the user performs, say, method move. It's also possible that one (or both) of moved methods - // are folded. We want to preserve their states then. The problem is that folding processing is based on PSI element pointers - // and the pointers behave as following during move up/down: - // method1() {} - // method2() {} - // Pointer for the fold region from method1 points to 'method2()' now and vice versa (check range markers processing on - // document change for further information). I.e. information about fold regions statuses holds the data swapped for - // 'method1' and 'method2'. Hence, we want to apply correct 'collapsed' status. - final FoldRegion topRegion = findTopLevelRegionInRange(editor, myInfo.range1); - final FoldRegion bottomRegion = findTopLevelRegionInRange(editor, myInfo.range2); - - document.insertString(myInfo.range1.getStartOffset(), textToInsert2); - document.deleteString(myInfo.range1.getStartOffset()+textToInsert2.length(), myInfo.range1.getEndOffset()); - - document.insertString(myInfo.range2.getStartOffset(), textToInsert); - int s = myInfo.range2.getStartOffset() + textToInsert.length(); - int e = myInfo.range2.getEndOffset(); - if (e > s) { - document.deleteString(s, e); - } - final Project project = file.getProject(); - PsiDocumentManager.getInstance(project).commitAllDocuments(); + if (!myInfo.toMove.equals(myInfo.toMove2)) { // some movers (e.g. PyStatementMover) perform actual moving inside beforeMove/afterMove + final int start = StatementUpDownMover.getLineStartSafeOffset(document, myInfo.toMove.startLine); + final int end = StatementUpDownMover.getLineStartSafeOffset(document, myInfo.toMove.endLine); + String textToInsert = document.getCharsSequence().subSequence(start, end).toString(); + if (!StringUtil.endsWithChar(textToInsert,'\n')) textToInsert += '\n'; - // Swap fold regions status if necessary. - if (topRegion != null && bottomRegion != null) { - CodeFoldingManager.getInstance(project).updateFoldRegions(editor); - editor.getFoldingModel().runBatchFoldingOperation(() -> { - FoldRegion newTopRegion = findTopLevelRegionInRange(editor, myInfo.range1); - if (newTopRegion != null) { - newTopRegion.setExpanded(bottomRegion.isExpanded()); - } + final int start2 = document.getLineStartOffset(myInfo.toMove2.startLine); + final int end2 = StatementUpDownMover.getLineStartSafeOffset(document,myInfo.toMove2.endLine); + String textToInsert2 = document.getCharsSequence().subSequence(start2, end2).toString(); + if (!StringUtil.endsWithChar(textToInsert2,'\n')) textToInsert2 += '\n'; - FoldRegion newBottomRegion = findTopLevelRegionInRange(editor, myInfo.range2); - if (newBottomRegion != null) { - newBottomRegion.setExpanded(topRegion.isExpanded()); - } - }); + TextRange range = new TextRange(start, end); + TextRange range2 = new TextRange(start2, end2); + if (range.intersectsStrict(range2) && !range.equals(range2)) { + LOGGER.error("Wrong move ranges requested by " + myMover, + new Attachment("ranges.txt", + start + ":" + end + "(" + textToInsert + ")\n" + start2 + ":" + end2 + "(" + textToInsert2 + ")")); + return; + } + + myInfo.range1 = document.createRangeMarker(start, end); + myInfo.range2 = document.createRangeMarker(start2, end2); + if (myInfo.range1.getStartOffset() < myInfo.range2.getStartOffset()) { + myInfo.range1.setGreedyToLeft(true); + myInfo.range1.setGreedyToRight(false); + myInfo.range2.setGreedyToLeft(true); + myInfo.range2.setGreedyToRight(true); + } + else { + myInfo.range1.setGreedyToLeft(true); + myInfo.range1.setGreedyToRight(true); + myInfo.range2.setGreedyToLeft(true); + myInfo.range2.setGreedyToRight(false); + } + + final CaretModel caretModel = editor.getCaretModel(); + final int caretRelativePos = caretModel.getOffset() - start; + final SelectionModel selectionModel = editor.getSelectionModel(); + final int selectionStart = selectionModel.getSelectionStart(); + final int selectionEnd = selectionModel.getSelectionEnd(); + final boolean hasSelection = selectionModel.hasSelection(); + + // to prevent flicker + caretModel.moveToOffset(0); + + // There is a possible case that the user performs, say, method move. It's also possible that one (or both) of moved methods + // are folded. We want to preserve their states then. The problem is that folding processing is based on PSI element pointers + // and the pointers behave as following during move up/down: + // method1() {} + // method2() {} + // Pointer for the fold region from method1 points to 'method2()' now and vice versa (check range markers processing on + // document change for further information). I.e. information about fold regions statuses holds the data swapped for + // 'method1' and 'method2'. Hence, we want to apply correct 'collapsed' status. + final FoldRegion topRegion = findTopLevelRegionInRange(editor, myInfo.range1); + final FoldRegion bottomRegion = findTopLevelRegionInRange(editor, myInfo.range2); + + document.insertString(myInfo.range1.getStartOffset(), textToInsert2); + document.deleteString(myInfo.range1.getStartOffset()+textToInsert2.length(), myInfo.range1.getEndOffset()); + + document.insertString(myInfo.range2.getStartOffset(), textToInsert); + int s = myInfo.range2.getStartOffset() + textToInsert.length(); + int e = myInfo.range2.getEndOffset(); + if (e > s) { + document.deleteString(s, e); + } + + PsiDocumentManager.getInstance(project).commitAllDocuments(); + + // Swap fold regions status if necessary. + if (topRegion != null && bottomRegion != null) { + CodeFoldingManager.getInstance(project).updateFoldRegions(editor); + editor.getFoldingModel().runBatchFoldingOperation(() -> { + FoldRegion newTopRegion = findTopLevelRegionInRange(editor, myInfo.range1); + if (newTopRegion != null) { + newTopRegion.setExpanded(bottomRegion.isExpanded()); + } + + FoldRegion newBottomRegion = findTopLevelRegionInRange(editor, myInfo.range2); + if (newBottomRegion != null) { + newBottomRegion.setExpanded(topRegion.isExpanded()); + } + }); + } + + if (hasSelection) { + restoreSelection(editor, selectionStart, selectionEnd, start, end, myInfo.range2.getStartOffset()); + } + + caretModel.moveToOffset(myInfo.range2.getStartOffset() + caretRelativePos); } - - if (hasSelection) { - restoreSelection(editor, selectionStart, selectionEnd, start, end, myInfo.range2.getStartOffset()); - } - - caretModel.moveToOffset(myInfo.range2.getStartOffset() + caretRelativePos); myMover.afterMove(editor, file, myInfo, myIsDown); PsiDocumentManager.getInstance(project).commitDocument(document); if (myInfo.indentTarget) { diff --git a/platform/lang-impl/src/com/intellij/codeInspection/ex/GlobalInspectionContextImpl.java b/platform/lang-impl/src/com/intellij/codeInspection/ex/GlobalInspectionContextImpl.java index e5df233f038d..65322446cb83 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/ex/GlobalInspectionContextImpl.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/ex/GlobalInspectionContextImpl.java @@ -470,7 +470,10 @@ public class GlobalInspectionContextImpl extends GlobalInspectionContextBase imp GlobalSimpleInspectionTool tool = (GlobalSimpleInspectionTool)toolWrapper.getTool(); ProblemDescriptionsProcessor problemDescriptionProcessor = getProblemDescriptionProcessor(toolWrapper, map); tool.inspectionFinished(inspectionManager, this, problemDescriptionProcessor); + } + + addProblemsToView(globalSimpleTools); } private void inspectFile(@NotNull final PsiFile file, @@ -656,12 +659,8 @@ public class GlobalInspectionContextImpl extends GlobalInspectionContextBase imp LOG.error(e); } } - if (!ApplicationManager.getApplication().isUnitTestMode() && !ApplicationManager.getApplication().isHeadlessEnvironment()) { - if (myView == null && !ReadAction.compute(() -> InspectionResultsView.hasProblems(globalTools, this, createContentProvider())).booleanValue()) { - return; - } - initializeViewIfNeed().doWhenDone(() -> myView.addTools(globalTools)); - } + + addProblemsToView(globalTools); } public ActionCallback initializeViewIfNeed() { @@ -994,4 +993,14 @@ public class GlobalInspectionContextImpl extends GlobalInspectionContextBase imp private InspectionRVContentProvider createContentProvider() { return new InspectionRVContentProviderImpl(getProject()); } + + private void addProblemsToView(List tools) { + if (ApplicationManager.getApplication().isUnitTestMode() || ApplicationManager.getApplication().isHeadlessEnvironment()) { + return; + } + if (myView == null && !ReadAction.compute(() -> InspectionResultsView.hasProblems(tools, this, createContentProvider())).booleanValue()) { + return; + } + initializeViewIfNeed().doWhenDone(() -> myView.addTools(tools)); + } } diff --git a/platform/lang-impl/src/com/intellij/codeInspection/ex/SeverityEditorDialog.java b/platform/lang-impl/src/com/intellij/codeInspection/ex/SeverityEditorDialog.java index 5b4a6f324138..666abce56f06 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/ex/SeverityEditorDialog.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/ex/SeverityEditorDialog.java @@ -295,10 +295,9 @@ public class SeverityEditorDialog extends DialogWrapper { if (info == null) { return; } - final MyTextAttributesDescription description = - new MyTextAttributesDescription(info.getType().toString(), null, new TextAttributes(), info.getType().getAttributesKey()); + MyTextAttributesDescription description = new MyTextAttributesDescription(info.getType().toString(), null, new TextAttributes(), info.getType().getAttributesKey()); myOptionsPanel.apply(description, null); - @NonNls Element textAttributes = new Element("temp"); + Element textAttributes = new Element("temp"); try { description.getTextAttributes().writeExternal(textAttributes); info.getAttributes().readExternal(textAttributes); diff --git a/platform/lang-impl/src/com/intellij/codeInspection/ui/DefaultInspectionToolPresentation.java b/platform/lang-impl/src/com/intellij/codeInspection/ui/DefaultInspectionToolPresentation.java index 7b1f0c458421..75a5dec19f50 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/ui/DefaultInspectionToolPresentation.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/ui/DefaultInspectionToolPresentation.java @@ -211,7 +211,7 @@ public class DefaultInspectionToolPresentation implements ProblemDescriptionsPro if (context.isViewClosed() || !(refElement instanceof RefElement)) { return; } - if (!ApplicationManager.getApplication().isUnitTestMode()) { + if (myToolWrapper instanceof LocalInspectionToolWrapper && !ApplicationManager.getApplication().isUnitTestMode()) { context.initializeViewIfNeed().doWhenDone(() -> context.getView().addProblemDescriptors(myToolWrapper, refElement, descriptors)); } } @@ -313,7 +313,13 @@ public class DefaultInspectionToolPresentation implements ProblemDescriptionsPro @Override public void ignoreElement(@NotNull final RefEntity refEntity) { - getProblemElements().remove(refEntity); + final CommonProblemDescriptor[] removedDescriptors = getProblemElements().remove(refEntity); + if (removedDescriptors != null) { + for (CommonProblemDescriptor descriptor : removedDescriptors) { + getProblemToElements().remove(descriptor); + } + } + getQuickFixActions().remove(refEntity); } diff --git a/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsViewComparator.java b/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsViewComparator.java index cb85ba7ae702..3758a78aa777 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsViewComparator.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsViewComparator.java @@ -32,6 +32,7 @@ import com.intellij.codeInspection.reference.RefEntity; import com.intellij.codeInspection.reference.RefFile; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.util.Comparing; +import com.intellij.openapi.util.TextRange; import com.intellij.openapi.util.text.StringUtil; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.profile.codeInspection.ui.inspectionsTree.InspectionsConfigTreeComparator; @@ -107,8 +108,18 @@ public class InspectionResultsViewComparator implements Comparator { if (diff != 0) { return diff; } - return PsiUtilCore.compareElementsByPosition(((ProblemDescriptor)descriptor2).getEndElement(), + diff = PsiUtilCore.compareElementsByPosition(((ProblemDescriptor)descriptor2).getEndElement(), ((ProblemDescriptor)descriptor1).getEndElement()); + if (diff != 0) return diff; + + final TextRange range1 = ((ProblemDescriptor)descriptor1).getTextRangeInElement(); + final TextRange range2 = ((ProblemDescriptor)descriptor2).getTextRangeInElement(); + if (range1 != null && range2 != null) { + diff = range1.getStartOffset() - range2.getStartOffset(); + if (diff != 0) return diff; + diff = range1.getEndOffset() - range2.getEndOffset(); + if (diff != 0) return diff; + } } if (descriptor1 != null && descriptor2 != null) { return descriptor1.getDescriptionTemplate().compareToIgnoreCase(descriptor2.getDescriptionTemplate()); diff --git a/platform/lang-impl/src/com/intellij/ide/actions/SearchAgainAction.java b/platform/lang-impl/src/com/intellij/ide/actions/SearchAgainAction.java index 746068aea363..31933bc613f8 100644 --- a/platform/lang-impl/src/com/intellij/ide/actions/SearchAgainAction.java +++ b/platform/lang-impl/src/com/intellij/ide/actions/SearchAgainAction.java @@ -16,21 +16,16 @@ package com.intellij.ide.actions; -import com.intellij.find.EditorSearchSession; import com.intellij.find.FindManager; import com.intellij.find.FindUtil; import com.intellij.ide.IdeBundle; -import com.intellij.openapi.actionSystem.AnAction; -import com.intellij.openapi.actionSystem.AnActionEvent; -import com.intellij.openapi.actionSystem.CommonDataKeys; -import com.intellij.openapi.actionSystem.PlatformDataKeys; -import com.intellij.openapi.actionSystem.Presentation; +import com.intellij.openapi.actionSystem.*; import com.intellij.openapi.command.CommandProcessor; import com.intellij.openapi.fileEditor.FileEditor; import com.intellij.openapi.fileEditor.TextEditor; import com.intellij.openapi.fileEditor.ex.IdeDocumentHistory; -import com.intellij.openapi.project.Project; import com.intellij.openapi.project.DumbAware; +import com.intellij.openapi.project.Project; import com.intellij.psi.PsiDocumentManager; public class SearchAgainAction extends AnAction implements DumbAware { @@ -64,14 +59,11 @@ public class SearchAgainAction extends AnAction implements DumbAware { public void update(AnActionEvent event){ Presentation presentation = event.getPresentation(); Project project = event.getData(CommonDataKeys.PROJECT); - presentation.setEnabled(false); - if (project == null) + if (project == null) { + presentation.setEnabled(false); return; - final FileEditor editor = event.getData(PlatformDataKeys.FILE_EDITOR); - if (!(editor instanceof TextEditor)) - return; - - final EditorSearchSession search = EditorSearchSession.get(event.getData(PlatformDataKeys.EDITOR)); - presentation.setEnabled(search != null); + } + FileEditor editor = event.getData(PlatformDataKeys.FILE_EDITOR); + presentation.setEnabled(editor instanceof TextEditor); } } diff --git a/platform/lang-impl/src/com/intellij/ide/actions/SearchBackAction.java b/platform/lang-impl/src/com/intellij/ide/actions/SearchBackAction.java index b5eeb5295879..3676234bdccf 100644 --- a/platform/lang-impl/src/com/intellij/ide/actions/SearchBackAction.java +++ b/platform/lang-impl/src/com/intellij/ide/actions/SearchBackAction.java @@ -16,20 +16,15 @@ package com.intellij.ide.actions; -import com.intellij.find.EditorSearchSession; import com.intellij.find.FindManager; import com.intellij.find.FindUtil; import com.intellij.ide.IdeBundle; -import com.intellij.openapi.actionSystem.AnAction; -import com.intellij.openapi.actionSystem.AnActionEvent; -import com.intellij.openapi.actionSystem.CommonDataKeys; -import com.intellij.openapi.actionSystem.PlatformDataKeys; -import com.intellij.openapi.actionSystem.Presentation; +import com.intellij.openapi.actionSystem.*; import com.intellij.openapi.command.CommandProcessor; import com.intellij.openapi.fileEditor.FileEditor; import com.intellij.openapi.fileEditor.TextEditor; -import com.intellij.openapi.project.Project; import com.intellij.openapi.project.DumbAware; +import com.intellij.openapi.project.Project; import com.intellij.psi.PsiDocumentManager; public class SearchBackAction extends AnAction implements DumbAware { @@ -60,14 +55,11 @@ public class SearchBackAction extends AnAction implements DumbAware { public void update(AnActionEvent event){ Presentation presentation = event.getPresentation(); Project project = event.getData(CommonDataKeys.PROJECT); - presentation.setEnabled(false); - if (project == null) + if (project == null) { + presentation.setEnabled(false); return; + } final FileEditor editor = event.getData(PlatformDataKeys.FILE_EDITOR); - if (!(editor instanceof TextEditor)) - return; - - final EditorSearchSession search = EditorSearchSession.get(event.getData(PlatformDataKeys.EDITOR)); - presentation.setEnabled(search != null); + presentation.setEnabled(editor instanceof TextEditor); } } diff --git a/platform/lang-impl/src/com/intellij/ide/projectView/actions/MarkAsContentRootAction.kt b/platform/lang-impl/src/com/intellij/ide/projectView/actions/MarkAsContentRootAction.kt new file mode 100644 index 000000000000..2228bb399437 --- /dev/null +++ b/platform/lang-impl/src/com/intellij/ide/projectView/actions/MarkAsContentRootAction.kt @@ -0,0 +1,51 @@ +/* + * Copyright 2000-2016 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.intellij.ide.projectView.actions + +import com.intellij.ide.projectView.impl.ProjectRootsUtil +import com.intellij.openapi.actionSystem.AnActionEvent +import com.intellij.openapi.actionSystem.CommonDataKeys +import com.intellij.openapi.project.DumbAwareAction +import com.intellij.openapi.roots.ModuleRootManager +import com.intellij.openapi.roots.ProjectRootManager + +/** + * @author nik + */ +class MarkAsContentRootAction : DumbAwareAction() { + override fun update(e: AnActionEvent) { + val files = e.getData(CommonDataKeys.VIRTUAL_FILE_ARRAY) + val module = MarkRootActionBase.getModule(e, files) + if (module == null || files == null) { + e.presentation.isEnabledAndVisible = false + return + } + val fileIndex = ProjectRootManager.getInstance(module.project).fileIndex + e.presentation.isEnabledAndVisible = files.all { + it.isDirectory && fileIndex.isExcluded(it) && ProjectRootsUtil.findExcludeFolder(module, it) == null + } + } + + override fun actionPerformed(e: AnActionEvent) { + val files = e.getData(CommonDataKeys.VIRTUAL_FILE_ARRAY) ?: return + val module = MarkRootActionBase.getModule(e, files) ?: return + val model = ModuleRootManager.getInstance(module).modifiableModel + files.forEach { + model.addContentEntry(it) + } + MarkRootActionBase.commitModel(module, model) + } +} diff --git a/platform/lang-impl/src/com/intellij/ide/projectView/actions/MarkExcludeRootAction.java b/platform/lang-impl/src/com/intellij/ide/projectView/actions/MarkExcludeRootAction.java index 7fbb9c3b9eca..66212f72d03c 100644 --- a/platform/lang-impl/src/com/intellij/ide/projectView/actions/MarkExcludeRootAction.java +++ b/platform/lang-impl/src/com/intellij/ide/projectView/actions/MarkExcludeRootAction.java @@ -15,6 +15,7 @@ */ package com.intellij.ide.projectView.actions; +import com.intellij.icons.AllIcons; import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.actionSystem.CommonDataKeys; import com.intellij.openapi.module.Module; @@ -29,6 +30,10 @@ import org.jetbrains.annotations.NotNull; * @author yole */ public class MarkExcludeRootAction extends MarkRootActionBase { + public MarkExcludeRootAction() { + super(null, null, AllIcons.Modules.ExcludeRoot); + } + @Override public void actionPerformed(AnActionEvent e) { VirtualFile[] files = e.getData(CommonDataKeys.VIRTUAL_FILE_ARRAY); diff --git a/platform/lang-impl/src/com/intellij/ide/projectView/actions/MarkRootActionBase.java b/platform/lang-impl/src/com/intellij/ide/projectView/actions/MarkRootActionBase.java index 4e7683e180b5..422bc7ba2af1 100644 --- a/platform/lang-impl/src/com/intellij/ide/projectView/actions/MarkRootActionBase.java +++ b/platform/lang-impl/src/com/intellij/ide/projectView/actions/MarkRootActionBase.java @@ -77,6 +77,10 @@ public abstract class MarkRootActionBase extends DumbAwareAction { modifyRoots(file, entry); } } + commitModel(module, model); + } + + static void commitModel(@NotNull Module module, ModifiableRootModel model) { DumbService.allowStartingDumbModeInside(DumbModePermission.MAY_START_BACKGROUND, () -> ApplicationManager.getApplication().runWriteAction(() -> { model.commit(); @@ -101,7 +105,7 @@ public abstract class MarkRootActionBase extends DumbAwareAction { @Override public void update(AnActionEvent e) { RootsSelection selection = getSelection(e); - doUpdate(e, e.getData(LangDataKeys.MODULE), selection); + doUpdate(e, selection.myModule, selection); } protected void doUpdate(@NotNull AnActionEvent e, @Nullable Module module, @NotNull RootsSelection selection) { @@ -117,21 +121,16 @@ public abstract class MarkRootActionBase extends DumbAwareAction { Module module = getModule(e, files); if (module == null) return RootsSelection.EMPTY; - RootsSelection selection = new RootsSelection(); + RootsSelection selection = new RootsSelection(module); final ProjectFileIndex fileIndex = ProjectRootManager.getInstance(module.getProject()).getFileIndex(); for (VirtualFile file : files) { if (!file.isDirectory()) { return RootsSelection.EMPTY; } - if (!fileIndex.isInContent(file)) { - ExcludeFolder excludeFolder = ProjectRootsUtil.findExcludeFolder(module, file); - if (excludeFolder != null) { - selection.mySelectedExcludeRoots.add(excludeFolder); - continue; - } - else { - return RootsSelection.EMPTY; - } + ExcludeFolder excludeFolder = ProjectRootsUtil.findExcludeFolder(module, file); + if (excludeFolder != null) { + selection.mySelectedExcludeRoots.add(excludeFolder); + continue; } SourceFolder folder = ProjectRootsUtil.findSourceFolder(module, file); if (folder != null) { @@ -148,7 +147,7 @@ public abstract class MarkRootActionBase extends DumbAwareAction { } @Nullable - private static Module getModule(@NotNull AnActionEvent e, @Nullable VirtualFile[] files) { + static Module getModule(@NotNull AnActionEvent e, @Nullable VirtualFile[] files) { if (files == null) return null; Module module = e.getData(LangDataKeys.MODULE); if (module == null) { @@ -176,7 +175,12 @@ public abstract class MarkRootActionBase extends DumbAwareAction { } public static class RootsSelection { - public static final RootsSelection EMPTY = new RootsSelection(); + public static final RootsSelection EMPTY = new RootsSelection(null); + public final Module myModule; + + public RootsSelection(Module module) { + myModule = module; + } public List mySelectedRoots = new ArrayList<>(); public List mySelectedExcludeRoots = new ArrayList<>(); diff --git a/platform/lang-impl/src/com/intellij/ide/projectView/impl/nodes/ProjectViewDirectoryHelper.java b/platform/lang-impl/src/com/intellij/ide/projectView/impl/nodes/ProjectViewDirectoryHelper.java index 127d4a64a2ff..d2f584560bb7 100644 --- a/platform/lang-impl/src/com/intellij/ide/projectView/impl/nodes/ProjectViewDirectoryHelper.java +++ b/platform/lang-impl/src/com/intellij/ide/projectView/impl/nodes/ProjectViewDirectoryHelper.java @@ -42,6 +42,7 @@ import com.intellij.psi.*; import com.intellij.psi.search.PsiElementProcessor; import com.intellij.psi.util.PsiUtilCore; import com.intellij.util.FontUtil; +import com.intellij.util.containers.ContainerUtil; import gnu.trove.THashSet; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -212,6 +213,19 @@ public class ProjectViewDirectoryHelper { return topLevelContentRoots; } + public List getTopLevelModuleRoots(Module module, ViewSettings settings) { + return ContainerUtil.filter(ModuleRootManager.getInstance(module).getContentRoots(), root -> { + if (!shouldBeShown(root, settings)) return false; + VirtualFile parent = root.getParent(); + if (parent == null) return true; + DirectoryInfo info = myIndex.getInfoForFile(parent); + if (!module.equals(info.getModule())) return true; + //show inner content root separately only if it won't be shown under outer content root + return info.isExcluded() && !shouldShowExcludedFiles(settings); + }); + } + + private static boolean isFileInContent(ProjectFileIndex index, VirtualFile file) { while (file != null) { if (index.isInContent(file)) { @@ -260,12 +274,11 @@ public class ProjectViewDirectoryHelper { private boolean shouldBeShown(VirtualFile dir, ViewSettings settings) { DirectoryInfo directoryInfo = myIndex.getInfoForFile(dir); - if (directoryInfo.isInProject()) return true; + return directoryInfo.isInProject() || shouldShowExcludedFiles(settings) && directoryInfo.isExcluded(); + } - if (!Registry.is("ide.hide.excluded.files") && settings instanceof ProjectViewSettings && ((ProjectViewSettings)settings).isShowExcludedFiles()) { - return directoryInfo.isExcluded(); - } - return false; + private static boolean shouldShowExcludedFiles(ViewSettings settings) { + return !Registry.is("ide.hide.excluded.files") && settings instanceof ProjectViewSettings && ((ProjectViewSettings)settings).isShowExcludedFiles(); } // used only for non-flatten packages mode diff --git a/platform/lang-impl/src/com/intellij/ide/projectView/impl/nodes/ProjectViewModuleNode.java b/platform/lang-impl/src/com/intellij/ide/projectView/impl/nodes/ProjectViewModuleNode.java index 1b51e33c0353..9da0e81d4765 100644 --- a/platform/lang-impl/src/com/intellij/ide/projectView/impl/nodes/ProjectViewModuleNode.java +++ b/platform/lang-impl/src/com/intellij/ide/projectView/impl/nodes/ProjectViewModuleNode.java @@ -46,15 +46,11 @@ public class ProjectViewModuleNode extends AbstractModuleNode { if (module == null || module.isDisposed()) { // module has been disposed return Collections.emptyList(); } - ModuleRootManager rootManager = ModuleRootManager.getInstance(module); - ModuleFileIndex moduleFileIndex = rootManager.getFileIndex(); - final VirtualFile[] contentRoots = rootManager.getContentRoots(); - final List children = new ArrayList<>(contentRoots.length + 1); + final List contentRoots = ProjectViewDirectoryHelper.getInstance(myProject).getTopLevelModuleRoots(module, getSettings()); + final List children = new ArrayList<>(contentRoots.size()); final PsiManager psiManager = PsiManager.getInstance(module.getProject()); for (final VirtualFile contentRoot : contentRoots) { - if (!moduleFileIndex.isInContent(contentRoot)) continue; - if (contentRoot.isDirectory()) { PsiDirectory directory = psiManager.findDirectory(contentRoot); if (directory != null) { @@ -68,12 +64,6 @@ public class ProjectViewModuleNode extends AbstractModuleNode { } } } - - /* - if (getSettings().isShowLibraryContents()) { - children.add(new LibraryGroupNode(getProject(), new LibraryGroupElement(getValue()), getSettings())); - } - */ return children; } diff --git a/platform/lang-impl/src/com/intellij/ide/projectView/impl/nodes/ProjectViewProjectNode.java b/platform/lang-impl/src/com/intellij/ide/projectView/impl/nodes/ProjectViewProjectNode.java index 2e41e8db07e1..f89abd9b0b33 100644 --- a/platform/lang-impl/src/com/intellij/ide/projectView/impl/nodes/ProjectViewProjectNode.java +++ b/platform/lang-impl/src/com/intellij/ide/projectView/impl/nodes/ProjectViewProjectNode.java @@ -22,7 +22,6 @@ import com.intellij.ide.util.treeView.AbstractTreeNode; import com.intellij.openapi.module.Module; import com.intellij.openapi.module.ModuleUtil; import com.intellij.openapi.project.Project; -import com.intellij.openapi.roots.ModuleRootManager; import com.intellij.openapi.roots.ProjectFileIndex; import com.intellij.openapi.util.Comparing; import com.intellij.openapi.util.io.FileUtil; @@ -125,9 +124,9 @@ public class ProjectViewProjectNode extends AbstractProjectNode { @Override protected AbstractTreeNode createModuleGroup(final Module module) throws InvocationTargetException, NoSuchMethodException, InstantiationException, IllegalAccessException { - final VirtualFile[] roots = ModuleRootManager.getInstance(module).getContentRoots(); - if (roots.length == 1) { - final PsiDirectory psi = PsiManager.getInstance(myProject).findDirectory(roots[0]); + List roots = ProjectViewDirectoryHelper.getInstance(myProject).getTopLevelModuleRoots(module, getSettings()); + if (roots.size() == 1) { + final PsiDirectory psi = PsiManager.getInstance(myProject).findDirectory(roots.get(0)); if (psi != null) { return new PsiDirectoryNode(myProject, psi, getSettings()); } diff --git a/platform/lang-impl/src/com/intellij/refactoring/rename/inplace/VariableInplaceRenamer.java b/platform/lang-impl/src/com/intellij/refactoring/rename/inplace/VariableInplaceRenamer.java index 773d6859835d..d0c686fcede9 100644 --- a/platform/lang-impl/src/com/intellij/refactoring/rename/inplace/VariableInplaceRenamer.java +++ b/platform/lang-impl/src/com/intellij/refactoring/rename/inplace/VariableInplaceRenamer.java @@ -15,6 +15,8 @@ */ package com.intellij.refactoring.rename.inplace; +import com.intellij.codeInsight.template.impl.TemplateManagerImpl; +import com.intellij.codeInsight.template.impl.TemplateState; import com.intellij.lang.Language; import com.intellij.lang.LanguageExtension; import com.intellij.openapi.application.ApplicationManager; @@ -46,7 +48,6 @@ import com.intellij.refactoring.rename.naming.AutomaticRenamerFactory; import com.intellij.refactoring.util.CommonRefactoringUtil; import com.intellij.refactoring.util.TextOccurrencesUtil; import com.intellij.usageView.UsageInfo; -import com.intellij.util.PairProcessor; import com.intellij.util.containers.MultiMap; import org.jetbrains.annotations.NotNull; @@ -158,6 +159,17 @@ public class VariableInplaceRenamer extends InplaceRefactoring { @Override protected void restoreSelection() { if (mySelectedRange != null) { + TemplateState state = TemplateManagerImpl.getTemplateState(InjectedLanguageUtil.getTopLevelEditor(myEditor)); + if (state != null) { + for (int i = 0; i < state.getSegmentsCount(); i++) { + final TextRange segmentRange = state.getSegmentRange(i); + TextRange intersection = segmentRange.intersection(mySelectedRange); + if (intersection != null) { + myEditor.getSelectionModel().setSelection(intersection.getStartOffset(), intersection.getEndOffset()); + return; + } + } + } myEditor.getSelectionModel().setSelection(mySelectedRange.getStartOffset(), mySelectedRange.getEndOffset()); } else if (!shouldSelectAll()) { diff --git a/platform/platform-api/src/com/intellij/ui/SimpleColoredComponent.java b/platform/platform-api/src/com/intellij/ui/SimpleColoredComponent.java index 40531f53318c..4d035cd990fb 100644 --- a/platform/platform-api/src/com/intellij/ui/SimpleColoredComponent.java +++ b/platform/platform-api/src/com/intellij/ui/SimpleColoredComponent.java @@ -830,18 +830,18 @@ public class SimpleColoredComponent extends JComponent implements Accessible, Co // 1. Strikeout effect if (attributes.isStrikeout() && !attributes.isSearchMatch()) { - EffectPainter.STRIKE_THROUGH.paint(g, offset, textBaseline, fragmentWidth, getCharHeight(g), null); + EffectPainter.STRIKE_THROUGH.paint(g, offset, textBaseline, fragmentWidth, getCharHeight(g), font); } // 2. Waved effect if (attributes.isWaved()) { if (attributes.getWaveColor() != null) { g.setColor(attributes.getWaveColor()); } - EffectPainter.WAVE_UNDERSCORE.paint(g, offset, textBaseline + 1, fragmentWidth, Math.max(2, metrics.getDescent()), null); + EffectPainter.WAVE_UNDERSCORE.paint(g, offset, textBaseline + 1, fragmentWidth, Math.max(2, metrics.getDescent()), font); } // 3. Underline if (attributes.isUnderline()) { - EffectPainter.LINE_UNDERSCORE.paint(g, offset, textBaseline, fragmentWidth, metrics.getDescent(), null); + EffectPainter.LINE_UNDERSCORE.paint(g, offset, textBaseline, fragmentWidth, metrics.getDescent(), font); } // 4. Bold Dotted Line if (attributes.isBoldDottedLine()) { @@ -885,7 +885,7 @@ public class SimpleColoredComponent extends JComponent implements Accessible, Co g.drawString(text, x1, baseline); if (((SimpleTextAttributes)info[5]).isStrikeout()) { - EffectPainter.STRIKE_THROUGH.paint(g, x1, baseline, x2 - x1, getCharHeight(g), null); + EffectPainter.STRIKE_THROUGH.paint(g, x1, baseline, x2 - x1, getCharHeight(g), g.getFont()); } } return offset; diff --git a/platform/platform-api/src/com/intellij/ui/paint/EffectPainter.java b/platform/platform-api/src/com/intellij/ui/paint/EffectPainter.java index 0b48426310c6..632edb25cf58 100644 --- a/platform/platform-api/src/com/intellij/ui/paint/EffectPainter.java +++ b/platform/platform-api/src/com/intellij/ui/paint/EffectPainter.java @@ -15,7 +15,6 @@ */ package com.intellij.ui.paint; -import com.intellij.openapi.util.SystemInfo; import com.intellij.openapi.util.registry.Registry; import com.intellij.util.JBHiDPIScaledImage; import com.intellij.util.ui.JBUI; @@ -24,6 +23,7 @@ import com.intellij.util.ui.UIUtil; import com.intellij.util.ui.WavePainter; import java.awt.*; +import java.awt.font.LineMetrics; import java.awt.geom.*; import java.awt.image.BufferedImage; import java.util.concurrent.ConcurrentHashMap; @@ -31,7 +31,7 @@ import java.util.concurrent.ConcurrentHashMap; /** * @author Sergey.Malenkov */ -public enum EffectPainter implements RegionPainter { +public enum EffectPainter implements RegionPainter { /** * @see com.intellij.openapi.editor.markup.EffectType#LINE_UNDERSCORE */ @@ -44,17 +44,15 @@ public enum EffectPainter implements RegionPainter { * @param y text baseline * @param width text width * @param height available space under text - * @param paint optional color patterns + * @param font optional font to calculate line metrics */ @Override - public void paint(Graphics2D g, int x, int y, int width, int height, Paint paint) { + public void paint(Graphics2D g, int x, int y, int width, int height, Font font) { if (!Registry.is("ide.text.effect.new")) { - if (paint != null) g.setPaint(paint); g.drawLine(x, y + 1, x + width, y + 1); } else if (width > 0 && height > 0) { - if (paint != null) g.setPaint(paint); - drawLineUnderscore(g, x, y, width, height, 1, this); + drawLineUnderscore(g, x, y, width, height, font, 1, this); } } }, @@ -70,18 +68,16 @@ public enum EffectPainter implements RegionPainter { * @param y text baseline * @param width text width * @param height available space under text - * @param paint optional color patterns + * @param font optional font to calculate line metrics */ @Override - public void paint(Graphics2D g, int x, int y, int width, int height, Paint paint) { + public void paint(Graphics2D g, int x, int y, int width, int height, Font font) { if (!Registry.is("ide.text.effect.new")) { - if (paint != null) g.setPaint(paint); int h = JBUI.scale(Registry.intValue("editor.bold.underline.height", 2)); g.fillRect(x, y, width, h); } else if (width > 0 && height > 0) { - if (paint != null) g.setPaint(paint); - drawLineUnderscore(g, x, y, width, height, 2, this); + drawLineUnderscore(g, x, y, width, height, font, 2, this); } } }, @@ -97,16 +93,12 @@ public enum EffectPainter implements RegionPainter { * @param y text baseline * @param width text width * @param height available space under text - * @param paint optional color patterns + * @param font optional font to calculate line metrics */ @Override - public void paint(Graphics2D g, int x, int y, int width, int height, Paint paint) { - if (!Registry.is("ide.text.effect.new")) { - UIUtil.drawBoldDottedLine(g, x, x + width, SystemInfo.isMac ? y : y + 1, g.getColor(), (Color)paint, false); - } - else if (width > 0 && height > 0) { - if (paint != null) g.setPaint(paint); - drawLineUnderscore(g, x, y, width, height, 2, this); + public void paint(Graphics2D g, int x, int y, int width, int height, Font font) { + if (width > 0 && height > 0) { + drawLineUnderscore(g, x, y, width, height, font, 2, this); } } }, @@ -122,16 +114,15 @@ public enum EffectPainter implements RegionPainter { * @param y text baseline * @param width text width * @param height available space under text - * @param paint optional color patterns + * @param font optional font to calculate line metrics */ @Override - public void paint(Graphics2D g, int x, int y, int width, int height, Paint paint) { + public void paint(Graphics2D g, int x, int y, int width, int height, Font font) { if (!Registry.is("ide.text.effect.new")) { - if (paint != null) g.setPaint(paint); WavePainter.forColor(g.getColor()).paint(g, x, x + width, y + height); } else if (width > 0 && height > 0) { - Cached.WAVE_UNDERSCORE.paint(g, x, y, width, height, paint); + Cached.WAVE_UNDERSCORE.paint(g, x, y, width, height, null); } } }, @@ -147,13 +138,21 @@ public enum EffectPainter implements RegionPainter { * @param y text baseline * @param width text width * @param height text height - * @param paint optional color patterns + * @param font optional font to calculate line metrics */ @Override - public void paint(Graphics2D g, int x, int y, int width, int height, Paint paint) { + public void paint(Graphics2D g, int x, int y, int width, int height, Font font) { if (width > 0 && height > 0) { - if (paint != null) g.setPaint(paint); - drawLineCentered(g, x, y - height, width, height, 1, this); + if (!Registry.is("ide.text.effect.new.metrics")) { + drawLineCentered(g, x, y - height, width, height, 1, this); + } + else { + if (font == null) font = g.getFont(); + LineMetrics metrics = font.getLineMetrics("", g.getFontRenderContext()); + int offset = (int)(0.5 - metrics.getStrikethroughOffset()); + int thickness = Math.max(1, (int)(0.5 + metrics.getStrikethroughThickness())); + drawLine(g, x, y - offset, width, thickness, this); + } } } }; @@ -162,16 +161,28 @@ public enum EffectPainter implements RegionPainter { return height > 7 && Registry.is("ide.text.effect.new.scale") ? height >> 1 : 3; } - private static void drawLineUnderscore(Graphics2D g, int x, int y, int width, int height, int thickness, EffectPainter painter) { - if (height > 3) { - int max = getMaxHeight(height); - y += height - max; - height = max; - if (thickness > 1 && height > 3) { - thickness = JBUI.scale(thickness); + private static void drawLineUnderscore(Graphics2D g, int x, int y, int width, int height, Font font, int thickness, + EffectPainter painter) { + if (width > 0 && height > 0) { + if (Registry.is("ide.text.effect.new.metrics")) { + if (font == null) font = g.getFont(); + LineMetrics metrics = font.getLineMetrics("", g.getFontRenderContext()); + int offset = Math.max(1, (int)(0.5 + metrics.getUnderlineOffset())); + thickness = Math.max(thickness, (int)(0.5 + thickness * metrics.getUnderlineThickness())); + drawLine(g, x, y + offset, width, thickness, painter); + } + else { + if (height > 3) { + int max = getMaxHeight(height); + y += height - max; + height = max; + if (thickness > 1 && height > 3) { + thickness = JBUI.scale(thickness); + } + } + drawLineCentered(g, x, y, width, height, thickness, painter); } } - drawLineCentered(g, x, y, width, height, thickness, painter); } private static void drawLineCentered(Graphics2D g, int x, int y, int width, int height, int thickness, EffectPainter painter) { @@ -180,6 +191,10 @@ public enum EffectPainter implements RegionPainter { y += offset - (offset >> 1); height = thickness; } + drawLine(g, x, y, width, height, painter); + } + + private static void drawLine(Graphics2D g, int x, int y, int width, int height, EffectPainter painter) { if (painter == BOLD_DOTTED_UNDERSCORE) { int dx = (x % height + height) % height; int w = width + dx; diff --git a/platform/platform-impl/src/com/intellij/codeInsight/hints/filtering/MethodMatcher.kt b/platform/platform-impl/src/com/intellij/codeInsight/hints/filtering/MethodMatcher.kt new file mode 100644 index 000000000000..32cfbfdcca76 --- /dev/null +++ b/platform/platform-impl/src/com/intellij/codeInsight/hints/filtering/MethodMatcher.kt @@ -0,0 +1,96 @@ +/* + * Copyright 2000-2016 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.intellij.codeInsight.hints.filtering + +import com.intellij.openapi.util.Couple + + +interface ParamMatcher { + fun isMatching(paramNames: List): Boolean +} + +interface MethodMatcher { + fun isMatching(fullyQualifiedMethodName: String, paramNames: List): Boolean +} + +object AnyParamMatcher: ParamMatcher { + override fun isMatching(paramNames: List) = true +} + +class StringParamMatcher(private val paramMatchers: List): ParamMatcher { + override fun isMatching(paramNames: List): Boolean { + if (paramNames.size != paramMatchers.size) { + return false + } + + return paramMatchers + .zip(paramNames) + .find { !it.first.isMatching(it.second) } == null + } +} + +class Matcher(private val methodNameMatcher: StringMatcher, + private val paramMatchers: ParamMatcher): MethodMatcher +{ + override fun isMatching(fullyQualifiedMethodName: String, paramNames: List): Boolean { + return methodNameMatcher.isMatching(fullyQualifiedMethodName) && paramMatchers.isMatching(paramNames) + } +} + +object MatcherConstructor { + + fun extract(matcher: String): Couple? { + val trimmedMatcher = matcher.trim() + if (trimmedMatcher.isEmpty()) return null + + val index = trimmedMatcher.indexOf('(') + if (index < 0) { + return Couple(trimmedMatcher, "") + } + else if (index == 0) { + return Couple("", trimmedMatcher) + } + + val methodMatcher = trimmedMatcher.substring(0, index) + val paramsMatcher = trimmedMatcher.substring(index) + + return Couple(methodMatcher.trim(), paramsMatcher.trim()) + } + + private fun createParametersMatcher(paramsMatcher: String): ParamMatcher? { + if (paramsMatcher.length <= 2) return null + + val paramsString = paramsMatcher.substring(1, paramsMatcher.length - 1) + val params = paramsString.split(',').map(String::trim) + if (params.find(String::isEmpty) != null) return null + + val matchers = params.mapNotNull { StringMatcherBuilder.create(it) } + return if (matchers.size == params.size) StringParamMatcher(matchers) else null + } + + fun createMatcher(matcher: String): Matcher? { + val pair = extract(matcher) ?: return null + + val methodNameMatcher = StringMatcherBuilder.create(pair.first) ?: return null + val paramMatcher = if (pair.second.isEmpty()) AnyParamMatcher else createParametersMatcher(pair.second) + + return if (paramMatcher != null) Matcher(methodNameMatcher, paramMatcher) else null + } + + +} + + diff --git a/platform/platform-impl/src/com/intellij/codeInsight/hints/filtering/StringMatcherBuilder.kt b/platform/platform-impl/src/com/intellij/codeInsight/hints/filtering/StringMatcherBuilder.kt new file mode 100644 index 000000000000..f86a6170a224 --- /dev/null +++ b/platform/platform-impl/src/com/intellij/codeInsight/hints/filtering/StringMatcherBuilder.kt @@ -0,0 +1,56 @@ +/* + * Copyright 2000-2016 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.intellij.codeInsight.hints.filtering + +interface StringMatcher { + fun isMatching(text: String): Boolean +} + +class StringMatcherImpl(private val matcher: (String) -> Boolean) : StringMatcher { + override fun isMatching(text: String) = matcher(text) +} + +object StringMatcherBuilder { + + fun create(matcher: String): StringMatcher? { + if (matcher.isEmpty()) return StringMatcherImpl { true } + + val asterisksCount = matcher.count { it == '*' } + if (asterisksCount > 1) return null + if (asterisksCount == 1) return createAsterisksMatcher(matcher) + + return StringMatcherImpl { it == matcher } + } + + private fun createAsterisksMatcher(matcher: String): StringMatcher? { + if (matcher == "*") { + return StringMatcherImpl { true } + } + + if (matcher.startsWith('*')) { + val target = matcher.substring(1) + return StringMatcherImpl { it.endsWith(target) } + } + + if (matcher.endsWith('*')) { + val target = matcher.substring(0, matcher.length - 1) + return StringMatcherImpl { it.startsWith(target) } + } + + return null + } + +} \ No newline at end of file diff --git a/platform/platform-impl/src/com/intellij/ide/actions/ShowFilePathAction.java b/platform/platform-impl/src/com/intellij/ide/actions/ShowFilePathAction.java index 148969e8cf70..9af147f188b2 100644 --- a/platform/platform-impl/src/com/intellij/ide/actions/ShowFilePathAction.java +++ b/platform/platform-impl/src/com/intellij/ide/actions/ShowFilePathAction.java @@ -37,20 +37,19 @@ import com.intellij.openapi.ui.popup.JBPopupFactory; import com.intellij.openapi.ui.popup.ListPopup; import com.intellij.openapi.ui.popup.PopupStep; import com.intellij.openapi.ui.popup.util.BaseListPopupStep; -import com.intellij.openapi.util.AtomicNotNullLazyValue; -import com.intellij.openapi.util.NotNullLazyValue; -import com.intellij.openapi.util.SystemInfo; +import com.intellij.openapi.util.*; import com.intellij.openapi.util.io.FileUtil; -import com.intellij.openapi.util.text.StringUtil; import com.intellij.openapi.vfs.JarFileSystem; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.openapi.vfs.VirtualFileSystem; import com.intellij.openapi.vfs.newvfs.ArchiveFileSystem; import com.intellij.ui.awt.RelativePoint; import com.intellij.util.Consumer; +import com.intellij.util.SystemProperties; import com.intellij.util.ui.EmptyIcon; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import org.jetbrains.ide.PooledThreadExecutor; import javax.swing.*; import javax.swing.event.HyperlinkEvent; @@ -62,8 +61,9 @@ import java.net.URL; import java.util.ArrayList; import java.util.List; import java.util.Optional; -import java.util.regex.Matcher; -import java.util.regex.Pattern; +import java.util.stream.Stream; + +import static com.intellij.openapi.util.text.StringUtil.defaultIfEmpty; public class ShowFilePathAction extends AnAction { private static final Logger LOG = Logger.getInstance("#com.intellij.ide.actions.ShowFilePathAction"); @@ -77,22 +77,13 @@ public class ShowFilePathAction extends AnAction { } }; - private static NotNullLazyValue canUseNautilus = new AtomicNotNullLazyValue() { - @NotNull + private static NullableLazyValue fileManagerApp = new AtomicNullableLazyValue() { @Override - protected Boolean compute() { - if (!SystemInfo.isUnix || !SystemInfo.hasXdgMime() || !new File("/usr/bin/nautilus").canExecute()) { - return false; - } - - String appName = ExecUtil.execAndReadLine(new GeneralCommandLine("xdg-mime", "query", "default", "inode/directory")); - if (appName == null || !appName.matches(".*(?i:nautilus).*\\.desktop")) return false; - - String version = ExecUtil.execAndReadLine(new GeneralCommandLine("nautilus", "--version")); - if (version == null) return false; - - Matcher m = Pattern.compile("GNOME nautilus ([0-9.]+)").matcher(version); - return m.find() && StringUtil.compareVersionNumbers(m.group(1), "3") >= 0; + protected String compute() { + return readDesktopEntryKey("Exec") + .map(line -> line.split(" ")[0]) + .filter(exec -> exec.endsWith("nautilus") || exec.endsWith("pantheon-files")) + .orElse(null); } }; @@ -102,41 +93,42 @@ public class ShowFilePathAction extends AnAction { protected String compute() { if (SystemInfo.isMac) return "Finder"; if (SystemInfo.isWindows) return "Explorer"; - if (SystemInfo.isUnix && SystemInfo.hasXdgMime()) { - String name = getUnixFileManagerName(); - if (name != null) return name; - } - return "File Manager"; + return readDesktopEntryKey("Name").orElse("File Manager"); } }; - @Nullable - private static String getUnixFileManagerName() { - String appName = ExecUtil.execAndReadLine(new GeneralCommandLine("xdg-mime", "query", "default", "inode/directory")); - if (appName == null || !appName.matches(".+\\.desktop")) return null; - - String dirs = System.getenv("XDG_DATA_DIRS"); - if (dirs == null) return null; - - try { - for (String dir : dirs.split(File.pathSeparator)) { - File appFile = new File(dir, "applications/" + appName); - if (appFile.exists()) { - try (BufferedReader reader = new BufferedReader(new FileReader(appFile))) { - Optional name = reader.lines().filter(l -> l.startsWith("Name=")).map(l -> l.substring(5)).findFirst(); - if (name.isPresent()) return name.get(); - } - } + private static Optional readDesktopEntryKey(String key) { + if (SystemInfo.hasXdgMime()) { + String appName = ExecUtil.execAndReadLine(new GeneralCommandLine("xdg-mime", "query", "default", "inode/directory")); + if (appName != null && appName.endsWith(".desktop")) { + return Stream.of(getXdgDataDirectories().split(":")) + .map(dir -> new File(dir, "applications/" + appName)) + .filter(File::exists) + .findFirst() + .map(file -> readDesktopEntryKey(file, key + '=')); } } - catch (IOException | UncheckedIOException e) { - LOG.info("Cannot read desktop file", e); - } - return null; + return Optional.empty(); } - @Override + private static String getXdgDataDirectories() { + String dataHome = System.getenv("XDG_DATA_HOME"); + String dataDirs = System.getenv("XDG_DATA_DIRS"); + return defaultIfEmpty(dataHome, SystemProperties.getUserHome() + "/.local/share") + ':' + defaultIfEmpty(dataDirs, "/usr/local/share:/usr/share"); + } + + private static String readDesktopEntryKey(File file, String key) { + try (BufferedReader reader = new BufferedReader(new FileReader(file))) { + return reader.lines().filter(l -> l.startsWith(key)).map(l -> l.substring(key.length())).findFirst().orElse(null); + } + catch (IOException | UncheckedIOException e) { + LOG.info("Cannot read: " + file, e); + return null; + } + } + +@Override public void update(@NotNull AnActionEvent e) { boolean visible = !SystemInfo.isMac && isSupported(); e.getPresentation().setVisible(visible); @@ -223,8 +215,7 @@ public class ShowFilePathAction extends AnAction { } public static boolean isSupported() { - return SystemInfo.isWindows || SystemInfo.isMac || - SystemInfo.hasXdgOpen() || canUseNautilus.getValue() || + return SystemInfo.isWindows || SystemInfo.isMac || SystemInfo.hasXdgOpen() || Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.OPEN); } @@ -292,9 +283,16 @@ public class ShowFilePathAction extends AnAction { GeneralCommandLine cmd = toSelect != null ? new GeneralCommandLine("open", "-R", toSelect) : new GeneralCommandLine("open", dir); ExecUtil.execAndGetOutput(cmd).checkSuccess(LOG); } - else if (canUseNautilus.getValue()) { - GeneralCommandLine cmd = new GeneralCommandLine("nautilus", toSelect != null ? toSelect : dir); - ExecUtil.execAndGetOutput(cmd).checkSuccess(LOG); + else if (fileManagerApp.getValue() != null) { + PooledThreadExecutor.INSTANCE.submit(() -> { + try { + GeneralCommandLine cmd = new GeneralCommandLine(fileManagerApp.getValue(), toSelect != null ? toSelect : dir); + ExecUtil.execAndGetOutput(cmd).checkSuccess(LOG); + } + catch (Exception e) { + LOG.warn(e); + } + }); } else if (SystemInfo.hasXdgOpen()) { GeneralCommandLine cmd = new GeneralCommandLine("/usr/bin/xdg-open", dir); diff --git a/platform/platform-impl/src/com/intellij/openapi/editor/colors/impl/EditorColorsManagerImpl.java b/platform/platform-impl/src/com/intellij/openapi/editor/colors/impl/EditorColorsManagerImpl.java index 50e3306a3124..3286f71529c2 100644 --- a/platform/platform-impl/src/com/intellij/openapi/editor/colors/impl/EditorColorsManagerImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/editor/colors/impl/EditorColorsManagerImpl.java @@ -91,8 +91,8 @@ public class EditorColorsManagerImpl extends EditorColorsManager implements Pers // we don't need to update digest for bundled scheme because // 1) it can be computed on demand later (because bundled scheme is not mutable) // 2) in the future user copy of bundled scheme will use bundled scheme as parent (not as full copy) - if (!isBundled) { - //dataHolder.updateDigest(scheme); + if (isBundled) { + scheme.optimizeAttributeMap(); } return scheme; } @@ -180,7 +180,7 @@ public class EditorColorsManagerImpl extends EditorColorsManager implements Pers private void initEditableBundledSchemesCopies() { for (EditorColorsScheme scheme : mySchemeManager.getAllSchemes()) { if (scheme instanceof BundledScheme) { - createEditableCopy((BundledScheme)scheme, ((BundledScheme)scheme).getEditableCopyName()); + createEditableCopy((BundledScheme)scheme, SchemeManager.EDITABLE_COPY_PREFIX + scheme.getName()); } } } @@ -221,10 +221,6 @@ public class EditorColorsManagerImpl extends EditorColorsManager implements Pers public boolean isVisible() { return false; } - - public String getEditableCopyName() { - return SchemeManager.EDITABLE_COPY_PREFIX + getName(); - } } static class State { @@ -333,7 +329,7 @@ public class EditorColorsManagerImpl extends EditorColorsManager implements Pers editableCopyName = ((DefaultColorsScheme)scheme).getEditableCopyName(); } else if (scheme instanceof BundledScheme) { - editableCopyName = ((BundledScheme)scheme).getEditableCopyName(); + editableCopyName = SchemeManager.EDITABLE_COPY_PREFIX + scheme.getName(); } if (editableCopyName != null) { EditorColorsScheme editableCopy = getScheme(editableCopyName); diff --git a/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorImpl.java b/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorImpl.java index 870585cb01dc..83bea60533a6 100644 --- a/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorImpl.java @@ -2456,21 +2456,26 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi } if (attributes != null && attributes.getEffectColor() != null) { int y = visibleLineToY(visibleStartLine) + getAscent() + 1; + g.setColor(attributes.getEffectColor()); if (attributes.getEffectType() == EffectType.WAVE_UNDERSCORE) { - EffectPainter.WAVE_UNDERSCORE.paint((Graphics2D)g, end.x, y - 1, charWidth - 1, getDescent(), attributes.getEffectColor()); + EffectPainter.WAVE_UNDERSCORE.paint((Graphics2D)g, end.x, y - 1, charWidth - 1, getDescent(), + getColorsScheme().getFont(EditorFontType.PLAIN)); } else if (attributes.getEffectType() == EffectType.BOLD_DOTTED_LINE) { - g.setColor(getBackgroundColor(attributes)); - EffectPainter.BOLD_DOTTED_UNDERSCORE.paint((Graphics2D)g, end.x, y - 1, charWidth - 1, getDescent(), attributes.getEffectColor()); + EffectPainter.BOLD_DOTTED_UNDERSCORE.paint((Graphics2D)g, end.x, y - 1, charWidth - 1, getDescent(), + getColorsScheme().getFont(EditorFontType.PLAIN)); } else if (attributes.getEffectType() == EffectType.STRIKEOUT) { - EffectPainter.STRIKE_THROUGH.paint((Graphics2D)g, end.x, y - 1, charWidth - 1, getCharHeight(), attributes.getEffectColor()); + EffectPainter.STRIKE_THROUGH.paint((Graphics2D)g, end.x, y - 1, charWidth - 1, getCharHeight(), + getColorsScheme().getFont(EditorFontType.PLAIN)); } else if (attributes.getEffectType() == EffectType.BOLD_LINE_UNDERSCORE) { - EffectPainter.BOLD_LINE_UNDERSCORE.paint((Graphics2D)g, end.x, y - 1, charWidth - 1, getDescent(), attributes.getEffectColor()); + EffectPainter.BOLD_LINE_UNDERSCORE.paint((Graphics2D)g, end.x, y - 1, charWidth - 1, getDescent(), + getColorsScheme().getFont(EditorFontType.PLAIN)); } else if (attributes.getEffectType() != EffectType.BOXED) { - EffectPainter.LINE_UNDERSCORE.paint((Graphics2D)g, end.x, y - 1, charWidth - 1, getDescent(), attributes.getEffectColor()); + EffectPainter.LINE_UNDERSCORE.paint((Graphics2D)g, end.x, y - 1, charWidth - 1, getDescent(), + getColorsScheme().getFont(EditorFontType.PLAIN)); } } } @@ -3568,6 +3573,7 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi if (effectColor != null) { final Color savedColor = g.getColor(); + g.setColor(effectColor); // myBorderEffect.flushIfCantProlong(g, this, effectType, effectColor); int xEnd = x; @@ -3583,25 +3589,26 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi } if (effectType == EffectType.LINE_UNDERSCORE) { - EffectPainter.LINE_UNDERSCORE.paint((Graphics2D)g, xStart, y, xEnd - xStart, getDescent(), effectColor); - g.setColor(savedColor); + EffectPainter.LINE_UNDERSCORE.paint((Graphics2D)g, xStart, y, xEnd - xStart, getDescent(), + getColorsScheme().getFont(EditorFontType.PLAIN)); } else if (effectType == EffectType.BOLD_LINE_UNDERSCORE) { - EffectPainter.BOLD_LINE_UNDERSCORE.paint((Graphics2D)g, xStart, y, xEnd - xStart, getDescent(), effectColor); - g.setColor(savedColor); + EffectPainter.BOLD_LINE_UNDERSCORE.paint((Graphics2D)g, xStart, y, xEnd - xStart, getDescent(), + getColorsScheme().getFont(EditorFontType.PLAIN)); } else if (effectType == EffectType.STRIKEOUT) { - EffectPainter.STRIKE_THROUGH.paint((Graphics2D)g, xStart, y, xEnd - xStart, getCharHeight(), effectColor); - g.setColor(savedColor); + EffectPainter.STRIKE_THROUGH.paint((Graphics2D)g, xStart, y, xEnd - xStart, getCharHeight(), + getColorsScheme().getFont(EditorFontType.PLAIN)); } else if (effectType == EffectType.WAVE_UNDERSCORE) { - EffectPainter.WAVE_UNDERSCORE.paint((Graphics2D)g, xStart, y, xEnd - xStart, getDescent(), effectColor); - g.setColor(savedColor); + EffectPainter.WAVE_UNDERSCORE.paint((Graphics2D)g, xStart, y, xEnd - xStart, getDescent(), + getColorsScheme().getFont(EditorFontType.PLAIN)); } else if (effectType == EffectType.BOLD_DOTTED_LINE) { - g.setColor(getBackgroundColor()); - EffectPainter.BOLD_DOTTED_UNDERSCORE.paint((Graphics2D)g, xStart, y, xEnd - xStart, getDescent(), effectColor); + EffectPainter.BOLD_DOTTED_UNDERSCORE.paint((Graphics2D)g, xStart, y, xEnd - xStart, getDescent(), + getColorsScheme().getFont(EditorFontType.PLAIN)); } + g.setColor(savedColor); } return x; diff --git a/platform/platform-impl/src/com/intellij/openapi/editor/impl/view/EditorPainter.java b/platform/platform-impl/src/com/intellij/openapi/editor/impl/view/EditorPainter.java index 61ba33408d26..986bdac24bb5 100644 --- a/platform/platform-impl/src/com/intellij/openapi/editor/impl/view/EditorPainter.java +++ b/platform/platform-impl/src/com/intellij/openapi/editor/impl/view/EditorPainter.java @@ -431,26 +431,30 @@ class EditorPainter implements TextDrawingCallback { } private void paintTextEffect(Graphics2D g, float xFrom, float xTo, int y, Color effectColor, EffectType effectType, boolean allowBorder) { + g.setColor(effectColor); int xStart = (int)xFrom; int xEnd = (int)xTo; if (effectType == EffectType.LINE_UNDERSCORE) { - EffectPainter.LINE_UNDERSCORE.paint(g, xStart, y, xEnd - xStart, myView.getDescent(), effectColor); + EffectPainter.LINE_UNDERSCORE.paint(g, xStart, y, xEnd - xStart, myView.getDescent(), + myEditor.getColorsScheme().getFont(EditorFontType.PLAIN)); } else if (effectType == EffectType.BOLD_LINE_UNDERSCORE) { - EffectPainter.BOLD_LINE_UNDERSCORE.paint(g, xStart, y, xEnd - xStart, myView.getDescent(), effectColor); + EffectPainter.BOLD_LINE_UNDERSCORE.paint(g, xStart, y, xEnd - xStart, myView.getDescent(), + myEditor.getColorsScheme().getFont(EditorFontType.PLAIN)); } else if (effectType == EffectType.STRIKEOUT) { - EffectPainter.STRIKE_THROUGH.paint(g, xStart, y, xEnd - xStart, myView.getCharHeight(), effectColor); + EffectPainter.STRIKE_THROUGH.paint(g, xStart, y, xEnd - xStart, myView.getCharHeight(), + myEditor.getColorsScheme().getFont(EditorFontType.PLAIN)); } else if (effectType == EffectType.WAVE_UNDERSCORE) { - EffectPainter.WAVE_UNDERSCORE.paint(g, xStart, y, xEnd - xStart, myView.getDescent(), effectColor); + EffectPainter.WAVE_UNDERSCORE.paint(g, xStart, y, xEnd - xStart, myView.getDescent(), + myEditor.getColorsScheme().getFont(EditorFontType.PLAIN)); } else if (effectType == EffectType.BOLD_DOTTED_LINE) { - g.setColor(myEditor.getBackgroundColor()); - EffectPainter.BOLD_DOTTED_UNDERSCORE.paint(g, xStart, y, xEnd - xStart, myView.getDescent(), effectColor); + EffectPainter.BOLD_DOTTED_UNDERSCORE.paint(g, xStart, y, xEnd - xStart, myView.getDescent(), + myEditor.getColorsScheme().getFont(EditorFontType.PLAIN)); } else if (allowBorder && (effectType == EffectType.BOXED || effectType == EffectType.ROUNDED_BOX)) { - g.setColor(effectColor); drawSimpleBorder(g, xStart, xEnd - 1, y - myView.getAscent(), effectType == EffectType.ROUNDED_BOX); } } diff --git a/platform/platform-impl/src/com/intellij/ui/ComboBoxCompositeEditor.java b/platform/platform-impl/src/com/intellij/ui/ComboBoxCompositeEditor.java index 510e6bd8a5bb..9f9177763f5a 100644 --- a/platform/platform-impl/src/com/intellij/ui/ComboBoxCompositeEditor.java +++ b/platform/platform-impl/src/com/intellij/ui/ComboBoxCompositeEditor.java @@ -37,8 +37,9 @@ import static java.awt.GridBagConstraints.CENTER; public class ComboBoxCompositeEditor extends JPanel implements ComboBoxEditor { - public static ComboBoxCompositeEditor withComponents (final JComponent ... components) { - return new ComboBoxCompositeEditor<>(components); + public static ComboBoxCompositeEditor withComponents (final EditableComponentType editableComponent, final JComponent ... components) + { + return new ComboBoxCompositeEditor<>(editableComponent, components); } private BiConsumer myOnSetItemHandler = null; @@ -152,15 +153,12 @@ public class ComboBoxCompositeEditor extends JPanel imp } }; - private final EditorComponent[] myComponents; - private int focusableComponentIndex; + private final EditorComponent myComponent; - public ComboBoxCompositeEditor(final JComponent ... components) { + public ComboBoxCompositeEditor(final F editableComponent, final JComponent ... components) { assert components.length > 0; - //setLayout(new GridLayout(1, 0)); setLayout(new GridBagLayout()); setFocusable(false); - myComponents = new EditorComponent[components.length]; GridBagConstraints c = new GridBagConstraints(); @@ -170,55 +168,57 @@ public class ComboBoxCompositeEditor extends JPanel imp c.anchor = CENTER; c.ipadx = 0; c.ipady = 0; + c.gridx = 0; + + add(editableComponent, c); + c.weightx = 0; for (int i = 0; i < components.length; i ++) { - c.gridx = i; + c.gridx = i + 1; + components[i].setBackground(getBackground()); add(components[i], c); - c.weightx = 0; } - final ComboBoxCompositeEditorStrategy strategy = getStrategy((F)components[focusableComponentIndex]); + final ComboBoxCompositeEditorStrategy strategy = getStrategy(editableComponent); - myComponents[focusableComponentIndex] = new ComboBoxCompositeEditor.EditorComponent() { + myComponent = new ComboBoxCompositeEditor.EditorComponent() { I myItem; public void setItem(I anObject) { myItem = anObject; - strategy.setItem((F)components[focusableComponentIndex], anObject); + strategy.setItem(editableComponent, anObject); } public I getItem() { - return strategy.getItem((F)components[focusableComponentIndex], myItem); + return strategy.getItem(editableComponent, myItem); } @Override public void selectAll() { - strategy.selectAll((F)components[focusableComponentIndex]); + strategy.selectAll(editableComponent); } @Override public void addActionListener(ActionListener l) { - strategy.addActionListener((F)components[focusableComponentIndex], l); + strategy.addActionListener(editableComponent, l); } @Override public void removeActionListener(ActionListener l) { - strategy.removeActionListener((F)components[focusableComponentIndex], l); + strategy.removeActionListener(editableComponent, l); } @Override public JComponent getDelegate() { - return components[focusableComponentIndex]; + return editableComponent; } }; invalidate(); - focusableComponentIndex = 0; - final JComponent component = myComponents[focusableComponentIndex].getDelegate(); - component.setBorder(null); - component.addFocusListener(new FocusListener() { + editableComponent.setBorder(null); + editableComponent.addFocusListener(new FocusListener() { Component parent = null; @@ -242,27 +242,27 @@ public class ComboBoxCompositeEditor extends JPanel imp @Override public void setItem(Object anObject) { - myComponents[focusableComponentIndex].setItem((I)anObject); + myComponent.setItem((I)anObject); } @Override public Object getItem() { - return myComponents[focusableComponentIndex].getItem(); + return myComponent.getItem(); } @Override public void selectAll() { - myComponents[focusableComponentIndex].selectAll(); + myComponent.selectAll(); } @Override public void addActionListener(ActionListener l) { - myComponents[focusableComponentIndex].addActionListener(l); + myComponent.addActionListener(l); } @Override public void removeActionListener(ActionListener l) { - myComponents[focusableComponentIndex].removeActionListener(l); + myComponent.removeActionListener(l); } @Override diff --git a/platform/platform-impl/src/com/intellij/util/ui/SwingHelper.java b/platform/platform-impl/src/com/intellij/util/ui/SwingHelper.java index 3200bf9f471c..617fce5e2781 100644 --- a/platform/platform-impl/src/com/intellij/util/ui/SwingHelper.java +++ b/platform/platform-impl/src/com/intellij/util/ui/SwingHelper.java @@ -192,6 +192,7 @@ public class SwingHelper { public static void adjustDialogSizeToFitPreferredSize(@NotNull DialogWrapper dialogWrapper) { JRootPane rootPane = dialogWrapper.getRootPane(); + if (rootPane == null) return; Dimension componentSize = rootPane.getSize(); Dimension componentPreferredSize = rootPane.getPreferredSize(); if (componentPreferredSize.width <= componentSize.width && componentPreferredSize.height <= componentSize.height) { diff --git a/platform/platform-resources-en/src/messages/ActionsBundle.properties b/platform/platform-resources-en/src/messages/ActionsBundle.properties index af16c4e70ff2..1290f2bf384c 100644 --- a/platform/platform-resources-en/src/messages/ActionsBundle.properties +++ b/platform/platform-resources-en/src/messages/ActionsBundle.properties @@ -1204,7 +1204,7 @@ action.Graph.print.preview=Print Preview action.SendFeedback.text=Submit _Feedback... action.SendFeedback.description=Submit feedback to the JetBrains Web site -action.ShowLog.text=Show _Log in Explorer +action.ShowLog.text=Show _Log in File Manager action.ShowLog.description=Opens folder with log file action.EditCustomProperties.text=Edit Custom Properties... action.EditCustomProperties.description=Opens an editor tab with a custom properties file @@ -1476,6 +1476,8 @@ group.Vcs.Browse.text=Browse VCS Repository action.Graph.print.reset=Reset action.MarkExcludeRoot.text=Excluded action.UnmarkRoot.text=Unmark Root +action.MarkAsContentRoot.text=Not Excluded +action.MarkAsContentRoot.description=Cancel exclusion for the selected directory to make its files processable by IDE's actions action.CreateLibraryFromFile.text=Add as Library... action.ImportModuleFromImlFile.text=Import Module action.ImportModuleFromImlFile.description=Import iml file as a module to the project diff --git a/platform/platform-tests/testSrc/com/intellij/codeInsight/hints/filtering/MatcherTest.kt b/platform/platform-tests/testSrc/com/intellij/codeInsight/hints/filtering/MatcherTest.kt new file mode 100644 index 000000000000..d842cd7e76f1 --- /dev/null +++ b/platform/platform-tests/testSrc/com/intellij/codeInsight/hints/filtering/MatcherTest.kt @@ -0,0 +1,67 @@ +/* + * Copyright 2000-2016 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.intellij.codeInsight.hints.filtering + +import junit.framework.TestCase +import org.assertj.core.api.Assertions.assertThat + +class MatcherTest : TestCase() { + + fun Matcher.assertIsMatching(fullyQualifiedMethodName: String, vararg params: String) { + assertThat(isMatching(fullyQualifiedMethodName, listOf(*params))).isTrue() + } + + fun Matcher.assertNotMatching(fullyQualifiedMethodName: String, vararg params: String) { + assertThat(isMatching(fullyQualifiedMethodName, listOf(*params))).isFalse() + } + + fun `test simple matcher`() { + val matcher = MatcherConstructor.createMatcher("*.String(old*, new*)")!! + + matcher.assertIsMatching("java.lang.String", "oldValue", "newValue") + matcher.assertIsMatching("java.lang.String", "old", "new") + + matcher.assertNotMatching("java.lang.String", "valueOld", "valueNew") + matcher.assertNotMatching("Boolean", "old", "new") + } + + fun `test any single param method matcher`() { + val matchers = listOf(MatcherConstructor.createMatcher("*(*)")!!, MatcherConstructor.createMatcher("(*)")!!) + + matchers.forEach { + it.assertIsMatching("java.lang.String.indexOf", "ch") + it.assertIsMatching("java.lang.String.charAt", "index") + it.assertIsMatching("java.lang.Boolean.valueOf", "value") + it.assertNotMatching("java.lang.Boolean.substring", "from", "to") + } + } + + fun `test any with key value`() { + val matcher = MatcherConstructor.createMatcher("*(key, value)")!! + matcher.assertIsMatching("java.util.Map.put", "key", "value") + matcher.assertIsMatching("java.util.HashMap.put", "key", "value") + matcher.assertIsMatching("java.util.HashMap.putIfNeeded", "key", "value") + } + + fun `test couple contains`() { + val matcher = MatcherConstructor.createMatcher("*(first*, last*)")!! + + matcher.assertIsMatching("java.util.Str.subs", "firstIndex", "lastIndex") + matcher.assertIsMatching("java.util.Str.subs", "first", "last") + } + + +} \ No newline at end of file diff --git a/platform/platform-tests/testSrc/com/intellij/codeInsight/hints/filtering/PatternExtractionTest.kt b/platform/platform-tests/testSrc/com/intellij/codeInsight/hints/filtering/PatternExtractionTest.kt new file mode 100644 index 000000000000..a72a87ee8533 --- /dev/null +++ b/platform/platform-tests/testSrc/com/intellij/codeInsight/hints/filtering/PatternExtractionTest.kt @@ -0,0 +1,85 @@ +/* + * Copyright 2000-2016 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.intellij.codeInsight.hints.filtering + +import junit.framework.TestCase +import org.assertj.core.api.Assertions.assertThat + +class PatternExtractionTest : TestCase() { + + fun String.assertMatcher(nameMatcher: String, paramsMatcher: String) { + val matcher = MatcherConstructor.extract(this) + if (matcher == null) { + assertThat(nameMatcher).isEmpty() + assertThat(paramsMatcher).isEmpty() + return + } + + assertThat(nameMatcher).isEqualTo(matcher.first) + assertThat(paramsMatcher).isEqualTo(matcher.second) + } + + fun `test match all methods from package`() { + val text = "java.lang.*" + text.assertMatcher("java.lang.*", "") + } + + fun `test match all methods from class String`() { + val text = "java.lang.String.*" + text.assertMatcher("java.lang.String.*", "") + } + + fun `test match all replace methods`() { + val text = "*.replace" + text.assertMatcher("*.replace", "") + } + + fun `test match all replace methods with couple params`() { + val text = "*.replace(*, *)" + text.assertMatcher("*.replace", "(*, *)") + } + + fun `test match only one replace method with couple params`() { + val text = "java.lang.String.replace(*,*)" + text.assertMatcher("java.lang.String.replace", "(*,*)") + } + + fun `test match debug particular method`() { + val text = "org.logger.Log.debug(format,arg)" + text.assertMatcher("org.logger.Log.debug", "(format,arg)") + } + + fun `test match method with single param`() { + val text = "class.method(*)" + text.assertMatcher("class.method", "(*)") + } + + fun `test match all methods with single param`() { + val text = "*(*)" + text.assertMatcher("*", "(*)") + } + + fun `test simplified params matcher`() { + val text = "(*)" + text.assertMatcher("", "(*)") + } + + fun `test shit`() { + val text = " foooo (*) " + text.assertMatcher("foooo", "(*)") + } + +} \ No newline at end of file diff --git a/platform/platform-tests/testSrc/com/intellij/codeInsight/hints/filtering/StringMatchingTest.kt b/platform/platform-tests/testSrc/com/intellij/codeInsight/hints/filtering/StringMatchingTest.kt new file mode 100644 index 000000000000..982e1ed5fd1a --- /dev/null +++ b/platform/platform-tests/testSrc/com/intellij/codeInsight/hints/filtering/StringMatchingTest.kt @@ -0,0 +1,52 @@ +/* + * Copyright 2000-2016 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.intellij.codeInsight.hints.filtering + +import junit.framework.TestCase +import org.assertj.core.api.Assertions.assertThat + +class StringMatchingTest : TestCase() { + + fun com.intellij.codeInsight.hints.filtering.StringMatcher.assertMatches(vararg matched: String) { + matched.forEach { assertThat(isMatching(it)).isTrue() } + } + + fun com.intellij.codeInsight.hints.filtering.StringMatcher.assertNotMatches(vararg unmatched: String) { + unmatched.forEach { assertThat(isMatching(it)).isFalse() } + } + + fun `test simple`() { + val matcher = com.intellij.codeInsight.hints.filtering.StringMatcherBuilder.create("aaa")!! + + matcher.assertMatches("aaa") + matcher.assertNotMatches("aaaa", "aab", "", "*", "a", "baaa") + } + + fun `test asterisks before`() { + val matcher = com.intellij.codeInsight.hints.filtering.StringMatcherBuilder.create("aaa*")!! + + matcher.assertMatches("aaa", "aaaa", "aaaaaa", "aaaqwe") + matcher.assertNotMatches("baaa", "nnaaa", "qweaaa") + } + + fun `test asterisks after`() { + val matcher = com.intellij.codeInsight.hints.filtering.StringMatcherBuilder.create("*aaa")!! + + matcher.assertMatches("aaa", "aaaa", "baaa", "aawweraaa") + matcher.assertNotMatches("aaab", "aaabaa") + } + +} \ No newline at end of file diff --git a/platform/platform-tests/testSrc/com/intellij/openapi/editor/colors/impl/EditorColorsSchemeImplTest.java b/platform/platform-tests/testSrc/com/intellij/openapi/editor/colors/impl/EditorColorsSchemeImplTest.java index 420b128a4b39..c88b70878a05 100644 --- a/platform/platform-tests/testSrc/com/intellij/openapi/editor/colors/impl/EditorColorsSchemeImplTest.java +++ b/platform/platform-tests/testSrc/com/intellij/openapi/editor/colors/impl/EditorColorsSchemeImplTest.java @@ -31,6 +31,7 @@ import java.util.Arrays; import java.util.Collections; import static com.intellij.openapi.editor.colors.FontPreferencesTest.*; +import static com.intellij.openapi.editor.markup.TextAttributes.USE_INHERITED_MARKER; import static com.intellij.testFramework.Assertions.assertThat; import static java.util.Collections.singletonList; @@ -194,7 +195,7 @@ public class EditorColorsSchemeImplTest extends EditorColorSchemeTestCase { } public void testSaveInheritance() throws Exception { - Pair result = doTestWriteRead(DefaultLanguageHighlighterColors.STATIC_METHOD, new TextAttributes()); + Pair result = doTestWriteRead(DefaultLanguageHighlighterColors.STATIC_METHOD, USE_INHERITED_MARKER); TextAttributes fallbackAttrs = result.first.getAttributes(DefaultLanguageHighlighterColors.STATIC_METHOD.getFallbackAttributeKey()); assertSame(result.second, fallbackAttrs); } @@ -208,16 +209,11 @@ public class EditorColorsSchemeImplTest extends EditorColorSchemeTestCase { } public void testSaveInheritanceForEmptyAttrs() throws Exception { - TextAttributes abstractMethodAttrs = new TextAttributes(); - assertTrue(abstractMethodAttrs.isFallbackEnabled()); - Pair result = - doTestWriteRead(DefaultLanguageHighlighterColors.INSTANCE_FIELD, abstractMethodAttrs); - TextAttributes fallbackAttrs = result.first.getAttributes( - DefaultLanguageHighlighterColors.INSTANCE_FIELD.getFallbackAttributeKey() - ); + Pair result = doTestWriteRead(DefaultLanguageHighlighterColors.INSTANCE_FIELD, USE_INHERITED_MARKER); + TextAttributes fallbackAttrs = result.first.getAttributes(DefaultLanguageHighlighterColors.INSTANCE_FIELD.getFallbackAttributeKey()); TextAttributes directlyDefined = ((AbstractColorsScheme)result.first).getDirectlyDefinedAttributes(DefaultLanguageHighlighterColors.INSTANCE_FIELD); - assertTrue(directlyDefined != null && directlyDefined.isFallbackEnabled()); + assertTrue(directlyDefined != null && directlyDefined == USE_INHERITED_MARKER); assertSame(fallbackAttrs, result.second); } @@ -283,12 +279,9 @@ public class EditorColorsSchemeImplTest extends EditorColorSchemeTestCase { EditorColorsScheme editorColorsScheme = new EditorColorsSchemeImpl(parentScheme); editorColorsScheme.setName("test"); TextAttributes defaultAttributes = new TextAttributes(null, null, Color.BLACK, EffectType.LINE_UNDERSCORE, Font.PLAIN); - TextAttributes attributes = new TextAttributes(null, null, null, EffectType.BOXED, Font.PLAIN); - attributes.setEnforceEmpty(false); - assertTrue(attributes.isFallbackEnabled()); TextAttributesKey testKey = TextAttributesKey.createTextAttributesKey("TEST_KEY", DefaultLanguageHighlighterColors.PARAMETER); parentScheme.setAttributes(testKey, defaultAttributes); - editorColorsScheme.setAttributes(testKey, attributes); + editorColorsScheme.setAttributes(testKey, USE_INHERITED_MARKER); try { Element root = new Element("scheme"); ((AbstractColorsScheme)editorColorsScheme).writeExternal(root); @@ -299,7 +292,7 @@ public class EditorColorsSchemeImplTest extends EditorColorSchemeTestCase { } } TextAttributes targetAttributes = ((AbstractColorsScheme)targetScheme).getDirectlyDefinedAttributes(testKey); - assertTrue(targetAttributes != null && targetAttributes.isFallbackEnabled()); + assertTrue(targetAttributes != null && targetAttributes == USE_INHERITED_MARKER); } finally { TextAttributesKey.removeTextAttributesKey(testKey.getExternalName()); diff --git a/platform/platform-tests/testSrc/com/intellij/openapi/editor/colors/impl/TextAttributesReaderTest.java b/platform/platform-tests/testSrc/com/intellij/openapi/editor/colors/impl/TextAttributesReaderTest.java index 7e12efb1702d..a5866deabb4a 100644 --- a/platform/platform-tests/testSrc/com/intellij/openapi/editor/colors/impl/TextAttributesReaderTest.java +++ b/platform/platform-tests/testSrc/com/intellij/openapi/editor/colors/impl/TextAttributesReaderTest.java @@ -172,7 +172,6 @@ public final class TextAttributesReaderTest extends LightPlatformTestCase { assertEquals(expected, actual); // EditorColorsSchemeImplTest.testWriteInheritedFromDefault // EditorColorsSchemeImplTest.testWriteInheritedFromDarcula - assertEquals(expected.isEnforceEmpty(), actual.isEnforceEmpty()); } @NotNull diff --git a/platform/projectModel-api/src/com/intellij/openapi/roots/FileIndex.java b/platform/projectModel-api/src/com/intellij/openapi/roots/FileIndex.java index d2182f033471..0d8def9d6273 100644 --- a/platform/projectModel-api/src/com/intellij/openapi/roots/FileIndex.java +++ b/platform/projectModel-api/src/com/intellij/openapi/roots/FileIndex.java @@ -30,7 +30,7 @@ import java.util.Set; */ public interface FileIndex { /** - * Iterates all files and directories in the content. + * Iterates all files and directories under content roots skipping excluded and ignored files and directories. * * @param iterator the iterator receiving the files. * @return false if files processing was stopped ({@link ContentIterator#processFile(VirtualFile)} returned false) @@ -38,8 +38,8 @@ public interface FileIndex { boolean iterateContent(@NotNull ContentIterator iterator); /** - * Iterates all files and directories in the content under directory dir (including the directory itself). - * Does not iterate anything if dir is not in the content. + * Iterates all files and directories in the content under directory dir (including the directory itself) skipping excluded + * and ignored files and directories. Does not iterate anything if dir is not in the content. * * @param dir the directory the contents of which is iterated. * @param iterator the iterator receiving the files. @@ -48,17 +48,14 @@ public interface FileIndex { boolean iterateContentUnderDirectory(@NotNull VirtualFile dir, @NotNull ContentIterator iterator); /** - * Returns true if fileOrDir is a file or directory under a content root of this - * project or module. - * - * @param fileOrDir the file or directory to check. - * @return true if the file or directory belongs to a content root, false otherwise. + * Returns {@code true} if {@code fileOrDir} is a file or directory under a content root of this project or module and not excluded or + * ignored. */ boolean isInContent(@NotNull VirtualFile fileOrDir); /** - * Returns true if file is a source file which belongs to sources of the content. - * (Returns true for both source and test source).

+ * Returns {@code true} if {@code fileOrDir} is a file located under a sources, tests or resources root and not excluded or ignored. + *

* Note that sometimes a file can belong to the content and be a source file but not belong to sources of the content. * This happens if sources of some library are located under the content (so they belong to the project content but not as sources). * @@ -68,16 +65,12 @@ public interface FileIndex { boolean isContentSourceFile(@NotNull VirtualFile file); /** - * Returns true if fileOrDir is a file or directory from the content source. - * (Returns true for both source and test source). - * - * @param fileOrDir the file or directory to check. - * @return true if the file or directory belongs to a source or test source root, false otherwise. + * Returns {@code true} if {@code fileOrDir} is a file or directory located under a sources, tests or resources root and not excluded or ignored. */ boolean isInSourceContent(@NotNull VirtualFile fileOrDir); /** - * Returns true if fileOrDir is a file or directory from the test content source + * Returns true if {@code fileOrDir} is a file or directory located under a test sources or resources root and not excluded or ignored. *

* Use this method when you really need to check whether the file is under test roots according to project configuration. *

@@ -92,10 +85,7 @@ public interface FileIndex { boolean isInTestSourceContent(@NotNull VirtualFile fileOrDir); /** - * Returns true if fileOrDir is a file or directory from the source root which have - * - * @param fileOrDir the file or directory to check. - * @return true if the file or directory belongs to a source root of one of specified types, false otherwise + * Returns {@code true} if {@code fileOrDir} is a file or directory located under a source root of type from {@code rootTypes} set and not excluded or ignored */ boolean isUnderSourceRootOfType(@NotNull VirtualFile fileOrDir, @NotNull Set> rootTypes); } diff --git a/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/FileIndexBase.java b/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/FileIndexBase.java index c0ca9d99a3bd..25be05c4013f 100644 --- a/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/FileIndexBase.java +++ b/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/FileIndexBase.java @@ -2,8 +2,10 @@ package com.intellij.openapi.roots.impl; import com.intellij.injected.editor.VirtualFileWindow; import com.intellij.openapi.fileTypes.FileTypeRegistry; +import com.intellij.openapi.module.Module; import com.intellij.openapi.project.Project; import com.intellij.openapi.roots.FileIndex; +import com.intellij.openapi.roots.ModuleRootManager; import com.intellij.openapi.vfs.VirtualFile; import org.jetbrains.annotations.NotNull; @@ -33,4 +35,9 @@ public abstract class FileIndexBase implements FileIndex { !myFileTypeRegistry.isFileIgnored(file) && isInSourceContent(file); } + + @NotNull + protected static VirtualFile[][] getModuleContentAndSourceRoots(Module module) { + return new VirtualFile[][]{ModuleRootManager.getInstance(module).getContentRoots(), ModuleRootManager.getInstance(module).getSourceRoots()}; + } } diff --git a/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/ModuleFileIndexImpl.java b/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/ModuleFileIndexImpl.java index 1ea6a212a9c5..829c77a7420a 100644 --- a/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/ModuleFileIndexImpl.java +++ b/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/ModuleFileIndexImpl.java @@ -45,23 +45,23 @@ public class ModuleFileIndexImpl extends FileIndexBase implements ModuleFileInde @Override public boolean iterateContent(@NotNull ContentIterator iterator) { - final List contentRoots = ApplicationManager.getApplication().runReadAction(new Computable>() { - @Override - public List compute() { - if (myModule.isDisposed()) return Collections.emptyList(); - - List result = ContainerUtil.newArrayList(); - for (VirtualFile contentRoot : ModuleRootManager.getInstance(myModule).getContentRoots()) { - VirtualFile parent = contentRoot.getParent(); + final Set contentRoots = ApplicationManager.getApplication().runReadAction((Computable>)() -> { + if (myModule.isDisposed()) return Collections.emptySet(); + + Set result = new LinkedHashSet<>(); + VirtualFile[][] allRoots = getModuleContentAndSourceRoots(myModule); + for (VirtualFile[] roots : allRoots) { + for (VirtualFile root : roots) { + VirtualFile parent = root.getParent(); if (parent != null) { DirectoryInfo parentInfo = myDirectoryIndex.getInfoForFile(parent); if (parentInfo.isInProject() && myModule.equals(parentInfo.getModule())) continue; // inner content - skip it } - result.add(contentRoot); + result.add(root); } - - return result; } + + return result; }); for (VirtualFile contentRoot : contentRoots) { boolean finished = VfsUtilCore.iterateChildrenRecursively(contentRoot, myContentFilter, iterator); diff --git a/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/ProjectFileIndexImpl.java b/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/ProjectFileIndexImpl.java index 1fadbde8a58e..f477dc6c04c8 100644 --- a/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/ProjectFileIndexImpl.java +++ b/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/ProjectFileIndexImpl.java @@ -38,6 +38,7 @@ import org.jetbrains.jps.model.java.JavaModuleSourceRootTypes; import org.jetbrains.jps.model.module.JpsModuleSourceRootType; import java.util.Collections; +import java.util.LinkedHashSet; import java.util.List; import java.util.Set; @@ -54,12 +55,7 @@ public class ProjectFileIndexImpl extends FileIndexBase implements ProjectFileIn @Override public boolean iterateContent(@NotNull ContentIterator iterator) { - Module[] modules = ApplicationManager.getApplication().runReadAction(new Computable() { - @Override - public Module[] compute() { - return ModuleManager.getInstance(myProject).getModules(); - } - }); + Module[] modules = ApplicationManager.getApplication().runReadAction((Computable)() -> ModuleManager.getInstance(myProject).getModules()); for (final Module module : modules) { for (VirtualFile contentRoot : getRootsToIterate(module)) { boolean finished = VfsUtilCore.iterateChildrenRecursively(contentRoot, myContentFilter, iterator); @@ -70,28 +66,27 @@ public class ProjectFileIndexImpl extends FileIndexBase implements ProjectFileIn return true; } - private List getRootsToIterate(final Module module) { - return ApplicationManager.getApplication().runReadAction(new Computable>() { - @Override - public List compute() { - if (module.isDisposed()) return Collections.emptyList(); + private Set getRootsToIterate(final Module module) { + return ApplicationManager.getApplication().runReadAction((Computable>)() -> { + if (module.isDisposed()) return Collections.emptySet(); - List result = ContainerUtil.newArrayList(); - for (VirtualFile contentRoot : ModuleRootManager.getInstance(module).getContentRoots()) { - DirectoryInfo info = getInfoForFileOrDirectory(contentRoot); + Set result = new LinkedHashSet<>(); + for (VirtualFile[] roots : getModuleContentAndSourceRoots(module)) { + for (VirtualFile root : roots) { + DirectoryInfo info = getInfoForFileOrDirectory(root); if (!info.isInProject()) continue; // is excluded or ignored if (!module.equals(info.getModule())) continue; // maybe 2 modules have the same content root? - VirtualFile parent = contentRoot.getParent(); + VirtualFile parent = root.getParent(); if (parent != null) { DirectoryInfo parentInfo = getInfoForFileOrDirectory(parent); if (parentInfo.isInProject() && parentInfo.getModule() != null) continue; } - result.add(contentRoot); + result.add(root); } - - return result; } + + return result; }); } diff --git a/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/RootIndex.java b/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/RootIndex.java index 31831cc1b52e..de0ea2adcf33 100644 --- a/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/RootIndex.java +++ b/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/RootIndex.java @@ -367,7 +367,7 @@ public class RootIndex { @Nullable VirtualFile librarySourceRoot = myRootInfo.findLibraryRootInfo(roots, true); result.addAll(myRootInfo.getLibraryOrderEntries(roots, libraryClassRoot, librarySourceRoot, myLibClassRootEntries, myLibSourceRootEntries)); - VirtualFile moduleContentRoot = myRootInfo.findModuleRootInfo(roots); + VirtualFile moduleContentRoot = myRootInfo.findNearestContentRoot(roots); if (moduleContentRoot != null) { ContainerUtil.addIfNotNull(result, myRootInfo.getModuleSourceEntry(roots, moduleContentRoot, myLibClassRootEntries)); } @@ -541,16 +541,39 @@ public class RootIndex { return result; } + /** + * Returns nearest content root for a file by its parent directories hierarchy. If the file is excluded (i.e. located under an excluded + * root and there are no source roots on the path to the excluded root) returns {@code null}. + */ @Nullable - private VirtualFile findModuleRootInfo(@NotNull List hierarchy) { + private VirtualFile findNearestContentRoot(@NotNull List hierarchy) { + Collection sourceRootOwners = null; + boolean underExcludedSourceRoot = false; for (VirtualFile root : hierarchy) { Module module = contentRootOf.get(root); Module excludedFrom = excludedFromModule.get(root); - if (module != null && excludedFrom != module) { + if (module != null && (excludedFrom != module || underExcludedSourceRoot && sourceRootOwners.contains(module))) { return root; } if (excludedFrom != null || excludedFromProject.contains(root)) { - return null; + if (sourceRootOwners != null) { + underExcludedSourceRoot = true; + } + else { + return null; + } + } + + if (!underExcludedSourceRoot && sourceRootOf.containsKey(root)) { + Collection modulesForSourceRoot = sourceRootOf.get(root); + if (!modulesForSourceRoot.isEmpty()) { + if (sourceRootOwners == null) { + sourceRootOwners = modulesForSourceRoot; + } + else { + sourceRootOwners = ContainerUtil.union(sourceRootOwners, modulesForSourceRoot); + } + } } } return null; @@ -662,7 +685,7 @@ public class RootIndex { private static Pair calcDirectoryInfo(@NotNull final VirtualFile root, @NotNull final List hierarchy, @NotNull RootInfo info) { - VirtualFile moduleContentRoot = info.findModuleRootInfo(hierarchy); + VirtualFile moduleContentRoot = info.findNearestContentRoot(hierarchy); VirtualFile libraryClassRoot = info.findLibraryRootInfo(hierarchy, false); VirtualFile librarySourceRoot = info.findLibraryRootInfo(hierarchy, true); boolean inProject = moduleContentRoot != null || libraryClassRoot != null || librarySourceRoot != null; diff --git a/platform/remote-servers/api/src/com/intellij/remoteServer/configuration/ServerConfiguration.java b/platform/remote-servers/api/src/com/intellij/remoteServer/configuration/ServerConfiguration.java index 255bdb834480..cd4c661c0f38 100644 --- a/platform/remote-servers/api/src/com/intellij/remoteServer/configuration/ServerConfiguration.java +++ b/platform/remote-servers/api/src/com/intellij/remoteServer/configuration/ServerConfiguration.java @@ -1,10 +1,16 @@ package com.intellij.remoteServer.configuration; import com.intellij.openapi.components.PersistentStateComponent; +import org.jetbrains.annotations.Nullable; /** * @author nik */ public abstract class ServerConfiguration { public abstract PersistentStateComponent getSerializer(); + + @Nullable + public String getCustomToolWindowId() { + return null; + } } diff --git a/platform/remote-servers/impl/src/com/intellij/remoteServer/impl/runtime/ui/DefaultRemoteServersViewContribution.java b/platform/remote-servers/impl/src/com/intellij/remoteServer/impl/runtime/ui/DefaultRemoteServersViewContribution.java index f3c44c154990..a2ea8089463e 100644 --- a/platform/remote-servers/impl/src/com/intellij/remoteServer/impl/runtime/ui/DefaultRemoteServersViewContribution.java +++ b/platform/remote-servers/impl/src/com/intellij/remoteServer/impl/runtime/ui/DefaultRemoteServersViewContribution.java @@ -17,12 +17,9 @@ package com.intellij.remoteServer.impl.runtime.ui; import com.intellij.ide.util.treeView.AbstractTreeNode; import com.intellij.openapi.project.Project; -import com.intellij.openapi.util.Condition; import com.intellij.remoteServer.configuration.RemoteServer; -import com.intellij.remoteServer.configuration.RemoteServersManager; import com.intellij.remoteServer.impl.runtime.ui.tree.TreeBuilderBase; import com.intellij.ui.treeStructure.Tree; -import com.intellij.util.containers.ContainerUtil; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -82,6 +79,6 @@ public class DefaultRemoteServersViewContribution extends RemoteServersViewContr @Override public List> getRemoteServers() { - return ContainerUtil.filter(RemoteServersManager.getInstance().getServers(), server -> server.getType().getCustomToolWindowId() == null); + return getRemoteServersByToolWindowId(null); } } diff --git a/platform/remote-servers/impl/src/com/intellij/remoteServer/impl/runtime/ui/RemoteServersViewContribution.java b/platform/remote-servers/impl/src/com/intellij/remoteServer/impl/runtime/ui/RemoteServersViewContribution.java index 72f6768cba32..5a59656748d7 100644 --- a/platform/remote-servers/impl/src/com/intellij/remoteServer/impl/runtime/ui/RemoteServersViewContribution.java +++ b/platform/remote-servers/impl/src/com/intellij/remoteServer/impl/runtime/ui/RemoteServersViewContribution.java @@ -18,10 +18,13 @@ package com.intellij.remoteServer.impl.runtime.ui; import com.intellij.ide.util.treeView.AbstractTreeNode; import com.intellij.openapi.project.Project; import com.intellij.remoteServer.configuration.RemoteServer; +import com.intellij.remoteServer.configuration.RemoteServersManager; import com.intellij.remoteServer.impl.runtime.ui.tree.ServersTreeNodeSelector; import com.intellij.remoteServer.impl.runtime.ui.tree.ServersTreeStructure; import com.intellij.remoteServer.runtime.ServerConnection; +import com.intellij.util.containers.ContainerUtil; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import java.util.List; @@ -58,4 +61,14 @@ public abstract class RemoteServersViewContribution extends RemoteServersViewCon } }; } + + public static String getRemoteServerToolWindowId(RemoteServer server) { + String serverToolWindowId = server.getConfiguration().getCustomToolWindowId(); + return serverToolWindowId != null ? serverToolWindowId : server.getType().getCustomToolWindowId(); + } + + protected static List> getRemoteServersByToolWindowId(@Nullable String toolWindowId) { + return ContainerUtil.filter(RemoteServersManager.getInstance().getServers(), + server -> getRemoteServerToolWindowId(server) == toolWindowId); + } } diff --git a/platform/remote-servers/impl/src/com/intellij/remoteServer/impl/runtime/ui/RemoteServersViewImpl.java b/platform/remote-servers/impl/src/com/intellij/remoteServer/impl/runtime/ui/RemoteServersViewImpl.java index e4bd3b0f7cd8..df77826516ae 100644 --- a/platform/remote-servers/impl/src/com/intellij/remoteServer/impl/runtime/ui/RemoteServersViewImpl.java +++ b/platform/remote-servers/impl/src/com/intellij/remoteServer/impl/runtime/ui/RemoteServersViewImpl.java @@ -52,7 +52,7 @@ public class RemoteServersViewImpl extends RemoteServersView { } private static String getToolWindowId(ServerConnection connection) { - String customToolWindowId = connection.getServer().getType().getCustomToolWindowId(); + String customToolWindowId = RemoteServersViewContribution.getRemoteServerToolWindowId(connection.getServer()); return StringUtil.notNullize(customToolWindowId, DefaultServersToolWindowManager.WINDOW_ID); } } diff --git a/platform/testFramework/src/com/intellij/projectView/TestProjectTreeStructure.java b/platform/testFramework/src/com/intellij/projectView/TestProjectTreeStructure.java index a1bd02b83d5c..eee966b1386b 100644 --- a/platform/testFramework/src/com/intellij/projectView/TestProjectTreeStructure.java +++ b/platform/testFramework/src/com/intellij/projectView/TestProjectTreeStructure.java @@ -15,6 +15,7 @@ */ package com.intellij.projectView; +import com.intellij.ide.projectView.ProjectViewSettings; import com.intellij.ide.projectView.impl.AbstractProjectTreeStructure; import com.intellij.ide.projectView.impl.AbstractProjectViewPSIPane; import com.intellij.openapi.Disposable; @@ -25,7 +26,8 @@ import com.intellij.psi.PsiElement; import com.intellij.testFramework.ProjectViewTestUtil; import org.junit.Assert; -public class TestProjectTreeStructure extends AbstractProjectTreeStructure implements Disposable { +public class TestProjectTreeStructure extends AbstractProjectTreeStructure implements Disposable, ProjectViewSettings { + private boolean myShowExcludedFiles = true; protected boolean myShowMembers = false; protected boolean myHideEmptyMiddlePackages; protected boolean myFlattenPackages; @@ -74,6 +76,11 @@ public class TestProjectTreeStructure extends AbstractProjectTreeStructure imple return myShowLibraryContents; } + @Override + public boolean isShowExcludedFiles() { + return myShowExcludedFiles; + } + @Override public boolean isShowModules() { return true; @@ -91,6 +98,10 @@ public class TestProjectTreeStructure extends AbstractProjectTreeStructure imple myFlattenPackages = flattenPackages; } + public void hideExcludedFiles() { + myShowExcludedFiles = false; + } + public void setShowLibraryContents(boolean showLibraryContents) { myShowLibraryContents = showLibraryContents; } diff --git a/platform/util/resources/misc/registry.properties b/platform/util/resources/misc/registry.properties index 03d437856f27..3a1526a70026 100644 --- a/platform/util/resources/misc/registry.properties +++ b/platform/util/resources/misc/registry.properties @@ -830,6 +830,8 @@ ide.text.effect.new=true ide.text.effect.new.description=Enables new effect painter for text ide.text.effect.new.scale=true ide.text.effect.new.scale.description=Enables scalable effect painter for text +ide.text.effect.new.metrics=true +ide.text.effect.new.metrics.description=Use line metrics to calculate text offset in the effect painter ide.intellij.laf.win10.ui=false ide.intellij.laf.win10.ui.description=Enables Windows 10 look diff --git a/platform/util/src/com/intellij/icons/AllIcons.java b/platform/util/src/com/intellij/icons/AllIcons.java index 8f2be85a9d4d..249ff563b2d4 100644 --- a/platform/util/src/com/intellij/icons/AllIcons.java +++ b/platform/util/src/com/intellij/icons/AllIcons.java @@ -783,7 +783,7 @@ public class AllIcons { public static final Icon DeleteContentFolderRollover = IconLoader.getIcon("/modules/deleteContentFolderRollover.png"); // 9x9 public static final Icon DeleteContentRoot = IconLoader.getIcon("/modules/deleteContentRoot.png"); // 9x9 public static final Icon DeleteContentRootRollover = IconLoader.getIcon("/modules/deleteContentRootRollover.png"); // 9x9 - public static final Icon Edit = IconLoader.getIcon("/modules/edit.png"); // 14x14 + public static final Icon Edit = IconLoader.getIcon("/modules/edit.png"); // 16x16 public static final Icon EditFolder = IconLoader.getIcon("/modules/editFolder.png"); // 16x16 public static final Icon ExcludedGeneratedRoot = IconLoader.getIcon("/modules/excludedGeneratedRoot.png"); // 16x16 public static final Icon ExcludeRoot = IconLoader.getIcon("/modules/excludeRoot.png"); // 16x16 @@ -828,7 +828,7 @@ public class AllIcons { public static final Icon Annotationtype = IconLoader.getIcon("/nodes/annotationtype.png"); // 16x16 public static final Icon AnonymousClass = IconLoader.getIcon("/nodes/anonymousClass.png"); // 16x16 public static final Icon Artifact = IconLoader.getIcon("/nodes/artifact.png"); // 16x16 - public static final Icon Aspect = IconLoader.getIcon("/nodes/aspect.png"); // 14x14 + public static final Icon Aspect = IconLoader.getIcon("/nodes/aspect.png"); // 16x16 public static final Icon C_plocal = IconLoader.getIcon("/nodes/c_plocal.png"); // 16x16 public static final Icon C_private = IconLoader.getIcon("/nodes/c_private.png"); // 16x16 public static final Icon C_protected = IconLoader.getIcon("/nodes/c_protected.png"); // 16x16 @@ -887,9 +887,9 @@ public class AllIcons { public static final Icon Component = IconLoader.getIcon("/nodes/jsf/component.png"); // 16x16 public static final Icon Converter = IconLoader.getIcon("/nodes/jsf/converter.png"); // 16x16 public static final Icon General = IconLoader.getIcon("/nodes/jsf/general.png"); // 16x16 - public static final Icon GenericValue = IconLoader.getIcon("/nodes/jsf/genericValue.png"); // 18x18 + public static final Icon GenericValue = IconLoader.getIcon("/nodes/jsf/genericValue.png"); // 16x16 public static final Icon ManagedBean = IconLoader.getIcon("/nodes/jsf/managedBean.png"); // 16x16 - public static final Icon NavigationCase = IconLoader.getIcon("/nodes/jsf/navigationCase.png"); // 18x18 + public static final Icon NavigationCase = IconLoader.getIcon("/nodes/jsf/navigationCase.png"); // 16x16 public static final Icon NavigationRule = IconLoader.getIcon("/nodes/jsf/navigationRule.png"); // 16x16 public static final Icon Renderer = IconLoader.getIcon("/nodes/jsf/renderer.png"); // 16x16 public static final Icon RenderKit = IconLoader.getIcon("/nodes/jsf/renderKit.png"); // 16x16 @@ -909,9 +909,9 @@ public class AllIcons { public static final Icon Module = IconLoader.getIcon("/nodes/Module.png"); // 16x16 public static final Icon ModuleGroup = IconLoader.getIcon("/nodes/moduleGroup.png"); // 16x16 public static final Icon NativeLibrariesFolder = IconLoader.getIcon("/nodes/nativeLibrariesFolder.png"); // 16x16 - public static final Icon NewException = IconLoader.getIcon("/nodes/newException.png"); // 14x14 + public static final Icon NewException = IconLoader.getIcon("/nodes/newException.png"); // 16x16 public static final Icon NewFolder = IconLoader.getIcon("/nodes/newFolder.png"); // 16x16 - public static final Icon NewParameter = IconLoader.getIcon("/nodes/newParameter.png"); // 14x14 + public static final Icon NewParameter = IconLoader.getIcon("/nodes/newParameter.png"); // 16x16 public static final Icon NodePlaceholder = IconLoader.getIcon("/nodes/nodePlaceholder.png"); // 16x16 public static final Icon Package = IconLoader.getIcon("/nodes/package.png"); // 16x16 public static final Icon Padlock = IconLoader.getIcon("/nodes/padlock.png"); // 16x16 diff --git a/platform/util/src/com/intellij/util/containers/ContainerUtil.java b/platform/util/src/com/intellij/util/containers/ContainerUtil.java index 8e40d738099b..1fed757d77e8 100644 --- a/platform/util/src/com/intellij/util/containers/ContainerUtil.java +++ b/platform/util/src/com/intellij/util/containers/ContainerUtil.java @@ -450,6 +450,12 @@ public class ContainerUtil extends ContainerUtilRt { @NotNull @Contract(pure=true) public static Set union(@NotNull Set set, @NotNull Set set2) { + return union((Collection)set, set2); + } + + @NotNull + @Contract(pure=true) + public static Set union(@NotNull Collection set, @NotNull Collection set2) { Set result = new THashSet(set.size() + set2.size()); result.addAll(set); result.addAll(set2); diff --git a/platform/util/src/com/intellij/util/containers/JBIterable.java b/platform/util/src/com/intellij/util/containers/JBIterable.java index 89b2c156c3b8..7e36e16c9780 100644 --- a/platform/util/src/com/intellij/util/containers/JBIterable.java +++ b/platform/util/src/com/intellij/util/containers/JBIterable.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -161,7 +161,7 @@ public abstract class JBIterable implements Iterable { */ @NotNull public static JBIterable of(@Nullable E... elements) { - return elements == null ? JBIterable.empty() : from(ContainerUtilRt.newArrayList(elements)); + return elements == null || elements.length == 0 ? JBIterable.empty() : from(ContainerUtilRt.newArrayList(elements)); } private static final JBIterable EMPTY = new JBIterable() { @@ -363,7 +363,7 @@ public abstract class JBIterable implements Iterable { /** * Returns a {@code JBIterable} that applies {@code function} to each element of this - * iterable and concats the produced iterables in one. + * iterable and concatenates the produced iterables in one. *

*

The returned iterable's iterator supports {@code remove()} if an underlying iterable's * iterator does. After a successful {@code remove()} call, this iterable no longer diff --git a/platform/util/src/com/intellij/util/ui/UIUtil.java b/platform/util/src/com/intellij/util/ui/UIUtil.java index 7d19d9138691..4390e42ba525 100644 --- a/platform/util/src/com/intellij/util/ui/UIUtil.java +++ b/platform/util/src/com/intellij/util/ui/UIUtil.java @@ -2360,7 +2360,7 @@ public class UIUtil { public static HTMLEditorKit getHTMLEditorKit(boolean noGapsBetweenParagraphs) { Font font = getLabelFont(); @NonNls String family = !SystemInfo.isWindows && font != null ? font.getFamily() : "Tahoma"; - int size = font != null ? font.getSize() : JBUI.scale(11); + final int size = font != null ? font.getSize() : JBUI.scale(11); String customCss = String.format("body, div, p { font-family: %s; font-size: %s; }", family, size); if (noGapsBetweenParagraphs) { @@ -2370,7 +2370,7 @@ public class UIUtil { final StyleSheet style = new StyleSheet(); style.addStyleSheet(isUnderDarcula() ? (StyleSheet)UIManager.getDefaults().get("StyledEditorKit.JBDefaultStyle") : DEFAULT_HTML_KIT_CSS); style.addRule(customCss); - scaleStyleSheetFontSize(style); + scaleStyleSheetFontSize(style, size); return new HTMLEditorKit() { @@ -2378,7 +2378,7 @@ public class UIUtil { public Document createDefaultDocument() { Document document = super.createDefaultDocument(); if (document instanceof HTMLDocument) { - scaleStyleSheetFontSize(((HTMLDocument)document).getStyleSheet()); + scaleStyleSheetFontSize(((HTMLDocument)document).getStyleSheet(), size); } return document; } @@ -2390,17 +2390,11 @@ public class UIUtil { }; } - private static void scaleStyleSheetFontSize(@Nullable StyleSheet styleSheet) { - if (styleSheet == null) { - return; - } - // 'baseFontSize' equals to javax.swing.text.html.StyleSheet.sizeMapDefault[3], - // where '3' == javax.swing.text.html.CSS.baseFontSizeIndex - // See javax.swing.text.html.StyleSheet.rebaseSizeMap() - int baseFontSize = 14; - int scaledBaseFontSize = JBUI.scaleFontSize(baseFontSize); - if (baseFontSize != scaledBaseFontSize) { - styleSheet.addRule("BASE_SIZE " + scaledBaseFontSize); + private static void scaleStyleSheetFontSize(@Nullable StyleSheet styleSheet, int bodyFontSize) { + // In compliance with javax.swing.text.html.StyleSheet logic, where 14pt font size is specified in + // javax/swing/text/html/default.css and javax.swing.text.html.StyleSheet.sizeMapDefault[3]. + if (styleSheet != null) { + styleSheet.addRule("BASE_SIZE " + bodyFontSize); } } diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/CommitChangeListDialog.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/CommitChangeListDialog.java index b75d14bb19aa..7613749fa73f 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/CommitChangeListDialog.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/CommitChangeListDialog.java @@ -1010,7 +1010,7 @@ public class CommitChangeListDialog extends DialogWrapper implements CheckinProj JScrollPane optionsPane = ScrollPaneFactory.createScrollPane(myAdditionalOptionsPanel, true); JPanel infoPanel = JBUI.Panels.simplePanel(optionsPane).withBorder(JBUI.Borders.emptyLeft(10)); - mainPanel = new JPanel(new MyOptionsLayout(mySplitter, infoPanel, JBUI.scale(250))); + mainPanel = new JPanel(new MyOptionsLayout(mySplitter, infoPanel, JBUI.scale(150), JBUI.scale(400))); mainPanel.add(mySplitter); mainPanel.add(infoPanel); } else { @@ -1348,11 +1348,13 @@ public class CommitChangeListDialog extends DialogWrapper implements CheckinProj private final JComponent myPanel; private final JComponent myOptions; private final int myMinOptionsWidth; + private final int myMaxOptionsWidth; - public MyOptionsLayout(@NotNull JComponent panel, @NotNull JComponent options, int minOptionsWidth) { + public MyOptionsLayout(@NotNull JComponent panel, @NotNull JComponent options, int minOptionsWidth, int maxOptionsWidth) { myPanel = panel; myOptions = options; myMinOptionsWidth = minOptionsWidth; + myMaxOptionsWidth = maxOptionsWidth; } @Override @@ -1365,9 +1367,8 @@ public class CommitChangeListDialog extends DialogWrapper implements CheckinProj @Override public void layoutContainer(Container parent) { Rectangle bounds = parent.getBounds(); - int availableWidth = bounds.width - myPanel.getPreferredSize().width; int preferredWidth = myOptions.getPreferredSize().width; - int optionsWidth = Math.max(Math.min(availableWidth, preferredWidth), myMinOptionsWidth); + int optionsWidth = Math.max(Math.min(myMaxOptionsWidth, preferredWidth), myMinOptionsWidth); myPanel.setBounds(new Rectangle(0, 0, bounds.width - optionsWidth, bounds.height)); myOptions.setBounds(new Rectangle(bounds.width - optionsWidth, 0, optionsWidth, bounds.height)); } diff --git a/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/frame/VcsLogGraphTable.java b/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/frame/VcsLogGraphTable.java index 6cd606885e80..3533019d82b6 100644 --- a/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/frame/VcsLogGraphTable.java +++ b/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/frame/VcsLogGraphTable.java @@ -17,15 +17,12 @@ package com.intellij.vcs.log.ui.frame; import com.google.common.primitives.Ints; import com.intellij.ide.CopyProvider; -import com.intellij.ide.IdeTooltip; -import com.intellij.ide.IdeTooltipManager; import com.intellij.openapi.actionSystem.DataContext; import com.intellij.openapi.actionSystem.DataProvider; import com.intellij.openapi.actionSystem.PlatformDataKeys; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.ide.CopyPasteManager; import com.intellij.openapi.ui.LoadingDecorator; -import com.intellij.openapi.ui.popup.Balloon; import com.intellij.openapi.util.Comparing; import com.intellij.openapi.util.Couple; import com.intellij.openapi.util.Pair; @@ -33,7 +30,6 @@ import com.intellij.openapi.util.text.StringUtil; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.ui.*; import com.intellij.ui.components.JBLabel; -import com.intellij.ui.components.panels.Wrapper; import com.intellij.ui.table.JBTable; import com.intellij.util.containers.ContainerUtil; import com.intellij.util.text.DateFormatUtil; @@ -59,7 +55,6 @@ import com.intellij.vcs.log.ui.VcsLogUiImpl; import com.intellij.vcs.log.ui.render.GraphCommitCell; import com.intellij.vcs.log.ui.render.GraphCommitCellRenderer; import com.intellij.vcs.log.ui.tables.GraphTableModel; -import com.intellij.vcs.log.util.VcsUserUtil; import gnu.trove.TIntHashSet; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; @@ -74,7 +69,9 @@ import java.awt.datatransfer.StringSelection; import java.awt.event.ComponentAdapter; import java.awt.event.ComponentEvent; import java.awt.event.MouseEvent; -import java.util.*; +import java.util.Collection; +import java.util.Date; +import java.util.EventObject; import java.util.List; public class VcsLogGraphTable extends TableWithProgress implements DataProvider, CopyProvider { @@ -94,6 +91,7 @@ public class VcsLogGraphTable extends TableWithProgress implements DataProvider, @NotNull private final TableCellRenderer myDummyRenderer = new DefaultTableCellRenderer(); @NotNull private final GraphCommitCellRenderer myGraphCommitCellRenderer; @NotNull private final GraphTableController myController; + private final StringCellRenderer myStringCellRenderer; private boolean myColumnsSizeInitialized = false; @Nullable private Selection mySelection = null; @@ -113,12 +111,13 @@ public class VcsLogGraphTable extends TableWithProgress implements DataProvider, myUi = ui; myLogData = logData; myGraphCommitCellRenderer = new GraphCommitCellRenderer(logData, myGraphCellPainter, this); + myStringCellRenderer = new StringCellRenderer(); myLogData.getProgress().addProgressIndicatorListener(new MyProgressListener(), ui); setDefaultRenderer(VirtualFile.class, new RootCellRenderer(myUi)); setDefaultRenderer(GraphCommitCell.class, myGraphCommitCellRenderer); - setDefaultRenderer(String.class, new StringCellRenderer()); + setDefaultRenderer(String.class, myStringCellRenderer); setShowHorizontalLines(false); setIntercellSpacing(JBUI.emptySize()); @@ -187,11 +186,13 @@ public class VcsLogGraphTable extends TableWithProgress implements DataProvider, maxWidth = Math.max(getFontMetrics(tableFont.deriveFont(Font.BOLD)).stringWidth(value), maxWidth); if (!value.isEmpty()) sizeCalculated = true; } - int min = Math.min(maxWidth + UIUtil.DEFAULT_HGAP, MAX_DEFAULT_AUTHOR_COLUMN_WIDTH); + int min = + Math.min(maxWidth + UIUtil.DEFAULT_HGAP, MAX_DEFAULT_AUTHOR_COLUMN_WIDTH + myStringCellRenderer.getHorizontalTextPadding()); column.setPreferredWidth(min); } else if (i == GraphTableModel.DATE_COLUMN) { // all dates have nearly equal sizes - int min = getFontMetrics(tableFont.deriveFont(Font.BOLD)).stringWidth("mm" + DateFormatUtil.formatDateTime(new Date())); + int min = getFontMetrics(tableFont.deriveFont(Font.BOLD)).stringWidth(DateFormatUtil.formatDateTime(new Date())) + + myStringCellRenderer.getHorizontalTextPadding(); column.setPreferredWidth(min); } } @@ -645,7 +646,12 @@ public class VcsLogGraphTable extends TableWithProgress implements DataProvider, return; } append(value.toString(), applyHighlighters(this, row, column, value.toString(), hasFocus, selected)); - setBorder(null); + } + + public int getHorizontalTextPadding() { + Insets borderInsets = getMyBorder().getBorderInsets(this); + Insets ipad = getIpad(); + return borderInsets.left + borderInsets.right + ipad.left + ipad.right; } } diff --git a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/dependency/CyclicClassDependencyInspection.java b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/dependency/CyclicClassDependencyInspection.java index c7d2cbf70388..3f774dbbc813 100644 --- a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/dependency/CyclicClassDependencyInspection.java +++ b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/dependency/CyclicClassDependencyInspection.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2015 Dave Griffith, Bas Leijdekkers + * Copyright 2006-2016 Dave Griffith, Bas Leijdekkers * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,6 @@ import com.intellij.codeInspection.*; import com.intellij.codeInspection.reference.RefClass; import com.intellij.codeInspection.reference.RefEntity; import com.intellij.codeInspection.util.RefEntityAlphabeticalComparator; -import com.intellij.psi.PsiAnonymousClass; import com.intellij.psi.PsiClass; import com.intellij.psi.PsiElement; import com.siyeh.InspectionGadgetsBundle; @@ -51,8 +50,7 @@ public class CyclicClassDependencyInspection extends BaseGlobalInspection { return null; } final RefClass refClass = (RefClass)refEntity; - final PsiClass aClass = refClass.getElement(); - if (aClass == null || aClass.getContainingClass() != null || aClass instanceof PsiAnonymousClass) { + if (refClass.isAnonymous() || refClass.isLocalClass() || refClass.isSyntheticJSP()) { return null; } final Set dependencies = DependencyUtils.calculateTransitiveDependenciesForClass(refClass); @@ -79,6 +77,10 @@ public class CyclicClassDependencyInspection extends BaseGlobalInspection { errorString = InspectionGadgetsBundle.message("cyclic.class.dependency.problem.descriptor", refEntity.getName(), Integer.valueOf(numMutualDependents)); } + final PsiClass aClass = refClass.getElement(); + if (aClass == null) { + return null; + } final PsiElement anchor = aClass.getNameIdentifier(); if (anchor == null) return null; return new CommonProblemDescriptor[]{ diff --git a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/dependency/DependencyUtils.java b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/dependency/DependencyUtils.java index 302574bd4b03..c539cd96b92d 100644 --- a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/dependency/DependencyUtils.java +++ b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/dependency/DependencyUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2013 Dave Griffith, Bas Leijdekkers + * Copyright 2006-2016 Dave Griffith, Bas Leijdekkers * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,10 +43,8 @@ public class DependencyUtils { private DependencyUtils() { } - public static Set calculateDependenciesForClass( - RefClass refClass) { - final Set dependencies = - refClass.getUserData(DEPENDENCY_CLASSES_KEY); + public static Set calculateDependenciesForClass(RefClass refClass) { + final Set dependencies = refClass.getUserData(DEPENDENCY_CLASSES_KEY); if (dependencies != null) { return dependencies; } @@ -57,40 +55,32 @@ public class DependencyUtils { return newDependencies; } - @SuppressWarnings({"MethodWithMultipleLoops"}) - static void tabulateDependencyClasses(RefJavaElement element, - Set dependencies) { - final Collection references = element.getOutReferences(); - final RefJavaUtil refUtil = RefJavaUtil.getInstance(); - for (RefElement reference : references) { - final RefClass refClass = refUtil.getTopLevelClass(reference); - if (refClass != null) { - dependencies.add(refClass); - } - } - final Collection typeReferences = - element.getOutTypeReferences(); - for (RefElement reference : typeReferences) { - final RefClass refClass = refUtil.getTopLevelClass(reference); - if (refClass != null) { - dependencies.add(refClass); - } - } + private static void tabulateDependencyClasses(RefJavaElement element, Set dependencies) { + addOwnerClassesToSet(element.getOutReferences(), dependencies); + addOwnerClassesToSet(element.getOutTypeReferences(), dependencies); final List children = element.getChildren(); if (children == null) { return; } for (RefEntity child : children) { - if (child instanceof RefJavaElement) { + if (child instanceof RefJavaElement && !(child instanceof RefClass)) { tabulateDependencyClasses((RefJavaElement)child, dependencies); } } } - public static Set calculateTransitiveDependenciesForClass( - RefClass refClass) { - final Set dependencies = - refClass.getUserData(TRANSITIVE_DEPENDENCY_CLASSES_KEY); + private static void addOwnerClassesToSet(Collection references, Set set) { + final RefJavaUtil refUtil = RefJavaUtil.getInstance(); + for (RefElement reference : references) { + final RefClass refClass = (reference instanceof RefClass) ? (RefClass)reference : refUtil.getOwnerClass(reference); + if (refClass != null && !refClass.isAnonymous() && !refClass.isLocalClass()) { + set.add(refClass); + } + } + } + + public static Set calculateTransitiveDependenciesForClass(RefClass refClass) { + final Set dependencies = refClass.getUserData(TRANSITIVE_DEPENDENCY_CLASSES_KEY); if (dependencies != null) { return dependencies; } @@ -122,51 +112,36 @@ public class DependencyUtils { } public static Set calculateDependentsForClass(RefClass refClass) { - final Set dependents = - refClass.getUserData(DEPENDENT_CLASSES_KEY); + final Set dependents = refClass.getUserData(DEPENDENT_CLASSES_KEY); if (dependents != null) { return dependents; } final Set newDependents = new HashSet<>(); tabulateDependentClasses(refClass, newDependents); - final Set typeReferences = refClass.getInTypeReferences(); - final RefJavaUtil refUtil = RefJavaUtil.getInstance(); - for (RefElement typeReference : typeReferences) { - final RefClass referencingClass = - refUtil.getTopLevelClass(typeReference); - newDependents.add(referencingClass); - } newDependents.remove(refClass); refClass.putUserData(DEPENDENT_CLASSES_KEY, newDependents); return newDependents; } - @SuppressWarnings({"MethodWithMultipleLoops"}) - private static void tabulateDependentClasses(RefElement element, - Set dependents) { - final Collection references = element.getInReferences(); - final RefJavaUtil refUtil = RefJavaUtil.getInstance(); - for (RefElement reference : references) { - final RefClass refClass = refUtil.getTopLevelClass(reference); - if (refClass != null) { - dependents.add(refClass); - } + private static void tabulateDependentClasses(RefElement element, Set dependents) { + addOwnerClassesToSet(element.getInReferences(), dependents); + if (element instanceof RefClass) { + final RefClass refClass = (RefClass)element; + addOwnerClassesToSet(refClass.getInTypeReferences(), dependents); } final List children = element.getChildren(); if (children == null) { return; } for (RefEntity child : children) { - if (child instanceof RefElement) { + if (child instanceof RefElement && !(child instanceof RefClass)) { tabulateDependentClasses((RefElement)child, dependents); } } } - public static Set calculateTransitiveDependentsForClass( - RefClass refClass) { - final Set dependents = - refClass.getUserData(TRANSITIVE_DEPENDENT_CLASSES_KEY); + public static Set calculateTransitiveDependentsForClass(RefClass refClass) { + final Set dependents = refClass.getUserData(TRANSITIVE_DEPENDENT_CLASSES_KEY); if (dependents != null) { return dependents; } @@ -205,15 +180,13 @@ public class DependencyUtils { return dependencies; } final Set newDependencies = new HashSet<>(); - tabulateDependencyPackages(refPackage, newDependencies); newDependencies.remove(refPackage); refPackage.putUserData(DEPENDENCY_PACKAGES_KEY, newDependencies); return newDependencies; } - static void tabulateDependencyPackages(RefEntity entity, - Set dependencies) { + private static void tabulateDependencyPackages(RefEntity entity, Set dependencies) { if (entity instanceof RefElement) { final RefElement element = (RefElement)entity; final Collection references = element.getOutReferences(); @@ -249,7 +222,7 @@ public class DependencyUtils { return newDependents; } - static void tabulateDependentPackages(RefEntity entity, Set dependents) { + private static void tabulateDependentPackages(RefEntity entity, Set dependents) { if (entity instanceof RefElement) { final RefElement element = (RefElement)entity; final Collection references = element.getInReferences(); diff --git a/plugins/InspectionGadgets/test/com/siyeh/igtest/dependency/cyclic_class_dependency/expected.xml b/plugins/InspectionGadgets/test/com/siyeh/igtest/dependency/cyclic_class_dependency/expected.xml index d75c4d2e2d95..0b7f839ac8de 100644 --- a/plugins/InspectionGadgets/test/com/siyeh/igtest/dependency/cyclic_class_dependency/expected.xml +++ b/plugins/InspectionGadgets/test/com/siyeh/igtest/dependency/cyclic_class_dependency/expected.xml @@ -1,5 +1,12 @@ + + Cyclic.java + 6 + Cyclic class dependency + Class 'Cyclic' is cyclically dependent on classes 'com.siyeh.igtest.dependency.cyclic_class_dependency.src.Base' and 'com.siyeh.igtest.dependency.cyclic_class_dependency.src.Top' + + Cyclic.java 17 @@ -30,8 +37,15 @@ Cyclic.java - 6 + 52 Cyclic class dependency - Class 'Cyclic' is cyclically dependent on classes 'com.siyeh.igtest.dependency.cyclic_class_dependency.src.Base' and 'com.siyeh.igtest.dependency.cyclic_class_dependency.src.Top' + Class 'Inner1' is cyclically dependent on class 'com.siyeh.igtest.dependency.cyclic_class_dependency.src.Outer.Inner2' + + + + Cyclic.java + 55 + Cyclic class dependency + Class 'Inner2' is cyclically dependent on class 'com.siyeh.igtest.dependency.cyclic_class_dependency.src.Outer.Inner1' \ No newline at end of file diff --git a/plugins/InspectionGadgets/test/com/siyeh/igtest/dependency/cyclic_class_dependency/src/Cyclic.java b/plugins/InspectionGadgets/test/com/siyeh/igtest/dependency/cyclic_class_dependency/src/Cyclic.java index e8f750c99fa3..de36b6011c41 100644 --- a/plugins/InspectionGadgets/test/com/siyeh/igtest/dependency/cyclic_class_dependency/src/Cyclic.java +++ b/plugins/InspectionGadgets/test/com/siyeh/igtest/dependency/cyclic_class_dependency/src/Cyclic.java @@ -42,3 +42,17 @@ enum MyEnum { abstract int value(); } +class Outer { + + void m() { + class Local {} + class Local2 extends Outer {} + } + + class Inner1 { + Inner2 field; + } + class Inner2 { + Inner1 field; + } +} \ No newline at end of file diff --git a/plugins/InspectionGadgets/test/com/siyeh/igtest/errorhandling/try_identical_catches/TryIdenticalCatches.after.java b/plugins/InspectionGadgets/test/com/siyeh/igtest/errorhandling/try_identical_catches/TryIdenticalCatches.after.java index e86a19705306..87fdcfef51b3 100644 --- a/plugins/InspectionGadgets/test/com/siyeh/igtest/errorhandling/try_identical_catches/TryIdenticalCatches.after.java +++ b/plugins/InspectionGadgets/test/com/siyeh/igtest/errorhandling/try_identical_catches/TryIdenticalCatches.after.java @@ -185,4 +185,21 @@ class TryIdenticalCatches { System.out.println(e); } } +} +class TestInspection { + public void foo() throws MyException { + try { + toString(); + } catch (IllegalArgumentException e) { + throw new MyException(e); + } catch (IllegalStateException e) { + throw new MyException(e); + } + } + + private static class MyException extends Exception { + public MyException(IllegalArgumentException e) {} + + public MyException(IllegalStateException e) {} + } } \ No newline at end of file diff --git a/plugins/InspectionGadgets/test/com/siyeh/igtest/errorhandling/try_identical_catches/TryIdenticalCatches.java b/plugins/InspectionGadgets/test/com/siyeh/igtest/errorhandling/try_identical_catches/TryIdenticalCatches.java index 05fce429d02e..ff838abeae7c 100644 --- a/plugins/InspectionGadgets/test/com/siyeh/igtest/errorhandling/try_identical_catches/TryIdenticalCatches.java +++ b/plugins/InspectionGadgets/test/com/siyeh/igtest/errorhandling/try_identical_catches/TryIdenticalCatches.java @@ -188,4 +188,21 @@ class TryIdenticalCatches { System.out.println(e); } } +} +class TestInspection { + public void foo() throws MyException { + try { + toString(); + } catch (IllegalArgumentException e) { + throw new MyException(e); + } catch (IllegalStateException e) { + throw new MyException(e); + } + } + + private static class MyException extends Exception { + public MyException(IllegalArgumentException e) {} + + public MyException(IllegalStateException e) {} + } } \ No newline at end of file diff --git a/plugins/gradle/lib/gradle-2.13-src.zip b/plugins/gradle/lib/gradle-2.14.1-src.zip similarity index 71% rename from plugins/gradle/lib/gradle-2.13-src.zip rename to plugins/gradle/lib/gradle-2.14.1-src.zip index f80d84301b02..6e492dd2ce03 100644 Binary files a/plugins/gradle/lib/gradle-2.13-src.zip and b/plugins/gradle/lib/gradle-2.14.1-src.zip differ diff --git a/plugins/gradle/lib/gradle-base-services-2.13.jar b/plugins/gradle/lib/gradle-base-services-2.14.1.jar similarity index 52% rename from plugins/gradle/lib/gradle-base-services-2.13.jar rename to plugins/gradle/lib/gradle-base-services-2.14.1.jar index 4630ecae9962..a7da31a33a5a 100644 Binary files a/plugins/gradle/lib/gradle-base-services-2.13.jar and b/plugins/gradle/lib/gradle-base-services-2.14.1.jar differ diff --git a/plugins/gradle/lib/gradle-base-services-groovy-2.13.jar b/plugins/gradle/lib/gradle-base-services-groovy-2.14.1.jar similarity index 81% rename from plugins/gradle/lib/gradle-base-services-groovy-2.13.jar rename to plugins/gradle/lib/gradle-base-services-groovy-2.14.1.jar index 6309eb3c6238..555584c393e1 100644 Binary files a/plugins/gradle/lib/gradle-base-services-groovy-2.13.jar and b/plugins/gradle/lib/gradle-base-services-groovy-2.14.1.jar differ diff --git a/plugins/gradle/lib/gradle-cli-2.13.jar b/plugins/gradle/lib/gradle-cli-2.14.1.jar similarity index 86% rename from plugins/gradle/lib/gradle-cli-2.13.jar rename to plugins/gradle/lib/gradle-cli-2.14.1.jar index 792270433a99..f758d17c0cdb 100644 Binary files a/plugins/gradle/lib/gradle-cli-2.13.jar and b/plugins/gradle/lib/gradle-cli-2.14.1.jar differ diff --git a/plugins/gradle/lib/gradle-core-2.13.jar b/plugins/gradle/lib/gradle-core-2.14.1.jar similarity index 58% rename from plugins/gradle/lib/gradle-core-2.13.jar rename to plugins/gradle/lib/gradle-core-2.14.1.jar index e5e712c2bffb..152abf46c8ed 100644 Binary files a/plugins/gradle/lib/gradle-core-2.13.jar and b/plugins/gradle/lib/gradle-core-2.14.1.jar differ diff --git a/plugins/gradle/lib/gradle-logging-2.14.1.jar b/plugins/gradle/lib/gradle-logging-2.14.1.jar new file mode 100644 index 000000000000..d248a048ce66 Binary files /dev/null and b/plugins/gradle/lib/gradle-logging-2.14.1.jar differ diff --git a/plugins/gradle/lib/gradle-messaging-2.13.jar b/plugins/gradle/lib/gradle-messaging-2.13.jar deleted file mode 100644 index cd06de63d49b..000000000000 Binary files a/plugins/gradle/lib/gradle-messaging-2.13.jar and /dev/null differ diff --git a/plugins/gradle/lib/gradle-messaging-2.14.1.jar b/plugins/gradle/lib/gradle-messaging-2.14.1.jar new file mode 100644 index 000000000000..413970869049 Binary files /dev/null and b/plugins/gradle/lib/gradle-messaging-2.14.1.jar differ diff --git a/plugins/gradle/lib/gradle-model-core-2.13.jar b/plugins/gradle/lib/gradle-model-core-2.14.1.jar similarity index 59% rename from plugins/gradle/lib/gradle-model-core-2.13.jar rename to plugins/gradle/lib/gradle-model-core-2.14.1.jar index d9c21f9cada8..a5ce28ea2742 100644 Binary files a/plugins/gradle/lib/gradle-model-core-2.13.jar and b/plugins/gradle/lib/gradle-model-core-2.14.1.jar differ diff --git a/plugins/gradle/lib/gradle-model-groovy-2.13.jar b/plugins/gradle/lib/gradle-model-groovy-2.14.1.jar similarity index 79% rename from plugins/gradle/lib/gradle-model-groovy-2.13.jar rename to plugins/gradle/lib/gradle-model-groovy-2.14.1.jar index e07927857087..48a31bfc77c7 100644 Binary files a/plugins/gradle/lib/gradle-model-groovy-2.13.jar and b/plugins/gradle/lib/gradle-model-groovy-2.14.1.jar differ diff --git a/plugins/gradle/lib/gradle-native-2.13.jar b/plugins/gradle/lib/gradle-native-2.14.1.jar similarity index 74% rename from plugins/gradle/lib/gradle-native-2.13.jar rename to plugins/gradle/lib/gradle-native-2.14.1.jar index b13f5c5e9427..825b53228aad 100644 Binary files a/plugins/gradle/lib/gradle-native-2.13.jar and b/plugins/gradle/lib/gradle-native-2.14.1.jar differ diff --git a/plugins/gradle/lib/gradle-process-services-2.14.1.jar b/plugins/gradle/lib/gradle-process-services-2.14.1.jar new file mode 100644 index 000000000000..b8f8957711eb Binary files /dev/null and b/plugins/gradle/lib/gradle-process-services-2.14.1.jar differ diff --git a/plugins/gradle/lib/gradle-resources-2.13.jar b/plugins/gradle/lib/gradle-resources-2.14.1.jar similarity index 66% rename from plugins/gradle/lib/gradle-resources-2.13.jar rename to plugins/gradle/lib/gradle-resources-2.14.1.jar index e79f69c23936..6cfb52700baa 100644 Binary files a/plugins/gradle/lib/gradle-resources-2.13.jar and b/plugins/gradle/lib/gradle-resources-2.14.1.jar differ diff --git a/plugins/gradle/lib/gradle-tooling-api-2.13.jar b/plugins/gradle/lib/gradle-tooling-api-2.14.1.jar similarity index 50% rename from plugins/gradle/lib/gradle-tooling-api-2.13.jar rename to plugins/gradle/lib/gradle-tooling-api-2.14.1.jar index 47ae9aa4e17d..e9cb2f2d09d7 100644 Binary files a/plugins/gradle/lib/gradle-tooling-api-2.13.jar and b/plugins/gradle/lib/gradle-tooling-api-2.14.1.jar differ diff --git a/plugins/gradle/lib/gradle-wrapper-2.13.jar b/plugins/gradle/lib/gradle-wrapper-2.14.1.jar similarity index 82% rename from plugins/gradle/lib/gradle-wrapper-2.13.jar rename to plugins/gradle/lib/gradle-wrapper-2.14.1.jar index fdae99e29c0a..e0949a01095c 100644 Binary files a/plugins/gradle/lib/gradle-wrapper-2.13.jar and b/plugins/gradle/lib/gradle-wrapper-2.14.1.jar differ diff --git a/plugins/gradle/resources/fileTemplates/internal/Gradle Build Script with wrapper.gradle.ft b/plugins/gradle/resources/fileTemplates/internal/Gradle Build Script with wrapper.gradle.ft index 8c8d1e61599f..a3f5075c0a4a 100644 --- a/plugins/gradle/resources/fileTemplates/internal/Gradle Build Script with wrapper.gradle.ft +++ b/plugins/gradle/resources/fileTemplates/internal/Gradle Build Script with wrapper.gradle.ft @@ -9,7 +9,7 @@ task wrapper(type: Wrapper) { #if (${GRADLE_VERSION} && ${GRADLE_VERSION} != "") gradleVersion = '${GRADLE_VERSION}' #else - gradleVersion = '2.3' + gradleVersion = '2.14.1' #end distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } diff --git a/plugins/gradle/src/org/jetbrains/plugins/gradle/service/project/DistributionFactoryExt.java b/plugins/gradle/src/org/jetbrains/plugins/gradle/service/project/DistributionFactoryExt.java index 885515a8ca61..26cab5564dd5 100644 --- a/plugins/gradle/src/org/jetbrains/plugins/gradle/service/project/DistributionFactoryExt.java +++ b/plugins/gradle/src/org/jetbrains/plugins/gradle/service/project/DistributionFactoryExt.java @@ -20,8 +20,8 @@ import org.gradle.internal.Factory; import org.gradle.internal.UncheckedException; import org.gradle.internal.classpath.ClassPath; import org.gradle.internal.classpath.DefaultClassPath; -import org.gradle.logging.ProgressLogger; -import org.gradle.logging.ProgressLoggerFactory; +import org.gradle.internal.logging.progress.ProgressLogger; +import org.gradle.internal.logging.progress.ProgressLoggerFactory; import org.gradle.tooling.BuildCancelledException; import org.gradle.tooling.GradleConnectionException; import org.gradle.tooling.internal.consumer.Distribution; diff --git a/plugins/gradle/tooling-extension-api/lib/gradle-build-init-2.13.jar b/plugins/gradle/tooling-extension-api/lib/gradle-build-init-2.14.1.jar similarity index 63% rename from plugins/gradle/tooling-extension-api/lib/gradle-build-init-2.13.jar rename to plugins/gradle/tooling-extension-api/lib/gradle-build-init-2.14.1.jar index 4f8838624a95..140f5ea7a7af 100644 Binary files a/plugins/gradle/tooling-extension-api/lib/gradle-build-init-2.13.jar and b/plugins/gradle/tooling-extension-api/lib/gradle-build-init-2.14.1.jar differ diff --git a/plugins/gradle/tooling-extension-api/lib/gradle-ide-2.13.jar b/plugins/gradle/tooling-extension-api/lib/gradle-ide-2.13.jar deleted file mode 100644 index 2ff995048984..000000000000 Binary files a/plugins/gradle/tooling-extension-api/lib/gradle-ide-2.13.jar and /dev/null differ diff --git a/plugins/gradle/tooling-extension-api/lib/gradle-ide-2.14.1.jar b/plugins/gradle/tooling-extension-api/lib/gradle-ide-2.14.1.jar new file mode 100644 index 000000000000..c375f7564ebd Binary files /dev/null and b/plugins/gradle/tooling-extension-api/lib/gradle-ide-2.14.1.jar differ diff --git a/plugins/gradle/tooling-extension-api/lib/gradle-language-java-2.13.jar b/plugins/gradle/tooling-extension-api/lib/gradle-language-java-2.14.1.jar similarity index 77% rename from plugins/gradle/tooling-extension-api/lib/gradle-language-java-2.13.jar rename to plugins/gradle/tooling-extension-api/lib/gradle-language-java-2.14.1.jar index 55cd5f0d1f17..7c55cde6470b 100644 Binary files a/plugins/gradle/tooling-extension-api/lib/gradle-language-java-2.13.jar and b/plugins/gradle/tooling-extension-api/lib/gradle-language-java-2.14.1.jar differ diff --git a/plugins/gradle/tooling-extension-api/lib/gradle-language-jvm-2.13.jar b/plugins/gradle/tooling-extension-api/lib/gradle-language-jvm-2.14.1.jar similarity index 63% rename from plugins/gradle/tooling-extension-api/lib/gradle-language-jvm-2.13.jar rename to plugins/gradle/tooling-extension-api/lib/gradle-language-jvm-2.14.1.jar index 8abe3499486c..ffca68013cc5 100644 Binary files a/plugins/gradle/tooling-extension-api/lib/gradle-language-jvm-2.13.jar and b/plugins/gradle/tooling-extension-api/lib/gradle-language-jvm-2.14.1.jar differ diff --git a/plugins/gradle/tooling-extension-api/lib/gradle-language-scala-2.13.jar b/plugins/gradle/tooling-extension-api/lib/gradle-language-scala-2.14.1.jar similarity index 62% rename from plugins/gradle/tooling-extension-api/lib/gradle-language-scala-2.13.jar rename to plugins/gradle/tooling-extension-api/lib/gradle-language-scala-2.14.1.jar index 529c56b15a8b..d9a4f602575a 100644 Binary files a/plugins/gradle/tooling-extension-api/lib/gradle-language-scala-2.13.jar and b/plugins/gradle/tooling-extension-api/lib/gradle-language-scala-2.14.1.jar differ diff --git a/plugins/gradle/tooling-extension-api/lib/gradle-platform-base-2.13.jar b/plugins/gradle/tooling-extension-api/lib/gradle-platform-base-2.14.1.jar similarity index 66% rename from plugins/gradle/tooling-extension-api/lib/gradle-platform-base-2.13.jar rename to plugins/gradle/tooling-extension-api/lib/gradle-platform-base-2.14.1.jar index 36a6ee681885..753c518aa7d2 100644 Binary files a/plugins/gradle/tooling-extension-api/lib/gradle-platform-base-2.13.jar and b/plugins/gradle/tooling-extension-api/lib/gradle-platform-base-2.14.1.jar differ diff --git a/plugins/gradle/tooling-extension-api/lib/gradle-platform-jvm-2.13.jar b/plugins/gradle/tooling-extension-api/lib/gradle-platform-jvm-2.14.1.jar similarity index 61% rename from plugins/gradle/tooling-extension-api/lib/gradle-platform-jvm-2.13.jar rename to plugins/gradle/tooling-extension-api/lib/gradle-platform-jvm-2.14.1.jar index b775514c7529..b81d426cb6b5 100644 Binary files a/plugins/gradle/tooling-extension-api/lib/gradle-platform-jvm-2.13.jar and b/plugins/gradle/tooling-extension-api/lib/gradle-platform-jvm-2.14.1.jar differ diff --git a/plugins/gradle/tooling-extension-api/lib/gradle-plugins-2.13.jar b/plugins/gradle/tooling-extension-api/lib/gradle-plugins-2.13.jar deleted file mode 100644 index 80048c52f84d..000000000000 Binary files a/plugins/gradle/tooling-extension-api/lib/gradle-plugins-2.13.jar and /dev/null differ diff --git a/plugins/gradle/tooling-extension-api/lib/gradle-plugins-2.14.1.jar b/plugins/gradle/tooling-extension-api/lib/gradle-plugins-2.14.1.jar new file mode 100644 index 000000000000..295f5f40e7fa Binary files /dev/null and b/plugins/gradle/tooling-extension-api/lib/gradle-plugins-2.14.1.jar differ diff --git a/plugins/gradle/tooling-extension-api/lib/gradle-scala-2.13.jar b/plugins/gradle/tooling-extension-api/lib/gradle-scala-2.13.jar deleted file mode 100644 index 2d6c6b212abf..000000000000 Binary files a/plugins/gradle/tooling-extension-api/lib/gradle-scala-2.13.jar and /dev/null differ diff --git a/plugins/gradle/tooling-extension-api/lib/gradle-scala-2.14.1.jar b/plugins/gradle/tooling-extension-api/lib/gradle-scala-2.14.1.jar new file mode 100644 index 000000000000..f4a3348ce62c Binary files /dev/null and b/plugins/gradle/tooling-extension-api/lib/gradle-scala-2.14.1.jar differ diff --git a/plugins/gradle/tooling-extension-api/lib/gradle-testing-base-2.13.jar b/plugins/gradle/tooling-extension-api/lib/gradle-testing-base-2.14.1.jar similarity index 65% rename from plugins/gradle/tooling-extension-api/lib/gradle-testing-base-2.13.jar rename to plugins/gradle/tooling-extension-api/lib/gradle-testing-base-2.14.1.jar index 263446382894..0a2e1ded6fde 100644 Binary files a/plugins/gradle/tooling-extension-api/lib/gradle-testing-base-2.13.jar and b/plugins/gradle/tooling-extension-api/lib/gradle-testing-base-2.14.1.jar differ diff --git a/plugins/gradle/tooling-extension-api/lib/gradle-testing-jvm-2.13.jar b/plugins/gradle/tooling-extension-api/lib/gradle-testing-jvm-2.14.1.jar similarity index 63% rename from plugins/gradle/tooling-extension-api/lib/gradle-testing-jvm-2.13.jar rename to plugins/gradle/tooling-extension-api/lib/gradle-testing-jvm-2.14.1.jar index 98f0c5985e34..8f893402dc00 100644 Binary files a/plugins/gradle/tooling-extension-api/lib/gradle-testing-jvm-2.13.jar and b/plugins/gradle/tooling-extension-api/lib/gradle-testing-jvm-2.14.1.jar differ diff --git a/plugins/gradle/tooling-extension-impl/gradle-tooling-extension-impl.iml b/plugins/gradle/tooling-extension-impl/gradle-tooling-extension-impl.iml index 6fa4f7c53e8d..b9d59105ec97 100644 --- a/plugins/gradle/tooling-extension-impl/gradle-tooling-extension-impl.iml +++ b/plugins/gradle/tooling-extension-impl/gradle-tooling-extension-impl.iml @@ -25,24 +25,24 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + - - + + diff --git a/plugins/gradle/tooling-extension-impl/lib/gradle-ear-2.13.jar b/plugins/gradle/tooling-extension-impl/lib/gradle-ear-2.13.jar deleted file mode 100644 index 8b329f88fa18..000000000000 Binary files a/plugins/gradle/tooling-extension-impl/lib/gradle-ear-2.13.jar and /dev/null differ diff --git a/plugins/gradle/tooling-extension-impl/lib/gradle-ear-2.14.1.jar b/plugins/gradle/tooling-extension-impl/lib/gradle-ear-2.14.1.jar new file mode 100644 index 000000000000..7c8ba4588e9e Binary files /dev/null and b/plugins/gradle/tooling-extension-impl/lib/gradle-ear-2.14.1.jar differ diff --git a/plugins/gradle/tooling-extension-impl/lib/gradle-reporting-2.13.jar b/plugins/gradle/tooling-extension-impl/lib/gradle-reporting-2.14.1.jar similarity index 80% rename from plugins/gradle/tooling-extension-impl/lib/gradle-reporting-2.13.jar rename to plugins/gradle/tooling-extension-impl/lib/gradle-reporting-2.14.1.jar index 21ede409d436..cb30e5b26550 100644 Binary files a/plugins/gradle/tooling-extension-impl/lib/gradle-reporting-2.13.jar and b/plugins/gradle/tooling-extension-impl/lib/gradle-reporting-2.14.1.jar differ diff --git a/plugins/gradle/tooling-extension-impl/src/org/jetbrains/plugins/gradle/tooling/internal/StubIdeaModule.java b/plugins/gradle/tooling-extension-impl/src/org/jetbrains/plugins/gradle/tooling/internal/StubIdeaModule.java deleted file mode 100644 index 64cffb6728e6..000000000000 --- a/plugins/gradle/tooling-extension-impl/src/org/jetbrains/plugins/gradle/tooling/internal/StubIdeaModule.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2000-2014 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.jetbrains.plugins.gradle.tooling.internal; - -import org.gradle.tooling.model.DomainObjectSet; -import org.gradle.tooling.model.GradleProject; -import org.gradle.tooling.model.HierarchicalElement; -import org.gradle.tooling.model.UnsupportedMethodException; -import org.gradle.tooling.model.idea.*; - -import java.io.Serializable; - -/** - * @author Vladislav.Soroka - * @since 11/25/13 - */ -public class StubIdeaModule implements IdeaModule, Serializable { - - private final String name; - - public StubIdeaModule(String name) { - this.name = name; - } - - @Override - public IdeaJavaLanguageSettings getJavaLanguageSettings() throws UnsupportedMethodException { - throw new UnsupportedOperationException(); - } - - @Override - public DomainObjectSet getContentRoots() { - throw new UnsupportedOperationException(); - } - - @Override - public GradleProject getGradleProject() { - throw new UnsupportedOperationException(); - } - - @Override - public IdeaProject getParent() { - throw new UnsupportedOperationException(); - } - - @Override - public DomainObjectSet getChildren() { - throw new UnsupportedOperationException(); - } - - @Override - public IdeaProject getProject() { - throw new UnsupportedOperationException(); - } - - @Override - public IdeaCompilerOutput getCompilerOutput() { - throw new UnsupportedOperationException(); - } - - @Override - public DomainObjectSet getDependencies() { - throw new UnsupportedOperationException(); - } - - @Override - public String getName() { - return name; - } - - @Override - public String getDescription() { - throw new UnsupportedOperationException(); - } -} diff --git a/plugins/gradle/tooling-extension-impl/testSources/org/jetbrains/plugins/gradle/tooling/builder/AbstractModelBuilderTest.java b/plugins/gradle/tooling-extension-impl/testSources/org/jetbrains/plugins/gradle/tooling/builder/AbstractModelBuilderTest.java index a96fa48f15af..251bc4fabfb0 100644 --- a/plugins/gradle/tooling-extension-impl/testSources/org/jetbrains/plugins/gradle/tooling/builder/AbstractModelBuilderTest.java +++ b/plugins/gradle/tooling-extension-impl/testSources/org/jetbrains/plugins/gradle/tooling/builder/AbstractModelBuilderTest.java @@ -69,7 +69,7 @@ public abstract class AbstractModelBuilderTest { public static final Object[][] SUPPORTED_GRADLE_VERSIONS = { {"1.9"}, /*{"1.10"}, {"1.11"},*/ {"1.12"}, - {"2.0"}, /*{"2.1"}, {"2.2"} , {"2.3"}, {"2.4"}, */{"2.5"}, /*{"2.6"}, {"2.7"}, {"2.8"},*/ {"2.9"}, /*{"2.10"}, {"2.11"}, {"2.12"},*/ {"2.13"} + {"2.0"}, /*{"2.1"}, {"2.2"} , {"2.3"}, {"2.4"}, */{"2.5"}, /*{"2.6"}, {"2.7"}, {"2.8"},*/ {"2.9"}, /*{"2.10"}, {"2.11"}, {"2.12"}, {"2.13"}, */{"2.14.1"} }; public static final String BASE_GRADLE_VERSION = String.valueOf(SUPPORTED_GRADLE_VERSIONS[SUPPORTED_GRADLE_VERSIONS.length - 1][0]); diff --git a/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_13x13.png b/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_13x13.png index a324e2d812ed..41dbc3bf9926 100644 Binary files a/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_13x13.png and b/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_13x13.png differ diff --git a/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_13x13.svg b/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_13x13.svg new file mode 100644 index 000000000000..caa710324d8e --- /dev/null +++ b/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_13x13.svg @@ -0,0 +1,9 @@ + + groovy_13x13 + + + + + + + diff --git a/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_13x13@2x.png b/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_13x13@2x.png index 43a336bca6b3..fbc12f2e8efa 100644 Binary files a/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_13x13@2x.png and b/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_13x13@2x.png differ diff --git a/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_13x13@2x.svg b/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_13x13@2x.svg new file mode 100644 index 000000000000..fc1951d4a8e0 --- /dev/null +++ b/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_13x13@2x.svg @@ -0,0 +1,9 @@ + + groovy_13x13@2x + + + + + + + diff --git a/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_16x16.png b/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_16x16.png index f79d447efb07..c0228fc87acb 100644 Binary files a/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_16x16.png and b/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_16x16.png differ diff --git a/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_16x16.svg b/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_16x16.svg new file mode 100644 index 000000000000..ca8eeb16a4ab --- /dev/null +++ b/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_16x16.svg @@ -0,0 +1,9 @@ + + groovy_16x16 + + + + + + + diff --git a/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_16x16@2x.png b/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_16x16@2x.png index 127211ed0bd1..a1ec5ee02f33 100644 Binary files a/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_16x16@2x.png and b/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_16x16@2x.png differ diff --git a/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_16x16@2x.svg b/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_16x16@2x.svg new file mode 100644 index 000000000000..31ce6ff6e76a --- /dev/null +++ b/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_16x16@2x.svg @@ -0,0 +1,9 @@ + + groovy_16x16@2x + + + + + + + diff --git a/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_32x32.png b/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_32x32.png index 127211ed0bd1..a1ec5ee02f33 100644 Binary files a/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_32x32.png and b/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_32x32.png differ diff --git a/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_32x32.svg b/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_32x32.svg new file mode 100644 index 000000000000..a26054e96244 --- /dev/null +++ b/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_32x32.svg @@ -0,0 +1,9 @@ + + groovy_32x32 + + + + + + + diff --git a/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_32x32@2x.png b/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_32x32@2x.png index 00d0a8a28f9c..8b994640f787 100644 Binary files a/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_32x32@2x.png and b/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_32x32@2x.png differ diff --git a/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_32x32@2x.svg b/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_32x32@2x.svg new file mode 100644 index 000000000000..1dc2234e8f53 --- /dev/null +++ b/plugins/groovy/groovy-psi/resources/icons/groovy/groovy_32x32@2x.svg @@ -0,0 +1,9 @@ + + groovy_32x32@2x + + + + + + + diff --git a/plugins/groovy/groovy-psi/resources/icons/mvc/action_method.png b/plugins/groovy/groovy-psi/resources/icons/mvc/action_method.png index f9c6e5c64d85..fddefdcd172d 100644 Binary files a/plugins/groovy/groovy-psi/resources/icons/mvc/action_method.png and b/plugins/groovy/groovy-psi/resources/icons/mvc/action_method.png differ diff --git a/plugins/groovy/groovy-psi/resources/icons/mvc/action_method@2x.png b/plugins/groovy/groovy-psi/resources/icons/mvc/action_method@2x.png index 9092e694173a..0d12b369c0ce 100644 Binary files a/plugins/groovy/groovy-psi/resources/icons/mvc/action_method@2x.png and b/plugins/groovy/groovy-psi/resources/icons/mvc/action_method@2x.png differ diff --git a/plugins/groovy/groovy-psi/resources/icons/mvc/config_folder_closed.png b/plugins/groovy/groovy-psi/resources/icons/mvc/config_folder_closed.png index 6a9e8e5f3340..ceb667ddd877 100644 Binary files a/plugins/groovy/groovy-psi/resources/icons/mvc/config_folder_closed.png and b/plugins/groovy/groovy-psi/resources/icons/mvc/config_folder_closed.png differ diff --git a/plugins/groovy/groovy-psi/resources/icons/mvc/config_folder_closed@2x.png b/plugins/groovy/groovy-psi/resources/icons/mvc/config_folder_closed@2x.png index 3bef8008ba3c..cd8a600527a5 100644 Binary files a/plugins/groovy/groovy-psi/resources/icons/mvc/config_folder_closed@2x.png and b/plugins/groovy/groovy-psi/resources/icons/mvc/config_folder_closed@2x.png differ diff --git a/plugins/groovy/groovy-psi/resources/icons/mvc/config_folder_closed@2x_dark.png b/plugins/groovy/groovy-psi/resources/icons/mvc/config_folder_closed@2x_dark.png deleted file mode 100644 index 04d2efbc4450..000000000000 Binary files a/plugins/groovy/groovy-psi/resources/icons/mvc/config_folder_closed@2x_dark.png and /dev/null differ diff --git a/plugins/groovy/groovy-psi/resources/icons/mvc/config_folder_closed_dark.png b/plugins/groovy/groovy-psi/resources/icons/mvc/config_folder_closed_dark.png deleted file mode 100644 index 4475d5e7e124..000000000000 Binary files a/plugins/groovy/groovy-psi/resources/icons/mvc/config_folder_closed_dark.png and /dev/null differ diff --git a/plugins/groovy/groovy-psi/resources/icons/mvc/controller.png b/plugins/groovy/groovy-psi/resources/icons/mvc/controller.png index c3e28a1b02f1..140506b52610 100644 Binary files a/plugins/groovy/groovy-psi/resources/icons/mvc/controller.png and b/plugins/groovy/groovy-psi/resources/icons/mvc/controller.png differ diff --git a/plugins/groovy/groovy-psi/resources/icons/mvc/controller@2x.png b/plugins/groovy/groovy-psi/resources/icons/mvc/controller@2x.png index b2cf4ebd0678..95efcf10f305 100644 Binary files a/plugins/groovy/groovy-psi/resources/icons/mvc/controller@2x.png and b/plugins/groovy/groovy-psi/resources/icons/mvc/controller@2x.png differ diff --git a/plugins/groovy/groovy-psi/resources/icons/mvc/domain_class.png b/plugins/groovy/groovy-psi/resources/icons/mvc/domain_class.png index 3963c9947b1b..f8dc55aced11 100644 Binary files a/plugins/groovy/groovy-psi/resources/icons/mvc/domain_class.png and b/plugins/groovy/groovy-psi/resources/icons/mvc/domain_class.png differ diff --git a/plugins/groovy/groovy-psi/resources/icons/mvc/domain_class@2x.png b/plugins/groovy/groovy-psi/resources/icons/mvc/domain_class@2x.png index dd393a002411..d29b2126339b 100644 Binary files a/plugins/groovy/groovy-psi/resources/icons/mvc/domain_class@2x.png and b/plugins/groovy/groovy-psi/resources/icons/mvc/domain_class@2x.png differ diff --git a/plugins/groovy/groovy-psi/resources/icons/mvc/groovy_mvc_plugin.png b/plugins/groovy/groovy-psi/resources/icons/mvc/groovy_mvc_plugin.png index cfae8c21d136..86377886a7ee 100644 Binary files a/plugins/groovy/groovy-psi/resources/icons/mvc/groovy_mvc_plugin.png and b/plugins/groovy/groovy-psi/resources/icons/mvc/groovy_mvc_plugin.png differ diff --git a/plugins/groovy/groovy-psi/resources/icons/mvc/groovy_mvc_plugin@2x.png b/plugins/groovy/groovy-psi/resources/icons/mvc/groovy_mvc_plugin@2x.png index 2caeb1851053..a4dab7fae27a 100644 Binary files a/plugins/groovy/groovy-psi/resources/icons/mvc/groovy_mvc_plugin@2x.png and b/plugins/groovy/groovy-psi/resources/icons/mvc/groovy_mvc_plugin@2x.png differ diff --git a/plugins/groovy/groovy-psi/resources/icons/mvc/groovy_mvc_plugin@2x_dark.png b/plugins/groovy/groovy-psi/resources/icons/mvc/groovy_mvc_plugin@2x_dark.png index 25692091f9f2..db7cb6ac507c 100644 Binary files a/plugins/groovy/groovy-psi/resources/icons/mvc/groovy_mvc_plugin@2x_dark.png and b/plugins/groovy/groovy-psi/resources/icons/mvc/groovy_mvc_plugin@2x_dark.png differ diff --git a/plugins/groovy/groovy-psi/resources/icons/mvc/groovy_mvc_plugin_dark.png b/plugins/groovy/groovy-psi/resources/icons/mvc/groovy_mvc_plugin_dark.png index 7cb96c39e34e..4f9a2ac51021 100644 Binary files a/plugins/groovy/groovy-psi/resources/icons/mvc/groovy_mvc_plugin_dark.png and b/plugins/groovy/groovy-psi/resources/icons/mvc/groovy_mvc_plugin_dark.png differ diff --git a/plugins/groovy/groovy-psi/resources/icons/mvc/modelsNode.png b/plugins/groovy/groovy-psi/resources/icons/mvc/modelsNode.png index b1d89f6fe649..a898cee4526b 100644 Binary files a/plugins/groovy/groovy-psi/resources/icons/mvc/modelsNode.png and b/plugins/groovy/groovy-psi/resources/icons/mvc/modelsNode.png differ diff --git a/plugins/groovy/groovy-psi/resources/icons/mvc/modelsNode@2x.png b/plugins/groovy/groovy-psi/resources/icons/mvc/modelsNode@2x.png index 3cb33651383d..2abf1161e338 100644 Binary files a/plugins/groovy/groovy-psi/resources/icons/mvc/modelsNode@2x.png and b/plugins/groovy/groovy-psi/resources/icons/mvc/modelsNode@2x.png differ diff --git a/plugins/groovy/groovy-psi/resources/icons/mvc/service.png b/plugins/groovy/groovy-psi/resources/icons/mvc/service.png index 1a71923a49b5..4c8668d22abd 100644 Binary files a/plugins/groovy/groovy-psi/resources/icons/mvc/service.png and b/plugins/groovy/groovy-psi/resources/icons/mvc/service.png differ diff --git a/plugins/javaFX/common-javaFX-plugin/src/org/jetbrains/plugins/javaFX/packaging/AbstractJavaFxPackager.java b/plugins/javaFX/common-javaFX-plugin/src/org/jetbrains/plugins/javaFX/packaging/AbstractJavaFxPackager.java index f836f73a93f6..ed57edd0f066 100644 --- a/plugins/javaFX/common-javaFX-plugin/src/org/jetbrains/plugins/javaFX/packaging/AbstractJavaFxPackager.java +++ b/plugins/javaFX/common-javaFX-plugin/src/org/jetbrains/plugins/javaFX/packaging/AbstractJavaFxPackager.java @@ -39,6 +39,7 @@ import java.util.List; public abstract class AbstractJavaFxPackager { private static final Logger LOG = Logger.getInstance("#" + AbstractJavaFxPackager.class.getName()); private static final String JB_JFX_JKS = "jb-jfx.jks"; + private static final String NATIVE_BUNDLES = "bundles"; //artifact description protected String getArtifactRootName() { @@ -137,7 +138,7 @@ public abstract class AbstractJavaFxPackager { private void copyLibraries(String zipPath, File tempUnzippedArtifactOutput) throws IOException { final File[] outFiles = new File(getArtifactOutputPath()).listFiles(); if (outFiles != null) { - final String[] generatedItems = new String[] {JB_JFX_JKS, zipPath + ".jar", zipPath + ".jnlp", zipPath + ".html"}; + final String[] generatedItems = new String[]{JB_JFX_JKS, zipPath + ".jar", zipPath + ".jnlp", zipPath + ".html", NATIVE_BUNDLES}; for (File file : outFiles) { final String fileName = file.getName(); if (ArrayUtilRt.find(generatedItems, fileName) < 0) { diff --git a/plugins/javaFX/javaFX-CE/testSrc/org/jetbrains/plugins/javaFX/fxml/JavaFXHighlightingTest.java b/plugins/javaFX/javaFX-CE/testSrc/org/jetbrains/plugins/javaFX/fxml/JavaFXHighlightingTest.java index b4123606a8da..4cc51f704f16 100644 --- a/plugins/javaFX/javaFX-CE/testSrc/org/jetbrains/plugins/javaFX/fxml/JavaFXHighlightingTest.java +++ b/plugins/javaFX/javaFX-CE/testSrc/org/jetbrains/plugins/javaFX/fxml/JavaFXHighlightingTest.java @@ -496,6 +496,11 @@ public class JavaFXHighlightingTest extends AbstractJavaFXTestCase { doTest(); } + public void testFxIdUsedInSameNode() throws Exception { + myFixture.configureByFiles(getTestName(true) + ".fxml", getTestName(false) + ".java"); + doTest(); + } + private void doTest() throws Exception { myFixture.testHighlighting(false, false, false, getTestName(true) + ".fxml"); } diff --git a/plugins/javaFX/testData/highlighting/FxIdUsedInSameNode.java b/plugins/javaFX/testData/highlighting/FxIdUsedInSameNode.java new file mode 100644 index 000000000000..4b90a9dbea2f --- /dev/null +++ b/plugins/javaFX/testData/highlighting/FxIdUsedInSameNode.java @@ -0,0 +1,7 @@ +import javafx.fxml.FXML; +import javafx.scene.layout.HBox; + +public class FxIdUsedInSameNode { + @FXML + private HBox navigationPane; +} \ No newline at end of file diff --git a/plugins/javaFX/testData/highlighting/fxIdUsedInSameNode.fxml b/plugins/javaFX/testData/highlighting/fxIdUsedInSameNode.fxml new file mode 100644 index 000000000000..b34ac49a9871 --- /dev/null +++ b/plugins/javaFX/testData/highlighting/fxIdUsedInSameNode.fxml @@ -0,0 +1,9 @@ + + + + + + + \ No newline at end of file diff --git a/plugins/maven/src/main/resources/images/childrenProjects.png b/plugins/maven/src/main/resources/images/childrenProjects.png index 5aac4685fe4e..c5604a09e279 100644 Binary files a/plugins/maven/src/main/resources/images/childrenProjects.png and b/plugins/maven/src/main/resources/images/childrenProjects.png differ diff --git a/plugins/maven/src/main/resources/images/childrenProjects_dark.png b/plugins/maven/src/main/resources/images/childrenProjects_dark.png index ac77c08c5d8e..8b3ed9488eec 100644 Binary files a/plugins/maven/src/main/resources/images/childrenProjects_dark.png and b/plugins/maven/src/main/resources/images/childrenProjects_dark.png differ diff --git a/plugins/maven/src/main/resources/images/executeMavenGoal.png b/plugins/maven/src/main/resources/images/executeMavenGoal.png index 14f11db4879c..803a47688526 100644 Binary files a/plugins/maven/src/main/resources/images/executeMavenGoal.png and b/plugins/maven/src/main/resources/images/executeMavenGoal.png differ diff --git a/plugins/maven/src/main/resources/images/executeMavenGoal@2x.png b/plugins/maven/src/main/resources/images/executeMavenGoal@2x.png index 68ce3addb4af..70d791e46512 100644 Binary files a/plugins/maven/src/main/resources/images/executeMavenGoal@2x.png and b/plugins/maven/src/main/resources/images/executeMavenGoal@2x.png differ diff --git a/plugins/maven/src/main/resources/images/mavenLogo.png b/plugins/maven/src/main/resources/images/mavenLogo.png index d9be9670ccee..ffd73991665e 100644 Binary files a/plugins/maven/src/main/resources/images/mavenLogo.png and b/plugins/maven/src/main/resources/images/mavenLogo.png differ diff --git a/plugins/maven/src/main/resources/images/mavenPlugin.png b/plugins/maven/src/main/resources/images/mavenPlugin.png index 42e013c8c1cb..1aef9e55400d 100644 Binary files a/plugins/maven/src/main/resources/images/mavenPlugin.png and b/plugins/maven/src/main/resources/images/mavenPlugin.png differ diff --git a/plugins/maven/src/main/resources/images/mavenPlugin_dark.png b/plugins/maven/src/main/resources/images/mavenPlugin_dark.png deleted file mode 100644 index fd04d870f033..000000000000 Binary files a/plugins/maven/src/main/resources/images/mavenPlugin_dark.png and /dev/null differ diff --git a/plugins/maven/src/main/resources/images/mavenProject.png b/plugins/maven/src/main/resources/images/mavenProject.png index 55b429bf32cc..8a5048772815 100644 Binary files a/plugins/maven/src/main/resources/images/mavenProject.png and b/plugins/maven/src/main/resources/images/mavenProject.png differ diff --git a/plugins/maven/src/main/resources/images/mavenProject_dark.png b/plugins/maven/src/main/resources/images/mavenProject_dark.png deleted file mode 100644 index f9892dfd000d..000000000000 Binary files a/plugins/maven/src/main/resources/images/mavenProject_dark.png and /dev/null differ diff --git a/plugins/maven/src/main/resources/images/modulesClosed.png b/plugins/maven/src/main/resources/images/modulesClosed.png index 82bb2cea2a81..92d26833084d 100644 Binary files a/plugins/maven/src/main/resources/images/modulesClosed.png and b/plugins/maven/src/main/resources/images/modulesClosed.png differ diff --git a/plugins/maven/src/main/resources/images/offlineMode.png b/plugins/maven/src/main/resources/images/offlineMode.png index 3276aca09875..11bae034687c 100644 Binary files a/plugins/maven/src/main/resources/images/offlineMode.png and b/plugins/maven/src/main/resources/images/offlineMode.png differ diff --git a/plugins/maven/src/main/resources/images/offlineMode_dark.png b/plugins/maven/src/main/resources/images/offlineMode_dark.png index aafab9158947..c1ee9b774596 100644 Binary files a/plugins/maven/src/main/resources/images/offlineMode_dark.png and b/plugins/maven/src/main/resources/images/offlineMode_dark.png differ diff --git a/plugins/maven/src/main/resources/images/parentProject.png b/plugins/maven/src/main/resources/images/parentProject.png index b3461b42b5f1..da93be6526c4 100644 Binary files a/plugins/maven/src/main/resources/images/parentProject.png and b/plugins/maven/src/main/resources/images/parentProject.png differ diff --git a/plugins/maven/src/main/resources/images/phase.png b/plugins/maven/src/main/resources/images/phase.png index 7e8b5eb705c3..fae789db206d 100644 Binary files a/plugins/maven/src/main/resources/images/phase.png and b/plugins/maven/src/main/resources/images/phase.png differ diff --git a/plugins/maven/src/main/resources/images/phasesClosed.png b/plugins/maven/src/main/resources/images/phasesClosed.png index 7604d83886e9..ceb667ddd877 100644 Binary files a/plugins/maven/src/main/resources/images/phasesClosed.png and b/plugins/maven/src/main/resources/images/phasesClosed.png differ diff --git a/plugins/maven/src/main/resources/images/pluginGoal.png b/plugins/maven/src/main/resources/images/pluginGoal.png index a86657c3e4ef..fc3bdcee1aba 100644 Binary files a/plugins/maven/src/main/resources/images/pluginGoal.png and b/plugins/maven/src/main/resources/images/pluginGoal.png differ diff --git a/plugins/maven/src/main/resources/images/pluginGoal_dark.png b/plugins/maven/src/main/resources/images/pluginGoal_dark.png deleted file mode 100644 index 6624a75173d0..000000000000 Binary files a/plugins/maven/src/main/resources/images/pluginGoal_dark.png and /dev/null differ diff --git a/plugins/maven/src/main/resources/images/profilesClosed.png b/plugins/maven/src/main/resources/images/profilesClosed.png index 5081a5c2ea27..21cbde4b8e48 100644 Binary files a/plugins/maven/src/main/resources/images/profilesClosed.png and b/plugins/maven/src/main/resources/images/profilesClosed.png differ diff --git a/plugins/maven/src/main/resources/images/profilesClosed_dark.png b/plugins/maven/src/main/resources/images/profilesClosed_dark.png deleted file mode 100644 index c4d1ec33df9e..000000000000 Binary files a/plugins/maven/src/main/resources/images/profilesClosed_dark.png and /dev/null differ diff --git a/plugins/maven/src/main/resources/images/toolWindowMaven.png b/plugins/maven/src/main/resources/images/toolWindowMaven.png index 6dd1711dad2a..c6e9655f4a15 100644 Binary files a/plugins/maven/src/main/resources/images/toolWindowMaven.png and b/plugins/maven/src/main/resources/images/toolWindowMaven.png differ diff --git a/plugins/maven/src/main/resources/images/toolWindowMaven@2x.png b/plugins/maven/src/main/resources/images/toolWindowMaven@2x.png index f77b3c6a7374..ab6f0dccb088 100644 Binary files a/plugins/maven/src/main/resources/images/toolWindowMaven@2x.png and b/plugins/maven/src/main/resources/images/toolWindowMaven@2x.png differ diff --git a/plugins/maven/src/main/resources/images/updateFolders.png b/plugins/maven/src/main/resources/images/updateFolders.png index 2190cc4b9c26..51715b3655be 100644 Binary files a/plugins/maven/src/main/resources/images/updateFolders.png and b/plugins/maven/src/main/resources/images/updateFolders.png differ diff --git a/plugins/properties/properties-psi-api/resources/icons/xmlProperties.png b/plugins/properties/properties-psi-api/resources/icons/xmlProperties.png index a9958c7311ad..d77e85478036 100644 Binary files a/plugins/properties/properties-psi-api/resources/icons/xmlProperties.png and b/plugins/properties/properties-psi-api/resources/icons/xmlProperties.png differ diff --git a/plugins/tasks/tasks-core/src/icons/jira.png b/plugins/tasks/tasks-core/src/icons/jira.png index f6f1f416b09f..cbf3252b80f3 100644 Binary files a/plugins/tasks/tasks-core/src/icons/jira.png and b/plugins/tasks/tasks-core/src/icons/jira.png differ diff --git a/plugins/tasks/tasks-core/src/icons/jira.svg b/plugins/tasks/tasks-core/src/icons/jira.svg new file mode 100644 index 000000000000..43b908763c02 --- /dev/null +++ b/plugins/tasks/tasks-core/src/icons/jira.svg @@ -0,0 +1,12 @@ + + jira + + + + + + + + + + diff --git a/plugins/tasks/tasks-core/src/icons/jira@2x.png b/plugins/tasks/tasks-core/src/icons/jira@2x.png index 3825b73930ff..351ed1724d46 100644 Binary files a/plugins/tasks/tasks-core/src/icons/jira@2x.png and b/plugins/tasks/tasks-core/src/icons/jira@2x.png differ diff --git a/plugins/tasks/tasks-core/src/icons/jira@2x.svg b/plugins/tasks/tasks-core/src/icons/jira@2x.svg new file mode 100644 index 000000000000..db74e396f896 --- /dev/null +++ b/plugins/tasks/tasks-core/src/icons/jira@2x.svg @@ -0,0 +1,12 @@ + + jira@2x + + + + + + + + + + diff --git a/python/helpers/pydev/_pydevd_bundle/pydevd_vars.py b/python/helpers/pydev/_pydevd_bundle/pydevd_vars.py index 448af57331fb..7db36f504fd0 100644 --- a/python/helpers/pydev/_pydevd_bundle/pydevd_vars.py +++ b/python/helpers/pydev/_pydevd_bundle/pydevd_vars.py @@ -570,9 +570,9 @@ def dataframe_to_xml(df, name, roffset, coffset, rows, cols, format): # need to precompute column bounds here before slicing! col_bounds = [None] * cols for col in range(cols): - dtype = df.dtypes.iloc[col].kind + dtype = df.dtypes.iloc[coffset + col].kind if dtype in "biufc": - cvalues = df.iloc[:, col] + cvalues = df.iloc[:, coffset + col] bounds = (cvalues.min(), cvalues.max()) else: bounds = (0, 0) diff --git a/python/ide/src/META-INF/pycharm-core.xml b/python/ide/src/META-INF/pycharm-core.xml index e61485813422..3f167adddb8f 100644 --- a/python/ide/src/META-INF/pycharm-core.xml +++ b/python/ide/src/META-INF/pycharm-core.xml @@ -110,15 +110,13 @@ - + + + + + - - - - - - - + diff --git a/python/psi-api/resources/icons/com/jetbrains/python/pythonFile.png b/python/psi-api/resources/icons/com/jetbrains/python/pythonFile.png index 3561cbba4967..118274999839 100644 Binary files a/python/psi-api/resources/icons/com/jetbrains/python/pythonFile.png and b/python/psi-api/resources/icons/com/jetbrains/python/pythonFile.png differ diff --git a/python/psi-api/resources/icons/com/jetbrains/python/pythonFile.svg b/python/psi-api/resources/icons/com/jetbrains/python/pythonFile.svg new file mode 100644 index 000000000000..95a2d511f5e6 --- /dev/null +++ b/python/psi-api/resources/icons/com/jetbrains/python/pythonFile.svg @@ -0,0 +1,13 @@ + + pythonFile + + + + + + + + + + + diff --git a/python/psi-api/resources/icons/com/jetbrains/python/pythonFile@2x.png b/python/psi-api/resources/icons/com/jetbrains/python/pythonFile@2x.png index 8045599a961f..4cb4cb5cea3f 100644 Binary files a/python/psi-api/resources/icons/com/jetbrains/python/pythonFile@2x.png and b/python/psi-api/resources/icons/com/jetbrains/python/pythonFile@2x.png differ diff --git a/python/psi-api/resources/icons/com/jetbrains/python/pythonFile@2x.svg b/python/psi-api/resources/icons/com/jetbrains/python/pythonFile@2x.svg new file mode 100644 index 000000000000..f38ee1fe5eed --- /dev/null +++ b/python/psi-api/resources/icons/com/jetbrains/python/pythonFile@2x.svg @@ -0,0 +1,13 @@ + + pythonFile@2x + + + + + + + + + + + diff --git a/python/src/com/jetbrains/python/codeInsight/controlflow/PyTypeAssertionEvaluator.java b/python/src/com/jetbrains/python/codeInsight/controlflow/PyTypeAssertionEvaluator.java index 1198388f6c5f..88ebebea1d39 100644 --- a/python/src/com/jetbrains/python/codeInsight/controlflow/PyTypeAssertionEvaluator.java +++ b/python/src/com/jetbrains/python/codeInsight/controlflow/PyTypeAssertionEvaluator.java @@ -136,19 +136,18 @@ public class PyTypeAssertionEvaluator extends PyRecursiveElementVisitor { } @Nullable - private static PyType createAssertionType(PyType initial, List types, boolean positive, TypeEvalContext context) { - final List members = new ArrayList<>(); - for (PyType t : types) { - members.add(transformTypeFromAssertion(t)); - } - final PyType union = PyUnionType.union(members); + private static PyType createAssertionType(@Nullable PyType initial, + @Nullable PyType suggested, + boolean positive, + @NotNull TypeEvalContext context) { + final PyType transformedType = transformTypeFromAssertion(suggested); if (positive) { - return union; + return transformedType; } else if (initial instanceof PyUnionType) { - return ((PyUnionType)initial).exclude(union, context); + return ((PyUnionType)initial).exclude(transformedType, context); } - else if (PyTypeChecker.match(union, initial, context)) { + else if (PyTypeChecker.match(transformedType, initial, context)) { return null; } return initial; @@ -177,9 +176,17 @@ public class PyTypeAssertionEvaluator extends PyRecursiveElementVisitor { final InstructionTypeCallback typeCallback = new InstructionTypeCallback() { @Override public PyType getType(TypeEvalContext context, @Nullable PsiElement anchor) { - final List types = new ArrayList<>(); - types.add(suggestedType.apply(context)); - return createAssertionType(context.getType(target), types, positive, context); + final PyType initial = context.getType(target); + final PyType suggested = suggestedType.apply(context); + + if (!PyUnionType.class.isInstance(initial) && + !PyTypeChecker.isUnknown(initial) && + PyTypeChecker.match(suggested, initial, context)) { + return initial; + } + else { + return createAssertionType(initial, suggested, positive, context); + } } }; diff --git a/python/testData/mover/class_afterUp.py b/python/testData/mover/class_afterUp.py index 7864db22ba35..710862786d3c 100644 --- a/python/testData/mover/class_afterUp.py +++ b/python/testData/mover/class_afterUp.py @@ -4,4 +4,4 @@ if condition: class C: pass class B(Exception): - b=1 + b=1 \ No newline at end of file diff --git a/python/testData/mover/lastComment1_afterDown.py b/python/testData/mover/lastComment1_afterDown.py index b6ff87fd824b..4c6a890dbcad 100644 --- a/python/testData/mover/lastComment1_afterDown.py +++ b/python/testData/mover/lastComment1_afterDown.py @@ -3,4 +3,4 @@ def f(): a = 1 else: a = 2 -#comment +#comment \ No newline at end of file diff --git a/python/testSrc/com/jetbrains/python/PyTypeTest.java b/python/testSrc/com/jetbrains/python/PyTypeTest.java index a8d51774e6cf..6a15d819d136 100644 --- a/python/testSrc/com/jetbrains/python/PyTypeTest.java +++ b/python/testSrc/com/jetbrains/python/PyTypeTest.java @@ -1221,6 +1221,20 @@ public class PyTypeTest extends PyTestCase { " expr = x\n"); } + // PY-20818 + public void testIsInstanceForSuperclass() { + doTest("B", + "class A:\n" + + " pass\n" + + "class B(A):\n" + + " def foo(self):\n" + + " pass\n" + + "def test():\n" + + " b = B()\n" + + " assert(isinstance(b, A))\n" + + " expr = b\n"); + } + private static List getTypeEvalContexts(@NotNull PyExpression element) { return ImmutableList.of(TypeEvalContext.codeAnalysis(element.getProject(), element.getContainingFile()).withTracing(), TypeEvalContext.userInitiated(element.getProject(), element.getContainingFile()).withTracing()); diff --git a/resources/src/idea/RichPlatformActions.xml b/resources/src/idea/RichPlatformActions.xml index 8b01f1bc4930..c631bd253008 100644 --- a/resources/src/idea/RichPlatformActions.xml +++ b/resources/src/idea/RichPlatformActions.xml @@ -389,7 +389,8 @@ - + + diff --git a/updater/src/com/intellij/updater/Runner.java b/updater/src/com/intellij/updater/Runner.java index 4c292f22c475..990b491b6e65 100644 --- a/updater/src/com/intellij/updater/Runner.java +++ b/updater/src/com/intellij/updater/Runner.java @@ -275,7 +275,10 @@ public class Runner { private static void apply(String jarFile, String destFolder) throws Exception { logger().info("Applying patch to the " + destFolder); - doInstall(jarFile, new ConsoleUpdaterUI(), destFolder); + final boolean success = doInstall(jarFile, new ConsoleUpdaterUI(), destFolder); + if (!success) { + System.exit(1); + } } private static boolean doInstall(String jarFile, UpdaterUI ui, String destFolder) throws OperationCancelledException {