Permalink
Browse files

Updated support for WebStorm

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 #15984

Differential Revision: D5911698

Pulled By: shergin

fbshipit-source-id: 54fced7539520553dd2a93bf7ca7e4f457b0bfc3
  • Loading branch information...
esbenvb authored and facebook-github-bot committed Sep 26, 2017
1 parent 6d67e2d commit 43d394cb4b30c03d5e94312f1c5c68ea8ad99d90
Showing with 3 additions and 0 deletions.
  1. +3 −0 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':

0 comments on commit 43d394c

Please sign in to comment.