Bug 353130 - [editor] Support for auto indentation (Ctrl+I)
Summary: [editor] Support for auto indentation (Ctrl+I)
Status: NEW
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 437570 444381 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-07-26 11:18 EDT by Espinosa CZ CLA
Modified: 2017-07-17 00:28 EDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Espinosa CZ CLA 2011-07-26 11:18:27 EDT
Build Identifier: 20110615-0604

I use Auto Indentation "Ctrl+i" in Java files. Is much less obtrusive then re-formatting (Ctrl+Shift+f).

It keeps line ends in place, just fixing things like spaces -> tabs conversion or vice versa, converting all indentation to one system - tabs or spaces, removing ugly hard to spot hybrids, fixing indentation generally. 

However Auto Indentation "Ctrl+i" in xtext editor (xtext2), xtend editor (xtend2) and all my DSL editors cause deletion of the whole file content! The page is blank.

Solutions

1) if Auto Indentation "Ctrl+i" is not supported, it should be somewhat intelligently blocked, not doing anything, but not deleting the file (editor content).

2) Working Auto Indentation "Ctrl+i" would be well appreciated.
I am not that proficient with Xtext Formatting API to be able to judge complexity to provide just indentation. I am still on the learning curve.


Reproducible: Always

Steps to Reproduce:
1. load a sample xtext/xtend/DSL file to relevant xtext/xtend/DSL editor
2. hit Ctrl+I (auto indentation)
3. content disappears, blank page, (hit Undo to get out of this safely)
Comment 1 Sebastian Zarnekow CLA 2011-10-17 17:10:21 EDT
Please note that auto indentation is not supported by default Xtext editors. Ctrl I just inserts a tab. If you selected the complete content of your file, it will be replaced similar to the effect that a plain 'space' or 'a' would have.

Marked as enhancement request.
Comment 2 Sebastian Zarnekow CLA 2014-09-17 11:21:27 EDT
*** Bug 444381 has been marked as a duplicate of this bug. ***
Comment 3 Sebastian Zarnekow CLA 2014-09-17 11:22:29 EDT
Possibly a candidate for v2.8 - maybe we can keep that in mind for the planned new formatting infrastructure in 2.8
Comment 4 Christian Dietrich CLA 2017-07-17 00:28:18 EDT
*** Bug 437570 has been marked as a duplicate of this bug. ***