mirror of
https://github.com/desktop/desktop
synced 2024-11-05 20:49:32 +00:00
Merge pull request #9401 from jakubroztocil/feature/pycharm
Added support for PyCharm as external editor on macOS
This commit is contained in:
commit
7981a5ccda
2 changed files with 15 additions and 0 deletions
|
@ -12,6 +12,7 @@ export enum ExternalEditor {
|
|||
SublimeText = 'Sublime Text',
|
||||
BBEdit = 'BBEdit',
|
||||
PhpStorm = 'PhpStorm',
|
||||
PyCharm = 'PyCharm',
|
||||
RubyMine = 'RubyMine',
|
||||
TextMate = 'TextMate',
|
||||
Brackets = 'Brackets',
|
||||
|
@ -52,6 +53,9 @@ export function parse(label: string): ExternalEditor | null {
|
|||
if (label === ExternalEditor.PhpStorm) {
|
||||
return ExternalEditor.PhpStorm
|
||||
}
|
||||
if (label === ExternalEditor.PyCharm) {
|
||||
return ExternalEditor.PyCharm
|
||||
}
|
||||
if (label === ExternalEditor.RubyMine) {
|
||||
return ExternalEditor.RubyMine
|
||||
}
|
||||
|
@ -111,6 +115,8 @@ function getBundleIdentifiers(editor: ExternalEditor): ReadonlyArray<string> {
|
|||
return ['com.barebones.bbedit']
|
||||
case ExternalEditor.PhpStorm:
|
||||
return ['com.jetbrains.PhpStorm']
|
||||
case ExternalEditor.PyCharm:
|
||||
return ['com.jetbrains.PyCharm']
|
||||
case ExternalEditor.RubyMine:
|
||||
return ['com.jetbrains.RubyMine']
|
||||
case ExternalEditor.IntelliJ:
|
||||
|
@ -177,6 +183,8 @@ function getExecutableShim(
|
|||
return Path.join(installPath, 'Contents', 'Helpers', 'bbedit_tool')
|
||||
case ExternalEditor.PhpStorm:
|
||||
return Path.join(installPath, 'Contents', 'MacOS', 'phpstorm')
|
||||
case ExternalEditor.PyCharm:
|
||||
return Path.join(installPath, 'Contents', 'MacOS', 'pycharm')
|
||||
case ExternalEditor.RubyMine:
|
||||
return Path.join(installPath, 'Contents', 'MacOS', 'rubymine')
|
||||
case ExternalEditor.TextMate:
|
||||
|
@ -242,6 +250,7 @@ export async function getAvailableEditors(): Promise<
|
|||
sublimePath,
|
||||
bbeditPath,
|
||||
phpStormPath,
|
||||
pyCharmPath,
|
||||
rubyMinePath,
|
||||
textMatePath,
|
||||
bracketsPath,
|
||||
|
@ -262,6 +271,7 @@ export async function getAvailableEditors(): Promise<
|
|||
findApplication(ExternalEditor.SublimeText),
|
||||
findApplication(ExternalEditor.BBEdit),
|
||||
findApplication(ExternalEditor.PhpStorm),
|
||||
findApplication(ExternalEditor.PyCharm),
|
||||
findApplication(ExternalEditor.RubyMine),
|
||||
findApplication(ExternalEditor.TextMate),
|
||||
findApplication(ExternalEditor.Brackets),
|
||||
|
@ -310,6 +320,10 @@ export async function getAvailableEditors(): Promise<
|
|||
results.push({ editor: ExternalEditor.PhpStorm, path: phpStormPath })
|
||||
}
|
||||
|
||||
if (pyCharmPath) {
|
||||
results.push({ editor: ExternalEditor.PyCharm, path: pyCharmPath })
|
||||
}
|
||||
|
||||
if (rubyMinePath) {
|
||||
results.push({ editor: ExternalEditor.RubyMine, path: rubyMinePath })
|
||||
}
|
||||
|
|
|
@ -262,6 +262,7 @@ These editors are currently supported:
|
|||
- [Sublime Text](https://www.sublimetext.com/)
|
||||
- [BBEdit](http://www.barebones.com/products/bbedit/)
|
||||
- [JetBrains PhpStorm](https://www.jetbrains.com/phpstorm/)
|
||||
- [JetBrains PyCharm](https://www.jetbrains.com/pycharm/)
|
||||
- [JetBrains RubyMine](https://www.jetbrains.com/rubymine/)
|
||||
- [TextMate](https://macromates.com)
|
||||
- [Brackets](http://brackets.io/)
|
||||
|
|
Loading…
Reference in a new issue