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 157069 - Shift-F6 for a scala file with a main method does not work
Summary: Shift-F6 for a scala file with a main method does not work
Status: REOPENED
Alias: None
Product: contrib
Classification: Unclassified
Component: Scala (show other bugs)
Version: 7.0.1
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: _ dcaoyuan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-19 15:22 UTC by andreou
Modified: 2012-11-30 11:02 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description andreou 2009-01-19 15:22:24 UTC
I create a "Scala Application Main Object", producing this code:

object newMain {

 /**
  * @param args the command line arguments
  */
 def main(args: Array[String]) = {
   println("Hello, world!")
 }

}

And then hit Shift-F6 and a dialog pops up: Class "newMain" does not have a main method.

Hitting F6 runs the main class file normally (whichever the project is configured with).
Comment 1 _ dcaoyuan 2009-01-19 16:40:03 UTC
Have you checked the project properties setting:

Right click on project node, choose "Properties", then click "Run", there is a field "Main Class:"
Comment 2 andreou 2009-01-19 18:03:52 UTC
To clarify, running the main class is fine, I referred to the feature "Run File" typically available in java projects, 
where you only have to open any source file declaring a main method, and do Shift-F6, which invokes it.

At least you acknowledge the issue? Or is it something that happens only to me?
Comment 3 _ dcaoyuan 2009-05-06 14:35:06 UTC
Fixed: rev/8fe006d9f245
Thanks for patch from Ståle Undheim <staale@netbeans.org>
Comment 4 adnim 2011-09-06 18:20:12 UTC
Shift-F6 broken on individual files in 7.0.1.

Currently only reproducible with a manually added file, as the Wizard for creating a "Scala Application Main Object" does never finish. (I didn't create a ticket for this)
Comment 5 datadiggers 2012-11-30 11:02:24 UTC
Workaround:
Restart the IDE.

As no new comments has been added for over a year I would like to confirm that the bug still exists in nbscala-nb7.2-s2.10.0-v0.2 and Netbeans 7.2.