Skip to content

Commit abc0779

Browse files
committed
Merge branch 'release/2.6'
2 parents ecc4304 + f4b7ebd commit abc0779

File tree

3 files changed

+75
-0
lines changed

3 files changed

+75
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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--
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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--

runtime/contexts/org.eclipse.rcptt.ctx.workbench.impl/src/org/eclipse/rcptt/ctx/workbench/impl/WorkbenchContextProcessor.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,15 @@ private UIRunnable<Object> closeAllPerspectives(final IWorkbenchPage page) {
261261
@Override
262262
public Object run() throws CoreException {
263263
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+
}
264273
page.closeAllPerspectives(false, false);
265274
} catch (Throwable e) {
266275
RcpttPlugin.log(e);

0 commit comments

Comments
 (0)