|
JStyle comes bundled with three versatile tools: a source browser, a class file browser, and a COM library browser. We will take a brief look at these tools in this chapter. Source Browser Using the browser you can
To launch the browser, select Tools->Browser from the menu. This brings up the browser view as shown in the following figure.
Fig. 11.1If you double click on a method in the top right window, a new browser view appears centered around that method. See the figure below.
Fig. 11.2 Multiple browser windows can be open simultaneously, allowing you to switch from one view to another seamlessly. Class File Browser This add-on tool is actually JBrowser, a developer-friendly tool sold as a separate product, but bundled free of charge as part of JStyle. JBrowser allows you to navigate a set of classes just as you can do with the source browser, but using the jar or class files. Source is not required. However, if source code is present, JBrowser can map a class to its source automatically. To launch the class browser, select Tools->Java Class Browser from the menu. This opens the class browser view as shown in the figure below.
Fig. 11.3 You can switch from one class to another quite easily by double clicking on the item. If the source is available and its path correctly set, Javadoc help if any will be extracted from the source will be displayed. To set the class path and source path, click on the icon that resembles a flag. This pops up the options dialog.
Fig. 11.4 One of the most useful features of the class browser is its ability to display various forms of dependency. See, for example, the following figure. Fig. 11.5 In the help tab of the browser, you can associate an annotation with each class by selecting Annotate from the context sensitive menu. You can even define bookmarks for easier navigability. COM Object Browser The third add-on tool is a COM object browser. Select Tools->COM Object Browser. This brings up a browser view as shown below.
Fig. 11.6 JStyle exposes parsed information via COM objects and this tool is convenient for browsing the corresponding COM library. Other libraries can be added through the Add Library button.
|