Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Side by Side Diff: doc/manual/eclipse.html

Issue 139673002: Updating Findbugs from 2.0.1 to 2.0.3 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/findbugs.git@master
Patch Set: bulach's nits Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « doc/manual/building.html ('k') | doc/manual/filter.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html><head> 1 <html><head>
2 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> 2 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3 <title>Chapter&nbsp;7.&nbsp;Using the FindBugs&#8482; Eclipse plugin</title>< meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="FindBugs&#8482; Manual"><link rel="up" href="index.htm l" title="FindBugs&#8482; Manual"><link rel="prev" href="anttask.html" title="Ch apter&nbsp;6.&nbsp;Using the FindBugs&#8482; Ant task"><link rel="next" href="fi lter.html" title="Chapter&nbsp;8.&nbsp;Filter Files"></head><body bgcolor="white " text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navhea der"><table width="100%" summary="Navigation header"><tr><th colspan="3" align=" center">Chapter&nbsp;7.&nbsp;Using the <span class="application">FindBugs</span> &#8482; Eclipse plugin</th></tr><tr><td width="20%" align="left"><a accesskey="p " href="anttask.html">Prev</a>&nbsp;</td><th width="60%" align="center">&nbsp;</ th><td width="20%" align="right">&nbsp;<a accesskey="n" href="filter.html">Next< /a></td></tr></table><hr></div><div class="chapter" title="Chapter&nbsp;7.&nbsp; Using the FindBugs&#8482; Eclipse plugin"><div class="titlepage"><div><div><h2 c lass="title"><a name="eclipse"></a>Chapter&nbsp;7.&nbsp;Using the <span class="a pplication">FindBugs</span>&#8482; Eclipse plugin</h2></div></div></div><div cla ss="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="ecl ipse.html#d0e1639">1. Requirements</a></span></dt><dt><span class="sect1"><a hre f="eclipse.html#d0e1647">2. Installation</a></span></dt><dt><span class="sect1"> <a href="eclipse.html#d0e1694">3. Using the Plugin</a></span></dt><dt><span clas s="sect1"><a href="eclipse.html#d0e1725">4. Extending the Eclipse Plugin (since 2.0.0)</a></span></dt><dt><span class="sect1"><a href="eclipse.html#d0e1779">5. Troubleshooting</a></span></dt></dl></div><p> 3 <title>Chapter&nbsp;7.&nbsp;Using the FindBugs&#8482; Eclipse plugin</title>< meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="FindBugs&#8482; Manual"><link rel="up" href="index.htm l" title="FindBugs&#8482; Manual"><link rel="prev" href="anttask.html" title="Ch apter&nbsp;6.&nbsp;Using the FindBugs&#8482; Ant task"><link rel="next" href="fi lter.html" title="Chapter&nbsp;8.&nbsp;Filter Files"></head><body bgcolor="white " text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navhea der"><table width="100%" summary="Navigation header"><tr><th colspan="3" align=" center">Chapter&nbsp;7.&nbsp;Using the <span class="application">FindBugs</span> &#8482; Eclipse plugin</th></tr><tr><td width="20%" align="left"><a accesskey="p " href="anttask.html">Prev</a>&nbsp;</td><th width="60%" align="center">&nbsp;</ th><td width="20%" align="right">&nbsp;<a accesskey="n" href="filter.html">Next< /a></td></tr></table><hr></div><div class="chapter" title="Chapter&nbsp;7.&nbsp; Using the FindBugs&#8482; Eclipse plugin"><div class="titlepage"><div><div><h2 c lass="title"><a name="eclipse"></a>Chapter&nbsp;7.&nbsp;Using the <span class="a pplication">FindBugs</span>&#8482; Eclipse plugin</h2></div></div></div><div cla ss="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="ecl ipse.html#d0e1662">1. Requirements</a></span></dt><dt><span class="sect1"><a hre f="eclipse.html#d0e1670">2. Installation</a></span></dt><dt><span class="sect1"> <a href="eclipse.html#d0e1717">3. Using the Plugin</a></span></dt><dt><span clas s="sect1"><a href="eclipse.html#d0e1748">4. Extending the Eclipse Plugin (since 2.0.0)</a></span></dt><dt><span class="sect1"><a href="eclipse.html#d0e1802">5. Troubleshooting</a></span></dt></dl></div><p>
4 The FindBugs Eclipse plugin allows <span class="application">FindBugs</span> to be used within 4 The FindBugs Eclipse plugin allows <span class="application">FindBugs</span> to be used within
5 the <a class="ulink" href="http://www.eclipse.org/" target="_top">Eclipse</a> ID E. 5 the <a class="ulink" href="http://www.eclipse.org/" target="_top">Eclipse</a> ID E.
6 The FindBugs Eclipse plugin was generously contributed by Peter Friese. 6 The FindBugs Eclipse plugin was generously contributed by Peter Friese.
7 Phil Crosby and Andrei Loskutov contributed major improvements 7 Phil Crosby and Andrei Loskutov contributed major improvements
8 to the plugin. 8 to the plugin.
9 </p><div class="sect1" title="1.&nbsp;Requirements"><div class="titlepage"><div> <div><h2 class="title" style="clear: both"><a name="d0e1639"></a>1.&nbsp;Require ments</h2></div></div></div><p> 9 </p><div class="sect1" title="1.&nbsp;Requirements"><div class="titlepage"><div> <div><h2 class="title" style="clear: both"><a name="d0e1662"></a>1.&nbsp;Require ments</h2></div></div></div><p>
10 To use the <span class="application">FindBugs</span> Plugin for Eclipse, you nee d Eclipse 3.3 or later, 10 To use the <span class="application">FindBugs</span> Plugin for Eclipse, you nee d Eclipse 3.3 or later,
11 and JRE/JDK 1.5 or later. 11 and JRE/JDK 1.5 or later.
12 </p></div><div class="sect1" title="2.&nbsp;Installation"><div class="titlepage" ><div><div><h2 class="title" style="clear: both"><a name="d0e1647"></a>2.&nbsp;I nstallation</h2></div></div></div><p> 12 </p></div><div class="sect1" title="2.&nbsp;Installation"><div class="titlepage" ><div><div><h2 class="title" style="clear: both"><a name="d0e1670"></a>2.&nbsp;I nstallation</h2></div></div></div><p>
13 We provide update sites that allow you to automatically install FindBugs into Eclipse and also query and install updates. 13 We provide update sites that allow you to automatically install FindBugs into Eclipse and also query and install updates.
14 There are three different update sites</p><div class="variablelist" title="Fin dBugs Eclipse update sites"><p class="title"><b>FindBugs Eclipse update sites</b ></p><dl><dt><span class="term"><a class="ulink" href="http://findbugs.cs.umd.ed u/eclipse/" target="_top">http://findbugs.cs.umd.edu/eclipse/</a></span></dt><dd ><p> 14 There are three different update sites</p><div class="variablelist" title="Fin dBugs Eclipse update sites"><p class="title"><b>FindBugs Eclipse update sites</b ></p><dl><dt><span class="term"><a class="ulink" href="http://findbugs.cs.umd.ed u/eclipse/" target="_top">http://findbugs.cs.umd.edu/eclipse/</a></span></dt><dd ><p>
15 Only provides official releases of FindBugs. 15 Only provides official releases of FindBugs.
16 </p></dd><dt><span class="term"><a class="ulink" href="http://findbugs.cs. umd.edu/eclipse-candidate/" target="_top">http://findbugs.cs.umd.edu/eclipse-can didate/</a></span></dt><dd><p> 16 </p></dd><dt><span class="term"><a class="ulink" href="http://findbugs.cs. umd.edu/eclipse-candidate/" target="_top">http://findbugs.cs.umd.edu/eclipse-can didate/</a></span></dt><dd><p>
17 Provides official releases and release candidates of FindBugs. 17 Provides official releases and release candidates of FindBugs.
18 </p></dd><dt><span class="term"><a class="ulink" href="http://findbugs.c s.umd.edu/eclipse-daily/" target="_top">http://findbugs.cs.umd.edu/eclipse-daily /</a></span></dt><dd><p> 18 </p></dd><dt><span class="term"><a class="ulink" href="http://findbugs.c s.umd.edu/eclipse-daily/" target="_top">http://findbugs.cs.umd.edu/eclipse-daily /</a></span></dt><dd><p>
19 Provides the daily build of FindBugs. No testing other than that it com piles. 19 Provides the daily build of FindBugs. No testing other than that it com piles.
20 </p></dd></dl></div><p>You can also manually 20 </p></dd></dl></div><p>You can also manually
21 download the plugin from the following link: 21 download the plugin from the following link:
22 <a class="ulink" href="http://prdownloads.sourceforge.net/findbugs/edu.umd.cs.fi ndbugs.plugin.eclipse_2.0.1.20120712.zip?download" target="_top">http://prdownlo ads.sourceforge.net/findbugs/edu.umd.cs.findbugs.plugin.eclipse_2.0.1.20120712.z ip?download</a>. 22 <a class="ulink" href="http://prdownloads.sourceforge.net/findbugs/edu.umd.cs.fi ndbugs.plugin.eclipse_2.0.3.20131122.zip?download" target="_top">http://prdownlo ads.sourceforge.net/findbugs/edu.umd.cs.findbugs.plugin.eclipse_2.0.3.20131122.z ip?download</a>.
23 Extract it in Eclipse's "plugins" subdirectory. 23 Extract it in Eclipse's "plugins" subdirectory.
24 (So &lt;eclipse_install_dir&gt;/plugins/edu.umd.cs.findbugs.plugin.eclipse_2.0.1 .20120712/findbugs.png 24 (So &lt;eclipse_install_dir&gt;/plugins/edu.umd.cs.findbugs.plugin.eclipse_2.0.3 .20131122/findbugs.png
25 should be the path to the <span class="application">FindBugs</span> logo.) 25 should be the path to the <span class="application">FindBugs</span> logo.)
26 26
27 </p><p> 27 </p><p>
28 Once the plugin is extracted, start Eclipse and choose 28 Once the plugin is extracted, start Eclipse and choose
29 <span class="guimenu">Help</span> &#8594; <span class="guimenuitem">About Eclips e Platform</span> &#8594; <span class="guimenuitem">Plug-in Details</span>. 29 <span class="guimenu">Help</span> &#8594; <span class="guimenuitem">About Eclips e Platform</span> &#8594; <span class="guimenuitem">Plug-in Details</span>.
30 You should find a plugin called "FindBugs Plug-in" provided by "FindBugs Project ". 30 You should find a plugin called "FindBugs Plug-in" provided by "FindBugs Project ".
31 </p></div><div class="sect1" title="3.&nbsp;Using the Plugin"><div class="titlep age"><div><div><h2 class="title" style="clear: both"><a name="d0e1694"></a>3.&nb sp;Using the Plugin</h2></div></div></div><p> 31 </p></div><div class="sect1" title="3.&nbsp;Using the Plugin"><div class="titlep age"><div><div><h2 class="title" style="clear: both"><a name="d0e1717"></a>3.&nb sp;Using the Plugin</h2></div></div></div><p>
32 To get started, right click on a Java project in Package Explorer, 32 To get started, right click on a Java project in Package Explorer,
33 and select the option labeled "Find Bugs". 33 and select the option labeled "Find Bugs".
34 <span class="application">FindBugs</span> will run, and problem markers (display ed in source 34 <span class="application">FindBugs</span> will run, and problem markers (display ed in source
35 windows, and also in the Eclipse Problems view) will point to 35 windows, and also in the Eclipse Problems view) will point to
36 locations in your code which have been identified as potential instances 36 locations in your code which have been identified as potential instances
37 of bug patterns. 37 of bug patterns.
38 </p><p> 38 </p><p>
39 You can also run <span class="application">FindBugs</span> on existing java arch ives (jar, ear, zip, war etc). Simply 39 You can also run <span class="application">FindBugs</span> on existing java arch ives (jar, ear, zip, war etc). Simply
40 create an empty Java project and attach archives to the project classpath. Havin g that, you 40 create an empty Java project and attach archives to the project classpath. Havin g that, you
41 can now right click the archive node in Package Explorer and select the option l abeled 41 can now right click the archive node in Package Explorer and select the option l abeled
(...skipping 10 matching lines...) Expand all
52 </p></li><li class="listitem"><p> 52 </p></li><li class="listitem"><p>
53 Choose minimum warning priority and enabled bug categories. 53 Choose minimum warning priority and enabled bug categories.
54 These options will choose which warnings are shown. 54 These options will choose which warnings are shown.
55 For example, if you select the "Medium" warning priority, 55 For example, if you select the "Medium" warning priority,
56 only Medium and High priority warnings will be shown. 56 only Medium and High priority warnings will be shown.
57 Similarly, if you uncheck the "Style" checkbox, no warnings 57 Similarly, if you uncheck the "Style" checkbox, no warnings
58 in the Style category will be displayed. 58 in the Style category will be displayed.
59 </p></li><li class="listitem"><p> 59 </p></li><li class="listitem"><p>
60 Select detectors. The table allows you to select which detectors 60 Select detectors. The table allows you to select which detectors
61 you want to enable for your project. 61 you want to enable for your project.
62 </p></li></ul></div></div><div class="sect1" title="4.&nbsp;Extending the Ec lipse Plugin (since 2.0.0)"><div class="titlepage"><div><div><h2 class="title" s tyle="clear: both"><a name="d0e1725"></a>4.&nbsp;Extending the Eclipse Plugin (s ince 2.0.0)</h2></div></div></div><p> 62 </p></li></ul></div></div><div class="sect1" title="4.&nbsp;Extending the Ec lipse Plugin (since 2.0.0)"><div class="titlepage"><div><div><h2 class="title" s tyle="clear: both"><a name="d0e1748"></a>4.&nbsp;Extending the Eclipse Plugin (s ince 2.0.0)</h2></div></div></div><p>
63 Eclipse plugin supports contribution of custom <span class="application">FindBug s</span> detectors (see also 63 Eclipse plugin supports contribution of custom <span class="application">FindBug s</span> detectors (see also
64 <a class="ulink" href="http://code.google.com/p/findbugs/source/browse/trunk/fin dbugs/src/doc/AddingDetectors.txt" target="_top">AddingDetectors.txt</a> 64 <a class="ulink" href="http://code.google.com/p/findbugs/source/browse/trunk/fin dbugs/src/doc/AddingDetectors.txt" target="_top">AddingDetectors.txt</a>
65 for more information). There are two ways to contribute custom plugins to the Ec lipse: 65 for more information). There are two ways to contribute custom plugins to the Ec lipse:
66 </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="li stitem"><p> 66 </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="li stitem"><p>
67 Existing standard <span class="application">FindBugs</span> detector package s can be configured via 67 Existing standard <span class="application">FindBugs</span> detector package s can be configured via
68 <span class="guimenu">Window</span> &#8594; <span class="guimenuitem">Prefer ences</span> &#8594; <span class="guimenuitem">Java</span> &#8594; <span class=" guimenuitem"><span class="application">FindBugs</span></span> &#8594; <span clas s="guimenuitem">Misc. Settings</span> &#8594; <span class="guimenuitem">Custom D etectors</span>. 68 <span class="guimenu">Window</span> &#8594; <span class="guimenuitem">Prefer ences</span> &#8594; <span class="guimenuitem">Java</span> &#8594; <span class=" guimenuitem"><span class="application">FindBugs</span></span> &#8594; <span clas s="guimenuitem">Misc. Settings</span> &#8594; <span class="guimenuitem">Custom D etectors</span>.
69 Simply specify there locations of any additional plugin libraries. 69 Simply specify there locations of any additional plugin libraries.
70 </p><p> 70 </p><p>
71 The benefit of this solution is that already existing detector packages can be 71 The benefit of this solution is that already existing detector packages can be
72 used "as is", and that you can quickly verify the quality of third party det ectors. 72 used "as is", and that you can quickly verify the quality of third party det ectors.
(...skipping 12 matching lines...) Expand all
85 </p><p> 85 </p><p>
86 The benefit of this solution is that for given (shared) Eclipse installation 86 The benefit of this solution is that for given (shared) Eclipse installation
87 each team member has exactly same detectors set, and there is no need to con figure 87 each team member has exactly same detectors set, and there is no need to con figure
88 anything anymore. The (really small) precondition 88 anything anymore. The (really small) precondition
89 is that you have to convert your existing detectors package to the valid 89 is that you have to convert your existing detectors package to the valid
90 Eclipse plugin. You can do this even for third-party detector packages. 90 Eclipse plugin. You can do this even for third-party detector packages.
91 Another major differentiator is the ability to extend the default FindBugs 91 Another major differentiator is the ability to extend the default FindBugs
92 classpath at runtime with required third party libraries (see 92 classpath at runtime with required third party libraries (see
93 <a class="ulink" href="http://code.google.com/p/findbugs/source/browse/trunk /findbugs/src/doc/AddingDetectors.txt" target="_top">AddingDetectors.txt</a> 93 <a class="ulink" href="http://code.google.com/p/findbugs/source/browse/trunk /findbugs/src/doc/AddingDetectors.txt" target="_top">AddingDetectors.txt</a>
94 for more information). 94 for more information).
95 </p></li></ul></div></div><div class="sect1" title="5.&nbsp;Troubleshooting" ><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name= "d0e1779"></a>5.&nbsp;Troubleshooting</h2></div></div></div><p> 95 </p></li></ul></div></div><div class="sect1" title="5.&nbsp;Troubleshooting" ><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name= "d0e1802"></a>5.&nbsp;Troubleshooting</h2></div></div></div><p>
96 This section lists common problems with the plugin and (if known) how to resolve them. 96 This section lists common problems with the plugin and (if known) how to resolve them.
97 </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="li stitem"><p> 97 </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="li stitem"><p>
98 If you see OutOfMemory error dialogs after starting <span class="application ">FindBugs</span> analysis in Eclipse, 98 If you see OutOfMemory error dialogs after starting <span class="application ">FindBugs</span> analysis in Eclipse,
99 please increase JVM available memory: change eclipse.ini and add the lines b elow 99 please increase JVM available memory: change eclipse.ini and add the lines b elow
100 to the end of the file: 100 to the end of the file:
101 </p><pre class="programlisting"> 101 </p><pre class="programlisting">
102 -vmargs 102 -vmargs
103 -Xmx1000m 103 -Xmx1000m
104 </pre><p> 104 </pre><p>
105 Important: the configuration arguments starting with the line "-vmargs" must 105 Important: the configuration arguments starting with the line "-vmargs" must
106 be last lines in the eclipse.ini file, and only one argument per line is all owed! 106 be last lines in the eclipse.ini file, and only one argument per line is all owed!
107 </p></li><li class="listitem"><p> 107 </p></li><li class="listitem"><p>
108 If you do not see any <span class="application">FindBugs</span> problem mark ers (in your source 108 If you do not see any <span class="application">FindBugs</span> problem mark ers (in your source
109 windows or in the Problems View), you may need to change your 109 windows or in the Problems View), you may need to change your
110 Problems View filter settings. See 110 Problems View filter settings. See
111 <a class="ulink" href="http://findbugs.sourceforge.net/FAQ.html#q7" target=" _top">http://findbugs.sourceforge.net/FAQ.html#q7</a> for more information. 111 <a class="ulink" href="http://findbugs.sourceforge.net/FAQ.html#q7" target=" _top">http://findbugs.sourceforge.net/FAQ.html#q7</a> for more information.
112 </p></li></ul></div></div></div><div class="navfooter"><hr><table width="100 %" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="anttask.html">Prev</a>&nbsp;</td><td width="20%" align="center">&nbsp;</t d><td width="40%" align="right">&nbsp;<a accesskey="n" href="filter.html">Next</ a></td></tr><tr><td width="40%" align="left" valign="top">Chapter&nbsp;6.&nbsp;U sing the <span class="application">FindBugs</span>&#8482; <span class="applicati on">Ant</span> task&nbsp;</td><td width="20%" align="center"><a accesskey="h" hr ef="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;Ch apter&nbsp;8.&nbsp;Filter Files</td></tr></table></div></body></html> 112 </p></li></ul></div></div></div><div class="navfooter"><hr><table width="100 %" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="anttask.html">Prev</a>&nbsp;</td><td width="20%" align="center">&nbsp;</t d><td width="40%" align="right">&nbsp;<a accesskey="n" href="filter.html">Next</ a></td></tr><tr><td width="40%" align="left" valign="top">Chapter&nbsp;6.&nbsp;U sing the <span class="application">FindBugs</span>&#8482; <span class="applicati on">Ant</span> task&nbsp;</td><td width="20%" align="center"><a accesskey="h" hr ef="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;Ch apter&nbsp;8.&nbsp;Filter Files</td></tr></table></div></body></html>
OLDNEW
« no previous file with comments | « doc/manual/building.html ('k') | doc/manual/filter.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698