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 167065 - Java/Scala Mixed Project shows wiggly lines as if components are not known
Summary: Java/Scala Mixed Project shows wiggly lines as if components are not known
Status: NEW
Alias: None
Product: contrib
Classification: Unclassified
Component: Scala (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: _ dcaoyuan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-14 20:51 UTC by stemei
Modified: 2009-07-28 06:58 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
patch (6.32 KB, patch)
2009-07-28 06:58 UTC, Milos Kleint
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description stemei 2009-06-14 20:51:39 UTC
A mixed project with Scala and Java sources: Scala class uses a Java class (defined in the same project and even the
same package). Compiles & runs fine, but editor marks the position inside the Scala class with red wiggly lines where
the Java component is used. Tooltip there states: "not found: type JavaTypeFooBar".

Seems to be related to #154140 

Produktversion: NetBeans IDE 6.7 RC2 (Build 200906050001)
Java: 1.6.0_13; Java HotSpot(TM) Client VM 11.3-b02
System: Linux Version 2.6.28-13-generic läuft auf i386; UTF-8; de_DE (nb)
Comment 1 Milos Kleint 2009-07-28 06:57:45 UTC
I get these too in current trunk. I was first thinking it's related to my maven project setup (I have java sources in
src/main/java and scala sources in src/main/scala). I've tried to play with the Global class in scala.editing, but
didn't make it work. Not even sure I was on the right track. Here are my observations just in case it's useful.

1. there can be just one source path set to the compiler. My idea was that maybe the java files are not found because
they are not on the source path.
2. I've filed issue https://lampsvn.epfl.ch/trac/scala/ticket/2202 against the compiler.
3. I've figured there is this wiki page - https://lampsvn.epfl.ch/trac/scala/wiki/Classpath that claims sources will be
located on the "classpath" is not sourcepath is set. At the same time the documents asserts it's only a proposal, so
maybe it's not implemented.
4. I've tried out the classpath idea (patch attached) but it didn't work. Either because it's still not implemented in
.8.0-SNAPSHOT or my line of thinking was entirely wrong and the cause of the problem is elsewhere.
5. the maven-scala-plugin seems to compile the project just fine, I've inspected the sources and it seems to pass *all*
the files in the project to the compiler. Not sure if that's something we want to do, but maybe we will have to pass at
least the java files of the project.. I haven't tested this idea.
Comment 2 Milos Kleint 2009-07-28 06:58:15 UTC
Created attachment 85292 [details]
patch