diff options
author | Tor Norbye <tnorbye@google.com> | 2013-05-07 20:09:46 -0700 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2013-05-07 20:09:46 -0700 |
commit | 934b9431b0b827a132df794e307fe5a2b70de00b (patch) | |
tree | dadfd1ccaeb2ce0403d306a59b35711531481e2b /images | |
parent | f56a0fff1a336635c966bffc25e16af9a4e6e988 (diff) | |
download | idea-934b9431b0b827a132df794e307fe5a2b70de00b.tar.gz |
Snapshot 5220ac5242aadc343c995ec9a49d09765db4a0c7 from master branch of git://git.jetbrains.org/idea/community.git
Change-Id: I2494d92b34f89102885b2f39d7552747fafdafec
Diffstat (limited to 'images')
-rw-r--r-- | images/src/org/intellij/images/ImagesBundle.properties | 2 | ||||
-rw-r--r-- | images/src/org/intellij/images/actions/EditExternallyAction.java | 16 |
2 files changed, 7 insertions, 11 deletions
diff --git a/images/src/org/intellij/images/ImagesBundle.properties b/images/src/org/intellij/images/ImagesBundle.properties index 92638d0ce26f..6a2bdeaf24ac 100644 --- a/images/src/org/intellij/images/ImagesBundle.properties +++ b/images/src/org/intellij/images/ImagesBundle.properties @@ -1,6 +1,6 @@ error.empty.external.editor.path=Please configure external editor executable path error.title.empty.external.editor.path=External Editor not Configured -error.title.launching.external.editor=Problem launching external executable +error.title.launching.external.editor=Problem Launching External Executable select.external.executable.title=Select editor select.external.executable.message=Select external graphics editor diff --git a/images/src/org/intellij/images/actions/EditExternallyAction.java b/images/src/org/intellij/images/actions/EditExternallyAction.java index 945edb5c2e85..db8e0fee6a74 100644 --- a/images/src/org/intellij/images/actions/EditExternallyAction.java +++ b/images/src/org/intellij/images/actions/EditExternallyAction.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2011 JetBrains s.r.o. + * Copyright 2000-2013 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ import com.intellij.openapi.ui.Messages; import com.intellij.openapi.util.SystemInfo; import com.intellij.openapi.util.io.FileUtil; import com.intellij.openapi.util.text.StringUtil; -import com.intellij.openapi.vfs.VfsUtil; +import com.intellij.openapi.vfs.VfsUtilCore; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.util.EnvironmentUtil; import org.intellij.images.ImagesBundle; @@ -39,7 +39,6 @@ import org.intellij.images.options.impl.OptionsConfigurabe; import java.io.File; import java.util.Map; -import java.util.Set; /** * Open image file externally. @@ -60,9 +59,8 @@ public final class EditExternallyAction extends AnAction { } else { if (files != null) { - Map<String, String> env = EnvironmentUtil.getEnvironmentProperties(); - Set<String> varNames = env.keySet(); - for (String varName : varNames) { + Map<String, String> env = EnvironmentUtil.getEnvironmentMap(); + for (String varName : env.keySet()) { if (SystemInfo.isWindows) { executablePath = StringUtil.replace(executablePath, "%" + varName + "%", env.get(varName), true); } @@ -85,7 +83,7 @@ public final class EditExternallyAction extends AnAction { ImageFileTypeManager typeManager = ImageFileTypeManager.getInstance(); for (VirtualFile file : files) { if (file.isInLocalFileSystem() && typeManager.isImage(file)) { - commandLine.addParameter(VfsUtil.virtualToIoFile(file).getAbsolutePath()); + commandLine.addParameter(VfsUtilCore.virtualToIoFile(file).getAbsolutePath()); } } commandLine.setWorkDirectory(new File(executablePath).getParentFile()); @@ -94,9 +92,7 @@ public final class EditExternallyAction extends AnAction { commandLine.createProcess(); } catch (ExecutionException ex) { - Messages.showErrorDialog(project, - ex.getLocalizedMessage(), - ImagesBundle.message("error.title.launching.external.editor")); + Messages.showErrorDialog(project, ex.getLocalizedMessage(), ImagesBundle.message("error.title.launching.external.editor")); OptionsConfigurabe.show(project); } } |