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.
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.
Editor module cannot influence this behavior. Reassigning to core/winsys for evaluation.
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.
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?
Created attachment 17532 [details] screenshot of wrong tab name
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.
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.
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.
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....
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.
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.
does the error still orrcur in 4.0 final?
Passing to Stan to distribute bugs evenly. Thanks Stane :-)
i wasn't able to reproduce the described behavior. please reopen the issue if the problem persists.