Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 320322 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/wst/sse/ui/internal/reconcile/validator/ValidatorStrategy.java (-8 / +14 lines)
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()]));
(-)plugin.xml (-2 / +4 lines)
Lines 186-192 Link Here
186
            class="org.eclipse.jst.jsp.core.internal.validation.JSPBatchValidator"
186
            class="org.eclipse.jst.jsp.core.internal.validation.JSPBatchValidator"
187
            manual="true"
187
            manual="true"
188
            version="1"
188
            version="1"
189
            markerId="org.eclipse.jst.jsp.core.validationMarker">
189
            markerId="org.eclipse.jst.jsp.core.validationMarker"
190
            sourceid="org.eclipse.jst.jsp.jspelsourcevalidator, org.eclipse.jst.jsp.ui.internal.validation.jspactionvalidator, org.eclipse.jst.jsp.tldsourcevalidator, org.eclipse.jst.jsp.jspsourcevalidator">
190
         <include>
191
         <include>
191
            <rules>
192
            <rules>
192
	           <projectNature id="org.eclipse.jdt.core.javanature"/>
193
	           <projectNature id="org.eclipse.jdt.core.javanature"/>
Lines 238-244 Link Here
238
            class="org.eclipse.jst.jsp.core.internal.validation.JSPContentValidator"
239
            class="org.eclipse.jst.jsp.core.internal.validation.JSPContentValidator"
239
            manual="true"
240
            manual="true"
240
            version="1"
241
            version="1"
241
            markerId="org.eclipse.jst.jsp.core.validationMarker">
242
            markerId="org.eclipse.jst.jsp.core.validationMarker"
243
            sourceid="org.eclipse.jst.jsp.ui.internal.validation.markupvalidator, org.eclipse.jst.jsp.ui.internal.validation.htmlsyntaxvalidator">
242
         <include>
244
         <include>
243
            <rules>
245
            <rules>
244
				<contentType id="org.eclipse.jst.jsp.core.jspsource"/>
246
				<contentType id="org.eclipse.jst.jsp.core.jspsource"/>

Return to bug 320322