Stubs for JetTypeConstraintList
This commit is contained in:
@@ -19,6 +19,7 @@ package org.jetbrains.jet;
|
||||
import com.intellij.psi.tree.IElementType;
|
||||
import com.intellij.psi.tree.IFileElementType;
|
||||
import org.jetbrains.jet.lang.psi.*;
|
||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementType;
|
||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||
import org.jetbrains.jet.plugin.JetLanguage;
|
||||
|
||||
@@ -77,7 +78,7 @@ public interface JetNodeTypes {
|
||||
JetNodeType INITIALIZER_LIST = new JetNodeType("INITIALIZER_LIST", JetInitializerList.class);
|
||||
JetNodeType THIS_CALL = new JetNodeType("THIS_CALL", JetDelegatorToThisCall.class);
|
||||
JetNodeType THIS_CONSTRUCTOR_REFERENCE = new JetNodeType("THIS_CONSTRUCTOR_REFERENCE", JetThisReferenceExpression.class);
|
||||
JetNodeType TYPE_CONSTRAINT_LIST = new JetNodeType("TYPE_CONSTRAINT_LIST", JetTypeConstraintList.class);
|
||||
IElementType TYPE_CONSTRAINT_LIST = JetStubElementTypes.TYPE_CONSTRAINT_LIST;
|
||||
JetNodeType TYPE_CONSTRAINT = new JetNodeType("TYPE_CONSTRAINT", JetTypeConstraint.class);
|
||||
|
||||
// TODO: Not sure if we need separate NT for each kind of constants
|
||||
|
||||
@@ -17,16 +17,23 @@
|
||||
package org.jetbrains.jet.lang.psi;
|
||||
|
||||
import com.intellij.lang.ASTNode;
|
||||
import com.intellij.psi.stubs.IStubElementType;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.JetNodeTypes;
|
||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetTypeConstraintListStub;
|
||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class JetTypeConstraintList extends JetElementImpl {
|
||||
public class JetTypeConstraintList extends JetElementImplStub<PsiJetTypeConstraintListStub> {
|
||||
public JetTypeConstraintList(@NotNull ASTNode node) {
|
||||
super(node);
|
||||
}
|
||||
|
||||
public JetTypeConstraintList(@NotNull PsiJetTypeConstraintListStub stub) {
|
||||
super(stub, JetStubElementTypes.TYPE_CONSTRAINT_LIST);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <R, D> R accept(@NotNull JetVisitor<R, D> visitor, D data) {
|
||||
return visitor.visitTypeConstraintList(this, data);
|
||||
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright 2010-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.
|
||||
*/
|
||||
|
||||
package org.jetbrains.jet.lang.psi.stubs;
|
||||
|
||||
import com.intellij.psi.stubs.StubElement;
|
||||
import org.jetbrains.jet.lang.psi.JetTypeConstraintList;
|
||||
|
||||
public interface PsiJetTypeConstraintListStub extends StubElement<JetTypeConstraintList> {
|
||||
}
|
||||
+2
@@ -37,4 +37,6 @@ public interface JetStubElementTypes {
|
||||
|
||||
JetModifierListElementType MODIFIER_LIST = new JetModifierListElementType("MODIFIER_LIST");
|
||||
JetModifierListElementType PRIMARY_CONSTRUCTOR_MODIFIER_LIST = new JetModifierListElementType("PRIMARY_CONSTRUCTOR_MODIFIER_LIST");
|
||||
|
||||
JetTypeConstraintListElementType TYPE_CONSTRAINT_LIST = new JetTypeConstraintListElementType("TYPE_CONSTRAINT_LIST");
|
||||
}
|
||||
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* Copyright 2010-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.
|
||||
*/
|
||||
|
||||
package org.jetbrains.jet.lang.psi.stubs.elements;
|
||||
|
||||
import com.intellij.lang.ASTNode;
|
||||
import com.intellij.psi.stubs.IndexSink;
|
||||
import com.intellij.psi.stubs.StubElement;
|
||||
import com.intellij.psi.stubs.StubInputStream;
|
||||
import com.intellij.psi.stubs.StubOutputStream;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.lang.psi.JetTypeConstraintList;
|
||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetTypeConstraintListStub;
|
||||
import org.jetbrains.jet.lang.psi.stubs.impl.PsiJetTypeConstraintListStubImpl;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class JetTypeConstraintListElementType extends JetStubElementType<PsiJetTypeConstraintListStub, JetTypeConstraintList> {
|
||||
public JetTypeConstraintListElementType(@NotNull @NonNls String debugName) {
|
||||
super(debugName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JetTypeConstraintList createPsiFromAst(@NotNull ASTNode node) {
|
||||
return new JetTypeConstraintList(node);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JetTypeConstraintList createPsi(@NotNull PsiJetTypeConstraintListStub stub) {
|
||||
return new JetTypeConstraintList(stub);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PsiJetTypeConstraintListStub createStub(
|
||||
@NotNull JetTypeConstraintList psi, StubElement parentStub
|
||||
) {
|
||||
return new PsiJetTypeConstraintListStubImpl(parentStub);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(
|
||||
@NotNull PsiJetTypeConstraintListStub stub, @NotNull StubOutputStream dataStream
|
||||
) throws IOException {
|
||||
//TODO:
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public PsiJetTypeConstraintListStub deserialize(
|
||||
@NotNull StubInputStream dataStream, StubElement parentStub
|
||||
) throws IOException {
|
||||
throw new UnsupportedOperationException("org.jetbrains.jet.lang.psi.stubs.elements.JetTypeConstraintListElementType#deserialize");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void indexStub(
|
||||
@NotNull PsiJetTypeConstraintListStub stub, @NotNull IndexSink sink
|
||||
) {
|
||||
//do nothing
|
||||
}
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright 2010-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.
|
||||
*/
|
||||
|
||||
package org.jetbrains.jet.lang.psi.stubs.impl;
|
||||
|
||||
import com.intellij.psi.stubs.StubBase;
|
||||
import com.intellij.psi.stubs.StubElement;
|
||||
import org.jetbrains.jet.lang.psi.JetTypeConstraintList;
|
||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetTypeConstraintListStub;
|
||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||
|
||||
public class PsiJetTypeConstraintListStubImpl extends StubBase<JetTypeConstraintList> implements PsiJetTypeConstraintListStub {
|
||||
public PsiJetTypeConstraintListStubImpl(StubElement parent) {
|
||||
super(parent, JetStubElementTypes.TYPE_CONSTRAINT_LIST);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user