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 48042 - 1st column is always titled Root.
Summary: 1st column is always titled Root.
Status: CLOSED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords:
: 48974 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-08-27 02:59 UTC by ivan
Modified: 2010-04-29 09:19 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ivan 2004-08-27 02:59:10 UTC
For some reason the title of my first column in
the various
debugger views is always Root.

I looked through the debuggercore sources and
catalogs and the only string
"Root" is that of the dummy node TreeModel.ROOT. 

I also noticed that EmptyTreeModel.getRoot() is
one of the  few places
were ROOT is used. That gave me an idea.

At first I though perhaps when I have my models
getRoot() return
ROOT that somehow that name makes it's way to the
column header
but when I changed getRoot() to return something
like "StackViewRoot"
it didn't help. I still kept getting "Root".

Figuring maybe this is a cached/persistent
property I blew away my userdir and
started form scratch and guess what; I started
getting "StackViewRoot".
But then if I would switch to anther tab and back
to the stack view it
would mysteriously become "Root" again.
Even more mysterious if I iconized NB and then
de-iconized it it
would go back to "StackViewRoot"!

The column visibility _dialog_ always calls it
"StackViewRoot" however.

Soooo ...

a) The fact that getRoot() affects the header of
the column is
   not very intuitive. If this is by design
getRoot()'s javadoc
   should mention it. If it's an accident, it
should be fixed?
   
   For example, when I first did this I just
assumed that ROOT is a dummy
   object placeholder so I had getRoot() of all my
models return it
   and have getChildren() test for it.
   
b) The flip-flopping between what my getRoot()
returns and "Root" seems
   to indicate some kind of cacheing or other bug
Comment 1 ivan 2004-08-27 03:51:25 UTC
More weirdness.
I had changed getRoot() to return my own final object and getChildren()
to test for it, but then nothing would appear in my view. It
seems to only work properly if I specifically use ROOT in both
places.
Comment 2 Milan Kubec 2004-10-01 13:59:07 UTC
This bug affect NetBeans trunk build as well. It's veeeery strange
when user changes tab in debugger view and first column is always
called Root, but after entering the pane with mouse the name of column
changes to some correct value e.g. Name. But after changing the tab
it's there again. Please evaluate and possibly fix into 4.0.
Comment 3 Maros Sandor 2004-10-25 11:54:08 UTC
*** Issue 48974 has been marked as a duplicate of this issue. ***
Comment 4 Jan Chalupa 2004-12-14 09:16:27 UTC
Definitely not addressed in 4.0. TM -> 'TBD'.
Comment 5 Jan Jancura 2005-02-24 14:53:24 UTC
I was trying to fix this bug, but I was not successful. Looks like
some paint () method call is missing somewhere in TreeTableView
implementation, but I am not abe to create some reproducible & small
testcase. According to our bug priority guideline it looks like P3, so
I will downgrade it. Is it OK?
I plan some bigger change in viewModel which should fix this issue too.
Comment 6 ivan 2005-02-24 22:50:15 UTC
Well, it is very "in your face" and makes the GUI look
low quality. If we can't get something simple like the title 
of a column right how can the user trust us to get anything
else right? (Yes you and I know it's not that simple, but the user
doesn't and will make their judgement anyway :-).


Comment 7 Jan Jancura 2005-04-13 09:28:40 UTC
No chance to fix it in 4.1.
Comment 8 Martin Entlicher 2005-05-31 11:51:21 UTC
There is "Root" display name set from the dummy EMPTY model, that is initially
set. That code in TreeModelNode.refreshNode(), which put there the "object" as
the name if the object is String is not nice at all and IMHO wrong, because it
puts something that is not localized into the UI.

That display name ought to be refreshed later, when the proper columns are set.
However, the name of the first column is not taken from the column array, but
from the root node's display name. The root node's display name is refreshed,
but *after* the columns are set (in TreeTable.setModel()).

We need this either to be fixed in openide - after the display name of the root
node is changed, the table header should be updated, OR set the root node's new
display name before we set the columns.
Comment 9 Martin Entlicher 2005-05-31 14:39:17 UTC
Fixed in trunk:

/cvs/debuggercore/viewmodel/src/org/netbeans/modules/viewmodel/TreeModelNode.java,v
 <--  TreeModelNode.java
new revision: 1.32; previous revision: 1.31

/cvs/debuggercore/viewmodel/src/org/netbeans/modules/viewmodel/TreeTable.java,v
 <--  TreeTable.java
new revision: 1.19; previous revision: 1.18

/cvs/debuggercore/viewmodel/src/org/netbeans/spi/viewmodel/Models.java,v  <-- 
Models.java
new revision: 1.17; previous revision: 1.16
Comment 10 Quality Engineering 2010-04-29 09:19:02 UTC
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.