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

Bug 339042

Summary: Code completion in view-based editors conflicts with file editors
Product: [Modeling] TMF Reporter: Sebastian Benz <sebastian.benz>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sven.efftinge
Version: 2.0.0Flags: sven.efftinge: indigo+
Target Milestone: M6   
Hardware: All   
OS: All   
Whiteboard:

Description Sebastian Benz CLA 2011-03-06 16:07:10 EST
Given two xtext editors, both open at the same time. One inside the active editor part and one inside a view part (e.g. Xrepl). When the code completion is invoked from within the view part, the proposals are shown in the editor part instead of the view part. The problem is that the expression:

<extension point="org.eclipse.core.expressions.definitions">
      <definition
            id="isActiveEditorAnInstanceOfXtextEditor">
         <with
               variable="activeEditor"> <- should check for activePart
            <adapt
                  type="org.eclipse.xtext.ui.editor.XtextEditor">
            </adapt>
         </with>
      </definition>
   </extension>

checks whether the active editor is an xtext editor. In the described scenario this is always true, resulting in code completion showing only in the editor part and not in the view. This can be fixed by checking whether the active part is an XtextEditor.
Comment 1 Sven Efftinge CLA 2011-03-09 05:09:18 EST
pushed to master
Comment 2 Sebastian Benz CLA 2011-03-13 17:25:26 EDT
Thanks for fixing.
Comment 3 Karsten Thoms CLA 2017-09-19 18:06:36 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 4 Karsten Thoms CLA 2017-09-19 18:16:19 EDT
Closing all bugs that were set to RESOLVED before Neon.0