Index: utilities/group/src/org/netbeans/modules/group/GroupShadow.java =================================================================== RCS file: /cvs/utilities/group/src/org/netbeans/modules/group/GroupShadow.java,v retrieving revision 1.1 diff -u -r1.1 GroupShadow.java --- utilities/group/src/org/netbeans/modules/group/GroupShadow.java 30 Oct 2002 16:29:08 -0000 1.1 +++ utilities/group/src/org/netbeans/modules/group/GroupShadow.java 25 Nov 2002 20:23:38 -0000 @@ -612,12 +612,24 @@ /** Gets display name. * @return display name */ public String getDisplayName() { + DataObject dataObject = getDataObject(); + + //TDB - attribute to disable (group) suffix, so Templates can + //use Jarda's group-of-one hack to avoid classloading + try { + Object o = dataObject.getPrimaryFile().getAttribute("usedisplayname"); //NOI18N + if ((o instanceof Boolean) && (o.equals (Boolean.TRUE))) { + return super.getDisplayName(); + } + } catch (Exception e) { + //okay, invalid fs or something + } + if (groupformat == null) { groupformat = new MessageFormat(GroupShadow.getLocalizedString("FMT_groupShadowName")); // NOI18N } String name = getName(); - DataObject dataObject = getDataObject(); String displayName = super.getDisplayName(); String argument0 = name == null ? "" : name; // NOI18N @@ -924,7 +936,19 @@ /** Gets display name. */ public String getDisplayName() { // DataObject obj = (DataObject) this.getCookie(DataObject.class); + + //Hack to allow a template using a __SomeTemplate__.java + //style name to use a localized display name FileObject primary = originalDatObj.getPrimaryFile(); + try { + Object o = primary.getAttribute("usedisplayname"); //NOI18N + if ((o instanceof Boolean) && (o.equals (Boolean.TRUE))) { + return originalDatObj.getNodeDelegate().getDisplayName(); + } + } catch (Exception e) { + //okay, invalid fs or something + } + String fullname = primary.getPackageNameExt ('/', '.'); int index = fullname.lastIndexOf('/'); String foldername;