#安装插件步骤:
1.打开settings
<iframe id="iframe_0.6742071378989718" style="margin: 0px; padding: 0px; border-width: initial; border-style: none; width: 505px; height: 962px;" src="data:text/html;charset=utf8,%3Cstyle%3Ebody%7Bmargin:0;padding:0%7D%3C/style%3E%3Cimg%20id=%22img%22%20src=%22https://raw.githubusercontent.com/chuxiuhong/cloudphoto/master/Lab4_0.png?_=5953498%22%20style=%22border:none;max-width:707px%22%3E%3Cscript%3Ewindow.onload%20=%20function%20()%20%7Bvar%20img%20=%20document.getElementById('img');%20window.parent.postMessage(%7BiframeId:'iframe_0.6742071378989718',width:img.width,height:img.height%7D,%20'http://www.cnblogs.com');%7D%3C/script%3E" frameborder="0" scrolling="no"></iframe>
2.选择plugins
<iframe id="iframe_0.918739736047133" style="margin: 0px; padding: 0px; border-width: initial; border-style: none; width: 707px; height: 477px;" src="data:text/html;charset=utf8,%3Cstyle%3Ebody%7Bmargin:0;padding:0%7D%3C/style%3E%3Cimg%20id=%22img%22%20src=%22https://raw.githubusercontent.com/chuxiuhong/cloudphoto/master/Lab4_1.png?_=5953498%22%20style=%22border:none;max-width:707px%22%3E%3Cscript%3Ewindow.onload%20=%20function%20()%20%7Bvar%20img%20=%20document.getElementById('img');%20window.parent.postMessage(%7BiframeId:'iframe_0.918739736047133',width:img.width,height:img.height%7D,%20'http://www.cnblogs.com');%7D%3C/script%3E" frameborder="0" scrolling="no"></iframe>
3.点击"Browse repositories"
<iframe id="iframe_0.9422785380441556" style="margin: 0px; padding: 0px; border-width: initial; border-style: none; width: 707px; height: 469px;" src="data:text/html;charset=utf8,%3Cstyle%3Ebody%7Bmargin:0;padding:0%7D%3C/style%3E%3Cimg%20id=%22img%22%20src=%22https://raw.githubusercontent.com/chuxiuhong/cloudphoto/master/Lab4_2.png?_=5953498%22%20style=%22border:none;max-width:707px%22%3E%3Cscript%3Ewindow.onload%20=%20function%20()%20%7Bvar%20img%20=%20document.getElementById('img');%20window.parent.postMessage(%7BiframeId:'iframe_0.9422785380441556',width:img.width,height:img.height%7D,%20'http://www.cnblogs.com');%7D%3C/script%3E" frameborder="0" scrolling="no"></iframe>
4.搜索对应内插件,点击"install"
<iframe id="iframe_0.025726797217640707" style="margin: 0px; padding: 0px; border-width: initial; border-style: none; width: 707px; height: 630px;" src="data:text/html;charset=utf8,%3Cstyle%3Ebody%7Bmargin:0;padding:0%7D%3C/style%3E%3Cimg%20id=%22img%22%20src=%22https://raw.githubusercontent.com/chuxiuhong/cloudphoto/master/Lab4_3.png?_=5953498%22%20style=%22border:none;max-width:707px%22%3E%3Cscript%3Ewindow.onload%20=%20function%20()%20%7Bvar%20img%20=%20document.getElementById('img');%20window.parent.postMessage(%7BiframeId:'iframe_0.025726797217640707',width:img.width,height:img.height%7D,%20'http://www.cnblogs.com');%7D%3C/script%3E" frameborder="0" scrolling="no"></iframe>
到这里我们默认已经完成了4个插件的安装。
checkstyle,PMD,findbugs都可以直接使用,但VsiualVM需要配合客户端来完成配置和使用。
下面先去官网下载VisualVM的客户端。
VisualVM官网链接
配置连接过程如下
打开settings->Other Settings
<iframe id="iframe_0.41228751700412647" style="margin: 0px; padding: 0px; border-width: initial; border-style: none; width: 707px; height: 474px;" src="data:text/html;charset=utf8,%3Cstyle%3Ebody%7Bmargin:0;padding:0%7D%3C/style%3E%3Cimg%20id=%22img%22%20src=%22https://raw.githubusercontent.com/chuxiuhong/cloudphoto/master/Lab4_4.png?_=5953498%22%20style=%22border:none;max-width:707px%22%3E%3Cscript%3Ewindow.onload%20=%20function%20()%20%7Bvar%20img%20=%20document.getElementById('img');%20window.parent.postMessage(%7BiframeId:'iframe_0.41228751700412647',width:img.width,height:img.height%7D,%20'http://www.cnblogs.com');%7D%3C/script%3E" frameborder="0" scrolling="no"></iframe>
-------
点击"Browse"
<iframe id="iframe_0.939138330035169" style="margin: 0px; padding: 0px; border-width: initial; border-style: none; width: 707px; height: 470px;" src="data:text/html;charset=utf8,%3Cstyle%3Ebody%7Bmargin:0;padding:0%7D%3C/style%3E%3Cimg%20id=%22img%22%20src=%22https://raw.githubusercontent.com/chuxiuhong/cloudphoto/master/Lab4_5.png?_=5953498%22%20style=%22border:none;max-width:707px%22%3E%3Cscript%3Ewindow.onload%20=%20function%20()%20%7Bvar%20img%20=%20document.getElementById('img');%20window.parent.postMessage(%7BiframeId:'iframe_0.939138330035169',width:img.width,height:img.height%7D,%20'http://www.cnblogs.com');%7D%3C/script%3E" frameborder="0" scrolling="no"></iframe>
在打开的页面内选择已经解压好的文件夹中的bin文件夹内的"VisualVM.exe"
##checkstyle使用
1.安装完之后,我们打开checkstyles,点击绿色箭头
<iframe id="iframe_0.03204423183949334" style="margin: 0px; padding: 0px; border-width: initial; border-style: none; width: 707px; height: 156px;" src="data:text/html;charset=utf8,%3Cstyle%3Ebody%7Bmargin:0;padding:0%7D%3C/style%3E%3Cimg%20id=%22img%22%20src=%22https://raw.githubusercontent.com/chuxiuhong/cloudphoto/master/Lab4_6.png?_=5953498%22%20style=%22border:none;max-width:707px%22%3E%3Cscript%3Ewindow.onload%20=%20function%20()%20%7Bvar%20img%20=%20document.getElementById('img');%20window.parent.postMessage(%7BiframeId:'iframe_0.03204423183949334',width:img.width,height:img.height%7D,%20'http://www.cnblogs.com');%7D%3C/script%3E" frameborder="0" scrolling="no"></iframe>
2.出现提示"No rules file has been configured",这是提醒我们没有为其指定配置文件,它不知道应该按照什么标准来评判代码的风格
3.解决办法:打开settings->Other Settings->Checkstyle ,选定默认的配置文件。
<iframe id="iframe_0.3206956070117455" style="margin: 0px; padding: 0px; border-width: initial; border-style: none; width: 707px; height: 476px;" src="data:text/html;charset=utf8,%3Cstyle%3Ebody%7Bmargin:0;padding:0%7D%3C/style%3E%3Cimg%20id=%22img%22%20src=%22https://raw.githubusercontent.com/chuxiuhong/cloudphoto/master/Lab4_8.png?_=5953498%22%20style=%22border:none;max-width:707px%22%3E%3Cscript%3Ewindow.onload%20=%20function%20()%20%7Bvar%20img%20=%20document.getElementById('img');%20window.parent.postMessage(%7BiframeId:'iframe_0.3206956070117455',width:img.width,height:img.height%7D,%20'http://www.cnblogs.com');%7D%3C/script%3E" frameborder="0" scrolling="no"></iframe>
4.回到步骤一的页面,重新运行checkstyles
,得到检查错误。通过点击不同的感叹号可以选定观察不同优先级的错误。
-------
<iframe id="iframe_0.20734662964269557" style="margin: 0px; padding: 0px; border-width: initial; border-style: none; width: 707px; height: 176px;" src="data:text/html;charset=utf8,%3Cstyle%3Ebody%7Bmargin:0;padding:0%7D%3C/style%3E%3Cimg%20id=%22img%22%20src=%22https://raw.githubusercontent.com/chuxiuhong/cloudphoto/master/Lab4_9.png?_=5953498%22%20style=%22border:none;max-width:707px%22%3E%3Cscript%3Ewindow.onload%20=%20function%20()%20%7Bvar%20img%20=%20document.getElementById('img');%20window.parent.postMessage(%7BiframeId:'iframe_0.20734662964269557',width:img.width,height:img.height%7D,%20'http://www.cnblogs.com');%7D%3C/script%3E" frameborder="0" scrolling="no"></iframe>
FindBugs的使用
1.在代码编辑页面点击右键,根据检查对象的不同选择不同选项。
<iframe id="iframe_0.26614825315877266" style="margin: 0px; padding: 0px; border-width: initial; border-style: none; width: 707px; height: 394px;" src="data:text/html;charset=utf8,%3Cstyle%3Ebody%7Bmargin:0;padding:0%7D%3C/style%3E%3Cimg%20id=%22img%22%20src=%22https://raw.githubusercontent.com/chuxiuhong/cloudphoto/master/Lab4_10.png?_=5953498%22%20style=%22border:none;max-width:707px%22%3E%3Cscript%3Ewindow.onload%20=%20function%20()%20%7Bvar%20img%20=%20document.getElementById('img');%20window.parent.postMessage(%7BiframeId:'iframe_0.26614825315877266',width:img.width,height:img.height%7D,%20'http://www.cnblogs.com');%7D%3C/script%3E" frameborder="0" scrolling="no"></iframe>
2.得到检查结果
<iframe id="iframe_0.26828942453542126" style="margin: 0px; padding: 0px; border-width: initial; border-style: none; width: 707px; height: 262px;" src="data:text/html;charset=utf8,%3Cstyle%3Ebody%7Bmargin:0;padding:0%7D%3C/style%3E%3Cimg%20id=%22img%22%20src=%22https://raw.githubusercontent.com/chuxiuhong/cloudphoto/master/Lab4_11.png?_=5953498%22%20style=%22border:none;max-width:707px%22%3E%3Cscript%3Ewindow.onload%20=%20function%20()%20%7Bvar%20img%20=%20document.getElementById('img');%20window.parent.postMessage(%7BiframeId:'iframe_0.26828942453542126',width:img.width,height:img.height%7D,%20'http://www.cnblogs.com');%7D%3C/script%3E" frameborder="0" scrolling="no"></iframe>
##PMD的使用
1.在代码编辑区点击右键,根据项目不同选择不同的检查规则集
<iframe id="iframe_0.24337408243565806" style="margin: 0px; padding: 0px; border-width: initial; border-style: none; width: 707px; height: 487px;" src="data:text/html;charset=utf8,%3Cstyle%3Ebody%7Bmargin:0;padding:0%7D%3C/style%3E%3Cimg%20id=%22img%22%20src=%22https://raw.githubusercontent.com/chuxiuhong/cloudphoto/master/Lab4_12.png?_=5953498%22%20style=%22border:none;max-width:707px%22%3E%3Cscript%3Ewindow.onload%20=%20function%20()%20%7Bvar%20img%20=%20document.getElementById('img');%20window.parent.postMessage(%7BiframeId:'iframe_0.24337408243565806',width:img.width,height:img.height%7D,%20'http://www.cnblogs.com');%7D%3C/script%3E" frameborder="0" scrolling="no"></iframe>
2.在下方按照不同规则集显示出不同位置的错误,通过规则名就可以得知代码的问题类型
<iframe id="iframe_0.43790989609077924" style="margin: 0px; padding: 0px; border-width: initial; border-style: none; width: 707px; height: 229px;" src="data:text/html;charset=utf8,%3Cstyle%3Ebody%7Bmargin:0;padding:0%7D%3C/style%3E%3Cimg%20id=%22img%22%20src=%22https://raw.githubusercontent.com/chuxiuhong/cloudphoto/master/Lab4_13.png?_=5953498%22%20style=%22border:none;max-width:707px%22%3E%3Cscript%3Ewindow.onload%20=%20function%20()%20%7Bvar%20img%20=%20document.getElementById('img');%20window.parent.postMessage(%7BiframeId:'iframe_0.43790989609077924',width:img.width,height:img.height%7D,%20'http://www.cnblogs.com');%7D%3C/script%3E" frameborder="0" scrolling="no"></iframe>
##VisualVM的使用
1.在代码编辑区点击右键,如图选择
<iframe id="iframe_0.39601137654247176" style="margin: 0px; padding: 0px; border-width: initial; border-style: none; width: 707px; height: 311px;" src="data:text/html;charset=utf8,%3Cstyle%3Ebody%7Bmargin:0;padding:0%7D%3C/style%3E%3Cimg%20id=%22img%22%20src=%22https://raw.githubusercontent.com/chuxiuhong/cloudphoto/master/Lab4_14.png?_=5953498%22%20style=%22border:none;max-width:707px%22%3E%3Cscript%3Ewindow.onload%20=%20function%20()%20%7Bvar%20img%20=%20document.getElementById('img');%20window.parent.postMessage(%7BiframeId:'iframe_0.39601137654247176',width:img.width,height:img.height%7D,%20'http://www.cnblogs.com');%7D%3C/script%3E" frameborder="0" scrolling="no"></iframe>
2.这时会触发VisualVM客户端,可以观察项目内的性能使用情况
<iframe id="iframe_0.9897732778795818" style="margin: 0px; padding: 0px; border-width: initial; border-style: none; width: 707px; height: 506px;" src="data:text/html;charset=utf8,%3Cstyle%3Ebody%7Bmargin:0;padding:0%7D%3C/style%3E%3Cimg%20id=%22img%22%20src=%22https://raw.githubusercontent.com/chuxiuhong/cloudphoto/master/Lab4_15.png?_=5953498%22%20style=%22border:none;max-width:707px%22%3E%3Cscript%3Ewindow.onload%20=%20function%20()%20%7Bvar%20img%20=%20document.getElementById('img');%20window.parent.postMessage(%7BiframeId:'iframe_0.9897732778795818',width:img.width,height:img.height%7D,%20'http://www.cnblogs.com');%7D%3C/script%3E" frameborder="0" scrolling="no"></iframe>