Bug 50320 - Java model operations should use IResourceRuleFactory
Summary: Java model operations should use IResourceRuleFactory
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M7   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-21 05:17 EST by Jerome Lanneluc CLA
Modified: 2004-02-12 13:36 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jerome Lanneluc CLA 2004-01-21 05:17:03 EST
Build 20041020

For now, using IFile.setContents(...) uses a scheduling rule that is the IFile 
itself. Thus CreateElementInCUOperation uses a scheduling rule that is the 
IFile too. However if IFile.setContents(...) was to change its behavior and use 
a scheduling rule that is the parent folder, CreateElementInCUOperation would 
fail.

Thus this operation (and Java model operations in general) should use an 
IResourceRuleFactory (see IWorkspace.getRuleFactory()) to create the scheduling 
rule, so that it is not dependent on the Platform Core behavior.
Comment 1 Jerome Lanneluc CLA 2004-01-23 09:31:26 EST
Fixed CommitWorkingCopyOperation, CreateCompilationUnitOperation and 
CreateElementInCUOperation to use IResourceRuleFactory.modifyRule(IResource) 
and createRule(IResource)
Comment 2 David Audel CLA 2004-02-12 13:36:17 EST
Verified for 3.0M7