Can't goto error line after a jikes compile of multiple file

Using the Java SDK with TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
chatt
Posts: 23
Joined: Thu Aug 28, 2003 6:53 pm
Location: near Toronto
Contact:

Can't goto error line after a jikes compile of multiple file

Post by chatt »

Code: Select all

Can't goto error line after a jikes compile of multiple files.

The parms for a single jikes compile (cmd.exe) are:
    C:\jikes-1.16\bin\jikes.exe $File  +E  -classpath %CLASSPATH%
    $FileDir
    ^\([A-Za-z]:[^:]+\):\([0-9]+\):
    1, 2 and blank.
Which gives:
    E:/javaPackages/xag/misc/XAGProcessParms.java:166:9:166:40: Error: No method named "getReader" was found in type "xag/fileIO/XAGProcessFilename".
Which works okay, i.e. 'Enter' goes to the right line.

Multiple jikes:
    C:\jikes-1.16\bin\jikes.exe XAG*.java +E +F  -classpath %CLASSPATH%
    $FileDir
    ^\([A-Za-z]:[^:]+\):\([0-9]+\):
    1, 2 and blank.
gives:
    E:/javaPackages/xag/misc/XAGProcessParms.java:166:9:166:40: Error: No method named "getReader" was found in type "xag/fileIO/XAGProcessFilename".
which looks the same to me but which doesn't work.
("Cannot jump to item under cursor") 
BTW I've removed the +F with no change.

For the record, when I try Javadoc on a file with:
    E:\javaPackages\xag\jDocOneDir
        (This is a command, not a cmd.exe
         The batch file (up a dir) contains:
         javadoc -private -d %1\javadoc\ %1\XAG*.java)
    $FileDir
    ^\([^(]+\)(\([0-9]+\)):
    1, 2 and blank.
it gives:
    E:\javaPackages\xag\misc\XAGParms.java:9: 'class' or 'interface' expected
which also doesn't work.    

Notice the delimiters are different!
Shouldn't jikes have generated back-slashes?
    
Hope you can help,
Peter.

I'm using Textpad 4.7.1, 32 bit on win2K SP 3.
helios
Posts: 716
Joined: Sun Mar 02, 2003 5:52 pm
Location: Helios Software Solutions
Contact:

Post by helios »

We don't have any experience of working with Jikes here, but the following web site may be of some help to you:

http://www.cs.arizona.edu/~stepp/jikes.html
Helios Software Solutions
chatt
Posts: 23
Joined: Thu Aug 28, 2003 6:53 pm
Location: near Toronto
Contact:

Post by chatt »

helios wrote:We don't have any experience of working with Jikes here, but the following web site may be of some help to you:

http://www.cs.arizona.edu/~stepp/jikes.html

Code: Select all

Thanks, I've just tried the link and the output I get when I leave off the closing curly (at line 313) is:


    Found 1 syntax error in "E:/javaPackages/xag/misc/XAGProcessParms.java":

                <-
        28.     {
                . . .
       312.         }       // end getMaintOptions.
            --------^

    *** Syntax: "}" inserted to complete ClassBody


    Tool completed with exit code 1


At first sight this looks very helpful, the only problem is it doesn't goto the error line.  As well, I find it too wordy.


I went back to my normal jikes and it gives:

    E:/javaPackages/xag/fileIO/XAGSql.java:24:5:107:9: Error: "}" inserted to complete ClassBody

and this does goto the error line.


I noticed someone else had my problem last year, but with jdk:
Linda Guest

    Posted: Thu Jun 27, 2002 9:08 pm    Post subject: Regular expression to match error ouput   
    Hello, 
    When I try to compile and double-click on the errors in the "Command Results", it says, "Cannot jump to item under cursor". It does work if just using the stock "Compile Java" menu item from the Tools menu, but compiling from a batch file with a list of commands, .i.e., to put the class files in another directory, it doesn't work. 


This sounds a lot like my problem.  Likewise nobody answered it apart from suggesting the jikes website or changing the regex expression.


I suspect there's a problem here with Textpad.  After all, we've got two functionally identical output pages:

    E:/javaPackages/xag/fileIO/XAGSql.java:24:5:107:9: Error: "}" inserted 
and
    E:/javaPackages/xag/misc/XAGProcessParms.java:28:5:312:9: Error: "}" inserted 

yet one goes to the error and the other doesn't!

I thought there might be something wrong with the Command Results page, but the status lines look the same.
User avatar
jeffy
Posts: 323
Joined: Mon Mar 03, 2003 9:04 am
Location: Philadelphia

Post by jeffy »

If you compile with the parameter +E, it gives you the entire output on one line, like this:

Code: Select all

E:/a_sandbox/xbnjava/xbn/template/TemplateFiller.java:10:1:10:1: Error: ; expected instead of this token

Then you can use this RE for jumping:

Code: Select all

^\([A-Z]:[^:]+\):\([0-9]+\):\([0-9]+\):\([0-9]+\):\([0-9]+\):
When file/line/column is 1/2/3
chatt
Posts: 23
Joined: Thu Aug 28, 2003 6:53 pm
Location: near Toronto
Contact:

Post by chatt »

jeffy wrote:If you compile with the parameter +E, it gives you the entire output on one line, like this:

Code: Select all

E:/a_sandbox/xbnjava/xbn/template/TemplateFiller.java:10:1:10:1: Error: ; expected instead of this token

Then you can use this RE for jumping:

Code: Select all

^\([A-Z]:[^:]+\):\([0-9]+\):\([0-9]+\):\([0-9]+\):\([0-9]+\):
When file/line/column is 1/2/3
I had my version working okay,
tried the above (it didn't help)
but nowI can't go back!

I don't think it was your changes,
as this has happened before.

I'm running it as a cmd.exe,
does this make a difference?
chatt
Posts: 23
Joined: Thu Aug 28, 2003 6:53 pm
Location: near Toronto
Contact:

Post by chatt »

chatt wrote:
jeffy wrote:If you compile with the parameter +E, it gives you the entire output on one line, like this:

Code: Select all

E:/a_sandbox/xbnjava/xbn/template/TemplateFiller.java:10:1:10:1: Error: ; expected instead of this token

Then you can use this RE for jumping:

Code: Select all

^\([A-Z]:[^:]+\):\([0-9]+\):\([0-9]+\):\([0-9]+\):\([0-9]+\):
When file/line/column is 1/2/3
I had my version working okay,
tried the above (it didn't help)
but nowI can't go back!

I don't think it was your changes,
as this has happened before.

I'm running it as a cmd.exe,
does this make a difference?
Instead of modifying a tool I made a new one with your parms:
It's a command,
C:\jikes-1.16\bin\jikes.exe $File +E -classpath %CLASSPATH%
in $FileDir
^\([A-Z]:[^:]+\):\([0-9]+\):\([0-9]+\):\([0-9]+\):\([0-9]+\):
Regs: 1,2 and 3
And it doesn't work.

So I create another new command identical to my old Jikes one that works fine on one file.
And it doesn't work either!

So I make a new Textpad with a new command whose parms I copy from my original msg i.e.
C:\jikes-1.16\bin\jikes.exe $File +E -classpath %CLASSPATH%
$FileDir
^\([A-Za-z]:[^:]+\):\([0-9]+\):
1, 2 and blank.
And this one too doesn't work!

What's going on here?
Post Reply