Re: Full expansion of package names in Projects window
Jesse Glick <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.user-interface |
|---|---|
| Organization | Sun Microsystems / NetBeans |
| Message-ID | <[email protected]> |
Peter Toye wrote:
> May I suggest (or has it already been - I can't find it) that in the
> Projects window, double-clicking on project (or further down the tree)
> opens all of the packages lower down?
>
> The rationale is quite simple - for those of us who obey the rules and use
> their domain name chain to name packages, there's a lot of clicking just to
> get to the useful bit: the source code.
I don't really follow your suggestion. The default layout is
Source Packages
+ com.ptoye.stuff.pkg1
- com.ptoye.stuff.pkg2
+ SomeFile.java
+ com.ptoye.stuff.pkg3
So if you want to open something in com.ptoye.stuff.pkg2, just click
that node. ...?
> A refinement (well, really, a separate idea) would be to display
> multi-level package prefixes on one line with one level of indentation
> rather than one line per component.
Again I'm not sure what you mean by "one line per component" which is
not the default mode for the Projects tab to begin with - though you can
switch to a tree view if you prefer it using the context menu:
Source Packages
+ com
+ ptoye
+ stuff
+ pkg1
- pkg2
+ SomeFile.java
+ pkg3
> In this way my packages com.ptoye.something would take up less room
> in a rather narrow window. Or is there a way of reducing the width
> taken up at each level which i haven't found?
If you mean your package names are too long, you can add
-J-Dorg.netbeans.spi.java.project.support.ui.packageView.TRUNCATE_PACKAGE_NAMES=true
to the options in netbeans.conf or on the command line, giving you e.g.
Source Packages
+ c.pto.stu.pkg1
- c.pto.stu.pkg2
+ SomeFile.java
+ c.pto.stu.pkg3
Here the first component is truncated to 1 char and all other components
except the last truncated to 3 chars. This option has been there for a
long time and works fine but UI guys though it was too weird to expose
in the regular GUI.
Tim Boudreau had done some work on compressing node labels to fit within
a component's horizontal space, eliding first vowels and then less
"important" consonants until long labels fit. That would be ideal since
it would show as much information as you actually had room for. However
it would require some API changes in the Nodes module which no one has
had time to work on. Also the generalization of this algorithm to
non-English labels is not obvious (think Hebrew...), though I suspect
few users actually have package names which are not written in Latin script.
There are several other proposed displayed modes, detailed here:
http://www.netbeans.org/nonav/issues/show_bug.cgi?id=53192
Writing a prototype of one of these modes is not hard at all; most of
the work is making sure the less obvious things work naturally: that the
display updates when you add/delete/rename certain folders, that
drag-and-drop behaves sanely, etc.
-J.
--
[email protected] x22801 netbeans.org ant.apache.org
http://google.com/search?q=e%5E%28pi*i%29%2B1