mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[eel] IJPL-217770: Decouple EelDescriptor and EelMachine through EelMachineProvider
GitOrigin-RevId: 407055c63d852a064a689679f49a0beb06b8d205
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f344e3faf8
commit
092344bb30
@@ -901,7 +901,7 @@ public final class BuildManager implements Disposable {
|
||||
else {
|
||||
var optionsPath = PathManager.getOptionsDir().toString();
|
||||
if (canUseEel() && !EelPathUtils.isProjectLocal(project)) {
|
||||
optionsPath = asEelPath(OptionsDirectoryProcessor.transferOptionsToRemote(PathManager.getOptionsDir(), eelDescriptor)).toString();
|
||||
optionsPath = asEelPath(OptionsDirectoryProcessor.transferOptionsToRemote(PathManager.getOptionsDir(), project)).toString();
|
||||
}
|
||||
else {
|
||||
optionsPath = pathMapper.apply(optionsPath);
|
||||
|
||||
@@ -4,9 +4,11 @@
|
||||
|
||||
package com.intellij.compiler.server
|
||||
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.util.registry.Registry
|
||||
import com.intellij.platform.eel.EelDescriptor
|
||||
import com.intellij.platform.eel.provider.EelProvider.Companion.EP_NAME
|
||||
import com.intellij.platform.eel.provider.LocalEelMachine
|
||||
import com.intellij.platform.eel.provider.getEelDescriptor
|
||||
import com.intellij.platform.eel.provider.getEelMachine
|
||||
import com.intellij.platform.eel.provider.utils.EelPathUtils
|
||||
import com.intellij.platform.eel.provider.utils.EelPathUtils.transferLocalContentToRemote
|
||||
import java.nio.file.Files
|
||||
@@ -15,15 +17,15 @@ import kotlin.io.path.*
|
||||
|
||||
private val ENVIRONMENT_ASSOCIATED_FILENAMES = setOf("jdk.table.xml", "applicationLibraries.xml")
|
||||
|
||||
internal fun transferOptionsToRemote(optionsDir: Path, eelDescriptor: EelDescriptor): Path {
|
||||
internal fun transferOptionsToRemote(optionsDir: Path, project: Project): Path {
|
||||
val eelDescriptor = project.getEelDescriptor()
|
||||
val machine = project.getEelMachine()
|
||||
|
||||
if (!Registry.`is`("ide.workspace.model.per.environment.model.separation", true)) {
|
||||
return transferLocalContentToRemote(optionsDir, EelPathUtils.TransferTarget.Temporary(eelDescriptor))
|
||||
}
|
||||
val machine = eelDescriptor.machine
|
||||
val internalName = EP_NAME.extensionList.firstNotNullOfOrNull { provider ->
|
||||
provider.getInternalName(machine)
|
||||
}
|
||||
if (internalName == null) {
|
||||
val internalName = machine.internalName
|
||||
if (internalName == LocalEelMachine.internalName) {
|
||||
return transferLocalContentToRemote(optionsDir, EelPathUtils.TransferTarget.Temporary(eelDescriptor))
|
||||
}
|
||||
val parentForProcessedOptionsDir = Files.createTempDirectory(internalName)
|
||||
|
||||
Reference in New Issue
Block a user