Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 369447

Summary: Simplify selection service implementation
Product: [Eclipse Project] Platform Reporter: Oleg Besedin <ob1.eclipse>
Component: UIAssignee: Oleg Besedin <ob1.eclipse>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: david_williams, emoffatt, pwebster, remy.suen
Version: 4.2   
Target Milestone: 4.2 M6   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch none

Description Oleg Besedin CLA 2012-01-23 15:40:38 EST
The selection service implementation has grown to be a rather complicated combination of DS, creation functions, trackers, and computed functions. This creates problems in CPU performance and debugging.
Comment 1 Oleg Besedin CLA 2012-01-23 15:54:01 EST
Created attachment 209938 [details]
Patch

Patch to be applied once M6 starts.

Changes:

gone:
	SelectionLookupFunction
	SelectionServiceCreationFunction
	ApplicationSelectionServiceImpl
	PartSelectionServiceImpl
	ESelectionService.SELECTION (API, deprecated) (use IServiceConstants.ACTIVE_SELECTION)

added:
	SelectionAggregator (this is what SelectionServiceImpl used to be)
	E4Application#initializeServices() - place to initialize services we need in app & window contexts, potential API
		
	
changed:
	SelectionServiceImpl - now a wrapper that remembers its context and delegates everything to SelectionAggregator
Comment 2 Oleg Besedin CLA 2012-01-31 10:06:22 EST
Remy found a problem when closing 2nd workbench window, this should fix it:

http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=2e7be1c5681fb49132e593d4072a42d5eff8db7e
Comment 3 Oleg Besedin CLA 2012-01-31 10:39:36 EST
.
Comment 4 Oleg Besedin CLA 2012-03-13 13:44:41 EDT
Verified that code is present in the I20120313-0610.