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

Bug 573646

Summary: Restore open terminals to correct secondary views
Product: [Tools] CDT Reporter: Jonah Graham <jonah>
Component: terminalAssignee: Jonah Graham <jonah>
Status: RESOLVED FIXED QA Contact: Jonah Graham <jonah>
Severity: normal    
Priority: P3 CC: jonah
Version: Next   
Target Milestone: 10.3.0   
Hardware: PC   
OS: Linux   
See Also: https://git.eclipse.org/r/c/cdt/org.eclipse.cdt/+/180786
https://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=e44ef41078ca8ffa985d7b2b8747d23bc51146a0
https://git.eclipse.org/r/c/cdt/org.eclipse.cdt/+/180926
https://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=f71d92114f086ae706d0b59a33951748d02bdbdc
Whiteboard:

Description Jonah Graham CLA 2021-05-19 12:55:39 EDT
On restarting the IDE if terminals are open in multiple views, some of the terminals restore to the wrong view:

(In reply to Martin Oberhuber from Bug 460495 comment #2)
> Also, when 2 terminal instances are open, after a File > Restart all
> terminal are restored in the secondary instance.
> 
> Expected: Terminals should be restored in the instance in which they were
> open previously. Otherwise the screen layout is destroyed, causing more
> annoyance than value.
Comment 1 Eclipse Genie CLA 2021-05-19 13:19:24 EDT
New Gerrit change created: https://git.eclipse.org/r/c/cdt/org.eclipse.cdt/+/180786
Comment 3 Jonah Graham CLA 2021-05-19 23:42:26 EDT
Done and added to N&N https://wiki.eclipse.org/CDT/User/NewIn103#Terminal
Comment 4 Jonah Graham CLA 2021-05-20 20:41:29 EDT
If the first terminal is opened with a Ctrl-Shift-Alt-T shortcut, the name of the terminal view is "Terminal last" which means that the magic code "last" is being passed to the wrong place and being interpreted as the secondaryId instead of being one of the codes.

I think I am going to revisit this again and probably use an enum for the different types and add a new key because the special values that were and continue to be in the code base is too error prone.
Comment 5 Jonah Graham CLA 2021-05-23 09:32:18 EDT
(In reply to Jonah Graham from comment #4)
> I think I am going to revisit this again and probably use an enum for the
> different types and add a new key because the special values that were and
> continue to be in the code base is too error prone.

Revisited without using an emum.
Comment 6 Eclipse Genie CLA 2021-05-23 09:33:39 EDT
New Gerrit change created: https://git.eclipse.org/r/c/cdt/org.eclipse.cdt/+/180926