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 25954

Summary: Double clicking on java source in windows explorer does not open the file in the editor
Product: utilities Reporter: iformanek <iformanek>
Component: Open FileAssignee: issues@utilities <issues>
Status: CLOSED FIXED    
Severity: blocker CC: mmirilovic, mslama, ttran
Priority: P1    
Version: 3.x   
Hardware: PC   
OS: Windows ME/2000   
Issue Type: DEFECT Exception Reporter:
Attachments: Proposed patch.

Description iformanek 2002-07-24 10:36:31 UTC
TO reproduce:
1. install fresh 3.4
2. click on .java file in win explorer
3. NB comes up, with the correct filesystem mounted but 
the editor is not opened
Comment 1 Marian Mirilovic 2002-07-24 15:00:21 UTC
Well, this is showstoper for 3.4 RC1, please evaluate ASAP.

It seems like it doesn't work only for first opened file, if you close
Welcome Screen , close IDE, and try to open java file again ,
appropriate filesystem is mounted, Source Editor isn't opened but menu
item View | Source Editor is enabled and if you push it Source Editor
with right java file is opened.

cc'ing Marek for evaluation of Window System side
Comment 2 _ lkramolis 2002-07-24 16:23:36 UTC
Main problem is that runide.exe extends arguments with path to java
file in 8.3 format, e.g. C:\MAIN~1.JAV, and it is not currently
recognized as Java file at Utilities side. If it is run with
C:\Main.java everything is right. I hope EXE is able to use right full
name, because it could be nicer fix that in Utilities module.
Comment 3 _ lkramolis 2002-07-24 16:30:18 UTC
Trung said that EXE is not able to determine file name -- it get it
from oper. system.
[Back to Utilities]
Comment 4 _ lkramolis 2002-07-24 17:15:36 UTC
Problem:
========
It occures just if filesystem of requested file is not mounted yet.

OpenFile does not recognize .JAV files as Java sources, e.g.
C:\src\org\MAIN~1.JAV. Then it does not parse it to detect right
package and mount parent directory as root of new FS, e.g. C:\src\org.
But FS is not able to find MAIN~1.JAV on it -- nothing is opened.

FIX:
====
Using File.getCanonicalFile() I get correct file name, e.g.
C:\src\org\Main.java.
(See attached patch.)
Comment 5 _ lkramolis 2002-07-24 17:17:13 UTC
Created attachment 6887 [details]
Proposed patch.
Comment 6 _ pkuzel 2002-07-24 17:25:53 UTC
It sounds reasonable - reviewed.
Comment 7 _ lkramolis 2002-07-24 17:28:26 UTC
Fixed in main trunk.
Comment 8 _ lkramolis 2002-07-25 16:09:04 UTC
Fixed in release34 branch.
Comment 9 Marian Mirilovic 2002-07-26 09:32:32 UTC
verified in [nb_release34_rc1](200207252340)
Comment 10 Quality Engineering 2003-07-01 15:31:45 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.