case NO_LOCAL_CONTENTS :
return Messages.bind(Messages.status_noLocalContents, getPath().toString());
case CP_CONTAINER_PATH_UNBOUND:
IJavaProject javaProject = (IJavaProject)elements[0];
ClasspathContainerInitializer initializer = JavaCore.getClasspathContainerInitializer(this.path.segment(0));
String description = null;
if (initializer != null) description = initializer.getDescription(this.path, javaProject);
if (description == null) description = path.makeRelative().toString();
return Messages.bind(Messages.classpath_unboundContainerPath, new String[] {description, javaProject.getElementName()});
case INVALID_CP_CONTAINER_ENTRY:
javaProject = (IJavaProject)elements[0];
IClasspathContainer container = null;
description = null;
try {
container = JavaCore.getClasspathContainer(path, javaProject);
} catch(JavaModelException e){
// project doesn't exist: ignore
}
if (container == null) {
initializer = JavaCore.getClasspathContainerInitializer(path.segment(0));
if (initializer != null) description = initializer.getDescription(path, javaProject);
} else {
description = container.getDescription();
}
if (description == null) description = path.makeRelative().toString();
return Messages.bind(Messages.classpath_invalidContainer, new String[] {description, javaProject.getElementName()});
case CP_VARIABLE_PATH_UNBOUND:
javaProject = (IJavaProject)elements[0];
return Messages.bind(Messages.classpath_unboundVariablePath, new String[] {path.makeRelative().toString(), javaProject.getElementName()});
case CLASSPATH_CYCLE:
javaProject = (IJavaProject)elements[0];
return Messages.bind(Messages.classpath_cycle, javaProject.getElementName());
case DISABLED_CP_EXCLUSION_PATTERNS:
javaProject = (IJavaProject)elements[0];
String projectName = javaProject.getElementName();
IPath newPath = path;
if (path.segment(0).toString().equals(projectName)) {
newPath = path.removeFirstSegments(1);
}
return Messages.bind(Messages.classpath_disabledInclusionExclusionPatterns, new String[] {newPath.makeRelative().toString(), projectName});
case DISABLED_CP_MULTIPLE_OUTPUT_LOCATIONS:
javaProject = (IJavaProject)elements[0];
projectName = javaProject.getElementName();
newPath = path;
if (path.segment(0).toString().equals(projectName)) {
newPath = path.removeFirstSegments(1);
}
return Messages.bind(Messages.classpath_disabledMultipleOutputLocations, new String[] {newPath.makeRelative().toString(), projectName});
case INCOMPATIBLE_JDK_LEVEL:
javaProject = (IJavaProject)elements[0];
return Messages.bind(Messages.classpath_incompatibleLibraryJDKLevel, new String[]{
javaProject.getElementName(),
javaProject.getOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, true),
path.makeRelative().toString(),
string,
});
case CANNOT_RETRIEVE_ATTACHED_JAVADOC :
if (elements != null && elements.length == 1) {
if (this.string != null) {
return Messages.bind(Messages.status_cannot_retrieve_attached_javadoc, ((JavaElement)elements[0]).toStringWithAncestors(), this.string);
}
return Messages.bind(Messages.status_cannot_retrieve_attached_javadoc, ((JavaElement)elements[0]).toStringWithAncestors(), ""); //$NON-NLS-1$
}
if (this.string != null) {
return Messages.bind(Messages.status_cannot_retrieve_attached_javadoc, this.string, "");//$NON-NLS-1$
}
break;
case UNKNOWN_JAVADOC_FORMAT :
return Messages.bind(Messages.status_unknown_javadoc_format, ((JavaElement)elements[0]).toStringWithAncestors());
case DEPRECATED_VARIABLE :
javaProject = (IJavaProject)elements[0];
return Messages.bind(Messages.classpath_deprecated_variable, new String[] {path.segment(0).toString(), javaProject.getElementName(), this.string});
}
if (string != null) {
return string;
} else {
return ""; //$NON-NLS-1$