comparison org.eclipse.equinox.common/src/org/eclipse/core/runtime/NullProgressMonitor.d @ 105:bbe49769ec18

...
author Frank Benoit <benoit@tionex.de>
date Sun, 08 Nov 2009 12:42:30 +0100
parents bc29606a740c
children
comparison
equal deleted inserted replaced
104:88652073d1c2 105:bbe49769ec18
2 * Copyright (c) 2000, 2006 IBM Corporation and others. 2 * Copyright (c) 2000, 2006 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials 3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0 4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at 5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html 6 * http://www.eclipse.org/legal/epl-v10.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * IBM Corporation - initial API and implementation 9 * IBM Corporation - initial API and implementation
10 * Port to the D programming language:
11 * Frank Benoit <benoit@tionex.de>
12 *******************************************************************************/ 10 *******************************************************************************/
13 module org.eclipse.core.runtime.NullProgressMonitor; 11 // Port to the D programming language:
14 12 // Frank Benoit <benoit@tionex.de>
15 import org.eclipse.core.runtime.IProgressMonitor; 13 module org.eclipse.core.runtimeNullProgressMonitor;
16 14
17 import java.lang.all; 15 import java.lang.all;
16
17 import org.eclipse.core.runtimeIProgressMonitor; // packageimport
18 18
19 /** 19 /**
20 * A default progress monitor implementation suitable for 20 * A default progress monitor implementation suitable for
21 * subclassing. 21 * subclassing.
22 * <p> 22 * <p>
35 35
36 /** 36 /**
37 * Constructs a new progress monitor. 37 * Constructs a new progress monitor.
38 */ 38 */
39 public this() { 39 public this() {
40 super();
40 } 41 }
41 42
42 /** 43 /**
43 * This implementation does nothing. 44 * This implementation does nothing.
44 * Subclasses may override this method to do interesting 45 * Subclasses may override this method to do interesting
45 * processing when a task begins. 46 * processing when a task begins.
46 * 47 *
47 * @see IProgressMonitor#beginTask(String, int) 48 * @see IProgressMonitor#beginTask(String, int)
48 */ 49 */
49 public void beginTask(String name, int totalWork) { 50 public void beginTask(String name, int totalWork) {
50 // do nothing 51 // do nothing
51 } 52 }
52 53
53 /** 54 /**
54 * This implementation does nothing. 55 * This implementation does nothing.
55 * Subclasses may override this method to do interesting 56 * Subclasses may override this method to do interesting
56 * processing when a task is done. 57 * processing when a task is done.
57 * 58 *
58 * @see IProgressMonitor#done() 59 * @see IProgressMonitor#done()
59 */ 60 */
60 public void done() { 61 public void done() {
61 // do nothing 62 // do nothing
62 } 63 }
63 64
64 /** 65 /**
65 * This implementation does nothing. 66 * This implementation does nothing.
66 * Subclasses may override this method. 67 * Subclasses may override this method.
67 * 68 *
68 * @see IProgressMonitor#internalWorked(double) 69 * @see IProgressMonitor#internalWorked(double)
69 */ 70 */
70 public void internalWorked(double work) { 71 public void internalWorked(double work) {
71 // do nothing 72 // do nothing
72 } 73 }
73 74
74 /** 75 /**
75 * This implementation returns the value of the internal 76 * This implementation returns the value of the internal
76 * state variable set by <code>setCanceled</code>. 77 * state variable set by <code>setCanceled</code>.
77 * Subclasses which override this method should 78 * Subclasses which override this method should
78 * override <code>setCanceled</code> as well. 79 * override <code>setCanceled</code> as well.
79 * 80 *
80 * @see IProgressMonitor#isCanceled() 81 * @see IProgressMonitor#isCanceled()
81 * @see IProgressMonitor#setCanceled(bool) 82 * @see IProgressMonitor#setCanceled(boolean)
82 */ 83 */
83 public bool isCanceled() { 84 public bool isCanceled() {
84 return cancelled; 85 return cancelled;
85 } 86 }
86 87
87 /** 88 /**
88 * This implementation sets the value of an internal state variable. 89 * This implementation sets the value of an internal state variable.
89 * Subclasses which override this method should override 90 * Subclasses which override this method should override
90 * <code>isCanceled</code> as well. 91 * <code>isCanceled</code> as well.
91 * 92 *
92 * @see IProgressMonitor#isCanceled() 93 * @see IProgressMonitor#isCanceled()
93 * @see IProgressMonitor#setCanceled(bool) 94 * @see IProgressMonitor#setCanceled(boolean)
94 */ 95 */
95 public void setCanceled(bool cancelled) { 96 public void setCanceled(bool cancelled) {
96 this.cancelled = cancelled; 97 this.cancelled = cancelled;
97 } 98 }
98 99
99 /** 100 /**
100 * This implementation does nothing. 101 * This implementation does nothing.
101 * Subclasses may override this method to do something 102 * Subclasses may override this method to do something
102 * with the name of the task. 103 * with the name of the task.
103 * 104 *
104 * @see IProgressMonitor#setTaskName(String) 105 * @see IProgressMonitor#setTaskName(String)
105 */ 106 */
106 public void setTaskName(String name) { 107 public void setTaskName(String name) {
107 // do nothing 108 // do nothing
108 } 109 }
109 110
110 /** 111 /**
111 * This implementation does nothing. 112 * This implementation does nothing.
112 * Subclasses may override this method to do interesting 113 * Subclasses may override this method to do interesting
113 * processing when a subtask begins. 114 * processing when a subtask begins.
114 * 115 *
115 * @see IProgressMonitor#subTask(String) 116 * @see IProgressMonitor#subTask(String)
116 */ 117 */
117 public void subTask(String name) { 118 public void subTask(String name) {
118 // do nothing 119 // do nothing
119 } 120 }
120 121
121 /** 122 /**
122 * This implementation does nothing. 123 * This implementation does nothing.
123 * Subclasses may override this method to do interesting 124 * Subclasses may override this method to do interesting
124 * processing when some work has been completed. 125 * processing when some work has been completed.
125 * 126 *
126 * @see IProgressMonitor#worked(int) 127 * @see IProgressMonitor#worked(int)
127 */ 128 */
128 public void worked(int work) { 129 public void worked(int work) {
129 // do nothing 130 // do nothing
130 } 131 }