@@ -14,7 +14,8 @@ import com.intellij.openapi.module._
14
14
import com .intellij .openapi .progress .ProgressManager
15
15
import com .intellij .openapi .progress .util .ProgressIndicatorBase
16
16
import com .intellij .openapi .project .{DumbService , Project }
17
- import com .intellij .openapi .roots .libraries .{Library , LibraryTable , LibraryTablesRegistrar }
17
+ import com .intellij .openapi .roots .impl .libraries .ProjectLibraryTable
18
+ import com .intellij .openapi .roots .libraries .{Library , LibraryTable }
18
19
import com .intellij .openapi .util .io .FileUtil
19
20
import com .intellij .openapi .vfs .{JarFileSystem , VirtualFile , VirtualFileManager }
20
21
import com .intellij .psi .search .{FilenameIndex , GlobalSearchScope }
@@ -154,11 +155,11 @@ class LibraryInjectorLoader(val project: Project) extends ProjectComponent {
154
155
155
156
override def initComponent (): Unit = {
156
157
myInjectorCacheDir.mkdirs()
157
- LibraryTablesRegistrar .getInstance().getLibraryTable(project) .addListener(myLibraryTableListener)
158
+ Option ( ProjectLibraryTable .getInstance(project)).foreach(_ .addListener(myLibraryTableListener) )
158
159
}
159
160
160
161
override def disposeComponent (): Unit = {
161
- LibraryTablesRegistrar .getInstance().getLibraryTable(project) .removeListener(myLibraryTableListener)
162
+ Option ( ProjectLibraryTable .getInstance(project)).foreach(_ .removeListener(myLibraryTableListener) )
162
163
}
163
164
164
165
override def getComponentName : String = " ScalaLibraryInjectorLoader"
0 commit comments