Codebase list jd-gui / cb55392
Update tooltip on tabs emmanue1 4 years ago
26 changed file(s) with 103 addition(s) and 66 deletion(s). Raw diff Collapse all Expand all
4040 @SuppressWarnings("unchecked")
4141 public <T extends DefaultMutableTreeNode & ContainerEntryGettable & UriGettable> T make(API api, Container.Entry entry) {
4242 int lastSlashIndex = entry.getPath().lastIndexOf('/');
43 String name = entry.getPath().substring(lastSlashIndex+1);
44 return (T)new FileTreeNode(entry, new TreeNodeBean(name, CLASS_FILE_ICON), FACTORY);
43 String label = entry.getPath().substring(lastSlashIndex+1);
44 return (T)new FileTreeNode(entry, new TreeNodeBean(label, CLASS_FILE_ICON), FACTORY);
4545 }
4646
4747 protected static class Factory implements AbstractTypeFileTreeNodeFactoryProvider.PageAndTipFactory {
5353
5454 @Override
5555 public String makeTip(API api, Container.Entry entry) {
56 File file = new File(entry.getContainer().getRoot().getUri());
56 String location = new File(entry.getUri()).getPath();
5757 StringBuilder tip = new StringBuilder("<html>Location: ");
5858
59 tip.append(file.getPath());
59 tip.append(location);
6060 tip.append("<br>Java compiler version: ");
6161
6262 try (InputStream is = entry.getInputStream()) {
1515
1616 import javax.swing.*;
1717 import javax.swing.tree.DefaultMutableTreeNode;
18 import java.io.File;
1819
1920 public class CssFileTreeNodeFactoryProvider extends TextFileTreeNodeFactoryProvider {
2021 protected static final ImageIcon ICON = new ImageIcon(HtmlFileTreeNodeFactoryProvider.class.getClassLoader().getResource("org/jd/gui/images/css_obj.png"));
2526 @SuppressWarnings("unchecked")
2627 public <T extends DefaultMutableTreeNode & ContainerEntryGettable & UriGettable> T make(API api, Container.Entry entry) {
2728 int lastSlashIndex = entry.getPath().lastIndexOf("/");
28 String name = entry.getPath().substring(lastSlashIndex+1);
29 return (T)new TreeNode(entry, new TreeNodeBean(name, "Location: " + entry.getUri().getPath(), ICON));
29 String label = entry.getPath().substring(lastSlashIndex+1);
30 String location = new File(entry.getUri()).getPath();
31 return (T)new TreeNode(entry, new TreeNodeBean(label, "Location: " + location, ICON));
3032 }
3133
3234 protected static class TreeNode extends TextFileTreeNodeFactoryProvider.TreeNode {
1717
1818 import javax.swing.*;
1919 import javax.swing.tree.DefaultMutableTreeNode;
20 import java.io.File;
2021 import java.net.URI;
2122 import java.util.Collection;
2223
4142 }
4243
4344 String label = entry.getPath().substring(lastSlashIndex+1);
44 TreeNode node = new TreeNode(entry, new TreeNodeBean(label, getIcon(), getOpenIcon()));
45 String location = new File(entry.getUri()).getPath();
46 TreeNode node = new TreeNode(entry, new TreeNodeBean(label, "Location: " + location, getIcon(), getOpenIcon()));
4547
4648 if (entries.size() > 0) {
4749 // Add dummy node
4850 node.add(new DefaultMutableTreeNode());
4951 }
5052
51 return (T)node;
52 }
53 return (T)node;
54 }
5355
5456 public ImageIcon getIcon() { return ICON; }
5557 public ImageIcon getOpenIcon() { return OPEN_ICON; }
1515
1616 import javax.swing.*;
1717 import javax.swing.tree.DefaultMutableTreeNode;
18 import java.io.File;
1819
1920 public class DtdFileTreeNodeFactoryProvider extends TextFileTreeNodeFactoryProvider {
2021 protected static final ImageIcon ICON = new ImageIcon(DtdFileTreeNodeFactoryProvider.class.getClassLoader().getResource("org/jd/gui/images/dtd_obj.gif"));
2526 @SuppressWarnings("unchecked")
2627 public <T extends DefaultMutableTreeNode & ContainerEntryGettable & UriGettable> T make(API api, Container.Entry entry) {
2728 int lastSlashIndex = entry.getPath().lastIndexOf("/");
28 String name = entry.getPath().substring(lastSlashIndex+1);
29 return (T)new TreeNode(entry, new TreeNodeBean(name, "Location: " + entry.getUri().getPath(), ICON));
29 String label = entry.getPath().substring(lastSlashIndex+1);
30 String location = new File(entry.getUri()).getPath();
31 return (T)new TreeNode(entry, new TreeNodeBean(label, "Location: " + location, ICON));
3032 }
3133
3234 protected static class TreeNode extends TextFileTreeNodeFactoryProvider.TreeNode {
1414
1515 import javax.swing.*;
1616 import javax.swing.tree.DefaultMutableTreeNode;
17 import java.io.File;
1718
1819 public class EarFileTreeNodeFactoryProvider extends ZipFileTreeNodeFactoryProvider {
1920 protected static final ImageIcon ICON = new ImageIcon(JarFileTreeNodeFactoryProvider.class.getClassLoader().getResource("org/jd/gui/images/ear_obj.gif"));
2425 @SuppressWarnings("unchecked")
2526 public <T extends DefaultMutableTreeNode & ContainerEntryGettable & UriGettable> T make(API api, Container.Entry entry) {
2627 int lastSlashIndex = entry.getPath().lastIndexOf("/");
27 String name = entry.getPath().substring(lastSlashIndex+1);
28 T node = (T)new TreeNode(entry, "ear", new TreeNodeBean(name, ICON));
28 String label = entry.getPath().substring(lastSlashIndex+1);
29 String location = new File(entry.getUri()).getPath();
30 T node = (T)new TreeNode(entry, "ear", new TreeNodeBean(label, "Location: " + location, ICON));
2931 // Add dummy node
3032 node.add(new DefaultMutableTreeNode());
3133 return node;
1616
1717 import javax.swing.*;
1818 import javax.swing.tree.DefaultMutableTreeNode;
19 import java.io.File;
1920
2021 public class EjbJarXmlFileTreeNodeFactoryProvider extends FileTreeNodeFactoryProvider {
2122 protected static final ImageIcon ICON = new ImageIcon(ManifestFileTreeNodeFactoryProvider.class.getClassLoader().getResource("org/jd/gui/images/xml_obj.gif"));
2526 @Override
2627 @SuppressWarnings("unchecked")
2728 public <T extends DefaultMutableTreeNode & ContainerEntryGettable & UriGettable> T make(API api, Container.Entry entry) {
28 return (T)new TreeNode(entry, new TreeNodeBean("ejb-jar.xml", "Location: " + entry.getUri().getPath(), ICON));
29 String location = new File(entry.getUri()).getPath();
30 return (T)new TreeNode(entry, new TreeNodeBean("ejb-jar.xml", "Location: " + location, ICON));
2931 }
3032
3133 protected static class TreeNode extends FileTreeNodeFactoryProvider.TreeNode implements PageCreator {
1414
1515 import javax.swing.*;
1616 import javax.swing.tree.DefaultMutableTreeNode;
17 import java.io.File;
1718 import java.net.URI;
1819
1920 public class FileTreeNodeFactoryProvider extends AbstractTreeNodeFactoryProvider {
20 protected static final ImageIcon ICON = new ImageIcon(FileTreeNodeFactoryProvider.class.getClassLoader().getResource("org/jd/gui/images/file_plain_obj.png"));
21 protected static final ImageIcon ICON = new ImageIcon(FileTreeNodeFactoryProvider.class.getClassLoader().getResource("org/jd/gui/images/file_plain_obj.png"));
2122
2223 @Override public String[] getSelectors() { return appendSelectors("*:file:*"); }
2324
2526 @SuppressWarnings("unchecked")
2627 public <T extends DefaultMutableTreeNode & ContainerEntryGettable & UriGettable> T make(API api, Container.Entry entry) {
2728 int lastSlashIndex = entry.getPath().lastIndexOf('/');
28 String name = entry.getPath().substring(lastSlashIndex+1);
29 return (T)new TreeNode(entry, new TreeNodeBean(name, ICON));
30 }
29 String label = entry.getPath().substring(lastSlashIndex+1);
30 String location = new File(entry.getUri()).getPath();
31 return (T)new TreeNode(entry, new TreeNodeBean(label, "Location: " + location, ICON));
32 }
3133
3234 protected static class TreeNode extends DefaultMutableTreeNode implements ContainerEntryGettable, UriGettable {
3335 protected Container.Entry entry;
1515
1616 import javax.swing.*;
1717 import javax.swing.tree.DefaultMutableTreeNode;
18 import java.io.File;
1819
1920 public class HtmlFileTreeNodeFactoryProvider extends TextFileTreeNodeFactoryProvider {
2021 protected static final ImageIcon ICON = new ImageIcon(HtmlFileTreeNodeFactoryProvider.class.getClassLoader().getResource("org/jd/gui/images/html_obj.gif"));
2526 @SuppressWarnings("unchecked")
2627 public <T extends DefaultMutableTreeNode & ContainerEntryGettable & UriGettable> T make(API api, Container.Entry entry) {
2728 int lastSlashIndex = entry.getPath().lastIndexOf("/");
28 String name = entry.getPath().substring(lastSlashIndex+1);
29 return (T)new TreeNode(entry, new TreeNodeBean(name, "Location: " + entry.getUri().getPath(), ICON));
29 String label = entry.getPath().substring(lastSlashIndex+1);
30 String location = new File(entry.getUri()).getPath();
31 return (T)new TreeNode(entry, new TreeNodeBean(label, "Location: " + location, ICON));
3032 }
3133
3234 protected static class TreeNode extends TextFileTreeNodeFactoryProvider.TreeNode {
1616 import javax.swing.*;
1717 import javax.swing.tree.DefaultMutableTreeNode;
1818 import java.awt.*;
19 import java.io.File;
1920 import java.io.IOException;
2021 import java.io.InputStream;
2122 import java.net.URI;
2930 @SuppressWarnings("unchecked")
3031 public <T extends DefaultMutableTreeNode & ContainerEntryGettable & UriGettable> T make(API api, Container.Entry entry) {
3132 int lastSlashIndex = entry.getPath().lastIndexOf("/");
32 String name = entry.getPath().substring(lastSlashIndex+1);
33 return (T)new TreeNode(entry, new TreeNodeBean(name, "Location: " + entry.getUri().getPath(), ICON));
33 String label = entry.getPath().substring(lastSlashIndex+1);
34 String location = new File(entry.getUri()).getPath();
35 return (T)new TreeNode(entry, new TreeNodeBean(label, "Location: " + location, ICON));
3436 }
3537
3638 protected static class TreeNode extends FileTreeNodeFactoryProvider.TreeNode implements PageCreator {
1515
1616 import javax.swing.*;
1717 import javax.swing.tree.DefaultMutableTreeNode;
18 import java.io.File;
1819 import java.util.Collection;
1920
2021 public class JarFileTreeNodeFactoryProvider extends ZipFileTreeNodeFactoryProvider {
2728 @SuppressWarnings("unchecked")
2829 public <T extends DefaultMutableTreeNode & ContainerEntryGettable & UriGettable> T make(API api, Container.Entry entry) {
2930 int lastSlashIndex = entry.getPath().lastIndexOf("/");
30 String name = entry.getPath().substring(lastSlashIndex+1);
31 String label = entry.getPath().substring(lastSlashIndex+1);
32 String location = new File(entry.getUri()).getPath();
3133 ImageIcon icon = isAEjbModule(entry) ? EJB_FILE_ICON : JAR_FILE_ICON;
32 T node = (T)new TreeNode(entry, "jar", new TreeNodeBean(name, icon));
34 T node = (T)new TreeNode(entry, "jar", new TreeNodeBean(label, "Location: " + location, icon));
3335 // Add dummy node
3436 node.add(new DefaultMutableTreeNode());
3537 return node;
36 }
38 }
3739
3840 protected static boolean isAEjbModule(Container.Entry entry) {
3941 Collection<Container.Entry> children = entry.getChildren();
2727 @SuppressWarnings("unchecked")
2828 public <T extends DefaultMutableTreeNode & ContainerEntryGettable & UriGettable> T make(API api, Container.Entry entry) {
2929 int lastSlashIndex = entry.getPath().lastIndexOf('/');
30 String name = entry.getPath().substring(lastSlashIndex+1);
31
32 return (T)new FileTreeNode(entry, new TreeNodeBean(name, JAVA_FILE_ICON), FACTORY);
30 String label = entry.getPath().substring(lastSlashIndex+1);
31 String location = new File(entry.getUri()).getPath();
32 return (T)new FileTreeNode(entry, new TreeNodeBean(label, "Location: " + location, JAVA_FILE_ICON), FACTORY);
3333 }
3434
3535 protected static class Factory implements AbstractTypeFileTreeNodeFactoryProvider.PageAndTipFactory {
1515
1616 import javax.swing.*;
1717 import javax.swing.tree.DefaultMutableTreeNode;
18 import java.io.File;
1819
1920 public class JavascriptFileTreeNodeFactoryProvider extends TextFileTreeNodeFactoryProvider {
2021 protected static final ImageIcon ICON = new ImageIcon(JavascriptFileTreeNodeFactoryProvider.class.getClassLoader().getResource("org/jd/gui/images/js_obj.png"));
2425 @SuppressWarnings("unchecked")
2526 public <T extends DefaultMutableTreeNode & ContainerEntryGettable & UriGettable> T make(API api, Container.Entry entry) {
2627 int lastSlashIndex = entry.getPath().lastIndexOf("/");
27 String name = entry.getPath().substring(lastSlashIndex+1);
28 return (T)new TreeNode(entry, new TreeNodeBean(name, "Location: " + entry.getUri().getPath(), ICON));
28 String label = entry.getPath().substring(lastSlashIndex+1);
29 String location = new File(entry.getUri()).getPath();
30 return (T)new TreeNode(entry, new TreeNodeBean(label, "Location: " + location, ICON));
2931 }
3032
3133 protected static class TreeNode extends TextFileTreeNodeFactoryProvider.TreeNode {
1010 import org.jd.gui.api.feature.ContainerEntryGettable;
1111 import org.jd.gui.api.feature.UriGettable;
1212 import org.jd.gui.api.model.Container;
13 import org.jd.gui.spi.TreeNodeFactory;
1413 import org.jd.gui.view.data.TreeNodeBean;
1514
16 import javax.swing.*;
1715 import javax.swing.tree.DefaultMutableTreeNode;
16 import java.io.File;
1817
1918 public class JmodFileTreeNodeFactoryProvider extends ZipFileTreeNodeFactoryProvider {
2019 @Override public String[] getSelectors() { return appendSelectors("*:file:*.jmod"); }
2322 @SuppressWarnings("unchecked")
2423 public <T extends DefaultMutableTreeNode & ContainerEntryGettable & UriGettable> T make(API api, Container.Entry entry) {
2524 int lastSlashIndex = entry.getPath().lastIndexOf("/");
26 String name = entry.getPath().substring(lastSlashIndex+1);
27
28
29
30 T node = (T)new TreeNode(entry, "generic", new TreeNodeBean(name, ICON));
31
32
33
25 String label = entry.getPath().substring(lastSlashIndex+1);
26 String location = new File(entry.getUri()).getPath();
27 T node = (T)new TreeNode(entry, "generic", new TreeNodeBean(label, "Location: " + location, ICON));
3428 // Add dummy node
3529 node.add(new DefaultMutableTreeNode());
36
37
38
3930 return node;
4031 }
4132 }
1515
1616 import javax.swing.*;
1717 import javax.swing.tree.DefaultMutableTreeNode;
18 import java.io.File;
1819
1920 public class JsonFileTreeNodeFactoryProvider extends TextFileTreeNodeFactoryProvider {
2021 protected static final ImageIcon ICON = new ImageIcon(JsonFileTreeNodeFactoryProvider.class.getClassLoader().getResource("org/jd/gui/images/ascii_obj.png"));
2526 @SuppressWarnings("unchecked")
2627 public <T extends DefaultMutableTreeNode & ContainerEntryGettable & UriGettable> T make(API api, Container.Entry entry) {
2728 int lastSlashIndex = entry.getPath().lastIndexOf("/");
28 String name = entry.getPath().substring(lastSlashIndex+1);
29 return (T)new TreeNode(entry, new TreeNodeBean(name, "Location: " + entry.getUri().getPath(), ICON));
29 String label = entry.getPath().substring(lastSlashIndex+1);
30 String location = new File(entry.getUri()).getPath();
31 return (T)new TreeNode(entry, new TreeNodeBean(label, "Location: " + location, ICON));
3032 }
3133
3234 protected static class TreeNode extends TextFileTreeNodeFactoryProvider.TreeNode {
1515
1616 import javax.swing.*;
1717 import javax.swing.tree.DefaultMutableTreeNode;
18 import java.io.File;
1819
1920 public class JspFileTreeNodeFactoryProvider extends TextFileTreeNodeFactoryProvider {
2021 protected static final ImageIcon ICON = new ImageIcon(HtmlFileTreeNodeFactoryProvider.class.getClassLoader().getResource("org/jd/gui/images/html_obj.gif"));
2526 @SuppressWarnings("unchecked")
2627 public <T extends DefaultMutableTreeNode & ContainerEntryGettable & UriGettable> T make(API api, Container.Entry entry) {
2728 int lastSlashIndex = entry.getPath().lastIndexOf("/");
28 String name = entry.getPath().substring(lastSlashIndex+1);
29 return (T)new TreeNode(entry, new TreeNodeBean(name, "Location: " + entry.getUri().getPath(), ICON));
29 String label = entry.getPath().substring(lastSlashIndex+1);
30 String location = new File(entry.getUri()).getPath();
31 return (T)new TreeNode(entry, new TreeNodeBean(label, "Location: " + location, ICON));
3032 }
3133
3234 protected static class TreeNode extends TextFileTreeNodeFactoryProvider.TreeNode {
1616
1717 import javax.swing.*;
1818 import javax.swing.tree.DefaultMutableTreeNode;
19 import java.io.File;
1920
2021 public class ManifestFileTreeNodeFactoryProvider extends FileTreeNodeFactoryProvider {
2122 protected static final ImageIcon ICON = new ImageIcon(ManifestFileTreeNodeFactoryProvider.class.getClassLoader().getResource("org/jd/gui/images/manifest_obj.png"));
2526 @Override
2627 @SuppressWarnings("unchecked")
2728 public <T extends DefaultMutableTreeNode & ContainerEntryGettable & UriGettable> T make(API api, Container.Entry entry) {
28 return (T)new TreeNode(entry, new TreeNodeBean("MANIFEST.MF", "Location: " + entry.getUri().getPath(), ICON));
29 String location = new File(entry.getUri()).getPath();
30 return (T)new TreeNode(entry, new TreeNodeBean("MANIFEST.MF", "Location: " + location, ICON));
2931 }
3032
3133 protected static class TreeNode extends FileTreeNodeFactoryProvider.TreeNode implements PageCreator {
1616
1717 import javax.swing.*;
1818 import javax.swing.tree.DefaultMutableTreeNode;
19 import java.io.File;
1920 import java.util.regex.Pattern;
2021
2122 public class MetainfServiceFileTreeNodeFactoryProvider extends FileTreeNodeFactoryProvider {
3536 @SuppressWarnings("unchecked")
3637 public <T extends DefaultMutableTreeNode & ContainerEntryGettable & UriGettable> T make(API api, Container.Entry entry) {
3738 int lastSlashIndex = entry.getPath().lastIndexOf("/");
38 String name = entry.getPath().substring(lastSlashIndex+1);
39 return (T)new TreeNode(entry, new TreeNodeBean(name, "Location: " + entry.getUri().getPath(), ICON));
39 String label = entry.getPath().substring(lastSlashIndex+1);
40 String location = new File(entry.getUri()).getPath();
41 return (T)new TreeNode(entry, new TreeNodeBean(label, "Location: " + location, ICON));
4042 }
4143
4244 protected static class TreeNode extends FileTreeNodeFactoryProvider.TreeNode implements PageCreator {
1515
1616 import javax.swing.*;
1717 import javax.swing.tree.DefaultMutableTreeNode;
18 import java.io.File;
1819 import java.util.Collection;
1920
2021 public class PackageTreeNodeFactoryProvider extends DirectoryTreeNodeFactoryProvider {
3738 }
3839
3940 String label = entry.getPath().substring(lastSlashIndex+1).replace("/", ".");
40 T node = (T)new TreeNode(entry, new TreeNodeBean(label, getIcon(), getOpenIcon()));
41 String location = new File(entry.getUri()).getPath();
42 T node = (T)new TreeNode(entry, new TreeNodeBean(label, "Location: " + location, getIcon(), getOpenIcon()));
4143
4244 if (entries.size() > 0) {
4345 // Add dummy node
1515
1616 import javax.swing.*;
1717 import javax.swing.tree.DefaultMutableTreeNode;
18 import java.io.File;
1819
1920 public class PropertiesFileTreeNodeFactoryProvider extends TextFileTreeNodeFactoryProvider {
2021 protected static final ImageIcon ICON = new ImageIcon(PropertiesFileTreeNodeFactoryProvider.class.getClassLoader().getResource("org/jd/gui/images/ascii_obj.png"));
2526 @SuppressWarnings("unchecked")
2627 public <T extends DefaultMutableTreeNode & ContainerEntryGettable & UriGettable> T make(API api, Container.Entry entry) {
2728 int lastSlashIndex = entry.getPath().lastIndexOf("/");
28 String name = entry.getPath().substring(lastSlashIndex+1);
29 return (T)new TreeNode(entry, new TreeNodeBean(name, "Location: " + entry.getUri().getPath(), ICON));
29 String label = entry.getPath().substring(lastSlashIndex+1);
30 String location = new File(entry.getUri()).getPath();
31 return (T)new TreeNode(entry, new TreeNodeBean(label, "Location: " + location, ICON));
3032 }
3133
3234 protected static class TreeNode extends TextFileTreeNodeFactoryProvider.TreeNode {
1515
1616 import javax.swing.*;
1717 import javax.swing.tree.DefaultMutableTreeNode;
18 import java.io.File;
1819
1920 public class SqlFileTreeNodeFactoryProvider extends TextFileTreeNodeFactoryProvider {
2021 protected static final ImageIcon ICON = new ImageIcon(SqlFileTreeNodeFactoryProvider.class.getClassLoader().getResource("org/jd/gui/images/sql_obj.png"));
2526 @SuppressWarnings("unchecked")
2627 public <T extends DefaultMutableTreeNode & ContainerEntryGettable & UriGettable> T make(API api, Container.Entry entry) {
2728 int lastSlashIndex = entry.getPath().lastIndexOf("/");
28 String name = entry.getPath().substring(lastSlashIndex+1);
29 return (T)new TreeNode(entry, new TreeNodeBean(name, "Location: " + entry.getUri().getPath(), ICON));
29 String label = entry.getPath().substring(lastSlashIndex+1);
30 String location = new File(entry.getUri()).getPath();
31 return (T)new TreeNode(entry, new TreeNodeBean(label, "Location: " + location, ICON));
3032 }
3133
3234 protected static class TreeNode extends TextFileTreeNodeFactoryProvider.TreeNode {
2121
2222 import javax.swing.*;
2323 import javax.swing.tree.DefaultMutableTreeNode;
24 import java.io.File;
2425 import java.io.IOException;
2526 import java.net.URI;
2627
4546 @SuppressWarnings("unchecked")
4647 public <T extends DefaultMutableTreeNode & ContainerEntryGettable & UriGettable> T make(API api, Container.Entry entry) {
4748 int lastSlashIndex = entry.getPath().lastIndexOf("/");
48 String name = entry.getPath().substring(lastSlashIndex+1);
49 return (T)new TreeNode(entry, new TreeNodeBean(name, "Location: " + entry.getUri().getPath(), ICON));
49 String label = entry.getPath().substring(lastSlashIndex+1);
50 String location = new File(entry.getUri()).getPath();
51 return (T)new TreeNode(entry, new TreeNodeBean(label, "Location: " + location, ICON));
5052 }
5153
5254 protected static class TreeNode extends FileTreeNodeFactoryProvider.TreeNode implements PageCreator {
1414
1515 import javax.swing.*;
1616 import javax.swing.tree.DefaultMutableTreeNode;
17 import java.io.File;
1718
1819 public class WarFileTreeNodeFactoryProvider extends ZipFileTreeNodeFactoryProvider {
1920 protected static final ImageIcon ICON = new ImageIcon(JarFileTreeNodeFactoryProvider.class.getClassLoader().getResource("org/jd/gui/images/war_obj.gif"));
2425 @SuppressWarnings("unchecked")
2526 public <T extends DefaultMutableTreeNode & ContainerEntryGettable & UriGettable> T make(API api, Container.Entry entry) {
2627 int lastSlashIndex = entry.getPath().lastIndexOf("/");
27 String name = entry.getPath().substring(lastSlashIndex+1);
28 T node = (T)new TreeNode(entry, "war", new TreeNodeBean(name, ICON));
28 String label = entry.getPath().substring(lastSlashIndex+1);
29 String location = new File(entry.getUri()).getPath();
30 T node = (T)new TreeNode(entry, "war", new TreeNodeBean(label, "Location: " + location, ICON));
2931 // Add dummy node
3032 node.add(new DefaultMutableTreeNode());
3133 return node;
1616
1717 import javax.swing.*;
1818 import javax.swing.tree.DefaultMutableTreeNode;
19 import java.io.File;
1920
2021 public class WebXmlFileTreeNodeFactoryProvider extends FileTreeNodeFactoryProvider {
2122 protected static final ImageIcon ICON = new ImageIcon(ManifestFileTreeNodeFactoryProvider.class.getClassLoader().getResource("org/jd/gui/images/xml_obj.gif"));
2526 @Override
2627 @SuppressWarnings("unchecked")
2728 public <T extends DefaultMutableTreeNode & ContainerEntryGettable & UriGettable> T make(API api, Container.Entry entry) {
28 return (T)new TreeNode(entry, new TreeNodeBean("web.xml", "Location: " + entry.getUri().getPath(), ICON));
29 String location = new File(entry.getUri()).getPath();
30 return (T)new TreeNode(entry, new TreeNodeBean("web.xml", "Location: " + location, ICON));
2931 }
3032
3133 protected static class TreeNode extends FileTreeNodeFactoryProvider.TreeNode implements PageCreator {
1515
1616 import javax.swing.*;
1717 import javax.swing.tree.DefaultMutableTreeNode;
18 import java.io.File;
1819
1920 public class XmlBasedFileTreeNodeFactoryProvider extends TextFileTreeNodeFactoryProvider {
2021 protected static final ImageIcon ICON = new ImageIcon(XmlBasedFileTreeNodeFactoryProvider.class.getClassLoader().getResource("org/jd/gui/images/xml_obj.gif"));
2526 @SuppressWarnings("unchecked")
2627 public <T extends DefaultMutableTreeNode & ContainerEntryGettable & UriGettable> T make(API api, Container.Entry entry) {
2728 int lastSlashIndex = entry.getPath().lastIndexOf("/");
28 String name = entry.getPath().substring(lastSlashIndex+1);
29 return (T)new TreeNode(entry, new TreeNodeBean(name, "Location: " + entry.getUri().getPath(), ICON));
29 String label = entry.getPath().substring(lastSlashIndex+1);
30 String location = new File(entry.getUri()).getPath();
31 return (T)new TreeNode(entry, new TreeNodeBean(label, "Location: " + location, ICON));
3032 }
3133
3234 static class TreeNode extends TextFileTreeNodeFactoryProvider.TreeNode {
1515
1616 import javax.swing.*;
1717 import javax.swing.tree.DefaultMutableTreeNode;
18 import java.io.File;
1819
1920 public class XmlFileTreeNodeFactoryProvider extends TextFileTreeNodeFactoryProvider {
2021 protected static final ImageIcon ICON = new ImageIcon(XmlFileTreeNodeFactoryProvider.class.getClassLoader().getResource("org/jd/gui/images/xml_obj.gif"));
2526 @SuppressWarnings("unchecked")
2627 public <T extends DefaultMutableTreeNode & ContainerEntryGettable & UriGettable> T make(API api, Container.Entry entry) {
2728 int lastSlashIndex = entry.getPath().lastIndexOf("/");
28 String name = entry.getPath().substring(lastSlashIndex+1);
29 return (T)new TreeNode(entry, new TreeNodeBean(name, "Location: " + entry.getUri().getPath(), ICON));
29 String label = entry.getPath().substring(lastSlashIndex+1);
30 String location = new File(entry.getUri()).getPath();
31 return (T)new TreeNode(entry, new TreeNodeBean(label, "Location: " + location, ICON));
3032 }
3133
3234 protected static class TreeNode extends TextFileTreeNodeFactoryProvider.TreeNode {
1515
1616 import javax.swing.*;
1717 import javax.swing.tree.DefaultMutableTreeNode;
18 import java.io.File;
1819
1920 public class ZipFileTreeNodeFactoryProvider extends DirectoryTreeNodeFactoryProvider {
2021 protected static final ImageIcon ICON = new ImageIcon(ZipFileTreeNodeFactoryProvider.class.getClassLoader().getResource("org/jd/gui/images/zip_obj.png"));
2526 @SuppressWarnings("unchecked")
2627 public <T extends DefaultMutableTreeNode & ContainerEntryGettable & UriGettable> T make(API api, Container.Entry entry) {
2728 int lastSlashIndex = entry.getPath().lastIndexOf("/");
28 String name = entry.getPath().substring(lastSlashIndex+1);
29 T node = (T)new TreeNode(entry, "generic", new TreeNodeBean(name, ICON));
29 String label = entry.getPath().substring(lastSlashIndex+1);
30 String location = new File(entry.getUri()).getPath();
31 T node = (T)new TreeNode(entry, "generic", new TreeNodeBean(label, "Location: " + location, ICON));
3032 // Add dummy node
3133 node.add(new DefaultMutableTreeNode());
3234 return node;