This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 120701

Summary: Style builder breaks code while adding two semicolons
Product: web Reporter: Jindrich Sedek <jsedek>
Component: CSS Visual ToolsAssignee: Marek Fukala <mfukala>
Status: VERIFIED FIXED    
Severity: blocker CC: jjancura, pjiricka, ttran
Priority: P1 Keywords: REGRESSION
Version: 6.x   
Hardware: Sun   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Jindrich Sedek 2007-10-31 18:57:47 UTC
Create new CSS file
set cursor into root rule
select some font in style builder
two semicolons are added at the end of line and the code is broken so
----------------------------
root { 
    display: block;;
    font-family: 'Times New Roman',Times,serif;
}
----------------------------
There are two issues in steps 
1) two semicolons are correct code so it can appear and no error should be highlighted
2) two semicolons should not be added, because there is no reason for it
   - both issues are "P2 - P3", but broken code disables style builder and preview totally, it's not possible to use it 
at all
please fix at least one of problems and downgrade priority
Comment 1 Marek Fukala 2007-10-31 22:45:14 UTC
When the regression happened??? I belive it worked recently and I didn't do any change in the css editor! I'll look at
it ASAP.
Comment 2 Jindrich Sedek 2007-11-01 08:18:06 UTC
It must be a regression of this week, I was working with it last week and it worked well.
Comment 3 Petr Hejl 2007-11-01 11:29:06 UTC
From what I saw I think the AST is now different from that expected by CssModel.updateModel().
Comment 4 Petr Hejl 2007-11-01 14:19:06 UTC
Imo its a regression caused by some changes made recently by jjancura in css editor support module.
Comment 5 Marek Fukala 2007-11-01 14:30:04 UTC
Petre, I work on fix for this, do not loose your time.
Comment 6 Marek Fukala 2007-11-02 22:16:10 UTC
The parse tree after the Hanze's recent fix of css grammar is very unfortunate - the declarations are recursivelly
nested together instead of being on the same path-level), but we agreed that it is risky to change it now. I'll modify
the css model accoring to the current structure, but after 6.0 I would like to revert and properly fix the grammar.
Comment 7 Marek Fukala 2007-11-03 09:29:23 UTC
fixed

Checking in CssModel.java;
/cvs/web/css/src/org/netbeans/modules/css/model/CssModel.java,v  <--  CssModel.java
new revision: 1.16; previous revision: 1.15
done
Checking in CssRuleItem.java;
/cvs/web/css/src/org/netbeans/modules/css/model/CssRuleItem.java,v  <--  CssRuleItem.java
new revision: 1.6; previous revision: 1.5
done
Comment 8 Jindrich Sedek 2007-11-04 13:03:30 UTC
*** Issue 121075 has been marked as a duplicate of this issue. ***
Comment 9 Jindrich Sedek 2007-11-04 13:16:56 UTC
verified.
NetBeans IDE Dev (Build 200711040000)