Class cannot be resolved to a type: throws annotation
Hello,
I have the two following files:
TestScala.scala
TestJava.java
I get the error: TestScala cannot be resolved to a type
on TestScala in TestJava.java even thought the file in the package explorer is not marked as having an error and even thought compiling manually (maven) works.
Commenting the annotation solve the error.
Thanks
I have the two following files:
TestScala.scala
package test
class TestScala {
@throws(classOf[java.io.IOException])
def method = "test"
}
TestJava.java
package test;
public class TestJava {
TestScala a = new TestScala();
}
I get the error: TestScala cannot be resolved to a type
on TestScala in TestJava.java even thought the file in the package explorer is not marked as having an error and even thought compiling manually (maven) works.
Commenting the annotation solve the error.
Thanks
Leave a comment
When you leave the annotation uncommented do you see the error in the editor window only, or do you also see an entry in the Problems View? And do you see classfiles generated for the Sources in your output folder?
Updating tickets (#3255, #3262, #3271, #3277, #3279, #3287, #3313, #3317, #3318, #3320, #3329, #1000000, #1000002, #1000004, #1000005, #1000007, #1000011, #1000013, #1000018, #1000019, #1000020, #1000022, #1000023, #1000024, #1000025, #1000026, #1000028, #1000031, #1000033, #1000034, #1000037, #1000039, #1000040, #1000041, #1000057, #1000058, #1000060, #1000061, #1000063, #1000064, #1000065, #1000067, #1000070, #1000073, #1000076, #1000080, #1000082, #1000083, #1000084, #1000085, #1000087, #1000088, #1000089, #1000090, #1000092, #1000093, #1000094, #1000095, #1000097, #1000102, #1000104, #1000106, #1000108, #1000110, #1000111, #1000116, #1000124, #1000126, #1000127, #1000129, #1000132, #1000133, #1000136, #1000139, #1000143, #1000144, #1000145, #1000148, #1000149, #1000152, #1000154, #1000155, #1000157, #1000158, #1000159, #1000161, #1000169, #1000170, #1000172, #1000174, #1000176, #1000178, #1000179, #1000183, #1000185, #1000188, #1000189, #1000192, #1000196, #1000198)
on 2011-11-01 19:04 *
By galiulin.anatoly
Hello.
What about this problem? It's really annoying when mixing scala and java in single project. Is there any chance to fix it?
What about this problem? It's really annoying when mixing scala and java in single project. Is there any chance to fix it?
on 2011-11-02 01:26 *
By Iulian Dragos
This works fine in beta12. What is the exact version that you're using?
on 2011-11-02 19:21 *
By galiulin.anatoly
Scala plugin version 2.0.0.beta12-2_09-201110310936-87d1fd5
Scala JDT Weaving version 2.0.0.beta12-2_09-201110310936-87d1fd5
Eclipse Indigo SR 1
Maybe it's because pluigin was updated, not reinstalled in eclipse installation?
Scala JDT Weaving version 2.0.0.beta12-2_09-201110310936-87d1fd5
Eclipse Indigo SR 1
Maybe it's because pluigin was updated, not reinstalled in eclipse installation?
on 2011-11-03 00:59 *
By Mirco Dotta
It might actually be related to using Eclipse Indigo, but we need to check this out.
In the meanwhile, it would be good if you could try with Eclipse Helios 3.6.2 (which is currently the officially supported Eclipse for the Scala IDE plugin).
In the meanwhile, it would be good if you could try with Eclipse Helios 3.6.2 (which is currently the officially supported Eclipse for the Scala IDE plugin).
on 2011-11-03 02:20 *
By galiulin.anatoly
Yes, in Eclipse 3.6 SR 2 it works. No error messages and code completition with scala classes/objects works!
By the way, if scala class in another package, and java class imports it, Ctrl+Left mouse click on this import does nothing in Eclipse Helios too. Other imports works fine.
By the way, if scala class in another package, and java class imports it, Ctrl+Left mouse click on this import does nothing in Eclipse Helios too. Other imports works fine.