org.eclipse.xtext.ui.editor
Class ValidationJobScheduler

java.lang.Object
  extended by org.eclipse.xtext.ui.editor.ValidationJobScheduler
All Implemented Interfaces:
IValidationJobScheduler
Direct Known Subclasses:
JdtValidationJobScheduler

public class ValidationJobScheduler
extends java.lang.Object
implements IValidationJobScheduler

Default implementation of the validation job scheduler. It will put a validation job into the job queue if the resource in newly opened has a known reference to a currently dirty resource in another editor. This implementation can be easily specialized by overriding isDirty(URI) or the more coarse template method doScheduleInitialValidation(XtextDocument).

Since:
2.1
Author:
Sebastian Zarnekow - Initial contribution and API

Constructor Summary
ValidationJobScheduler()
           
 
Method Summary
protected  void doScheduleInitialValidation(XtextDocument document)
           
protected  DescriptionUtils getDescriptionUtils()
           
protected  IDirtyStateManager getDirtyStateManager()
           
protected  IResourceDescriptions getResourceDescriptions()
           
protected  boolean isDirty(org.eclipse.emf.common.util.URI uri)
           
 void scheduleInitialValidation(IXtextDocument document)
          Optionally triggers the validation on the given document
 void setDescriptionUtils(DescriptionUtils descriptionUtils)
           
 void setDirtyStateManager(IDirtyStateManager dirtyStateManager)
           
 void setResourceDescriptions(IResourceDescriptions resourceDescriptions)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidationJobScheduler

public ValidationJobScheduler()
Method Detail

scheduleInitialValidation

public void scheduleInitialValidation(IXtextDocument document)
Description copied from interface: IValidationJobScheduler
Optionally triggers the validation on the given document

Specified by:
scheduleInitialValidation in interface IValidationJobScheduler

doScheduleInitialValidation

protected void doScheduleInitialValidation(XtextDocument document)

isDirty

protected boolean isDirty(org.eclipse.emf.common.util.URI uri)

getDirtyStateManager

protected IDirtyStateManager getDirtyStateManager()

setDirtyStateManager

public void setDirtyStateManager(IDirtyStateManager dirtyStateManager)
This method is not intended to be referenced by clients.
This method is not intended to be referenced by clients.

getResourceDescriptions

protected IResourceDescriptions getResourceDescriptions()

setResourceDescriptions

public void setResourceDescriptions(IResourceDescriptions resourceDescriptions)
This method is not intended to be referenced by clients.
This method is not intended to be referenced by clients.

getDescriptionUtils

protected DescriptionUtils getDescriptionUtils()

setDescriptionUtils

public void setDescriptionUtils(DescriptionUtils descriptionUtils)
This method is not intended to be referenced by clients.
This method is not intended to be referenced by clients.