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

Bug 333780

Summary: Javascript editor does not insert spaces in tabs
Product: [WebTools] JSDT Reporter: fphan <frankioski>
Component: GeneralAssignee: Project Inbox <jsdt.javascript-inbox>
Status: RESOLVED WORKSFORME QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3 CC: daniel_megert
Version: 3.2.2   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description fphan CLA 2011-01-07 13:19:11 EST
Build Identifier: Helios 20100917-0705

When using the tab key in the Javascript editor, the tab is not made up of spaces. The preferences settings under General > Editors > Text Editors do not appear to affect the Javascript editor; tab width fails, "insert spaces for tabs" fail.

Reproducible: Always

Steps to Reproduce:
1. Create a .js file
2. Write some Javascript code
3. Type the tab key
4. Use the left-arrow to move back through the tab and witness that the cursor skips spaces
5. Go to Preferences and navigate to General > Editors > Text Editors (or get there via the link under Javascript > Editor) and modify the "tab width" (value) or "insert spaces for tabs" (check box)
6. Click "Apply" button at bottom of Preferences
7. Click "Ok" button at bottom of Preferences
8. Repeat steps 1 through 4 above and witness the cursor skipping every time the left-arrow is pressed after typing the tab key (because there are no spaces inserted in the tab)
Comment 1 Nitin Dahyabhai CLA 2011-01-07 14:52:04 EST
Check the value (and text) in the Tabulators section of the JavaScript > Editor > Typing preference page.  It wouldn't do to have the tab handling by the formatter and your own typing get so easily out of sync.