Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339042 - Code completion in view-based editors conflicts with file editors
Summary: Code completion in view-based editors conflicts with file editors
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.0.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: M6   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-06 16:07 EST by Sebastian Benz CLA
Modified: 2017-09-19 18:16 EDT (History)
1 user (show)

See Also:
sven.efftinge: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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