|
Lines 35-40
Link Here
|
| 35 |
import org.eclipse.jface.text.source.ISourceViewer; |
35 |
import org.eclipse.jface.text.source.ISourceViewer; |
| 36 |
import org.eclipse.wst.sse.core.StructuredModelManager; |
36 |
import org.eclipse.wst.sse.core.StructuredModelManager; |
| 37 |
import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel; |
37 |
import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel; |
|
|
38 |
import org.eclipse.wst.sse.core.utils.StringUtils; |
| 38 |
import org.eclipse.wst.sse.ui.internal.IReleasable; |
39 |
import org.eclipse.wst.sse.ui.internal.IReleasable; |
| 39 |
import org.eclipse.wst.sse.ui.internal.reconcile.DocumentAdapter; |
40 |
import org.eclipse.wst.sse.ui.internal.reconcile.DocumentAdapter; |
| 40 |
import org.eclipse.wst.sse.ui.internal.reconcile.ReconcileAnnotationKey; |
41 |
import org.eclipse.wst.sse.ui.internal.reconcile.ReconcileAnnotationKey; |
|
Lines 154-162
Link Here
|
| 154 |
/* |
155 |
/* |
| 155 |
* Abort if no workspace file is known (new validation framework does |
156 |
* Abort if no workspace file is known (new validation framework does |
| 156 |
* not support that scenario) or no validators have been specified |
157 |
* not support that scenario) or no validators have been specified |
|
|
158 |
* or validation has been disabled |
| 157 |
*/ |
159 |
*/ |
| 158 |
if (isCanceled() || fMetaData.isEmpty()) |
160 |
IFile file = getFile(); |
|
|
161 |
if (isCanceled() || fMetaData.isEmpty() || (file != null && ( |
| 162 |
ValidationFramework.getDefault().isSuspended() || |
| 163 |
ValidationFramework.getDefault().isSuspended(file.getProject()) || |
| 164 |
ValidationFramework.getDefault().getProjectSettings(file.getProject()).getSuspend()))) { |
| 159 |
return; |
165 |
return; |
|
|
166 |
} |
| 160 |
|
167 |
|
| 161 |
IDocument doc = getDocument(); |
168 |
IDocument doc = getDocument(); |
| 162 |
// for external files, this can be null |
169 |
// for external files, this can be null |
|
Lines 180-198
Link Here
|
| 180 |
* validators. |
187 |
* validators. |
| 181 |
*/ |
188 |
*/ |
| 182 |
Set disabledValsByClass = new HashSet(20); |
189 |
Set disabledValsByClass = new HashSet(20); |
| 183 |
IFile file = getFile(); |
|
|
| 184 |
if (file != null) { |
190 |
if (file != null) { |
| 185 |
if (ValidationFramework.getDefault().isSuspended() || ValidationFramework.getDefault().isSuspended(file.getProject())) |
|
|
| 186 |
return; |
| 187 |
|
| 188 |
for (Iterator it = ValidationFramework.getDefault().getDisabledValidatorsFor(file).iterator(); it.hasNext();) { |
191 |
for (Iterator it = ValidationFramework.getDefault().getDisabledValidatorsFor(file).iterator(); it.hasNext();) { |
| 189 |
Validator v = (Validator) it.next(); |
192 |
Validator v = (Validator) it.next(); |
| 190 |
Validator.V1 v1 = v.asV1Validator(); |
193 |
Validator.V1 v1 = v.asV1Validator(); |
| 191 |
if (v1 != null) |
194 |
if (v1 != null) |
| 192 |
disabledValsByClass.add(v1.getId()); |
195 |
disabledValsByClass.add(v1.getId()); |
| 193 |
// not a V1 validator |
196 |
// not a V1 validator |
| 194 |
else if (v.getSourceId() != null) |
197 |
else if (v.getSourceId() != null) { |
| 195 |
disabledValsBySourceId.add(v.getSourceId()); |
198 |
//could be more then one sourceid per batch validator |
|
|
199 |
String[] sourceIDs = StringUtils.unpack(v.getSourceId()); |
| 200 |
disabledValsBySourceId.addAll(Arrays.asList(sourceIDs)); |
| 201 |
} |
| 196 |
} |
202 |
} |
| 197 |
} |
203 |
} |
| 198 |
|
204 |
|
|
Lines 240-246
Link Here
|
| 240 |
} |
246 |
} |
| 241 |
} |
247 |
} |
| 242 |
} |
248 |
} |
| 243 |
|
249 |
|
| 244 |
TemporaryAnnotation[] annotationsToRemove = getAnnotationsToRemove(dr, stepsRanOnThisDirtyRegion); |
250 |
TemporaryAnnotation[] annotationsToRemove = getAnnotationsToRemove(dr, stepsRanOnThisDirtyRegion); |
| 245 |
if (annotationsToRemove.length + annotationsToAdd.size() > 0) |
251 |
if (annotationsToRemove.length + annotationsToAdd.size() > 0) |
| 246 |
smartProcess(annotationsToRemove, (IReconcileResult[]) annotationsToAdd.toArray(new IReconcileResult[annotationsToAdd.size()])); |
252 |
smartProcess(annotationsToRemove, (IReconcileResult[]) annotationsToAdd.toArray(new IReconcileResult[annotationsToAdd.size()])); |