1 package com
.intellij
.openapi
.roots
.ui
.configuration
.packaging
;
3 import com
.intellij
.openapi
.deployment
.ModuleLink
;
4 import com
.intellij
.openapi
.module
.Module
;
5 import com
.intellij
.openapi
.project
.ProjectBundle
;
6 import com
.intellij
.openapi
.util
.IconLoader
;
7 import com
.intellij
.ui
.ColoredTreeCellRenderer
;
8 import com
.intellij
.ui
.SimpleTextAttributes
;
9 import org
.jetbrains
.annotations
.NotNull
;
16 class PackedModuleOutputNode
extends ModuleOutputBaseNode
{
17 private static final Icon MODULE_JAR_ICON
= IconLoader
.getIcon("/nodes/moduleJar.png");
18 private final String myJarFileName
;
20 PackedModuleOutputNode(@NotNull ModuleLink moduleLink
, String jarFileName
, PackagingArtifact owner
) {
21 super(owner
, moduleLink
);
22 myJarFileName
= jarFileName
;
26 public String
getOutputFileName() {
30 public void render(@NotNull final ColoredTreeCellRenderer renderer
) {
31 Module module
= myModuleLink
.getModule();
32 renderer
.setIcon(MODULE_JAR_ICON
);
34 renderer
.append(myJarFileName
, getMainAttributes());
35 renderer
.append(getComment(module
.getName()), getCommentAttributes());
38 renderer
.append(myJarFileName
, SimpleTextAttributes
.ERROR_ATTRIBUTES
);
39 renderer
.append(getComment(myModuleLink
.getName()), getCommentAttributes());
43 private static String
getComment(final String name
) {
44 return " " + ProjectBundle
.message("node.text.packed.0.compile.output", name
);