| Summary: | org.eclipse.wst.common.component file incorrectly marked as need to be written | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Java EE Tools | Reporter: | Edwin Chan <edwinc> | ||||||
| Component: | jst.j2ee | Assignee: | Jason Peterson <jasonpet> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | Chuck Bridgham <cbridgha> | ||||||
| Severity: | major | ||||||||
| Priority: | P3 | CC: | ccc, david_williams, hungtran, joefh, jsholl, thatnitind | ||||||
| Version: | unspecified | Flags: | cbridgha:
review+
|
||||||
| Target Milestone: | 3.0.5 P | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
Created attachment 150742 [details]
Project Interchange File
The problem here is that validateEdit is called for all components (the added modules and the EAR) regardless of whether the structure edit model has changed for the component. This is why component files that are not updated are still prompting for checkout. In most cases the only component file that would have changed in this scenario is the EAR's component file. The fix is to check whether the structure edit is dirty before calling validateEdit. Created attachment 151600 [details]
patch
I did some regression testing on the patched code by running the JUnit test bucket. applied and fixed in patch builds >= P20091108210127 (But, please review, still, and apply to future streams as needed) Patch looks good checked into 31M and 32 |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 Build Identifier: IES 342 20091019_0953 In our adopting product, when a module is extracted from a source control system (i.e. ClearCase), the .settings/org.eclipse.wst.common.component file in the module is flagged as needing to be written, though it's not marked as dirty. Note that the .component file's content is never changed. As a result, when extracting the module from ClearCase, the ClearCase dialog prompts this file ".settings/org.eclipse.wst.common.component" needs to be checked out. It shouldn't prompt user to check out this file. is called for the .component file in question This happens in this piece of code: Workspace.validateEdit(IFile[], Object) line: 1997 ResourceStateValidatorImpl.validateState(ResourceStateValidatorPresenter) line: 330 ModuleStructuralModel(EditModel).validateState(ResourceStateValidatorPresenter) line: 643 ValidateEditUIContext.validateState() line: 47 ValidateEditUIContext(ValidateEditHeadlessContext).validateState(EditModel) line: 95 StructureEdit.validateEdit() line: 970 StructureEdit.saveIfNecessary(IProgressMonitor) line: 382 AddComponentToEnterpriseApplicationOp.updateEARDD(IProgressMonitor) line: 149 AddComponentToEnterpriseApplicationOp.execute(IProgressMonitor, IAdaptable) line: 74 DataModelPausibleOperationImpl$1.run(IProgressMonitor) line: 376 Workspace.run(IWorkspaceRunnable, ISchedulingRule, int, IProgressMonitor) line: 1800 The structureEdit is for the module mentioned. AddComponentToEnterpriseApplicationOp calls save on each structureEdit of each of its components. Reproducible: Always Steps to Reproduce: 1. Import HelloWorld 1 sample 2. Check all modules into ClearCase using Dynamic view 3. Start another workspace and import all modules from Clearcase view to workspace 4. Find a check-out popup for the following file: org.eclipse.wst.common.component Contact Joef Huang (joefh@ca.ibm.com) for ClearCase access