com.intellij.psi.stubs.StubOutputStream Java Examples

The following examples show how to use com.intellij.psi.stubs.StubOutputStream. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CSharpBaseVariableStubElementType.java    From consulo-csharp with Apache License 2.0 6 votes vote down vote up
@Override
@RequiredReadAction
public void serialize(@Nonnull CSharpVariableDeclStub<V> variableStub, @Nonnull StubOutputStream stubOutputStream) throws IOException
{
	stubOutputStream.writeVarInt(variableStub.getOtherModifierMask());

	if(supportsParentQName())
	{
		stubOutputStream.writeName(variableStub.getParentQName());
	}

	if(supportsInitializer(variableStub.getOtherModifierMask()))
	{
		stubOutputStream.writeName(variableStub.getInitializerText());
	}
}
 
Example #2
Source File: QualifiedName.java    From consulo with Apache License 2.0 5 votes vote down vote up
public static void serialize(@Nullable QualifiedName qName, StubOutputStream dataStream) throws IOException {
  if (qName == null) {
    dataStream.writeVarInt(0);
  }
  else {
    dataStream.writeVarInt(qName.getComponentCount());
    for (String s : qName.myComponents) {
      dataStream.writeName(s);
    }
  }
}
 
Example #3
Source File: PsiModuleStubElementType.java    From reasonml-idea-plugin with MIT License 5 votes vote down vote up
public void serialize(@NotNull final PsiModuleStub stub, @NotNull final StubOutputStream dataStream) throws IOException {
    dataStream.writeName(stub.getName());
    dataStream.writeUTFFast(stub.getPath());
    dataStream.writeBoolean(stub.isComponent());
    dataStream.writeBoolean(stub.isInterface());

    String alias = stub.getAlias();
    dataStream.writeBoolean(alias != null);
    if (alias != null) {
        dataStream.writeUTFFast(stub.getAlias());
    }
}
 
Example #4
Source File: CSharpTypeStubElementType.java    From consulo-csharp with Apache License 2.0 5 votes vote down vote up
@Override
public void serialize(@Nonnull CSharpTypeDeclStub stub, @Nonnull StubOutputStream stubOutputStream) throws IOException
{
	stubOutputStream.writeName(stub.getParentQName());
	stubOutputStream.writeName(stub.getVmQName());
	stubOutputStream.writeVarInt(stub.getOtherModifierMask());
}
 
Example #5
Source File: CSharpTypeListElementType.java    From consulo-csharp with Apache License 2.0 5 votes vote down vote up
@Override
public void serialize(@Nonnull CSharpTypeListStub cSharpTypeListStub, @Nonnull StubOutputStream stubOutputStream) throws IOException
{
	String[] references = cSharpTypeListStub.geShortReferences();
	stubOutputStream.writeByte(references.length);
	for(String reference : references)
	{
		stubOutputStream.writeName(reference);
	}
}
 
Example #6
Source File: AtParamStub.java    From bamboo-soy with Apache License 2.0 5 votes vote down vote up
@Override
public void serialize(@NotNull AtParamStub stub, @NotNull StubOutputStream dataStream)
    throws IOException {
  dataStream.writeName(stub.getName());
  dataStream.writeName(stub.type);
  dataStream.writeBoolean(stub.isOptional);
}
 
Example #7
Source File: CSharpMethodStubElementType.java    From consulo-csharp with Apache License 2.0 5 votes vote down vote up
@Override
public void serialize(@Nonnull CSharpMethodDeclStub stub, @Nonnull StubOutputStream stubOutputStream) throws IOException
{
	stubOutputStream.writeName(stub.getParentQName());
	stubOutputStream.writeVarInt(stub.getOtherModifierMask());
	stubOutputStream.writeVarInt(stub.getOperatorIndex());
}
 
Example #8
Source File: CSharpReferenceExpressionStubElementType.java    From consulo-csharp with Apache License 2.0 5 votes vote down vote up
@Override
public void serialize(@Nonnull CSharpReferenceExpressionStub stub, @Nonnull StubOutputStream dataStream) throws IOException
{
	dataStream.writeName(stub.getReferenceText());
	dataStream.writeVarInt(stub.getKindIndex());
	dataStream.writeVarInt(stub.getMemberAccessTypeIndex());
	dataStream.writeBoolean(stub.isGlobal());
}
 
