Search in sources :

Example 1 with PerlMroType

use of com.perl5.lang.perl.psi.mro.PerlMroType in project Perl5-IDEA by Camelcade.

the class PerlNamespaceDefinitionElementType method deserialize.

@NotNull
@Override
public PerlNamespaceDefinitionStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
    String packageName = PerlStubSerializationUtil.readString(dataStream);
    PerlMroType mroType = PerlMroType.valueOf(PerlStubSerializationUtil.readString(dataStream));
    List<String> parentNamespaces = PerlStubSerializationUtil.readStringsList(dataStream);
    List<String> EXPORT = PerlStubSerializationUtil.readStringsList(dataStream);
    List<String> EXPORT_OK = PerlStubSerializationUtil.readStringsList(dataStream);
    Map<String, List<String>> EXPORT_TAGS = PerlStubSerializationUtil.readStringListMap(dataStream);
    assert packageName != null;
    assert parentNamespaces != null;
    assert EXPORT != null;
    assert EXPORT_OK != null;
    return createStubElement(parentStub, packageName, mroType, parentNamespaces, EXPORT, EXPORT_OK, EXPORT_TAGS, desearializeAnnotations(dataStream));
}
Also used : PerlMroType(com.perl5.lang.perl.psi.mro.PerlMroType) List(java.util.List) NotNull(org.jetbrains.annotations.NotNull)

Example 2 with PerlMroType

use of com.perl5.lang.perl.psi.mro.PerlMroType in project Perl5-IDEA by Camelcade.

the class PerlNamespaceDefinitionMixin method getMroType.

@Override
public PerlMroType getMroType() {
    PerlNamespaceDefinitionStub stub = getStub();
    if (stub != null) {
        return stub.getMroType();
    }
    if (mroTypeCache == null) {
        MroSearcher searcher = new MroSearcher();
        PerlPsiUtil.processNamespaceStatements(this, searcher);
        mroTypeCache = searcher.getResult();
    }
    return mroTypeCache;
}
Also used : PerlNamespaceDefinitionStub(com.perl5.lang.perl.psi.stubs.namespaces.PerlNamespaceDefinitionStub)

Aggregations

PerlMroType (com.perl5.lang.perl.psi.mro.PerlMroType)1 PerlNamespaceDefinitionStub (com.perl5.lang.perl.psi.stubs.namespaces.PerlNamespaceDefinitionStub)1 List (java.util.List)1 NotNull (org.jetbrains.annotations.NotNull)1