Author: scabanovich
Date: 2009-11-12 11:23:37 -0500 (Thu, 12 Nov 2009)
New Revision: 18656
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/DefaultValueAdapter.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/StringButtonFieldEditorEx.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2024
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/DefaultValueAdapter.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/DefaultValueAdapter.java 2009-11-12
16:01:44 UTC (rev 18655)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/DefaultValueAdapter.java 2009-11-12
16:23:37 UTC (rev 18656)
@@ -129,8 +129,11 @@
public void fireValueChange(Object oldValue, Object newValue) {
if(pcs != null) pcs.firePropertyChange(IPropertyEditor.VALUE, oldValue, newValue);
}
-
+ public void fireEvent(String propertyName, Object oldValue, Object newValue) {
+ if(pcs != null) pcs.firePropertyChange(propertyName, oldValue, newValue);
+ }
+
// IValueProvider
public void addValueChangeListener(PropertyChangeListener l) {
if (pcs!=null) pcs.addPropertyChangeListener(l);
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/StringButtonFieldEditorEx.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/StringButtonFieldEditorEx.java 2009-11-12
16:01:44 UTC (rev 18655)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/StringButtonFieldEditorEx.java 2009-11-12
16:23:37 UTC (rev 18656)
@@ -201,6 +201,9 @@
protected String changePressed() {
if (propertyEditor!=null) {
+ if(propertyEditor.getInput() instanceof DefaultValueAdapter) {
+ ((DefaultValueAdapter)propertyEditor.getInput()).fireEvent(BUTTON_SELECTED,
"false", "true");
+ }
if(((PropertyEditor)propertyEditor).callsExternal()) {
Object result = ((PropertyEditor)propertyEditor).callExternal(getShell());
return result != null ? result.toString() : null;