Author: scabanovich
Date: 2008-10-06 11:44:23 -0400 (Mon, 06 Oct 2008)
New Revision: 10695
Removed:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/core/jdt/AllTypesCache.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/core/jdt/TypeInfoRequestor.java
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/IAttributeErrorProvider.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/XAttributePropertyDescription.java
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/XChildrenTableStructuredAdapter.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ComboBoxCellEditorEx.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ComboBoxFieldEditor.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ExtendedFieldEditor.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/IPropertyEditor.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ListSelectionFieldEditor.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ListStructuredFieldEditor.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/MultipleChoiceFieldEditor.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/NoteFieldEditor.java
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/StringFieldEditorEx.java
Log:
JBIDE-2802
Deleted:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/core/jdt/AllTypesCache.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/core/jdt/AllTypesCache.java 2008-10-06
15:37:26 UTC (rev 10694)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/core/jdt/AllTypesCache.java 2008-10-06
15:44:23 UTC (rev 10695)
@@ -1,186 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.common.core.jdt;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Comparator;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jdt.core.ElementChangedEvent;
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.IElementChangedListener;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IJavaElementDelta;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.core.search.IJavaSearchConstants;
-import org.eclipse.jdt.core.search.IJavaSearchScope;
-import org.eclipse.jdt.core.search.SearchEngine;
-import org.eclipse.jdt.core.search.SearchPattern;
-import org.eclipse.jdt.core.search.TypeNameMatch;
-
-public class AllTypesCache {
-
- private static TypeNameMatch[] cache = null;
- private static int fgSizeHint= 2000;
-
- private static int fgNumberOfCacheFlushes= 0;
-
- private static class TypeNameComparator implements Comparator {
- public int compare(Object o1, Object o2) {
- return
((TypeNameMatch)o1).getSimpleTypeName().compareTo(((TypeNameMatch)o2).getSimpleTypeName());
- }
- }
-
- private static Comparator fgTypeNameComparator= new TypeNameComparator();
-
- /**
- * Returns all types in the given scope.
- * @param kind IJavaSearchConstants.CLASS, IJavaSearchConstants.INTERFACE
- * or IJavaSearchConstants.TYPE
- * @param typesFound The resulting <code>TypeNameMatch</code> elements are
added to this collection
- */
- public static void getTypes(IJavaSearchScope scope, int kind, IProgressMonitor monitor,
Collection typesFound) throws JavaModelException {
- TypeNameMatch[] ts = getAllTypes(monitor);
- for (int i = 0; i < ts.length; i++) {
- TypeNameMatch info = (TypeNameMatch) cache[i];
- checkType(info, scope, kind, monitor, typesFound);
- }
- }
- private static void checkType(TypeNameMatch info, IJavaSearchScope scope, int kind,
IProgressMonitor monitor, Collection typesFound) throws JavaModelException {
- if (scope.equals(SearchEngine.createWorkspaceScope()) ||
scope.encloses(info.getType())) {
- if (kind == IJavaSearchConstants.TYPE || (kind == IJavaSearchConstants.INTERFACE ==
info.getType().isInterface())) {
- typesFound.add(info);
- }
- }
- }
-
-
- /**
- * Returns all types in the workspace. The returned array must not be
- * modified. The elements in the array are sorted by simple type name.
- */
- public static synchronized TypeNameMatch[] getAllTypes(IProgressMonitor monitor) throws
JavaModelException {
- if (cache == null) {
- int r = loadCache(monitor);
- if(r < 0) return null; else monitor = null;
- }
- if (monitor != null) {
- monitor.done();
- }
- return cache;
- }
- private static int loadCache(IProgressMonitor monitor) throws JavaModelException {
- ArrayList searchResult = new ArrayList(fgSizeHint);
- doSearchTypes(SearchEngine.createWorkspaceScope(), IJavaSearchConstants.TYPE, monitor,
searchResult);
- if (monitor != null && monitor.isCanceled()) {
- return -1;
- }
- cache = (TypeNameMatch[]) searchResult.toArray(new
TypeNameMatch[searchResult.size()]);
- Arrays.sort(cache, getTypeNameComperator());
- fgSizeHint= cache.length;
-
- JavaCore.addElementChangedListener(new TypeCacheDeltaListener());
- return 0;
- }
-
- /**
- * Returns true if the type cache is up to date.
- */
- public static boolean isCacheUpToDate() {
- return cache != null;
- }
-
- /**
- * Returns a compartor that compares the simple type names
- */
- public static Comparator getTypeNameComperator() {
- return fgTypeNameComparator;
- }
-
- private static void doSearchTypes(IJavaSearchScope scope, int style, IProgressMonitor
monitor, Collection typesFound) throws JavaModelException {
- new SearchEngine().searchAllTypeNames(
- null,
- null,
- SearchPattern.R_PATTERN_MATCH,
- style,
- scope,
- new TypeInfoRequestor(typesFound),
- IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,
- monitor);
- }
-
- private static class TypeCacheDeltaListener implements IElementChangedListener {
-
- /*
- * @see IElementChangedListener#elementChanged
- */
- public void elementChanged(ElementChangedEvent event) {
- boolean needsFlushing= processDelta(event.getDelta());
- if (needsFlushing) {
- cache= null;
- fgNumberOfCacheFlushes++;
- JavaCore.removeElementChangedListener(this); // it's ok to remove listener while
delta processing
- }
- }
-
- /*
- * returns true if the cache needs to be flushed
- */
- private boolean processDelta(IJavaElementDelta delta) {
- IJavaElement elem= delta.getElement();
- boolean isAddedOrRemoved= (delta.getKind() != IJavaElementDelta.CHANGED)
- || (delta.getFlags() & (IJavaElementDelta.F_ADDED_TO_CLASSPATH |
IJavaElementDelta.F_REMOVED_FROM_CLASSPATH)) != 0;
-
- switch (elem.getElementType()) {
- case IJavaElement.JAVA_MODEL:
- case IJavaElement.JAVA_PROJECT:
- case IJavaElement.PACKAGE_FRAGMENT_ROOT:
- case IJavaElement.PACKAGE_FRAGMENT:
- case IJavaElement.CLASS_FILE:
- case IJavaElement.TYPE: // type children can be inner classes
- if (isAddedOrRemoved) {
- return true;
- }
- return processChildrenDelta(delta);
- case IJavaElement.COMPILATION_UNIT: // content change means refresh from local
- if (((ICompilationUnit) elem).isWorkingCopy()) {
- return false;
- }
- if (isAddedOrRemoved || isPossibleStructuralChange(delta.getFlags())) {
- return true;
- }
- return processChildrenDelta(delta);
- default:
- // fields, methods, imports ect
- return false;
- }
- }
-
- private boolean isPossibleStructuralChange(int flags) {
- return (flags & (IJavaElementDelta.F_CONTENT | IJavaElementDelta.F_FINE_GRAINED))
== IJavaElementDelta.F_CONTENT;
- }
-
- private boolean processChildrenDelta(IJavaElementDelta delta) {
- IJavaElementDelta[] children= delta.getAffectedChildren();
- for (int i= 0; i < children.length; i++) {
- if (processDelta(children[i])) {
- return true;
- }
- }
- return false;
- }
- }
-
-
-}
Deleted:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/core/jdt/TypeInfoRequestor.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/core/jdt/TypeInfoRequestor.java 2008-10-06
15:37:26 UTC (rev 10694)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/core/jdt/TypeInfoRequestor.java 2008-10-06
15:44:23 UTC (rev 10695)
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.common.core.jdt;
-
-import java.util.Collection;
-
-import org.eclipse.jdt.core.search.TypeNameRequestor;
-
-
-public class TypeInfoRequestor extends TypeNameRequestor {
-
- public TypeInfoRequestor(Collection typesFound) {
- super(); // TODO-3.3: why is constructor taking typesFound as argument ? If API in 3.3
change why is the constructor here not changed ?
- }
-
- protected boolean inScope(char[] packageName, char[] typeName) {
- return true;
- }
-
-}
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/IAttributeErrorProvider.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/IAttributeErrorProvider.java 2008-10-06
15:37:26 UTC (rev 10694)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/IAttributeErrorProvider.java 2008-10-06
15:44:23 UTC (rev 10695)
@@ -10,7 +10,10 @@
******************************************************************************/
package org.jboss.tools.common.model.ui;
+import java.beans.PropertyChangeListener;
+
public interface IAttributeErrorProvider {
public boolean hasErrors();
public String getError();
+ public void addErrorStateListener(PropertyChangeListener l);
}
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/XAttributePropertyDescription.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/XAttributePropertyDescription.java 2008-10-06
15:37:26 UTC (rev 10694)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/XAttributePropertyDescription.java 2008-10-06
15:44:23 UTC (rev 10695)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.model.ui.attribute;
+import org.jboss.tools.common.model.impl.XModelImpl;
import org.jboss.tools.common.model.ui.*;
import org.jboss.tools.common.model.ui.attribute.adapter.*;
import org.jboss.tools.common.model.ui.attribute.editor.*;
@@ -56,7 +57,21 @@
// CellEditor
public CellEditor createPropertyEditor(Composite parent) {
- return (!isEditable()) ? null : propertyEditor.getCellEditor(parent);
+ if(!isEditable()) {
+ return null;
+ }
+ CellEditor editor = propertyEditor.getCellEditor(parent);
+ if(editor != null) {
+ editor.setValidator(new ICellEditorValidator() {
+ public String isValid(Object value) {
+ if(modelObject == null) return null;
+ String error = ((XModelImpl)modelObject.getModel()).getError(modelObject,
attribute.getName(), value == null ? "" : value.toString());
+ return error;
+ }
+
+ });
+ }
+ return (!isEditable()) ? null : editor;
}
// FieldEditor
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 2008-10-06
15:37:26 UTC (rev 10694)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/DefaultValueAdapter.java 2008-10-06
15:44:23 UTC (rev 10695)
@@ -25,12 +25,14 @@
import org.jboss.tools.common.model.XModel;
import org.jboss.tools.common.model.XModelException;
import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.impl.XModelImpl;
import org.jboss.tools.common.model.markers.XMarkerManager;
public class DefaultValueAdapter implements IModelPropertyEditorAdapter, IAdaptable {
protected Object value = "";
protected PropertyChangeSupport pcs = new PropertyChangeSupport(this);
+ protected PropertyChangeSupport pcs2 = new PropertyChangeSupport(this);
protected XModel model;
protected XAttribute attribute;
@@ -45,6 +47,10 @@
protected boolean autoStore = true;
protected boolean storeLocked = false;
+ protected String invalidValue = null;
+ protected String lastCorrectValue = null;
+ protected String currentError = null;
+
public DefaultValueAdapter() {}
public void store() {
@@ -54,6 +60,26 @@
if(v != null && attribute.isTrimmable()) v = v.trim();
String n = attribute.getName();
if(modelObject.isActive()) {
+
+ currentError = ((XModelImpl)modelObject.getModel()).getError(modelObject, n, v);
+
+ if(currentError != null) {
+ invalidValue = getStringValue(true);
+ lastCorrectValue = modelObject.getAttributeValue(n);
+ if(pcs2 != null) {
+ pcs2.firePropertyChange(IPropertyEditor.ERROR, Boolean.FALSE, Boolean.TRUE);
+ }
+ fireValueChange(v, v);
+ return;
+ } else {
+ boolean changed = invalidValue != null;
+ invalidValue = null;
+ lastCorrectValue = null;
+ if(changed && pcs2 != null) {
+ pcs2.firePropertyChange(IPropertyEditor.ERROR, Boolean.TRUE, Boolean.FALSE);
+ }
+ }
+
try {
modelObject.getModel().editObjectAttribute(modelObject, n, v);
} catch (XModelException e) {
@@ -75,7 +101,13 @@
public void load() {
if (MODELOBJECT_TARGET == storeTarget) {
- this.setValue(modelObject.getAttributeValue(attribute.getName()));
+ String value = modelObject.getAttributeValue(attribute.getName());
+ if(currentError != null && invalidValue != null) {
+ if(value != null && value.equals(lastCorrectValue)) {
+ return;
+ }
+ }
+ this.setValue(value);
} else {
this.setValue(attributeData.getValue());
}
@@ -103,6 +135,10 @@
public void removeValueChangeListener(PropertyChangeListener l) {
if (pcs!=null) pcs.removePropertyChangeListener(l);
}
+
+ public void addErrorStateListener(PropertyChangeListener l) {
+ if (pcs2!=null) pcs2.addPropertyChangeListener(l);
+ }
// IValueChangeListener
public void valueChange(PropertyChangeEvent event) {
@@ -186,11 +222,19 @@
public boolean hasErrors() {
if(ATTRIBUTEDATA_TARGET == storeTarget) return false;
+ if(invalidValue != null && currentError != null) {
+ return true;
+ }
return attribute != null && XMarkerManager.getInstance().hasErrors(modelObject,
attribute.getName());
}
public String getError() {
if(modelObject == null || attribute == null) return null;
+ if(ATTRIBUTEDATA_TARGET != storeTarget) {
+ if(invalidValue != null && currentError != null) {
+ return currentError;
+ }
+ }
return XMarkerManager.getInstance().getError(modelObject, attribute.getName());
}
}
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/XChildrenTableStructuredAdapter.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/XChildrenTableStructuredAdapter.java 2008-10-06
15:37:26 UTC (rev 10694)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/XChildrenTableStructuredAdapter.java 2008-10-06
15:44:23 UTC (rev 10695)
@@ -817,4 +817,9 @@
public String getError() {
return null;
}
+
+ public void addErrorStateListener(PropertyChangeListener l) {
+ // TODO Auto-generated method stub
+ }
+
}
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ComboBoxCellEditorEx.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ComboBoxCellEditorEx.java 2008-10-06
15:37:26 UTC (rev 10694)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ComboBoxCellEditorEx.java 2008-10-06
15:44:23 UTC (rev 10695)
@@ -116,7 +116,7 @@
combo.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
- valueChanged(true, true);
+ check();
}
});
@@ -125,6 +125,27 @@
return combo;
}
+ protected boolean check() {
+ String value = combo.getText();
+ if (value == null) {
+ value = "";//$NON-NLS-1$
+ }
+ Object typedValue = value;
+ boolean oldValidState = isValueValid();
+ boolean newValidState = isCorrect(typedValue);
+ if (typedValue == null && newValidState) {
+ Assert.isTrue(false,
+ "Validator isn't limiting the cell editor's type
range");//$NON-NLS-1$
+ }
+ if (!newValidState) {
+ // try to insert the current value into the error message.
+ setErrorMessage(MessageFormat.format(getErrorMessage(),
+ new Object[] { value }));
+ }
+ valueChanged(oldValidState, newValidState);
+ return newValidState;
+ }
+
protected Object doGetValue() {
return this.value;
}
@@ -134,8 +155,10 @@
}
public void focusLost() {
- value = combo.getText();
- valueChanged(true, true);
+ if(check()) {
+ value = combo.getText();
+ }
+// valueChanged(true, true);
this.fireApplyEditorValue();
super.focusLost();
}
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ComboBoxFieldEditor.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ComboBoxFieldEditor.java 2008-10-06
15:37:26 UTC (rev 10694)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ComboBoxFieldEditor.java 2008-10-06
15:44:23 UTC (rev 10695)
@@ -391,6 +391,7 @@
// PropertyChangeListener
public void propertyChange(PropertyChangeEvent evt) {
+ super.propertyChange(evt);
if (IPropertyEditor.VALUE.equals(evt.getPropertyName())) {
Object v = evt.getNewValue();
valueProvider.removeValueChangeListener(this);
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ExtendedFieldEditor.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ExtendedFieldEditor.java 2008-10-06
15:37:26 UTC (rev 10694)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ExtendedFieldEditor.java 2008-10-06
15:44:23 UTC (rev 10695)
@@ -10,6 +10,9 @@
******************************************************************************/
package org.jboss.tools.common.model.ui.attribute.editor;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+
import org.jboss.tools.common.model.ui.IAttributeErrorProvider;
import org.jboss.tools.common.model.ui.navigator.LabelDecoratorImpl;
import org.eclipse.jface.dialogs.IDialogConstants;
@@ -206,6 +209,9 @@
public void setErrorProvider(IAttributeErrorProvider errorProvider) {
this.errorProvider = errorProvider;
+ if(this instanceof PropertyChangeListener) {
+ errorProvider.addErrorStateListener((PropertyChangeListener)this);
+ }
}
public IAttributeErrorProvider getErrorProvider() {
@@ -279,12 +285,19 @@
} else {
image = LabelDecoratorImpl.emptyImage;
}
- if(errorStateImage != image) {
+ if(errorStateImage != image ||
+ (image != null && errorSymbolLabel != null && tooltip != null
&& !tooltip.equals(errorSymbolLabel.getToolTipText()) )) {
errorSymbolLabel.setImage(errorStateImage = image);
errorSymbolLabel.setToolTipText(tooltip);
}
}
}
+ public void propertyChange(PropertyChangeEvent evt) {
+ if (IPropertyEditor.ERROR.equals(evt.getPropertyName())) {
+ updateErrorState();
+ }
+ }
+
}
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/IPropertyEditor.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/IPropertyEditor.java 2008-10-06
15:37:26 UTC (rev 10694)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/IPropertyEditor.java 2008-10-06
15:44:23 UTC (rev 10695)
@@ -15,6 +15,7 @@
import org.eclipse.swt.widgets.Composite;
public interface IPropertyEditor extends IAdaptable {
+ public static final String ERROR = "IPropertyEditor.error";
public static final String VALUE = "IPropertyEditor.value";
public static final String LIST_CONTENT = "IPropertyEditor.listContent";
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ListSelectionFieldEditor.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ListSelectionFieldEditor.java 2008-10-06
15:37:26 UTC (rev 10694)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ListSelectionFieldEditor.java 2008-10-06
15:44:23 UTC (rev 10695)
@@ -200,6 +200,7 @@
}
public void propertyChange(java.beans.PropertyChangeEvent evt) {
+ super.propertyChange(evt);
if (IPropertyEditor.VALUE.equals(evt.getPropertyName())) {
Object v = evt.getNewValue();
valueProvider.removeValueChangeListener(this);
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ListStructuredFieldEditor.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ListStructuredFieldEditor.java 2008-10-06
15:37:26 UTC (rev 10694)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ListStructuredFieldEditor.java 2008-10-06
15:44:23 UTC (rev 10695)
@@ -422,6 +422,7 @@
}
public void propertyChange(PropertyChangeEvent evt) {
+ super.propertyChange(evt);
valueProvider.removeValueChangeListener(this);
if (IPropertyEditor.VALUE.equals(evt.getPropertyName())) {
elements = null;
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/MultipleChoiceFieldEditor.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/MultipleChoiceFieldEditor.java 2008-10-06
15:37:26 UTC (rev 10694)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/MultipleChoiceFieldEditor.java 2008-10-06
15:44:23 UTC (rev 10695)
@@ -164,6 +164,7 @@
boolean propertyChangeEnabled = true;
public void propertyChange(PropertyChangeEvent evt) {
if(!propertyChangeEnabled) return;
+ super.propertyChange(evt);
valueProvider.removeValueChangeListener(this);
if (IPropertyEditor.VALUE.equals(evt.getPropertyName())) {
updateChoices();
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/NoteFieldEditor.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/NoteFieldEditor.java 2008-10-06
15:37:26 UTC (rev 10694)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/NoteFieldEditor.java 2008-10-06
15:44:23 UTC (rev 10695)
@@ -418,6 +418,7 @@
}
public void propertyChange(PropertyChangeEvent evt) {
+ super.propertyChange(evt);
valueProvider.removeValueChangeListener(this);
if (IPropertyEditor.VALUE.equals(evt.getPropertyName())) {
setStringValue(valueProvider.getStringValue(true));
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 2008-10-06
15:37:26 UTC (rev 10694)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/StringButtonFieldEditorEx.java 2008-10-06
15:44:23 UTC (rev 10695)
@@ -316,6 +316,7 @@
}
public void propertyChange(java.beans.PropertyChangeEvent evt) {
+ super.propertyChange(evt);
if (IPropertyEditor.VALUE.equals(evt.getPropertyName())) {
Object v = evt.getNewValue();
valueProvider.removeValueChangeListener(this);
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/StringFieldEditorEx.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/StringFieldEditorEx.java 2008-10-06
15:37:26 UTC (rev 10694)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/StringFieldEditorEx.java 2008-10-06
15:44:23 UTC (rev 10695)
@@ -72,6 +72,7 @@
// PropertyChangeListener
public void propertyChange(PropertyChangeEvent evt) {
+ super.propertyChange(evt);
valueProvider.removeValueChangeListener(this);
if (IPropertyEditor.VALUE.equals(evt.getPropertyName())) {
Object v = evt.getNewValue();