From 190763261981eae5b615eeb4b16baa982fb83066 Mon Sep 17 00:00:00 2001 From: Anton Makeev Date: Mon, 12 Feb 2018 15:28:59 +0100 Subject: [PATCH] CPP-11991 Mark source files in the project view using overlay icons --- .../icons/src/modules/sourceRootFileLayer.png | Bin 0 -> 124 bytes .../src/modules/sourceRootFileLayer@2x.png | Bin 0 -> 152 bytes .../modules/sourceRootFileLayer@2x_dark.png | Bin 0 -> 152 bytes .../src/modules/sourceRootFileLayer_dark.png | Bin 0 -> 124 bytes .../JavaSourceRootEditHandlerBase.java | 22 ++++++------------ .../util/src/com/intellij/icons/AllIcons.java | 15 ++---------- 6 files changed, 9 insertions(+), 28 deletions(-) create mode 100644 platform/icons/src/modules/sourceRootFileLayer.png create mode 100644 platform/icons/src/modules/sourceRootFileLayer@2x.png create mode 100644 platform/icons/src/modules/sourceRootFileLayer@2x_dark.png create mode 100644 platform/icons/src/modules/sourceRootFileLayer_dark.png diff --git a/platform/icons/src/modules/sourceRootFileLayer.png b/platform/icons/src/modules/sourceRootFileLayer.png new file mode 100644 index 0000000000000000000000000000000000000000..696179ff579172d45ae6d125e7aadec7772a258b GIT binary patch literal 124 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`&YmugAr-fh6B?R2{+<_Y`etXx zut?H_Rl)aQwY)vYt?h3Hh*;9XVAJ8fWPgg&ebxsLQ0IiuZG5`Po literal 0 HcmV?d00001 diff --git a/platform/icons/src/modules/sourceRootFileLayer@2x_dark.png b/platform/icons/src/modules/sourceRootFileLayer@2x_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..39222429315d5598e8487f98b9b695dbd8d63e60 GIT binary patch literal 152 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=ffJcuyC{kcwN$2?rQu!sg{OB(^m& zD0IIKoAaChP)Rw7AJ`GGzA)PxgFGyU{wa%%n_&XCN+JL4A3eDPgg&ebxsLQ0E9R%@c;k- literal 0 HcmV?d00001 diff --git a/platform/icons/src/modules/sourceRootFileLayer_dark.png b/platform/icons/src/modules/sourceRootFileLayer_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..4a68431efbfd0ef6db1f80cd5a27ea2bb5349f8b GIT binary patch literal 124 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`&YmugAr-fh6B?M>zdjdz6E@GD zVUeTIcc`5dNI7fZGf7b)T{*igd4WZ3j63=GBh WA{fqAD@p^6WAJqKb6Mw<&;$TQ5G6+d literal 0 HcmV?d00001 diff --git a/platform/lang-impl/src/com/intellij/openapi/roots/ui/configuration/JavaSourceRootEditHandlerBase.java b/platform/lang-impl/src/com/intellij/openapi/roots/ui/configuration/JavaSourceRootEditHandlerBase.java index aafae0f15694..873c1f1ff60c 100644 --- a/platform/lang-impl/src/com/intellij/openapi/roots/ui/configuration/JavaSourceRootEditHandlerBase.java +++ b/platform/lang-impl/src/com/intellij/openapi/roots/ui/configuration/JavaSourceRootEditHandlerBase.java @@ -1,18 +1,4 @@ -/* - * 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. - */ +// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.openapi.roots.ui.configuration; import com.intellij.icons.AllIcons; @@ -45,6 +31,12 @@ public abstract class JavaSourceRootEditHandlerBase extends ModuleSourceRootEdit return properties.isForGeneratedSources() ? getGeneratedRootIcon() : getRootIcon(); } + @Nullable + @Override + public Icon getRootFileLayerIcon(@NotNull JavaSourceRootProperties properties) { + return AllIcons.Modules.SourceRootFileLayer; + } + @NotNull protected abstract Icon getGeneratedRootIcon(); diff --git a/platform/util/src/com/intellij/icons/AllIcons.java b/platform/util/src/com/intellij/icons/AllIcons.java index d790d5457306..625cd349c96b 100644 --- a/platform/util/src/com/intellij/icons/AllIcons.java +++ b/platform/util/src/com/intellij/icons/AllIcons.java @@ -1,16 +1,4 @@ -// Copyright 2000-2017 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. +// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.icons; import com.intellij.openapi.util.IconLoader; @@ -858,6 +846,7 @@ public class AllIcons { public static final Icon SetPackagePrefixRollover = IconLoader.getIcon("/modules/setPackagePrefixRollover.png"); // 9x9 public static final Icon SourceFolder = IconLoader.getIcon("/modules/sourceFolder.png"); // 16x16 public static final Icon SourceRoot = IconLoader.getIcon("/modules/sourceRoot.png"); // 16x16 + public static final Icon SourceRootFileLayer = IconLoader.getIcon("/modules/sourceRootFileLayer.png"); // 16x16 public static final Icon Sources = IconLoader.getIcon("/modules/sources.png"); // 16x16 public static final Icon Split = IconLoader.getIcon("/modules/split.png"); // 16x16 public static final Icon TestResourcesRoot = IconLoader.getIcon("/modules/testResourcesRoot.png"); // 16x16