/plugins/ProjectViewer/tags/pv_2_1_3_4/docs/users-guide.xml

# · XML · 881 lines · 773 code · 104 blank · 4 comment · 0 complexity · f69e16eff4f070cd1a6cd2c49b8eff89 MD5 · raw file

  1. <?xml version="1.0"?>
  2. <!-- ProjectViewer plugin user's guide -->
  3. <!-- (C) 2001,2002,2003 Marcelo Vanzin, Stefan Kost -->
  4. <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  5. "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
  6. <!-- jEdit buffer-local properties: -->
  7. <!-- :indentSize=2:noTabs=true:folding=sidekick: -->
  8. <book>
  9. <bookinfo>
  10. <title>ProjectViewer plugin</title>
  11. <authorgroup>
  12. <author><firstname>Dale</firstname><surname>Anson</surname></author>
  13. <author><firstname>Kevin</firstname><surname>Burton</surname></author>
  14. <author><firstname>Stefan</firstname><surname>Kost</surname></author>
  15. <author><firstname>Matthew</firstname><surname>Payne</surname></author>
  16. <author><firstname>Marcelo</firstname><surname>Vanzin</surname></author>
  17. <author><firstname>Calvin</firstname><surname>Yu</surname></author>
  18. </authorgroup>
  19. <legalnotice>
  20. <title>Legal Notice</title>
  21. <para>
  22. Permission is granted to copy, distribute and/or modify
  23. this document under the terms of the GNU Free
  24. Documentation License, Version 1.1 or any later version
  25. published by the Free Software Foundation; with no
  26. <quote>Invariant Sections</quote>,
  27. <quote>Front-Cover Texts</quote> or
  28. <quote>Back-Cover Texts</quote>,
  29. each as defined in the license.
  30. A copy of the license can be found in the file
  31. <filename>COPYING.DOC.txt</filename> included with jEdit.
  32. </para>
  33. </legalnotice>
  34. </bookinfo>
  35. <chapter id="presentation">
  36. <title>Presentation</title>
  37. <para>
  38. The ProjectViewer plugin allows to define groups of files as
  39. projects.
  40. </para>
  41. <bridgehead renderas='sect3'>What is a project?</bridgehead>
  42. <para>
  43. A project is a group of files. It has a name, a root
  44. directory, and an optional URL Root, along with other
  45. options that can be made available by other plugins.
  46. </para>
  47. <para>
  48. In this version of Project Viewer, the files in a project
  49. are not restricted to the project root: any file can be
  50. added to the project (or to any directory in the project),
  51. allowing you to organize your files however you find most
  52. convenient, independently of the file system layout. The
  53. project root and the files and directories below it have a
  54. special treatment not given to others, though.
  55. </para>
  56. <para>
  57. If a project is intented for website development, setting
  58. the URL Root will enable project files to be launched in a
  59. web browser. Suppose the project "Root" also correlates to
  60. the URL "http://localhost/myproject/" currently running on a
  61. web server, launching the file "hello.jsp" will launch the
  62. web browser with the URL
  63. "http://localhost/myproject/hello.jsp", if the file is
  64. directly under the root.
  65. </para>
  66. <para>
  67. To create a project, click the "Add/Edit Project" button in
  68. the toolbar, or choose "Add new project" from under the
  69. desired group in the projects menu (accessible from jEdit's
  70. plugin menu of from the ProjectViewer toolbar).
  71. </para>
  72. </chapter>
  73. <chapter id="usage">
  74. <title>Using the ProjectViewer plugin</title>
  75. <para>
  76. The plugin interface consists of a tool bar, containing some
  77. command buttons, a menu containing the currently
  78. available projects (accessible through the button labeled
  79. with the current active node), and the project's views.
  80. </para>
  81. <para>
  82. To open a ProjectViewer window, you'll need to choose the
  83. "Open Project Viewer" action from the plugin's menu.
  84. Optionally, you can go to the Global Options dialog in
  85. jEdit, and dock the window in your favorite position (in the
  86. "Docking" tab). Note that activating a project or group
  87. using the plugin menu will not open a ProjectViewer window
  88. if one is not already opened.
  89. </para>
  90. <bridgehead renderas='sect3'>Organizing Your Projects</bridgehead>
  91. <para>
  92. Project Viewer allows you to organize your projects into
  93. groups. You can create as many groups as you with in an
  94. hierarchical manner, by using the "Add group here" command
  95. in the tree's context menu, or choosing the "New group here"
  96. entry from under the desired group in the projects menu.
  97. </para>
  98. <para>
  99. As with projects, it is possible to have groups as the root
  100. of the tree shown in the dockable window. For this, just
  101. choose a group from the projects menu to make it active.
  102. Some plugin functionality is not available when in this
  103. mode.
  104. </para>
  105. <para>
  106. You can also move projects and groups to other locations in
  107. your group hierarchy by using the "Move to..." command in
  108. the tree's context menu and choosing the desired destination
  109. from the displayed menu.
  110. </para>
  111. <bridgehead renderas="sect3">
  112. Switching projects with keyboard </bridgehead>
  113. <para> As you create more and more projects, you will want to be able to switch between them without using the mouse. ProjectViewer offers many keyboard-friendly ways of switching projects. </para>
  114. <orderedlist>
  115. <listitem><para> If you want to use standard Swing shortcuts and arrow keys to navigate through the Project tree, you should also bind ProjectViewer actions <guimenu>Select Parent Group</guimenu> and <guimenu>Open Group or Project</guimenu> to keyboard shortcuts (alt-up and alt-down suggested). While you are there, don't forget to bind a shortcut for ProjectViewer itself.
  116. </para> </listitem>
  117. <listitem><para>
  118. Each project and group gets its own "direct switch" action. You can bind these actions to keyboard shortcuts by selecting the <emphasis>ProjectViewer: Project Actions</emphasis> action set
  119. from the <guimenu>Global options -&gt; ShortCuts panel -&gt; Edit shortcuts:</guimenu> combobox.
  120. </para> </listitem>
  121. <listitem><para>
  122. The FastOpen plugin offers more convenient and/or mouse-free ways of switching between files and projects, and is an extension to ProjectViewer.
  123. </para> </listitem>
  124. </orderedlist>
  125. <bridgehead renderas='sect3'>The Project Views</bridgehead>
  126. <para>
  127. There are four possible views of the files on a project: the
  128. "Folders" view, which shows the files as if in a file
  129. manager, organised in directories. The "Files" view, which
  130. shows all the project's files in a flat list. The "Working
  131. Files", which shows the files currently opened in jEdit. And
  132. the "Compact View", which compresses subdirectories into
  133. top-level nodes, showing a structure similar to the java
  134. package naming.
  135. </para>
  136. <para>
  137. The files in the different views are colored according to
  138. the patterns and colors you have choosen for the
  139. filesystem-browser. Furthermore currently open files are
  140. highlighted by underlining their names.
  141. </para>
  142. <para>
  143. You can interact with the project tree in several ways:
  144. </para>
  145. <itemizedlist>
  146. <listitem>
  147. <para>
  148. Double clicking on a file will cause it to be opened in
  149. a jEdit buffer. If the file is already open, then
  150. ProjectViewer follows the FileSystemBrowser
  151. configuration option to decide whether to close it or
  152. not.
  153. </para>
  154. </listitem>
  155. <listitem>
  156. <para>
  157. Middle-clicking on a file does the same as
  158. double-clicking, except it will always close open files.
  159. </para>
  160. </listitem>
  161. <listitem>
  162. <para>
  163. The right mouse button shows a context menu with options
  164. related to the current selection on the tree, allowing
  165. you to remove files or directories from a project,
  166. deleting them from the disk, or rename them, among many
  167. other options.
  168. </para>
  169. </listitem>
  170. <listitem>
  171. <para>
  172. Dragging a file from the trees and dropping it on
  173. jEdit's text area will cause the file to be opened.
  174. </para>
  175. </listitem>
  176. </itemizedlist>
  177. <bridgehead renderas='sect3'>Importing Files</bridgehead>
  178. <para>
  179. Differently from earlier releases, the plugin does not
  180. follow the filesystem layout to organize files anymore,
  181. except for certain cases; notably, when doing the initial
  182. import from the project root or when adding a file that has
  183. been saved from an open buffer and is not currently part of
  184. the project.
  185. </para>
  186. <para>
  187. In the import dialog (available by choosing "Import files"
  188. from the right-click menu), you can choose any files to be
  189. imported to the selected node (the one where you clicked to
  190. get the context menu). The same filters available when doing
  191. the initial import for the project are available in the file
  192. chooser.
  193. </para>
  194. <para>
  195. You may choose any files and directories to import, even
  196. files and directories that are not "children" of the
  197. selected node in the file system layout. This allows you to
  198. organize your files in any way you want. You may even enter
  199. the name of a non-existant file in the file chooser: it will
  200. be treated as a directory, and even though the directory
  201. does not exist on disk, you'll have the same functionality
  202. for it as you have for other directories in your project.
  203. </para>
  204. <para>
  205. The file import dialog is a standard Java file dialog with a
  206. few added options to controle the behavior of the import
  207. process. These options are:
  208. </para>
  209. <itemizedlist>
  210. <listitem>
  211. <para>
  212. Traverse directories: if a directory is chosen to be
  213. imported, this option will cause all files and directories
  214. under the chosen directories to also be imported, as long
  215. as they fit the chosen filter.
  216. </para>
  217. </listitem>
  218. <listitem>
  219. <para>
  220. Flatten file paths: when traversing directories, you may
  221. choose to import all the files into a single node, insted
  222. of generating a directory tree.
  223. </para>
  224. </listitem>
  225. <listitem>
  226. <para>
  227. Import into new node: this will create a new node under
  228. which you are importing files, and all newly added files
  229. and directories will be placed under this new node.
  230. </para>
  231. </listitem>
  232. <listitem>
  233. <para>
  234. Filter settings: when traversing directories, you may
  235. choose from some existing file filters to choose the
  236. files to be imported, or create your custom file filter
  237. on the fly by providing globs for files to be included
  238. and directories to be ignored. For more information
  239. about the glob syntax, see "Import Options" under
  240. the "Customization" chapter.
  241. </para>
  242. </listitem>
  243. </itemizedlist>
  244. <bridgehead renderas='sect3'>Commands available in the toolbar</bridgehead>
  245. <para>
  246. The tool bar provides a fast way to access some of the
  247. functionality of the Project Viewer plugin. The available
  248. commands are:
  249. </para>
  250. <itemizedlist>
  251. <listitem>
  252. <para>
  253. Add/Edit project: shows the project properties
  254. dialog, where you can enter information about a new
  255. project. If the "All Projects" view is used, and no
  256. node (or the root) is selected, the "Create Project"
  257. dialog apperas, instead of the current project's
  258. properties.
  259. </para>
  260. </listitem>
  261. <listitem>
  262. <para>
  263. Expand the file list: opens all nodes in the
  264. currently selected tree.
  265. </para>
  266. </listitem>
  267. <listitem>
  268. <para>
  269. Contract the file list: closes all nodes in the
  270. current tree.
  271. </para>
  272. </listitem>
  273. <listitem>
  274. <para>
  275. Add file to project root: shows a dialog where you
  276. can choose single files to add to the current
  277. project. Differently from the "Add files" in the
  278. context menu, this option will work as in the old
  279. Project Viewer versions, only importing files below
  280. the project root, and keeping the file system layout
  281. for files and directories.
  282. </para>
  283. </listitem>
  284. </itemizedlist>
  285. <bridgehead renderas='sect3'>Commands available in the context menu</bridgehead>
  286. <para>
  287. The context menu provides context-sensitive options based on
  288. the current tree selection. The following commands can be
  289. found in the context menu (some of them have already been
  290. explained above):
  291. </para>
  292. <itemizedlist>
  293. <listitem>
  294. <para>
  295. Add files: pops a file chooser from where you can
  296. choose any files or directories to import. These
  297. will be imported <emphasis>into the selected
  298. node</emphasis>, disregarding the file system
  299. layout. If importing directories, you'll be prompted
  300. if you want to do it recursively using one of the
  301. available filters.
  302. </para>
  303. </listitem>
  304. <listitem>
  305. <para>
  306. Add files from VFS: lets you select files from a
  307. jEdit VFS (Virtual File System), such as FTP. If you
  308. choose local files, ProjectViewer will add standard
  309. files instead of VFS files. The functionality of VFS
  310. files in ProjectViewer is rather limited when
  311. compared to standard files.
  312. </para>
  313. </listitem>
  314. <listitem>
  315. <para>
  316. Re-import files: this command will remove all files
  317. and directories below the project root, and re-read
  318. the file structure from disk according to the
  319. selected filter (which can be chosen from the dialog
  320. that pops up). It will also analyze directories not
  321. under the project root: it will re-import existing
  322. directories and remove stale files from "virtual"
  323. directories.
  324. </para>
  325. </listitem>
  326. <listitem>
  327. <para>
  328. Remove from project: this will remove the selected
  329. node from the project to which it belongs. It is
  330. also possible to remove multiple nodes at once.
  331. </para>
  332. </listitem>
  333. <listitem>
  334. <para>
  335. Delete from disk: this is only shown for files to
  336. which you have write permission. Choosing it will
  337. cause the files to be deleted from disk and removed
  338. from the project.
  339. </para>
  340. </listitem>
  341. <listitem>
  342. <para>
  343. Rename: this will prompt you for a new name for the
  344. selected node. If you check the "Don't change name
  345. on disk" option, only the node name on the tree will
  346. be changed; the file on disk will keep its current
  347. name.
  348. </para>
  349. </listitem>
  350. <listitem>
  351. <para>
  352. Archive project: this will prompt you for a file
  353. name. A JAR archive will be created containing all
  354. files below the project root.
  355. </para>
  356. </listitem>
  357. <listitem>
  358. <para>
  359. Preview in browser: this will open the file in the
  360. configured web browser. If a project URL is set,
  361. files below the project root will be redirected to
  362. the given URL; in other cases, the "file://"
  363. protocol will be used. The part of the file path
  364. corresponding to the project root will be removed
  365. when opening the file relatively to the project URL.
  366. </para>
  367. </listitem>
  368. <listitem>
  369. <para>
  370. Open with: this will open the selected file in a
  371. configured application associated with its extension
  372. (configured in the Project Viewer's plugin options).
  373. If no application is configured for the selected
  374. file, selecting this option will prompt you to
  375. choose an application.
  376. </para>
  377. </listitem>
  378. </itemizedlist>
  379. <bridgehead renderas='sect3'>Using PV commands from jEdit</bridgehead>
  380. <para>
  381. Some commands are also available as jEdit actions so that
  382. shortcuts can be assigned to them. You can check all the
  383. possible commands available as actions by going to the
  384. "Shortcuts" panel in the jEdit options dialog, and selecting
  385. the ProjectViewer plugin.
  386. </para>
  387. <para>
  388. When executing a command using a shortcut, you may notice
  389. that sometimes no action is performed and an error message
  390. appears in the status bar. This means that the action is not
  391. available for the current selection in the tree. To check
  392. which actions are available for the selected node(s), check
  393. the context menu by clicking the node with the right mouse
  394. button.
  395. </para>
  396. <bridgehead renderas='sect3'>Third party plugins commands</bridgehead>
  397. <para>
  398. Project Viewer can be extended by other plugins; they can
  399. add properties to a project and define new actions for nodes
  400. in the tree. Consult each plugins documentation for
  401. information about possible commands available for the
  402. Project Viewer plugin.
  403. </para>
  404. <para>
  405. For developers go to chapter <link linkend="developer"
  406. endterm="developer.title"/> to get some starting help fo how to
  407. cooperate with the Project Viewer plugin.
  408. </para>
  409. </chapter>
  410. <chapter id="customization">
  411. <title>Customization</title>
  412. <para>
  413. Several options are configurable from the jEdit options
  414. dialog. There are options to control the GUI of the plugin,
  415. and internal behaviour when executing several actions. The
  416. options are:
  417. </para>
  418. <bridgehead renderas='sect3'>General Behaviour Options</bridgehead>
  419. <itemizedlist>
  420. <listitem>
  421. <para>
  422. Use external applications by default: if selected,
  423. files that are open from the tree (by either
  424. double-clicking or middle-clicking) will be opened
  425. using the external application configured for the
  426. file's extension, if any. If no application is
  427. found, it will be opened in jEdit. You can still
  428. open the file in jEdit by dragging the file node
  429. onto jEdit's text area. When opening in an external
  430. application, you'll lose support for auto-closing
  431. the file on project file, auto-loading the file when
  432. the project is re-activated and the file node won't
  433. be underlined, indicating it is opened..
  434. </para>
  435. </listitem>
  436. <listitem>
  437. <para>
  438. Close files on project change: if selected, files
  439. from the current project that are opened in jEdit
  440. will be closed when you switch to another project.
  441. </para>
  442. </listitem>
  443. <listitem>
  444. <para>
  445. Remember open files: if selected, files opened in
  446. the current project will be re-opened when you
  447. select the same project in a later moment, even
  448. between different jEdit sessions.
  449. </para>
  450. </listitem>
  451. <listitem>
  452. <para>
  453. Delete non-existant files from list: if selected,
  454. each file in the project is verified to exist when
  455. the project loads. If the file does not exist, it is
  456. removed from the project.
  457. </para>
  458. </listitem>
  459. <listitem>
  460. <para>
  461. Ask to import new files: if "Always" is selected,
  462. every time you save a file located below the active
  463. project's root, and the file is not yet part of the
  464. project, you'll be asked whether you want to import
  465. it. Selecting "Once per session" will ask only one
  466. time during the time the current project stays
  467. active. "Never" will disable this feature. "Auto
  468. import" will automatically add to the project any
  469. saved files which are under the project root and are
  470. not currently part of the project.
  471. </para>
  472. </listitem>
  473. </itemizedlist>
  474. <bridgehead renderas='sect3'>GUI Options</bridgehead>
  475. <itemizedlist>
  476. <listitem>
  477. <para>
  478. Show toolbar: whether to show the plugin's toolbar
  479. or not. The toolbar is automatically hidden when no
  480. tree is selected for showing, regardless of this
  481. option.
  482. </para>
  483. </listitem>
  484. <listitem>
  485. <para>
  486. Show folders tree: if the "Folders" tree view should
  487. be shown.
  488. </para>
  489. </listitem>
  490. <listitem>
  491. <para>
  492. Show files tree: if the "Files" tree view should be
  493. shown. Disabling this view can greatly improve
  494. performance when your projects have many files.
  495. </para>
  496. </listitem>
  497. <listitem>
  498. <para>
  499. Show working files tree: if the "Working Files" tree
  500. view should be shown.
  501. </para>
  502. </listitem>
  503. <listitem>
  504. <para>
  505. Show compact tree: whether the "Compact" tree view
  506. should be shown.
  507. </para>
  508. </listitem>
  509. <listitem>
  510. <para>
  511. Show filtered tree: whether the "Filtered" tree view
  512. should be shown.
  513. </para>
  514. </listitem>
  515. <listitem>
  516. <para>
  517. Use system icons for files: instead of using jEdit's
  518. icons, uses the system provided icon for each
  519. individual files. The jEdit icon will still be used
  520. when the file is opened. In some systems, the system
  521. icons may not be accessible from Java, so this
  522. option may not work as expected. Also, this option
  523. is only available if Java 2 version 1.4 or later is
  524. being used.
  525. </para>
  526. </listitem>
  527. <listitem>
  528. <para>
  529. Show project (or group) name in the view's title bar:
  530. if selected, the jEdit window title will be updated
  531. with information about the currently active project
  532. or group in that window.
  533. </para>
  534. </listitem>
  535. </itemizedlist>
  536. <bridgehead renderas='sect3'>Import Options</bridgehead>
  537. <para>
  538. This controls the behaviour of the "Import settings" filter
  539. available when importing files.
  540. </para>
  541. <itemizedlist>
  542. <listitem>
  543. <para>
  544. Files to include: a list of globs that match files
  545. you want to include in a project (e.g., "*.html",
  546. "*.java", "README*"). If you want to exclude files
  547. from the automatic import, prepend the glob with the
  548. "!" character (e.g., "!*.class").
  549. </para>
  550. </listitem>
  551. <listitem>
  552. <para>
  553. Directories to ignore: space-separated list of globs
  554. to match directory names to ignore when doing
  555. automatic import of files. No files within
  556. directories whose names are listed here will be
  557. imported.
  558. </para>
  559. </listitem>
  560. </itemizedlist>
  561. <bridgehead renderas='sect3'>Web Project Options</bridgehead>
  562. <itemizedlist>
  563. <listitem>
  564. <para>
  565. Use InfoViewer's browser settings: if you have the
  566. InfoViewer plugin installed, you can choose to check
  567. this box, and when asking to open a file in a web
  568. browser, InfoViewer is going to be used to launch
  569. you browser of choice.
  570. </para>
  571. </listitem>
  572. <listitem>
  573. <para>
  574. Browser path: the path to the web browser to be used
  575. for viewing selected files, with any needed
  576. command-line switches, in case you don't want to use
  577. the same settings as the InfoViewer plugin.
  578. </para>
  579. </listitem>
  580. </itemizedlist>
  581. <bridgehead renderas='sect3'>Editing the context menu</bridgehead>
  582. <para>
  583. ProjectViewer provides an interface similar to jEdit's
  584. context menu editor, where you can add actions to be
  585. displayed in the trees' context menus. You can't remove the
  586. default entries in the context menu, but any action
  587. available to jEdit can be added. It's important to notice
  588. that adding an action to the context menu won't make it
  589. "Project Viewer aware": unless the action is specifically
  590. written to interface with ProjectViewer, it will work the
  591. same way as it would if executed from any other place (such
  592. as the jEdit toolbar or menu).
  593. </para>
  594. <bridgehead renderas='sect3'>File Associations</bridgehead>
  595. <para>
  596. The "External Applications" option pane can be used to
  597. register applications you want to use for specific file
  598. type, accessible through the "Open with..." context menu
  599. command for files. Just add a file name glob and choose the
  600. application you wish to use for that entry.
  601. </para>
  602. <bridgehead renderas='sect3'>Filtered View</bridgehead>
  603. <para>
  604. The filtered view allows you to group files according to
  605. their names. To create a filter, go to the Plugin Options
  606. and choose the "Filtered view" pane, or go to the project
  607. properties dialog and choose the "Filtered view" pane, to
  608. create project-specific filters.
  609. </para>
  610. <para>
  611. To create a filter, provide a file name glob (see jEdit's
  612. documentation for the supported glob syntax) and a name for
  613. the filter. If the "Show filtered tree" option is enabled,
  614. a new "virtual directory" with the filter name will be
  615. available in the "Filtered" tab of the ProjectViewer window,
  616. containig all file names that match the glob. Files that
  617. match more than one filter will be listed several times
  618. in this view.
  619. </para>
  620. </chapter>
  621. <chapter id="developer">
  622. <title id="developer.title">Developer Documentation</title>
  623. <para>
  624. At first, there's a comprehensive documentation included
  625. with the source distribution in Javadoc format. Just
  626. download the source from the jEdit CVS and create the
  627. documentation by executing the "javadoc" Ant task in the
  628. Project Viewer directory. Documentation will be created
  629. under the directory "build/docs/javadoc". Or access the
  630. <ulink url="javadoc/index.html">bundled documentation</ulink>.
  631. </para>
  632. <para>
  633. The Project Viewer source also contains a second plugin that
  634. is used for debugging purposes. This plugin uses all the
  635. extension APIs provided by ProjectViewer to add extra
  636. functionality. The source for this plugin is available
  637. in the "pvdebug" directory in the source tree; you can
  638. use that source as an example of how to code your
  639. extensions.
  640. </para>
  641. <para>
  642. External plugins can interact with the Project Viewer plugin in
  643. various ways:
  644. <itemizedlist>
  645. <listitem><para>By providing project specific properties: properties</para></listitem>
  646. <listitem><para>By creating new node types: nodes</para></listitem>
  647. <listitem><para>By creating node-specific actions: actions</para></listitem>
  648. <listitem><para>By listening to Project Viewer events
  649. <footnote><para>
  650. For details on how to do this, check the
  651. package summary for
  652. <ulink url="javadoc/projectviewer/event/package-summary.html">projectviewer.Event</ulink>
  653. in the javadocs. </para></footnote>
  654. </para></listitem>
  655. </itemizedlist>
  656. </para>
  657. <para>
  658. During the next sub chapters we will describe some common task
  659. for interacting with projectviewer.
  660. </para>
  661. <section id="developer-checkpv">
  662. <title id="developer-checkpv.title">Checking if projectviewer is available</title>
  663. <para>
  664. The method described here requires a jEdit with version > 4.2preX. </para>
  665. <informalexample>
  666. <programlisting>
  667. EditPlugin pv;
  668. pv=jEdit.getPlugin("projectviewer.ProjectPlugin",false);
  669. if(pv!=null) {
  670. // we can use the projectviewer plugin
  671. }
  672. </programlisting>
  673. </informalexample>
  674. </section>
  675. <section id="developer-prjfile">
  676. <title id="developer-prjfile.title">Getting the project the a given file belongs to</title>
  677. <informalexample>
  678. <programlisting>
  679. ProjectManager pm=getInstance()
  680. // then use java.util.Iterator getProjects();
  681. // and foreach project use VPTNode node=prj.getChildNode(java.lang.String path);
  682. </programlisting>
  683. </informalexample>
  684. </section>
  685. <section id="developer-prjview">
  686. <title id="developer-prjview.title">Getting the project of the given view</title>
  687. <informalexample>
  688. <programlisting>
  689. VPTProject prj=ProjectViewer.getActiveProject(org.gjt.sp.jedit.View aView);
  690. ProjectViewer pv=ProjectViewer.getViewer(org.gjt.sp.jedit.View view);
  691. </programlisting>
  692. </informalexample>
  693. </section>
  694. </chapter>
  695. <chapter id="troubleshooting">
  696. <title>Troubleshooting</title>
  697. <bridgehead renderas='sect3'>Canonical File Paths</bridgehead>
  698. <para>
  699. The JRE, up to version 1.4 (at least), has a bug in
  700. JFileChooser when using the Metal Look &amp; Feel. It will
  701. resolve canonical paths when changing directories. While
  702. ProjectViewer tries to work around this issue, it may lead
  703. to some strange behaviors, especially when importing files.
  704. </para>
  705. <bridgehead renderas='sect3'>Large projects</bridgehead>
  706. <para>
  707. Large projects can take some time to load, especially over a
  708. network connection if the "delete non-existant files"
  709. configuration option is enabled. This is due to asking whether
  710. the file exists for each file in the project, which can be
  711. slow in some systems.
  712. </para>
  713. <bridgehead renderas='sect3'>Multiple Viewer in same jEdit View</bridgehead>
  714. <para>
  715. jEdit allows multiple instances of the same dockable for the
  716. same view. Project Viewer does not support this feature and
  717. will issue an error message if you try to open two Project
  718. Viewer windows in the same view.
  719. </para>
  720. </chapter>
  721. <chapter id="license">
  722. <title>License</title>
  723. <para>
  724. The source code is distributed under the GPL.
  725. Please see
  726. <ulink url="http://www.fsf.org/copyleft/gpl.html">
  727. http://www.fsf.org/copyleft/gpl.html
  728. </ulink>
  729. </para>
  730. </chapter>
  731. <chapter id="feedback">
  732. <title>Feedback</title>
  733. <para>
  734. The preferred way to send bug reports is to use the
  735. Sourceforge Bug Tracker at
  736. <ulink url="http://sourceforge.net/tracker/?atid=565475&amp;group_id=588">
  737. http://sourceforge.net/tracker/?atid=565475&amp;group_id=588
  738. </ulink>
  739. Please start the report subject with the text "ProjectViewer:".
  740. </para>
  741. <para>You can also write to:</para>
  742. <itemizedlist>
  743. <listitem>
  744. <para>
  745. Stefan Kost <email>ensonic@sonicpulse.de</email>;
  746. </para>
  747. </listitem>
  748. <listitem>
  749. <para>
  750. or jEdit-users mailing-list
  751. <email>jedit-users@lists.sourceforge.net</email>;
  752. </para>
  753. </listitem>
  754. <listitem>
  755. <para>
  756. or jEdit-devel mailing-list
  757. <email>jedit-devel@lists.sourceforge.net</email>.
  758. </para>
  759. </listitem>
  760. </itemizedlist>
  761. </chapter>
  762. <chapter id="credits">
  763. <title>Credits</title>
  764. <itemizedlist>
  765. <listitem>
  766. <para>
  767. ProjectViewer was previously (up to 1.0.2) maintained by Calvin Yu
  768. </para>
  769. </listitem>
  770. <listitem>
  771. <para>
  772. ProjectViewer was originally developed Kevin A. Burton
  773. </para>
  774. </listitem>
  775. </itemizedlist>
  776. </chapter>
  777. </book>