Example #9
Source File: CSharpEmptyStubElementType.java    From consulo-csharp with Apache License 2.0 4 votes vote down vote up
@Override
public void serialize(@Nonnull EmptyStub cSharpEmptyStub, @Nonnull StubOutputStream stubOutputStream) throws IOException
{

}
 
Example #10
Source File: CSharpArrayTypeStubElementType.java    From consulo-csharp with Apache License 2.0 4 votes vote down vote up
@Override
public void serialize(@Nonnull CSharpWithIntValueStub stub, @Nonnull StubOutputStream stubOutputStream) throws IOException
{
	stubOutputStream.writeVarInt(stub.getValue());
}
 
Example #11
Source File: CSharpIdentifierStubElementType.java    From consulo-csharp with Apache License 2.0 4 votes vote down vote up
@Override
public void serialize(@Nonnull CSharpIdentifierStub stub, @Nonnull StubOutputStream dataStream) throws IOException
{
	dataStream.writeName(stub.getValue());
}
 
Example #12
Source File: CSharpConversionMethodStubElementType.java    From consulo-csharp with Apache License 2.0 4 votes vote down vote up
@Override
public void serialize(@Nonnull CSharpMethodDeclStub cSharpTypeStub, @Nonnull StubOutputStream stubOutputStream) throws IOException
{
	stubOutputStream.writeName(cSharpTypeStub.getParentQName());
}
 
Example #13
Source File: CSharpGenericConstraintStubElementType.java    From consulo-csharp with Apache License 2.0 4 votes vote down vote up
@Override
public void serialize(@Nonnull CSharpWithStringValueStub<CSharpGenericConstraint> stub,
		@Nonnull StubOutputStream stubOutputStream) throws IOException
{
	stubOutputStream.writeName(stub.getReferenceText());
}
 
Example #14
Source File: CSharpNamespaceStubElementType.java    From consulo-csharp with Apache License 2.0 4 votes vote down vote up
@Override
public void serialize(@Nonnull CSharpNamespaceDeclStub namespaceStub, @Nonnull StubOutputStream stubOutputStream) throws IOException
{
	stubOutputStream.writeName(namespaceStub.getReferenceTextRef());
}
 
Example #15
Source File: CSharpXAccessorStubElementType.java    From consulo-csharp with Apache License 2.0 4 votes vote down vote up
@Override
public void serialize(@Nonnull CSharpXXXAccessorStub stub, @Nonnull StubOutputStream stubOutputStream) throws IOException
{
	stubOutputStream.writeVarInt(stub.getOtherModifierMask());
}
 
Example #16
Source File: CSharpNativeTypeStubElementType.java    From consulo-csharp with Apache License 2.0 4 votes vote down vote up
@Override
public void serialize(@Nonnull CSharpWithIntValueStub<CSharpNativeType> stub, @Nonnull StubOutputStream stubOutputStream) throws IOException
{
	stubOutputStream.writeVarInt(stub.getValue());
}
 
Example #17
Source File: CSharpDummyDefElementType.java    From consulo-csharp with Apache License 2.0 4 votes vote down vote up
@Override
public void serialize(@Nonnull CSharpDummyDeclStub cSharpDummyDeclStub, @Nonnull StubOutputStream stubOutputStream) throws IOException
{

}
 
Example #18
Source File: CSharpModifierListStubElementType.java    From consulo-csharp with Apache License 2.0 4 votes vote down vote up
@Override
public void serialize(@Nonnull CSharpModifierListStub stub, @Nonnull StubOutputStream stubOutputStream) throws IOException
{
	stubOutputStream.writeVarInt(stub.getModifierMask());
}
 
Example #19
Source File: CSharpGenericParameterStubElementType.java    From consulo-csharp with Apache License 2.0 4 votes vote down vote up
@Override
public void serialize(@Nonnull CSharpGenericParameterStub cSharpGenericParameterStub, @Nonnull StubOutputStream stubOutputStream) throws IOException
{
}
 
