Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Red Box should open PyCharm at line number of error #11275

Closed
wants to merge 1 commit into from
Closed

Red Box should open PyCharm at line number of error #11275

wants to merge 1 commit into from

Conversation

ericpalakovichcarr
Copy link
Contributor

@ericpalakovichcarr ericpalakovichcarr commented Dec 2, 2016

This is a simple one line change. When a red box is launching the editor, if launchEditor.js is aware of your editor it can also add a line number to open the file at. So if the stacktrace shows an error on like 56 in ako.js then it'll trywstorm /Users/somelady/src/project/ako.js:56 instead of wstorm /Users/somelady/src/project/ako.js.

This adds PyCharm's command line launcher, which is named charm. There is existing logic to handle other JetBrains editors, so I just did a simple one line addition.

Test plan (required)

  • Install PyCharm (if needed)
  • Set environment variable REACT_EDITOR to charm
  • Open PyCharm
  • Add/replace the current charm command via Tools -> Create Command-line launcher... in PyCharm.
  • Run a React Native project with an error in the source code.
  • In the generated red box, click on one of the entries in the stack trace
  • File should open in PyCharm at the correct line number.

This is a simple one line change.  When a redbox is launching the editor, if `launchEditor.js` is aware of your editor it can also add a line number to open the file at.  So if the stacktrace shows an error on like 56 in `ako.js` then it'll try`wstorm /Users/somelady/src/project/ako.js:56` instead of `wstorm /Users/somelady/src/project/ako.js`.

This adds PyCharm's command line launcher, which is named `charm`.  There is existing logic to handle other JetBrains editors, so I just did a simple one line addition.
@facebook-github-bot
Copy link
Contributor

By analyzing the blame information on this pull request, we identified @matthewwithanm and @PatoBeltran to be potential reviewers.

@facebook-github-bot
Copy link
Contributor

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

If you are contributing on behalf of someone else (eg your employer): the individual CLA is not sufficient - use https://developers.facebook.com/opensource/cla?type=company instead. Contact cla@fb.com if you have any questions.

@ericpalakovichcarr ericpalakovichcarr changed the title Redbox should open PyCharm at line number of error Red Box should open PyCharm at line number of error Dec 2, 2016
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 2, 2016
@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@javache
Copy link
Member

javache commented Dec 7, 2016

@facebook-github-bot shipit

@facebook-github-bot facebook-github-bot added the Import Started This pull request has been imported. This does not imply the PR has been approved. label Dec 7, 2016
@facebook-github-bot
Copy link
Contributor

@javache has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

mkonicek pushed a commit that referenced this pull request Dec 12, 2016
Summary:
This is a simple one line change.  When a red box is launching the editor, if `launchEditor.js` is aware of your editor it can also add a line number to open the file at.  So if the stacktrace shows an error on like 56 in `ako.js` then it'll try`wstorm /Users/somelady/src/project/ako.js:56` instead of `wstorm /Users/somelady/src/project/ako.js`.

This adds PyCharm's command line launcher, which is named `charm`.  There is existing logic to handle other JetBrains editors, so I just did a simple one line addition.

**Test plan (required)**

* Install PyCharm (if needed)
* Set environment variable `REACT_EDITOR` to `charm`
* Open PyCharm
* Add/replace the current `charm` command via `Tools -> Create Command-line launcher...` in PyCharm.
* Run a React Native project with an error in the source code.
* In the generated red box, click on one of the entries in the stack trace
* File should open in PyCharm at the correct line number.
Closes #11275

Differential Revision: D4295724

Pulled By: javache

fbshipit-source-id: 29dec525f76c2f0a3ee203cac67408eecc8ac6b6
DanielMSchmidt pushed a commit to DanielMSchmidt/react-native that referenced this pull request Jan 4, 2017
Summary:
This is a simple one line change.  When a red box is launching the editor, if `launchEditor.js` is aware of your editor it can also add a line number to open the file at.  So if the stacktrace shows an error on like 56 in `ako.js` then it'll try`wstorm /Users/somelady/src/project/ako.js:56` instead of `wstorm /Users/somelady/src/project/ako.js`.

This adds PyCharm's command line launcher, which is named `charm`.  There is existing logic to handle other JetBrains editors, so I just did a simple one line addition.

**Test plan (required)**

* Install PyCharm (if needed)
* Set environment variable `REACT_EDITOR` to `charm`
* Open PyCharm
* Add/replace the current `charm` command via `Tools -> Create Command-line launcher...` in PyCharm.
* Run a React Native project with an error in the source code.
* In the generated red box, click on one of the entries in the stack trace
* File should open in PyCharm at the correct line number.
Closes facebook#11275

Differential Revision: D4295724

Pulled By: javache

fbshipit-source-id: 29dec525f76c2f0a3ee203cac67408eecc8ac6b6
grabbou pushed a commit to react-native-community/cli that referenced this pull request Sep 26, 2018
Summary:
This is a simple one line change.  When a red box is launching the editor, if `launchEditor.js` is aware of your editor it can also add a line number to open the file at.  So if the stacktrace shows an error on like 56 in `ako.js` then it'll try`wstorm /Users/somelady/src/project/ako.js:56` instead of `wstorm /Users/somelady/src/project/ako.js`.

This adds PyCharm's command line launcher, which is named `charm`.  There is existing logic to handle other JetBrains editors, so I just did a simple one line addition.

**Test plan (required)**

* Install PyCharm (if needed)
* Set environment variable `REACT_EDITOR` to `charm`
* Open PyCharm
* Add/replace the current `charm` command via `Tools -> Create Command-line launcher...` in PyCharm.
* Run a React Native project with an error in the source code.
* In the generated red box, click on one of the entries in the stack trace
* File should open in PyCharm at the correct line number.
Closes facebook/react-native#11275

Differential Revision: D4295724

Pulled By: javache

fbshipit-source-id: 29dec525f76c2f0a3ee203cac67408eecc8ac6b6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Import Started This pull request has been imported. This does not imply the PR has been approved.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants