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

Bug 469468

Summary: Starting eclipse with wellcome window maximized and wst xml multipage editor opened cause content assistant never appear unless reopened
Product: [Eclipse Project] Platform Reporter: Kantor Jan <jan_kantor>
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: bartlomiej, bsd, rolf.theunissen
Version: 4.4.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
eclipse sample workspace none

Description Kantor Jan CLA 2015-06-05 07:41:24 EDT
Created attachment 254146 [details]
eclipse sample workspace

Starting eclipse with welcome window maximized and wst xml multipage editor opened cause content assistant never appear in initially opened file unless reopened. Check out attached workspace (ensure you have WTP plugin installed).

The problem seems to be in provided "limbo" shell instead of "eclipse" and so org.eclipse.ui.internal.handlers.HandlerActivation.evaluate(IEvaluationContext context) return false for "org.eclipse.ui.edit.text.contentAssist.proposals". This actually happen in:
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(MUIElement element)
once limbo shell is attached with element.elementId:"org.eclipse.ui.ide.perspectivestack" which cause propagating shell also to "org.eclipse.e4.ui.compatibility.editor"

So if I just mindless modify code part in safeCreateGui method
from:
if (!element.isVisible()) {
	parent = getLimboShell();
}

to:
if (!element.isVisible() && !"org.eclipse.ui.ide.perspectivestack".equals(element.getElementId())) {
	parent = getLimboShell();
}

problem seems to be solved. Maybe there should be some better handling of reparenting strategy or something instead. It's up to you but however I beleave this issue deserves beeing handled somehow.



Eclipse id: M20150204-1700
Version: Luna SR2 (4.4.2)
Comment 1 Kantor Jan CLA 2015-07-08 08:22:35 EDT
FYI: It seems minimize/maximize mechanism was introduced by: https://bugs.eclipse.org/bugs/show_bug.cgi?format=multiple&id=315290 with initial commit done by Eric Moffatt on 3.6.2010 20:37:10 (8f96fa78016eea2bd9648866c01b101ef63da0ad)
Comment 2 Brian de Alwis CLA 2015-07-08 13:19:12 EDT
Moved to Platform/UI
Comment 3 Kantor Jan CLA 2015-07-09 07:45:51 EDT
Additional remarks:

1) Basically all editors which register only content assistant by using AbstractTextEditor.createActions() and so AbstractTextEditor.setAction(...) won't work because of providing limbo shell (LegacyHandlerSubmissionExpression.evaluate(...) returns false for limbo shell). Java editor actually works only thanks to parallel content assistant registration in: BasicCompilationUnitEditorActionContributor.init().

2) It's perhaps not surprising that it's not only question of welcome screen. Any maximized view (e.g. console) seems to have same effect once Eclipse is started and editor is already opened.
Comment 4 Rolf Theunissen CLA 2020-04-05 06:14:05 EDT

*** This bug has been marked as a duplicate of bug 426557 ***