Browse files

Merge branch 'master' of github.com:zolotov/RemoteCall

  • Loading branch information...
2 parents e83a996 + c52bf6b commit 9c60931c1f0a1b6383b1c70cb769320f787779dc @zolotov committed Mar 11, 2012
Showing with 26 additions and 4 deletions.
  1. +26 −4 README.md
View
30 README.md
@@ -6,8 +6,8 @@ IntelliJ IDEA plugin for remote call some procedures
Supported procedures
--------------------------------
-At the moment it can open the files on http GET-request to localhost:8091 with "message" parameter looking like "FileName.java:89" or "any/path/FileName.java:89".
-In this case plugin will try to find the most appropriate file basing on the specified path in opened projects and navigate to it.
+At the moment it can open files on http GET-request to localhost:8091 with "message" parameter looking like "FileName.java:89" or "any/path/FileName.java:89".
+In this case plugin will try to find the most appropriate file basing on the specified path in opened projects and navigate to it. Also you can specify target column by following message: "FileName.java:89:21".
Send requests permitted only from localhost.
@@ -21,9 +21,31 @@ Also you can download archive from [downloads page](https://github.com/zolotov/R
Usage
---------
-In my case I use this plugin for navigating by stacktrace which showing in application for watching logs. In the page of this application i insert following js code, that converts filenames (in div with stacktrace) to open-in-ide-link: [https://gist.github.com/905279](https://gist.github.com/905279)
+In my case I use this plugin for navigating by stacktrace which showing in application for watching logs. In the page of this application I insert following js code, that converts filenames (in div with stacktrace) to open-in-ide-link:
-<script src="https://gist.github.com/905279.js?file=open_in_ide.js"></script>
+```javascript
+function highlight(stackTraceDiv) {
+//replace filenames to link
+ var text = stackTraceDiv.html();
+ var highlighted = text.replace(/[0-9a-z_A-Z\-\.\/]+:\d+/g, '<a class="ide-link" href="/?message=$&">$&</a>');
+ stackTraceDiv.html(highlighted);
+
+//bind links click event
+ $('a.ide-link').click(function(e) {
+ e.preventDefault();
+ var url = $(this).attr("href");
+ $.getJSON('http://localhost:8091' + url + '&callback=?', function(json) {
+ //do nothing
+ });
+
+ });
+}
+```
+
+[Vaughan Rouesnel](https://github.com/vjpr) has proposed following use cases:
+
+- printing hyperlinks to source code in the WebKit Dev Console logger.
+- printing hyperlinks to source code in test reports or in browser-test-runners like Jasmine test runner.
Also, you can open files in IDE from your local applications using sockets, telnet, curl etc. Or you can simple open url http://localhost:8091?message=FileName.java:80 in browser ;-)

0 comments on commit 9c60931

Please sign in to comment.