mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[groovy] extract 'debugName' constructor parameter in element types
This way they can be used from GrammarKit-generated parser.
This commit is contained in:
+7
-7
@@ -42,8 +42,8 @@ public interface GroovyElementTypes {
|
||||
GrStubElementType<GrTypeDefinitionStub, GrTraitTypeDefinition> TRAIT_DEFINITION = new GrTraitElementType("Trait definition");
|
||||
GrStubElementType<GrTypeDefinitionStub, GrEnumConstantInitializer> ENUM_CONSTANT_INITIALIZER = new GrEnumConstantInitializerElementType("Enum constant initializer");
|
||||
|
||||
GrStubElementType<GrFieldStub, GrEnumConstant> ENUM_CONSTANT = new GrEnumConstantElementType();
|
||||
GrStubElementType<GrFieldStub, GrField> FIELD = new GrFieldElementType();
|
||||
GrStubElementType<GrFieldStub, GrEnumConstant> ENUM_CONSTANT = new GrEnumConstantElementType("Enumeration constant");
|
||||
GrStubElementType<GrFieldStub, GrField> FIELD = new GrFieldElementType("field");
|
||||
GrMethodElementType METHOD_DEFINITION = new GrMethodElementType("method definition");
|
||||
GrStubElementType<GrMethodStub, GrMethod> ANNOTATION_METHOD = new GrAnnotationMethodElementType("annotation method");
|
||||
|
||||
@@ -150,7 +150,7 @@ public interface GroovyElementTypes {
|
||||
|
||||
GrStubElementType<GrTypeParameterStub, GrTypeParameter> TYPE_PARAMETER = new GrTypeParameterElementType("type parameter");
|
||||
|
||||
IStubElementType<GrReferenceListStub, GrReferenceList> TYPE_PARAMETER_EXTENDS_BOUND_LIST = new GrTypeParameterBoundsElementType();
|
||||
IStubElementType<GrReferenceListStub, GrReferenceList> TYPE_PARAMETER_EXTENDS_BOUND_LIST = new GrTypeParameterBoundsElementType("type extends list");
|
||||
|
||||
GroovyElementType DEFAULT_ANNOTATION_VALUE = new GroovyElementType("default annotation value");
|
||||
|
||||
@@ -161,8 +161,8 @@ public interface GroovyElementTypes {
|
||||
GrReferenceListElementType<GrThrowsClause> THROW_CLAUSE = new GrThrowsClauseElementType("throw clause");
|
||||
//annotation
|
||||
GroovyElementType ANNOTATION_ARRAY_INITIALIZER = new GroovyElementType("annotation array initializer");
|
||||
GrAnnotationArgumentListElementType ANNOTATION_ARGUMENTS = new GrAnnotationArgumentListElementType();
|
||||
GrNameValuePairElementType ANNOTATION_MEMBER_VALUE_PAIR = new GrNameValuePairElementType();
|
||||
GrAnnotationArgumentListElementType ANNOTATION_ARGUMENTS = new GrAnnotationArgumentListElementType("annotation arguments");
|
||||
GrNameValuePairElementType ANNOTATION_MEMBER_VALUE_PAIR = new GrNameValuePairElementType("Annotation name value pair");
|
||||
|
||||
GrStubElementType<GrAnnotationStub, GrAnnotation> ANNOTATION = new GrAnnotationElementType("annotation");
|
||||
//parameters
|
||||
@@ -194,11 +194,11 @@ public interface GroovyElementTypes {
|
||||
GroovyElementType CLASS_INITIALIZER = new GroovyElementType("static compound statement");
|
||||
|
||||
EmptyStubElementType<GrVariableDeclaration> VARIABLE_DEFINITION_ERROR = new GrErrorVariableDeclarationElementType("variable definitions with errors");
|
||||
GrVariableDeclarationElementType VARIABLE_DEFINITION = new GrVariableDeclarationElementType();
|
||||
GrVariableDeclarationElementType VARIABLE_DEFINITION = new GrVariableDeclarationElementType("variable definitions");
|
||||
GroovyElementType TUPLE_DECLARATION = new GroovyElementType("tuple declaration");
|
||||
GroovyElementType TUPLE = new GroovyElementType("tuple");
|
||||
|
||||
GrVariableElementType VARIABLE = new GrVariableElementType();
|
||||
GrVariableElementType VARIABLE = new GrVariableElementType("assigned variable");
|
||||
|
||||
//modifiers
|
||||
GrStubElementType<GrModifierListStub, GrModifierList> MODIFIERS = new GrModifierListElementType("modifier list");
|
||||
|
||||
+3
-17
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* Copyright 2000-2016 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.
|
||||
*/
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package org.jetbrains.plugins.groovy.lang.psi.stubs.elements;
|
||||
|
||||
import com.intellij.psi.stubs.EmptyStub;
|
||||
@@ -24,8 +10,8 @@ import org.jetbrains.plugins.groovy.lang.psi.impl.auxiliary.annotation.GrAnnotat
|
||||
|
||||
public class GrAnnotationArgumentListElementType extends EmptyStubElementType<GrAnnotationArgumentList> {
|
||||
|
||||
public GrAnnotationArgumentListElementType() {
|
||||
super("annotation arguments", GroovyLanguage.INSTANCE);
|
||||
public GrAnnotationArgumentListElementType(String debugName) {
|
||||
super(debugName, GroovyLanguage.INSTANCE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+3
-17
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* 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.
|
||||
* 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.
|
||||
*/
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package org.jetbrains.plugins.groovy.lang.psi.stubs.elements;
|
||||
|
||||
import com.intellij.psi.stubs.IndexSink;
|
||||
@@ -35,8 +21,8 @@ import java.io.IOException;
|
||||
*/
|
||||
public class GrEnumConstantElementType extends GrStubElementType<GrFieldStub, GrEnumConstant> {
|
||||
|
||||
public GrEnumConstantElementType() {
|
||||
super("Enumeration constant");
|
||||
public GrEnumConstantElementType(String debugName) {
|
||||
super(debugName);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+3
-17
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* 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.
|
||||
* 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.
|
||||
*/
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package org.jetbrains.plugins.groovy.lang.psi.stubs.elements;
|
||||
|
||||
import com.intellij.psi.impl.java.stubs.index.JavaStubIndexKeys;
|
||||
@@ -40,8 +26,8 @@ import java.util.Set;
|
||||
*/
|
||||
public class GrFieldElementType extends GrStubElementType<GrFieldStub, GrField> {
|
||||
|
||||
public GrFieldElementType() {
|
||||
super("field");
|
||||
public GrFieldElementType(String debugName) {
|
||||
super(debugName);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+3
-18
@@ -1,24 +1,9 @@
|
||||
/*
|
||||
* Copyright 2000-2016 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.
|
||||
*/
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package org.jetbrains.plugins.groovy.lang.psi.stubs.elements;
|
||||
|
||||
import com.intellij.psi.stubs.StubElement;
|
||||
import com.intellij.psi.stubs.StubInputStream;
|
||||
import com.intellij.psi.stubs.StubOutputStream;
|
||||
import com.intellij.util.io.StringRef;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.api.auxiliary.modifiers.annotation.GrAnnotationMemberValue;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.api.auxiliary.modifiers.annotation.GrAnnotationNameValuePair;
|
||||
@@ -30,8 +15,8 @@ import java.io.IOException;
|
||||
@SuppressWarnings("Duplicates")
|
||||
public class GrNameValuePairElementType extends GrStubElementType<GrNameValuePairStub, GrAnnotationNameValuePair> {
|
||||
|
||||
public GrNameValuePairElementType() {
|
||||
super("Annotation name value pair");
|
||||
public GrNameValuePairElementType(String debugName) {
|
||||
super(debugName);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+2
-2
@@ -8,8 +8,8 @@ import org.jetbrains.plugins.groovy.lang.psi.stubs.GrReferenceListStub;
|
||||
|
||||
public final class GrTypeParameterBoundsElementType extends GrReferenceListElementType<GrReferenceList> {
|
||||
|
||||
public GrTypeParameterBoundsElementType() {
|
||||
super("type extends list");
|
||||
public GrTypeParameterBoundsElementType(String debugName) {
|
||||
super(debugName);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+3
-17
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* Copyright 2000-2016 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.
|
||||
*/
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package org.jetbrains.plugins.groovy.lang.psi.stubs.elements;
|
||||
|
||||
import com.intellij.lang.ASTNode;
|
||||
@@ -36,8 +22,8 @@ import java.io.IOException;
|
||||
|
||||
public class GrVariableDeclarationElementType extends GrStubElementType<GrVariableDeclarationStub, GrVariableDeclaration> {
|
||||
|
||||
public GrVariableDeclarationElementType() {
|
||||
super("variable definitions");
|
||||
public GrVariableDeclarationElementType(String debugName) {
|
||||
super(debugName);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+3
-17
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* Copyright 2000-2016 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.
|
||||
*/
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package org.jetbrains.plugins.groovy.lang.psi.stubs.elements;
|
||||
|
||||
import com.intellij.lang.ASTNode;
|
||||
@@ -31,8 +17,8 @@ import java.io.IOException;
|
||||
|
||||
public final class GrVariableElementType extends GrStubElementType<GrVariableStub, GrVariable> {
|
||||
|
||||
public GrVariableElementType() {
|
||||
super("assigned variable");
|
||||
public GrVariableElementType(String debugName) {
|
||||
super(debugName);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user