From 43d394cb4b30c03d5e94312f1c5c68ea8ad99d90 Mon Sep 17 00:00:00 2001 From: esbenvb Date: Tue, 26 Sep 2017 14:54:24 -0700 Subject: [PATCH] Updated support for WebStorm Summary: Added the executable path to the `COMMON_EDITORS` Added the executable name to the arguments selections Need to be able to jump to specific files and line numbers in WebStorm and autodetect WebStorm as editor, without setting up any environment vars. Start a new RN project in WebStorm, make some JS errors and click the errors to confirm that it will jump to the right file and line number in WebStorm. Make sure that none of the other `COMMON_EDITORS` are running, unless you set the `REACT_EDITOR` environment variable. Closes https://github.com/facebook/react-native/pull/15984 Differential Revision: D5911698 Pulled By: shergin fbshipit-source-id: 54fced7539520553dd2a93bf7ca7e4f457b0bfc3 --- local-cli/server/util/launchEditor.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/local-cli/server/util/launchEditor.js b/local-cli/server/util/launchEditor.js index dbc309f37..6e3eb7994 100644 --- a/local-cli/server/util/launchEditor.js +++ b/local-cli/server/util/launchEditor.js @@ -32,11 +32,13 @@ var COMMON_EDITORS = { '/Applications/Atom.app/Contents/MacOS/Atom': 'atom', '/Applications/Atom Beta.app/Contents/MacOS/Atom Beta': '/Applications/Atom Beta.app/Contents/MacOS/Atom Beta', + '/Applications/IntelliJ IDEA.app/Contents/MacOS/idea': 'idea', '/Applications/Sublime Text.app/Contents/MacOS/Sublime Text': '/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl', '/Applications/Sublime Text 2.app/Contents/MacOS/Sublime Text 2': '/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl', '/Applications/Visual Studio Code.app/Contents/MacOS/Electron': 'code', + '/Applications/WebStorm.app/Contents/MacOS/webstorm': 'webstorm', }; function addWorkspaceToArgumentsIfExists(args, workspace) { @@ -56,6 +58,7 @@ function getArgumentsForLineNumber(editor, fileName, lineNumber, workspace) { case 'Atom Beta': case 'subl': case 'sublime': + case 'webstorm': case 'wstorm': case 'appcode': case 'charm':