Netbeans CSS Not Hinting All Properties

netbeans 8.2 css grid warnings and errors

This question is closely related to another on SO, but it is not a duplicate: Netbeans CSS not hinting all properties.

That post related to NetBeans not providing auto-completion hints for certain valid values of the CSS display property. Your question shows that the problem is more extensive and more serious in several ways:

  • It is not just CSS display values that are not offered by autocomplete in NetBeans. For example, the properties row-gap and grid-column-gap are not suggested, yet column-gap is!
  • The problem is not confined to auto-complete being unhelpful. It appears that any valid property value which is not offered by autocomplete will also be reported as a CSS parsing error by NetBeans when used in CSS code. For example, autocomplete does not offer grid-column-gap as an option, and it is also reported as an error: "Unknown property grid-column-gap".
  • Although autocomplete does not offer grid or flex as options for the display property, their use is not treated as an error when used in CSS code, but that is because any value for display is accepted.
  • As you point out, the more insidious aspect of the bogus reporting of errors is that it can make it harder to identify real problems in your CSS code.

NetBeans allows you to filter out specific parsing errors, or all parsing errors in a file or the entire project, but none of those options really help. Unfortunately I don't know of any real solution in the short term; NetBeans needs to be fixed.

I have updated an existing NetBeans Bug Report to clarify that the problem is more serious and extensive than originally reported. Also, the issue is not fixed with Apache NetBeans 9.0 RC1.

The only good news is that despite NetBeans incorrectly reporting errors for some valid CSS properties the application will run just fine, but you probably know that already.

I'll update this answer when there is a fix for this issue in NetBeans.

CSS identifier hints in NetBeans 7.1 IDE

If you write single letter of desired value it will pop-up after second or two ( or at least it do on my Netbeans 7.0 )

or hit Ctrl + Space

Exclude files from syntax checking in NetBeans

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.

NetBeans HTML Code Hinting/Completion for Attributes

If you create a new file of type "HTML" (using file->new file, type->other->html), the attributes will be suggested when you open, say a "" tab. This, I assume, is what you are looking for (me too!). However, I have noticed that you do not get the same if you create a "php web page",
Sorry this does not completely answer the question but it may point you in the right directon. Netbeans needs to be configured to apply the same intellisense dictionary to a php web page (and whatever type of webpage you are editing) that it applies to a html type page

JavaFX: CSS Dropdown Menu not Appearing In Netbeans IDE

Autocomplete for JavaFX CSS works for me in NetBeans.

Screenshot

netbeanscompletion

The screenshot was made using NetBeans 7.4 and editing a CSS file in a NetBeans JavaFX project. The auto-complete pop-ups were brought up by typing -fx, then pressing CTRL + SPACE.

Errata

You will notice the weird No documentation found text, which is related to NetBeans feature request 215171 (which hasn't been implemented in NetBeans 7.4). This means that the auto-complete works, it just doesn't provide any supporting context sensitive reference documentation on what the CSS means - to determine that you will need to manually look-up the information in the JavaFX CSS reference guide.

Caveat

The auto-complete for JavaFX CSS only works for a JavaFX project type, if you create a NetBeans Java Application project rather than a JavaFX Application project, then the autocomplete will just autocomplete regular HTML CSS attributes rather than JavaFX CSS Attributes, as you can see by the screenshot below which attempts an autocomplete on the same css file copied into a regular Java project.

netbeanscompletionfail

How to disable the annoying NetBeans auto-suggest while typing

I finally found the solution for this annoying problem:

Simply go to Tools/Palette/Code Clips and remove everything from Palette (all folders and items).

Now the problem is gone!

Apache NetBeans 11.1 JavaScript Highlighting Not Working

You need to activate the HTML5 plugin.
Select Tools > Plugins to open the NetBeans Plugins manager. Click the Installed tab then select the HTML5 plugin, which I think is installed by default, and click Activate



Related Topics



Leave a reply



Submit