Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: IBM Corporation - initial API and implementation /
package org.eclipse.jdt.core;
import  org.eclipse.core.runtime.IPath;
import  org.eclipse.core.runtime.IStatus;

Represents the outcome of an Java model operation. Status objects are used inside JavaModelException objects to indicate what went wrong.

Java model status object are distinguished by their plug-in id: getPlugin returns "org.eclipse.jdt.core". getCode returns one of the status codes declared in IJavaModelStatusConstants.

A Java model status may also carry additional information (that is, in addition to the information defined in IStatus):

  • elements - optional handles to Java elements associated with the failure
  • string - optional string associated with the failure

See also:
org.eclipse.core.runtime.IStatus
IJavaModelStatusConstants
Noimplement:
This interface is not intended to be implemented by clients.
public interface IJavaModelStatus extends IStatus {
Returns any Java elements associated with the failure (see specification of the status code), or an empty array if no elements are related to this particular status code.

Returns:
the list of Java element culprits
See also:
IJavaModelStatusConstants
Returns the path associated with the failure (see specification of the status code), or null if the failure is not one of DEVICE_PATH, INVALID_PATH, PATH_OUTSIDE_PROJECT, or RELATIVE_PATH.

Returns:
the path that caused the failure, or null if none
See also:
IJavaModelStatusConstants.DEVICE_PATH
IJavaModelStatusConstants.INVALID_PATH
IJavaModelStatusConstants.PATH_OUTSIDE_PROJECT
IJavaModelStatusConstants.RELATIVE_PATH
IPath getPath();
Returns the string associated with the failure (see specification of the status code), or null if no string is related to this particular status code.

Deprecated:
Use IStatus.getMessage() instead
Returns:
the string culprit, or null if none
See also:
IJavaModelStatusConstants
Returns whether this status indicates that a Java model element does not exist. This convenience method is equivalent to getCode() == IJavaModelStatusConstants.ELEMENT_DOES_NOT_EXIST.

Returns:
true if the status code indicates that a Java model element does not exist
See also:
IJavaModelStatusConstants.ELEMENT_DOES_NOT_EXIST
boolean isDoesNotExist();
New to GrepCode? Check out our FAQ X