This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 37549

Summary: Suggested method: FileUtil.getFileDisplayName
Product: platform Reporter: Jesse Glick <jglick>
Component: FilesystemsAssignee: rmatous <rmatous>
Severity: blocker CC: apireviews, mslama, phrebejk, rmatous
Priority: P1 Keywords: API, API_REVIEW_FAST
Version: 3.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 41535, 44151    
Attachments: Suggested patch

Description Jesse Glick 2003-11-26 17:59:12 UTC
See patch for Javadoc and so on. It seems that
this piece of logic is quite frequently used -
generating tool tips for documents, etc. Would be
nice to have it encapsulated in a standard utility
Comment 1 Jesse Glick 2003-11-26 17:59:44 UTC
Created attachment 12324 [details]
Suggested patch
Comment 2 Jesse Glick 2004-04-01 16:34:38 UTC
Should also check for archives explicitly, probably. Will commit
something like this to FolderNode.updateDisplayName for root folders.
Comment 3 Jesse Glick 2004-05-26 15:36:22 UTC
We need this, please fast-track. Should take half an hour.
Comment 4 rmatous 2004-05-27 16:16:08 UTC
Does it mean that I should agree and integrate ? Then it may be half
an hour. If I should follow the fast-track process then its common
that it takes a week.
Comment 5 Jesse Glick 2004-05-27 16:40:26 UTC
We can wait a week. I just meant that the actual patch should take a
half hour; very simple utility method.

If you like, I can supply an updated patch with unit test.

Might be nice to also specially handle JAR file objects to show e.g.

  java/lang/Object.class in /space/jdk1.5/jre/lib/rt.jar

(Currently it seems the display name of JarFileSystem gives only the
simple JAR name, but if it gave the full path to the JAR it would not
be necessary to do such a trick.)
Comment 6 Jesse Glick 2004-06-02 21:42:37 UTC
I changed JarFileSystem.displayName as noted.

The utility method would be useful in CloneableEditor.toolTip, etc.
Comment 7 Jesse Glick 2004-06-07 20:17:26 UTC
Well it's been a week, can it go in? If you prefer, reassign to me to
Comment 8 rmatous 2004-06-09 13:30:22 UTC
/cvs/openide/,v  <--
new revision: 1.149; previous revision: 1.148

/cvs/openide/api/doc/changes/apichanges.xml,v  <--  apichanges.xml
new revision: 1.208; previous revision: 1.207

/cvs/openide/src/org/openide/filesystems/,v  <--
new revision: 1.33; previous revision: 1.32

/cvs/openide/src/org/openide/filesystems/,v  <--
new revision: 1.100; previous revision: 1.99

new revision: 1.4; previous revision: 1.3

new revision: 1.15; previous revision: 1.14
Comment 9 Jesse Glick 2004-06-09 19:25:19 UTC
Thanks; I will commit some usages of the new method to various modules
that could use it that I know of.
Comment 10 Jesse Glick 2004-06-09 21:34:41 UTC

1.11 form/nbproject/project.xml
1.99 form/src/org/netbeans/modules/form/
1.2  image/nbproject/project.xml
1.43 image/src/org/netbeans/modules/image/
1.4  openide/loaders/nbproject/project.xml
1.11 openide/loaders/src/org/openide/loaders/
1.27 openide/loaders/src/org/openide/loaders/
1.14 openide/loaders/src/org/openide/loaders/
1.11 openide/loaders/src/org/openide/loaders/
1.16 openide/loaders/src/org/openide/text/
1.95 openide/src/org/openide/filesystems/
1.79 openide/src/org/openide/filesystems/
1.19 openide/src/org/openide/filesystems/
1.87 openide/src/org/openide/filesystems/
1.81 openide/src/org/openide/filesystems/
1.58 properties/
1.68 properties/src/org/netbeans/modules/properties/
1.69 properties/src/org/netbeans/modules/properties/
1.4  utilities/nbproject/project.xml
1.9  utilities/src/org/netbeans/modules/pdf/
1.15 utilities/src/org/netbeans/modules/search/
Comment 11 Petr Hrebejk 2004-06-10 15:01:22 UTC