show containing jar name of the class in a library
authorAlexey Kudravtsev <cdr@intellij.com>
Fri, 25 Jun 2010 07:09:31 +0000 (11:09 +0400)
committerAlexey Kudravtsev <cdr@intellij.com>
Fri, 25 Jun 2010 08:46:40 +0000 (12:46 +0400)
platform/lang-impl/src/com/intellij/ide/util/PsiElementModuleRenderer.java

index 41c3eec12e57988047bfd5c07f8f702563dc2f7c..cbbdb541b39dd833a6628b5a632deb64d615c1e7 100644 (file)
@@ -20,6 +20,7 @@ import com.intellij.openapi.module.Module;
 import com.intellij.openapi.module.ModuleUtil;
 import com.intellij.openapi.roots.*;
 import com.intellij.openapi.util.IconLoader;
+import com.intellij.openapi.vfs.JarFileSystem;
 import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.psi.PsiElement;
 import com.intellij.psi.PsiFile;
@@ -90,6 +91,10 @@ public class PsiElementModuleRenderer extends DefaultListCellRenderer{
                     break;
                   }
                 }
+                VirtualFile jar = JarFileSystem.getInstance().getVirtualFileForJar(vFile);
+                if (jar != null) {
+                  myText += " (" + jar.getName() + ")";
+                }
               } /*else {
               setIcon(IconUtilEx.getEmptyIcon(false));
               setText(value.toString());