Bug 37549 - Suggested method: FileUtil.getFileDisplayName
Suggested method: FileUtil.getFileDisplayName
Status: RESOLVED FIXED
Product: platform
Classification: Unclassified
Component: Filesystems
3.x
All All
: P1 (vote)
: 4.x
Assigned To: rmatous
issues@platform
: API, API_REVIEW_FAST
Depends on:
Blocks: 41535 44151
  Show dependency treegraph
 
Reported: 2003-11-26 17:59 UTC by Jesse Glick
Modified: 2008-12-22 23:57 UTC (History)
4 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments
Suggested patch (2.72 KB, patch)
2003-11-26 17:59 UTC, Jesse Glick
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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
method.
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
commit.
Comment 8 rmatous 2004-06-09 13:30:22 UTC
/cvs/openide/openide-spec-vers.properties,v  <-- 
openide-spec-vers.properties
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
done

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

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

/cvs/openide/test/unit/src/org/openide/filesystems/FileUtilTestHidden.java,v
 <--  FileUtilTestHidden.java
new revision: 1.4; previous revision: 1.3

/cvs/openide/test/unit/src/org/openide/filesystems/JarFileSystemTest.java,v
 <--  JarFileSystemTest.java
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
FYI:

1.11 form/nbproject/project.xml
1.99 form/src/org/netbeans/modules/form/FormDesigner.java
1.2  image/nbproject/project.xml
1.43 image/src/org/netbeans/modules/image/ImageViewer.java
1.4  openide/loaders/nbproject/project.xml
1.11 openide/loaders/src/org/openide/loaders/Bundle.properties
1.27 openide/loaders/src/org/openide/loaders/DataFolder.java
1.14 openide/loaders/src/org/openide/loaders/DataNode.java
1.11 openide/loaders/src/org/openide/loaders/DataShadow.java
1.16 openide/loaders/src/org/openide/text/DataEditorSupport.java
1.95 openide/src/org/openide/filesystems/AbstractFileObject.java
1.79 openide/src/org/openide/filesystems/AbstractFolder.java
1.19 openide/src/org/openide/filesystems/FileEvent.java
1.87 openide/src/org/openide/filesystems/FileObject.java
1.81 openide/src/org/openide/filesystems/FileSystem.java
1.58 properties/manifest.mf
1.68 properties/src/org/netbeans/modules/properties/Bundle.properties
1.71
properties/src/org/netbeans/modules/properties/PropertiesEditorSupport.java
1.34
properties/src/org/netbeans/modules/properties/PropertiesLocaleNode.java
1.69 properties/src/org/netbeans/modules/properties/PropertiesOpen.java
1.4  utilities/nbproject/project.xml
1.9  utilities/src/org/netbeans/modules/pdf/LinkProcessor.java
1.15 utilities/src/org/netbeans/modules/search/LocationInfoPanel.java
Comment 11 Petr Hrebejk 2004-06-10 15:01:22 UTC
also:
1.14 org.netbeans.modules.java.project.JavaTargetChooserPanelGUI.java
1.20 org.netbeans.modules.project.ui.SimpleTargetChooserPanelGUI.java


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo