Author: sdzmitrovich
Date: 2009-05-29 11:23:06 -0400 (Fri, 29 May 2009)
New Revision: 15605
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/AbstractCSSDialog.java
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-4391
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/AbstractCSSDialog.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/AbstractCSSDialog.java 2009-05-29
14:59:38 UTC (rev 15604)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/AbstractCSSDialog.java 2009-05-29
15:23:06 UTC (rev 15605)
@@ -58,6 +58,8 @@
private StyleComposite styleComposite;
private DataBindingContext bindingContext = new DataBindingContext();
+
+ private AggregateValidationStatus aggregateStatus;
private IStatus status = Status.OK_STATUS;
@@ -114,7 +116,7 @@
});
- AggregateValidationStatus aggregateStatus = new AggregateValidationStatus(
+ aggregateStatus = new AggregateValidationStatus(
getBindingContext().getValidationStatusProviders(),
AggregateValidationStatus.MAX_SEVERITY);
aggregateStatus.addValueChangeListener(new IValueChangeListener() {
@@ -244,9 +246,14 @@
return html.toString();
}
+
+ public void releaseResources() {
+ aggregateStatus.dispose();
+ }
@Override
public boolean close() {
+ releaseResources();
return super.close();
}
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-05-29
14:59:38 UTC (rev 15604)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java 2009-05-29
15:23:06 UTC (rev 15605)
@@ -257,8 +257,11 @@
classCombo.select(classCombo.getItemCount() - 1);
}
+
+ @Override
public void releaseResources() {
+ super.releaseResources();
preview.releaseModel();
if (cssModel != null) {
@@ -298,7 +301,6 @@
default:
// make some closure operation
}
- releaseResources();
return super.close();
}
@@ -320,7 +322,8 @@
protected void handleStyleChanged() {
super.handleStyleChanged();
- applyButton.setEnabled(true);
+ if (getStatus().isOK())
+ applyButton.setEnabled(true);
}