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

Bug 289320

Summary: [Intro] Restoring WorkBench perspective out of Welcome page shows CheatSheet maximized
Product: [Eclipse Project] Platform Reporter: Manuel Maier <manuel.maier>
Component: User AssistanceAssignee: Chris Austin <ChrisAustin>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P5 CC: ChrisAustin, helmut.haigermoser, stephen.francisco
Version: 3.5Keywords: helpwanted
Target Milestone: 3.8 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Manuel Maier CLA 2009-09-14 04:20:31 EDT
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.12) Gecko/2009070811 Red Hat/3.0.12-1.el5_3 Firefox/3.0.12
Build Identifier: 20090611-1540

- Start Eclipse in Application Development perspective
- Select Help > Cheat Sheets (Cheat Sheets opens on top right)
- Select Help > Welcome (Welcome opens)
- Click "Go to the Workbench" (Workbench opens with Cheat Sheets maximized)


Reproducible: Always
Comment 1 Helmut J. Haigermoser CLA 2011-11-24 11:24:44 EST
CQ:WIND00091067
Can we get a technical comment from platform-UI?
Can you reproduce, is this fixable in 3.8?
Thanks a lot! :)
Helmut
Comment 2 Eric Moffatt CLA 2011-11-25 10:38:37 EST
This is a result of a combination of two things:

1) Both Welcome and Cheat Sheets share a stack
2) 'Go to Workbench' closes the view and opens a trim equivalent

Under regular conditions there's only the Welcome open in the stack so 'go to workbench' causes the whole stack to go empty which in turn causes it to restore the other stacks. Here, since there's another view open in the same stack it remains maximized...

I'll take a look to see if there's a fix...
Comment 3 Eric Moffatt CLA 2011-11-25 10:42:42 EST
OK...I have some code that will fix the defect but it's under the UA component so I can't commit it...

In org.eclipse.ui.internal.intro.impl.model.url.IntroURL there's a method called

switchToLaunchBar()

in there is a call to 'closeIntro' (that's what causes the view to close) just before that line we need to force the intro back into 'standby' state (i.e. not maximized) by adding the following code:

PlatformUI.getWorkbench().getIntroManager().setIntroStandby(intro, true);

I'll pass this along to the UA component...
Comment 4 Helmut J. Haigermoser CLA 2011-11-25 10:55:53 EST
> 
> I'll pass this along to the UA component...

Thanks Eric! :)
UA, please let us know if this is a fix you'll accept into the 3.8 stream! :)
Helmut
Comment 5 Chris Austin CLA 2011-11-29 12:53:20 EST
Yes, this looks like a simple fix.  I have added the code and tested - looks good.

Change committed to master, integration.

http://git.eclipse.org/c/platform/eclipse.platform.ua.git/commit/?h=integration&id=ebaa5c26e60b0a64d63de4c72ea7cfda8f4edc02
Comment 6 Helmut J. Haigermoser CLA 2011-11-30 04:48:21 EST
(In reply to comment #5)
> Yes, this looks like a simple fix.  I have added the code and tested - looks
> good.
> 
> Change committed to master, integration.
> 
> http://git.eclipse.org/c/platform/eclipse.platform.ua.git/commit/?h=integration&id=ebaa5c26e60b0a64d63de4c72ea7cfda8f4edc02

Thanks Chris, good work! :)
Helmut