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

Bug 331402

Summary: [Perspectives] IPageLayout layout.setFixed(true) does not fix the perspective
Product: [Eclipse Project] Platform Reporter: Lars Vogel <Lars.Vogel>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: CLOSED FIXED QA Contact: Paul Webster <pwebster>
Severity: normal    
Priority: P3 CC: dany.eudes, jarek.przygodzki, Lars.Vogel, remy.suen, sharamac, tomasz.galazka
Version: 3.6.2   
Target Milestone: 4.3 M6   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Empty view above Actual View none

Description Lars Vogel CLA 2010-11-30 04:20:51 EST
According to the Javadoc of IPageLayout.setFixed(true): In a fixed layout, layout parts cannot be moved or zoomed, and the initial set of views cannot be closed.

This does currently not work. To test: create a new RCP Applikation based on the "RCP Application with a view" example. 

Delete the perspetiveExtension extension point and cotribute the view via Perspective.java to the following.

public void createInitialLayout(IPageLayout layout) {
		layout.addView("com.example.view.view", IPageLayout.LEFT, 0.95f, layout.getEditorArea());
		layout.setEditorAreaVisible(true);
		layout.setFixed(true);
	}

It seems that the position layout.setFixed(true) in createInitialLayout is important. The following works

public void createInitialLayout(IPageLayout layout) {
		layout.setFixed(true);
		layout.addView("com.example.view.view", IPageLayout.LEFT, 0.95f, layout.getEditorArea());
		layout.setEditorAreaVisible(true);
	}

I suggest to either adjust the implementation or to mention this in the Javadoc.
Comment 1 Lars Vogel CLA 2012-05-10 13:59:17 EDT
Different solution available with Eclipse 4, closing as fixed.
Comment 2 Tomasz Galazka CLA 2013-03-06 10:27:22 EST
What is that mysterious "different solution"? I have that same bug.
Comment 3 Lars Vogel CLA 2013-03-06 11:01:07 EST
In Eclipse 4 just don't include the org.eclipse.e4.ui.workbench.addons.swt plug-in in your product.
Comment 4 Tomasz Galazka CLA 2013-03-06 12:59:09 EST
But when I don't add  org.eclipse.e4.ui.workbench.addons.swt in my application in place of min/standart/max buttons in views and editors I have gets some visual artefacts - blank fields. I don't needs min/max buttons but visual artefacts look bad.
Comment 5 Lars Vogel CLA 2013-03-06 13:20:48 EST
@Tomasz, I suggest you asked that in the Eclipse e4 forums and post also a screenshot. I have not seen this, but if that is the case I suspect this is a new bug.
Comment 6 Tomasz Galazka CLA 2013-03-06 13:25:09 EST
Ok. Thanks a lot for help.
Comment 7 Tomasz Galazka CLA 2013-03-07 09:29:18 EST
To early to celebrate. I remove addons.swt from my application but this don't fix this problem. Any other dependencies?
Comment 8 Lars Vogel CLA 2013-03-07 09:51:47 EST
@Tomasz removing this plug-in does not allow you to DnD and minimize and maximize your parts. See http://www.vogella.com/articles/EclipseRCP/article.html#modeladdons

What else are you looking for?
Comment 9 Tomasz Galazka CLA 2013-03-07 12:32:50 EST
I mean this solution dosn't resolve fixed layout problem.
Comment 10 Lars Vogel CLA 2013-03-07 12:41:13 EST
Not sure what you mean but Eclipse 3.x API is not further development and Eclipse 4 RCP has addressed this issue.
Comment 11 Tomasz Galazka CLA 2013-03-12 11:54:30 EDT
Now I understand what you mean. 
I'm not looking for  block DnD, minimize and maximize parts. I want to create views of fixed size, so user could't resize this views. Also I want block width of views so it wouldn't resizing  during resize of main application windows. When I develop my application under order Eclipse version its work when perspective was in fixed state, after migration to Eclipse Juno - this feature disappear. 
Probably I must open new topic.
Comment 12 Shankar Ramachandran CLA 2013-07-01 06:50:36 EDT
(In reply to comment #11)
> Now I understand what you mean. 
> I'm not looking for  block DnD, minimize and maximize parts. I want to
> create views of fixed size, so user could't resize this views. Also I want
> block width of views so it wouldn't resizing  during resize of main
> application windows. When I develop my application under order Eclipse
> version its work when perspective was in fixed state, after migration to
> Eclipse Juno - this feature disappear. 
> Probably I must open new topic.

@Tomasz Galazka,

I have a similar case to what you have explained in comment 11. Can you please let me know how were you able to fix the functionality? Did you need to raise separate defects in here?
Comment 13 Shankar Ramachandran CLA 2013-07-01 07:07:34 EDT
Created attachment 232941 [details]
Empty view above Actual View

On trying it with Kepler, I saw that my view was fixed but a re-sizeable empty view was coming just above my view. Itat view still has min/max button. Is this right? or am I doing something else which is wrong?
Comment 14 Tomasz Galazka CLA 2013-07-01 08:40:35 EDT
I was only able too block resize of views by user using:
http://www.eclipse.org/forums/index.php/t/452652/
And I dont't have problem like you in comment 13.
Comment 15 Shankar Ramachandran CLA 2013-07-01 09:38:28 EDT
(In reply to comment #14)
> I was only able too block resize of views by user using:
> http://www.eclipse.org/forums/index.php/t/452652/
> And I dont't have problem like you in comment 13.

Hi  Tomasz Galazka,

Since I am a newbie, I am not able to follow the suggestions on the link provided. Can you provide an example as to how I need to go about doing this. I would like to see by doing this am I able to remove the current issue I am facing as well.
Comment 16 Tomasz Galazka CLA 2013-07-02 02:05:50 EDT
Shankar explain again what problem you want to fix.
Comment 17 Shankar Ramachandran CLA 2013-07-02 02:28:37 EDT
Thanks Tomasz Galazka. Using your reference I was able to hide the view/resize buttons of the cool-bar but my application's resize/maximize buttons still is enabled for the end-user to use. Earlier using setShellStyle with SWT.MIN, but that isn't working now. I was hoping this fix would take care of that as well. But unfortunately, that isn't getting resolved with this fix. I was hoping for some directions for this.
Comment 18 Tomasz Galazka CLA 2013-07-02 02:38:33 EDT
"resize/maximize buttons still is enabled" - I have no solution for that. Share if you find anything.
Comment 19 Shankar Ramachandran CLA 2013-07-02 02:46:19 EDT
I had raised a separate question in stack over flow at http://stackoverflow.com/questions/17364420/eclipse-rcp-applicationworkbenchwindowadvisor-setshellstyleswt-min-not-wor. Does this mean that it is a issue or whether it is not meant to be used this way?
Comment 20 Shankar Ramachandran CLA 2013-07-02 03:21:18 EDT
It seems an issue. 
Here is the link. https://bugs.eclipse.org/bugs/show_bug.cgi?id=379396