Bug 112702 - No links to compile errors
No links to compile errors
Status: RESOLVED WORKSFORME
Product: projects
Classification: Unclassified
Component: Ant
5.x
PC Windows XP
: P3 (vote)
: 6.x
Assigned To: Jesse Glick
issues@projects
: SPACE_IN_PATH
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-08-13 21:10 UTC by skaylie
Modified: 2007-11-02 19:36 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description skaylie 2007-08-13 21:10:25 UTC
When I compile my module project there are no links to the errors in the output window.  The text is present showing the
filename and line of the error, but there is no hyperlink to jump to the error.
Comment 1 Milos Kleint 2007-09-11 11:47:15 UTC
not output issue, possibly ant related. What project type are you using?
->ant
Comment 2 Jesse Glick 2007-09-13 22:43:19 UTC
Missing any details to reproduce or diagnose.
Comment 3 skaylie 2007-09-14 17:34:51 UTC
Is it possible to find out what files and/or ant targets the link creator checks when compiling?  If no one else has had
a similar problem, then it probably is some setting or file on my machine that inadvertently got changed.  It probably
makes sense for me to try and figure it out myself, which I'd love to do if I knew what the compiler was looking at when
it creates the links.


Jesse Glick wrote:
scottkaylie@gmail.com wrote:
> What details do you need?

Steps to reproduce the problem from scratch on a fresh machine using a new NB installation and new project. I have not
heard of anyone else having a similar problem, and we cannot diagnose without a test case in hand. Probably the bug
arises only under some very specific condition that exists in your project or on your machine.

Scott Kaylie wrote:
What details do you need?  My app is a module suite consisting of a module project and a couple of library wrappers.  I
am using 5.5.1 and I have not intentionally modified any ant scripts. I would happily send any info to get this
resolved. What are the settings or other files the ide uses to form the links?
Comment 4 Jesse Glick 2007-09-14 18:00:35 UTC
The Ant integration module simply looks for well-known patterns in output and hyperlinks them. The usual pattern is

<filename>:<line>: <message>

with some variations (for column number, etc.). The filename must be absolute.
Comment 5 skaylie 2007-09-14 18:07:04 UTC
The output lists all of the proper information (<filename>:<line>: <message>), but the links aren't created, despite the
files all being absolute references.  Below is how one of the errors shows up.  It looks like the prior line created by
the compile target lists the file location with backslashes, but the line displaying the error lists the file location
with forward slashes.  Is it possible that that is the cause of the problem?  

init:
compile:
Created dir: C:\Documents and Settings\Scott Kaylie\My Documents\Programming\Java
Programs\QRModuleSuite\QRModuleProject\build\classes
Compiling 343 source files to C:\Documents and Settings\Scott Kaylie\My Documents\Programming\Java
Programs\QRModuleSuite\QRModuleProject\build\classes
C:/Documents and Settings/Scott Kaylie/My Documents/Programming/Java
Programs/QRModuleSuite/QRModuleProject/src/com/qr/windows/editors/common/gui/InputPromptPanelUPV.java:48: not a statement
        x;
        ^
1 error
Comment 6 skaylie 2007-09-14 18:27:09 UTC
When I compile a single file, the path is displayed with backslashes and the link shows up properly, but calling Clean
and Build Project shows forward slashes.  Samples of both below.  It looks like this probably is the problem.  How can I
tell Clean and Build Project to show paths with backslashes?

***COMPILE SINGLE FILE - LINK WORKS***
init:
compile-single:
Compiling 1 source file to C:\Documents and Settings\Scott Kaylie\My Documents\Programming\Java
Programs\QRModuleSuite\QRModuleProject\build\classes
C:\Documents and Settings\Scott Kaylie\My Documents\Programming\Java
Programs\QRModuleSuite\QRModuleProject\src\com\qr\windows\editors\common\gui\InputPromptPanelUPV.java:48: not a statement
        x;
1 error

***CLEAN AND BUILD PROJECT - LINK DOESN'T WORK***
init:
compile:
Created dir: C:\Documents and Settings\Scott Kaylie\My Documents\Programming\Java
Programs\QRModuleSuite\QRModuleProject\build\classes
Compiling 343 source files to C:\Documents and Settings\Scott Kaylie\My Documents\Programming\Java
Programs\QRModuleSuite\QRModuleProject\build\classes
C:/Documents and Settings/Scott Kaylie/My Documents/Programming/Java
Programs/QRModuleSuite/QRModuleProject/src/com/qr/windows/editors/common/gui/InputPromptPanelUPV.java:48: not a statement
        x;
        ^
1 error
Comment 7 Jesse Glick 2007-09-14 18:42:57 UTC
javac should be sending backslashes, not forward slashes, if you are on Windows. Which JDK are you using for the
project? Do you use Cygwin or any other special environment? Is the problem reproducible if you create the project in a
directory which uses no spaces or other special characters in its name, e.g. "C:\Temp\SomeProject"?
Comment 8 skaylie 2007-09-14 18:59:29 UTC
Moving the project worked!!!

The issue seems to be something with the spaces included in the directory names.  Moving the code to a new directory
with no spaces caused compiler error messages to appear with backslashes instead of forward slashes.  This still seems
to be a bug for Windows users, but clearly of lesser importance.  Perhaps it makes sense to place a prominent note to
Windows users on the website to only create projects in non-space paths.

Thanks for the help.
Comment 9 Jesse Glick 2007-09-14 19:38:25 UTC
Could be a javac bug, or an Ant bug. I will need to try to reproduce and file as appropriate.
Comment 10 skaylie 2007-09-14 19:44:17 UTC
The weird thing is that it worked fine for compile-single, so I wouldn't think it is a javac bug.  The compile target in
the default common.xml has some regex logic (<replaceregex pattern="^#(?!(PART)?(NO)?I18N).*[\r\n]+" replace=""
flags="gm"/>) that the compile-single target lacks.  Perhaps the issue is in there somewhere?
Comment 11 Jesse Glick 2007-09-14 20:02:25 UTC
The PARTNOI18N stuff is for *.properties, not *.java.
Comment 12 Jesse Glick 2007-11-02 19:36:12 UTC
I cannot reproduce on XP using an NB dev build, JDK 6 or 7 as the selected Java platform, standalone project or suite
component module project:

compile:
Created dir: C:\Documents and Settings\Jesse Glick\My Documents\NetBeansProjects\QRModuleSuite\QRModuleProject\build\classes
Compiling 1 source file to C:\Documents and Settings\Jesse Glick\My
Documents\NetBeansProjects\QRModuleSuite\QRModuleProject\build\classes
C:\Documents and Settings\Jesse Glick\My
Documents\NetBeansProjects\QRModuleSuite\QRModuleProject\src\com\qr\windows\editors\common\gui\InputPromptPanelUPV.java:13:
<identifier> expected
XXX
1 error

If you manage to figure out exactly what triggers the problem, let me know. Might be something rather specific about
your project or environment.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo