Bug 171779 - [launching] Launch configurations should be validated prior to launching
Summary: [launching] Launch configurations should be validated prior to launching
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 170897 224797 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-01-26 07:09 EST by Guy Korland CLA
Modified: 2012-11-20 12:47 EST (History)
4 users (show)

See Also:


Attachments
work in progress (3.48 KB, patch)
2007-04-17 15:10 EDT, Michael Rennie CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Guy Korland CLA 2007-01-26 07:09:14 EST
Build ID:  

Steps To Reproduce:
1. Create Java Application "Run".
2. Add to the class path another project.
3. Close this other project.
4. Try to run the application.
5. The application won't start without any error.


More information:
Comment 1 Michael Rennie CLA 2007-04-04 17:18:20 EDT
*** Bug 170897 has been marked as a duplicate of this bug. ***
Comment 2 Michael Rennie CLA 2007-04-17 15:10:29 EDT
Created attachment 64083 [details]
work in progress

We could definatley improve this behavior. 

Currently when trying to resolve the runtime classpath, if we encounter a project entry that either is not open or does not exist, we simply leave it off the classpath. It would be better if there was some kind of feedback to the user that something is wrong with their classath instead of just leaving off potentially important entries. Similarly, we do flag this kind of error in the launch dialog and will not allow a user to launch the configuration until it is fixed...
Comment 3 Darin Wright CLA 2007-04-20 11:22:14 EDT
I think there is a larger problem here (this is just a instance of the problem). When launching a config, we do not perform any "config specific validation" before launching. The dialog does this validation, but the launch API has no infrastruture for this outside the dialog (except we look for compilation errors before launching).

Ideally we should validate a config before launching it, and open the dialog when a config is not valid. I'd prefer to defer this fix for the more general solution.

The problem with the patch is that it opens an error dialog and logs an error to the .log file. The logging is performed by the job manager - we don't want the error logged, we just want to open an error dialog.
Comment 4 Darin Wright CLA 2007-04-20 11:44:18 EDT
Marking as "Assigned" (This is our new experimental "LATER/FUTURE" setting - we accept that it's a bug/feature and have assigned it with no target milestone).
Comment 5 Michael Rennie CLA 2008-03-31 11:57:20 EDT
*** Bug 224797 has been marked as a duplicate of this bug. ***
Comment 6 Michael Rennie CLA 2008-03-31 12:01:46 EDT
The grand solution to this - along the config validation path - would be to have extensible configuration validation participants (or the like), so contributors can use the default validation or extend it as they see fit.
Comment 7 Curtis Windatt CLA 2012-11-20 12:47:03 EST
Comment on attachment 64083 [details]
work in progress

Marking patch as obsolete as it is an incomplete solution that hasn't been looked at for years.