简体   繁体   English

如何在NetBeans中禁用“HTML检查”?

[英]How can I disable “HTML Checking” in NetBeans?

I'm using NetBean's Compile on Save setting, and it's really handy when I'm editing a single file. 我正在使用NetBean的Compile on Save设置,当我编辑单个文件时它非常方便。 But when I'm dealing with a pair of (or more) class files and am switching between the files, I have a problem: 但是,当我处理一对(或更多)类文件并在文件之间切换时,我遇到了一个问题:

The Task tab is nearly worthless since it is littered by HTML "error" messages(+) from many dozens of HTML files in the project that are generated by some external tool. 任务”选项卡几乎一文不值,因为项目中由许多外部工具生成的许多HTML文件中的HTML“错误”消息(+)散落在其中。 The number of HTML errors swamps out any actual Java errors. HTML错误的数量淹没了任何实际的Java错误。

What I want is one of: 我想要的是以下之一:

  1. A way to tell NB to ignore the directory with the HTML files ("help"). 一种告诉NB忽略HTML文件目录(“帮助”)的方法。
  2. A way to turn off HTML "errors" or even to specify HTML2. 一种关闭HTML“错误”甚至指定HTML2的方法。
  3. A way to filter "Task" errors by file type, parent folder: all Java is under "com". 一种按文件类型,父文件夹过滤“任务”错误的方法:所有Java都在“com”下。

I've perused the settings and properties, but found nothing that helps. 我仔细研究了设置和属性,但没有发现任何有用的东西。

<rant> Yet another reason I hate an IDE that use the "Take Everything in the Folder" approach.... </rant> <rant>我讨厌使用“Take thething in the Folder”方法的IDE的另一个原因...... </ rant>

+ = The files are valid HTML but probably not XHTML. + =文件是有效的HTML,但可能不是XHTML。 Plus, half the messages end abruptly, with something like: " Unexpected tag <TD> found, expecting one of 另外,一半的消息突然结束,例如:“ Unexpected tag <TD> found, expecting one of

I found the answer, or at least one that works for me (NB 6.8, YMMV ): 我找到了答案,或者至少一个对我有用的答案(NB 6.8, YMMV ):

  1. In the Tasks tab, click the filter button in the left, 在“ 任务”选项卡中,单击左侧的过滤器按钮,
  2. Choose Edit... 选择编辑...
  3. In the Task List Filter dialog: 任务列表过滤器对话框中:

    • Click New 单击新建
    • Enter a value for Name (such as "No Script Messages"), 输入Name的值(例如“No Script Messages”),
    • Uncheck the Scripting Language Tasks option 取消选中“ 脚本语言任务”选项
    • Click OK . 单击确定
  4. If the filter doesn't work immediately, you may wish to close/open the Task window or Netbeans. 如果过滤器不能立即生效,您可能希望关闭/打开“ 任务”窗口或Netbeans。

Hope that helps someone else. 希望能帮助别人。

I want to use task list to only track my To Do list and It can be a real pain when Netbeans starts showing me @todos from included libraries and all sort of compile errors that I am not interested in. If your use case is like me (not interested in compile errors etc. in task window) then you can do following:- (Netbeans 7.1.2) 我想使用任务列表来跟踪我的待办事项列表,当Netbeans从包含的库中显示@todos以及我不感兴趣的所有类型的编译错误时,这可能是一个真正的痛苦。如果你的用例像我一样(对任务窗口中的编译错误等不感兴趣)然后你可以执行以下操作: - (Netbeans 7.1.2)

1) Tasks window | 1)任务窗口| Right click filter | 右键单击过滤器| Edit 编辑

To edit the default filter. 编辑默认过滤器。 Click default filter in left hand panel. 单击左侧面板中的默认过滤器。 Right hand panel, under Type tab - un-check compile errors and issues 右键面板,在“类型”选项卡下 - 取消选中编译错误和问题

2) You can go to Tools | 2)你可以去工具| Options | 选项| Miscellaneous

Go to Tasks tab now. 立即转到“任务”选项卡。

Here you can add/remove the To Do strings that you want. 在这里,您可以添加/删除所需的待办事项字符串。 You can create your own custom todo string or make sure that only one of them is listed (what you use) 您可以创建自己的自定义待办事项字符串,或确保只列出其中一个(您使用的是什么)

Now apply default filter and you will only see your @todo tasks. 现在应用默认过滤器,您只能看到@todo任务。 sane and sweet :D 理智而甜蜜:D

You can go to Tools->options->Editor->Hint . 您可以转到工具 - >选项 - >编辑器 - >提示。 You can easily select the right options from there . 您可以从那里轻松选择正确的选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM