Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

[592ce8]: index.html Maximize Restore History

Download this file

index.html    54 lines (53 with data), 2.9 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<html>
<title>CodeHelper</title>
<body>
<h1>The CodeHelper plugin</h1>
Written by Shlomy Reinstein, November 2010.
<h2>Introduction</h2>
<p>
The CodeHelper plugin provides a dockable window that shows either a static call
tree of a selected function, or a reference tree of a selected identifier. The tree
shows the functions calling / referring to the identifier, and each such caller node
can be expanded to see its own callers. When you select a caller, the actual calls from
it are shown in a list on the right - clicking each item in the list opens the buffer
containing the call and jumps to its location in the buffer.
</p>
<p>
CodeHelper works in the context of a <b>ProjectViewer</b> project. It finds
callers / references only in the current project. CodeHelper relies on two
other plugins to provide it with the information it needs: <b>CtagsInterface</b> and
<b>LucenePlugin</b>. To show a static call tree, it first searches the Lucene index
of the current project for all occurrences of the function name. It invisibly opens
each of the files containing occurrences of the function name in jEdit, and uses
jEdit syntax highlighting to filter out occurrences inside comments and strings. Then,
it uses CtagsInterface to find the closest function above the occurrence line
as a caller. It also uses CtagsInterface to filter out function prototypes.
Finally, it presents the callers in a tree. Clicking each caller shows the calls from
it on the right of the dockable. Expanding a caller will cause the same algorithm to
run on the caller's name, to find all its callers.
</p>
<h2>Prerequisites</h2>
CodeHelper requires <b>CtagsInterface</b>, <b>LucenePlugin</b> and
<b>ProjectViewer</b>. Moreover, it does *not* create a Lucene index and a tag index on
its own; it requires that these already exist when you use its actions (static call
tree / reference tree). To allow CodeHelper to work for a project, do the following:
<ol>
<li>Switch to the project in ProjectViewer.
<li>Right click the project and select <b>Add project to tag index</b>.
<li>Right click the project and select <b>Create Lucene index for project</b>.
<li>Wait until the tag index and Lucene index are ready, and then you can start using
CodeHelper for the project.
</ol>
<h2>Notes</h2>
This plugin is mainly useful for computer languages where names are global and unique.
It is not so useful for object oriented languages - such as C++ and Java - where a
program can define many functions with the same name (but in a different namespace /
class). For example, in Java, if you try to look for callers of "actionPerformed",
you will get the list of all callers of all functions with this name, no matter which
class they are.
<h2>Feedback</h2>
</a>
Any feedback would be most welcome. Please send your feedback to the <b>jedit-users</b>
or <b>jedit-devel</b> mailing list.
</body>
</html>