This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 413096 - [Workbench] 3.6.2 RCP application does not run correctly on 4.3 (workbench window is launching)
Summary: [Workbench] 3.6.2 RCP application does not run correctly on 4.3 (workbench wi...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.3   Edit
Hardware: PC Linux
: P3 major with 1 vote (vote)
Target Milestone: 4.4 M5   Edit
Assignee: Paul Webster CLA
QA Contact: Paul Webster CLA
URL:
Whiteboard:
Keywords:
: 417802 (view as bug list)
Depends on:
Blocks: 424127 424129
  Show dependency tree
 
Reported: 2013-07-16 13:05 EDT by Laurie Williams CLA
Modified: 2014-01-21 14:55 EST (History)
5 users (show)

See Also:


Attachments
Test project that shows the incorrect behavior (78.40 KB, application/x-zip-compressed)
2013-07-16 13:05 EDT, Laurie Williams CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Laurie Williams CLA 2013-07-16 13:05:11 EDT
Created attachment 233532 [details]
Test project that shows the incorrect behavior

I have an 3.6.2 RCP application that is basically a jface wizard. I need a workbench only so I can use the help system. I only want the jface wizard launched I don't want the workbench launched. To get this to only show the wizard on 3.6.2 I implemented the postStartup() method my ApplicationWorkbenchAdvisor class.  It basically did the creation of the wizard and launched it. 

I needed to setBlockOnOpen to false so that I could use progress monitors (indeterminate) in the application. 

Now I moved to a 4.3 eclipse base and tried to run this 3.6.2 application from that. It no longer works. The behavior in 4.3 is that is shows the workbench window as well as my jface wizard. I am stumped as to how to fix this.

I have attached a small sample application that shows this issue.

Note: If I set setBlockOnOpen(true) then I don't see the workbench window but then my progress monitors (indeterminate) no longer work. So that is not an option.

I need help asap as I have a schedule to make in a couple of weeks.
Comment 1 Paul Webster CLA 2013-07-22 14:16:48 EDT
Daniel, could you please have a look at this bug?

PW
Comment 2 Laurie Williams CLA 2013-07-24 22:12:28 EDT
Is there any update on this problem? I need to know if there is a fix or a way to work around this asap. If not I am going to quickly come up with a Plan B as my due date is the end of this week!
Comment 3 Paul Webster CLA 2013-07-25 14:24:52 EDT
2 things I noticed:

1) simply returning true from testrcp.ApplicationWorkbenchAdvisor.openWindows() used to open no windows.  Now we don't use that path at all.  This is an API regression.

2) It looks like in org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(MApplicationElement, IEclipseContext) the display loop will only run as long as one of the MApplication children is visible ... but in 3.x we can support a workbench display loop with no windows.

I think that these are probably a little complicated to put in an SR release without a lot of testing.

PW
Comment 4 Michael Rennie CLA 2013-09-26 11:25:58 EDT
*** Bug 417802 has been marked as a duplicate of this bug. ***
Comment 5 Paul Webster CLA 2013-09-30 11:24:24 EDT
Need to exit the workbench if org.eclipse.ant.internal.ui.AntRunnerWorkbenchAdvisor.openWindows() return false.

PW
Comment 6 Paul Webster CLA 2013-09-30 12:59:35 EDT
Possible fix for the ant case:  https://git.eclipse.org/r/16890

This is a hack.  For the ant case, openWindows() returns false and causes us to bail.  For the IDE case openWindows() returns true but does almost nothing.

But it's possible for RCP apps to do other things in there, and I'm not sure of the impact.

PW
Comment 7 Paul Webster CLA 2013-11-25 13:36:33 EST
A 4.2.2+ version of the fix.  It takes into account that one shouldn't save the model after declaring the program unstartable.

https://git.eclipse.org/r/18842

PW
Comment 8 Bryan Obright CLA 2013-12-06 11:18:13 EST
What kind of timeline are we looking at to get this resolved?

This has become a key issue for my team.  

A patch (even a hack) to get around this until a proper fix is available would be a great start.

Thanks

Bryan
Comment 9 Bryan Obright CLA 2013-12-06 12:47:11 EST
We are encountering this issue when running org.eclipse.ant.ui.antRunner... The scenario described in duplicate Bug 417802.

I would be interested in seeing the 4.2.2 fix applied to Kepler. If I am reading the GIT details right, that fix has only been merged to a 4.2 maintenance branch and not Kepler.  That fix may not cover all the scenarios, but it should address the scenario we are having issues with.
Comment 10 Paul Webster CLA 2013-12-11 13:45:13 EST
(In reply to Paul Webster from comment #6)
> Possible fix for the ant case:  https://git.eclipse.org/r/16890

Updated fix for the ant case for master.  It honours the openWindows() call and doesn't update the model state for a path that says it's to exit instead of open the windows.

PW
Comment 11 Paul Webster CLA 2013-12-16 09:41:28 EST
Released as http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=7100b5419eb9ccf20faab903bded57be07355a8e

I've opened Bug 424127 to consider moving the Workbench startup that builds the model.

PW
Comment 12 Paul Webster CLA 2014-01-21 14:15:13 EST
In 4.4.0.I20140120-2000

PW
Comment 13 Bryan Obright CLA 2014-01-21 14:55:59 EST
Thanks for the fix Paul... We tried the fix in a nightly 4.3 maintenance build and things are good for our scenario.