Author: sdzmitrovich
Date: 2009-01-19 08:36:15 -0500 (Mon, 19 Jan 2009)
New Revision: 13112
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/CSSModel.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3577
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/CSSModel.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/CSSModel.java 2009-01-19
08:06:12 UTC (rev 13111)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/CSSModel.java 2009-01-19
13:36:15 UTC (rev 13112)
@@ -269,10 +269,14 @@
CSSStyleDeclaration declaration = rule.getStyle();
// set properties
Set<Entry<String, String>> set = styleAttributes.entrySet();
- for (Map.Entry<String, String> me : set) {
- declaration.setProperty(me.getKey(), me.getValue(),
- Constants.EMPTY);
- }
+
+ if ((set.size() == 0) && (declaration.getLength()>0))
+ declaration.setCssText(Constants.EMPTY);
+ else
+ for (Map.Entry<String, String> me : set) {
+ declaration.setProperty(me.getKey(), me.getValue(),
+ Constants.EMPTY);
+ }
}
formatProcessorCSS.formatModel(model);