Context Viewer provides relevant information while you are viewing
and editing your source code.
Recently I have been playing with the product called Source Insight.
This is very nice product that supports several languages including
Java. Its major feature is very strong support of C++, but it
doesn't come even close to what IDEA does for Java. One feature of
this product though that I realy like is the context window. So I
decided to provide something like that for IDEA.
"In case the description wasn't clear enough to everyone, here's my
description of it: when you click on a method name, it will show the
implementation of that method (i.e., the code) in the "Context Viewer"
window. When you click on a variable name, it will show the declaration of the variable."
Thanks to Erik Hanson for the description.
The plugin uses PSI API which has not been officially released yet!
Open Context Viewer tool window and put your cursor on any usage of
variables or methods in your project. The context window will search
for the definition of the variable or method in the context.
- Added keyboard shortcut to display Context Viewer,
Ctrl-Alt-D by default.
- Bugfixes.
- Fixed comment highlighting problem. Caveat: Colors used to highlight the source code in the context window are hardcoded, so if you modify your color scheme, you will see different highlighting. Unfortunately, there is no way to access current color scheme and creating a viewer doesn't automatically highlight all structure elements.
- Fixed NPE on closing IDEA.
- When in the Context Viewer, you can press
Enter to open an editor to edit the context source.
- Finally, it is possible to configure the plugin through UI. This plugin is a project component so you have to go to the project properties to configure it.
- Class name of the current context is being displayed on the title of the context tool window.
- Fixed incorrect scrolling to the context. This is the third time I'm trying to fix this problem. I hope this is the last time too.
- Added decompilation feature. I'm not sure about usefulness of this feature, mostly because it is very awkward to configure. Personally, I need it only once in a while. First off, you have to go to the plugin options and specify the directory where you want your decompiled classes to be stored. This directory must be one of source directories of your project. Note that this is a limitation/feature of the IDEA, not a plugin, since if you want to view or edit a java source file, the file must be in one of the source directories. Unfortunately, there's no published way to add(temporary add) a directory to the project, so you have to do it yourself. Also I'd recommend to add this directory to the compiler's ignore list. Well, that's all. Just point your cursor to any class for which you don't have a source file and you'll be asked whether you want to decompile it.
- Minor bugfixes.
- Added "show line numbers" option.
- Small performance optimization.
- If a java class is the current context, the title displays the name of the file this class is in.
- Added new keystroke: If in the context viewer you want to go back to the current editor window, just press
Backspace.
-- KeshSibilev - 29 Jan 2003
- New icons, thanks to Amnon I. Govrin.
-- KeshSibilev - 30 Jan 2003
- The plugin is ported to Aurora. It has been tested only with build 828.
-- KeshSibilev - 13 Jun 2003
Related Topics: PluginDocumentation, ProjectPluginTemplate, OpenAPI, IntellijPluginDocumentation,
IntellijPluginDocumentation, PluginDeployment, IdeasForPlugins
|
|