mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-10 13:17:09 +07:00
Corrected parameters order, which caused extra spaces formatting when performed on selected fragment. Formatter depending on the result of FormatterUtil.isFormatterCalledExplicitly decides whether to cut trailing spaces or not, and command name mismatch eliminated range correction. Test added.
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
public class T {
|
||||
|
||||
|
||||
public void tutu() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void test() {}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
public class T {
|
||||
|
||||
|
||||
<selection> public void tutu() {
|
||||
|
||||
}</selection>
|
||||
|
||||
|
||||
public void test() {}
|
||||
}
|
||||
+5
@@ -102,4 +102,9 @@ public class ReformatCodeActionInEditorTest extends LightPlatformCodeInsightFixt
|
||||
public void testFormatOptimizeRearrangeVcsChanges() {
|
||||
doTest(new ReformatCodeRunOptions(VCS_CHANGED_TEXT).setOptimizeImports(true).setRearrangeCode(true));
|
||||
}
|
||||
|
||||
public void testFormatSelection_DoNotTouchTrailingWhiteSpaces() {
|
||||
//todo actually test is not working, and working test is not working
|
||||
doTest(new ReformatCodeRunOptions(SELECTED_TEXT));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user