15

I am developping a website using netbeans and I wondered the following:

How do I disable the error checking of a particular file? I am using some CSS hacks and some CSS3 stuff that doesn't seem to be support by Netbeans and it shows a couple hundred errors and warnings in the "Action Items". So I wanted to know if there was a way to remove these specific files from being debugged by Netbeans so I could over-see the real errors and warnings?

Álvaro González
  • 142,137
  • 41
  • 261
  • 360
maaudet
  • 2,338
  • 4
  • 20
  • 28

1 Answers1

9

This issue was raised on the netbeans forum here. Consequently a bug has been raised and appears to have been fixed, details can be found here. The fix says that:

Now there's an editor hint allowing to disable the warning about an unknown property. The settings is global. Once you disable at least one property check, there's a new hint at the very first line of each file containing the disabled property which you can use to reenable the checking back.

Encase you are not that familiar with the hints in netbeans, this suggests that the properties netbeans doesn't like will be underlined in yellow and you should be able to click on them, press alt+enter and then an option to disable the warning will appear (I apoligise if you are familiar, I just added for a verbose answer)

EDIT- Misunderstood Question:

To change what is being shown in the Action Items window, you can apply a filter and/or change the scope of the window.

To change the scope right-click inside the Action Items window and click on scope then choose the option. Use this if the unwanted warnings that are being generated are happening in a different file or project to the one you are trying to debug.

You can also apply a filter to the window to get rid of specific messages that share a common atribute e.g. if hypothetically all of your unwanted warnings contain the String "CSSHackWarning" then you can filter out all warning messages that contain that String from being shown.

This can be done by right-clicking on the Action Items window and choosing filter->edit... then creating a new filter an clicking the keywords tab. For more detail, please see here. (Note: pre NetBeans 7.2 the Action Items window was known as the tasks window)

Sorry for the confusion, hope this is more along the lines of what you wanted.

Chris B
  • 925
  • 4
  • 14
  • @Manhim Do you mean you don't get yellow underlining or alt+enter doesn't work? Also can you tell me what version of NetBeans your using and what OS please. – Chris B Aug 30 '12 at 18:15
  • 2
    I'm actually asking about the inverse. I want to hide warnings and errors from specific files because they are not real errors (They have CSS hacks). I'm using Netbeans 7.2 on Windows 7 x64. – maaudet Aug 30 '12 at 19:46
  • @Manhim Ah okay I miss understood you, Sorry. I'll edit my answer. – Chris B Aug 30 '12 at 20:34
  • 3
    Nice thanks! I have added the files in question in the filters list as "Do not contain". Didn't knew we could do that from there! – maaudet Aug 31 '12 at 13:06
  • thx for the tip with the filter. What concerns me now, is, if there is a possibility to also disable the error icons on filtered files in the project view? – mondjunge Oct 21 '13 at 12:26
  • I did that, how can I return these messages now? Please help. – Yevgeniy Afanasyev Jun 07 '19 at 06:56
  • The link in your answer is outdated and does not lead to the proper place. The simple answer to the question is now: open a css file that shows an error badge; Use alt+enter on one of the error icons; select "Filter out CSS parsing errors ..." – Enwired Oct 20 '22 at 00:51