Bug 563703 - Why not introduce several features(Auto Surround、Format On Type、Trim Auto Whitespace) from VS Code into Eclipse IDE
Summary: Why not introduce several features(Auto Surround、Format On Type、Trim Auto Whi...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 4.15   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-29 05:12 EDT by Gao Hao CLA
Modified: 2020-05-29 07:14 EDT (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 Gao Hao CLA 2020-05-29 05:12:14 EDT
1). Auto Surround
Surround/wrap selected text with quotes or with brackets.

2). Format On Type
When you enter the semicolon、enter/return key, the code is going to be formatted.

3). Trim Auto Whitespace
Remove trailing auto inserted whitespace(You can show whitespace in VS Code, and press enter key constantly in a function/method to see what will happen).
Comment 1 Andrew Obuchowicz CLA 2020-05-29 06:35:52 EDT
1). Not sure if this exists - in theory a snippet could probably already provide this functionality (eg. the sysout snippet lets you surround selected text with Ssystem.out.println)

2). Not sure if this exists already but shouldn't be too difficult to implement if we already have format-on-save implemented

3). Already exists through auto-format, does it not? (Ctrl + Shift + F)

I'm not against these improvements at all, but have a feeling their functionality might already exists.
Comment 2 Gao Hao CLA 2020-05-29 07:14:35 EDT
1). I know this template. But we have to press `Alt+/`. Auto Surround allows us  surround selected text without pressing any other shortcut. Just press " or ( or {.
2). Format on save will format the editing line. For example, trimming the leading whitespaces, so I must press `Tab` to indent again, and sometimes this feature may break the content-assist popup dialog, so I must press `Alt+/` again.
3). Also, format shortcut will trim the leading whitespaces.