Directly Search For Exception Online

Quite often when I am debugging I find myself copying the exception from the stacktrace in the output pane and pasting it into a search engine.
Does anybody else think that an option in the context menu that said "Search with <search engine>" would be a useful feature?

11 comments

I'd suggest to submit feature request for that and check community reaction (number of votes/watchers).

I believe such a functionality can be added to IDEA if community shows that the feature has a real value.

0

maybe this is a stupid question, but why would i want to search for an exception online? i mean, if it's my code it's obviously useless. if it's a bug in a library i'm using, i contact the creator of the library or take a look at its source code. what's your usecase?

0

Yes it is a stupid question

The first thing most people do when there is an exception from a library is to search online to see if anybody else has had that error before and what the solution was.
I'm positive that library creators would get pretty peeved pretty quickly if they were contacted everytime someone using their libray got an exception...

Simple case:
What does this mean?

Exception in thread "MyConnector - Messenger : MyMessenger - Thread id : 11" java.security.AccessControlException: access denied (java.io.FilePermission D:\test.txt read)
     at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
     at java.security.AccessController.checkPermission(AccessController.java:546)
     at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
     at java.lang.SecurityManager.checkRead(SecurityManager.java:871)
     at java.io.File.exists(File.java:731)
     at com.my.internal.package.MyConnector.validateDirectory(MyConnector.java:196)
     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
     at java.lang.Thread.run(Thread.java:619)


Search online and you find that is a Tomcat policy issue
http://www.mkyong.com/tomcat/tomcat-javasecurityaccesscontrolexception-access-denied-loggingproperties-read/

0

Maxim marked it Obsolete by ironically referring to an Obsolete plugin as a solution! :)

Can we reopen it and get it added in the IDEA X builds?

0

There are some script plugins for IDEA
I recommend PMIP - ruby plugin

here is sample script on PMIP

class SearchGoogle < PMIPAction
  def run(event, context)
    current_editor = context.current_editor
    selected_text = current_editor.selection

    url = "http://google.com#q=" + selected_text
    Browser.new.open(url)

    result 'OK'
  end

end

bind 'ctrl 2', SearchGoogle.new
0

Thanks for the suggestion.
Unfortunately that script does not work
context.current_editor is not valid

The other problem is that you end up with a pmip directory in all of your projects and you also have to install some core scripts that don't come with the plugin into each of these directories too.

0

Unfortunately that script does not work
context.current_editor is not valid

oh, that's probably because you use old version of core plugin
I use latest version from trunk (downloaded with svn from code.google.com)

The other problem is that you end up with a pmip directory in all of your projects and you also have to install some core scripts that don't come with the plugin into each of these directories too.

I use separate folder for core and mine plugins
and then in all of my projects in pmip directory i have one file with one line: load c:\blabla\my.rb

0

starting with IDEA 10.0.2 you can create external tool for selected text


Name: search in google
Menu: Editor menu
Program: cmd
Parameters:  /C start "" http://google.com#q=$SelectedText$


in Keymap you can assign shortkey for this action

0

We need this backlog item fixed first so that we can add external tools to the debug output.
http://youtrack.jetbrains.net/issue/IDEABKL-3656

0

Please sign in to leave a comment.