Thursday Mar 11, 2010

CSS: Goto Declaration

There is a new feature that allows navigate to CSS class or id selector declaration from CLASS or ID attribute of an HTML tag. When you go over a usage of  a class or id selector with mouse pointer and the CTRL key is hold, then the selector is change to a link. The link navigates to the declaration. 

The picture below displays the navigation from td tag in an HTML file to the CSS file, where the header_top class selector is defined.

When there are more declarations that fit the selector name, than a popup window is displayed, where you can select the file. The red (unrelated) mark means that there is no direct connection between the usage and the declaration.


As you can see the features works in HTML files and PHP as well.

Thursday Feb 25, 2010

Code Completion for Colors in CSS

Another improvements that is based on your comments is code completion for colors in CSS rules. The code completion for color and background property offers now at first position an item that opens color chooser. 

There is a standard Java color chooser and when you select a color in the chooser, the color is completed. The chooser remembered last selected color and also the item in code completion has an icon (small square) with the last selected color.

The color chooser above is from Linux platform. On Mac and Windows machine the color chooser looks like on the picture below and it looks better. If there will be time, the standard Java color chooser component will be replaced with a custom component, that should be better for web developer purpose.


If you look at the first picture, there are black and gray color code completion items. The black color items are used in the edited file and the gray color items are colors that are used in other CSS files in the project.

In the same way works code completion for color and background property of a style in HTML and PHP files.


Tuesday Feb 23, 2010

CSS Code Completion

Today I don't continue in formatting posts:). I would like to mentioned the CSS code completion in html tags. It's new feature, that is also available in NetBeans 6.9 M1 build. Because the CSS files are now indexed, it allows to provide better support for CSS  in HTML and PHP files as well. The code completion is one of the visible benefit.


The picture above displays a page from WordPress project, where you can see code completion for class attribute of div tag. The code completion window offers all selectors for classes, that were found in the project. A selector in code completion window can have two colors. The green color means that the selector is defined inside the file or in a file which is referred by this one or the style is already used in the file. Selectors that have gray color are available in the project, but don't meet the condition that is mentioned above.

Similarly the code completion is available for id attribute of HTML tags, where the appropriate selectors are offered.

About

This blogs is written by NetBeans developers who contribute to the PHP support mainly.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today