Example #20
Source File: CSharpGenericConstraintKeywordValueStubElementType.java    From consulo-csharp with Apache License 2.0 4 votes vote down vote up
@Override
public void serialize(@Nonnull CSharpWithIntValueStub<CSharpGenericConstraintKeywordValue> stub,
		@Nonnull StubOutputStream stubOutputStream) throws IOException
{
	stubOutputStream.writeVarInt(stub.getValue());
}
 
Example #21
Source File: CSharpConstructorStubElementType.java    From consulo-csharp with Apache License 2.0 4 votes vote down vote up
@Override
public void serialize(@Nonnull CSharpMethodDeclStub cSharpTypeStub, @Nonnull StubOutputStream stubOutputStream) throws IOException
{
	stubOutputStream.writeName(cSharpTypeStub.getParentQName());
	stubOutputStream.writeVarInt(cSharpTypeStub.getOtherModifierMask());
}
 
Example #22
Source File: CSharpUsingNamespaceStatementStubElementType.java    From consulo-csharp with Apache License 2.0 4 votes vote down vote up
@Override
public void serialize(@Nonnull CSharpWithStringValueStub<CSharpUsingNamespaceStatement> stub,
		@Nonnull StubOutputStream stubOutputStream) throws IOException
{
	stubOutputStream.writeName(stub.getReferenceText());
}
 
Example #23
Source File: CSharpAttributeStubElementType.java    From consulo-csharp with Apache License 2.0 4 votes vote down vote up
@Override
public void serialize(@Nonnull CSharpWithStringValueStub stub, @Nonnull StubOutputStream stubOutputStream) throws IOException
{
	stubOutputStream.writeName(stub.getReferenceText());
}
 
Example #24
Source File: CSharpUserTypeStubElementType.java    From consulo-csharp with Apache License 2.0 4 votes vote down vote up
@Override
public void serialize(@Nonnull CSharpWithStringValueStub<CSharpUserType> stub,
		@Nonnull StubOutputStream stubOutputStream) throws IOException
{
	stubOutputStream.writeName(stub.getReferenceText());
}
 
Example #25
Source File: BashIncludeCommandElementType.java    From BashSupport with Apache License 2.0 4 votes vote down vote up
public void serialize(@NotNull BashIncludeCommandStub stub, @NotNull StubOutputStream dataStream) throws IOException {
    dataStream.writeName(stub.getIncludedFilename());
    dataStream.writeName(stub.getIncluderFilePath());
}
 
Example #26
Source File: RmlFileStubElementType.java    From reasonml-idea-plugin with MIT License 4 votes vote down vote up
@Override
public void serialize(@NotNull RmlFileStub stub, @NotNull StubOutputStream dataStream) throws IOException {
    dataStream.writeBoolean(stub.isComponent());
}
 
Example #27
Source File: PsiRecordFieldStubElementType.java    From reasonml-idea-plugin with MIT License 4 votes vote down vote up
public void serialize(@NotNull final PsiRecordFieldStub stub, @NotNull final StubOutputStream dataStream) throws IOException {
    dataStream.writeName(stub.getName());
    dataStream.writeUTFFast(stub.getPath());
}
 
Example #28
Source File: AtStateStub.java    From bamboo-soy with Apache License 2.0 4 votes vote down vote up
@Override
public void serialize(@NotNull AtStateStub stub, @NotNull StubOutputStream dataStream)
    throws IOException {
  dataStream.writeName(stub.getName());
  dataStream.writeName(stub.type);
}
 
Example #29
Source File: TemplateDefinitionStub.java    From bamboo-soy with Apache License 2.0 4 votes vote down vote up
@Override
public void serialize(
    @NotNull TemplateDefinitionStub stub, @NotNull StubOutputStream dataStream)
    throws IOException {
  dataStream.writeName(stub.getName());
}
 
Example #30
Source File: NamespaceDeclarationStub.java    From bamboo-soy with Apache License 2.0 4 votes vote down vote up
@Override
public void serialize(
    @NotNull NamespaceDeclarationStub stub, @NotNull StubOutputStream dataStream)
    throws IOException {
  dataStream.writeName(stub.getName());
}