Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 347734 - [typing] Angle brackets wrongly auto-closed when starting at the beginning of a line
Summary: [typing] Angle brackets wrongly auto-closed when starting at the beginning of...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P2 minor (vote)
Target Milestone: 3.8 M3   Edit
Assignee: Deepak Azad CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-31 03:26 EDT by Francis Sujai A CLA
Modified: 2011-10-25 10:17 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Francis Sujai A CLA 2011-05-31 03:26:27 EDT
Build Identifier: Version: 3.6.2, Build id: M20110210-1200

This happens only if the identifier is single letter.
This happens only if the identifier is typed in the first column.
I understand this is a rare scenario. But, text editors inherited from AbstractTextEditor will have the same behavior as well. 

That's why I raise this as a Minor bug.

I guess, the problem might be in org.eclipse.jdt.internal.ui.text.JavaHeuristicScanner.scanBackward() method.

Reproducible: Always

Steps to Reproduce:
1. Open a Java editor.
2. Type "int x = 10;" in the class body.
3. Then try typing "x <" in the first column.
4. Even with the identifier context (i.e. x), angular brace is auto completed as "x <>".
Comment 1 Deepak Azad CLA 2011-09-22 11:07:16 EDT
Problem was in CompilationUnitEditor.BracketInserter.verifyKey(VerifyEvent), incorrect bound was passed to the scanner.

Fixed in HEAD. (commit c6d77669612d953955efd5f92f5cdb83717c8abb)
Comment 2 Dani Megert CLA 2011-10-25 10:17:46 EDT
Verified in I20111021-0800.