use of org.eclipse.jface.text.reconciler.IReconcileStep in project webtools.sourceediting by eclipse.
the class ValidatorStrategy method setDocument.
/**
* @see org.eclipse.wst.sse.ui.internal.reconcile.AbstractStructuredTextReconcilingStrategy#setDocument(org.eclipse.jface.text.IDocument)
*/
public void setDocument(IDocument document) {
super.setDocument(document);
fFile = null;
try {
fValidatorsSuspended = false;
if (document != null) {
IFile file = getFile();
if (file != null) {
// Validation is suspended for this resource, do nothing
fValidatorsSuspended = !file.isAccessible() || ValidationFramework.getDefault().isSuspended(file.getProject()) || ValidationFramework.getDefault().getProjectSettings(file.getProject()).getSuspend();
}
}
} catch (Exception e) {
fValidatorsSuspended = true;
Logger.logException(e);
}
// validator steps are in "fVIdToVStepMap" (as opposed to fFirstStep >
// next step etc...)
Iterator it = fVidToVStepMap.values().iterator();
IReconcileStep step = null;
while (it.hasNext()) {
step = (IReconcileStep) it.next();
step.setInputModel(new DocumentAdapter(document));
}
}
use of org.eclipse.jface.text.reconciler.IReconcileStep in project webtools.sourceediting by eclipse.
the class ValidatorStrategy method release.
public void release() {
super.release();
fIsCancelled = true;
Iterator it = fVidToVStepMap.values().iterator();
IReconcileStep step = null;
while (it.hasNext()) {
step = (IReconcileStep) it.next();
if (step instanceof IReleasable)
((IReleasable) step).release();
}
fFile = null;
}
Aggregations