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

Bug 342947

Summary: org.eclipse.e4.ui.workbench.addons.swt is not found in the org.eclipse.e4.ui.feature feature
Product: [Eclipse Project] e4 Reporter: Christoph Keimel <c.keimel>
Component: UIAssignee: Project Inbox <e4.ui-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: aniefer, c.keimel, emoffatt, remy.suen, tom.schindl
Version: unspecified   
Target Milestone: 4.1 M7   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 335733    
Bug Blocks:    
Attachments:
Description Flags
testcase project
none
Code Changes none

Description Christoph Keimel CLA 2011-04-15 06:48:04 EDT
Build Identifier: 20110319-2305

having added the MinMaxAddon I would suspect a "Maximize"-Button to appear for a PartStack. At the moment I only have the Minimize-Button. Double-Clicking the Header also does not lead to maximizing the part.

Using 0.9.1.v20110331-2030 of the org.eclipse.e4.ui.workbench and *.renderers.swt plug-ins for a simple e4 RCP Application (see attached project).

Reproducible: Always

Steps to Reproduce:
Please refer to the attached test project.
Comment 1 Christoph Keimel CLA 2011-04-15 06:48:55 EDT
Created attachment 193350 [details]
testcase project
Comment 2 Remy Suen CLA 2011-04-15 13:48:52 EDT
Do you see the adjustCTFButtons(MUIElement) method of the MinMaxAddon getting called?
Comment 3 Christoph Keimel CLA 2011-04-18 08:59:59 EDT
org.eclipse.e4.ui.workbench.addons.minmax.MinMaxAddon does not have a method named adjustCTFButtons. Actually: I didn't find any function with that name in any of the plug-ins of my Target Platform.

Using Plugin: org.eclipse.e4.ui.workbench.addons.swt (0.9.0.v20110311-1500)
Comment 4 Remy Suen CLA 2011-04-18 09:04:21 EDT
(In reply to comment #3)
> Using Plugin: org.eclipse.e4.ui.workbench.addons.swt (0.9.0.v20110311-1500)

You need a newer bundle then.
Comment 5 Christoph Keimel CLA 2011-04-18 11:17:17 EDT
so this isn't actually a bug. Sorry for that. Closing the issue ...

I would have suspected the newer plug-in to be included in one of the Stream Integration Builds (i.e. eclipse-e4-repo-incubation-I20110415-1243).
Comment 6 Remy Suen CLA 2011-04-18 11:19:16 EDT
(In reply to comment #5)
> so this isn't actually a bug. Sorry for that. Closing the issue ...
> 
> I would have suspected the newer plug-in to be included in one of the Stream
> Integration Builds (i.e. eclipse-e4-repo-incubation-I20110415-1243).

If it's not then it sounds like we have a build problem.
Comment 7 Remy Suen CLA 2011-04-18 14:16:02 EDT
Andrew, I don't see a org.eclipse.e4.ui.workbench.addons.swt_0.9.0.v20110414-2200.jar in the eclipse-e4-repo-incubation-I20110415-1243.zip file. Any ideas what might've gone wrong?
Comment 8 Andrew Niefer CLA 2011-04-18 14:35:34 EDT
org.eclipse.e4.ui.workbench.addons.swt does not seem to be included by any of the e4 features.

I guess it should perhaps be added to org.eclipse.e4.ui.feature ?
Comment 9 Remy Suen CLA 2011-04-19 07:46:10 EDT
(In reply to comment #8)
> org.eclipse.e4.ui.workbench.addons.swt does not seem to be included by any of
> the e4 features.
> 
> I guess it should perhaps be added to org.eclipse.e4.ui.feature ?

Actually, we don't include the compatibility layer in this bundle either so including the addons bundle will end up pulling the compatibility layer with it. This could be bad.
Comment 10 Thomas Schindl CLA 2011-04-19 07:48:06 EDT
So IMHO as always pointed out. I think swt.addons should be splitted into 2 bundles or even better made free from compat features
Comment 11 Thomas Schindl CLA 2011-04-19 07:49:51 EDT
well splitting into 2 is probably not good as well maybe simply move the classes who can't be freed from compat layer deps simply move the addon there?
Comment 12 Remy Suen CLA 2011-04-19 07:52:31 EDT
(In reply to comment #11)
> well splitting into 2 is probably not good as well maybe simply move the
> classes who can't be freed from compat layer deps simply move the addon there?

I think this is a great idea because then we don't need to introduce additional releng work for Paul and Andrew.
Comment 13 Eric Moffatt CLA 2011-04-19 11:23:59 EDT
+1, it's just the PerspectiveSwitcher isn't it ?

BTW, I think I can change the min/max code to allow both min & max buttons on stacks if there is no 'shared area'...the 'minimize only' code is there to distinguish stacks 'outside' the shared area.
Comment 14 Remy Suen CLA 2011-04-19 12:52:25 EDT
(In reply to comment #11)
> well splitting into 2 is probably not good as well maybe simply move the
> classes who can't be freed from compat layer deps simply move the addon there?

I have released the necessary refactorings to HEAD.

(In reply to comment #8)
> org.eclipse.e4.ui.workbench.addons.swt does not seem to be included by any of
> the e4 features.
> 
> I guess it should perhaps be added to org.eclipse.e4.ui.feature ?

Andrew, could you update the build so that the addons bundle gets included in the org.eclipse.e4.ui.feature? Thanks.
Comment 15 Christoph Keimel CLA 2011-04-20 07:20:53 EDT
Created attachment 193685 [details]
Code Changes

Following the discussion in Bug 342947 I have checked out the current plug-in from HEAD. I initially got some NullPointerExceptions because I have no "EDITOR_AREA" defined. 

It seems to me, that (at the moment) it is necessary to define an Element with the ID set ID_EDITOR_AREA. 

If I modify the code to not use the EDITOR_AREA by check for null, the maximize button will just switch to Restore-Mode without maximizing the PartStack.

MinMaxAddon.java - Lines 422 and 445
ModelServiceImpl.java - Line 63
(see Attachment "MinMaxAddon_changes.pdf")
Comment 16 Remy Suen CLA 2011-04-20 07:24:23 EDT
(In reply to comment #15)
> Following the discussion in Bug 342947 I have checked out the current plug-in
> from HEAD. I initially got some NullPointerExceptions because I have no
> "EDITOR_AREA" defined. 

Hi Christoph, yes, I found some bugs with the min/max support for regular RCP applications yesterday, see bug 343295 (the problem you saw) and bug 343298.
Comment 17 Christoph Keimel CLA 2011-04-20 10:54:18 EDT
Hi Remy,

thanks for the fix! Works like a charm :-)

Christoph
Comment 18 Andrew Niefer CLA 2011-04-20 11:28:35 EDT
(In reply to comment #14)
> Andrew, could you update the build so that the addons bundle gets included in
> the org.eclipse.e4.ui.feature? Thanks.

This is done.