Bug 14758 - ILaunchConfigurationTab#performApply called twice on hitting the Apply button
Summary: ILaunchConfigurationTab#performApply called twice on hitting the Apply button
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 2.0   Edit
Hardware: PC other
: P1 major (vote)
Target Milestone: 2.1 M3   Edit
Assignee: Joe Szurszewski CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 25461 26027 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-04-26 12:33 EDT by Darin Swanson CLA
Modified: 2020-04-22 03:15 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Swanson CLA 2002-04-26 12:33:39 EDT
For any tab, performApply(ILaunchConfigurationWorkingCopy) is called twice from 
LaunchConfigurationDialog.doSave(): once in updateWorkingCopyFromPages() and 
once in isWorkingCopyDirty()
Comment 1 Darin Wright CLA 2002-04-26 13:02:01 EDT
Please investigate. (NOTE: There is no harm to calling perform apply twice - 
i.e. it breaks no contracts/API. I think this may be part of our logic to 
determine if there are any changes made.)
Comment 2 Joe Szurszewski CLA 2002-05-17 18:44:25 EDT
This is a fair point:  doSave() does an explicit call to updateWorkingCopyFromPages(), then 
immediately does a call to isWorkingCopyDirty().  This last method also does a call to 
updateWorkingCopyFromPages(), after a few preliminary checks.  It seems that we could just 
remove the explicit call in doSave(), but at this late stage in 2.0, that's a little scary.  
Deferring for post-2.0.
Comment 3 Darin Swanson CLA 2002-06-26 11:16:57 EDT
Resolving to later.
Comment 4 Darin Wright CLA 2002-10-29 09:39:44 EST
*** Bug 25461 has been marked as a duplicate of this bug. ***
Comment 5 Darin Wright CLA 2002-10-29 09:39:59 EST
Re-opening
Comment 6 Joe Szurszewski CLA 2002-10-31 17:07:52 EST
Made fix by removing explicit call to updateWorkingCopyFromPages() from doSave().
Comment 7 Joe Szurszewski CLA 2002-10-31 17:08:08 EST
Please verify, Darin W.
Comment 8 Darin Wright CLA 2002-10-31 18:18:41 EST
Verified
Comment 9 Darin Wright CLA 2002-11-12 10:25:13 EST
Re-opening. This fix has caused a problem - bug 26027.
Comment 10 Darin Wright CLA 2002-11-12 10:25:54 EST
*** Bug 26027 has been marked as a duplicate of this bug. ***
Comment 11 Darin Wright CLA 2002-11-12 10:34:36 EST
Fixed, by adding call to "update working copy" when constructing a new 
configuration.
Comment 12 Darin Wright CLA 2002-11-12 10:35:03 EST
please verify, Joe.
Comment 13 Joe Szurszewski CLA 2002-11-12 15:37:51 EST
Verified.
Comment 14 Wassim Melhem CLA 2002-11-18 15:48:21 EST
Joe,
The problem is still there in M3.  Please re-open.
Comment 15 Joe Szurszewski CLA 2002-11-19 12:04:58 EST
Re-opening.
Comment 16 Joe Szurszewski CLA 2002-11-19 12:05:56 EST
The problem as originally described seems to be fixed.  When clicking Run/Debug, 
there ARE two calls to performApply(), but only one is from doSave(), the other 
is from doLaunch() (both these methods do calls to isWorkingCopyDirty()).  I'm 
not sure that this is a serious issue.  Darin W, comments?
Comment 17 Wassim Melhem CLA 2002-11-19 12:45:09 EST
The problem that I described in bug 25461 is still there.
Calling performApply() "twice" upon exiting a page that contains info about 
>1000 plugins results in the data being saved unnecessarily for a second time, 
and causes a very noticeable delay when developing against products such as 
WSADIE.
PDE currently has over-protective checks for this second unnecessary call to 
performApply() and does nothing on the second call.  However, PDE should not 
have to do that.
Comment 18 Darin Wright CLA 2002-11-21 17:25:51 EST
Fixed.
Comment 19 Darin Wright CLA 2002-11-21 17:26:05 EST
Please verify, Joe.
Comment 20 Joe Szurszewski CLA 2002-12-03 12:04:56 EST
Verified.