// Copyright 2015 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package io.v.vdl.psi;

import com.intellij.psi.stubs.PsiFileStubImpl;
import com.intellij.util.io.StringRef;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public class VdlFileStub extends PsiFileStubImpl<VdlFile> {
    private final StringRef myPackageName;

    public VdlFileStub(@NotNull VdlFile file) {
        this(file, StringRef.fromNullableString(file.getPackageName()));
    }

    public VdlFileStub(@Nullable VdlFile file, StringRef packageName) {
        super(file);
        myPackageName = packageName;
    }

    @Nullable
    public String getPackageName() {
        return myPackageName.getString();
    }
}

@@ -253,25 +253,112 @@
 lij.
-util.io.StringRef
+psi.tree.IStubFileElementType;%0Aimport com.intellij.util.io.StringRef;%0Aimport io.v.vdl.VdlFileElementType
 ;%0Aim
@@ -908,11 +908,120 @@
 );%0A    %7D
+%0A%0A    @Override%0A    public IStubFileElementType getType() %7B%0A        return VdlFileElementType.INSTANCE;%0A    %7D
 %0A%7D%0A

add missing serialization type to VdlFileStub