no empty lines between doc comment and method after /**<enter> in groovy

This commit is contained in:
peter
2012-01-13 20:34:31 +01:00
parent f4a955ea53
commit a9b22f0d91
5 changed files with 32 additions and 3 deletions
+1
View File
@@ -184,6 +184,7 @@
<lang.commenter language="Groovy" implementationClass="org.jetbrains.plugins.groovy.highlighter.GroovyCommenter"/>
<lang.foldingBuilder language="Groovy" implementationClass="org.jetbrains.plugins.groovy.lang.folding.GroovyFoldingBuilder"/>
<lang.formatter language="Groovy" implementationClass="org.jetbrains.plugins.groovy.formatter.GroovyFormattingModelBuilder"/>
<lang.whiteSpaceFormattingStrategy language="Groovy" implementationClass="org.jetbrains.plugins.groovy.formatter.GroovyWhiteSpaceFormattingStrategy"/>
<enterHandlerDelegate implementation="org.jetbrains.plugins.groovy.lang.editor.actions.GroovyEnterHandler"
order="before EnterBetweenBracesHandler"/>
@@ -0,0 +1,31 @@
/*
* Copyright 2000-2012 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.plugins.groovy.formatter;
import com.intellij.lang.ASTNode;
import com.intellij.psi.formatter.WhiteSpaceFormattingStrategyAdapter;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.plugins.groovy.lang.lexer.GroovyTokenTypes;
/**
* @author peter
*/
public class GroovyWhiteSpaceFormattingStrategy extends WhiteSpaceFormattingStrategyAdapter {
@Override
public boolean containsWhitespacesOnly(@NotNull ASTNode node) {
return node.getElementType() == GroovyTokenTypes.mNLS;
}
}
@@ -7,5 +7,4 @@ def foo(int x, int y){2}
* @param y
* @return
*/
def foo(int x, int y){2}
@@ -6,5 +6,4 @@ void foo(int x, int y){}
* @param x
* @param y
*/
void foo(int x, int y){}
-1
View File
@@ -7,7 +7,6 @@ def foo() {
* <caret>
* @return
*/
def foo() {
2
}