KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > internal > ui > commands > actions > AbstractRequestMonitor


1 /*******************************************************************************
2  * Copyright (c) 2006 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.debug.internal.ui.commands.actions;
12
13 import org.eclipse.core.runtime.IStatus;
14 import org.eclipse.debug.internal.ui.viewers.model.provisional.IStatusMonitor;
15
16 /**
17  * Common function for request monitors
18  *
19  * @since 3.3
20  *
21  */

22 public abstract class AbstractRequestMonitor implements IStatusMonitor {
23     
24     private IStatus fStatus;
25     private boolean fCancelled = false;
26
27     /* (non-Javadoc)
28      * @see org.eclipse.debug.internal.ui.viewers.provisional.IStatusMonitor#setStatus(org.eclipse.core.runtime.IStatus)
29      */

30     public void setStatus(IStatus status) {
31         fStatus = status;
32     }
33
34     /* (non-Javadoc)
35      * @see org.eclipse.core.runtime.IProgressMonitor#beginTask(java.lang.String, int)
36      */

37     public void beginTask(String JavaDoc name, int totalWork) {
38     }
39
40     /* (non-Javadoc)
41      * @see org.eclipse.core.runtime.IProgressMonitor#internalWorked(double)
42      */

43     public void internalWorked(double work) {
44     }
45
46     /* (non-Javadoc)
47      * @see org.eclipse.core.runtime.IProgressMonitor#isCanceled()
48      */

49     public boolean isCanceled() {
50         return fCancelled;
51     }
52
53     /* (non-Javadoc)
54      * @see org.eclipse.core.runtime.IProgressMonitor#setCanceled(boolean)
55      */

56     public void setCanceled(boolean value) {
57         fCancelled = value;
58     }
59
60     /* (non-Javadoc)
61      * @see org.eclipse.core.runtime.IProgressMonitor#setTaskName(java.lang.String)
62      */

63     public void setTaskName(String JavaDoc name) {
64     }
65
66     /* (non-Javadoc)
67      * @see org.eclipse.core.runtime.IProgressMonitor#subTask(java.lang.String)
68      */

69     public void subTask(String JavaDoc name) {
70     }
71
72     /* (non-Javadoc)
73      * @see org.eclipse.core.runtime.IProgressMonitor#worked(int)
74      */

75     public void worked(int work) {
76     }
77
78     /* (non-Javadoc)
79      * @see org.eclipse.debug.internal.ui.viewers.provisional.IStatusMonitor#getStatus()
80      */

81     public IStatus getStatus() {
82         return fStatus;
83     }
84 }
85
Popular Tags