Bug 4023 - Prompt user for save and build before run (1GGCBO0)
Summary: Prompt user for save and build before run (1GGCBO0)
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 2.0   Edit
Hardware: All Windows 2000
: P1 critical (vote)
Target Milestone: ---   Edit
Assignee: Joe Szurszewski CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 4055 5596 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-10-10 23:04 EDT by Erich Gamma CLA
Modified: 2001-11-15 16:07 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erich Gamma CLA 2001-10-10 23:04:46 EDT
EG (7/4/01 2:59:46 PM)
	when the user presses run we should prompt for saving
	the changes before doing a build.

NOTES:
Comment 1 Martin Aeschlimann CLA 2001-10-16 11:12:48 EDT
moved to 'active'
Comment 2 Erich Gamma CLA 2001-10-20 11:50:13 EDT
*** Bug 4055 has been marked as a duplicate of this bug. ***
Comment 3 Martin Aeschlimann CLA 2001-10-22 08:15:41 EDT
Shoudn't this be a general launch concept?
Should then be added to depug.core / ui
Comment 4 Darin Wright CLA 2001-10-31 15:14:55 EST
This will be considered as part of the launch configuration re-work.
Comment 5 Darin Wright CLA 2001-11-06 17:38:34 EST
*** Bug 5596 has been marked as a duplicate of this bug. ***
Comment 6 Carolyn MacLeod CLA 2001-11-08 00:55:01 EST
I was surprised to discover that this wasn't how Eclipse worked by default.
VAME always brought up a dialog when you pressed the running man.
(I just tried VAME now to make sure it was not my faulty memory <g>).

Please note that should be a YES/NO/CANCEL dialog - all 3 are important.
FYI, the VAME dialog's message was as follows:
   Text has been modified. Save changes?

This issue has become quite important - there is a lengthy discussion about it 
on Eclipse Corner. I highly recommend we add the dialog very soon.
Comment 7 Darin Wright CLA 2001-11-14 16:45:20 EST
I have added the standard "save dirty editors" dialog when run/debug is 
pressed. I use IWorkbenchPage.saveAllEditors(boolean) to do this, for all 
workbench pages in all workbench windows. The unfortunate thing is that if the 
same file is open in > 1 editor in different pages, the prompt appears N times 
(if the user declines to save). However, I noticed the same thing happens when 
shutting down the workbench.

I will add a debug preference to "build before run/debug". 

It would be nice to put the "build" option right in the save dialog, but that 
would require duplicating all the "save" code currently in the workbench.
Comment 8 Darin Wright CLA 2001-11-14 18:20:40 EST
Added "Build (if required) before launching" preference to the debug preference 
page. By default the preference is on. When the preference is checked, the user 
is prompted to save any unsaved editors, and then the workspace is built before 
launching.
Comment 9 Darin Wright CLA 2001-11-14 18:21:16 EST
Please verify (Joe)
Comment 10 Joe Szurszewski CLA 2001-11-15 16:07:52 EST
Verified.