Lines 1-5
Link Here
|
1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
2 |
* Copyright (c) 2000, 2009 IBM Corporation and others. |
2 |
* Copyright (c) 2000, 2010 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 |
Lines 30-35
Link Here
|
30 |
private Map fAttributes = null; |
30 |
private Map fAttributes = null; |
31 |
private boolean fTerminated = false; |
31 |
private boolean fTerminated = false; |
32 |
private boolean fCancelled = false; |
32 |
private boolean fCancelled = false; |
|
|
33 |
// progress monitor to delegate or null if none |
34 |
private IProgressMonitor fMonitor; |
33 |
|
35 |
|
34 |
public AntProcess(String label, ILaunch launch, Map attributes) { |
36 |
public AntProcess(String label, ILaunch launch, Map attributes) { |
35 |
fLabel = label; |
37 |
fLabel = label; |
Lines 124-141
Link Here
|
124 |
* @see org.eclipse.core.runtime.IProgressMonitor#beginTask(java.lang.String, int) |
126 |
* @see org.eclipse.core.runtime.IProgressMonitor#beginTask(java.lang.String, int) |
125 |
*/ |
127 |
*/ |
126 |
public void beginTask(String name, int totalWork) { |
128 |
public void beginTask(String name, int totalWork) { |
|
|
129 |
if (fMonitor != null) { |
130 |
fMonitor.beginTask(name, totalWork); |
131 |
} |
127 |
} |
132 |
} |
128 |
|
133 |
|
129 |
/** |
134 |
/** |
130 |
* @see org.eclipse.core.runtime.IProgressMonitor#done() |
135 |
* @see org.eclipse.core.runtime.IProgressMonitor#done() |
131 |
*/ |
136 |
*/ |
132 |
public void done() { |
137 |
public void done() { |
|
|
138 |
if (fMonitor != null) { |
139 |
fMonitor.done(); |
140 |
} |
133 |
} |
141 |
} |
134 |
|
142 |
|
135 |
/** |
143 |
/** |
136 |
* @see org.eclipse.core.runtime.IProgressMonitor#internalWorked(double) |
144 |
* @see org.eclipse.core.runtime.IProgressMonitor#internalWorked(double) |
137 |
*/ |
145 |
*/ |
138 |
public void internalWorked(double work) { |
146 |
public void internalWorked(double work) { |
|
|
147 |
if (fMonitor != null) { |
148 |
fMonitor.internalWorked(work); |
149 |
} |
139 |
} |
150 |
} |
140 |
|
151 |
|
141 |
/** |
152 |
/** |
Lines 150-172
Link Here
|
150 |
*/ |
161 |
*/ |
151 |
public void setCanceled(boolean value) { |
162 |
public void setCanceled(boolean value) { |
152 |
fCancelled = value; |
163 |
fCancelled = value; |
|
|
164 |
if (fMonitor != null) { |
165 |
fMonitor.setCanceled(value); |
166 |
} |
153 |
} |
167 |
} |
154 |
|
168 |
|
155 |
/** |
169 |
/** |
156 |
* @see org.eclipse.core.runtime.IProgressMonitor#setTaskName(java.lang.String) |
170 |
* @see org.eclipse.core.runtime.IProgressMonitor#setTaskName(java.lang.String) |
157 |
*/ |
171 |
*/ |
158 |
public void setTaskName(String name) { |
172 |
public void setTaskName(String name) { |
|
|
173 |
if (fMonitor != null) { |
174 |
fMonitor.setTaskName(name); |
175 |
} |
159 |
} |
176 |
} |
160 |
|
177 |
|
161 |
/** |
178 |
/** |
162 |
* @see org.eclipse.core.runtime.IProgressMonitor#subTask(java.lang.String) |
179 |
* @see org.eclipse.core.runtime.IProgressMonitor#subTask(java.lang.String) |
163 |
*/ |
180 |
*/ |
164 |
public void subTask(String name) { |
181 |
public void subTask(String name) { |
|
|
182 |
if (fMonitor != null) { |
183 |
fMonitor.subTask(name); |
184 |
} |
165 |
} |
185 |
} |
166 |
|
186 |
|
167 |
/** |
187 |
/** |
168 |
* @see org.eclipse.core.runtime.IProgressMonitor#worked(int) |
188 |
* @see org.eclipse.core.runtime.IProgressMonitor#worked(int) |
169 |
*/ |
189 |
*/ |
170 |
public void worked(int work) { |
190 |
public void worked(int work) { |
|
|
191 |
if (fMonitor != null) { |
192 |
fMonitor.worked(work); |
193 |
} |
194 |
} |
195 |
|
196 |
/** |
197 |
* Sets a progress monitor to delegate to or <code>null</code> if none. |
198 |
* |
199 |
* @param monitor delegate monitor or <code>null</code> |
200 |
*/ |
201 |
public void setProgressMonitor(IProgressMonitor monitor) { |
202 |
fMonitor = monitor; |
171 |
} |
203 |
} |
172 |
} |
204 |
} |