Community
Participate
Working Groups
3.2 When IJavaProject.setRawClasspath modifies the .classpath file it calls validateEdit before the modification. As it has no context it passes 'null' as context. Unfortunatly validateEdit is not very useful to the user without context. The user expects to be prompted when a file is checked-out, but won't if context is null. (see for example bug 141451). IMO it should be avoided to call validateEdit with null. I see no other solution than adding new API on setRawClasspath that also takes a context. I agree that this looks ugly. The alternative is that jdt.ui changes it's calls to setRawClasspath to first call validateEdit on .classpath. In theory, jdt.ui doesn't know that the file is called .classpath. We have ~20 references to setRawClasspath so we would introduce a utility that replaces setRawClasspath and adds an additional validate edit first. API suggestion: IStatus setRawClasspath(IClasspathEntry[] entries, IPath outputLocation, Object validateEditContext, IProgressMonitor monitor)
Is this still needed ?