<s> package org . eclipse . jdt . core ; import org . eclipse . core . runtime . * ; import org . eclipse . jdt . internal . core . JavaModelStatus ; public abstract class ClasspathContainerInitializer { public static final int ATTRIBUTE_NOT_SUPPORTED = 1 ; public static final int ATTRIBUTE_READ_ONLY = 2 ; public ClasspathContainerInitializer ( ) { } public abstract void initialize ( IPath containerPath , IJavaProject project ) throws CoreException ; public boolean canUpdateClasspathContainer ( IPath containerPath , IJavaProject project ) { return false ; } public void requestClasspathContainerUpdate ( IPath containerPath , IJavaProject project , IClasspathContainer containerSuggestion ) throws CoreException { } public String getDescription ( IPath containerPath , IJavaProject project ) { return containerPath . makeRelative ( ) . toString ( ) ; } public IClasspathContainer getFailureContainer ( final IPath containerPath , IJavaProject project ) { final String description = getDescription ( containerPath , project ) ; return new IClasspathContainer ( ) { public IClasspathEntry [ ] getClasspathEntries ( ) { return new IClasspathEntry [ 0 ] ; } public String getDescription ( ) { return description ; } public int getKind ( ) { return 0 ; } public IPath getPath ( ) { return containerPath ; } public String toString ( ) { return getDescription ( ) ; } } ; } public Object getComparisonID ( IPath containerPath , IJavaProject project ) { if ( containerPath == null ) { return null ; } else { return containerPath . segment ( 0 ) ; } } public IStatus getAccessRulesStatus ( IPath containerPath , IJavaProject project ) { if ( canUpdateClasspathContainer ( containerPath , project ) ) { return Status . OK_STATUS ; } return new JavaModelStatus ( ATTRIBUTE_READ_ONLY ) ; } public IStatus getAttributeStatus ( IPath containerPath , IJavaProject project , String attributeKey ) { if ( canUpdateClasspathContainer ( containerPath , project ) ) { return Status . OK_STATUS ; } return new JavaModelStatus ( ATTRIBUTE_READ_ONLY ) ; } public IStatus getSourceAttachmentStatus ( IPath containerPath , IJavaProject project ) { if ( canUpdateClasspathContainer ( containerPath , project ) ) { return Status . OK_STATUS ; } return new JavaModelStatus ( ATTRIBUTE_READ_ONLY ) ; } } </s>