mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 20:39:40 +07:00
IDEA-CR-55492: fixer after review
GitOrigin-RevId: b68a1e869c5682783083b886e409141e09703a86
This commit is contained in:
committed by
intellij-monorepo-bot
parent
917233d1f7
commit
b4ee4781f7
1
.idea/modules.xml
generated
1
.idea/modules.xml
generated
@@ -710,6 +710,7 @@
|
||||
<module fileurl="file://$PROJECT_DIR$/python/intellij.python.community.plugin.tests.iml" filepath="$PROJECT_DIR$/python/intellij.python.community.plugin.tests.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/python/testFramework/intellij.python.community.testFramework.iml" filepath="$PROJECT_DIR$/python/testFramework/intellij.python.community.testFramework.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/python/testSrc/intellij.python.community.tests.iml" filepath="$PROJECT_DIR$/python/testSrc/intellij.python.community.tests.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/python/conda/intellij.python.conda.iml" filepath="$PROJECT_DIR$/python/conda/intellij.python.conda.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/python/python-copyright/intellij.python.copyright.iml" filepath="$PROJECT_DIR$/python/python-copyright/intellij.python.copyright.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/python/intellij.python.helpers.iml" filepath="$PROJECT_DIR$/python/intellij.python.helpers.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/python/helpers/tests/intellij.python.helpers.tests.iml" filepath="$PROJECT_DIR$/python/helpers/tests/intellij.python.helpers.tests.iml" />
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.intellij.openapi.progress.Task
|
||||
import com.intellij.openapi.project.DumbAware
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.util.ExceptionUtil
|
||||
import com.jetbrains.python.conda.InstallCondaUtils
|
||||
import icons.PythonIcons.Python.Anaconda
|
||||
|
||||
/**
|
||||
@@ -40,7 +41,7 @@ class InstallCondaAction : AnAction(ActionsBundle.message("action.SetupMiniconda
|
||||
object : Task.Backgroundable(project, title) {
|
||||
override fun run(indicator: ProgressIndicator) {
|
||||
try {
|
||||
val handler = InstallCondaActionImpl.installationHandler(path) { line ->
|
||||
val handler = InstallCondaUtils.installationHandler(path) { line ->
|
||||
indicator.text2 = line
|
||||
}
|
||||
|
||||
|
||||
@@ -10,13 +10,14 @@ import com.intellij.openapi.ui.Messages
|
||||
import com.intellij.openapi.ui.TextFieldWithBrowseButton
|
||||
import com.intellij.openapi.vfs.LocalFileSystem
|
||||
import com.intellij.ui.layout.*
|
||||
import com.jetbrains.python.conda.InstallCondaUtils
|
||||
import javax.swing.JTextField
|
||||
|
||||
/**
|
||||
* @author Aleksey.Rostovskiy
|
||||
*/
|
||||
class InstallCondaActionDialog(private val project: Project?) : DialogWrapper(project) {
|
||||
private val installationPath = JTextField(InstallCondaActionImpl.defaultDirectoryFile.absolutePath)
|
||||
private val installationPath = JTextField(InstallCondaUtils.defaultDirectoryFile.absolutePath)
|
||||
|
||||
private val fileChooser = TextFieldWithBrowseButton(installationPath) {
|
||||
val virtualFile = LocalFileSystem.getInstance().findFileByPath(getPathInstallation())
|
||||
@@ -25,7 +26,7 @@ class InstallCondaActionDialog(private val project: Project?) : DialogWrapper(pr
|
||||
.choose(project, virtualFile)
|
||||
.firstOrNull()
|
||||
?.path
|
||||
installationPath.text = path ?: InstallCondaActionImpl.defaultDirectoryFile.absolutePath
|
||||
installationPath.text = path ?: InstallCondaUtils.defaultDirectoryFile.absolutePath
|
||||
}
|
||||
|
||||
init {
|
||||
@@ -34,7 +35,7 @@ class InstallCondaActionDialog(private val project: Project?) : DialogWrapper(pr
|
||||
}
|
||||
|
||||
override fun doOKAction() {
|
||||
val errorMessage = InstallCondaActionImpl.checkPath(getPathInstallation())
|
||||
val errorMessage = InstallCondaUtils.checkPath(getPathInstallation())
|
||||
|
||||
if (errorMessage != null) {
|
||||
Messages.showErrorDialog(project,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.jetbrains.python.actions
|
||||
package com.jetbrains.python.conda
|
||||
|
||||
import com.intellij.execution.configurations.GeneralCommandLine
|
||||
import com.intellij.execution.process.CapturingProcessHandler
|
||||
@@ -12,14 +12,13 @@ import com.intellij.openapi.util.Key
|
||||
import com.intellij.openapi.util.SystemInfo
|
||||
import com.intellij.openapi.util.text.StringUtil
|
||||
import com.intellij.util.SystemProperties
|
||||
import com.jetbrains.python.conda.PythonMinicondaLocator
|
||||
import java.io.File
|
||||
|
||||
/**
|
||||
* @author Aleksey.Rostovskiy
|
||||
*/
|
||||
object InstallCondaActionImpl {
|
||||
private val LOG = Logger.getInstance(InstallCondaActionImpl::class.java)
|
||||
object InstallCondaUtils {
|
||||
private val LOG = Logger.getInstance(InstallCondaUtils::class.java)
|
||||
|
||||
/**
|
||||
* @return `miniconda3` folder at home directory
|
||||
@@ -25,7 +25,6 @@ import com.intellij.ui.components.labels.LinkLabel;
|
||||
import com.intellij.util.concurrency.AppExecutorUtil;
|
||||
import com.intellij.util.ui.GridBag;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import com.jetbrains.python.actions.InstallCondaActionImpl;
|
||||
import kotlin.Unit;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -74,7 +73,7 @@ public class PyCharmCustomizeCondaSetupStep extends AbstractCustomizeWizardStep
|
||||
myProgressPanel.setEnabled(true);
|
||||
myProgressPanel.setVisible(false);
|
||||
|
||||
final File installationPath = InstallCondaActionImpl.getDefaultDirectoryFile();
|
||||
final File installationPath = InstallCondaUtils.getDefaultDirectoryFile();
|
||||
myLastSelection = new CoreLocalFileSystem().findFileByIoFile(installationPath);
|
||||
|
||||
myInstallButton = new JButton(ActionsBundle.message("action.SetupMiniconda.actionName"));
|
||||
@@ -130,8 +129,8 @@ public class PyCharmCustomizeCondaSetupStep extends AbstractCustomizeWizardStep
|
||||
}
|
||||
|
||||
private void installButtonActionListener() {
|
||||
String path = InstallCondaActionImpl.beatifyPath(mySetupCondaFileChooser.getText());
|
||||
String errorMessage = InstallCondaActionImpl.checkPath(path);
|
||||
String path = InstallCondaUtils.beatifyPath(mySetupCondaFileChooser.getText());
|
||||
String errorMessage = InstallCondaUtils.checkPath(path);
|
||||
|
||||
if (errorMessage != null) {
|
||||
showErrorDialog(errorMessage, false);
|
||||
@@ -144,7 +143,7 @@ public class PyCharmCustomizeCondaSetupStep extends AbstractCustomizeWizardStep
|
||||
//noinspection SSBasedInspection
|
||||
AppExecutorUtil.getAppExecutorService().submit(() -> {
|
||||
try {
|
||||
CapturingProcessHandler handler = InstallCondaActionImpl.installationHandler(path, (line) -> {
|
||||
CapturingProcessHandler handler = InstallCondaUtils.installationHandler(path, (line) -> {
|
||||
myProgressBar.setString(line);
|
||||
return Unit.INSTANCE;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user