mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IJPL-243276 Migrate ModulePackageIndex service
GitOrigin-RevId: 01b14673e026e4697a153187390371b5f7d837b7
This commit is contained in:
committed by
intellij-monorepo-bot
parent
8786fc6e80
commit
64245cd331
@@ -41,8 +41,8 @@
|
||||
<indexingFlavor filetype="CLASS" implementationClass="com.intellij.index.ClassFileIndexingFlavor"/>
|
||||
<indexingFlavor filetype="kotlin_builtins" implementationClass="com.intellij.index.KtBuiltInFileIndexingFlavorProvider"/>
|
||||
|
||||
<moduleService serviceInterface="com.intellij.openapi.roots.ModulePackageIndex"
|
||||
serviceImplementation="com.intellij.openapi.roots.impl.ModulePackageIndexImpl"/>
|
||||
<projectService serviceInterface="com.intellij.openapi.roots.ModulePackageIndexFactory"
|
||||
serviceImplementation="com.intellij.openapi.roots.impl.ModulePackageIndexFactoryImpl"/>
|
||||
|
||||
<implicitToStringSearch implementation="com.intellij.psi.impl.search.ImplicitToStringSearcher"/>
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
// Copyright 2000-2026 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.openapi.roots.impl
|
||||
|
||||
import com.intellij.openapi.module.Module
|
||||
import com.intellij.openapi.roots.ModulePackageIndex
|
||||
import com.intellij.openapi.roots.ModulePackageIndexFactory
|
||||
|
||||
internal class ModulePackageIndexFactoryImpl: ModulePackageIndexFactory {
|
||||
override fun getService(module: Module): ModulePackageIndex {
|
||||
return ModulePackageIndexImpl(module)
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,6 @@ import com.intellij.openapi.module.Module;
|
||||
|
||||
public abstract class ModulePackageIndex extends PackageIndex {
|
||||
public static ModulePackageIndex getInstance(Module module) {
|
||||
return module.getService(ModulePackageIndex.class);
|
||||
return module.getProject().getService(ModulePackageIndexFactory.class).getService(module);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
// Copyright 2000-2026 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.openapi.roots
|
||||
|
||||
import com.intellij.openapi.module.Module
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
|
||||
@ApiStatus.Internal
|
||||
interface ModulePackageIndexFactory {
|
||||
fun getService(module: Module): ModulePackageIndex
|
||||
}
|
||||
Reference in New Issue
Block a user