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

Add support for IDE installed in user's home directory #1125

Merged
merged 1 commit into from
Mar 27, 2025

Conversation

wojtekn
Copy link
Contributor

@wojtekn wojtekn commented Mar 25, 2025

Related issues

Proposed Changes

Currently, Studio only checks for VS Code and PHPStorm in the system-wide /Applications directory. This change adds support for detecting these apps in the user's ~/Applications directory as well.

Testing Instructions

  1. Install VS Code or PHPStorm in your user's Applications folder (~/Applications)
  2. Verify that Studio detects the app in the user's Applications folder
  3. Verify that Studio still detects apps in the system-wide /Applications folder
  4. Verify that the detection still works on Windows

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@wojtekn wojtekn requested a review from a team March 25, 2025 14:46
@wojtekn wojtekn self-assigned this Mar 25, 2025
Copy link
Contributor

@ivan-ottinger ivan-ottinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good and work as expected. 👌🏼

I have tested the PR with PHPStorm on macOS and Studio picked it up correctly in both locations (user's ~/Applications and system-wide /Applications).

Copy link
Member

@sejas sejas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the change. I confirm I was able to open VSCode and PHP Storm in MacOS.
This PR doesn't change the way we open the app using deep links: 👍

studio/src/ipc-handlers.ts

Lines 1097 to 1104 in 17e5b6e

if ( isInstalled( 'vscode' ) ) {
// Open site first to ensure the file is opened within the site context
await shell.openExternal( `vscode://file/${ server.details.path }?windowId=_blank` );
await shell.openExternal( `vscode://file/${ path }` );
} else if ( isInstalled( 'phpstorm' ) ) {
// Open site first to ensure the file is opened within the site context
await shell.openExternal( `phpstorm://open?file=${ path }` );
}

@wojtekn
Copy link
Contributor Author

wojtekn commented Mar 27, 2025

Thanks for reviewing and testing @ivan-ottinger and @sejas .

This PR doesn't change the way we open the app using deep links: 👍

Correct, it only changes the part that checks if apps are installed. The rest is unchanged and relies on deep links.

@wojtekn wojtekn merged commit 3fe1f6b into trunk Mar 27, 2025
8 checks passed
@wojtekn wojtekn deleted the add/support-for-ide-installed-in-user-dir branch March 27, 2025 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Support PhpStorm installed from JetBrains Toolbox app
3 participants