|
Lines 18-24
Link Here
|
| 18 |
import org.eclipse.jdt.internal.compiler.problem.AbortCompilation; |
18 |
import org.eclipse.jdt.internal.compiler.problem.AbortCompilation; |
| 19 |
import org.eclipse.jdt.internal.core.util.Messages; |
19 |
import org.eclipse.jdt.internal.core.util.Messages; |
| 20 |
|
20 |
|
| 21 |
public class BuildNotifier { |
21 |
public class BuildNotifier extends org.eclipse.jdt.core.compiler.CompilationProgress { |
| 22 |
|
22 |
|
| 23 |
protected IProgressMonitor monitor; |
23 |
protected IProgressMonitor monitor; |
| 24 |
protected boolean cancelling; |
24 |
protected boolean cancelling; |
|
Lines 64-71
Link Here
|
| 64 |
} |
64 |
} |
| 65 |
|
65 |
|
| 66 |
public void begin() { |
66 |
public void begin() { |
|
|
67 |
begin(totalWork); |
| 68 |
} |
| 69 |
|
| 70 |
public void begin(int amountOfWork) { |
| 67 |
if (monitor != null) |
71 |
if (monitor != null) |
| 68 |
monitor.beginTask("", totalWork); //$NON-NLS-1$ |
72 |
monitor.beginTask("", amountOfWork); //$NON-NLS-1$ |
| 69 |
this.previousSubtask = null; |
73 |
this.previousSubtask = null; |
| 70 |
} |
74 |
} |
| 71 |
|
75 |
|
|
Lines 114-119
Link Here
|
| 114 |
this.previousSubtask = null; |
118 |
this.previousSubtask = null; |
| 115 |
} |
119 |
} |
| 116 |
|
120 |
|
|
|
121 |
public boolean isCanceled() { |
| 122 |
checkCancelWithinCompiler(); |
| 123 |
return false; |
| 124 |
} |
| 125 |
|
| 117 |
/** |
126 |
/** |
| 118 |
* Returns a string describing the problems. |
127 |
* Returns a string describing the problems. |
| 119 |
*/ |
128 |
*/ |
|
Lines 192-197
Link Here
|
| 192 |
this.progressPerCompilationUnit = progress; |
201 |
this.progressPerCompilationUnit = progress; |
| 193 |
} |
202 |
} |
| 194 |
|
203 |
|
|
|
204 |
public void setTaskName(String message) { |
| 205 |
subTask(message); |
| 206 |
} |
| 207 |
|
| 195 |
public void subTask(String message) { |
208 |
public void subTask(String message) { |
| 196 |
String pm = problemsMessage(); |
209 |
String pm = problemsMessage(); |
| 197 |
String msg = pm.length() == 0 ? message : pm + " " + message; //$NON-NLS-1$ |
210 |
String msg = pm.length() == 0 ? message : pm + " " + message; //$NON-NLS-1$ |
|
Lines 274-277
Link Here
|
| 274 |
public void updateProgressDelta(float percentWorked) { |
287 |
public void updateProgressDelta(float percentWorked) { |
| 275 |
updateProgress(percentComplete + percentWorked); |
288 |
updateProgress(percentComplete + percentWorked); |
| 276 |
} |
289 |
} |
|
|
290 |
|
| 291 |
public void worked(int workIncrement, int remainingWork) { |
| 292 |
// we use updateProgress(int) instead |
| 293 |
} |
| 277 |
} |
294 |
} |