From c3e8c825af106d75170a8dc5bc0fbdb45fcf0e80 Mon Sep 17 00:00:00 2001 From: Rob Hogan Date: Wed, 27 Jul 2016 04:40:41 -0700 Subject: [PATCH] Open to correct line on Webstorm, IntelliJ and AppCode Summary: A tiny PR to add support for launching IDEA editors with the cursor at the correct line. The argument syntax is the same as sublime. The base names `wstorm`, `idea` and `appcode` are the default names when CLI launchers are created through 'Tools'->'Create Command-Line launcher' in the respective editor's gui. Tested through a fork of RN on Webstorm, IntelliJ and AppCode for OSX and by manual invocation from CLI on IntelliJ for windows. Closes https://github.com/facebook/react-native/pull/9042 Differential Revision: D3627680 fbshipit-source-id: dfb0db92f9ca8b464471c3dc9e92196d87d2e244 --- 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 18af9cdec..df1fb3fd2 100644 --- a/local-cli/server/util/launchEditor.js +++ b/local-cli/server/util/launchEditor.js @@ -52,6 +52,9 @@ function getArgumentsForLineNumber(editor, fileName, lineNumber, workspace) { return addWorkspaceToArgumentsIfExists([fileName + ':' + lineNumber], workspace); case 'subl': case 'sublime': + case 'wstorm': + case 'appcode': + case 'idea': return [fileName + ':' + lineNumber]; case 'joe': case 'emacs':