redhat-developer / redhat-developer/vscode-java
Code formatter does not support additive operator preferences
オープン
@snjeza がすでに取り組んでいます。
2019年5月21日 から。
bug
formatter
- 主要言語
- TypeScript
- スター
- 2.3k
- フォーク
- 546
- 平均マージ
- 20時間 1分
- マージ済み PR(30日)
- 11
説明
Eclipse code formatting supports a setting that wraps lines after the string concatenation operator (+), along with column formatting that aligns text with one element per line:
public enum SqlQuery {
createChatSchema( "CREATE SCHEMA IF NOT EXISTS chat;" +
"ALTER SCHEMA chat" +
" OWNER TO postgres;" +
"CREATE TABLE IF NOT EXISTS chat.messages_as_json" +
" (id BIGSERIAL PRIMARY KEY, message JSON NOT NULL);" ),
// leaving out constructor, etc.
}
Environment
Version: 1.34.0 (user setup)
Commit: a622c65b2c713c890fcf4fbf07cf34049d5fe758
Date: 2019-05-15T21:59:37.030Z
Electron: 3.1.8
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.18898
Java extension version: 0.7.1
Steps To Reproduce
- Export eclipse code style with:
- string concatenation wrap after operator
- wrap all elements, one per line
- export settings from eclipse
- set vscode url to point at the exported settings
- create a type that defines a String that includes wrapping.
- auto format the file
Current Result
public enum SqlQuery {
createChatSchema("CREATE SCHEMA IF NOT EXISTS chat;" + "ALTER SCHEMA chat" + " OWNER TO postgres;"
+ "CREATE TABLE IF NOT EXISTS chat.messages_as_json"
+ " (id BIGSERIAL PRIMARY KEY, message JSON NOT NULL);"),
Expected Result
public enum SqlQuery {
createChatSchema( "CREATE SCHEMA IF NOT EXISTS chat;" +
"ALTER SCHEMA chat" +
" OWNER TO postgres;" +
"CREATE TABLE IF NOT EXISTS chat.messages_as_json" +
" (id BIGSERIAL PRIMARY KEY, message JSON NOT NULL);" ),
// leaving out constructor, etc.
}
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
評価
この issue はまだ評価されていません。