Reputation: 1144
I have an Eclipse RCP application that has been started from the Eclipse IDE in debug mode. I've created a simple SWT TreeViewer
control in the RCP
application for presenting the cause chain and stack trace of a Throwable. What I'd like is that if a developer double-clicks a StackTraceElement
in the viewer then the 'host' Eclipse IDE will open the appropriate file at the right line number.
The best workaround I have so far is that I can print the StackTraceElement
to the Console (of the IDE), and then click on the (filename.java:linenumber) to open the file that way.
My question comes in two parts:
I know I could write a plugin for use in the IDE, and then I could communicate with it over a socket or something like that. I'm more interested in discovering any built-in functionality I can use.
Upvotes: 0
Views: 256
Reputation: 10646
If what you describe as RCP would instead be a separate plugin running in the host IDE, then the communication would be very simple and part of the Eclipse functionality. But what you describe is communication between two java processes, and thats a different thing. There are ways of course, google "java interprocess communication", but off the top of my head I cant think of anything simple and easy. I dont know how much extra work you would like to do just for making debugging your app easier.
You might wanna have a look at remote debugging aswell. That will allow you to run your RCP app separately from Eclipse and still be able to debug. See this questions for more info
Upvotes: 1