Class JavaModelStatus
java.lang.Object
org.eclipse.core.runtime.Status
org.aspectj.org.eclipse.jdt.internal.core.JavaModelStatus
- All Implemented Interfaces:
IJavaModelStatus, IJavaModelStatusConstants, org.eclipse.core.runtime.IStatus
public class JavaModelStatus
extends org.eclipse.core.runtime.Status
implements IJavaModelStatus, IJavaModelStatusConstants
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.eclipse.core.runtime.IStatus[]protected IJavaElement[]The elements related to the failure, ornullif no elements are involved.protected static final org.eclipse.core.runtime.IStatus[]Empty childrenprotected org.eclipse.core.runtime.IPathThe path related to the failure, ornullif no path is involved.protected StringTheStringrelated to the failure, ornullif noStringis involved.static final IJavaModelStatusSingleton OK objectFields inherited from class org.eclipse.core.runtime.Status
CANCEL_STATUS, OK_STATUSFields inherited from interface IJavaModelStatusConstants
BAD_TEXT_EDIT_LOCATION, BUILDER_INITIALIZATION_ERROR, BUILDER_SERIALIZATION_ERROR, CANNOT_RETRIEVE_ATTACHED_JAVADOC, CANNOT_RETRIEVE_ATTACHED_JAVADOC_TIMEOUT, CLASSPATH_CYCLE, COMPILER_FAILURE, CORE_EXCEPTION, CP_CONTAINER_PATH_UNBOUND, CP_INVALID_EXTERNAL_ANNOTATION_PATH, CP_VARIABLE_PATH_UNBOUND, DEPRECATED_VARIABLE, DEVICE_PATH, DISABLED_CP_EXCLUSION_PATTERNS, DISABLED_CP_MULTIPLE_OUTPUT_LOCATIONS, DOM_EXCEPTION, ELEMENT_DOES_NOT_EXIST, ELEMENT_NOT_ON_CLASSPATH, EVALUATION_ERROR, INCOMPATIBLE_JDK_LEVEL, INDEX_OUT_OF_BOUNDS, INVALID_CLASSPATH, INVALID_CLASSPATH_FILE_FORMAT, INVALID_CONTENTS, INVALID_CP_CONTAINER_ENTRY, INVALID_DESTINATION, INVALID_ELEMENT_TYPES, INVALID_NAME, INVALID_PACKAGE, INVALID_PATH, INVALID_PROJECT, INVALID_RESOURCE, INVALID_RESOURCE_TYPE, INVALID_SIBLING, IO_EXCEPTION, MAIN_ONLY_PROJECT_DEPENDS_ON_TEST_ONLY_PROJECT, NAME_COLLISION, NO_ELEMENTS_TO_PROCESS, NO_LOCAL_CONTENTS, NULL_NAME, NULL_PATH, NULL_STRING, OUTPUT_LOCATION_OVERLAPPING_ANOTHER_SOURCE, PATH_OUTSIDE_PROJECT, READ_ONLY, RELATIVE_PATH, TARGET_EXCEPTION, TEST_OUTPUT_FOLDER_MUST_BE_SEPARATE_FROM_MAIN_OUTPUT_FOLDERS, TEST_SOURCE_REQUIRES_SEPARATE_OUTPUT_LOCATION, UNKNOWN_JAVADOC_FORMAT, UPDATE_CONFLICTModifier and TypeFieldDescriptionstatic final intStatus constant indicating that a text edit can not be applied as there is a problem with the text edit location.static final intStatus constant indicating that the Java builder could not be initialized.static final intStatus constant indicating that the Java builder's last built state could not be serialized or deserialized.static final intStatus constant indicating that the attached javadoc content cannot be retrieved due to multiple reasons: invalid url, incorrect proxy, wrong authentication,...static final intStatus constant indicating that the attached javadoc content cannot be retrieved due to timeoutstatic final intStatus indicating that a project is involved in a build path cycle.static final intStatus constant indicating that a compiler failure occurred.static final intStatus constant indicating a core exception occurred.static final intStatus constant indicating that a container path was not resolvable indicating either the referred container is undefined, unbound.static final intStatus constant indicating that an external annotation path is invalid.static final intStatus constant indicating that a variable path was not resolvable indicating either the referred variable is undefined, unbound or the resolved variable path does not correspond to an existing file or folder.static final intStatus constant indicating that the variable is deprecated.static final intStatus constant indicating that a path specifying a device was supplied to the operation when a path with no device is required.static final intStatus constant indicating that an inclusion or an exclusion pattern got specified on a classpath source entry, though it was explicitely disabled according to its project preference settings.static final intStatus constant indicating that a specific output location got associated with a source entry, though it was explicitely disabled according to its project preference settings.static final intStatus constant indicating that aDOMExceptionoccurred.static final intStatus constant indicating that one or more elements supplied do not exist.static final intStatus constant indicating that an element is not on its project's claspath.static final intStatus constant indicating that an error was encountered while trying to evaluate a code snippet, or other item.static final intStatus constant indicating that a project is prerequisiting some library for which the classfile JDK version level is more recent than the project JDK target level setting.static final intStatus constant indicating the given source position is out of bounds.static final intStatus constant indicating that a classpath entry was invalidstatic final intStatus indicating that a .classpath file is ill-formed, and thus cannot be read/written successfully.static final intStatus constant indicating that the specified contents are not valid.static final intStatus constant indicating that a container path was resolved to invalid entries (null or container).static final intStatus constant indicating that a destination provided for a copy/move/rename operation is invalid.static final intStatus constant indicating one or more of the elements supplied are not of a valid type for the operation to process.static final intStatus constant indicating that a name provided is not syntactically correct.static final intStatus indicating that the package declaration in aICompilationUnitdoes not correspond to theIPackageFragmentit belongs to.static final intStatus constant indicating that a path provided to an operation is invalid.static final intStatus indicating that a Java element could not be created because the project owning underlying resource does not have the Java nature.static final intStatus indicating that a Java element could not be created because the underlying resource is invalid.static final intStatus indicating that a Java element could not be created because the underlying resource is not of an appropriate type.static final intStatus constant indicating that a sibling specified is not valid.static final intStatus constant indicating that anjava.io.IOExceptionoccurred.static final intStatus constant indicating that the project has only main source folders but depends on a project that has only test source folders.static final intStatus constant indicating that a naming collision would occur if the operation proceeded.static final intStatus constant indicating that no elements were provided to the operation for processing.static final intStatus indicating that the corresponding resource has no local contents yet.static final intStatus constant indicating thatnullwas specified as a name argument.static final intStatus constant indicating that anullpath was supplied to the operation.static final intStatus constant indicating that a string was supplied to the operation that wasnull.static final intStatus constant indicating that the default or specific output folder is overlapping with another source location.static final intStatus constant indicating that a path outside of the project was supplied to the operation.static final intStatus constant indicating that the operation encountered a read-only element.static final intStatus constant indicating that a relative path was supplied to the operation when an absolute path is required.static final intStatus constant indicating that aTargetExceptionoccurred.static final intStatus constant indicating that the output folder of a source folder marked to contain test sources is not separate from the output folders of main sources.static final intStatus constant indicating that a source folder marked to contain test sources has no separate output location, but the project also contains main sources.static final intStatus constant indicating that the attached javadoc content format is unrecognized.static final intStatus constant indicating there is an update conflict for a working copy.Fields inherited from interface org.eclipse.core.runtime.IStatus
CANCEL, ERROR, INFO, OK, WARNING -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an Java model status with no corresponding elements.JavaModelStatus(int code) Constructs an Java model status with no corresponding elements.JavaModelStatus(int severity, int code, String string) Constructs an Java model status with no corresponding elements.JavaModelStatus(int severity, int code, IJavaElement element, org.eclipse.core.runtime.IPath path, String msg) Constructs an Java model status with the given corresponding element and pathJavaModelStatus(int code, String string) Constructs an Java model status with no corresponding elements.JavaModelStatus(int code, Throwable throwable) Constructs an Java model status with no corresponding elements.JavaModelStatus(int code, IJavaElement element) Constructs an Java model status with the given corresponding element.JavaModelStatus(int code, IJavaElement[] elements) Constructs an Java model status with the given corresponding elements.JavaModelStatus(int code, IJavaElement element, String string) Constructs an Java model status with the given corresponding element and stringJavaModelStatus(int code, IJavaElement element, org.eclipse.core.runtime.IPath path) Constructs an Java model status with the given corresponding element and pathJavaModelStatus(int code, IJavaElement element, org.eclipse.core.runtime.IPath path, String string) Constructs an Java model status with the given corresponding element, path and stringJavaModelStatus(int code, org.eclipse.core.runtime.IPath path) Constructs an Java model status with no corresponding elements.JavaModelStatus(org.eclipse.core.runtime.CoreException coreException) Constructs an Java model status with no corresponding elements. -
Method Summary
Modifier and TypeMethodDescriptionprotected intgetBits()org.eclipse.core.runtime.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 message that is relevant to the code of this status.org.eclipse.core.runtime.IPathgetPath()Returns the path associated with the failure (see specification of the status code), ornullif the failure is not one ofDEVICE_PATH,INVALID_PATH,PATH_OUTSIDE_PROJECT, orRELATIVE_PATH.intDeprecated.booleanReturns whether this status indicates that a Java model element does not exist.booleanbooleanisOK()booleanmatches(int mask) protected booleanmatches(JavaModelStatus status, int mask) Helper for matches(int).static IJavaModelStatusnewMultiStatus(IJavaModelStatus[] children) Creates and returns a newIJavaModelStatusthat is a a multi-status status.toString()Returns a printable representation of this exception for debugging purposes.Methods inherited from class org.eclipse.core.runtime.Status
error, error, getCode, getException, getPlugin, info, setCode, setException, setMessage, setPlugin, setSeverity, warning, warning
-
Field Details
-
elements
The elements related to the failure, ornullif no elements are involved. -
path
protected org.eclipse.core.runtime.IPath pathThe path related to the failure, ornullif no path is involved. -
string
TheStringrelated to the failure, ornullif noStringis involved. -
NO_CHILDREN
protected static final org.eclipse.core.runtime.IStatus[] NO_CHILDRENEmpty children -
children
protected org.eclipse.core.runtime.IStatus[] children -
VERIFIED_OK
Singleton OK object
-
-
Constructor Details
-
JavaModelStatus
public JavaModelStatus()Constructs an Java model status with no corresponding elements. -
JavaModelStatus
public JavaModelStatus(int code) Constructs an Java model status with no corresponding elements. -
JavaModelStatus
Constructs an Java model status with the given corresponding elements. -
JavaModelStatus
Constructs an Java model status with no corresponding elements. -
JavaModelStatus
Constructs an Java model status with no corresponding elements. -
JavaModelStatus
Constructs an Java model status with no corresponding elements. -
JavaModelStatus
public JavaModelStatus(int code, org.eclipse.core.runtime.IPath path) Constructs an Java model status with no corresponding elements. -
JavaModelStatus
Constructs an Java model status with the given corresponding element. -
JavaModelStatus
Constructs an Java model status with the given corresponding element and string -
JavaModelStatus
Constructs an Java model status with the given corresponding element and path -
JavaModelStatus
public JavaModelStatus(int code, IJavaElement element, org.eclipse.core.runtime.IPath path, String string) Constructs an Java model status with the given corresponding element, path and string -
JavaModelStatus
public JavaModelStatus(int severity, int code, IJavaElement element, org.eclipse.core.runtime.IPath path, String msg) Constructs an Java model status with the given corresponding element and path -
JavaModelStatus
public JavaModelStatus(org.eclipse.core.runtime.CoreException coreException) Constructs an Java model status with no corresponding elements.
-
-
Method Details
-
getBits
protected int getBits() -
getChildren
public org.eclipse.core.runtime.IStatus[] getChildren()- Specified by:
getChildrenin interfaceorg.eclipse.core.runtime.IStatus- Overrides:
getChildrenin classorg.eclipse.core.runtime.Status- See Also:
-
getElements
Description copied from interface:IJavaModelStatusReturns 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.- Specified by:
getElementsin interfaceIJavaModelStatus- Returns:
- the list of Java element culprits
- See Also:
-
getMessage
Returns the message that is relevant to the code of this status.- Specified by:
getMessagein interfaceorg.eclipse.core.runtime.IStatus- Overrides:
getMessagein classorg.eclipse.core.runtime.Status
-
getPath
public org.eclipse.core.runtime.IPath getPath()Description copied from interface:IJavaModelStatusReturns the path associated with the failure (see specification of the status code), ornullif the failure is not one ofDEVICE_PATH,INVALID_PATH,PATH_OUTSIDE_PROJECT, orRELATIVE_PATH.- Specified by:
getPathin interfaceIJavaModelStatus- Returns:
- the path that caused the failure, or
nullif none - See Also:
-
getSeverity
public int getSeverity()- Specified by:
getSeverityin interfaceorg.eclipse.core.runtime.IStatus- Overrides:
getSeverityin classorg.eclipse.core.runtime.Status- See Also:
-
getString
Deprecated.Description copied from interface:IJavaModelStatusReturns the string associated with the failure (see specification of the status code), ornullif no string is related to this particular status code.- Specified by:
getStringin interfaceIJavaModelStatus- Returns:
- the string culprit, or
nullif none - See Also:
-
isDoesNotExist
public boolean isDoesNotExist()Description copied from interface:IJavaModelStatusReturns whether this status indicates that a Java model element does not exist. This convenience method is equivalent togetCode() == IJavaModelStatusConstants.ELEMENT_DOES_NOT_EXIST.- Specified by:
isDoesNotExistin interfaceIJavaModelStatus- Returns:
trueif the status code indicates that a Java model element does not exist- See Also:
-
isMultiStatus
public boolean isMultiStatus()- Specified by:
isMultiStatusin interfaceorg.eclipse.core.runtime.IStatus- Overrides:
isMultiStatusin classorg.eclipse.core.runtime.Status- See Also:
-
isOK
public boolean isOK()- Specified by:
isOKin interfaceorg.eclipse.core.runtime.IStatus- Overrides:
isOKin classorg.eclipse.core.runtime.Status- See Also:
-
matches
public boolean matches(int mask) - Specified by:
matchesin interfaceorg.eclipse.core.runtime.IStatus- Overrides:
matchesin classorg.eclipse.core.runtime.Status- See Also:
-
matches
Helper for matches(int). -
newMultiStatus
Creates and returns a newIJavaModelStatusthat is a a multi-status status.- See Also:
-
toString
Returns a printable representation of this exception for debugging purposes.- Overrides:
toStringin classorg.eclipse.core.runtime.Status
-