mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 17:20:55 +07:00
IJPL-159596 refactor ResourceRegistrar
GitOrigin-RevId: 5a11d285d69adffe92c0ff82d5d56ecdda782f23
This commit is contained in:
committed by
intellij-monorepo-bot
parent
0a2d42c6f5
commit
e0f3cb0c6c
@@ -13,5 +13,6 @@
|
|||||||
<orderEntry type="module" module-name="intellij.platform.projectModel" />
|
<orderEntry type="module" module-name="intellij.platform.projectModel" />
|
||||||
<orderEntry type="module" module-name="intellij.platform.analysis" />
|
<orderEntry type="module" module-name="intellij.platform.analysis" />
|
||||||
<orderEntry type="module" module-name="intellij.platform.editor" />
|
<orderEntry type="module" module-name="intellij.platform.editor" />
|
||||||
|
<orderEntry type="library" name="kotlin-stdlib" level="project" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
||||||
@@ -1,18 +1,19 @@
|
|||||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||||
package com.intellij.javaee;
|
package com.intellij.javaee
|
||||||
|
|
||||||
import org.jetbrains.annotations.NonNls;
|
import org.jetbrains.annotations.NonNls
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see StandardResourceProvider
|
* @see StandardResourceProvider
|
||||||
*/
|
*/
|
||||||
public interface ResourceRegistrar {
|
interface ResourceRegistrar {
|
||||||
void addStdResource(@NotNull @NonNls String resource, @NonNls String fileName);
|
fun addStdResource(resource: @NonNls String, fileName: @NonNls String)
|
||||||
|
|
||||||
void addStdResource(@NotNull @NonNls String resource, @NonNls String fileName, Class<?> klass);
|
fun addStdResource(resource: @NonNls String, fileName: @NonNls String, classLoader: ClassLoader)
|
||||||
|
|
||||||
void addStdResource(@NotNull @NonNls String resource, @NonNls String version, @NonNls String fileName, Class<?> klass);
|
fun addStdResource(resource: @NonNls String, fileName: @NonNls String, klass: Class<*>?)
|
||||||
|
|
||||||
void addIgnoredResource(@NotNull @NonNls String url);
|
fun addStdResource(resource: @NonNls String, version: @NonNls String?, fileName: @NonNls String, aClass: Class<*>?)
|
||||||
|
|
||||||
|
fun addIgnoredResource(url: @NonNls String)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,6 +34,10 @@ class ResourceRegistrarImpl : ResourceRegistrar {
|
|||||||
addStdResource(resource = resource, version = version, fileName = fileName, aClass = aClass, classLoader = null)
|
addStdResource(resource = resource, version = version, fileName = fileName, aClass = aClass, classLoader = null)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun addStdResource(resource: @NonNls String, fileName: @NonNls String, classLoader: ClassLoader) {
|
||||||
|
addStdResource(resource = resource, version = null, fileName = fileName, aClass = null, classLoader = classLoader)
|
||||||
|
}
|
||||||
|
|
||||||
override fun addIgnoredResource(url: @NonNls String) {
|
override fun addIgnoredResource(url: @NonNls String) {
|
||||||
ignored.add(url)
|
ignored.add(url)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user