'Run As' won't create run configuration for object that extends Application in Eclipse 3.6 (Helios)
Eclipse: 3.6.0-I20100608-0911
Scala IDE: 1.0.0.201007310932
I have a file called TestApp.scala containing: object TestApp extends Application { println("Hello") }. If I try to run it with Run As > Scala Application I get an error: Selection does not contain a main type. This works in Galileo (Eclipse 3.5.2-M20100211-1343, Scala IDE 2.8.0.final-t20100714164856).
If I wrap the code into a main method instead of extending Application it works fine. Also, after running like that I can change the code back to extends Application and run it using the run configuration created before. I can also manually create a run configuration, if I enter the name of the main class myself (it does not show up in the search dialog).
Scala IDE: 1.0.0.201007310932
I have a file called TestApp.scala containing: object TestApp extends Application { println("Hello") }. If I try to run it with Run As > Scala Application I get an error: Selection does not contain a main type. This works in Galileo (Eclipse 3.5.2-M20100211-1343, Scala IDE 2.8.0.final-t20100714164856).
If I wrap the code into a main method instead of extending Application it works fine. Also, after running like that I can change the code back to extends Application and run it using the run configuration created before. I can also manually create a run configuration, if I enter the name of the main class myself (it does not show up in the search dialog).
Leave a comment
on 2010-08-01 16:03 *
By MattRussell
In ScalaLaunchShortcut.findTypes(), the "tpe.newSupertypeHierarchy(null).getAllTypes" call on Helios doesn't return scala.Application as one of the ancestors. Hence main() isn't found.
I was a bit stumped as to why the super types weren't being returned correctly, though.
I was a bit stumped as to why the super types weren't being returned correctly, though.
on 2010-08-04 17:53 *
By MattRussell
Duplicated association with ticket #1000094 was added
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 2013-06-19 13:14 *
By Mirco Dotta
Fixed in version set to 3.0.0
Version changed from 2.0.0-final-29 to 3.0.0-210
This works fine with 3.0.1-RC1, and I'm pretty sure this would work just fine also with 3.0.0 (but haven't tested it).