Example usage for org.eclipse.jdt.internal.core PackageFragmentRoot newDoesNotExistStatus

List of usage examples for org.eclipse.jdt.internal.core PackageFragmentRoot newDoesNotExistStatus

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.core PackageFragmentRoot newDoesNotExistStatus.

Prototype

protected JavaModelStatus newDoesNotExistStatus() 

Source Link

Usage

From source file:com.codenvy.ide.ext.java.server.internal.core.ClassFile.java

License:Open Source License

protected IStatus validateExistence(File underlyingResource) {
    // check whether the class file can be opened
    IStatus status = validateClassFile();
    if (!status.isOK())
        return status;
    if (underlyingResource != null) {
        if (!underlyingResource.exists())
            return newDoesNotExistStatus();
        PackageFragmentRoot root;
        if ((underlyingResource instanceof IFolder) && (root = getPackageFragmentRoot()).isArchive()) { // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=204652
            return root.newDoesNotExistStatus();
        }/*from w  w  w .  j av  a 2s .  c  o  m*/
    }
    return JavaModelStatus.VERIFIED_OK;
}