Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 370219 - Selection service could use an ability to pause dependency recording
Summary: Selection service could use an ability to pause dependency recording
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.2 M6   Edit
Assignee: Oleg Besedin CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 370490 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-01-31 09:48 EST by Oleg Besedin CLA
Modified: 2012-03-13 13:47 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Besedin CLA 2012-01-31 09:48:52 EST
Some Run-and-Tracks might benefit from an ability to stop & resume dependency recording, for instance, when calling 3rd party code such as listeners.

In particular, selection service uses async calls to work around this issue which changes expected behavior.

I'll add the following methods to RunAndTrack:
	pauseRecording()
	resumeRecoding()

to provide this functionality and will update selection service to use it.
Comment 2 Oleg Besedin CLA 2012-01-31 10:07:36 EST
.
Comment 3 Remy Suen CLA 2012-01-31 10:18:15 EST
With these new methods we can probably rewrite UpdateExpression to not dispatch its calls asynchronously?
Comment 4 Oleg Besedin CLA 2012-01-31 10:38:10 EST
(In reply to comment #3)
> With these new methods we can probably rewrite UpdateExpression to not dispatch
> its calls asynchronously?

Seems like a good idea, I'll reopen bug bug 347140.
Comment 5 Oleg Besedin CLA 2012-02-01 11:59:00 EST
It seems that I need to make the pair of calls safer: the number of "pause" requests must match with the number of "resume" requests.

The simplest way to do that seems to be providing one method on RunAndTrack:

   runExternalCode(Runnable runnable)

instead of pauseRecording() and resumeRecoding() pair of methods.

That would ensure that we get exactly one "pause" and one "resume" request.

Runtime change:
http://git.eclipse.org/c/platform/eclipse.platform.runtime.git/commit/?id=1634731aa1325e5c90be3be2b08384414b77f77e

I also updated SelectionAggregator.
Comment 6 Remy Suen CLA 2012-02-02 16:00:18 EST
*** Bug 370490 has been marked as a duplicate of this bug. ***
Comment 7 Oleg Besedin CLA 2012-03-13 13:47:27 EDT
Verified that code is present in the I20120313-0610.