Comments (28)
Created what, pstorm
file? Yes this was done by IDE and I've explained in manual how to do this too.
from phpstormprotocol.
When im using this handler it just brings my phpstorm to the foreground but doesnt open any files or go to any lines any ideas?
from phpstormprotocol.
It's good, that PhpStorm is opened at all, because this proves that there is /Applications/PhpStorm.app
and you have pstrom
script. I personally have 2 of them with different names.
Also note, that links, that you're clicking must have absolute path to file, that will be opened on Mac. For example I have webserver running in Virtual Machine and I need to map paths in my web application to allow building paths to Mac, where PhpStorm will process them.
from phpstormprotocol.
i have absolute paths im trying to use your handler with whoops (nice combo) this is the exact url it has on a dummy example project
pstorm://open/?url=file:///Users/clarktomlinson/Sites/Work/Wordpress-Installs/INSPComposer/wp-content/themes/twentytwelve/index.php&line=18
from phpstormprotocol.
does pstorm /Users/clarktomlinson/Sites/Work/Wordpress-Installs/INSPComposer/wp-content/themes/twentytwelve/index.php:18
command open the file?
from phpstormprotocol.
yep thats the odd part. running pstorm in the command line works perfectly.
from phpstormprotocol.
Does pstorm://open/?url=file:///Users/clarktomlinson/Sites/Work/Wordpress-Installs/INSPComposer/wp-content/themes/twentytwelve/index.php&line=18
url (when copy/pasted to browser tab and executed) open PhpStorm with a file?
Maybe it doesn't work in one particular browser and works with others. I've tested with Firefox and Chrome. On first run I presented with a dialog asking me "do you trust PhpStormProtocol.app to open this url". After answering "yes" a file was opened. But what's important is to have project already opened in PhpStorm before trying to use that link.
from phpstormprotocol.
What happens if you call https://github.com/aik099/PhpStormProtocol/blob/master/PhpStorm%20Protocol.app/Contents/bin/parse_url.sh script with an url given? It surely does something and maybe fails for unknown reason.
from phpstormprotocol.
the project is open and i did get the protesting box about trusting the app which i accepted and no pasting the link in the browser doesnt work either in safari or chrome. Chrome just wants to do a google search.
from phpstormprotocol.
when running that i get this
Clarks-MacBook-Pro:bin clarktomlinson$ ./parse_url.sh pstorm://open/?url=file:///Users/clarktomlinson/Sites/Work/Wordpress-Installs/INSPComposer/wp-content/themes/twentytwelve/index.php&line=18
[1] 8706
Clarks-MacBook-Pro:bin clarktomlinson$ ./parse_url.sh pstorm://open/?url=file:///Users/clarktomlinson/Sites/Work/Wordpress-Installs/INSPComposer/wp-content/themes/twentytwelve/index.php&line=18
[2] 8707
[1] Done ./parse_url.sh pstorm://open/?url=file:///Users/clarktomlinson/Sites/Work/Wordpress-Installs/INSPComposer/wp-content/themes/twentytwelve/index.php
Clarks-MacBook-Pro:bin clarktomlinson$ ./parse_url.sh pstorm://open/?url=file:///Users/clarktomlinson/Sites/Work/Wordpress-Installs/INSPComposer/wp-content/themes/twentytwelve/index.php&line=18
[3] 8708
[2] Done ./parse_url.sh pstorm://open/?url=file:///Users/clarktomlinson/Sites/Work/Wordpress-Installs/INSPComposer/wp-content/themes/twentytwelve/index.php
Clarks-MacBook-Pro:bin clarktomlinson$ ./parse_url.sh pstorm://open/?url=file:///Users/clarktomlinson/Sites/Work/Wordpress-Installs/INSPComposer/wp-content/themes/twentytwelve/index.php&line=18
[4] 8709
[3] Done ./parse_url.sh pstorm://open/?url=file:///Users/clarktomlinson/Sites/Work/Wordpress-Installs/INSPComposer/wp-content/themes/twentytwelve/index.php
thats running it a few times also thanks for your assitance btw
from phpstormprotocol.
How are you building url (in your app), that is to be processed by PhpStormProtocol
? Are you properly escaping url that goes to url
parameter? Using urlencode
(or rawurlencode
) for example?
from phpstormprotocol.
i wasnt but when i attempted to just now i still get nothing
from phpstormprotocol.
Try using textmate url scheme (http://manual.macromates.com/en/using_textmate_from_terminal.html):
txmt://open/?url=file://~/.bash_profile&line=11&column=2
This way you can test if you properly escaping url.
from phpstormprotocol.
still nothing on my end
from phpstormprotocol.
Doesn't work even with TextMate?
from phpstormprotocol.
oh no text mate works fine
Clark Tomlinson
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
On Wednesday, June 19, 2013 at 11:35 AM, Alexander Obuhovich wrote:
Doesn't work even with TextMate?
—
Reply to this email directly or view it on GitHub (#2 (comment)).
from phpstormprotocol.
My best bet is on incorrect url escaping. Maybe TextMate solved that problem somehow. I don't have any urls, that doesn't work to test with.
I think, that parse_url.sh
isn't really parsing any filename from given url and that's why it doesn't work.
If you wish to debug further you can display parsed filename & line number instead of giving them to pstrom
. From there you can either get empty string or some extra symbols, that are in fact preventing pstorm
script from working with them.
from phpstormprotocol.
how could i do that my bash skills are all but null but that would be very helpful
from phpstormprotocol.
Here is what you have now:
#!/bin/sh
URL="$1"
REGEX="^pstorm://open/\?url=file://(.*)&line=(.*)$"
if [[ $URL =~ $REGEX ]]; then
/usr/local/bin/pstorm "${BASH_REMATCH[1]}:${BASH_REMATCH[2]}"
fi
Here is what you need to have:
#!/bin/sh
URL="$1"
REGEX="^pstorm://open/\?url=file://(.*)&line=(.*)$"
echo "URL: $URL"
if [[ $URL =~ $REGEX ]]; then
echo "MATCH: ${BASH_REMATCH[1]}:${BASH_REMATCH[2]}"
else
echo "NO MATCH"
fi
from phpstormprotocol.
Could you give an example that works for you so i can test please
Clark Tomlinson
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
On Wednesday, June 19, 2013 at 11:48 AM, Alexander Obuhovich wrote:
Here is what you have now:
#!/bin/sh URL="$1" REGEX="^pstorm://open/?url=file://(.)&line=(.)$" if [[ $URL =~$REGEX ]]; then /usr/local/bin/pstorm "$ {BASH_REMATCH[1]}:${BASH_REMATCH[2]}" fiHere is what you need to have:
#!/bin/sh URL="$1" REGEX="^pstorm://open/?url=file://(.)&line=(.)$" echo "URL: $URL" if [[ $URL =~$REGEX ]]; then echo "MATCH: $ {BASH_REMATCH[1]}:${BASH_REMATCH[2]}" else echo "NO MATCH" fi—
Reply to this email directly or view it on GitHub (#2 (comment)).
from phpstormprotocol.
This is copy/pasted from a link, clicking on which opens PhpStorm with that file: pstorm://open/?url=file:///Volumes/web/d/in-portal.52x/core/kernel/application.php&line=303
.
In my debugger I have following HTML that makes that link:
<a href="pstorm://open/?url=file:///Volumes/web/d/in-portal.52x/core/kernel/application.php&line=303">application.php:303</a>
.
It seems, that even don't escape url at all and it still works :)
from phpstormprotocol.
@th3fallen, I've found that this no longer works with PhpStorm 6.0.3. But it was working with PhpStorm 5.0.4.
I guess something changed on PhpStorm side.
from phpstormprotocol.
ha! im not crazy! glad to know its not me being incompetent.
from phpstormprotocol.
Also after upgrading to OSX 10.8.4 I can't get my app to work anymore, because it's throwing an error, when executed by double clicking PhpStorm Protocol
in applications.
Any decent applescript debugging tools out there, that you might recommend? When I set file url in a local variable and test it all works. But it comes in reality through protocol handler it doesn't work.
from phpstormprotocol.
using OSX 10.9.2 with phpStorm 7.1.3
I installed the app and launched it
on the command line using $ pstorm /Users/lsmith/htdocs/cmf-sandbox/app/AppKernel.php
works as expected but opening the URL pstorm://open/?url=file:///Users/lsmith/htdocs/cmf-sandbox/app/AppKernel.php&line=10
nothing happens.
from phpstormprotocol.
ok got it working with https://github.com/aik099/PhpStormProtocol/blob/master/LinCastor.md
from phpstormprotocol.
I guess in my original solution (that doesn't involve LinCastor) something isn't correctly escaped between AppleScript and Shell Script. If you can fix it, then PR is welcome.
from phpstormprotocol.
Closing because LinCastor solution for Mac users is clearly superior, then current implementation.
from phpstormprotocol.
Related Issues (20)
- Provided Framework configuration doesn't work HOT 7
- How to manage it to work with projects on vagrant HOT 6
- ActiveX object not available for Windows 10 HOT 3
- Regular expression does not match HOT 19
- Windows 10 - No error but file is not open HOT 23
- got an error while opening file HOT 4
- Remove "//E:JScript" HOT 11
- How to uninstall this? HOT 1
- It work but with error HOT 2
- Popup every time I trigger a link with this protocol HOT 3
- Linux support HOT 5
- Cannot find file 'C:\Windows\system32\W' HOT 7
- Please add to urldecode for linux HOT 3
- The system cannot find the file specified HOT 1
- JetBrains toolbox dir HOT 7
- can't find run_editor.js HOT 2
- wsl + docker + win10 problem HOT 9
- Problem with running this on windows HOT 2
- Can open file in PHPStrom8 HOT 6
- Problem with cloning on Windows HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phpstormprotocol.