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 48713 - editor tab names swapping
Summary: editor tab names swapping
Status: RESOLVED WORKSFORME
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Stanislav Aubrecht
URL:
Keywords: RANDOM
Depends on:
Blocks:
 
Reported: 2004-09-08 17:40 UTC by Jan Benway
Modified: 2008-12-22 19:34 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot of wrong tab name (43.08 KB, image/gif)
2004-09-09 17:06 UTC, Jan Benway
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Benway 2004-09-08 17:40:59 UTC
In NB 4.0beta1, windows XP

The editor tab names sometimes get confused. I
have two files open, File A and File B, and
sometimes the tab name for File A shows "B" and
vice versa.

The problem is this is not consistently
reproduceable -- when I try to make it happen, it
does not, but it does happen periodically as I
work. The only workaround I know of to be sure I
have the right file is to reopen it from the
project tab. This does not fix the tab name, but
helps me be sure I am editing the right file.

Some possibly other relevent facts: I almost
exclusively work with form files, and I frequently
switch between design and code modes as well as
between tabs in the editor. I almost always use
the tab themselve to navigate, and not the
dropdown menus or the little arrows.
Comment 1 Miloslav Metelka 2004-09-09 09:51:06 UTC
Editor module cannot influence this behavior. Reassigning to
core/winsys for evaluation.
Comment 2 David Simonek 2004-09-09 13:05:55 UTC
Hmm, I've never seen such behaviour, did you Milos? It's quite
possible that the bug is related to form files, as I work with them
very rarely. Downgrading to P3 as this happens rarely. Btw without
reproduction case there is really small chance to fix such error.
Comment 3 Milos Kleint 2004-09-09 15:26:40 UTC
me neither. And actually the winsys nor multiview sets the titles,
it's the form module. But I doubt that it can switch titles for 2
distict files. 

Maybe you accidentaly drag the file to a different location?
Comment 4 Jan Benway 2004-09-09 17:06:34 UTC
Created attachment 17532 [details]
screenshot of wrong tab name
Comment 5 Jan Benway 2004-09-09 17:10:06 UTC
No, I didn't accidently drag anything. It just now happened again. I
attached a screenshot.

Here is what happened:

-- Have several files open. Am working mostly with 2 form files called
"ModifyEJBs" and "ModifyEJBsInsides"

Am looking at the design view of ModifyEJBsInsides. Decide I want to
change something on ModifyEJBs

Double click ModifyEJBs in the project tab of the explorer

ModifyEJBs is fronted (design view) in the editor. But the tab name is
ModifyEJBsInsides. I switched to the editor view (to make it more
obvious which file it is) and took a screenshot -- attached.

Comment 6 David Simonek 2004-09-09 17:27:05 UTC
I kind of expected "it just now happened again" reaction :-)
Seriously, I did believe you even before, it's just that without
reproduction steps we don't know how to locate the bug.
On screen shot, I saw two tabs with same name ModifyEBJsInsides. Is
that right and is that right that each one shows different java source
content?
Would the bug disappear when you resize/repaint/iconize Netbeans? I
guess no.
Comment 7 Jan Benway 2004-09-09 17:32:11 UTC
Yes, the other "ModifyEJBsInsides" tab is the "real" one, and has
different java source content. So they aren't really swapping so much
as being reused. :)

Didn't try minimizing, but I suspect that would not affect it -- will
try this next time it happens. However, I did try the little arrow
drop-down menu on the editor. This lists the correct names, and when I
pick ModifyEJBs (the real name of the file with the wrong tab name) it
fronts the tab and gives it the right name again.
Comment 8 David Simonek 2004-10-04 15:24:26 UTC
Jan, any news? I didn't reproduce the issue even one time, so I can do
nothing and it's no point to have bug opened when I can do nothing :-(

Would you please try Netbeans beta 2 and various games with
minimizations etc. (to find out if it's repaint problem or not), it's
very strange that bug appears only on your machine, I tend to think
that your installation is somehow non-standard... 

Just by chance, Tim, do you know where problems may be? Is there some
name comparison code in scrolling tabs so that tabs could get mixed?
Huh....
Comment 9 _ tboudreau 2004-10-05 03:14:45 UTC
TabDataModel is backed by an ArrayList - don't see how it could get mangled on the tab 
control side.  *Possibly* if you had two components with bad implementation of equals() 
and hashCode(), it could get confused, but even that seems very unlikely, since the list is 
usually iterated in order.

The window system can (and does) set tab names (to add the * when something is 
modified), so possibly the problem is there?  My guess would be some hashcode lookup 
problem causing it to map the wrong name to a tab index, but that's just a wild guess.

No clue, really - never seen anything like this.
Comment 10 Jan Benway 2004-10-05 16:56:39 UTC
I use netbeans periodically, and have not needed it much the last few
weeks. I just started using 4.0 beta 2. I'd like to keep with it a
couple weeks and let you know if I see a recurrence of this.
Comment 11 Milos Kleint 2005-01-19 15:01:42 UTC
does the error still orrcur in 4.0 final?
Comment 12 David Simonek 2005-01-19 15:05:55 UTC
Passing to Stan to distribute bugs evenly. Thanks Stane :-)
Comment 13 Stanislav Aubrecht 2005-01-28 09:16:22 UTC
i wasn't able to reproduce the described behavior.

please reopen the issue if the problem persists.