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 38051 - [ui]Shorten the display name of filesystem root nodes
Summary: [ui]Shorten the display name of filesystem root nodes
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 3.x
Hardware: PC All
: P2 blocker (vote)
Assignee: rmatous
Depends on:
Blocks: 35564
  Show dependency tree
Reported: 2003-12-12 15:16 UTC by iformanek
Modified: 2008-12-22 22:38 UTC (History)
2 users (show)

See Also:
Exception Reporter:

simple patch for trying out (999 bytes, patch)
2003-12-16 10:32 UTC, rmatous
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description iformanek 2003-12-12 15:16:24 UTC
Suggest to change the display name of filesystem 
root nodes to only display the last folder (as 
opposed to the full path), to minimize the 
horizontal width of the explorer window.

Specifically on windows, the width of the by 
default mounted filesystem, residing typically 
in "C:\Documents and 
makes the explorer unnecessarily show horizontal 
scrollbar and as a sideeffect weird behavior when 
expanding nodes. The full path of the filesystem 
is not an information that the user needs to see 
all the time.
Comment 1 rmatous 2003-12-15 15:08:03 UTC
I don't think its good idea to shorten display name of filesystems for
last folder name:

1/ For NB source code that means that almost all filesystems in
Repository will be presented as "src". 

2/ I can do it just for filesystems in org.openide.filesystems.

MountNode.CapNode.getDisplayName() shorten for fixed length ?
Comment 2 iformanek 2003-12-15 15:13:36 UTC
Indeed, there are always cases where this would not work. Ultimately, 
the question is if we are doing the IDE for ourselves (and thus it 
matters most if mounting of NetBeans sources works ideally) or doing 
IDE for Java developers, where most of theme would not hit this issue.

Can there be some solution that would work for both? Perhaps show 
last two folders? Or have an advanced option hidden somewhere whether 
to show the entire path in the filesystem name, that people mounting 
large number of filesystems ending with the same folder name (very 
small percentage of target userbase I would say) would use?

Doing it only for filesystems in org.openide.filesystem works, this 
is what this issue is about here. Separate issue should be filed for 
other filesystems as needed.
Comment 3 rmatous 2003-12-15 15:27:26 UTC
3/ What about last folder:

Suggestion: use fixed size name (maybe 30 last chars) preceding with
.. (e.g. ..rg\netbeans\api\registry\src) and not implement in
FileSystem subclass but rahter in Node or Look (its method
getDisplayName)responsible for presentation.
Comment 4 _ tboudreau 2003-12-15 15:30:45 UTC
Why not, when mounting a filesystem, calculate the display name it
would have - the last directory name.  Then compare it with the names
of other mounted filesystems.  

If it matches one, prepend the next level directory name and try
again, looping until you have a unique name (I guess you have to solve
the case of the same thing mounted twice also?)

If I know our build system guys, it wouldn't be surprising at all if
new projects in NetBeans very soon start being in directories called
"src/", in which case it would be a problem not just for us anymore.
Comment 5 rmatous 2003-12-15 16:31:27 UTC
I don't like Tim's method of shortening because it seems to me
unnecessarily over complicated, time consuming and strange looking
(not descriptive enough - src, registry/src, api/registry/src).

Moreover FS implementations shouldn't care about horizontal scrollbars
in explorer at all or should be documented that displayName can't
exceed defined lenght. Anyway I think it should be shortened in
RootFolderNode (or its filter MountNode.CapNode) at one central place?
Else it will be copy-pasted into every FS impl. 

I'm ready to fix it according to suggestion in my last comment. But I
would like to know if there is agreement about it ?
Comment 6 _ tboudreau 2003-12-15 16:53:35 UTC
I'd be for trying it out - I think this is something we'll need to see
and play with.

Comment 7 rmatous 2003-12-16 10:32:15 UTC
Created attachment 12602 [details]
simple patch for trying out
Comment 8 rmatous 2003-12-16 10:35:09 UTC
This patch doesn't care about localization of DISPLAY_NAME_PREFIX but
it could be good enough for testing.
Comment 9 rmatous 2004-01-09 15:56:39 UTC
There is no response. Shall I fix it according to patch ? 
Comment 10 _ tboudreau 2004-01-09 17:51:38 UTC
As I said before, I'd be for trying it out - I think this is something
we'll need to see and play with.  So let's try it - plenty of time to
roll it back if it really doesn't work well.
Comment 11 rmatous 2004-01-12 17:03:26 UTC
OK. Will be fixed, but probably now is too late for release 3.6  cause
its after UI freeze and therfore version will be changed to promo-D. I
think its more RFE than defect.
Comment 12 Jesse Glick 2004-04-01 16:32:47 UTC
IMHO we can leave it as is since this UI will rarely if ever be shown
in D - might be a special way to turn on the All Files tab but not
normally in the Window menu.