|
Lines 10-15
Link Here
|
| 10 |
package org.eclipse.dltk.ui.actions; |
10 |
package org.eclipse.dltk.ui.actions; |
| 11 |
|
11 |
|
| 12 |
import org.eclipse.core.runtime.Assert; |
12 |
import org.eclipse.core.runtime.Assert; |
|
|
13 |
import org.eclipse.core.runtime.IProgressMonitor; |
| 14 |
import org.eclipse.core.runtime.IStatus; |
| 15 |
import org.eclipse.core.runtime.Status; |
| 16 |
import org.eclipse.core.runtime.jobs.Job; |
| 13 |
import org.eclipse.dltk.internal.ui.editor.ModelTextSelection; |
17 |
import org.eclipse.dltk.internal.ui.editor.ModelTextSelection; |
| 14 |
import org.eclipse.jface.action.Action; |
18 |
import org.eclipse.jface.action.Action; |
| 15 |
import org.eclipse.jface.text.ITextSelection; |
19 |
import org.eclipse.jface.text.ITextSelection; |
|
Lines 238-245
Link Here
|
| 238 |
/* (non-Javadoc) |
242 |
/* (non-Javadoc) |
| 239 |
* Method declared on ISelectionChangedListener. |
243 |
* Method declared on ISelectionChangedListener. |
| 240 |
*/ |
244 |
*/ |
| 241 |
public void selectionChanged(SelectionChangedEvent event) { |
245 |
public void selectionChanged(final SelectionChangedEvent event) { |
| 242 |
dispatchSelectionChanged(event.getSelection()); |
246 |
Job job = new Job("Dispatching selction changed event") { |
|
|
247 |
|
| 248 |
@Override |
| 249 |
protected IStatus run(IProgressMonitor monitor) { |
| 250 |
dispatchSelectionChanged(event.getSelection()); |
| 251 |
return Status.OK_STATUS; |
| 252 |
} |
| 253 |
}; |
| 254 |
job.setSystem(true); |
| 255 |
job.setPriority(Job.DECORATE); |
| 256 |
job.schedule(); |
| 257 |
|
| 243 |
} |
258 |
} |
| 244 |
|
259 |
|
| 245 |
private void dispatchSelectionChanged(ISelection selection) { |
260 |
private void dispatchSelectionChanged(ISelection selection) { |