File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
bundles/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/participants Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change 22
22
import org .eclipse .core .runtime .CoreException ;
23
23
import org .eclipse .core .runtime .IProgressMonitor ;
24
24
import org .eclipse .core .runtime .IStatus ;
25
- import org .eclipse .core .runtime .NullProgressMonitor ;
26
- import org .eclipse .core .runtime .OperationCanceledException ;
27
25
import org .eclipse .core .runtime .Status ;
28
26
import org .eclipse .core .runtime .SubMonitor ;
29
27
@@ -102,8 +100,7 @@ public void add(IConditionChecker checker) throws CoreException {
102
100
* @throws CoreException if an error occurs during condition checking
103
101
*/
104
102
public RefactoringStatus check (IProgressMonitor pm ) throws CoreException {
105
- if (pm == null )
106
- pm = new NullProgressMonitor ();
103
+
107
104
RefactoringStatus result = new RefactoringStatus ();
108
105
mergeResourceOperationAndValidateEdit ();
109
106
List <IConditionChecker > values = new ArrayList <>(fCheckers .values ());
@@ -117,13 +114,11 @@ public RefactoringStatus check(IProgressMonitor pm) throws CoreException {
117
114
return 1 ;
118
115
return 0 ;
119
116
});
117
+
120
118
SubMonitor sm = SubMonitor .convert (pm , "" , values .size ()); //$NON-NLS-1$
121
119
for (IConditionChecker checker : values ) {
122
120
result .merge (checker .check (sm .split (1 )));
123
- if (pm .isCanceled ())
124
- throw new OperationCanceledException ();
125
121
}
126
- pm .done ();
127
122
return result ;
128
123
}
129
124
You can’t perform that action at this time.
0 commit comments