KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > internal > expressions > ExpressionStatus


1 /*******************************************************************************
2  * Copyright (c) 2000, 2007 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.core.internal.expressions;
12
13 import org.eclipse.core.runtime.IStatus;
14 import org.eclipse.core.runtime.Status;
15
16 /**
17  * Represents the outcome of an expression evaluation. Status objects are
18  * used inside {@link org.eclipse.core.runtime.CoreException} objects to
19  * indicate what went wrong.
20  *
21  * @see org.eclipse.core.runtime.CoreException
22  *
23  * @since 3.0
24  */

25 public class ExpressionStatus extends Status {
26     
27     /** Error code indicating that the variable in focus in not a collection */
28     public static final int VARIABLE_IS_NOT_A_COLLECTION= 3;
29     
30     /** Error code indicating that the variable in focus in not a list */
31     public static final int VARIABLE_IS_NOT_A_LIST= 4;
32     
33     /** Error code indicating that an attribute value doesn't present an integer */
34     public static final int VALUE_IS_NOT_AN_INTEGER= 5;
35     
36     /** Error code indicating that a mandatory attribute is missing */
37     public static final int MISSING_ATTRIBUTE= 50;
38     
39     /** Error code indicating that the value specified for an attribute is invalid */
40     public static final int WRONG_ATTRIBUTE_VALUE= 51;
41
42     /** Error code indicating that we are unable to find an expression */
43     public static final int MISSING_EXPRESSION = 52;
44     
45     /** Error code indicating that the number of arguments passed to resolve variable is incorrect. */
46     public static final int VARAIBLE_POOL_WRONG_NUMBER_OF_ARGUMENTS= 100;
47     
48     /** Error code indicating that the argument passed to resolve a variable is not of type java.lang.String */
49     public static final int VARAIBLE_POOL_ARGUMENT_IS_NOT_A_STRING= 101;
50     
51     /** Error code indicating that a plugin providing a certain type extender isn't loaded yet */
52     public static final int TYPE_EXTENDER_PLUGIN_NOT_LOADED= 200;
53     
54     /** Error indicating that a property referenced in a test expression can't be resolved */
55     public static final int TYPE_EXTENDER_UNKOWN_METHOD= 201;
56     
57     /** Error code indicating that the implementation class of a type extender is not of type TypeExtender */
58     public static final int TYPE_EXTENDER_INCORRECT_TYPE= 202;
59     
60     /** Error indicating that the value returned from a type extender isn't of type boolean */
61     public static final int TEST_EXPRESSION_NOT_A_BOOLEAN= 203;
62     
63     /** Error indicating that the property attribute of the test element doesn't have a name space */
64     public static final int NO_NAMESPACE_PROVIDED= 300;
65     
66     /** Error indicating that a variable accessed in a with expression isn't available in the evaluation context */
67     public static final int VARIABLE_NOT_DEFINED= 301;
68     
69     /** Error indicating that in a string passed via a arg attribute the apostrophe character isn't correctly escaped */
70     public static final int STRING_NOT_CORRECT_ESCAPED= 302;
71     
72     /** Error indicating that a string passed via a arg attribute isn't correctly terminated with an apostrophe */
73     public static final int STRING_NOT_TERMINATED= 303;
74     
75     /**
76      * Creates a new expression status.
77      *
78      * @param errorCode the error code of the status
79      * @param message a human-readable message, localized to the current locale
80      */

81     public ExpressionStatus(int errorCode, String JavaDoc message) {
82         this(errorCode, message, null);
83     }
84     
85     /**
86      * Creates a new expression status.
87      *
88      * @param errorCode the error code of the status
89      * @param message a human-readable message, localized to the current locale
90      * @param exception a low-level exception, or <code>null</code> if not applicable
91      */

92     public ExpressionStatus(int errorCode, String JavaDoc message, Throwable JavaDoc exception) {
93         super(IStatus.ERROR, ExpressionPlugin.getPluginId(), errorCode, message, exception);
94     }
95 }
96
Popular Tags