<s> package org . eclipse . jdt . internal . core ; import org . eclipse . core . resources . IProject ; import org . eclipse . core . runtime . IPath ; import org . eclipse . jdt . core . IClasspathEntry ; import org . eclipse . jdt . core . IJavaModelStatus ; import org . eclipse . jdt . core . JavaModelException ; import org . eclipse . jdt . internal . core . builder . JavaBuilder ; public class ClasspathValidation { private JavaProject project ; public ClasspathValidation ( JavaProject project ) { this . project = project ; } public void validate ( ) { JavaModelManager . PerProjectInfo perProjectInfo ; try { perProjectInfo = this . project . getPerProjectInfo ( ) ; } catch ( JavaModelException e ) { IProject resource = this . project . getProject ( ) ; if ( resource . isAccessible ( ) ) { this . project . flushClasspathProblemMarkers ( true , true ) ; JavaBuilder . removeProblemsAndTasksFor ( resource ) ; } return ; } IClasspathEntry [ ] rawClasspath ; IPath outputLocation ; IJavaModelStatus status ; synchronized ( perProjectInfo ) { rawClasspath = perProjectInfo . rawClasspath ; outputLocation = perProjectInfo . outputLocation ; status = perProjectInfo . rawClasspathStatus ; } this . project . flushClasspathProblemMarkers ( false , true ) ; if ( ! status . isOK ( ) ) this . project . createClasspathProblemMarker ( status ) ; this . project . flushClasspathProblemMarkers ( false , false ) ; if ( rawClasspath != JavaProject . INVALID_CLASSPATH && outputLocation != null ) { for ( int i = 0 ; i < rawClasspath . length ; i ++ ) { status = ClasspathEntry . validateClasspathEntry ( this . project , rawClasspath [ i ] , false , false ) ; if ( ! status . isOK ( ) ) { this . project . createClasspathProblemMarker ( status ) ; } } status = ClasspathEntry . validateClasspath ( this . project , rawClasspath , outputLocation ) ; if ( ! status . isOK ( ) ) this . project . createClasspathProblemMarker ( status ) ; } } } </s>