File tree Expand file tree Collapse file tree 3 files changed +75
-0
lines changed
rcpttTests/platform_tests/Contexts/Workbench Context
runtime/contexts/org.eclipse.rcptt.ctx.workbench.impl/src/org/eclipse/rcptt/ctx/workbench/impl Expand file tree Collapse file tree 3 files changed +75
-0
lines changed Original file line number Diff line number Diff line change
1
+ --- RCPTT testcase ---
2
+ Format-Version: 1.0
3
+ Contexts: _osb-oDAHEfCYDPUxWxrtVw,_4zI9AWpgEeCzId1Gnkds9A
4
+ Element-Name: ResetExternalViews
5
+ Element-Type: testcase
6
+ Element-Version: 3.0
7
+ External-Reference:
8
+ Id: _lQ0MUDAHEfCYDPUxWxrtVw
9
+ Runtime-Version: 2.6.0.qualifier
10
+ Save-Time: 5/13/25, 6:46 PM
11
+ Testcase-Type: ecl
12
+
13
+ ------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa
14
+ Content-Type: text/plain
15
+ Entry-Name: .description
16
+
17
+ Copyright (c) 2025 Xored Software Inc and others.
18
+ All rights reserved. This program and the accompanying materials
19
+ are made available under the terms of the Eclipse Public License v2.0
20
+ which accompanies this distribution, and is available at
21
+ https://www.eclipse.org/legal/epl-v20.html
22
+
23
+ Contributors:
24
+ Xored Software Inc - initial creation and/or initial documentation
25
+ --------------------------------------------------------------------------------
26
+
27
+ Open the context help view and ensure that worbench context with "Reset perspective" flag closes it.
28
+ ------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa--
29
+ ------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac
30
+ Content-Type: text/ecl
31
+ Entry-Name: .content
32
+
33
+ verify-error {
34
+ get-view Help
35
+ }
36
+ ------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac--
Original file line number Diff line number Diff line change
1
+ --- RCPTT testcase ---
2
+ Format-Version: 1.0
3
+ Context-Type: org.eclipse.rcptt.ctx.ecl
4
+ Element-Name: ShowContextHelp
5
+ Element-Type: context
6
+ Element-Version: 2.0
7
+ Id: _osb-oDAHEfCYDPUxWxrtVw
8
+ Runtime-Version: 2.6.0.qualifier
9
+ Save-Time: 5/13/25, 6:45 PM
10
+
11
+ ------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa
12
+ Content-Type: text/plain
13
+ Entry-Name: .description
14
+
15
+ Copyright (c) 2025 Xored Software Inc and others.
16
+ All rights reserved. This program and the accompanying materials
17
+ are made available under the terms of the Eclipse Public License v2.0
18
+ which accompanies this distribution, and is available at
19
+ https://www.eclipse.org/legal/epl-v20.html
20
+
21
+ Contributors:
22
+ Xored Software Inc - initial creation and/or initial documentation
23
+ --------------------------------------------------------------------------------
24
+ ------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa--
25
+ ------=_.ecl.context-718f04b4-ed39-33e3-af62-0995e4561998
26
+ Content-Type: text/ecl
27
+ Entry-Name: .ecl.context
28
+
29
+ get-menu -path "Help/Show Context Help" | click
30
+ ------=_.ecl.context-718f04b4-ed39-33e3-af62-0995e4561998--
Original file line number Diff line number Diff line change @@ -261,6 +261,15 @@ private UIRunnable<Object> closeAllPerspectives(final IWorkbenchPage page) {
261
261
@ Override
262
262
public Object run () throws CoreException {
263
263
try {
264
+ // getViewReferences() returns invalid results if all perspectives are closed
265
+ // @see https://github.com/eclipse-platform/eclipse.platform.ui/issues/2978
266
+ IViewReference [] viewReferences = page .getViewReferences ();
267
+ for (IViewReference i : viewReferences ) {
268
+ // some views do not belong to a perspective, and are not closed on perspective reset, consuming screen space
269
+ // close them in a resetting workbench context explicitly
270
+ // @see https://github.com/eclipse-platform/eclipse.platform.ui/issues/2976
271
+ page .hideView (i );
272
+ }
264
273
page .closeAllPerspectives (false , false );
265
274
} catch (Throwable e ) {
266
275
RcpttPlugin .log (e );
You can’t perform that action at this time.
0 commit comments