Java Examples for com.intellij.psi.stubs.StubOutputStream
The following java examples will help you to understand the usage of com.intellij.psi.stubs.StubOutputStream. These source code samples are taken from different open source projects.
Example 1
Project: old-gosu-repo-master File: GosuStubFileElementType.java View source code |
@Override
public void serialize(@NotNull final GosuFileStub stub, @NotNull final StubOutputStream dataStream) throws IOException {
IModule rootModule = stub.getPsi() != null ? GosuModuleUtil.getGlobalModule(stub.getProject()) : null;
if (rootModule != null) {
TypeSystem.pushModule(rootModule);
}
try {
dataStream.writeName(stub.getPackageName().toString());
dataStream.writeName(stub.getName().toString());
dataStream.writeName(stub.getExt().toString());
} finally {
if (rootModule != null) {
TypeSystem.popModule(rootModule);
}
}
}
Example 2
Project: intellij-community-master File: JavaClassElementType.java View source code |
@Override
public void serialize(@NotNull PsiClassStub stub, @NotNull StubOutputStream dataStream) throws IOException {
dataStream.writeByte(((PsiClassStubImpl) stub).getFlags());
if (!stub.isAnonymous()) {
dataStream.writeName(stub.getName());
dataStream.writeName(stub.getQualifiedName());
dataStream.writeName(stub.getSourceFileName());
} else {
dataStream.writeName(stub.getBaseClassReferenceText());
}
}
Example 3
Project: intellij-elixir-master File: Stub.java View source code |
public static <T extends Stubbic> void serializeStubbic(@NotNull T stub, @NotNull StubOutputStream dataStream) throws IOException {
dataStream.writeName(stub.resolvedModuleName());
dataStream.writeName(stub.resolvedFunctionName());
dataStream.writeInt(stub.resolvedFinalArity());
dataStream.writeBoolean(stub.hasDoBlockOrKeyword());
dataStream.writeName(stub.getName());
writeNameSet(dataStream, stub.canonicalNameSet());
}
Example 4
Project: kotlin-master File: IdeStubIndexService.java View source code |
@Override
public void serializeFileStub(@NotNull KotlinFileStub stub, @NotNull StubOutputStream dataStream) throws IOException {
KotlinFileStubForIde fileStub = (KotlinFileStubForIde) stub;
dataStream.writeName(fileStub.getPackageFqName().asString());
dataStream.writeBoolean(fileStub.isScript());
dataStream.writeName(StringRef.toString(fileStub.getFacadeSimpleName()));
dataStream.writeName(StringRef.toString(fileStub.getPartSimpleName()));
List<StringRef> facadePartNames = fileStub.getFacadePartSimpleNames();
if (facadePartNames == null) {
dataStream.writeInt(0);
} else {
dataStream.writeInt(facadePartNames.size());
for (StringRef partName : facadePartNames) {
dataStream.writeName(StringRef.toString(partName));
}
}
}
Example 5
Project: intellij-haskell-master File: HaskellConidStubElementType.java View source code |
@Override
public void serialize(@NotNull HaskellConidStub stub, @NotNull StubOutputStream dataStream) throws IOException {
dataStream.writeName(stub.getName());
}
Example 6
Project: webtoper-master File: NlsStubElementType.java View source code |
@Override
public void serialize(StubT stub, StubOutputStream dataStream) throws IOException {
}
Example 7
Project: intellij-erlang-master File: ErlangRecordDefinitionElementType.java View source code |
@Override
public void serialize(@NotNull ErlangRecordDefinitionStub stub, @NotNull StubOutputStream dataStream) throws IOException {
dataStream.writeName(stub.getName());
}
Example 8
Project: fan4idea-master File: FanTypeDefinitionElementType.java View source code |
public void serialize(final FanTypeDefinitionStub stub, final StubOutputStream dataStream) throws IOException {
dataStream.writeName(stub.getName());
dataStream.writeName(stub.getPodName());
}
Example 9
Project: la-clojure-master File: ClNsElementTypeBase.java View source code |
public void serialize(ClNsStub stub, StubOutputStream dataStream) throws IOException {
dataStream.writeName(stub.getName());
dataStream.writeInt(stub.getTextOffset());
}
Example 10
Project: consulo-csharp-master File: CSharpIndexMethodStubElementType.java View source code |
@Override
public void serialize(@NotNull CSharpIndexMethodDeclStub methodStub, @NotNull StubOutputStream stubOutputStream) throws IOException {
stubOutputStream.writeName(methodStub.getParentQName());
}
Example 11
Project: go-lang-idea-plugin-master File: GoTypeStubElementType.java View source code |
@Override
public void serialize(@NotNull GoTypeStub stub, @NotNull StubOutputStream dataStream) throws IOException {
dataStream.writeName(stub.getText());
}
Example 12
Project: intellij-plugins-master File: CfmlFileElementType.java View source code |
@Override
public void serialize(@NotNull CfmlFileStub stub, @NotNull StubOutputStream dataStream) throws IOException {
dataStream.writeName(stub.getName().toString());
}
Example 13
Project: consulo-unity3d-master File: ShaderDefStubElementType.java View source code |
@Override
public void serialize(@NotNull ShaderDefStub stub, @NotNull StubOutputStream dataStream) throws IOException {
dataStream.writeName(stub.getName());
}
Example 14
Project: IDLua-master File: LuaStubUtils.java View source code |
public static void serializeCollectionsArray(StubOutputStream dataStream, Set<String>[] collArray) throws IOException {
dataStream.writeByte(collArray.length);
for (Set<String> namedParameterSet : collArray) {
dataStream.writeByte(namedParameterSet.size());
for (String namepParameter : namedParameterSet) {
dataStream.writeUTF(namepParameter);
}
}
}
Example 15
Project: jstestdriver-idea-plugin-master File: DirectiveElementType.java View source code |
public void serialize(DirectiveStub stub, StubOutputStream dataStream) throws IOException {
dataStream.writeName(stub.getName());
dataStream.writeUTFFast(stub.getValue());
}
Example 16
Project: smali-master File: SmaliClassStatementElementType.java View source code |
@Override
public void serialize(@NotNull SmaliClassStatementStub stub, @NotNull StubOutputStream dataStream) throws IOException {
dataStream.writeName(stub.getQualifiedName());
}
Example 17
Project: Wolfram-Language-Parser-master File: JavaMethodElementType.java View source code |
@Override
public void serialize(@NotNull final PsiMethodStub stub, @NotNull final StubOutputStream dataStream) throws IOException {
dataStream.writeName(stub.getName());
TypeInfo.writeTYPE(dataStream, stub.getReturnTypeText(false));
dataStream.writeByte(((PsiMethodStubImpl) stub).getFlags());
if (stub.isAnnotationMethod()) {
dataStream.writeName(stub.getDefaultValueText());
}
}