From 4aab096c3042eb79df2ecea648d6b22185e12c7b Mon Sep 17 00:00:00 2001 From: higan Date: Fri, 14 Apr 2023 15:53:21 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=80=20chore(gradle.properties):=20upda?= =?UTF-8?q?te=20pluginVersion=20to=201.7.11-EAP=20=F0=9F=90=9B=20fix(Proto?= =?UTF-8?q?bufFileType.kt):=20add=20workaround=20for=20issue=20#164=20The?= =?UTF-8?q?=20pluginVersion=20is=20updated=20to=201.7.11-EAP,=20which=20is?= =?UTF-8?q?=20the=20latest=20version=20of=20the=20plugin.=20A=20workaround?= =?UTF-8?q?=20is=20added=20to=20the=20ProtobufFileType.kt=20file=20to=20fi?= =?UTF-8?q?x=20issue=20#164.=20The=20workaround=20initializes=20the=20Prot?= =?UTF-8?q?obufStubTypes=20to=20avoid=20a=20null=20pointer=20exception.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 2 +- .../io/kanro/idea/plugin/protobuf/lang/ProtobufFileType.kt | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index b7bc70d3..d478907c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ pluginGroup=io.kanro.idea.plugin.protobuf pluginName=IntelliJ Protobuf Language Plugin # SemVer format -> https://semver.org -pluginVersion=1.7.10 +pluginVersion=1.7.11-EAP # See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html # for insight into build numbers and IntelliJ Platform versions. pluginSinceBuild=231 diff --git a/src/main/kotlin/io/kanro/idea/plugin/protobuf/lang/ProtobufFileType.kt b/src/main/kotlin/io/kanro/idea/plugin/protobuf/lang/ProtobufFileType.kt index 68ff95af..8eb1ad7a 100644 --- a/src/main/kotlin/io/kanro/idea/plugin/protobuf/lang/ProtobufFileType.kt +++ b/src/main/kotlin/io/kanro/idea/plugin/protobuf/lang/ProtobufFileType.kt @@ -2,11 +2,17 @@ package io.kanro.idea.plugin.protobuf.lang import com.intellij.openapi.fileTypes.LanguageFileType import io.kanro.idea.plugin.protobuf.ProtobufIcons +import io.kanro.idea.plugin.protobuf.lang.psi.stub.type.ProtobufStubTypes import javax.swing.Icon class ProtobufFileType : LanguageFileType(ProtobufLanguage) { companion object { val INSTANCE = ProtobufFileType() + + init { + // Workaround for issue #164 + ProtobufStubTypes + } } override fun getName(): String {