KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > commands > operations > OperationStatus


1 /*******************************************************************************
2  * Copyright (c) 2005 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.commands.operations;
12
13 import org.eclipse.core.runtime.Status;
14
15 /**
16  * <p>
17  * OperationStatus describes the status of a request to execute, undo, or redo
18  * an operation. This class may be instantiated by clients.
19  * </p>
20  *
21  * @since 3.1
22  */

23 public final class OperationStatus extends Status {
24     /**
25      * NOTHING_TO_REDO indicates there was no operation available for redo.
26      *
27      * (value is 1).
28      */

29     public static final int NOTHING_TO_REDO = 1;
30
31     /**
32      * NOTHING_TO_UNDO indicates there was no operation available for undo.
33      *
34      * (value is 2).
35      */

36     public static final int NOTHING_TO_UNDO = 2;
37
38     /**
39      * OPERATION_INVALID indicates that the operation available for undo or redo
40      * is not in a state to successfully perform the undo or redo.
41      *
42      * (value is 3).
43      */

44     public static final int OPERATION_INVALID = 3;
45
46     /**
47      * DEFAULT_PLUGIN_ID identifies the default plugin reporting the status.
48      *
49      * (value is "org.eclipse.core.commands").
50      */

51     static String JavaDoc DEFAULT_PLUGIN_ID = "org.eclipse.core.commands"; //$NON-NLS-1$
52

53     /**
54      * Creates a new operation status, specifying all properties.
55      *
56      * @param severity
57      * the severity for the status
58      * @param pluginId
59      * the unique identifier of the relevant plug-in
60      * @param code
61      * the informational code for the status
62      * @param message
63      * a human-readable message, localized to the current locale
64      * @param exception
65      * a low-level exception, or <code>null</code> if not
66      * applicable
67      */

68     public OperationStatus(int severity, String JavaDoc pluginId, int code, String JavaDoc message, Throwable JavaDoc exception) {
69         super(severity, pluginId, code, message, exception);
70     }
71 }
72
Popular Tags