Community
Participate
Working Groups
20030813 CreateCompilationUnitOperation.executeOperation() does not force IFile creation if IFile returns 'false' to 'exists()'. However, IFile.create specifies that 'force' should be used to control how to deal with resources being (or not) in synch with file system, not with resources existing or not. so, what happens is that an IFile, whose physical representation does really exist on disk (the IFile returns 'false' to 'exists()' but is out of sych with the file system), is not forced to be created which results in a JavaModelException. because of the mismatch in semantics of 'force' in jcore and core i'm not able to force creation of a compilation unit, because IFile.create still gets passed a 'false' as the 'force' argument
Changed CreateCompilationUnitOperation.executeOperation() to use the force flag even if the file is thought to not exist. Added regression test CreateCompilationUnitTests.testForce()
Verified.