PageRenderTime 41ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/plugins/CodeBrowser/tags/start/users-guide.html

#
HTML | 133 lines | 132 code | 1 blank | 0 comment | 0 complexity | ba4b03041ec8d06114d343bd1ce2b0ff MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
  1. <html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Code Browser plugin</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="book"><div class="titlepage"><div><h1 class="title"><a name="id789148"></a>Code Browser plugin</h1></div><div><div class="authorgroup"><div class="author"><h3 class="author">Gerd Knops</h3></div></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><ul><li>1. <a href="#Description">Description</a></li><li>2. <a href="#BufferSwitcher">The Buffer Switcher</a></li><li>3. <a href="#CodeBrowser">The Code Browser</a></li><li>4. <a href="#OtherLanguages">Code Browser and Languages/File types not supported by ctags</a></li><li>5. <a href="#XmlAndHtml">Simple support for XML and HTML</a></li><li>6. <a href="#Ant">Simple support for Ant build.xml files</a></li><li>7. <a href="#faq">Frequently Asked Questions</a></li><li>8. <a href="#license">License</a></li><li>9. <a href="#disclaimer">Disclaimer</a></li><li>10. <a href="#feedback">Feedback</a></li><li>A. <a href="#changelog">Change log</a></li></ul></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="Description"></a>Chapter 1. Description</h2></div></div><p>
  2. The Code Browser plugin contains a buffer switcher and a code browser within
  3. a split pane. The buffer switcher can be hidden by moving the divider all
  4. the way up, or by clicking the small up-handle. The code browser simplifies
  5. navigating source code of any programming language supported by the
  6. Exuberant C Tags program.
  7. </p></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="BufferSwitcher"></a>Chapter 2. The Buffer Switcher</h2></div></div><p>
  8. The buffer switcher displays the file name of each buffer, and as much of the
  9. <span class="emphasis"><em>end</em></span> of each path as can be fit. The selcted buffer is
  10. shown in bold. The file name colors are taken from the File System Browser
  11. (See <b>Global Options</b>&gt;<b>File System
  12. Browser</b>&gt;<b>Colors</b>). The path of
  13. 'dirty' buffers
  14. is displayed in in dark red, others in dark gray. Operation of the buffer switcher
  15. is straight forward: A mouse click selects a buffer, and a control-click
  16. closes a buffer. While the mouse is ofer a buffer switcher entry a tooltip
  17. shows the entire path for this entry.
  18. </p></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="CodeBrowser"></a>Chapter 3. The Code Browser</h2></div></div><p>
  19. The code browser requires Exuberant C Tags version 5.5 or later. You can find
  20. it at <a href="http://ctags.sourceforge.net" target="_top">http://ctags.sourceforge.net</a>.
  21. NOTE: The standard ctags program found on many systems is NOT sufficient!!!
  22. </p><p>
  23. The path of the <b>ctags</b> program needs to be
  24. set in the Plugin Options for the Code Browser plugin. A typical choice on
  25. Unix-like systems is <tt>/usr/local/bin/ctags</tt>, and on windows
  26. systems <tt>c:\Apps\ctags51\ctags.exe</tt>.
  27. </p><p>
  28. Once the <b>ctags</b> path is set, the code browser plugin will parse a file whenever
  29. a buffer displaying the file is selected, or when the current buffer is saved.
  30. Please note that only the file on disk is parsed, not the in-memory contents
  31. of the buffer.
  32. </p><p>
  33. Simply click on any function, variable declaration etc. displayed in the
  34. code browser, and the buffer will be positioned accordingly. As regular
  35. expressions are used, code browser will be able to find definitions even
  36. in modified files as long as the line on which the definition occured was
  37. not changed. Tooltips show the contents of the line, which depending on
  38. language and style may include more information.
  39. </p><p>
  40. Right-clicking on any function, variable declaration etc. will bring up a context menu with these choices:
  41. </p><div class="itemizedlist"><ul type="disc"><li><b>Insert at Caret</b>: Inserts the selected term in the current text view</li><li><b>Hypersearch</b>: Perform a hypersearch with this term</li><li><b>Copy to pasteboard</b>: Copies the selected term to the paste board</li><li><b>Append to pasteboard</b>: Appends the selected term to the pasteboard</li></ul></div><p>
  42. </p><p>
  43. The <b>Options</b> menu button above the Code Browser section
  44. lets you select a few options:
  45. </p><div class="itemizedlist"><ul type="disc"><li><b>Auto-parse</b>: When checked, buffers are parsed automatically when saved or when you switch to another buffer. When un-checked, buffers will only be parsed when you click on the <b>Parse</b> button. That can be helpful when you work with extremely large files, where parsing requires some time</li><li><b>Sort</b>: When checked, all listed tags will be sorted</li><li><b>Auto-unfold</b>: When checked, any section in the code you jump to will be unfolded automatically</li><li><b>Auto-close dock</b>: After selecting a tag the dock is automatically closed</li></ul></div><p>
  46. </p></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="OtherLanguages"></a>Chapter 4. Code Browser and Languages/File types not supported by ctags</h2></div></div><p>
  47. The <b>ctags</b> program supports many languages, but chances are you might
  48. work with a language or file type not supported by <b>ctags</b>. While support
  49. built into <b>ctags</b> is the most elegant solution, you can also create some
  50. simple regular expression based support for languages not directly
  51. supported by <b>ctags</b>.
  52. </p><p>
  53. The following chapter gives some examples. The lines shown need to be added
  54. to one of the files <b>ctags</b> reads during startup. On unix-like systems that
  55. could be <tt>~/.ctags</tt>, and on windows systems that could be a
  56. file <tt>ctags.cnf</tt> in the jEdit directory. Please read the
  57. ctags documentation for more info.
  58. </p></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="XmlAndHtml"></a>Chapter 5. Simple support for XML and HTML</h2></div></div><p>
  59. Here is an example for contents of the <b>ctags</b> configuration file mentioned
  60. in the previous chapter. The example add simple support for XML files and
  61. HTML files (note that HTML is now supported natively in ctags):
  62. </p><p>
  63. </p><table border="0" bgcolor="#E0E0E0"><tr><td><pre class="programlisting">
  64. --langdef=xml
  65. --langmap=xml:.xml
  66. --regex-xml=/&lt;([^ \t]+)[ \t]*(id|name)[ \t]*=[ \t]*\&quot;([^\&quot;]+)/\1 \3/Named Tags/i
  67. --langdef=html
  68. --langmap=html:.htm.html
  69. --regex-html=/&lt;a[ \t]+href[ \t]*=[ \t]*\&quot;([^\&quot;]+)/\1/HRefs/i
  70. --regex-html=/&lt;img[ \t]+src[ \t]*=[ \t]*\&quot;([^\&quot;]+)/\1/Images/i
  71. --regex-html=/&lt;h([1-6])[^&gt;]*&gt;([^&lt;]*)/\2 (\1)/Headers/i
  72. </pre></td></tr></table><p>
  73. </p><p>
  74. The <b>--langdef</b> lines define the name of the language, the
  75. <b>--langmap</b> lines define the extensions of files for this
  76. language, and the <b>--regex-html</b> lines define the regular
  77. expressions describing the items of a language you want to see in Code
  78. Browser. For more info please see the <b>ctags</b> documentation.
  79. </p></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="Ant"></a>Chapter 6. Simple support for Ant build.xml files</h2></div></div><p>
  80. <tt>build.xml</tt> files would normally be governed by the
  81. xml entries listed in the previous chapter. <b>ctags</b> does
  82. not allow one entry for <tt>*.xml</tt> and another for
  83. <tt>build.xml</tt>. Code Browser helps out here; Code Browser
  84. forces the language used by ctags to <b>ant</b> when
  85. the file to be parsed is named <tt>build.xml</tt>.
  86. </p><p>
  87. </p><table border="0" bgcolor="#E0E0E0"><tr><td><pre class="programlisting">
  88. --langdef=ant
  89. --regex-ant=/&lt;property[ \t]*name[ \t]*=[ \t]*\&quot;([^\&quot;]+)/\1/Properties/i
  90. --regex-ant=/&lt;target[ \t]*name[ \t]*=[ \t]*\&quot;([^\&quot;]+)/\1/Targets/i
  91. --regex-ant=/&lt;path[ \t]*id[ \t]*=[ \t]*\&quot;([^\&quot;]+)/\1/Paths/i
  92. --regex-ant=/&lt;taskdef[ \t]*id[ \t]*=[ \t]*\&quot;([^\&quot;]+)/\1/Taskdefs/i
  93. --regex-ant=/&lt;typedef[ \t]*id[ \t]*=[ \t]*\&quot;([^\&quot;]+)/\1/Typedefs/i
  94. </pre></td></tr></table><p>
  95. </p></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="faq"></a>Chapter 7. Frequently Asked Questions</h2></div></div><p>
  96. Q: I am working on a (shell|perl|python|whatever) script, but CodeBrowser
  97. isn't showing anything.
  98. </p><p>
  99. A: Ctags parses files without extensions (like many scripts) only if the
  100. executable flag is set AND the magic #!/path/to/interpreter first line
  101. can be found. So make sure both those conitions are met, or add a known
  102. extension to the script.
  103. </p><p>
  104. Q: Is there support for ActionScript?
  105. </p><p>
  106. A: Check <a href="www.ubergeek.tv/jack/hack.php" target="_top">www.ubergeek.tv/jack/hack.php</a>
  107. </p></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="license"></a>Chapter 8. License</h2></div></div><p>
  108. Feel free to do with the files of this project whatever you want. If they
  109. make you filthy rich you should send some bucks my way though.
  110. </p></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="disclaimer"></a>Chapter 9. Disclaimer</h2></div></div><p>
  111. BITart and Gerd Knops make no warranties, representations or commitments
  112. with regard to the contents of this software. BITart and Gerd Knops
  113. specifically disclaim any and all warranties, wether express, implied or
  114. statutory, including, but not limited to, any warranty of merchantability
  115. or fitness for a particular purpose, and non-infringement. Under no
  116. circumstances will BITart or Gerd Knops be liable for loss of data,
  117. special, incidental or consequential damages out of the use of this
  118. software, even if those damages were forseeable, or BITart or Gerd Knops
  119. was informed of their potential.
  120. </p></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="feedback"></a>Chapter 10. Feedback</h2></div></div><p>You can write to:</p><div class="itemizedlist"><ul type="disc"><li>
  121. Gerd Knops <tt>&lt;<a href="mailto:gerti-codebrowser@bitart.com">gerti-codebrowser@bitart.com</a>&gt;</tt></li><li>
  122. The jEdit-users mailing-list
  123. <tt>&lt;<a href="mailto:jedit-users@lists.sourceforge.net">jedit-users@lists.sourceforge.net</a>&gt;</tt></li><li>
  124. The jEdit-devel mailing-list
  125. <tt>&lt;<a href="mailto:jedit-devel@lists.sourceforge.net">jedit-devel@lists.sourceforge.net</a>&gt;</tt></li></ul></div></div><div class="appendix"><div class="titlepage"><div><h2 class="title"><a name="changelog"></a>Appendix A. Change log</h2></div></div><p><b>Version 1.4.0. </b>Requires JDK 1.3, jEdit 4.1, ExuberantCtags 5.5. <div class="itemizedlist"><ul type="disc"><li>Behavior improved when multiple tags with identical names
  126. are found: if you select the n-th one, then CodeBrowser will
  127. jump to the n-th occurance in the code</li><li>New <b>Options</b> Menu</li><li>Moved <b>Sort</b> and <b>Auto</b>
  128. buttons into new <b>Options</b> Menu</li><li>New option <b>Auto-unfold</b>: When checked
  129. and you jump to a folded section of the code that section will be
  130. unfolded automatically</li><li>New option <b>Auto-close Dock</b>: When
  131. checked the dock will automatically close after a tag was
  132. selected</li><li>Cleaned up UI</li><li>Cleaned up code</li></ul></div></p><p><b>Version 1.3.1. </b>Requires JDK 1.3, jEdit 4.1, ExuberantCtags 5.5. <div class="itemizedlist"><ul type="disc"><li>Fixed so it works with jEdit 4.2</li></ul></div></p><p><b>Version 1.3.0. </b>Requires JDK 1.3, jEdit 4.1, ExuberantCtags 5.5. <div class="itemizedlist"><ul type="disc"><li>Compatible with all languages supported now or in future by ExuberantCtags</li><li>No longer requires internal tables to determine programming language</li><li>No longer requires internal tables to translate single letter 'kind' to description</li><li>Methods, functions etc. now listed with signature</li></ul></div></p><p><b>Version 1.2.1. </b>Requires JDK 1.3, jEdit 4. Code contributed by Rudi Widmann:<div class="itemizedlist"><ul type="disc"><li>Context menu for items in CodeBrowser</li></ul></div></p><p><b>Version 1.2.0. </b>Requires JDK 1.3, jEdit 4. Code contributed by Rudi Widmann:<div class="itemizedlist"><ul type="disc"><li>Manual parsing mode</li><li>Cache parse results</li><li>Do not parse when docked but not visible</li><li>Focus textarea after selecting element in parse tree</li></ul></div></p><p><b>Version 1.1.1. </b>Requires JDK 1.3, jEdit 4.<div class="itemizedlist"><ul type="disc"><li>Should now work with all kinds of remote files</li></ul></div></p><p><b>Version 1.1.0. </b>Requires JDK 1.3, jEdit 4.<div class="itemizedlist"><ul type="disc"><li>Added support for FTP plugin</li></ul></div></p><p><b>Version 1.0.0. </b>Requires JDK 1.3, jEdit 4.<div class="itemizedlist"><ul type="disc"><li>Minor bugfixes</li><li>First release to plugin central</li></ul></div></p><p><b>Version 0.9.2. </b>Requires JDK 1.3, jEdit 4.<div class="itemizedlist"><ul type="disc"><li>Improved documentation</li><li>Now handles multiple/split views better</li><li>BufferSwitcher now uses colors from File System Browser</li></ul></div></p><p><b>Version 0.9.1. </b>Requires JDK 1.3, jEdit 4.<div class="itemizedlist"><ul type="disc"><li>Regex bugfix</li></ul></div></p><p><b>Version 0.9.0. </b>Requires JDK 1.3, jEdit 4.<div class="itemizedlist"><ul type="disc"><li>First beta test version</li></ul></div></p></div></div></body></html>