FAQ
Cover
\
Build
\
Source
\
Bugs
\
Reference
\
Libraries
\
Tools
The bugs database has moved
here
.
Bug 604 : Semantic error highlights wrong code
Last modified: 2007-10-10 12:39
P
roject:
processing
trash
Version:
unspecified
Co
m
ponent:
android
book
core
libraries
pde
reference
tools
web
Status:
RESOLVED
Resolution:
INVALID -
Pr
i
ority:
P2
Severity:
normal
Platform
All
O
S:
All
Windows
Mac OS
Linux
Other
Reporter:
balor
Assigned To:
fry
Attachment
Type
Created
Size
Actions
Screenshot of the bug, note the text in the bottom panel.
image/png
2007-07-31 07:24
13.26 KB
Description
: Opened: 2007-07-31 07:23
I have a piece of code with several semantic errors. The first semantic
error (reading from top to bottom) is on line 1. The first semantic error
reported by the compiler is on line 42, however the code in line 1 is
highlighed by the pde, not the code on line 42.
I put in a superfluous import statement on line 1. This means that the
first semantic error that I can see (As a prorgrammer reading top to
bottom) is on line 3. Again the PDE reports a semantic error on line 44
(the previous error +2) but highlights the code for the first semantic
error that a programmer would notice.
I would expect that if the text in the bottom of the PDE stated a semantic
error in line 42, then the code at line 42 would be highlighted, not some
other code.
Test code:
import java.io.*;
Foo foo;
Bar [] bar;
void setup() {
bar = new Bar[10];
}
$ java -version
java version "1.6.0_02"
Java(TM) SE Runtime Environment (build 1.6.0_02-b05)
Java HotSpot(TM) Client VM (build 1.6.0_02-b05, mixed mode, sharing)
Additional Comment
#1 From balor 2007-07-31 07:24
edit
]
Screenshot of the bug, note the text in the bottom panel.
Additional Comment
#2 From fry 2007-07-31 07:52
from the screenshot, you simply haven't scrolled up to the first error,
since there were several. (drag the separator to make the console larger
and you'll see the other bugs)
perhaps you can add the full sketch that was giving you trouble? (use tools
-> archive sketch) and post the zip file as an attachment here. i think the
highlighting had a regression between release 124 and 125.
Additional Comment
#3 From fry 2007-10-10 12:39
closing bug, no response.