Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 54925 - want option to not run programs with errors
Summary: want option to not run programs with errors
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 enhancement (vote)
Target Milestone: 3.0 M8   Edit
Assignee: Darin Wright CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 11974 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-03-15 19:55 EST by John Wiegand CLA
Modified: 2014-11-27 22:34 EST (History)
3 users (show)

See Also:


Attachments
patch to debug.core (1.03 KB, patch)
2004-03-18 19:51 EST, Kevin Barnes CLA
no flags Details | Diff
patch to debug.ui (1.16 KB, patch)
2004-03-18 19:52 EST, Kevin Barnes CLA
no flags Details | Diff
patch to jdt.debug.tests (1.17 KB, patch)
2004-03-18 19:53 EST, Kevin Barnes CLA
no flags Details | Diff
patch to jdt.debug.ui (4.11 KB, patch)
2004-03-18 19:54 EST, Kevin Barnes CLA
no flags Details | Diff
preference page patch (debug.ui) (2.94 KB, patch)
2004-03-19 13:31 EST, Kevin Barnes CLA
no flags Details | Diff
patch (jdt.debug.tests) (1.79 KB, patch)
2004-03-19 13:33 EST, Kevin Barnes CLA
no flags Details | Diff
preference page patch (jdt.debug.ui) (9.80 KB, patch)
2004-03-19 13:35 EST, Kevin Barnes CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Wiegand CLA 2004-03-15 19:55:04 EST
20040310

1. Create a simple program with an error [like:

public class Main {
	public static void main(String[] args) {
		System.out.println("hi there" + foo());
	}
	private static int foo() {
		return "test";
	}
}

2. Run As -> Java Application

I would like to be told that this program has an error (perhaps run/debug 
anyway?)  This reminds me when a program was unintentionally broken.  
Especially important when run (and debug) setup times are long.

(this feature is useful in conjunction with bug 45887)
Comment 1 Darin Wright CLA 2004-03-15 21:16:50 EST
John, we've had this request before, but we dismissed generic (platform) 
support, since it is unclear if the debug platform can detect relevant errors 
for contributed debuggers/launchers.

I could imagine domain specific handlers that could plug into the platform's 
lanunching sequence, perhaps, along with launcher domain specific builders. Is 
that what you had in mind?
Comment 2 Darin Wright CLA 2004-03-15 21:21:29 EST
*** Bug 11974 has been marked as a duplicate of this bug. ***
Comment 3 John Wiegand CLA 2004-03-15 21:31:06 EST
I gave an example for the jdt case and have heard others asking for the jdt 
situation.  We heard a similar cdt request at eclipsecon.  I don't know if the 
best solution is to provide a general purpose solution (with handlers) or to do 
the work in jdt (and provide documentation on how others could do the same)?  

My proposal would be to provide the jdt specific solution now and see if there 
is anything can can be generally documented (or in the best case, provided)
Comment 4 Darin Wright CLA 2004-03-16 13:32:51 EST
Extensions to ILaunchConfigrationDelegate2 will allow for this, and for bug 
45887.
Comment 5 Darin Wright CLA 2004-03-16 13:40:04 EST
Will check for compilation errors in referenced Java projects (For local Java 
Apps, Applets, JUnit, Remote Java Apps). PDE will need a seperate 
implementation as they do not inherit from the abstract java launcher (I 
think). However, we can provide some convenience API for them.
Comment 6 Kevin Barnes CLA 2004-03-18 13:24:32 EST
patches submitted to address this bug as well as bug #6400 and bug #45887 at 
once. Patches attached to bug #45887
Darin, please verify
Comment 7 Darin Wright CLA 2004-03-18 15:24:49 EST
Applied patch. Need associated preference on the "Java > Debug" pref page to 
turn on/off prompting.
Comment 8 Kevin Barnes CLA 2004-03-18 19:51:14 EST
Created attachment 8672 [details]
patch to debug.core

moved code to create new NullProgressMonitor above call to preLaunchCheck() to
prevent NPE from test suite.
Comment 9 Kevin Barnes CLA 2004-03-18 19:52:10 EST
Created attachment 8673 [details]
patch to debug.ui

created new preferences in IDebugUIConstants
Comment 10 Kevin Barnes CLA 2004-03-18 19:53:46 EST
Created attachment 8674 [details]
patch to jdt.debug.tests

set preference to prevent dialog during tests.
Comment 11 Kevin Barnes CLA 2004-03-18 19:54:41 EST
Created attachment 8675 [details]
patch to jdt.debug.ui

updated status handlers to use new preference added to IDebugUIConstants
Comment 12 Kevin Barnes CLA 2004-03-18 19:58:15 EST
Darin, please apply patches for tomorrows test run.
Still need to be able to change "I don't ever want to run with compile errors" 
preference on preference page... please reassign this bug to me.
Comment 13 Darin Wright CLA 2004-03-18 22:51:06 EST
Applied patch. In addition:

* Moved "compile errors" peference to Java Debug (since it will start as a 
java specific option).
* Moved breakpoint detection code to debug platform so all launchers that 
subclass our abstract delegate inherit the behavior.

Reassigning for preference page settings for the following prefs:

* IDebugUIConstants.PREF_RELAUNCH_IN_DEBUG_MODE - should be on main debug page
* IJavaDebugUIConstants.PREF_CONTINUE_WITH_COMPILE_ERROR - on Java page
Comment 14 Kevin Barnes CLA 2004-03-19 13:31:10 EST
Created attachment 8701 [details]
preference page patch (debug.ui)

changes in DebugPreferencePage and DebugPreferencesMessages
Comment 15 Kevin Barnes CLA 2004-03-19 13:33:15 EST
Created attachment 8702 [details]
patch (jdt.debug.tests)

changes in ProjectCreationDecoration (changed the preference store, and the
location of the constant)
Comment 16 Kevin Barnes CLA 2004-03-19 13:35:41 EST
Created attachment 8703 [details]
preference page patch (jdt.debug.ui)

changes to IJavaDebugConstants, IJDIPreferencesConstants, JDIDebugUIPlugin,
JavaDebugPreferencePage, and CompileErrorPromptStatusHandler
Comment 17 Kevin Barnes CLA 2004-03-19 13:37:18 EST
Darin, please verify 2004-03-19 patches.
-thanks
Comment 18 Darin Wright CLA 2004-03-19 14:30:17 EST
Applied patch.
Comment 19 Darin Wright CLA 2004-03-19 14:31:28 EST
Verified. We now have a Java specific solution that ties into the 
ILaunchDelegate2 support (pre launch checks). Others could implement their own 
solution using the same approach. I will file a new bug to look at ways of 
leveraging the suppor for other "java like" launchers.