Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 165231

Summary: Unload profiling data doesn't ask to save resources
Product: z_Archived Reporter: Marius Slavescu <slavescu>
Component: TPTPAssignee: Liz Dancy <lizdancy>
Status: CLOSED WORKSFORME QA Contact:
Severity: major    
Priority: P1 CC: jkubasta
Version: unspecifiedKeywords: plan
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: closed460
Attachments:
Description Flags
Patch none

Description Marius Slavescu CLA 2006-11-20 16:57:00 EST
If you profile a Java application and then before you save the agent file use Unload Profiling data action you'll lose the new agent when you do an Refresh from  local workspace.
Comment 1 Eugene Chan CLA 2007-01-12 18:12:38 EST
Add a dialog prompting user for an option to save resource before unloading if resources is marked dirty.
Comment 2 Liz Dancy CLA 2007-03-13 15:08:58 EDT
Created attachment 60718 [details]
Patch

I have attached a preliminary patch. It removes the reset of the agent's resource to unmodified in a specific case. This seemed to be the safest option as there is one specific case where it was failing to read the resource as modified but I'm not 100% confident that this will not affect another case despite running tests on the patch. Let me know what you think when you have a chance to review it. This did not turn out to be a case where the dialog was missing but rather a case where the resource was being set as unmodified before the modification could be flagged and so the correct dialog existed but was not being opened.
Comment 3 Eugene Chan CLA 2007-03-15 10:14:51 EDT
The patch will fail the (auto) refresh UI of the statistical view. I think there is a problem with setModified(false) in this refresh UI code in the first place as it mess up the usage of isModified() in all other place.

Liz, I think you are on the right path but the refresh UI needs to be considered also. The refresh UI may actually needs a different approach actually.

Thanks also for your work on this.
Comment 4 Liz Dancy CLA 2007-03-16 10:09:56 EDT
Retargeting to i3 as this needs to be revisited in some detail.
Comment 5 Liz Dancy CLA 2007-03-26 10:25:44 EDT
Updating the estimated time after further investigation.
Comment 6 Liz Dancy CLA 2007-07-16 09:36:27 EDT
This has been fixed in 4.4.0.1. A dialog now presents all unsaved files before unloading profiling data. Closing as WORKSFORME.
Comment 7 Paul Slauenwhite CLA 2009-06-30 09:38:16 EDT
As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this originator of this enhancement/defect has an inactive Bugzilla account and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open.