Idea忽略不必要的警告

1、拼写警告

  表象:当自定义变量不是一个单词时,会有以下警告,

  Inspection info: Spellchecker inspection helps locate typos and misspelling in your code, comments and literals, and fix them in one click

  翻译后:拼写检查器检查可以帮助查找拼写错误拼写错误代码 注释文本 修复它们一次点击

  解决办法1:  

     双击下面有虚线的单词——>鼠标右键——>spelling——>save 'xxx' to distionary

  解决办法2:如图,preferences->Editor->Inspections-Spelling->Typo,取消勾选

      

2、Method is never used

  表象:类,对象,方法,变量不分权限全部提醒

  解决办法:私有对象,私有方法,变量需要警告,共有的不需要警告

    preferences->Editor->Inspections->Java->Declaration redundancy->Unsed declaration。设置类,方法,对象,变量的访问权限

3、代码重复提醒

  表象:重复代码,会提示Finds duplicated code

  解决办法1:对重复功能进行封装

  解决办法2:preferences->Editor->Inspections->General->Duplicated  Code 取消勾选

  

4、 错误标签(Wrong tag)

   表象:- no javadoc where it is required  - required tag is missing  - invalid or incomplete tag  - javadoc description is missing or incomplete

   解决:preferences->Editor->Inspections->JavaDoc  取消勾选

     

 

5、变量重新分配地址或参数

  表象:变量下有__

  

 

   解决办法:preferences->Editor->Color Scheme->language Defaults->...  如图

  

 

 6、XML错误警告

  表象:References to the non-instantiable classes ,References to the classes that do not extend required class ,References to classes with inappropriate scope ,Empty tag and attribute values,

      Tag and attribute values that do not match required pattern (e.g. Java Identifiers),Tags that do not include required children tags or attributes,Tags that define objects with duplicate names

  

  解决办法:preferences->Editor->Inspections->General

  

7、创建类时,偶尔出现Cannot create Class,Unable to parse template

  解决办法:Help->Edit Custom VM Options...

   在文件末尾增加:-Djdk.util.zip.ensureTrailingSlash=false,重启idea

  

8、idea开启时停留在项目选择页

 

posted on 2020-02-23 17:19  那只猴子  阅读(8646)  评论(0编辑  收藏  举报

导航