From 6865002cc1326ddfb836e02b6b31df362c21235e Mon Sep 17 00:00:00 2001 From: Charlie Choiniere Date: Wed, 7 Apr 2021 20:15:47 -0400 Subject: [PATCH] Removed unused file. Fixed build script --- build.gradle.kts | 2 +- .../dwjson/DwJsonLineMarkerProvider.kt | 37 ------------------- 2 files changed, 1 insertion(+), 38 deletions(-) delete mode 100644 src/main/kotlin/com/binarysushi/studio/language/dwjson/DwJsonLineMarkerProvider.kt diff --git a/build.gradle.kts b/build.gradle.kts index 47c75ab..ae5b7ba 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -98,7 +98,7 @@ tasks { // Extract the section from README.md and provide for the plugin's manifest pluginDescription( closure { - File("./README.md").readText().lines().run { + File(projectDir, "README.md").readText().lines().run { val start = "" val end = "" diff --git a/src/main/kotlin/com/binarysushi/studio/language/dwjson/DwJsonLineMarkerProvider.kt b/src/main/kotlin/com/binarysushi/studio/language/dwjson/DwJsonLineMarkerProvider.kt deleted file mode 100644 index 3876a6e..0000000 --- a/src/main/kotlin/com/binarysushi/studio/language/dwjson/DwJsonLineMarkerProvider.kt +++ /dev/null @@ -1,37 +0,0 @@ -package com.binarysushi.studio.language.dwjson - -import com.binarysushi.studio.StudioIcons -import com.intellij.codeInsight.daemon.LineMarkerInfo -import com.intellij.codeInsight.daemon.LineMarkerProvider -import com.intellij.json.psi.impl.JsonPropertyImpl -import com.intellij.json.psi.impl.JsonStringLiteralImpl -import com.intellij.openapi.editor.markup.GutterIconRenderer -import com.intellij.openapi.util.TextRange -import com.intellij.psi.PsiElement -import com.intellij.psi.impl.source.tree.LeafPsiElement -import com.intellij.psi.util.findDescendantOfType -import com.intellij.refactoring.suggested.endOffset - -class DwJsonLineMarkerProvider : LineMarkerProvider { - override fun getLineMarkerInfo(element: PsiElement): LineMarkerInfo<*>? { - if (element.containingFile.fileType !== DwJsonFileType.INSTANCE) { - return null - } - - if (element is JsonPropertyImpl) { - val stringLiteral = element.findDescendantOfType() - if ((stringLiteral?.firstChild as LeafPsiElement).text == "\"hostname\"") { - return LineMarkerInfo( - element, - TextRange(element.startOffsetInParent, element.endOffset), - StudioIcons.STUDIO_CARTRIDGE_ICON, - null, - null, - GutterIconRenderer.Alignment.CENTER - ) - } - } - - return null - } -}