Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 261229 - [compare] Java compare editor: Ctrl+. opens content assist
Summary: [compare] Java compare editor: Ctrl+. opens content assist
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M6   Edit
Assignee: Tomasz Zarna CLA
QA Contact:
URL:
Whiteboard: hasPatch
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-15 13:05 EST by Markus Keller CLA
Modified: 2009-03-09 08:53 EDT (History)
3 users (show)

See Also:


Attachments
Patch v01 (2.37 KB, patch)
2009-02-25 06:21 EST, Tomasz Zarna CLA
no flags Details | Diff
mylyn/context/zip (34.02 KB, application/octet-stream)
2009-02-25 06:21 EST, Tomasz Zarna CLA
no flags Details
Patch v02 (2.61 KB, patch)
2009-03-09 08:25 EDT, Tomasz Zarna CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2009-01-15 13:05:27 EST
I20090114-1322

Open a Java compare editor for an incoming change. Ctrl+, and Ctrl+. should jump through the differences.

In the left editor, Ctrl+, initially works fine. However, Ctrl+. does not move the caret but opens the content assist popup (probably because . is an auto-activation character).

In the right editor, both shortcuts don't work. And when you set the focus back to the left editor, Ctrl+, also dosn't work there any more.
Comment 1 Dani Megert CLA 2009-01-16 02:25:52 EST
Tomasz, can you please take a look.
Comment 2 Dani Megert CLA 2009-01-16 02:29:49 EST
Would be good to have a fix for M5.
Comment 3 Tomasz Zarna CLA 2009-02-10 09:34:18 EST
I installed an IExecutionListener and the info I got from it showed me that both commands have no handlers during the execution attempt.
Comment 4 Dani Megert CLA 2009-02-24 11:54:38 EST
ping. ;-)
Comment 5 Tomasz Zarna CLA 2009-02-25 06:21:49 EST
Created attachment 126697 [details]
Patch v01

Dani, you probably won't belive it but I was looking at this issue yesterday ;) 

When switching between viewers calling setActionsActivated implementation from JMV tends to disconnect[2] "Next", "Previous" and other actions from CompareEditorContributor[3]. The fix reconnects them, so the actions are properly handled.

[1] org.eclipse.compare.contentmergeviewer.TextMergeViewer.setActionsActivated(SourceViewer, boolean)
[2] org.eclipse.ui.texteditor.AbstractTextEditor.setActionActivation(boolean) line: 5123
[3] org.eclipse.compare.internal.CompareEditorContributor.setActiveEditor(IEditorPart): line 111
Comment 6 Tomasz Zarna CLA 2009-02-25 06:21:56 EST
Created attachment 126698 [details]
mylyn/context/zip
Comment 7 Tomasz Zarna CLA 2009-02-25 06:29:00 EST
btw, the shortcuts don't work in dialogs but they are supposed to do so.
Comment 8 Tomasz Zarna CLA 2009-03-09 08:25:12 EDT
Created attachment 128020 [details]
Patch v02

Improved version of "Patch v01", the refresh takes place only when *activating* a viewer which is *editor backed*. 

Firstly, when disconnecting actions / disactivating a viewer, the active editor in CompareEditorContributor is already set or should be set to null, the refresh would set the Compare Editor as the active one, which is wrong. Secondly, when a viewer is not editor backed, the situation described in this bug doesn't occur, so there is no need to refresh the contributor.
Comment 9 Tomasz Zarna CLA 2009-03-09 08:53:26 EDT
The latest patch has been released to HEAD of org.eclipse.compare, available in builds >I20090309-0800.