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 11617 - Duplicate files open when double clicking on an error after compiling
Summary: Duplicate files open when double clicking on an error after compiling
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: All All
: P2 blocker (vote)
Assignee: anovak
URL:
Keywords:
: 10122 13048 15207 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-04-20 18:23 UTC by jcampbell
Modified: 2008-12-22 19:14 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Example of getting double source files (13.57 KB, image/jpeg)
2001-07-20 20:32 UTC, jcampbell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jcampbell 2001-04-20 18:23:23 UTC
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
Comment 1 jcampbell 2001-04-20 18:24:22 UTC
Created attachment 1195 [details]
Example of getting double source files
Comment 2 jcampbell 2001-04-20 18:31:22 UTC
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.
Comment 3 Martin Entlicher 2001-04-21 18:52:05 UTC
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.
Comment 4 Jiri Kovalsky 2001-04-23 08:35:45 UTC
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.
Comment 5 jcampbell 2001-04-23 16:38:42 UTC
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!)!
Comment 6 Jan Zajicek 2001-04-26 11:01:51 UTC
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.
Comment 7 Martin Entlicher 2001-04-26 11:06:47 UTC
O.K. Will be fixed by disabling a possibility to mount a VCS filesystem to the
same mount point as some previous one.
Comment 8 Martin Entlicher 2001-05-03 21:02:16 UTC
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.
Comment 9 Jan Chalupa 2001-05-06 15:29:11 UTC
Target milestone -> 3.3
Removing the OPEN_IN_3.2 keyword.
Comment 10 Martin Entlicher 2001-05-10 16:27:56 UTC
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.
Comment 11 Jan Zajicek 2001-05-21 13:08:29 UTC
*** Issue 10122 has been marked as a duplicate of this issue. ***
Comment 12 Pavel Buzek 2001-05-22 14:02:20 UTC
Yarda, what is your sugesstion?
Comment 13 Jaroslav Tulach 2001-05-23 12:30:10 UTC
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?
Comment 14 Jesse Glick 2001-05-23 13:46:51 UTC
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?
Comment 15 Jan Becicka 2001-05-30 10:41:40 UTC
Jesse wins the election. I'm reassigning to openide.
Comment 16 Robert Dankanin 2001-07-10 16:44:06 UTC
*** Issue 13048 has been marked as a duplicate of this issue. ***
Comment 17 npierpoint 2001-07-20 11:58:52 UTC
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 :)
Comment 19 Jan Zajicek 2001-09-07 15:16:29 UTC
*** Issue 15207 has been marked as a duplicate of this issue. ***
Comment 20 Marian Mirilovic 2001-11-30 13:33:52 UTC
[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 ?
Comment 21 _ ttran 2001-11-30 13:46:48 UTC
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
Comment 22 Marian Mirilovic 2001-11-30 13:53:50 UTC
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)
Comment 23 Quality Engineering 2003-07-01 16:39:30 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.