Geertjan's Blog

  • October 22, 2014

Editor Tools for CSS in NetBeans IDE (Part 1)

Geertjan Wielenga
Product Manager

When you're inside a CSS file in NetBeans IDE, press Alt-Insert, and then you can call up this dialog, to insert new CSS rules into the CSS file:

When OK is clicked above, the skeleton of a new CSS rule is inserted into the CSS file.

Next, when you're using your CSS rules, such as below, there are some cool things you can do.

Firstly, press Alt-F7 above, i.e., while you've selected the name of a rule that you've defined, and then a search of all usages is done, same as is done in Java source files and other kinds of files, with the same kind of result:

And then you can click on the items above to jump to the file and the line where they're defined. The above is totally different to a text search, for example, if I have "menu" somewhere in the comments, which is more than likely, that instance of "menu" will not be found  since it is not a usage of the "menu" class.

Secondly, when you press Ctrl-R, while the "menu" class above is selected in an HTML file, you call up the in-place rename dialog, just like you would do in a Java source file. Then you can rename "menu", which will also rename all occurrences of "menu", e.g., in the CSS file where that rule is defined.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.