Skip to content

Commit f92a958

Browse files
committed
refactor(main): 抑制不稳定API警告
1 parent e4cf3e2 commit f92a958

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

src/main/kotlin/io/maliboot/www/hyperf/common/extend/VirtualFileExt.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ import com.jetbrains.php.lang.psi.elements.PhpClass
1313
val hyperfProxyFileSuffix: String
1414
get() = "proxy.php"
1515

16-
fun VirtualFile.getLineStartOffset(line: Int): Int {
17-
return FileDocumentManager.getInstance().getDocument(this)?.getLineStartOffset(line) ?: 0
18-
}
19-
2016
fun VirtualFile.getLineNumber(offset: Int): Int {
2117
return FileDocumentManager.getInstance().getDocument(this)?.getLineNumber(offset) ?: 0
2218
}

src/main/kotlin/io/maliboot/www/hyperf/debug/HyperfProxyPathMapper.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import com.jetbrains.php.lang.parser.PhpElementTypes
1313
import com.jetbrains.php.util.pathmapper.PhpPathMapper
1414
import io.maliboot.www.hyperf.common.extend.*
1515

16+
@SuppressWarnings("UnstableApiUsage")
1617
class HyperfProxyPathMapper : PhpTemplateLanguagePathMapper() {
1718

1819
override fun isTemplateFileType(p0: FileType): Boolean {

src/main/resources/META-INF/plugin.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
<depends>com.jetbrains.php</depends>
2121

2222
<extensions defaultExtensionNs="com.intellij">
23-
<php.debug.templateLanguage implementation="io.maliboot.www.hyperf.debug.HyperfProxyPathMapper" order="first" />
2423
<errorHandler implementation="io.maliboot.www.hyperf.GithubErrorReporter"/>
2524
</extensions>
25+
<extensions defaultExtensionNs="com.intellij.php">
26+
<debug.templateLanguage implementation="io.maliboot.www.hyperf.debug.HyperfProxyPathMapper"/>
27+
</extensions>
2628
</idea-plugin>

0 commit comments

Comments
 (0)