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.
To reproduce: I have a VSS Mount. 1. Double click on one of the files in the VSS mount. (The source appears in the source editor) 2. With errors in the code... compile the file... (Errors will appear in the output window) 3. Double click on one of the errors in the output window... (A NEW source window appears in the source editor with the highlighted bug) See attached.n The NEW source window is a duplicate of the previous (Same source file). The only difference is that one Has the name of the name of the Source and the VCS status (Example: ReceivingEJB [Locally Modified](Jcampbell)), and the other source file (the one that appears when you double click on the file) has only the name of the file (Exampbel: ReceivingEJB). I assume that this is a VCS bug because the error, in the output window, sayes "<path>/ReceivingEJB.java [706:1] ... <error message>". The file that it states is "ReceivingEJB.java" NOT "ReceivingEJB [Locally Modified](Jcampbell)", so it opens a new source window for "ReceivingEJB.java". I may be totally off.. if so please forward this to the appropriate area. I tested this on NetBeans 3.2 build 33
Created attachment 1195 [details] Example of getting double source files
This can cause data corruption if you don't realize if there are two source windows up in memory at the same time. It has cause me much headache trying to figure out which of the two windows is the correct one.
Not sure, if this is a bug of VCS. This bug can happen if you have the same filesystem mounted twice (i.e. once normal LocalFileSystem and once VCS filesystem). Don't know if this is the case, but I do not see how VCS could influence this.
I tried to reproduce this bug but I wasn't successful. I exactly followed the described procedure but it always opened correct file. I mounted single VSS filesystem, mounted directory and then same VSS filesystem and still was getting this to work. I always got the file from VSS filesystem. I used RC3 of NetBeans 3.2 (build #36) on Windows 2000 with JDK 1.3 and VSS 6.0 Are you able to reproduce it with single and fresh VSS filesystem mounted to the explorer ? BTW I don't think this has much to do with VCS.
OK... After the last comments... I found a Directory mount in my Filesystems tab. I was a mount of the root of the drive. When I got rid of that mount the bug went away... SO, the problem is when you have two mounts that might be ambiguous to NetBeans. The only thing is that the Directory mount (the one to the root of my HDD), is pretty off from the VCS mount (you have to go into several directories to get to the same point that the VCS mount is at). So, the bug is... When you have two mounts... one VCS and one Directory, you create an error, double click on the error, you get the file that exists in the Directory mount (even though you open the file from the VCS mount).... thus causing two source windows to open of the same file. I don't know if this is still a VCS bug or if it needs to be forwarded to someone else. THANKS for all you guy's hard work (great product thus far!)!
I reproduced this using following steps: 1. mount some directory 2. mount the same directory as VCS (it works even this should not) 3. open class from VCS 4. compile it with errors 5. doouble click on error 6. new tab with the same class but from the first filesystem is opened in the editor Note: 1. When repeating using this order: 2.,1., -> doesn't allow to mount the directory as localfilesystem -> fylesystem already exists 2. you can mount several times the same VCS -> shouldn't work So assigning back to the VCS, which shouldn't allow to mount one VCS filesystem more than once. In the repository there is tested system name of the mounting filesystem if doesn't exist in the repository and when exists, the filesystem is not mounted. But I know it may be useful to have such that situation when one directory is mounted more than once using different VCS. This may be fixed in the future when the 'classpath' will be separated from the mounted filesystems in the explorer and will be defined by the java module separately.
O.K. Will be fixed by disabling a possibility to mount a VCS filesystem to the same mount point as some previous one.
Fixed in the main trunk. A PropertyVetoException is thrown on an attempt to change the FS root to an already mounted filesystem name. Associated changes made in CVS mounting wizard, CVS Customizer in vcscvs module and VCS Customizer in vcsgeneric module.
Target milestone -> 3.3 Removing the OPEN_IN_3.2 keyword.
Reopened, more VCS filesystem with the same root can be mounted again, this issue should be fixed in compilers. See http://www.netbeans.org/www-nbdev/msg06438.html for the associated information.
*** Issue 10122 has been marked as a duplicate of this issue. ***
Yarda, what is your sugesstion?
Would it be possible to update the compiler (I guess that the external one is used) to properly choose the correct data object when looking for an error? I remember that java ExternalCompiler just tries to find the object using repository.findResource (...), but because the compiler is constructed with FileObject as argument it could probably search first of all the filesystem of the FileObject and only when the resource is not found continue with repository.findResource. Java guys, should this be implemented in Java compiler or directly in ExternalCompiler? Anyway can you somehow deal with it?
Agreed that ExternalCompilerGroup could probably be smarter about this sort of thing...see my message on nbdev. I would vote to assign this back to openide. Ales, any opinion?
Jesse wins the election. I'm reassigning to openide.
*** Issue 13048 has been marked as a duplicate of this issue. ***
I've just started getting this bug as well. I have been happily mounting CVS directories with no problems. The duplicate files *only* started opening once I had added tags to the files. I only get duplicate files opening on errors for files that have tags attached to them. This may be a coincidence of course. - Its driving me insane by the way :)
Changes made to ErrorsParsingThread.java http://www.netbeans.org/source/browse/openide/src/org/openide/compiler/ErrorsParsingThread.java.diff?r1=1.25&r2=1.26
*** Issue 15207 has been marked as a duplicate of this issue. ***
[nb_release33](200111300330), [jdk1.3.1](01) && [jdk1.4](88) I am sorry, but this issue isn't still fixed. Steps to reproduce: - mount local directory - mount the same directory as vcscvs - open some file from cvs repository - compile with errors - doubleclick on error in Output Window -> file from local directory is opened maybe P1 = regression, or never wasn't fixed ?
No, the same java class should not be in two mounted file systems at the same time. The java source file is searched according to classpath, it means the first mount point will be used when opening the file. There is already bug/rfe filed against java module. Ask sdedic for details
I am agree with you Trung, but : Why this issue didn't solved as INVALID or WONTFIX ? Reportes was describe behaviour (screenshot) and after FIXING it the behaviour is the same !? verified in [nb_r33](200111300330)
Resolved for 3.4.x or earlier, no new info since then -> closing.