Skip to content

Commit

Permalink
Fix NPE, undo some coroutine changes
Browse files Browse the repository at this point in the history
  • Loading branch information
slideclimb committed Jul 17, 2022
1 parent 45e3faf commit 1a562a9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 17 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ plugins {
}

group = "nl.hannahsten"
version = "0.7.20-alpha.2"
version = "0.7.20-reference"

repositories {
mavenCentral()
Expand Down
12 changes: 1 addition & 11 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1 @@
rootProject.name = "TeXiFy-IDEA"

pluginManagement {
repositories {
maven {
setUrl("https://oss.sonatype.org/content/repositories/snapshots/")
}

gradlePluginPortal()
}
}
rootProject.name = "TeXiFy-IDEA"
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -47,7 +46,7 @@ abstract class AddLibraryAction<Lib : RemoteBibLibrary, T : AddLibDialogWrapper>
}

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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}

/**
Expand Down

0 comments on commit 1a562a9

Please sign in to comment.