Bug 577264

Summary: [WorkingSets] Bad behaivior "Open Resource..." and Window Working Set in multiple window
Product: [Eclipse Project] Platform Reporter: Ryuhei Ishizuka <kacchi123>
Component: UIAssignee: Platform-Resources-Inbox <platform-resources-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: 4.23   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X   
Whiteboard:
Attachments:
Description Flags
Screenshot of step 8 none

Description Ryuhei Ishizuka CLA 2021-11-15 11:02:15 EST
Created attachment 287516 [details]
Screenshot of step 8

Window Working Set with multiple window behaves strangely in Open Dialog.
e.g. Open Resource, Open Type
Dialog title has "Open Xxxxx - Window Working Set" but behavior is not.

*Steps to reproduce*

0. Setup projects to test
workspace
├──ProjectA [Java Project][Working Set: A]
│   └─src
│       └─TestClassB.java
└──ProjectA [Java Project]
     └─src
         └─TestClassB.java

Working Set[A]: ProjectA
Working Set[B]: ProjectA

Window1: Window Working Set = (A)
Window2: Window Working Set = (B)

1. Focus "Window1"
2. Select [Navigate]-[Open Resource] from menu
    -> Open "Open Resource" dialog
3. Select [Select Working set] from Kebab Menu
    -> Open "Select Working set" dialog
4. Check radio "(x) Window Working Sets" and click "OK" button
    -> Back to "Open Resource" dialog
5. Click "Cancel" button
    -> Back to "Window1"
6. Focus "Window2"
7. Select [Navigate]-[Open Resource] from menu
    -> Open "Open Resource" dialog
8. Type "TestClass" into [Search] input field
    -> "Matching items:" lists "TestClassA.java" (expect "TestClass B")

[8]'s dialog menu title is "Open Resource - Window Working Set".
I think, that's good because dialog settings should be persisted.
But "Select Working Set" (in Kebab menu) was disassembled to Projects from
Window1's Window Working Sets like this.
 ( ) Window Working Sets
 ( ) No Working Sets
 (o) Selected Working Sets
  [x] A
  [ ] B
  [ ] Java Main Sources
  [ ] Java Test Sources

I'm expecting [8] result is as follows.
 * "Open Resource - Window Working Set"
 * "Matching items:" lists "TestClassB.java"
 * "Select Working Set" (in Kebab menu)
     (o) Window Working Sets
     ( ) No Working Sets
     ( ) Selected Working Sets

This phenomenon also occurs in "Open Type".

Is this a bug?