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

Bug 314685

Summary: EModelService's findElements(MUIElement, String, Class<T>, List<String>) method can return duplicates
Product: [Eclipse Project] e4 Reporter: Remy Suen <remy.suen>
Component: UIAssignee: Eric Moffatt <emoffatt>
Status: RESOLVED FIXED QA Contact: Remy Suen <remy.suen>
Severity: major    
Priority: P3    
Version: 1.0   
Target Milestone: 1.0 RC0   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch to exclude duplicate entries in 'findElements' none

Description Remy Suen CLA 2010-05-27 10:44:18 EDT
I'm getting two editors in the returned list that's pointing at the same thing. The returned collection is a List and not a Set but this feels wrong.
Comment 1 Remy Suen CLA 2010-05-27 10:51:22 EDT
This problem is very easy to reproduce.

1. Launch a clean inner.
2. Make a project and a file.
3. Open the file (if it's not already opened).
4. Switch perspectives.
5. Restart.
6. Close the file.
7. Try opening it again with Ctrl+Shift+R, it won't come back.
Comment 2 Eric Moffatt CLA 2010-05-27 11:00:54 EDT
Created attachment 170198 [details]
Patch to exclude duplicate entries in 'findElements'
Comment 3 Remy Suen CLA 2010-05-27 11:10:16 EDT
(In reply to comment #2)
> Created an attachment (id=170198) [details]
> Patch to exclude duplicate entries in 'findElements'

Works for me. Released to HEAD along with a test.