mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[markdown] IJPL-177111 adjust module structure
GitOrigin-RevId: 837b80ed529c4a7166937efbba899b9aeb63da02
This commit is contained in:
committed by
intellij-monorepo-bot
parent
bd2464440e
commit
cf8fa56ff5
@@ -1,12 +1,12 @@
|
||||
<idea-plugin package="org.intellij.plugins.markdown.backend">
|
||||
<idea-plugin>
|
||||
<dependencies>
|
||||
<module name="intellij.platform.backend"/>
|
||||
<module name="intellij.platform.kernel.backend"/>
|
||||
</dependencies>
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
<platform.rpc.backend.remoteApiProvider
|
||||
implementation="org.intellij.plugins.markdown.backend.providers.MarkdownLinkOpenerApiProvider"/>
|
||||
implementation="com.intellij.markdown.backend.providers.MarkdownLinkOpenerApiProvider"/>
|
||||
<platform.rpc.backend.remoteApiProvider
|
||||
implementation="org.intellij.plugins.markdown.backend.providers.VirtualFileAccessorProvider"/>
|
||||
implementation="com.intellij.markdown.backend.providers.VirtualFileAccessorProvider"/>
|
||||
</extensions>
|
||||
</idea-plugin>
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
package org.intellij.plugins.markdown.backend.providers
|
||||
package com.intellij.markdown.backend.providers
|
||||
|
||||
import com.intellij.platform.rpc.backend.RemoteApiProvider
|
||||
import fleet.rpc.remoteApiDescriptor
|
||||
import org.intellij.plugins.markdown.backend.services.MarkdownLinkOpenerRemoteApiImpl
|
||||
import com.intellij.markdown.backend.services.MarkdownLinkOpenerRemoteApiImpl
|
||||
import org.intellij.plugins.markdown.service.MarkdownLinkOpenerRemoteApi
|
||||
|
||||
private class MarkdownLinkOpenerApiProvider : RemoteApiProvider {
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
package org.intellij.plugins.markdown.backend.providers
|
||||
package com.intellij.markdown.backend.providers
|
||||
|
||||
import com.intellij.platform.rpc.backend.RemoteApiProvider
|
||||
import fleet.rpc.remoteApiDescriptor
|
||||
import org.intellij.plugins.markdown.backend.services.VirtualFileAccessorImpl
|
||||
import com.intellij.markdown.backend.services.VirtualFileAccessorImpl
|
||||
import org.intellij.plugins.markdown.service.VirtualFileAccessor
|
||||
|
||||
private class VirtualFileAccessorProvider : RemoteApiProvider {
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors.
|
||||
// Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.intellij.plugins.markdown.backend.services
|
||||
package com.intellij.markdown.backend.services
|
||||
|
||||
import com.intellij.ide.BrowserUtil
|
||||
import com.intellij.ide.vfs.VirtualFileId
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.intellij.plugins.markdown.backend.services
|
||||
package com.intellij.markdown.backend.services
|
||||
|
||||
import com.intellij.ide.vfs.VirtualFileId
|
||||
import com.intellij.ide.vfs.rpcId
|
||||
@@ -1,10 +1,10 @@
|
||||
<idea-plugin package="org.intellij.plugins.markdown.frontend">
|
||||
<idea-plugin>
|
||||
<dependencies>
|
||||
<module name="intellij.platform.frontend"/>
|
||||
</dependencies>
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
<applicationService serviceInterface="org.intellij.plugins.markdown.ui.preview.accessor.MarkdownLinkOpener"
|
||||
serviceImplementation="org.intellij.plugins.markdown.frontend.preview.accessor.impl.MarkdownLinkOpenerImpl"/>
|
||||
serviceImplementation="com.intellij.markdown.frontend.preview.accessor.impl.MarkdownLinkOpenerImpl"/>
|
||||
<registryKey key="markdown.open.link.fallback"
|
||||
defaultValue="false"
|
||||
description="Should fallback to Markdown link opening implementation before the split."/>
|
||||
|
||||
+8
-9
@@ -1,4 +1,4 @@
|
||||
package org.intellij.plugins.markdown.frontend.preview.accessor.impl
|
||||
package com.intellij.markdown.frontend.preview.accessor.impl
|
||||
|
||||
import com.intellij.ide.BrowserUtil
|
||||
import com.intellij.ide.actions.OpenFileAction
|
||||
@@ -24,7 +24,6 @@ import com.intellij.openapi.wm.WindowManager
|
||||
import com.intellij.platform.project.findProject
|
||||
import com.intellij.ui.awt.RelativePoint
|
||||
import com.intellij.util.concurrency.annotations.RequiresEdt
|
||||
import com.intellij.util.io.isLocalHost
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
@@ -55,7 +54,7 @@ internal class MarkdownLinkOpenerImpl(val coroutineScope: CoroutineScope) : Mark
|
||||
|
||||
override fun openLink(currentProject: Project?, link: String, containingFile: VirtualFile?) {
|
||||
coroutineScope.launch {
|
||||
val data = MarkdownLinkOpenerRemoteApi.getInstance().fetchLinkNavigationData(link, containingFile?.rpcId())
|
||||
val data = MarkdownLinkOpenerRemoteApi.Companion.getInstance().fetchLinkNavigationData(link, containingFile?.rpcId())
|
||||
val uri = createUri(data.uri) ?: return@launch
|
||||
if (uri.scheme != "file") {
|
||||
openExternalLink(currentProject, uri)
|
||||
@@ -67,7 +66,7 @@ internal class MarkdownLinkOpenerImpl(val coroutineScope: CoroutineScope) : Mark
|
||||
if (anchor == null) {
|
||||
withContext(Dispatchers.EDT) {
|
||||
runReadAction {
|
||||
OpenFileAction.openFile(fileToOpen, project)
|
||||
OpenFileAction.Companion.openFile(fileToOpen, project)
|
||||
}
|
||||
}
|
||||
return@launch
|
||||
@@ -78,7 +77,7 @@ internal class MarkdownLinkOpenerImpl(val coroutineScope: CoroutineScope) : Mark
|
||||
|
||||
private suspend fun processHeaders(anchor: String, project: Project, headers: List<MarkdownHeaderInfo>?){
|
||||
if (headers == null) {
|
||||
DumbService.getInstance(project).showDumbModeNotificationForFunctionality(
|
||||
DumbService.Companion.getInstance(project).showDumbModeNotificationForFunctionality(
|
||||
message = MarkdownBundle.message("markdown.dumb.mode.navigation.is.not.available.notification.text"),
|
||||
functionality = DumbModeBlockedFunctionality.ActionWithoutId
|
||||
)
|
||||
@@ -130,7 +129,7 @@ internal class MarkdownLinkOpenerImpl(val coroutineScope: CoroutineScope) : Mark
|
||||
|
||||
@RequiresEdt
|
||||
private fun showDialog(project: Project?, uri: URI): Boolean {
|
||||
val dialog = MessageDialogBuilder.yesNo(
|
||||
val dialog = MessageDialogBuilder.Companion.yesNo(
|
||||
title = MarkdownBundle.message("markdown.browse.external.link.open.confirmation.dialog.title"),
|
||||
message = MarkdownBundle.message("markdown.browse.external.link.open.confirmation.dialog.text", uri)
|
||||
).doNotAsk(createDoNotAskOption(project, uri))
|
||||
@@ -190,14 +189,14 @@ internal class MarkdownLinkOpenerImpl(val coroutineScope: CoroutineScope) : Mark
|
||||
val anchor = uri.fragment
|
||||
if (anchor == null){
|
||||
coroutineScope.launch(Dispatchers.EDT) {
|
||||
OpenFileAction.openFile(targetFile, project)
|
||||
OpenFileAction.Companion.openFile(targetFile, project)
|
||||
}
|
||||
return true
|
||||
}
|
||||
val headers = MarkdownLinkOpenerUtil.collectHeaders(project, anchor, targetFile)
|
||||
if (headers == null) {
|
||||
coroutineScope.launch {
|
||||
DumbService.getInstance(project).showDumbModeNotificationForFunctionality(
|
||||
DumbService.Companion.getInstance(project).showDumbModeNotificationForFunctionality(
|
||||
message = MarkdownBundle.message("markdown.dumb.mode.navigation.is.not.available.notification.text"),
|
||||
functionality = DumbModeBlockedFunctionality.ActionWithoutId
|
||||
)
|
||||
@@ -244,7 +243,7 @@ internal class MarkdownLinkOpenerImpl(val coroutineScope: CoroutineScope) : Mark
|
||||
return hostName == null ||
|
||||
hostName.startsWith("127.") ||
|
||||
hostName.endsWith(":1") ||
|
||||
isLocalHost(hostName, false, false)
|
||||
com.intellij.util.io.isLocalHost(hostName, false, false)
|
||||
}
|
||||
|
||||
private fun obtainHeadersPopupPosition(project: Project?): RelativePoint? {
|
||||
@@ -11,5 +11,9 @@
|
||||
- name: intellij.markdown.model
|
||||
- name: intellij.markdown.spellchecker
|
||||
- name: intellij.markdown.compose.preview
|
||||
- name: intellij.markdown.frontend
|
||||
- name: intellij.markdown.backend
|
||||
- name: lib/modules/intellij.markdown.backend.jar
|
||||
contentModules:
|
||||
- name: intellij.markdown.backend
|
||||
- name: lib/modules/intellij.markdown.frontend.jar
|
||||
contentModules:
|
||||
- name: intellij.markdown.frontend
|
||||
Reference in New Issue
Block a user