aik099 / phpstormprotocol Goto Github PK
View Code? Open in Web Editor NEWCustom protocol handler for the PhpStorm
Custom protocol handler for the PhpStorm
links in the browser are encoded like this:
phpstorm://open?file=%2Fmedia%2Fphantom%2FStorage%2FProjects%2FE-cabinet%2FE-cabinet%2Fapp%2FHttp%2FInterfaces%2FApi1CSoap.php&line=21
The PhpStorm opens them as a file without decoding the characters %2F
thus it turns out that the program opens a file named
%2Fmedia%2Fphantom%2FStorage%2FProjects%2FE-cabinet%2FE-cabinet%2Fapp%2FHttp%2FInterfaces%2FApi1CSoap.php
Hello, i try to install it on windows 10.
When i opens my file with link phpstorm://open?url=C:/OpenServer/domains/.../BlogPosts.php&line=357
Got an error: Windows Script Host - there is no script engine for file extension ".js".
i changed settings in js file - what i miss?
Thanks.
I can't clone the repository on Windows without problems. :-(
There is an Carriage Return character (%0D) at the end of the Icon
file name:
https://github.com/aik099/PhpStormProtocol/blob/master/PhpStorm%20Protocol.app/Icon%0D <--
Is that intended?
Windows has problems with such "special characters" in filenames.
GitHub doesn't display it.
O my PC win10 x64 it only worked when I removed the "//E:JScript" part from the .reg file.
how did you create this or was it done by the ide?
I just updated to PHPStorm8.
The command /usr/local/bin/pstorm [file]:[line]
does not really do its job. Nothing happens. Is this something you know about? Am I doing something wrong? Should I contact Jetbrains instead?
I'm using:
Installed successfully but it doesn't work with pstorm://open/?url=file://%f&line=%l
(based on the documentation).
Changed it to pstorm://open/?url=file://%%f&line=%%l
and it worked. Does the documentation need to get updated or I'm missing something?
Doesn't work.
permanently alters your registry, how to undo this?
We recently installed a fresh Windows 10 desktop and it isn't able to execute the protocol handler.
It gives an error on line 55, so it is related to the ActiveXObject. Seems the object is hidden?
I get this pop up every time I click on the link.
I have tried the steps of the following page, but it didn't work for me:
https://superuser.com/questions/1481851/disable-chrome-to-ask-for-confirmation-to-open-external-application-everytime
What about Linux users? :)
I'm using a vagrant box as my development environment. My host OS is windows 7 and the guest is a linux based machine. My code base is shared between host and guest so the path of the project is something like D:\vagrant\PROJECT_NAME\code
and /var/www/html/NAME/
on the host and guest machines respectively.
The generated link is something like pstorm://open/?url=file:///var/www/html/NAME/app/cache/dev/classes.php&line=2061
which has not a valid path on the windows. How can I mange it to work? Maybe adding two options to replace first part of the file path?
This is great. I'm so close, I can smell it.
Running windows OS / PhpStorm 2018.3.1
I trigger a link: phpstorm://open?url=file://W:/index.php&line=15
First it shows a popup:
"Cannot find file 'C:\Windows\system32\W'"
Then it opens up the file and jumps to line 15.
Any tips to prevent the first popup? It already opens the right file, but the popup each time is a pain.
Also any tips on making PhpStorm focus after the link is clicked?
Hello,
I am running the script with Windows 10 (FR) 64 bits and PHPstorm 2017.
I adapt the reg with :
[HKEY_CLASSES_ROOT\phpstorm\shell\open\command] @="wscript \"C:\\Program Files (x86)\\PhpStorm Protocol (Win)\\run_editor.js\" \"%1\""
and the JS with :
var settings = {
// Set to 'true' (without quotes) if run on Windows 64bit. Set to 'false' (without quotes) otherwise.
x64: false,
// Set to folder name, where PhpStorm was installed to (e.g. 'PhpStorm')
folder_name: 'PhpStorm 2016.3',
// Set to window title (only text after dash sign), that you see, when switching to running PhpStorm instance
window_title: 'PhpStorm 2017.1.3',
// In case your file is mapped via a network share and paths do not match.
// eg. /var/www will can replaced with Y:/
projects_basepath: '',
projects_path_alias: ''
};
// dont change anything below this line, unless you know what youre doing
var url = WScript.Arguments(0),
match = /^phpstorm:\/\/open\?(url=file:\/\/|file=)(.+)&line=(\d+)$/.exec(url),
project = '',
editor = '"C:\\' + (settings.x64 ? 'Program Files (x86)' : 'Program Files') + '\\JetBrains\\' + settings.folder_name + '\\bin\\
>phpstorm.exe
"';
But It does not work and I have no errors :
Image demo : I clicked on the Controller file : https://vgy.me/OiVhlQ.png
Open with the script : https://vgy.me/jBi1Hk.png
...And nothing happen :(
Edit :
On my config.yml I wrote : ide: 'phpstorm://open?url=file://%%f&line=%%l'
I use sail - docker + win10(wsl) in my laravel project. My projects dir is "\wsl$\Ubuntu\home\vladimirb\projects"
base exception link:
phpstorm://open?file=%2Fhome%2Fvladimirb%2Fprojects%2Flearn%2Fe-com-laravel%2Fresources%2Fviews%2Fwelcome.blade.php&line=20
and it opens well when i manually type in browsers url line:
phpstorm://open?file=\\wsl$\Ubuntu\%2Fhome%2Fvladimirb%2Fprojects%2Flearn%2Fe-com-laravel%2Fresources%2Fviews%2Fwelcome.blade.php&line=20
My question is: what should i use here in cfg file:
// In case your file is mapped via a network share and paths do not match.
// eg. /var/www will can replaced with Y:/
projects_basepath: '',
projects_path_alias: '',
?
Do you have some details about Toolbox dir? For my environment, I had to change
\\JetBrains\\Toolbox\\apps\\PhpStorm\\ch-0
to ch-1
.
ch-1
folder is the only one I have there. I did not find any information for this.
Do you think I am "unusual case" or should we create some PR for this (add new param to configuration)? The problem is that I do not know how to easily get information about Jetbrains folder structure and what's the logic behind it.
PR could be like: https://gist.github.com/KamilPesek/e0447004a0cd75534836eca0ef242cbd
I was test on Windows 10 64 bit, with phpstorm on symfony 3.2.5 which produce link like this:
phpstorm://open?file=C:\wamp64\myapp\src\App\Controller\MyController.php&line=29
This line of code does not match:
match = /^phpstorm:\/\/open\?(url=file:\/\/|file=)(.+)&line=(\d+)$/.exec(url),
I was develop new simple version of code that work fine:
var arg = WScript.Arguments(0);
arg = arg.replace("phpstorm://open/?file=", "");
var file=arg.substring(0, arg.indexOf("&"));
var line= arg.substring(arg.indexOf("line=")+5);
var objShell = new ActiveXObject("shell.application");
objShell.ShellExecute("C:\\Program Files (x86)\\JetBrains\\PhpStorm 2016.3.2\\bin\\phpstorm64.exe",
"--line "+line+" "+ file);
Hello,
I followed the instructions for Windows but for some reason it's not working.
I'm working on Windows 10 and I'm using Laravel 9 which generates the following link on the error page:
phpstorm://open?file=C%3A%5Claragon%5Cwww%5Claravel9%5Croutes%5Cweb.php&line=17
What do I need to do in order to make this work?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.