Skip to content

Commit

Permalink
Update to 2019.2
Browse files Browse the repository at this point in the history
* Switched to <fileType declaration
* Fixed new build failure caused by dependency changes involving test framework
  • Loading branch information
sblundy committed Jul 28, 2019
1 parent 7469084 commit 7762ed3
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 18 deletions.
10 changes: 7 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
id("org.jetbrains.intellij") version "0.4.8"
id("org.jetbrains.intellij") version "0.4.9"
java
kotlin("jvm") version "1.3.21"
id("org.jetbrains.grammarkit") version "2019.1"
id("org.jetbrains.grammarkit") version "2019.2"
}

group = "com.github.sblundy"
Expand All @@ -23,7 +23,7 @@ dependencies {

// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
version = "2019.1.2"
version = "2019.2"
}
configure<JavaPluginConvention> {
sourceCompatibility = JavaVersion.VERSION_1_8
Expand Down Expand Up @@ -65,6 +65,10 @@ tasks.withType<KotlinCompile> {
)
}

tasks.getByName("buildSearchableOptions") {
enabled = false
}

tasks.withType<Test> {
useJUnitPlatform()
testLogging {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import javax.swing.Icon

class ElvishFileType private constructor(): LanguageFileType(ElvishLanguage.INSTANCE) {
companion object {
val INSTANCE = ElvishFileType()
@JvmField val INSTANCE = ElvishFileType()
}
override fun getIcon(): Icon? = icons.ElvishIcons.FILE_ICON

Expand Down
10 changes: 0 additions & 10 deletions src/main/kotlin/com/github/sblundy/elvish/ElvishFileTypeFactory.kt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import com.intellij.lang.Language

class ElvishLanguage private constructor(): Language("Elvish") {
companion object {
val INSTANCE = ElvishLanguage()
@JvmField val INSTANCE = ElvishLanguage()
}
}
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<depends>com.intellij.modules.lang</depends>

<extensions defaultExtensionNs="com.intellij">
<fileTypeFactory implementation="com.github.sblundy.elvish.ElvishFileTypeFactory"/>
<fileType name="Elvish" language="Elvish" implementationClass="com.github.sblundy.elvish.ElvishFileType" fieldName="INSTANCE" extensions="elv"/>
<lang.parserDefinition language="Elvish" implementationClass="com.github.sblundy.elvish.lang.ElvishParserDefinition"/>
<lang.syntaxHighlighterFactory language="Elvish" implementationClass="com.github.sblundy.elvish.ElvishSyntaxHighlighterFactory"/>
<annotator language="Elvish" implementationClass="com.github.sblundy.elvish.ElvishAnnotator"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import com.intellij.psi.impl.PsiFileFactoryImpl
import com.intellij.testFramework.*
import com.intellij.testFramework.fixtures.IdeaProjectTestFixture
import com.intellij.testFramework.fixtures.IdeaTestFixtureFactory
import com.intellij.testFramework.fixtures.JavaTestFixtureFactory
import com.intellij.testFramework.fixtures.impl.LightTempDirTestFixtureImpl
import org.jetbrains.annotations.NonNls
import org.junit.Assert
Expand Down Expand Up @@ -42,7 +41,7 @@ class ElvishParserTest {
val factory = IdeaTestFixtureFactory.getFixtureFactory()
val fixtureBuilder = factory.createLightFixtureBuilder()
val fixture = fixtureBuilder.fixture
myFixture = JavaTestFixtureFactory.getFixtureFactory()
myFixture = IdeaTestFixtureFactory.getFixtureFactory()
.createCodeInsightFixture(fixture, LightTempDirTestFixtureImpl(true))

myFixture.setUp()
Expand Down

0 comments on commit 7762ed3

Please sign in to comment.