简体   繁体   中英

Extending Eclipse JDT

I'm trying to write a plugin that will alter (more like add) functionality of the current eclipse java debugger. For details of what I am trying to accomplish, you can see this thread: Writing a custom eclipse debugger . I'm making a new question to address some confusion over specifics of how eclipse plugins work.

So if I wanted to adjust the debugger (or any part of JDT), it is to my understanding that what allows this to happen via plugins are what are known as extension points, basically points that grant access for extending functionality and control what you can or cannot do to an extent. My first question is, is this a correct understanding of the concept, and if so how do you find these extension points (and ultimately is it a good starting point to my specific debugging problem)?

My second question is specifically regarding the debugger, if I wanted to some how pull data from the debugger (like variable/stackframe information, basically information its displaying out to the user) and use it in my own plugin, is this possible/how would you begin to approach it (is this a matter of extension points)?

I've looked through the eclipse debugger source code, and I have a general idea of whats going on in the debugging process, but how do I get my plugin to communicate/pull data that the debugger itself is receiving in the debugging process?

BTW if anyone can answer some of these questions, especially ones pertaining to my specific problem, feel free to post in the other thread as there is still an open +200 bounty and the questions here can perhaps help answer the more broad question that is posted there.

Thank you very much for any help.

You are right about the extension concept: an existing plug-in might provide an extension point - a place where it expects other plug-ins to contribute functionality.

In case of Debug plug-ins you can use the static methods of the org.eclipse.debug.ui.DebugUITools; class: the getDebugContext() method returns the currently active debug context, and the getDebugContextManager() service adds support for listening to context changes. We have a plug-in implemented like that: it listens to Debug Context changes, and visualizes the current variables in a Zest graph. The context information is gathered around line 183 in the file http://code.google.com/a/eclipselabs.org/p/debugvisualisation/source/browse/hu.cubussapiens.debugvisualisation/src/hu/cubussapiens/debugvisualisation/views/DebugVisualisationView.java Might worth taking a look.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM