| Summary: | [Compatibility] IPageLayout's setEditorAreaVisible(boolean) method is unimplemented | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] e4 | Reporter: | Remy Suen <remy.suen> | ||||||||
| Component: | UI | Assignee: | Remy Suen <remy.suen> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | Remy Suen <remy.suen> | ||||||||
| Severity: | major | ||||||||||
| Priority: | P3 | CC: | eiswind | ||||||||
| Version: | 1.0 | ||||||||||
| Target Milestone: | 4.1 M4 | ||||||||||
| Hardware: | All | ||||||||||
| OS: | All | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Remy Suen
Created attachment 182514 [details]
ModeledPageLayout patch v1
No magic required as we now actually have an MArea. We can just tweak the TBR flag of the area's placeholder element when we create the perspective.
(In reply to comment #1) > Created an attachment (id=182514) [details] > ModeledPageLayout patch v1 Fix released to CVS HEAD. Thanks for finding this, Thomas! Do let us know if you see other differences between the 3.x and 4.x SDKs. Hi Remy, This is my experience by now: If a have an perspective with a visible editorArea open, open an editor inside and then open a perspective with the editorArea invisible the editor is still shown. if I reset the perspective manually the editor is hidden, (In reply to comment #3) > If a have an perspective with a visible editorArea open, open an editor inside > and then open a perspective with the editorArea invisible the editor is still > shown. if I reset the perspective manually the editor is hidden, Thomas, I cannot reproduce this problem. :/ 1. I start my inner. 2. I open a file in the 'Java' perspective. 3. I then switch perspectives. 4. I only see the 'Problems' view. public void createInitialLayout(IPageLayout factory) { factory.addView(IPageLayout.ID_PROBLEM_VIEW, IPageLayout.LEFT, 0.5f, factory.getEditorArea()); factory.setEditorAreaVisible(false); } Does this work for you? I'm guessing not. :| No definitifely not. It appear like that at first the perspective is rendered correct and then its redrawn with the editor. at my side the single view is contributed as standalone through xml (In reply to comment #6) > at my side the single view is contributed as standalone through xml Okay, so your perspective code is just one line, yes? public void createInitialLayout(IPageLayout factory) { factory.setEditorAreaVisible(false); } And then you have _one_ standalone view contributed through the perspectiveExtensions extension point, correct? Can you attach the XML snippet? Thanks. Created attachment 185517 [details]
perspective extension snippet
added my perspective extension. and yes my perpective factory is just this single line
Unfortunately, I still cannot reproduce the problem. :/ Can you try stepping into the code to make sure that the placeholder's 'toBeRendered' feature gets set to 'false'? This should happen when you call setEditorAreaVisible(false). After that, can you try to use breakpoints to see who is making it go back to 'true'? Thanks. Created attachment 185637 [details]
This is where it gets set visible again
I guess this is the point where it gets reactivated
element at this point is org.eclipse.e4.ui.model.application.ui.advanced.impl.PlaceholderImpl@4671b856 (elementId: org.eclipse.ui.editorss, tags: null) (widget: null, renderer: null, toBeRendered: false, onTop: false, visible: true, containerData: 5000, accessibilityPhrase: null) (In reply to comment #10) > Created an attachment (id=185637) [details] > This is where it gets set visible again > > I guess this is the point where it gets reactivated Thomas, is the part that it's trying to activate the editor that you had previously opened in the first perspective? The MUIElement in bringToTop is in fact my editor. org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl@7792a63a (elementId: org.eclipse.e4.ui.compatibility.editor, tags: [removeOnHide, Editor]) (contributionURI: platform:/plugin/org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor, object: org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor@4007ab03) ..... (In reply to comment #13) > The MUIElement in bringToTop is in fact my editor. Okay, so in your first perspective, do you have other parts there? If your active part is _not_ the editor and you switch perspectives, do you still get the same problem? I'm wondering if the cause is because it's trying to preserve the active part across the perspective switch. Hi Remy, i guess this is it. if I activate another view and switch perspectives everything is fine. It's only when the editor is active. (In reply to comment #15) > Hi Remy, i guess this is it. if I activate another view and switch perspectives > everything is fine. It's only when the editor is active. Thanks for the information, Thomas. I am still trying to reproduce the problem but at least the problem is understood. How do you switch perspectives? Do you use Ctrl+F8? Are you using Window > Open Perspective... > XXX? Or do you use Window > Open Perspective... > Other...? Or do you just click on the other perspective in the perspective switcher in the top right hand corner? I would like some information here because one way is "immediate" while the other one brings a shell up in front of the user and that causes additional SWT.Activate events between the different shells (the dialog and the original workbench window). I used the switcher that opens the open perspective dialog immediately. At this point I think the reason I can't reproduce the problem is because I'm testing on Linux/gtk+ and you're on Windows. Do you think theres a chance we get this fixed in the next couple of weeks ? (In reply to comment #19) > Do you think theres a chance we get this fixed in the next couple of weeks ? Assuming I understand the problem correctly (I can't say 100% for sure because I can't reproduce the problem), then yes, I don't see this being a complicated issue to resolve. Please see bug 333081. I have attached a proof-of-concept patch there (to verify my suspicions on the cause of the bug). We can continue our discussions there. |