1 19 20 package org.netbeans.modules.web.taglib; 21 22 import org.openide.loaders.*; 23 import org.openide.util.HelpCtx; 24 import org.openide.nodes.Node; 25 import org.openide.nodes.Children; 26 import org.openide.util.actions.SystemAction; 27 28 31 32 public class TLDNode extends DataNode { 33 34 private static final boolean debug = false; 35 36 public static final int TLD_NODE = 0; 37 public static final int TAG_NODE = 2; 38 public static final int ATTRIBUTES_NODE = 3; 39 public static final int ATTRIBUTE_NODE = 4; 40 public static final int TEI_NODE = 5; 41 public static final int VARIABLE_NODE = 6; 42 43 public static final String ICON_BASE_CLASSES = 47 "org/netbeans/modules/web/taglib/default"; public static final String ICON_BASE_DEFAULT = 49 "org/netbeans/modules/web/taglib/default"; 51 public static final String ICON_BASE_TLD = 52 "org/netbeans/modules/web/taglib/resources/tags"; public static final String ICON_BASE_TAG = 54 "org/netbeans/modules/web/taglib/resources/tag"; public static final String ICON_BASE_ATTRIBUTES = 56 "org/netbeans/modules/web/taglib/resources/attributes"; public static final String ICON_BASE_ATTRIBUTE = 58 "org/netbeans/modules/web/taglib/resources/attribute"; public static final String ICON_BASE_TEI = 60 "org/netbeans/modules/web/taglib/resources/variables"; public static final String ICON_BASE_VARIABLES = 62 "org/netbeans/modules/web/taglib/resources/variables"; public static final String ICON_BASE_VARIABLE = 64 "org/netbeans/modules/web/taglib/resources/variable"; 66 public TLDNode (final TLDDataObject dataObject) { 67 super(dataObject,Children.LEAF); 68 setIconBase(ICON_BASE_TLD); 69 } 70 71 76 protected SystemAction[] createActions () { 77 return null; 78 } 79 80 protected String getIconBase() { 81 return getIconBase(TLD_NODE); 82 } 83 84 public static String getIconBase(int type) { 85 switch (type) { 86 case TLD_NODE: 87 return ICON_BASE_TLD; 88 case TAG_NODE: 89 return ICON_BASE_TAG; 90 case ATTRIBUTES_NODE: 91 return ICON_BASE_ATTRIBUTES; 92 case ATTRIBUTE_NODE: 93 return ICON_BASE_ATTRIBUTE; 94 case TEI_NODE: 95 return ICON_BASE_TEI; 96 case VARIABLE_NODE: 97 return ICON_BASE_VARIABLE; 98 99 } 100 return ICON_BASE_DEFAULT; 101 } 102 103 public String getDisplayName() { 104 String dn = super.getDisplayName(); 105 return dn; 106 } 107 108 public boolean canDestroy() { 110 return true; 111 } 112 113 } 114 | Popular Tags |