Bug 308007 - Change Run and Debug buttons to work more intelligently
Summary: Change Run and Debug buttons to work more intelligently
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: IDE4EDU (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-02 14:14 EDT by Miles Billsman CLA
Modified: 2014-01-09 15:38 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Miles Billsman CLA 2010-04-02 14:14:10 EDT
The Run and Debug buttons throughout the Java Lite perspective should work in the following manner:

- If the code (.java file) in the top editor is a class with a main method, run or debug it.
- If the code in the top editor is not a class with a main method:
	* then run or debug the last program that was run (i.e. work like current Run Last and Debug Last actions work)
	* if nothing has been run previously, alert the user that they must have a Java class with a main method open to run or debug a program.
Comment 1 Miles Billsman CLA 2010-04-04 02:50:08 EDT
In working on Bug 299848 I realized that the Run and Debug functionality above is pretty much available in the JDT code. I've made it work as stated above if the patch I submitted for Bug 299848 is accepted.
Comment 2 Cory Matheson CLA 2010-04-04 17:42:09 EDT
Just an idea to float by everyone..

As another potential simplification for our target user, what if we just made "Run" always "Debug" (I think we talked about this before)? Then we could do away with having both, and just keep it as "Run" only? That way the user gets the benefit of always being in debug mode (and lets be honest, they are probably going to be making mistakes, adding breakpoints, debugging stack traces, etc.).

Does anyone else think this would be useful?
Comment 3 Miles Billsman CLA 2010-04-04 18:04:08 EDT
Right. I forgot about that. The single Run/Debug action would be more Matlab-like which I think works well for small projects and academic assignments. I do think this is a good idea. I like that it gives a strong hint to students that debugging is not a separate concern from developing and testing their programs.
Comment 4 Brenda Sadoway CLA 2010-04-04 19:33:27 EDT
I also like this idea.  It was hard to start using the debugger faithfully after having programmed without it for so long in my introductory classes.  If students could skip past the entire transition from print statements to breakpoints, that would be very beneficial in my opinion.