/plugins/Tags/tags/tags-rel-1-0-6/Tags.html

# · HTML · 353 lines · 298 code · 55 blank · 0 comment · 0 complexity · 002c8f38f68b41b53415a7457557642e MD5 · raw file

  1. <html>
  2. <head>
  3. <title>Tags plugin</title>
  4. </head>
  5. <body bgcolor="#FFFFFF">
  6. <table
  7. bgcolor="#CCCCFF"
  8. border="0"
  9. cellspacing="0"
  10. cellpadding="3"
  11. width="100%"
  12. summary="Tags page header"
  13. >
  14. <tr width="100%">
  15. <td><big><big>Tags plugin</big></big></td>
  16. <td align="right"><small>By Kenrick Drew<br>
  17. <em>kdrew@earthlink.net</em></small></td></tr>
  18. </table>
  19. <ul>
  20. <li><a href="#introduction">Introduction</a></li>
  21. <li><a href="#creating_tag_files">Creating Tag Index Files</a></li>
  22. <li><a href="#usage">Usage</a></li>
  23. <ul>
  24. <li><a href="#tagging">Tag jumping</a></li>
  25. <li><a href="#tag_stack">The tag stack</a></li>
  26. <li><a href="#tag_collisions">Tag collisions</a></li>
  27. </ul>
  28. <li><a href="#config">Configuration</a></li>
  29. <li><a href="#shortcuts">Suggested Keyboard shortcuts and UI</a></li>
  30. <li><a href="#finding">Where to find the ctags program</a></li>
  31. <li><a href="#lincense">Lincense</a></li>
  32. <li><a href="#bugs">Known Bugs/Limitations</a></li>
  33. <li><a href="#todo">Future Directions</a></li>
  34. <li><a href="#feedback">Feedback</a></li>
  35. <li><a href="#credits">Credits</a></li>
  36. <li><a href="#changelog">Changelog</a></li>
  37. </ul>
  38. <h2><a name="introduction">Introduction</a></h2>
  39. <p>
  40. The Tags plugin allows a user to jump to the definition of a specific language
  41. object or "tag" using tag index files. For example, in C programs, the user can
  42. immediatly jump to the definition of a desired function or data structure
  43. without having to know where or what file it is defined. Tag jumping can be
  44. accomplished by either selecting the desired tag, placing the cursor on the
  45. tag, or entering the tag.
  46. </p>
  47. <p>
  48. The tag index files are created by the "<a href="#finding">ctags</a>" program
  49. of which there are several versions. ctags can be found on most UNIX systems.
  50. The Exuberant C Tags program has both UNIX and Windows versions.
  51. </p>
  52. <h2><a name="creating_tag_files">Creating Tag Index Files</a></h2>
  53. <p>
  54. Without tag index files the Tags plugin is useless. Well, not necessarily
  55. useless; it will let you know it can't find or jump to anything which can be of
  56. some use. Tag files are created with the ctags program.
  57. </p>
  58. <p>
  59. For more extensive help on the ctags program see the documentation that comes
  60. with your distribution (man pages, readme files). But, in general you can
  61. create tag index files with the Exuberant C Tag commands:
  62. </p>
  63. <pre>
  64. ctags * create a tag file in the current directory for all recognized
  65. source files
  66. ctags -R create a tag file in the current directory for all files in
  67. an entire source directory tree.
  68. </pre>
  69. <p>
  70. Please note that the tag index files list definition file names based on path
  71. that you pass to the ctags program. If you don't pass the full path of the
  72. files to ctags, the definition file names listed in the tag index file will be
  73. relative to the current directory. If this is not desired you can pass $cwd or
  74. `pwd` to ctags:
  75. </p>
  76. <pre>
  77. ctags $cwd/*
  78. ctags -R $cwd
  79. </pre>
  80. <p>
  81. Tag index files are search using a binary search, so tag index files must be
  82. sorted.
  83. </p>
  84. <h2><a name="usage">Usage</a></h2>
  85. <h3><a name="tagging">Tag jumping</a></h3>
  86. <p>
  87. There are 2 ways to jump to a desired tag:
  88. <ol>
  89. <li>Place the cursor on or select the desired tag. From the Plugins > Tags
  90. menu use "Follow Tag". "Follow Tag (New View)" will jump to a tag
  91. in a new view.</li>
  92. <li>From the Plugins > Tags menu use "Follow Tag..." which will prompt you for
  93. the desired tag. The "Open new view" checkbox will jump to the entered tag in
  94. an new view.</li>
  95. </ol>
  96. </p>
  97. <h3><a name="tag_stack">The tag stack</a></h3>
  98. <p>
  99. Once you have jumped to a tag, your previous position is remembered with the
  100. tag stack. You can return to your previous position from the Plugins > Tags
  101. menu using "Pop Tag". Currently the stack is a global stack.
  102. </p>
  103. <h3><a name="tag_collisions">Tag collisions</a></h3>
  104. <p> A tag collision can occur when there is more than one defintion for a
  105. specific tag as defined in the tag index files. This especially occurs on
  106. object oriented programming languages, and local projects where you are using a
  107. global system tag index file along with a local tag index file. To easily
  108. facilitate tag collisions, if more than one tag is found in the tag index
  109. files, you are presented, located under the cursor, a list of choices.
  110. Differentation between the tags is currently only done by tag defintion file
  111. names. You can select the desired tag by either using the mouse, keyboard arrow
  112. keys or number keys (1 - 9 only). The tag collision list can be dismissed with
  113. the Escape (Esc) key. </p>
  114. <h2><a name="config">Configuration</a></h2>
  115. <p>The Tags plugin can be configured under the Plugin Options node of the Global
  116. Options dialog.</p>
  117. <p>Search tag file in current buffer's directory: Check this option if
  118. you want the tag search to start with the tag index file (./tags) in the
  119. buffer's directory. The tag index file doesn't need to be in the tag index
  120. search file list. If it is it will be skipped.</p>
  121. <p>Tag index file name: If you have configured Tags to use the tag index file
  122. in the current buffer's directory you can change the file named that the plugin
  123. looks for. The default is "tags".</p>
  124. <p>If tag match is found continue searching subsequent tag index files: By
  125. default, the first matching tag (or groups of tags if
  126. a tag collision occurs) found will stop the search. Using this option will
  127. allow all tag files to be searched.</p>
  128. <p>Tag search files (in order of search): Add tag index files that should be
  129. searched to this list. The order of the list is the search order.</p>
  130. <h2><a name="shortcuts">Suggested Keyboard shortcuts and UI</a></h2>
  131. <p>Here are some suggested key bindings. These do stomp on some JEdit key
  132. bindings, but I find that they work well. They are based on the vi (and it's
  133. clones) key bindings for tagging.</p>
  134. <pre>
  135. Follow Tag: Ctrl + ]
  136. Follow Tag (New View): Ctrl + SHIFT + ]
  137. Follow Tag...: Alt + ]
  138. Pop Tag: Ctrl + T
  139. </pre>
  140. <p>Keyboard shortcuts can be defined under the Shortcuts node of the Global
  141. Options dialog.</p>
  142. <p>Also one can place the tagging commands in the Context Menu. Context menu
  143. items can be defined under the Context Menu node of the Global Options dialog.
  144. </p>
  145. <h2><a name="finding">Where to find the ctags program</a></h2>
  146. <p>You can find the Exuberant C Tags program at:</p>
  147. <pre>
  148. <a href="http://ctags.sourceforge.net">http://ctags.sourceforge.net</a>
  149. </pre>
  150. <p>Exuberant C Tags is also included in the
  151. <a href="http://sources.redhat.com/cygwin/">cygwin</a> distribution for
  152. Windows. I highly recommend cygwin.</p>
  153. <p>You can also use the standard UNIX ctags program, or the GNU C Tags program,
  154. but you'll find that Exuberant C Tags provides a bit more info (or too much
  155. depending on how much of a minimalist you are).</p>
  156. <h2><a name="lincense">Lincense</a></h2>
  157. <p>
  158. The source code is distributed under the GPL. Please see
  159. <a href="http://www.fsf.org/copyleft/gpl.html">http://www.fsf.org/copyleft/gpl.html</a>
  160. </p>
  161. <h2><a name="bugs">Known Bugs/Limitations</a></h2>
  162. <ul>
  163. <li>Has only been tested in C and Java.</li>
  164. <li>Tag files *MUST* be sorted. Else, the tag will probably never be found b/c we
  165. are using a binary searching mechanism.</li>
  166. <li>Bachward searching patterns (?...?) are not supported.</li>
  167. </ul>
  168. <h2><a name="todo">Future Directions</a></h2>
  169. <p>
  170. See <a href="./TODO.TXT">TODO.TXT</a>
  171. </p>
  172. <h2><a name="feedback">Feedback</a></h2>
  173. <p>
  174. The preferred way to send bug reports or feature requests is to use the
  175. Sourceforge Bug Tracker at
  176. <a href="http://sourceforge.net/bugs/?group_id=588">http://sourceforge.net/bugs/?group_id=588</a>.
  177. </p>
  178. <p>You can also write to:</p>
  179. <ul>
  180. <li>jEdit-users mailing-list <em>&lt;jedit-users@lists.sourceforge.net&gt;</em>;</li>
  181. <li>jEdit-devel mailing.list <em>&lt;jedit-devel@lists.sourceforge.net&gt;</em>.</li>
  182. </ul>
  183. <h2><a name="credits">Credits</a></h2>
  184. <ul>
  185. <li>Vim reference manual (Bram Moolenaar)</li>
  186. <li>Exuberant C Tags man page (Darren Hiebert)</li>
  187. </ul>
  188. <h2><a name="changelog">Changelog</a></h2>
  189. <ul>
  190. <li>Version 1.0.6, bug fixes (Feb 2002)</li>
  191. <ul>
  192. <li>Fixed bug where the escape character '\' was showing up in the user
  193. visible search string.</li>
  194. <li>Used JEditTextArea.offsetToXY() to position popup within folded, and
  195. wrapped text.</li>
  196. <li>Requires java 1.3<\li>
  197. <li>Requires JEdit 4.0<\li>
  198. </ul>
  199. <li>Version 1.0.3, update (Nov 2001)</li>
  200. <ul>
  201. <li>Replaced Macros.error with GUIUtilities.error.</li>
  202. </ul>
  203. <li>Version 1.0.2, bug fixes (Nov 2001)</li>
  204. <ul>
  205. <li>Fixed bug where if you removed tag index files from the search the code
  206. would remember the later entries.</li>
  207. <li>Fixed bug where searching for tag search string in file was using the
  208. search file set.</li>
  209. <li>Fixed bug in option panel where changes to the list of tag index files
  210. were always committed even if you pressed "Cancel".</li>
  211. <li>Fixed exuberant tag info display when mixed tag files are used.</li>
  212. <li>Removed directions from COPYING.</li>
  213. <li>Added some initial user hidden development code.</li>
  214. </ul>
  215. <li>Version 1.0.1, bug fixes (Nov 2001)</li>
  216. <ul>
  217. <li>Fixed bug where if you added a new tag file, then moved that file in
  218. the list, a null exception occured during tagging.</li>
  219. <li>If tag collision popup is wider than the screen, place it flush to the
  220. left side of the screen</li>
  221. <li>Ability to have commas in tag index file path names</li>
  222. </ul>
  223. <li>Version 1.0, Initial public release (Oct 2001)</li>
  224. <ul>
  225. <li>Made Enter Tag dialog a stand alone dialog (no JOptionPane).</li>
  226. <li>Moved enter event into KeyPressed() in enter tag dialog.</li>
  227. <li>Added the display of exuberant info from the tag indx file.</li>
  228. <li>Reverted back to platform independent Monospaced font for tag collision list.</li>
  229. </ul>
  230. <li>Version 0.9.2 (Oct 2001)</li>
  231. <ul>
  232. <li>Listen for ENTER in Enter Tag dialog.</li>
  233. <li>Use KeyEventWorkaround.processKeyEvent() in key listener.</li>
  234. <li>Removed display of wait cursor when opening tag definition file.</li>
  235. </ul>
  236. <li>Version 0.9.1 (Oct 2001)</li>
  237. <ul>
  238. <li>Removed Tags.displayMessage in favor of org.gjt.sp.util.Log.log()</li>
  239. <li>Used ^ and $ from tag index file when searching (regexp)</li>
  240. <li>Fixed bug where search string wasn't complete</li>
  241. <li>Fixed off by 1 bug when tag index file uses line numbers</li>
  242. </ul>
  243. <li>Version 0.9 (Oct 2001)</li>
  244. <ul>
  245. <li>Scroll pane for collision dialog.</li>
  246. <li>Added public Tags.pushPosition()</li>
  247. <li>Better display tag information collision list.</li>
  248. <li>Fixed bugs introduced in 0.7.3.</li>
  249. <li>Display tag line numbers in collision list when search string is a line
  250. number.</li>
  251. <li>Changed font of collision list from "Monospaced" to "Courier New".</li>
  252. <li>Removed public use of tag catagories.</li>
  253. <li>Fixed Enter Tag dialog focus issue.</li>
  254. <li>Only display 1 - 9 in collision list.</li>
  255. <li>Resolve relative tag defintion files before possible use of tag collision
  256. list.</li>
  257. </ul>
  258. <li>Version 0.7.3 (Oct 2001)</li>
  259. <ul>
  260. <li>Ability to use number keys with the tag collision popup.</li>
  261. <li>Fixed relative tag defintion file name path problem.</li>
  262. <li>Fixed problem when tagging from command line.</li>
  263. <li>Fixed infinite loop problem when backtracking to beginning of first
  264. line in tag index file.</li>
  265. <li>Fixed crash when tag is on last line of tag index file.</li>
  266. <li>Made Java 1.1 compatible</li>
  267. </ul>
  268. <li>Version 0.7.2 (Oct 2001)</li>
  269. <ul>
  270. <li>Added the ability to specify the tag index file name, when using the
  271. tag index file in the current buffer's directory.</li>
  272. <li>Added error message when tag defintion file does not exist</li>
  273. <li>Updated HTML Documentaiton.</li>
  274. </ul>
  275. <li>Version 0.7.1 (Oct 2001)</li>
  276. <ul>
  277. <li>Updated HTML Documentaiton.</li>
  278. <li>Updated labels and property strings.</li>
  279. <li>Let user know if no tag index files have been specified.</li>
  280. <li>Removed tag index file type specification.</li>
  281. <li>Removed some unneeded code.</li>
  282. </ul>
  283. <li>Version 0.7 (Oct 2001)</li>
  284. <ul>
  285. <li>HTML Documentaiton</li>
  286. <li>Use AbstractOptionPane for Global Options dialog</li>
  287. </ul>
  288. <li>Version 0.5 (Oct 2001)</li>
  289. <ul>
  290. <li>??</li>
  291. </ul>
  292. <li>Version 0.3 (Sep 2001)</li>
  293. <ul>
  294. <li>Initial beta release</li>
  295. </ul>
  296. </ul>
  297. </body>
  298. </html>