Author: sdzmitrovich
Date: 2009-01-19 09:18:43 -0500 (Mon, 19 Jan 2009)
New Revision: 13113
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3579
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java 2009-01-19
13:36:15 UTC (rev 13112)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java 2009-01-19
14:18:43 UTC (rev 13113)
@@ -12,6 +12,7 @@
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
@@ -594,7 +595,14 @@
}
}
// update current class style value
- currentClassStyle = classCombo.getText().trim();
+ currentClassStyle = classCombo.getText().trim();
+
+ boolean inputNewClass = Arrays.binarySearch(classCombo.getItems(),
+ currentClassStyle) < 0;
+ // if new css was added
+ applyButton.setEnabled(inputNewClass);
+ classCombo.add(currentClassStyle);
+
styleComposite.revertPreview();
updateStyleComposite();
styleAttributes.setCssSelector(currentClassStyle);