org.eclipse.xtext.ui.editor
Class SchedulingRuleFactory

java.lang.Object
  extended by org.eclipse.xtext.ui.editor.SchedulingRuleFactory

public class SchedulingRuleFactory
extends java.lang.Object

Scheduling rule factory for asynchronous operations. Mostly copied from org.eclipse.debug.internal.ui.viewers.AsynchronousSchedulingRuleFactory.

Author:
Michael Clay - Initial contribution and API

Nested Class Summary
static class SchedulingRuleFactory.Sequence
          All jobs that are configured with the same instance of this rule will run sequentially.
 
Field Summary
static SchedulingRuleFactory INSTANCE
           
 
Method Summary
 org.eclipse.core.runtime.jobs.ISchedulingRule newSequence()
          Returns a scheduling rule that allows all jobs with an instance of the rule to run one at a time.
 org.eclipse.core.runtime.jobs.ISchedulingRule newSerialPerObjectRule(java.lang.Object lock)
          Returns a scheduling rule that allows all jobs with an instance of the rule on the same object to run one at a time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static SchedulingRuleFactory INSTANCE
Method Detail

newSequence

public org.eclipse.core.runtime.jobs.ISchedulingRule newSequence()
Returns a scheduling rule that allows all jobs with an instance of the rule to run one at a time.

Returns:
scheduling rule

newSerialPerObjectRule

public org.eclipse.core.runtime.jobs.ISchedulingRule newSerialPerObjectRule(java.lang.Object lock)
Returns a scheduling rule that allows all jobs with an instance of the rule on the same object to run one at a time.

Parameters:
lock - object to serialize one
Returns:
scheduling rule