org.eclipse.xtext.ui.refactoring.ui
Class WorkbenchRunnableAdapter

java.lang.Object
  extended by org.eclipse.xtext.ui.refactoring.ui.WorkbenchRunnableAdapter
All Implemented Interfaces:
org.eclipse.jface.operation.IRunnableWithProgress, org.eclipse.jface.operation.IThreadListener

public class WorkbenchRunnableAdapter
extends java.lang.Object
implements org.eclipse.jface.operation.IRunnableWithProgress, org.eclipse.jface.operation.IThreadListener

Author:
schill - Initial contribution and API Due to visibility problems copied from org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter

Constructor Summary
WorkbenchRunnableAdapter(org.eclipse.core.resources.IWorkspaceRunnable runnable, org.eclipse.core.runtime.jobs.ISchedulingRule rule)
          Runs a workspace runnable with the given lock or null to run with no lock at all.
WorkbenchRunnableAdapter(org.eclipse.core.resources.IWorkspaceRunnable runnable, org.eclipse.core.runtime.jobs.ISchedulingRule rule, boolean transfer)
          Runs a workspace runnable with the given lock or null to run with no lock at all.
 
Method Summary
 org.eclipse.core.runtime.jobs.ISchedulingRule getSchedulingRule()
           
 void run(org.eclipse.core.runtime.IProgressMonitor monitor)
           
 void threadChange(java.lang.Thread thread)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkbenchRunnableAdapter

public WorkbenchRunnableAdapter(org.eclipse.core.resources.IWorkspaceRunnable runnable,
                                org.eclipse.core.runtime.jobs.ISchedulingRule rule)
Runs a workspace runnable with the given lock or null to run with no lock at all.

Parameters:
runnable - the workspace runnable
rule - the scheduling rule

WorkbenchRunnableAdapter

public WorkbenchRunnableAdapter(org.eclipse.core.resources.IWorkspaceRunnable runnable,
                                org.eclipse.core.runtime.jobs.ISchedulingRule rule,
                                boolean transfer)
Runs a workspace runnable with the given lock or null to run with no lock at all.

Parameters:
runnable - the workspace runnable
rule - the scheduling rule
transfer - true if the rule is to be transfered to the model context thread. Otherwise false
Since:
3.1
Method Detail

getSchedulingRule

public org.eclipse.core.runtime.jobs.ISchedulingRule getSchedulingRule()

threadChange

public void threadChange(java.lang.Thread thread)

Specified by:
threadChange in interface org.eclipse.jface.operation.IThreadListener

run

public void run(org.eclipse.core.runtime.IProgressMonitor monitor)
         throws java.lang.reflect.InvocationTargetException,
                java.lang.InterruptedException
Specified by:
run in interface org.eclipse.jface.operation.IRunnableWithProgress
Throws:
java.lang.reflect.InvocationTargetException
java.lang.InterruptedException