Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 367031 - [api] handle cursor changed react with special keys
Summary: [api] handle cursor changed react with special keys
Status: RESOLVED INVALID
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2011-12-18 07:13 EST by Wojciech Trocki CLA
Modified: 2011-12-20 03:32 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wojciech Trocki CLA 2011-12-18 07:13:59 EST
Build Identifier: 

Editor's cursor changed method react to some non printable characters like CTRL, F4, etc.
For example when CTRL is pressed method handleCursorPositionChanged is executed while text viewer cursor stays unchanged.

See AbstractTextEditor class  getCursorListener method:

    protected final ICursorListener getCursorListener() {
        if (fCursorListener == null) {
            fCursorListener= new ICursorListener() {

                public void keyPressed(KeyEvent e) 
                    //launch for any key..
                    handleCursorPositionChanged();
                }

                public void keyReleased(KeyEvent e) {
                }

                public void mouseDoubleClick(MouseEvent e) {
                }

                public void mouseDown(MouseEvent e) {
                }

                public void mouseUp(MouseEvent e) {
                    handleCursorPositionChanged();
                }
            };
        }
        return fCursorListener;
    }

Reproducible: Always
Comment 1 Dani Megert CLA 2011-12-19 11:36:41 EST
And the problem for you is?
Comment 2 Wojciech Trocki CLA 2011-12-19 12:08:47 EST
(In reply to comment #1)
> And the problem for you is?

Unclear method in API. 

I make my own, simple handleCursorPositionChanged. If problem is known, please close this bug.
Comment 3 Dani Megert CLA 2011-12-20 03:32:03 EST
(In reply to comment #2)
> (In reply to comment #1)
> > And the problem for you is?
> 
> Unclear method in API. 

The Javadoc says that it is only a potential change of the position. No plans to change this.