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 60263 - Nodes in Documents dialog should set name/displayName
Summary: Nodes in Documents dialog should set name/displayName
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords: T9Y
Depends on:
Blocks:
 
Reported: 2005-06-20 11:42 UTC by Jiri Skrivanek
Modified: 2008-12-22 20:37 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 Jiri Skrivanek 2005-06-20 11:42:22 UTC
In version 1.15 of org.netbeans.core.windows.view.ui.DocumentsDlg the
TopComponentNode#getName() was changed to getHtmlDisplayName(). It affects UI
tests because they just scan JList and in fact use VisualizerNode.toString() to
for example select a document in the list. Above change caused that toString()
returns an empty string. I think TopComponentNode should also override getName
or getDisplayName.

Build 20050620-0647, WindowsXP, JDK1.5.0_04.
Comment 1 Jesse Glick 2005-06-20 21:32:44 UTC
How about this:

public String getName() {
    return tc.getName();
}

?
Comment 2 Jiri Skrivanek 2005-06-21 09:21:58 UTC
I would prefer 
public String getDisplayName() {
    return tc.getDisplayName();
}

or both because form doesn't have name set (see below).


HTMLDN=<html>AbstractLines.java<font color='!Tree.selectionBorderColor'> [Up-to-
date; 1.10]
DN=<html>AbstractLines.java<font color='!Tree.selectionBorderColor'> [Up-to-date
; 1.10]
N=<html>AbstractLines.java<font color='!Tree.selectionBorderColor'> [Up-to-date;
 1.10]
----------------------------------------
HTMLDN=Main.java
DN=Main.java
N=Main.java
----------------------------------------
HTMLDN=DocumentsDlg
DN=DocumentsDlg
N=
Comment 3 Jesse Glick 2005-06-21 16:48:07 UTC
Bug in form I think (note that it doesn't even show the file extension!), but I
can add the displayName override too.
Comment 4 Jesse Glick 2005-06-21 18:45:59 UTC
committed     Up-To-Date  1.16       
core/windows/src/org/netbeans/core/windows/view/ui/DocumentsDlg.java
Comment 5 Jiri Skrivanek 2005-06-22 09:02:02 UTC
Verified in build 20050621-1826. Thanks.