mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-119085 Code style does not recognize Groovy spaceship operator <=>
This commit is contained in:
+4
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -223,8 +223,9 @@ public class GroovyLanguageCodeStyleSettingsProvider extends LanguageCodeStyleSe
|
||||
"SPACE_BEFORE_ANOTATION_PARAMETER_LIST",
|
||||
"SPACE_WITHIN_ANNOTATION_PARENTHESES"
|
||||
);
|
||||
consumer.showCustomOption(GroovyCodeStyleSettings.class, "SPACE_IN_NAMED_ARGUMENT", "In named argument after ':'",
|
||||
CodeStyleSettingsCustomizable.SPACES_OTHER);
|
||||
consumer.renameStandardOption("SPACE_AROUND_RELATIONAL_OPERATORS", "Relational operators (<, >, <=, >=, <=>)");
|
||||
|
||||
consumer.showCustomOption(GroovyCodeStyleSettings.class, "SPACE_IN_NAMED_ARGUMENT", "In named argument after ':'", CodeStyleSettingsCustomizable.SPACES_OTHER);
|
||||
consumer.showCustomOption(GroovyCodeStyleSettings.class, "SPACE_WITHIN_LIST_OR_MAP", "List and maps literals", CodeStyleSettingsCustomizable.SPACES_WITHIN);
|
||||
consumer.showCustomOption(GroovyCodeStyleSettings.class, "SPACE_BEFORE_CLOSURE_LBRACE", "Closure left brace in method calls", CodeStyleSettingsCustomizable.SPACES_BEFORE_LEFT_BRACE);
|
||||
consumer.showCustomOption(GroovyCodeStyleSettings.class, "SPACE_WITHIN_GSTRING_INJECTION_BRACES", "GString injection braces", CodeStyleSettingsCustomizable.SPACES_WITHIN);
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -37,7 +37,7 @@ public interface SpacingTokens extends GroovyElementTypes {
|
||||
|
||||
TokenSet LOGICAL_OPERATORS = TokenSet.create(mLAND, mLOR);
|
||||
TokenSet EQUALITY_OPERATORS = TokenSet.create(mEQUAL, mNOT_EQUAL);
|
||||
TokenSet RELATIONAL_OPERATORS = TokenSet.create(mGT, mGE, mLT, mLE);
|
||||
TokenSet RELATIONAL_OPERATORS = TokenSet.create(mGT, mGE, mLT, mLE, mCOMPARE_TO);
|
||||
TokenSet BITWISE_OPERATORS = TokenSet.create(mBAND, mBOR, mBXOR);
|
||||
TokenSet ADDITIVE_OPERATORS = TokenSet.create(mPLUS, mMINUS);
|
||||
TokenSet MULTIPLICATIVE_OPERATORS = TokenSet.create(mSTAR, mDIV, mMOD);
|
||||
|
||||
+2
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -36,6 +36,7 @@ public class FormatterTest extends GroovyFormatterTestCase {
|
||||
public void testArg2() throws Throwable { doTest(); }
|
||||
public void testBin1() throws Throwable { doTest(); }
|
||||
public void testBin2() throws Throwable { doTest(); }
|
||||
public void testBin3() throws Throwable { doTest(); }
|
||||
public void testBlockExpr1() throws Throwable {
|
||||
//groovySettings.KEEP_CONTROL_STATEMENT_IN_ONE_LINE = false
|
||||
groovySettings.KEEP_SIMPLE_BLOCKS_IN_ONE_LINE = false
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
a<=>b
|
||||
-----
|
||||
a <=> b
|
||||
Reference in New Issue
Block a user