Summary:
Added the executable path to the `COMMON_EDITORS`
Added the executable name to the arguments selections

<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

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
This commit is contained in:
esbenvb 2017-09-26 14:54:24 -07:00 коммит произвёл Facebook Github Bot
Родитель 6d67e2dbbc
Коммит 43d394cb4b
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -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':