From 1a562a9696a5da0685ba99c5138f48f312c841ec Mon Sep 17 00:00:00 2001 From: Abby Berkers Date: Sun, 17 Jul 2022 17:58:15 +0200 Subject: [PATCH] Fix NPE, undo some coroutine changes --- build.gradle.kts | 2 +- settings.gradle.kts | 12 +----------- .../texifyidea/action/library/AddLibraryAction.kt | 3 +-- .../evince/EvinceInverseSearchListener.kt | 6 +++--- 4 files changed, 6 insertions(+), 17 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 478a91519..a30bad03e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -25,7 +25,7 @@ plugins { } group = "nl.hannahsten" -version = "0.7.20-alpha.2" +version = "0.7.20-reference" repositories { mavenCentral() diff --git a/settings.gradle.kts b/settings.gradle.kts index f7f3f76f7..a9baa5ce4 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,11 +1 @@ -rootProject.name = "TeXiFy-IDEA" - -pluginManagement { - repositories { - maven { - setUrl("https://oss.sonatype.org/content/repositories/snapshots/") - } - - gradlePluginPortal() - } -} +rootProject.name = "TeXiFy-IDEA" \ No newline at end of file diff --git a/src/nl/hannahsten/texifyidea/action/library/AddLibraryAction.kt b/src/nl/hannahsten/texifyidea/action/library/AddLibraryAction.kt index afd95016d..ca7ed1853 100644 --- a/src/nl/hannahsten/texifyidea/action/library/AddLibraryAction.kt +++ b/src/nl/hannahsten/texifyidea/action/library/AddLibraryAction.kt @@ -6,7 +6,6 @@ import com.intellij.openapi.progress.ProgressIndicator import com.intellij.openapi.progress.ProgressManager import com.intellij.openapi.progress.Task.Backgroundable import com.intellij.openapi.project.Project -import com.intellij.ui.treeStructure.Tree import kotlinx.coroutines.runBlocking import nl.hannahsten.texifyidea.psi.BibtexEntry import nl.hannahsten.texifyidea.remotelibraries.RemoteBibLibrary @@ -47,7 +46,7 @@ abstract class AddLibraryAction } override fun onSuccess() { - val tree = e.getData(TexifyDataKeys.LIBRARY_TREE) as Tree + val tree = e.getData(TexifyDataKeys.LIBRARY_TREE) ?: return val model = tree.model as DefaultTreeModel val root = model.root as DefaultMutableTreeNode val libraryNode = LibraryMutableTreeNode(library.identifier, library.displayName) diff --git a/src/nl/hannahsten/texifyidea/run/linuxpdfviewer/evince/EvinceInverseSearchListener.kt b/src/nl/hannahsten/texifyidea/run/linuxpdfviewer/evince/EvinceInverseSearchListener.kt index 16c6e0192..382ade7b6 100644 --- a/src/nl/hannahsten/texifyidea/run/linuxpdfviewer/evince/EvinceInverseSearchListener.kt +++ b/src/nl/hannahsten/texifyidea/run/linuxpdfviewer/evince/EvinceInverseSearchListener.kt @@ -35,9 +35,9 @@ object EvinceInverseSearchListener { // Run in a coroutine so the main thread can continue // If the program finishes, the listener will stop as well -// currentCoroutineScope.launch { -// startListening() -// } + currentCoroutineScope.launch { + startListening() + } } /**