Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcvs2svn2007-02-08 21:02:33 +0000
committercvs2svn2007-02-08 21:02:33 +0000
commita8652ff7523871b33fdaa406a4a8abed028a0cc6 (patch)
treeed1483f001e711955d49c31e0d5f7b003c16e977
parent407fd7adebdefeaeafdfc3254c58cb64613d597b (diff)
downloadorg.eclipse.e4.databinding-a8652ff7523871b33fdaa406a4a8abed028a0cc6.tar.gz
org.eclipse.e4.databinding-a8652ff7523871b33fdaa406a4a8abed028a0cc6.tar.xz
org.eclipse.e4.databinding-a8652ff7523871b33fdaa406a4a8abed028a0cc6.zip
This commit was manufactured by cvs2svn to create branch 'v33M5a'.v20070221v20070208aI20070206-0010bI20070206-0010a
Sprout from master 2007-02-08 21:02:31 UTC dejan <dejan> '*** empty log message ***' Delete: bundles/org.eclipse.core.commands/.classpath bundles/org.eclipse.core.commands/.cvsignore bundles/org.eclipse.core.commands/.project bundles/org.eclipse.core.commands/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.core.commands/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.core.commands/.settings/org.eclipse.pde.prefs bundles/org.eclipse.core.commands/META-INF/MANIFEST.MF bundles/org.eclipse.core.commands/about.html bundles/org.eclipse.core.commands/build.properties bundles/org.eclipse.core.commands/component.xml bundles/org.eclipse.core.commands/plugin.properties bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/AbstractHandler.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/AbstractHandlerWithState.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/AbstractParameterValueConverter.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/Category.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/CategoryEvent.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/Command.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/CommandEvent.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/CommandManager.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/CommandManagerEvent.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/ExecutionEvent.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/ExecutionException.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/HandlerEvent.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/ICategoryListener.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/ICommandListener.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/ICommandManagerListener.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/IExecutionListener.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/IExecutionListenerWithChecks.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/IHandler.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/IHandlerAttributes.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/IHandlerListener.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/INamedHandleStateIds.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/IObjectWithState.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/IParameter.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/IParameterTypeListener.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/IParameterValues.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/IStateListener.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/ITypedParameter.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/NamedHandleObjectWithState.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/NotEnabledException.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/NotHandledException.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/ParameterType.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/ParameterTypeEvent.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/ParameterValueConversionException.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/ParameterValuesException.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/Parameterization.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/ParameterizedCommand.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/SerializationException.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/State.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/common/AbstractBitSetEvent.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/common/AbstractHandleObjectEvent.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/common/AbstractNamedHandleEvent.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/common/CommandException.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/common/EventManager.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/common/HandleObject.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/common/HandleObjectManager.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/common/IIdentifiable.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/common/NamedHandleObject.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/common/NamedHandleObjectComparator.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/common/NotDefinedException.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/common/package.html bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/contexts/Context.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/contexts/ContextEvent.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/contexts/ContextManager.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/contexts/ContextManagerEvent.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/contexts/IContextListener.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/contexts/IContextManagerListener.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/contexts/package.html bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/AbstractOperation.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/DefaultOperationHistory.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/IAdvancedUndoableOperation.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/IAdvancedUndoableOperation2.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/ICompositeOperation.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/IContextReplacingOperation.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/IOperationApprover.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/IOperationApprover2.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/IOperationHistory.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/IOperationHistoryListener.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/IUndoContext.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/IUndoableOperation.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/LinearUndoEnforcer.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/LinearUndoViolationDetector.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/ObjectUndoContext.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/OperationHistoryEvent.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/OperationHistoryFactory.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/OperationStatus.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/TriggeredOperations.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/UndoContext.java bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/package.html bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/package.html bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/util/Tracing.java bundles/org.eclipse.core.commands/src/org/eclipse/core/internal/commands/operations/GlobalUndoContext.java bundles/org.eclipse.core.commands/src/org/eclipse/core/internal/commands/util/Util.java bundles/org.eclipse.core.databinding.beans/.classpath bundles/org.eclipse.core.databinding.beans/.cvsignore bundles/org.eclipse.core.databinding.beans/.project bundles/org.eclipse.core.databinding.beans/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.core.databinding.beans/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.core.databinding.beans/.settings/org.eclipse.pde.prefs bundles/org.eclipse.core.databinding.beans/META-INF/MANIFEST.MF bundles/org.eclipse.core.databinding.beans/about.html bundles/org.eclipse.core.databinding.beans/build.properties bundles/org.eclipse.core.databinding.beans/plugin.properties bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/databinding/beans/BeansObservables.java bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/databinding/beans/IBeanObservable.java bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/databinding/beans/package.html bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/BeanObservableListDecorator.java bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/BeanObservableSetDecorator.java bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/BeanObservableValueDecorator.java bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/IdentityWrapper.java bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/JavaBeanObservableList.java bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/JavaBeanObservableMap.java bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/JavaBeanObservableSet.java bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/JavaBeanObservableValue.java bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/ListenerSupport.java bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/package.html bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/AbstractObservable.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/ChangeEvent.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/ChangeManager.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/ChangeSupport.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/Diffs.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IChangeListener.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IDiff.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IObservable.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IObservableCollection.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IObservablesListener.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IStaleListener.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/ObservableEvent.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/ObservableTracker.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/Observables.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/Realm.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/StaleEvent.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/AbstractObservableList.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/IListChangeListener.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/IObservableList.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/ListChangeEvent.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/ListDiff.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/ListDiffEntry.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/ObservableList.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/WritableList.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/package.html bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/AbstractObservableMap.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/BidirectionalMap.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/ComputedObservableMap.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/IMapChangeListener.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/IObservableMap.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/MapChangeEvent.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/MapDiff.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/ObservableMap.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/WritableMap.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/package.html bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/masterdetail/IObservableFactory.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/masterdetail/MasterDetailObservables.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/masterdetail/package.html bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/package.html bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/AbstractObservableSet.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/IObservableSet.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/ISetChangeListener.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/ListToSetAdapter.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/MappedSet.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/ObservableSet.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/SetChangeEvent.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/SetDiff.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/UnionSet.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/WritableSet.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/package.html bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/tree/IOrderedTreeProvider.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/tree/IUnorderedTreeProvider.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/tree/package.html bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/AbstractObservableValue.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/AbstractVetoableValue.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/ChangeVetoException.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/ComputedValue.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/IObservableValue.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/IValueChangeListener.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/IValueChangingListener.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/IVetoableValue.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/ValueChangeEvent.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/ValueChangingEvent.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/ValueDiff.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/WritableValue.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/package.html bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/util/ILogger.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/util/Policy.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/util/package.html bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/EmptyObservableList.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/EmptyObservableSet.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/IStalenessConsumer.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/ProxyObservableSet.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/StalenessTracker.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/UnmodifiableObservableList.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableList.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableSet.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableValue.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/AbstractObservableTree.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/IChildrenCountUpdate.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/IChildrenUpdate.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/IHasChildrenUpdate.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/IObservableTree.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/ITreeChangeListener.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/IViewerUpdate.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/TreeChangeEvent.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/TreeDiff.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/TreeDiffNode.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/TreeDiffVisitor.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/TreePath.java bundles/org.eclipse.core.databinding/.classpath bundles/org.eclipse.core.databinding/.cvsignore bundles/org.eclipse.core.databinding/.project bundles/org.eclipse.core.databinding/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.core.databinding/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.core.databinding/.settings/org.eclipse.pde.prefs bundles/org.eclipse.core.databinding/META-INF/MANIFEST.MF bundles/org.eclipse.core.databinding/about.html bundles/org.eclipse.core.databinding/build.properties bundles/org.eclipse.core.databinding/component.xml bundles/org.eclipse.core.databinding/plugin.properties bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/AggregateValidationStatus.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/BindSpec.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/Binding.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/BindingEvent.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/BindingException.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/DataBindingContext.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/DefaultBindSpec.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/IBindingListener.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertDate2String.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Boolean.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2BooleanPrimitive.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Byte.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2BytePrimitive.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Character.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Date.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Double.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2DoublePrimitive.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Float.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2FloatPrimitive.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Integer.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2IntegerPrimitive.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Long.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2LongPrimitive.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Short.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2ShortPrimitive.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/Converter.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/DateConversionSupport.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/IConverter.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/IdentityConverter.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ToStringConverter.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/package.html bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/AbstractObservable.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/ChangeEvent.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/ChangeManager.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/ChangeSupport.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/Diffs.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/IChangeListener.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/IDiff.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/IObservable.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/IObservableCollection.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/IObservablesListener.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/IStaleListener.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/ObservableEvent.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/ObservableTracker.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/Observables.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/Realm.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/StaleEvent.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/AbstractObservableList.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/IListChangeListener.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/IObservableList.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/ListChangeEvent.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/ListDiff.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/ListDiffEntry.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/ObservableList.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/WritableList.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/package.html bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/AbstractObservableMap.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/BidirectionalMap.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/ComputedObservableMap.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/IMapChangeListener.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/IObservableMap.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/MapChangeEvent.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/MapDiff.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/ObservableMap.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/WritableMap.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/package.html bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/masterdetail/IObservableFactory.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/masterdetail/MasterDetailObservables.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/masterdetail/package.html bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/package.html bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/AbstractObservableSet.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/IObservableSet.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/ISetChangeListener.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/ListToSetAdapter.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/MappedSet.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/ObservableSet.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/SetChangeEvent.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/SetDiff.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/UnionSet.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/WritableSet.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/package.html bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/tree/IOrderedTreeProvider.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/tree/IUnorderedTreeProvider.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/tree/package.html bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/AbstractObservableValue.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/AbstractVetoableValue.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/ChangeVetoException.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/ComputedValue.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/IObservableValue.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/IValueChangeListener.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/IValueChangingListener.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/IVetoableValue.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/ValueChangeEvent.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/ValueChangingEvent.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/ValueDiff.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/WritableValue.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/package.html bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/package.html bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/util/ILogger.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/util/Policy.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/util/package.html bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/IValidator.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/ObjectToPrimitiveValidator.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/ReadOnlyValidator.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2BytePrimitiveValidator.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2ByteValidator.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2DateValidator.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2DoublePrimitiveValidator.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2DoubleValidator.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2FloatPrimitiveValidator.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2FloatValidator.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2IntegerPrimitiveValidator.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2IntegerValidator.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2LongPrimitiveValidator.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2LongValidator.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2ShortPrimitiveValidator.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2ShortValidator.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/ValidationStatus.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/package.html bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/BindingMessages.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ClassLookupSupport.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/IdentityWrapper.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ListBinding.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/Pair.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/RandomAccessListIterator.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/Util.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ValidationStatusMap.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ValueBinding.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/messages.properties bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/EmptyObservableList.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/EmptyObservableSet.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/IStalenessConsumer.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/ProxyObservableSet.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/StalenessTracker.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/UnmodifiableObservableList.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableList.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableSet.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableValue.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/AbstractObservableTree.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/IChildrenCountUpdate.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/IChildrenUpdate.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/IHasChildrenUpdate.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/IObservableTree.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/ITreeChangeListener.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/IViewerUpdate.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/TreeChangeEvent.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/TreeDiff.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/TreeDiffNode.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/TreeDiffVisitor.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/TreePath.java bundles/org.eclipse.jface.databinding/.classpath bundles/org.eclipse.jface.databinding/.cvsignore bundles/org.eclipse.jface.databinding/.project bundles/org.eclipse.jface.databinding/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.jface.databinding/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.jface.databinding/.settings/org.eclipse.pde.prefs bundles/org.eclipse.jface.databinding/META-INF/MANIFEST.MF bundles/org.eclipse.jface.databinding/about.html bundles/org.eclipse.jface.databinding/build.properties bundles/org.eclipse.jface.databinding/plugin.properties bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/swt/ISWTObservable.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/swt/ISWTObservableValue.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/swt/SWTObservables.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/swt/package.html bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ListeningLabelProvider.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableListContentProvider.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableMapLabelProvider.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableSetContentProvider.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ViewersObservables.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/package.html bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/ButtonObservableValue.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/CComboObservableList.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/CComboObservableValue.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/CLabelObservableValue.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/ComboObservableList.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/ComboObservableValue.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/ControlObservableValue.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/LabelObservableValue.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/ListObservableList.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/ListObservableValue.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/SWTObservableList.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/SWTProperties.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/SpinnerObservableValue.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/TableObservableValue.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/TextObservableValue.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/IPrefetchingTree.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/LeafNodesSet.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/OrderedTreeContentProvider.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/OrderedTreeNode.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/PrefetchingTree.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/SelectionProviderSingleSelectionObservableValue.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/UnorderedTreeContentProvider.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/UnorderedTreeNode.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/AbstractSWTObservableValue.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/AbstractSWTVetoableValue.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/ControlUpdater.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/MenuUpdater.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/SWTUtil.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/TableUpdater.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/WorkQueue.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/viewers/ViewerLabelProvider.java bundles/org.eclipse.ui.browser/.classpath bundles/org.eclipse.ui.browser/.cvsignore bundles/org.eclipse.ui.browser/.options bundles/org.eclipse.ui.browser/.project bundles/org.eclipse.ui.browser/.settings/org.eclipse.core.resources.prefs bundles/org.eclipse.ui.browser/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.ui.browser/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.ui.browser/META-INF/MANIFEST.MF bundles/org.eclipse.ui.browser/about.html bundles/org.eclipse.ui.browser/build.properties bundles/org.eclipse.ui.browser/component.xml bundles/org.eclipse.ui.browser/icons/clcl16/nav_backward.gif bundles/org.eclipse.ui.browser/icons/clcl16/nav_forward.gif bundles/org.eclipse.ui.browser/icons/clcl16/nav_go.gif bundles/org.eclipse.ui.browser/icons/clcl16/nav_home.gif bundles/org.eclipse.ui.browser/icons/clcl16/nav_print.gif bundles/org.eclipse.ui.browser/icons/clcl16/nav_refresh.gif bundles/org.eclipse.ui.browser/icons/clcl16/nav_stop.gif bundles/org.eclipse.ui.browser/icons/dlcl16/nav_backward.gif bundles/org.eclipse.ui.browser/icons/dlcl16/nav_forward.gif bundles/org.eclipse.ui.browser/icons/dlcl16/nav_go.gif bundles/org.eclipse.ui.browser/icons/dlcl16/nav_home.gif bundles/org.eclipse.ui.browser/icons/dlcl16/nav_print.gif bundles/org.eclipse.ui.browser/icons/dlcl16/nav_refresh.gif bundles/org.eclipse.ui.browser/icons/dlcl16/nav_stop.gif bundles/org.eclipse.ui.browser/icons/dlcl16/synced.gif bundles/org.eclipse.ui.browser/icons/elcl16/nav_backward.gif bundles/org.eclipse.ui.browser/icons/elcl16/nav_forward.gif bundles/org.eclipse.ui.browser/icons/elcl16/nav_go.gif bundles/org.eclipse.ui.browser/icons/elcl16/nav_home.gif bundles/org.eclipse.ui.browser/icons/elcl16/nav_print.gif bundles/org.eclipse.ui.browser/icons/elcl16/nav_refresh.gif bundles/org.eclipse.ui.browser/icons/elcl16/nav_stop.gif bundles/org.eclipse.ui.browser/icons/elcl16/synced.gif bundles/org.eclipse.ui.browser/icons/obj16/busy/1.gif bundles/org.eclipse.ui.browser/icons/obj16/busy/10.gif bundles/org.eclipse.ui.browser/icons/obj16/busy/11.gif bundles/org.eclipse.ui.browser/icons/obj16/busy/12.gif bundles/org.eclipse.ui.browser/icons/obj16/busy/13.gif bundles/org.eclipse.ui.browser/icons/obj16/busy/2.gif bundles/org.eclipse.ui.browser/icons/obj16/busy/3.gif bundles/org.eclipse.ui.browser/icons/obj16/busy/4.gif bundles/org.eclipse.ui.browser/icons/obj16/busy/5.gif bundles/org.eclipse.ui.browser/icons/obj16/busy/6.gif bundles/org.eclipse.ui.browser/icons/obj16/busy/7.gif bundles/org.eclipse.ui.browser/icons/obj16/busy/8.gif bundles/org.eclipse.ui.browser/icons/obj16/busy/9.gif bundles/org.eclipse.ui.browser/icons/obj16/external_browser.gif bundles/org.eclipse.ui.browser/icons/obj16/internal_browser.gif bundles/org.eclipse.ui.browser/plugin.properties bundles/org.eclipse.ui.browser/plugin.xml bundles/org.eclipse.ui.browser/schema/browsers.exsd bundles/org.eclipse.ui.browser/src/org/eclipse/ui/browser/BrowserFactory.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserDescriptor.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserDescriptorDialog.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserDescriptorWorkingCopy.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserExt.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserLauncher.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserManager.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserText.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserViewer.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BusyIndicator.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/ContextIds.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/DefaultBrowserSupport.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/ExternalBrowserInstance.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/FallbackScrolledComposite.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/IBrowserDescriptor.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/IBrowserDescriptorWorkingCopy.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/IBrowserExt.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/IBrowserViewerContainer.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/ImageResource.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/InternalBrowserEditorInstance.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/InternalBrowserInstance.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/InternalBrowserViewInstance.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/Messages.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/Messages.properties bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/OpenBrowserHandler.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/OpenBrowserWorkbenchAction.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/SWTUtil.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/SystemBrowserDescriptor.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/SystemBrowserInstance.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/TextAction.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/ToolbarLayout.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/Trace.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserEditor.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserEditorActionBarContributor.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserEditorInput.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserPreference.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserPreferencePage.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserUIPlugin.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserUtil.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserView.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserViewDropAdapter.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/browsers/BrowserLog.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/browsers/DefaultBrowser.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/browsers/DefaultBrowserFactory.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/browsers/MozillaBrowser.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/browsers/MozillaFactory.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/browsers/NullBrowser.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/browsers/StreamConsumer.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/macosx/DefaultBrowser.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/macosx/DefaultBrowserFactory.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/macosx/SafariBrowser.java bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/macosx/SafariBrowserFactory.java bundles/org.eclipse.ui.carbon/.classpath bundles/org.eclipse.ui.carbon/.cvsignore bundles/org.eclipse.ui.carbon/.project bundles/org.eclipse.ui.carbon/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.ui.carbon/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.ui.carbon/.settings/org.eclipse.pde.prefs bundles/org.eclipse.ui.carbon/.template bundles/org.eclipse.ui.carbon/META-INF/MANIFEST.MF bundles/org.eclipse.ui.carbon/about.html bundles/org.eclipse.ui.carbon/build.properties bundles/org.eclipse.ui.carbon/fragment-carbon.properties bundles/org.eclipse.ui.carbon/fragment.xml bundles/org.eclipse.ui.carbon/scripts/exportplugin.xml bundles/org.eclipse.ui.carbon/src/org/eclipse/ui/carbon/CarbonUIEnhancer.java bundles/org.eclipse.ui.carbon/src/org/eclipse/ui/carbon/Messages.properties bundles/org.eclipse.ui.ide.application/.classpath bundles/org.eclipse.ui.ide.application/.project bundles/org.eclipse.ui.ide.application/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.ui.ide.application/.settings/org.eclipse.pde.prefs bundles/org.eclipse.ui.ide.application/META-INF/MANIFEST.MF bundles/org.eclipse.ui.ide.application/about.html bundles/org.eclipse.ui.ide.application/build.properties bundles/org.eclipse.ui.ide.application/icons/full/eview16/resource_persp.gif bundles/org.eclipse.ui.ide.application/plugin.properties bundles/org.eclipse.ui.ide.application/plugin.xml bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEApplication.java bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEIdleHelper.java bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEWorkbenchAdvisor.java bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEWorkbenchWindowAdvisor.java bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/ResourcePerspective.java bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/dialogs/IDEStartupPreferencePage.java bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/package.html bundles/org.eclipse.ui.ide/.classpath bundles/org.eclipse.ui.ide/.cvsignore bundles/org.eclipse.ui.ide/.options bundles/org.eclipse.ui.ide/.project bundles/org.eclipse.ui.ide/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.ui.ide/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.ui.ide/.settings/org.eclipse.pde.prefs bundles/org.eclipse.ui.ide/META-INF/MANIFEST.MF bundles/org.eclipse.ui.ide/about.html bundles/org.eclipse.ui.ide/build.properties bundles/org.eclipse.ui.ide/component.xml bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/IContributorResourceAdapter.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/IFileEditorInput.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/IMarkerActionFilter.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/IMarkerHelpRegistry.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/IMarkerResolution.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/IMarkerResolution2.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/IMarkerResolutionGenerator.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/IMarkerResolutionGenerator2.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/IProjectActionFilter.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/IResourceActionFilter.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/IStorageEditorInput.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/ResourceWorkingSetFilter.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/AddBookmarkAction.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/AddTaskAction.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/BuildAction.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CloseResourceAction.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CloseUnrelatedProjectsAction.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CopyFilesAndFoldersOperation.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CopyProjectAction.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CopyProjectOperation.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CopyResourceAction.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CreateFileAction.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CreateFolderAction.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/DeleteResourceAction.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/GlobalBuildAction.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/MoveFilesAndFoldersOperation.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/MoveProjectAction.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/MoveResourceAction.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/NewExampleAction.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/NewProjectAction.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/NewWizardMenu.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/OpenFileAction.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/OpenResourceAction.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/OpenSystemEditorAction.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/OpenWithMenu.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/QuickStartAction.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/ReadOnlyStateChecker.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/RefreshAction.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/RenameResourceAction.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/ScrubLocalAction.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/SelectionListenerAction.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/TextActionHandler.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/WorkspaceAction.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/WorkspaceModifyDelegatingOperation.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/WorkspaceModifyOperation.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/ContainerGenerator.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/ContainerSelectionDialog.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/FileSelectionDialog.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/FilteredResourcesSelectionDialog.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/MarkerResolutionSelectionDialog.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/NewFolderDialog.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/ProjectLocationMoveDialog.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/ProjectLocationSelectionDialog.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/ResourceListSelectionDialog.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/ResourceSelectionDialog.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/SaveAsDialog.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardDataTransferPage.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardExportPage.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardExportResourcesPage.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardImportPage.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardNewFileCreationPage.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardNewFolderMainPage.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardNewLinkPage.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardNewProjectCreationPage.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardNewProjectReferencePage.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardResourceImportPage.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/model/WorkbenchContentProvider.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/part/FileEditorInput.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/part/FileEditorInputFactory.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/part/FileInPlaceEditorInput.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/part/MarkerTransfer.java bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/part/ResourceTransfer.java bundles/org.eclipse.ui.ide/icons/full/dlcl16/addtsk_tsk.gif bundles/org.eclipse.ui.ide/icons/full/dlcl16/collapseall.gif bundles/org.eclipse.ui.ide/icons/full/dlcl16/configs.gif bundles/org.eclipse.ui.ide/icons/full/dlcl16/filter_ps.gif bundles/org.eclipse.ui.ide/icons/full/dlcl16/gotoobj_tsk.gif bundles/org.eclipse.ui.ide/icons/full/dlcl16/refresh_nav.gif bundles/org.eclipse.ui.ide/icons/full/dlcl16/selected_mode.gif bundles/org.eclipse.ui.ide/icons/full/dlcl16/showchild_mode.gif bundles/org.eclipse.ui.ide/icons/full/dlcl16/showcomplete_tsk.gif bundles/org.eclipse.ui.ide/icons/full/dlcl16/showerr_tsk.gif bundles/org.eclipse.ui.ide/icons/full/dlcl16/showtsk_tsk.gif bundles/org.eclipse.ui.ide/icons/full/dlcl16/showwarn_tsk.gif bundles/org.eclipse.ui.ide/icons/full/dlcl16/smartmode_co.gif bundles/org.eclipse.ui.ide/icons/full/dlcl16/step_current.gif bundles/org.eclipse.ui.ide/icons/full/dlcl16/step_done.gif bundles/org.eclipse.ui.ide/icons/full/dlcl16/synced.gif bundles/org.eclipse.ui.ide/icons/full/dlcl16/usearch_obj.gif bundles/org.eclipse.ui.ide/icons/full/dlcl16/workingsets.gif bundles/org.eclipse.ui.ide/icons/full/dtool16/build_exec.gif bundles/org.eclipse.ui.ide/icons/full/dtool16/export_wiz.gif bundles/org.eclipse.ui.ide/icons/full/dtool16/exportdir_wiz.gif bundles/org.eclipse.ui.ide/icons/full/dtool16/exportzip_wiz.gif bundles/org.eclipse.ui.ide/icons/full/dtool16/import_wiz.gif bundles/org.eclipse.ui.ide/icons/full/dtool16/importdir_wiz.gif bundles/org.eclipse.ui.ide/icons/full/dtool16/importzip_wiz.gif bundles/org.eclipse.ui.ide/icons/full/dtool16/newfile_wiz.gif bundles/org.eclipse.ui.ide/icons/full/dtool16/newfolder_wiz.gif bundles/org.eclipse.ui.ide/icons/full/dtool16/newprj_wiz.gif bundles/org.eclipse.ui.ide/icons/full/dtool16/next_nav.gif bundles/org.eclipse.ui.ide/icons/full/dtool16/prev_nav.gif bundles/org.eclipse.ui.ide/icons/full/dtool16/search_src.gif bundles/org.eclipse.ui.ide/icons/full/elcl16/addtoworkset.gif bundles/org.eclipse.ui.ide/icons/full/elcl16/addtsk_tsk.gif bundles/org.eclipse.ui.ide/icons/full/elcl16/collapseall.gif bundles/org.eclipse.ui.ide/icons/full/elcl16/configs.gif bundles/org.eclipse.ui.ide/icons/full/elcl16/filter_ps.gif bundles/org.eclipse.ui.ide/icons/full/elcl16/flatLayout.gif bundles/org.eclipse.ui.ide/icons/full/elcl16/gotoobj_tsk.gif bundles/org.eclipse.ui.ide/icons/full/elcl16/hierarchicalLayout.gif bundles/org.eclipse.ui.ide/icons/full/elcl16/linkto_help.gif bundles/org.eclipse.ui.ide/icons/full/elcl16/refresh_nav.gif bundles/org.eclipse.ui.ide/icons/full/elcl16/removefromworkset.gif bundles/org.eclipse.ui.ide/icons/full/elcl16/selected_mode.gif bundles/org.eclipse.ui.ide/icons/full/elcl16/showchild_mode.gif bundles/org.eclipse.ui.ide/icons/full/elcl16/showcomplete_tsk.gif bundles/org.eclipse.ui.ide/icons/full/elcl16/showerr_tsk.gif bundles/org.eclipse.ui.ide/icons/full/elcl16/showtsk_tsk.gif bundles/org.eclipse.ui.ide/icons/full/elcl16/showwarn_tsk.gif bundles/org.eclipse.ui.ide/icons/full/elcl16/smartmode_co.gif bundles/org.eclipse.ui.ide/icons/full/elcl16/step_current.gif bundles/org.eclipse.ui.ide/icons/full/elcl16/step_done.gif bundles/org.eclipse.ui.ide/icons/full/elcl16/synced.gif bundles/org.eclipse.ui.ide/icons/full/elcl16/usearch_obj.gif bundles/org.eclipse.ui.ide/icons/full/elcl16/workingsets.gif bundles/org.eclipse.ui.ide/icons/full/etool16/build_exec.gif bundles/org.eclipse.ui.ide/icons/full/etool16/export_wiz.gif bundles/org.eclipse.ui.ide/icons/full/etool16/exportdir_wiz.gif bundles/org.eclipse.ui.ide/icons/full/etool16/exportzip_wiz.gif bundles/org.eclipse.ui.ide/icons/full/etool16/import_wiz.gif bundles/org.eclipse.ui.ide/icons/full/etool16/importdir_wiz.gif bundles/org.eclipse.ui.ide/icons/full/etool16/importzip_wiz.gif bundles/org.eclipse.ui.ide/icons/full/etool16/newfile_wiz.gif bundles/org.eclipse.ui.ide/icons/full/etool16/newfolder_wiz.gif bundles/org.eclipse.ui.ide/icons/full/etool16/newprj_wiz.gif bundles/org.eclipse.ui.ide/icons/full/etool16/next_nav.gif bundles/org.eclipse.ui.ide/icons/full/etool16/prev_nav.gif bundles/org.eclipse.ui.ide/icons/full/etool16/problem_category.gif bundles/org.eclipse.ui.ide/icons/full/etool16/search_src.gif bundles/org.eclipse.ui.ide/icons/full/eview16/bkmrk_nav.gif bundles/org.eclipse.ui.ide/icons/full/eview16/filenav_nav.gif bundles/org.eclipse.ui.ide/icons/full/eview16/problems_view.gif bundles/org.eclipse.ui.ide/icons/full/eview16/pview.gif bundles/org.eclipse.ui.ide/icons/full/eview16/tasks_tsk.gif bundles/org.eclipse.ui.ide/icons/full/obj16/bkmrk_tsk.gif bundles/org.eclipse.ui.ide/icons/full/obj16/complete_tsk.gif bundles/org.eclipse.ui.ide/icons/full/obj16/cprj_obj.gif bundles/org.eclipse.ui.ide/icons/full/obj16/error_tsk.gif bundles/org.eclipse.ui.ide/icons/full/obj16/exportpref_obj.gif bundles/org.eclipse.ui.ide/icons/full/obj16/header_complete.gif bundles/org.eclipse.ui.ide/icons/full/obj16/header_priority.gif bundles/org.eclipse.ui.ide/icons/full/obj16/hprio_tsk.gif bundles/org.eclipse.ui.ide/icons/full/obj16/importpref_obj.gif bundles/org.eclipse.ui.ide/icons/full/obj16/incomplete_tsk.gif bundles/org.eclipse.ui.ide/icons/full/obj16/info_tsk.gif bundles/org.eclipse.ui.ide/icons/full/obj16/keyspref_obj.gif bundles/org.eclipse.ui.ide/icons/full/obj16/lprio_tsk.gif bundles/org.eclipse.ui.ide/icons/full/obj16/prj_obj.gif bundles/org.eclipse.ui.ide/icons/full/obj16/taskmrk_tsk.gif bundles/org.eclipse.ui.ide/icons/full/obj16/warn_tsk.gif bundles/org.eclipse.ui.ide/icons/full/obj16/warning.gif bundles/org.eclipse.ui.ide/icons/full/obj16/welcome_banner.gif bundles/org.eclipse.ui.ide/icons/full/obj16/welcome_editor.gif bundles/org.eclipse.ui.ide/icons/full/obj16/welcome_item.gif bundles/org.eclipse.ui.ide/icons/full/obj16/workset.gif bundles/org.eclipse.ui.ide/icons/full/ovr16/link_ovr.gif bundles/org.eclipse.ui.ide/icons/full/ovr16/linkwarn_ovr.gif bundles/org.eclipse.ui.ide/icons/full/wizban/exportdir_wiz.png bundles/org.eclipse.ui.ide/icons/full/wizban/exportzip_wiz.png bundles/org.eclipse.ui.ide/icons/full/wizban/importdir_wiz.png bundles/org.eclipse.ui.ide/icons/full/wizban/importproj_wiz.png bundles/org.eclipse.ui.ide/icons/full/wizban/importzip_wiz.png bundles/org.eclipse.ui.ide/icons/full/wizban/new_wiz.png bundles/org.eclipse.ui.ide/icons/full/wizban/newfile_wiz.png bundles/org.eclipse.ui.ide/icons/full/wizban/newfolder_wiz.png bundles/org.eclipse.ui.ide/icons/full/wizban/newprj_wiz.png bundles/org.eclipse.ui.ide/icons/full/wizban/quick_fix.png bundles/org.eclipse.ui.ide/icons/full/wizban/saveas_wiz.png bundles/org.eclipse.ui.ide/icons/full/wizban/workset_wiz.png bundles/org.eclipse.ui.ide/plugin.properties bundles/org.eclipse.ui.ide/plugin.xml bundles/org.eclipse.ui.ide/schema/filesystemSupport.exsd bundles/org.eclipse.ui.ide/schema/markerHelp.exsd bundles/org.eclipse.ui.ide/schema/markerImageProviders.exsd bundles/org.eclipse.ui.ide/schema/markerResolution.exsd bundles/org.eclipse.ui.ide/schema/markerSupport.exsd bundles/org.eclipse.ui.ide/schema/projectNatureImages.exsd bundles/org.eclipse.ui.ide/schema/resourceFilters.exsd bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/FileStoreEditorInput.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/IContributorResourceAdapter2.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/IDE.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/IDEActionFactory.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/IDEEncoding.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/IGotoMarker.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/IIDEActionConstants.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/ResourceUtil.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/dialogs/AbstractEncodingFieldEditor.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/dialogs/EncodingFieldEditor.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/dialogs/PathVariableSelectionDialog.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/dialogs/ResourceEncodingFieldEditor.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/dialogs/package.html bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/fileSystem/FileSystemContributor.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/fileSystem/package.html bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/package.html bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/AbstractCopyOrMoveResourcesOperation.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/AbstractCreateResourcesOperation.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/AbstractMarkersOperation.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/AbstractResourcesOperation.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/AbstractWorkspaceOperation.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/CopyProjectOperation.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/CopyResourcesOperation.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/CreateFileOperation.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/CreateFolderOperation.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/CreateMarkersOperation.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/CreateProjectOperation.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/DeleteMarkersOperation.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/DeleteResourcesOperation.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/MoveProjectOperation.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/MoveResourcesOperation.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/ResourceDescription.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/UpdateMarkersOperation.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/WorkspaceUndoUtil.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/package.html bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/AboutInfo.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/ChooseWorkspaceData.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/ChooseWorkspaceDialog.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/ChooseWorkspaceWithSettingsDialog.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/DefaultContributorResourceAdapter.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/DialogUtil.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/EditorAreaDropAdapter.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/FeatureSelectionDialog.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEExceptionHandler.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEInternalPreferences.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEInternalWorkbenchImages.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEPreferenceInitializer.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDESelectionConversionService.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEWorkbenchActivityHelper.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEWorkbenchErrorHandler.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEWorkbenchMessages.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEWorkbenchPlugin.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IIDEHelpContextIds.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IMarkerImageProvider.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/LineDelimiterEditor.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/LinkedResourceDecorator.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/Policy.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/ProblemImageProvider.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/ResourceWorkingSetUpdater.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/StatusUtil.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/StringMatcher.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/TipsAndTricksAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/WorkbenchActionBuilder.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/actions/BuildCleanAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/actions/BuildSetAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/actions/BuildSetMenu.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/actions/BuildUtilities.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/actions/OpenWorkspaceAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/actions/ProjectPropertyDialogAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/actions/QuickMenuAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/actions/RetargetActionWithDefault.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/actions/SelectBuildWorkingSetAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/actions/ToggleAutoBuildAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/commands/ResourcePathConverter.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/BuildOrderPreferencePage.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/CleanDialog.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ConfigurationLogUpdateSection.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/CreateLinkedResourceGroup.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/FileFolderSelectionDialog.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/FileStatesPage.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/FileSystemSelectionArea.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEEditorsPreferencePage.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEPerspectivesPreferencePage.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEResourceInfoUtils.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkbenchPreferencePage.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkspacePreferencePage.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IElementFilter.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IFileStoreFilter.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/InternalErrorDialog.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/LinkedResourcesPreferencePage.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/OpenResourceDialog.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/PathVariableDialog.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/PathVariablesGroup.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ProjectContentsLocationArea.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ProjectReferencePage.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceComparator.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceInfoPage.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceTreeAndListGroup.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceWorkingSetPage.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/SimpleListContentProvider.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/WelcomeEditor.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/WelcomeEditorActionContributor.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/WelcomeEditorCopyAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/WelcomeEditorInput.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/WelcomeEditorInputFactory.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/WelcomeItem.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/WelcomeParser.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/filesystem/FileSystemConfiguration.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/filesystem/FileSystemMessages.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/filesystem/FileSystemSupportRegistry.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/filesystem/messages.properties bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/filesystem/package.html bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/handlers/OpenResourceHandler.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/handlers/ShowResourceByPathHandler.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/messages.properties bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/misc/CheckboxTreeAndListGroup.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/misc/ContainerContentProvider.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/misc/ContainerSelectionGroup.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/misc/DisjointSet.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/misc/OverlayIcon.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/misc/ResourceAndContainerGroup.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/model/FileInputAdapterFactory.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/model/ResourceFactory.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/model/StandardPropertiesAdapterFactory.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/model/WorkbenchAdapterBuilder.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/model/WorkbenchAdapterFactory.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/model/WorkbenchFile.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/model/WorkbenchFolder.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/model/WorkbenchMarker.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/model/WorkbenchProject.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/model/WorkbenchResource.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/model/WorkbenchRootResource.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/model/WorkbenchStatus.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/model/WorkbenchWorkspace.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/model/WorkingSetAdapterFactory.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/model/WorkingSetResourceMapping.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/model/WorkspaceFactory.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/package.html bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/registry/IDERegistryReader.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/registry/MarkerHelpRegistry.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/registry/MarkerHelpRegistryReader.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/registry/MarkerImageProviderRegistry.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/registry/MarkerQuery.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/registry/MarkerQueryResult.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/registry/PerspectiveParameterValues.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/registry/ProjectImageRegistry.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/registry/ProjectImageRegistryReader.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/undo/AbstractResourceDescription.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/undo/ContainerDescription.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/undo/FileDescription.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/undo/FolderDescription.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/undo/IFileContentDescription.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/undo/MarkerDescription.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/undo/ProjectDescription.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/undo/UndoMessages.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/undo/WorkspaceUndoMonitor.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/undo/messages.properties bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/update/ConfigurationManagerAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/update/InstallWizardAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/bookmarkexplorer/BookmarkMessages.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/bookmarkexplorer/messages.properties bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/framelist/FrameListMessages.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/framelist/messages.properties bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/navigator/ResourceNavigatorMessages.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/navigator/messages.properties bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/properties/IDEPropertiesMessages.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/properties/ideMessages.properties bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/tasklist/TaskListMessages.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/tasklist/messages.properties bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/ArchiveFileExportOperation.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/ArchiveFileManipulations.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/DataTransferMessages.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/FileSystemExportOperation.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/FileSystemExporter.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/IDataTransferHelpContextIds.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/IFileExporter.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/ILeveledImportStructureProvider.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/MinimizedFileSystemElement.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/TarEntry.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/TarException.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/TarFile.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/TarFileExporter.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/TarInputStream.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/TarLeveledStructureProvider.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/TarOutputStream.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/WizardArchiveFileResourceExportPage1.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/WizardArchiveFileResourceImportPage1.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/WizardFileSystemResourceExportPage1.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/WizardFileSystemResourceImportPage1.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/WizardProjectsImportPage.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/ZipFileExporter.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/ZipLeveledStructureProvider.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/messages.properties bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/package.html bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/newresource/ResourceMessages.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/newresource/messages.properties bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/bookmarkexplorer/BookmarkAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/bookmarkexplorer/BookmarkContentProvider.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/bookmarkexplorer/BookmarkLabelProvider.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/bookmarkexplorer/BookmarkMessages.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/bookmarkexplorer/BookmarkNavigator.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/bookmarkexplorer/BookmarkPropertiesDialog.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/bookmarkexplorer/BookmarkSorter.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/bookmarkexplorer/CopyBookmarkAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/bookmarkexplorer/EditBookmarkAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/bookmarkexplorer/IBookmarkHelpContextIds.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/bookmarkexplorer/MarkerUtil.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/bookmarkexplorer/OpenBookmarkAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/bookmarkexplorer/PasteBookmarkAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/bookmarkexplorer/RemoveBookmarkAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/bookmarkexplorer/SelectAllAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/bookmarkexplorer/package.html bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/framelist/BackAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/framelist/ForwardAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/framelist/Frame.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/framelist/FrameAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/framelist/FrameList.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/framelist/FrameListMessages.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/framelist/GoIntoAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/framelist/IFrameListHelpContextIds.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/framelist/IFrameSource.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/framelist/TreeFrame.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/framelist/TreeViewerFrameSource.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/framelist/UpAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/framelist/package.html bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/MarkerViewUtil.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/WorkbenchMarkerResolution.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/AbstractField.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/ActionAddGlobalTask.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/ActionCopyMarker.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/ActionDeleteCompleted.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/ActionMarkCompleted.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/ActionMarkerProperties.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/ActionOpenMarker.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/ActionPasteMarker.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/ActionProblemProperties.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/ActionRemoveMarker.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/ActionResolveMarker.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/ActionRevealMarker.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/ActionSelectAll.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/ActionTaskProperties.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/AttributeMarkerGrouping.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/BookmarkFilter.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/BookmarkMarker.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/BookmarkView.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/CategoryComparator.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/ConcreteMarker.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/DefaultMarkerResourceAdapter.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/DialogBookmarkFilter.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/DialogMarkerFilter.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/DialogMarkerProperties.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/DialogProblemFilter.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/DialogProblemProperties.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/DialogTaskFilter.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/DialogTaskProperties.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/FieldCategory.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/FieldCreationTime.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/FieldDone.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/FieldDummy.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/FieldFolder.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/FieldId.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/FieldLineNumber.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/FieldMarkerGroup.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/FieldMessage.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/FieldPriority.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/FieldResource.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/FieldSeverityAndMessage.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/FilterEnablementAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/FiltersAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/IField.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/IFilter.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/IItemsChangedListener.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/IMarkerChangedListener.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/IMarkerResourceAdapter.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/ITableListener.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerAdapter.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerFilter.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerGroupingEntry.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerLabelProvider.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerList.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerMessages.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerNode.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerNodeRefreshRecord.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerResolutionDialog.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerSelectionProviderAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerSelectionProviderAdapter.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerSorter.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerSupportRegistry.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerTreeContentProvider.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerType.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerTypesModel.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerView.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerViewLabelProvider.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerViewPreferenceDialog.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/ProblemFilter.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/ProblemMarker.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/ProblemView.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/SortUtil.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/TableComparator.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/TableSortAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/TableSortDialog.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/TableView.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/TableViewLabelProvider.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/TaskFilter.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/TaskMarker.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/TaskView.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/Util.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/messages.properties bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/package.html bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/CollapseAllAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/CopyAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/FilterSelectionAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/FiltersContentProvider.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/GotoActionGroup.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/GotoResourceAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/GotoResourceDialog.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/INavigatorHelpContextIds.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/IResourceNavigator.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/LocalSelectionTransfer.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/MainActionGroup.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/NavigatorDragAdapter.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/NavigatorDropAdapter.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/NavigatorFrameSource.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/OpenActionGroup.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/PasteAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/RefactorActionGroup.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/ResourceComparator.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/ResourceNavigator.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/ResourceNavigatorAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/ResourceNavigatorActionGroup.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/ResourceNavigatorMessages.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/ResourceNavigatorMoveAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/ResourceNavigatorRenameAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/ResourcePatternFilter.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/ResourceSelectionUtil.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/ResourceSorter.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/ShowInNavigatorAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/SortAndFilterActionGroup.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/SortViewAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/StringMatcher.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/ToggleLinkingAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/WorkspaceActionGroup.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/package.html bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/properties/FilePropertySource.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/properties/IDEPropertiesMessages.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/properties/IResourcePropertyConstants.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/properties/ResourcePropertySource.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/tasklist/CopyTaskAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/tasklist/DefaultTaskListResourceAdapter.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/tasklist/FiltersAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/tasklist/FiltersDialog.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/tasklist/GotoTaskAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/tasklist/IMarkerConstants.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/tasklist/ITaskListHelpContextIds.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/tasklist/ITaskListResourceAdapter.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/tasklist/MarkCompletedAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/tasklist/MarkerType.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/tasklist/MarkerTypesModel.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/tasklist/MarkerUtil.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/tasklist/NewTaskAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/tasklist/PasteTaskAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/tasklist/PurgeCompletedAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/tasklist/RemoveTaskAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/tasklist/ResolveMarkerAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/tasklist/SelectAllTasksAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/tasklist/TaskAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/tasklist/TaskList.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/tasklist/TaskListContentProvider.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/tasklist/TaskPropertiesAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/tasklist/TaskPropertiesDialog.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/tasklist/TaskSorter.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/tasklist/TasksFilter.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/tasklist/package.html bundles/org.eclipse.ui.ide/src/org/eclipse/ui/wizards/datatransfer/ExternalProjectImportWizard.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/wizards/datatransfer/FileStoreStructureProvider.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/wizards/datatransfer/FileSystemExportWizard.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/wizards/datatransfer/FileSystemImportWizard.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/wizards/datatransfer/FileSystemStructureProvider.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/wizards/datatransfer/IImportStructureProvider.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/wizards/datatransfer/ImportOperation.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/wizards/datatransfer/PopulateRootOperation.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/wizards/datatransfer/SelectFilesOperation.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/wizards/datatransfer/WizardExternalProjectImportPage.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/wizards/datatransfer/ZipFileExportWizard.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/wizards/datatransfer/ZipFileImportWizard.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/wizards/datatransfer/ZipFileStructureProvider.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/wizards/datatransfer/package.html bundles/org.eclipse.ui.ide/src/org/eclipse/ui/wizards/newresource/BasicNewFileResourceWizard.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/wizards/newresource/BasicNewFolderResourceWizard.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/wizards/newresource/BasicNewProjectResourceWizard.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/wizards/newresource/BasicNewResourceWizard.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/wizards/newresource/package.html bundles/org.eclipse.ui.navigator.resources/.classpath bundles/org.eclipse.ui.navigator.resources/.cvsignore bundles/org.eclipse.ui.navigator.resources/.project bundles/org.eclipse.ui.navigator.resources/.settings/org.eclipse.core.resources.prefs bundles/org.eclipse.ui.navigator.resources/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.ui.navigator.resources/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.ui.navigator.resources/.settings/org.eclipse.pde.prefs bundles/org.eclipse.ui.navigator.resources/META-INF/MANIFEST.MF bundles/org.eclipse.ui.navigator.resources/about.html bundles/org.eclipse.ui.navigator.resources/build.properties bundles/org.eclipse.ui.navigator.resources/icons/full/clcl16/collapseall.gif bundles/org.eclipse.ui.navigator.resources/icons/full/clcl16/synced.gif bundles/org.eclipse.ui.navigator.resources/icons/full/cview16/filenav_nav.gif bundles/org.eclipse.ui.navigator.resources/icons/full/elcl16/collapseall.gif bundles/org.eclipse.ui.navigator.resources/icons/full/elcl16/filter_ps.gif bundles/org.eclipse.ui.navigator.resources/icons/full/elcl16/synced.gif bundles/org.eclipse.ui.navigator.resources/icons/full/eview16/resource_persp.gif bundles/org.eclipse.ui.navigator.resources/icons/full/obj16/workingsets.gif bundles/org.eclipse.ui.navigator.resources/icons/full/ovr16/error_co.gif bundles/org.eclipse.ui.navigator.resources/icons/full/ovr16/warning_co.gif bundles/org.eclipse.ui.navigator.resources/plugin.properties bundles/org.eclipse.ui.navigator.resources/plugin.xml bundles/org.eclipse.ui.navigator.resources/prepareforpii.xml bundles/org.eclipse.ui.navigator.resources/scripts/src.jardesc bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/CopyAction.java bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/EditActionGroup.java bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/EditActionProvider.java bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/NewActionProvider.java bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/OpenActionProvider.java bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/PasteAction.java bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/PortingActionProvider.java bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/PropertiesActionProvider.java bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/QuickMenuAction.java bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/RefactorActionGroup.java bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/RefactorActionProvider.java bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/ResourceMgmtActionProvider.java bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/ResourceSelectionUtil.java bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/TextActionHandler.java bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/WorkManagementActionProvider.java bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/WorkingSetActionProvider.java bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/WorkingSetRootModeActionGroup.java bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/plugin/NavigatorUIPluginImages.java bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/plugin/WorkbenchNavigatorMessages.java bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/plugin/WorkbenchNavigatorPlugin.java bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/plugin/messages.properties bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/ResourceComparator.java bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/ResourceExtensionContentProvider.java bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/ResourceExtensionLabelProvider.java bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/ResourceExtensionSorter.java bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/ResourceLinkHelper.java bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/TabbedPropertySheetAdapterFactory.java bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/TabbedPropertySheetProjectExplorerContributor.java bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/TabbedPropertySheetTitleProvider.java bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/workingsets/WorkingSetSorter.java bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/workingsets/WorkingSetsContentProvider.java bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/workingsets/WorkingSetsLabelProvider.java bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ResourceDragAdapterAssistant.java bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ResourceDropAdapterAssistant.java bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/package.html bundles/org.eclipse.ui.navigator.resources/test.txt bundles/org.eclipse.ui.navigator/.classpath bundles/org.eclipse.ui.navigator/.cvsignore bundles/org.eclipse.ui.navigator/.project bundles/org.eclipse.ui.navigator/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.ui.navigator/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.ui.navigator/.settings/org.eclipse.pde.prefs bundles/org.eclipse.ui.navigator/META-INF/MANIFEST.MF bundles/org.eclipse.ui.navigator/about.html bundles/org.eclipse.ui.navigator/build.properties bundles/org.eclipse.ui.navigator/component.xml bundles/org.eclipse.ui.navigator/icons/full/clcl16/collapseall.gif bundles/org.eclipse.ui.navigator/icons/full/clcl16/elipses.gif bundles/org.eclipse.ui.navigator/icons/full/clcl16/pause.gif bundles/org.eclipse.ui.navigator/icons/full/clcl16/synced.gif bundles/org.eclipse.ui.navigator/icons/full/elcl16/collapseall.gif bundles/org.eclipse.ui.navigator/icons/full/elcl16/filter_ps.gif bundles/org.eclipse.ui.navigator/icons/full/elcl16/synced.gif bundles/org.eclipse.ui.navigator/javadoc-images/framework-overview.jpg bundles/org.eclipse.ui.navigator/javadoc-images/navigator_logical_extension.jpg bundles/org.eclipse.ui.navigator/jdt-patch/org.eclipse.jdt.ui_patch.txt bundles/org.eclipse.ui.navigator/models/CommonNavigator.emx bundles/org.eclipse.ui.navigator/plugin.properties bundles/org.eclipse.ui.navigator/plugin.xml bundles/org.eclipse.ui.navigator/schema/linkHelper.exsd bundles/org.eclipse.ui.navigator/schema/navigatorContent.exsd bundles/org.eclipse.ui.navigator/schema/viewer.exsd bundles/org.eclipse.ui.navigator/scripts/src.jardesc bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/AdaptabilityUtility.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/CommonNavigatorActionGroup.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/CommonNavigatorManager.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/CommonNavigatorMessages.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/CommonViewerSiteDelegate.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/CommonViewerSiteIEditorPartSiteDelegate.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/CommonViewerSiteIPageSiteDelegate.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/CommonViewerSiteIViewSiteDelegate.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/ContributorTrackingSet.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/CustomAndExpression.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/INavigatorHelpContextIds.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorActivationService.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorContentService.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorContentServiceContentProvider.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorContentServiceDescriptionProvider.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorContentServiceLabelProvider.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorFilterService.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorImages.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorPipelineService.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorPlugin.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorSaveablesService.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorSiteEditor.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/ReusableViewerLabel.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/StringMatcher.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/TextActionHandler.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/VisibilityAssistant.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/actions/CollapseAllAction.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/actions/CommonActionDescriptorManager.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/actions/CommonActionProviderDescriptor.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/actions/LinkEditorAction.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/dnd/CommonDropAdapterDescriptor.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/dnd/CommonDropDescriptorManager.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/dnd/NavigatorContentServiceTransfer.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/dnd/NavigatorDnDService.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/dnd/NavigatorPluginDropAction.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/dnd/SkeletonCommonDropAssistant.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/Binding.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/CommonActionExtensionSite.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/CommonContentExtensionSite.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/CommonDragAssistantDescriptor.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/CommonExtensionSite.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/EvalutationReference.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/ExtensionPriorityComparator.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/ExtensionStateModel.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/ILinkHelperExtPtConstants.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/INavigatorContentExtPtConstants.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/INavigatorSiteEditor.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/IViewerExtPtConstants.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/LinkHelperDescriptor.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/LinkHelperManager.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/LinkHelperService.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/NavigatorContentDescriptor.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/NavigatorContentDescriptorManager.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/NavigatorContentExtension.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/NavigatorContentRegistryReader.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/NavigatorViewerDescriptor.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/NavigatorViewerDescriptorManager.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/OverridePolicy.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/RegistryReader.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/SafeDelegateCommonLabelProvider.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/SafeDelegateTreeContentProvider.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/SkeletonActionProvider.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/SkeletonCommonDragAssistant.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/SkeletonLabelProvider.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/SkeletonLinkHelper.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/SkeletonTreeContentProvider.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/StructuredViewerManager.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/CommonFilterContentProvider.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/CommonFilterDescriptor.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/CommonFilterDescriptorManager.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/CommonFilterLabelProvider.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/CommonFilterSelectionDialog.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/CommonFiltersTab.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/ContentDescriptorContentProvider.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/ContentExtensionsTab.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/CoreExpressionFilter.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/CustomizationTab.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/FilterActionGroup.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/FilterDialogSelectionListener.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/SelectFiltersAction.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/SkeletonViewerFilter.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/ToggleFilterAction.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/UpdateActiveExtensionsOperation.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/UpdateActiveFiltersOperation.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/messages.properties bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/sorters/CommonSorterDescriptor.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/sorters/CommonSorterDescriptorManager.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/sorters/NavigatorSorterService.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/sorters/SkeletonViewerSorter.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/wizards/CommonWizardDescriptor.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/wizards/CommonWizardDescriptorManager.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/wizards/WizardShortcutAction.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonActionProvider.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonDragAdapter.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonDragAdapterAssistant.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonDropAdapter.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonDropAdapterAssistant.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonNavigator.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonViewer.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonViewerSiteFactory.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonViewerSorter.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/ICommonActionConstants.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/ICommonActionExtensionSite.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/ICommonContentExtensionSite.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/ICommonContentProvider.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/ICommonFilterDescriptor.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/ICommonLabelProvider.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/ICommonMenuConstants.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/ICommonViewerSite.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/ICommonViewerWorkbenchSite.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/IDescriptionProvider.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/IExtensionActivationListener.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/IExtensionStateModel.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/ILinkHelper.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/IMementoAware.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/INavigatorActivationService.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/INavigatorContentDescriptor.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/INavigatorContentExtension.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/INavigatorContentService.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/INavigatorContentServiceListener.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/INavigatorDnDService.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/INavigatorFilterService.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/INavigatorPipelineService.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/INavigatorSaveablesService.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/INavigatorSorterService.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/INavigatorViewerDescriptor.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/IPipelinedTreeContentProvider.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/MenuInsertionPoint.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/NavigatorActionService.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/NavigatorContentServiceFactory.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/PipelinedShapeModification.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/PipelinedViewerUpdate.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/Priority.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/SaveablesProvider.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/WizardActionGroup.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/package.html bundles/org.eclipse.ui.presentations.r21/.classpath bundles/org.eclipse.ui.presentations.r21/.cvsignore bundles/org.eclipse.ui.presentations.r21/.project bundles/org.eclipse.ui.presentations.r21/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.ui.presentations.r21/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.ui.presentations.r21/.settings/org.eclipse.pde.prefs bundles/org.eclipse.ui.presentations.r21/META-INF/MANIFEST.MF bundles/org.eclipse.ui.presentations.r21/README.TXT bundles/org.eclipse.ui.presentations.r21/about.html bundles/org.eclipse.ui.presentations.r21/build.properties bundles/org.eclipse.ui.presentations.r21/component.xml bundles/org.eclipse.ui.presentations.r21/plugin.properties bundles/org.eclipse.ui.presentations.r21/plugin.xml bundles/org.eclipse.ui.presentations.r21/r21presentation.ini bundles/org.eclipse.ui.presentations.r21/src/org/eclipse/ui/internal/presentations/R21BasicStackPresentation.java bundles/org.eclipse.ui.presentations.r21/src/org/eclipse/ui/internal/presentations/R21EditorStackPresentation.java bundles/org.eclipse.ui.presentations.r21/src/org/eclipse/ui/internal/presentations/R21PresentationFactory.java bundles/org.eclipse.ui.presentations.r21/src/org/eclipse/ui/internal/presentations/R21ViewStackPresentation.java bundles/org.eclipse.ui.presentations.r21/src/org/eclipse/ui/internal/presentations/r21/R21Colors.java bundles/org.eclipse.ui.presentations.r21/src/org/eclipse/ui/internal/presentations/r21/R21PresentationMessages.java bundles/org.eclipse.ui.presentations.r21/src/org/eclipse/ui/internal/presentations/r21/R21PresentationPlugin.java bundles/org.eclipse.ui.presentations.r21/src/org/eclipse/ui/internal/presentations/r21/messages.properties bundles/org.eclipse.ui.presentations.r21/src/org/eclipse/ui/internal/presentations/r21/widgets/CTabFolder.java bundles/org.eclipse.ui.presentations.r21/src/org/eclipse/ui/internal/presentations/r21/widgets/CTabFolderEvent.java bundles/org.eclipse.ui.presentations.r21/src/org/eclipse/ui/internal/presentations/r21/widgets/CTabFolderListener.java bundles/org.eclipse.ui.presentations.r21/src/org/eclipse/ui/internal/presentations/r21/widgets/CTabItem.java bundles/org.eclipse.ui.presentations.r21/src/org/eclipse/ui/internal/presentations/r21/widgets/R21PaneFolder.java bundles/org.eclipse.ui.presentations.r21/src/org/eclipse/ui/internal/presentations/r21/widgets/R21PaneFolderButtonListener.java bundles/org.eclipse.ui.presentations.r21/src/org/eclipse/ui/internal/presentations/r21/widgets/ViewForm.java bundles/org.eclipse.ui.tutorials.rcp.part1/.classpath bundles/org.eclipse.ui.tutorials.rcp.part1/.cvsignore bundles/org.eclipse.ui.tutorials.rcp.part1/.project bundles/org.eclipse.ui.tutorials.rcp.part1/META-INF/MANIFEST.MF bundles/org.eclipse.ui.tutorials.rcp.part1/build.properties bundles/org.eclipse.ui.tutorials.rcp.part1/part1.product bundles/org.eclipse.ui.tutorials.rcp.part1/plugin.xml bundles/org.eclipse.ui.tutorials.rcp.part1/src/org/eclipse/ui/tutorials/rcp/part1/Application.java bundles/org.eclipse.ui.tutorials.rcp.part1/src/org/eclipse/ui/tutorials/rcp/part1/ApplicationActionBarAdvisor.java bundles/org.eclipse.ui.tutorials.rcp.part1/src/org/eclipse/ui/tutorials/rcp/part1/ApplicationWorkbenchAdvisor.java bundles/org.eclipse.ui.tutorials.rcp.part1/src/org/eclipse/ui/tutorials/rcp/part1/ApplicationWorkbenchWindowAdvisor.java bundles/org.eclipse.ui.tutorials.rcp.part1/src/org/eclipse/ui/tutorials/rcp/part1/Part1Plugin.java bundles/org.eclipse.ui.tutorials.rcp.part1/src/org/eclipse/ui/tutorials/rcp/part1/Perspective.java bundles/org.eclipse.ui.tutorials.rcp.part2/.classpath bundles/org.eclipse.ui.tutorials.rcp.part2/.cvsignore bundles/org.eclipse.ui.tutorials.rcp.part2/.project bundles/org.eclipse.ui.tutorials.rcp.part2/META-INF/MANIFEST.MF bundles/org.eclipse.ui.tutorials.rcp.part2/build.properties bundles/org.eclipse.ui.tutorials.rcp.part2/part2.product bundles/org.eclipse.ui.tutorials.rcp.part2/plugin.xml bundles/org.eclipse.ui.tutorials.rcp.part2/src/org/eclipse/ui/tutorials/rcp/part2/Application.java bundles/org.eclipse.ui.tutorials.rcp.part2/src/org/eclipse/ui/tutorials/rcp/part2/ApplicationActionBarAdvisor.java bundles/org.eclipse.ui.tutorials.rcp.part2/src/org/eclipse/ui/tutorials/rcp/part2/ApplicationWorkbenchAdvisor.java bundles/org.eclipse.ui.tutorials.rcp.part2/src/org/eclipse/ui/tutorials/rcp/part2/ApplicationWorkbenchWindowAdvisor.java bundles/org.eclipse.ui.tutorials.rcp.part2/src/org/eclipse/ui/tutorials/rcp/part2/Part2Plugin.java bundles/org.eclipse.ui.tutorials.rcp.part2/src/org/eclipse/ui/tutorials/rcp/part2/Perspective.java bundles/org.eclipse.ui.tutorials.rcp.part3/.classpath bundles/org.eclipse.ui.tutorials.rcp.part3/.cvsignore bundles/org.eclipse.ui.tutorials.rcp.part3/.project bundles/org.eclipse.ui.tutorials.rcp.part3/META-INF/MANIFEST.MF bundles/org.eclipse.ui.tutorials.rcp.part3/build.properties bundles/org.eclipse.ui.tutorials.rcp.part3/icons/sample.gif bundles/org.eclipse.ui.tutorials.rcp.part3/icons/sample.icns bundles/org.eclipse.ui.tutorials.rcp.part3/icons/sample2.gif bundles/org.eclipse.ui.tutorials.rcp.part3/icons/sample3.gif bundles/org.eclipse.ui.tutorials.rcp.part3/part3.product bundles/org.eclipse.ui.tutorials.rcp.part3/plugin.properties bundles/org.eclipse.ui.tutorials.rcp.part3/plugin.xml bundles/org.eclipse.ui.tutorials.rcp.part3/product_lg.gif bundles/org.eclipse.ui.tutorials.rcp.part3/splash.bmp bundles/org.eclipse.ui.tutorials.rcp.part3/src/org/eclipse/ui/tutorials/rcp/part3/Application.java bundles/org.eclipse.ui.tutorials.rcp.part3/src/org/eclipse/ui/tutorials/rcp/part3/ApplicationActionBarAdvisor.java bundles/org.eclipse.ui.tutorials.rcp.part3/src/org/eclipse/ui/tutorials/rcp/part3/ApplicationWorkbenchAdvisor.java bundles/org.eclipse.ui.tutorials.rcp.part3/src/org/eclipse/ui/tutorials/rcp/part3/ApplicationWorkbenchWindowAdvisor.java bundles/org.eclipse.ui.tutorials.rcp.part3/src/org/eclipse/ui/tutorials/rcp/part3/ICommandIds.java bundles/org.eclipse.ui.tutorials.rcp.part3/src/org/eclipse/ui/tutorials/rcp/part3/MessagePopupAction.java bundles/org.eclipse.ui.tutorials.rcp.part3/src/org/eclipse/ui/tutorials/rcp/part3/NavigationView.java bundles/org.eclipse.ui.tutorials.rcp.part3/src/org/eclipse/ui/tutorials/rcp/part3/OpenViewAction.java bundles/org.eclipse.ui.tutorials.rcp.part3/src/org/eclipse/ui/tutorials/rcp/part3/Part3Plugin.java bundles/org.eclipse.ui.tutorials.rcp.part3/src/org/eclipse/ui/tutorials/rcp/part3/Perspective.java bundles/org.eclipse.ui.tutorials.rcp.part3/src/org/eclipse/ui/tutorials/rcp/part3/View.java bundles/org.eclipse.ui.views.properties.tabbed/.classpath bundles/org.eclipse.ui.views.properties.tabbed/.cvsignore bundles/org.eclipse.ui.views.properties.tabbed/.project bundles/org.eclipse.ui.views.properties.tabbed/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.ui.views.properties.tabbed/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.ui.views.properties.tabbed/.settings/org.eclipse.pde.prefs bundles/org.eclipse.ui.views.properties.tabbed/META-INF/MANIFEST.MF bundles/org.eclipse.ui.views.properties.tabbed/about.html bundles/org.eclipse.ui.views.properties.tabbed/build.properties bundles/org.eclipse.ui.views.properties.tabbed/plugin.properties bundles/org.eclipse.ui.views.properties.tabbed/plugin.xml bundles/org.eclipse.ui.views.properties.tabbed/schema/propertyContributor.exsd bundles/org.eclipse.ui.views.properties.tabbed/schema/propertySections.exsd bundles/org.eclipse.ui.views.properties.tabbed/schema/propertyTabs.exsd bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/TabbedPropertyViewPlugin.java bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/TabbedPropertyViewStatusCodes.java bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/l10n/TabbedPropertyMessages.java bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/l10n/TabbedPropertyMessages.properties bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/view/SectionDescriptor.java bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/view/Tab.java bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/view/TabDescriptor.java bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/view/TabListContentProvider.java bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/view/TabbedPropertyComposite.java bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/view/TabbedPropertyList.java bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/view/TabbedPropertyRegistry.java bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/view/TabbedPropertyRegistryClassSectionFilter.java bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/view/TabbedPropertyRegistryFactory.java bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/view/TabbedPropertyTitle.java bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/view/TabbedPropertyViewer.java bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/views/properties/tabbed/AbstractPropertySection.java bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/views/properties/tabbed/AbstractTypeMapper.java bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/views/properties/tabbed/AdvancedPropertySection.java bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/views/properties/tabbed/IActionProvider.java bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/views/properties/tabbed/ISection.java bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/views/properties/tabbed/ISectionDescriptor.java bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/views/properties/tabbed/ISectionDescriptorProvider.java bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/views/properties/tabbed/ITabItem.java bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/views/properties/tabbed/ITabSelectionListener.java bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/views/properties/tabbed/ITabbedPropertyConstants.java bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/views/properties/tabbed/ITabbedPropertySheetPageContributor.java bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/views/properties/tabbed/ITypeMapper.java bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/views/properties/tabbed/TabbedPropertySheetPage.java bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/views/properties/tabbed/TabbedPropertySheetWidgetFactory.java bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/views/properties/tabbed/package.html bundles/org.eclipse.ui.views/.classpath bundles/org.eclipse.ui.views/.cvsignore bundles/org.eclipse.ui.views/.project bundles/org.eclipse.ui.views/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.ui.views/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.ui.views/.settings/org.eclipse.pde.prefs bundles/org.eclipse.ui.views/META-INF/MANIFEST.MF bundles/org.eclipse.ui.views/about.html bundles/org.eclipse.ui.views/build.properties bundles/org.eclipse.ui.views/component.xml bundles/org.eclipse.ui.views/icons/full/dlcl16/defaults_ps.gif bundles/org.eclipse.ui.views/icons/full/dlcl16/filter_ps.gif bundles/org.eclipse.ui.views/icons/full/dlcl16/tree_mode.gif bundles/org.eclipse.ui.views/icons/full/elcl16/defaults_ps.gif bundles/org.eclipse.ui.views/icons/full/elcl16/filter_ps.gif bundles/org.eclipse.ui.views/icons/full/elcl16/tree_mode.gif bundles/org.eclipse.ui.views/icons/full/eview16/outline_co.gif bundles/org.eclipse.ui.views/icons/full/eview16/prop_ps.gif bundles/org.eclipse.ui.views/plugin.properties bundles/org.eclipse.ui.views/plugin.xml bundles/org.eclipse.ui.views/scripts/exportplugin.xml bundles/org.eclipse.ui.views/src/org/eclipse/ui/internal/views/ViewsPlugin.java bundles/org.eclipse.ui.views/src/org/eclipse/ui/internal/views/contentoutline/ContentOutlineMessages.java bundles/org.eclipse.ui.views/src/org/eclipse/ui/internal/views/contentoutline/messages.properties bundles/org.eclipse.ui.views/src/org/eclipse/ui/internal/views/contentoutline/package.html bundles/org.eclipse.ui.views/src/org/eclipse/ui/internal/views/properties/PropertiesMessages.java bundles/org.eclipse.ui.views/src/org/eclipse/ui/internal/views/properties/messages.properties bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/contentoutline/ContentOutline.java bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/contentoutline/ContentOutlinePage.java bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/contentoutline/IContentOutlinePage.java bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/contentoutline/package.html bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/CategoriesAction.java bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/ColorPropertyDescriptor.java bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/ComboBoxLabelProvider.java bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/ComboBoxPropertyDescriptor.java bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/CopyPropertyAction.java bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/DefaultsAction.java bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/FilterAction.java bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/ICellEditorActivationListener.java bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/IPropertiesHelpContextIds.java bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/IPropertyDescriptor.java bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/IPropertySheetEntry.java bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/IPropertySheetEntryListener.java bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/IPropertySheetPage.java bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/IPropertySource.java bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/IPropertySource2.java bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/IPropertySourceProvider.java bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/PropertyDescriptor.java bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/PropertySheet.java bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/PropertySheetAction.java bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/PropertySheetCategory.java bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/PropertySheetEntry.java bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/PropertySheetPage.java bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/PropertySheetSorter.java bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/PropertySheetViewer.java bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/TextPropertyDescriptor.java bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/package.html bundles/org.eclipse.ui.win32/.classpath bundles/org.eclipse.ui.win32/.cvsignore bundles/org.eclipse.ui.win32/.project bundles/org.eclipse.ui.win32/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.ui.win32/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.ui.win32/META-INF/MANIFEST.MF bundles/org.eclipse.ui.win32/about.html bundles/org.eclipse.ui.win32/build.properties bundles/org.eclipse.ui.win32/fragment-win32.properties bundles/org.eclipse.ui.win32/src/org/eclipse/ui/internal/editorsupport/win32/OleEditor.java bundles/org.eclipse.ui.win32/src/org/eclipse/ui/internal/editorsupport/win32/OleMessages.java bundles/org.eclipse.ui.win32/src/org/eclipse/ui/internal/editorsupport/win32/messages.properties bundles/org.eclipse.ui.workbench.compatibility/.classpath bundles/org.eclipse.ui.workbench.compatibility/.cvsignore bundles/org.eclipse.ui.workbench.compatibility/.project bundles/org.eclipse.ui.workbench.compatibility/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.ui.workbench.compatibility/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.ui.workbench.compatibility/.settings/org.eclipse.pde.prefs bundles/org.eclipse.ui.workbench.compatibility/META-INF/MANIFEST.MF bundles/org.eclipse.ui.workbench.compatibility/about.html bundles/org.eclipse.ui.workbench.compatibility/build.properties bundles/org.eclipse.ui.workbench.compatibility/fragment-compatibility.properties bundles/org.eclipse.ui.workbench.compatibility/src/org/eclipse/ui/internal/CompatibleWorkbenchPage.java bundles/org.eclipse.ui.workbench.compatibility/src/org/eclipse/ui/internal/ICompatibleWorkbenchPage.java bundles/org.eclipse.ui.workbench/.classpath bundles/org.eclipse.ui.workbench/.cvsignore bundles/org.eclipse.ui.workbench/.options bundles/org.eclipse.ui.workbench/.project bundles/org.eclipse.ui.workbench/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.ui.workbench/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.ui.workbench/.settings/org.eclipse.pde.prefs bundles/org.eclipse.ui.workbench/Eclipse UI Editor Support/org/eclipse/ui/internal/editorsupport/ComponentSupport.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/AbstractSourceProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/ActiveShellExpression.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/BasicWorkingSetElementAdapter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/ExtensionFactory.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IActionBars.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IActionBars2.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IActionDelegate.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IActionDelegate2.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IActionDelegateWithEvent.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IActionFilter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IContainmentAdapter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IDecoratorManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IEditorActionBarContributor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IEditorActionDelegate.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IEditorDescriptor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IEditorInput.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IEditorLauncher.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IEditorMatchingStrategy.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IEditorPart.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IEditorReference.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IEditorRegistry.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IEditorSite.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IElementFactory.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IExportWizard.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IFileEditorMapping.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IFolderLayout.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IImportWizard.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IInPlaceEditor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IInPlaceEditorInput.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IKeyBindingService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/ILocalWorkingSetManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IMemento.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/INavigationHistory.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/INavigationLocation.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/INavigationLocationProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/INestableKeyBindingService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/INewWizard.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/INullSelectionListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IObjectActionDelegate.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPageLayout.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPageListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPageService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPartListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPartListener2.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPartService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPathEditorInput.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPersistable.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPersistableEditor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPersistableElement.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPerspectiveDescriptor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPerspectiveFactory.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPerspectiveListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPerspectiveListener2.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPerspectiveListener3.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPerspectiveListener4.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPerspectiveRegistry.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPlaceholderFolderLayout.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPluginContribution.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPropertyListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IReusableEditor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/ISaveableFilter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/ISaveablePart.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/ISaveablePart2.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/ISaveablesLifecycleListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/ISaveablesSource.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/ISelectionListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/ISelectionService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/ISharedImages.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IShowEditorInput.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/ISizeProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/ISourceProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/ISourceProviderListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/ISources.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IStartup.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IURIEditorInput.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IViewActionDelegate.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IViewLayout.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IViewPart.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IViewReference.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IViewSite.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWindowListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbench.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchActionConstants.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPart.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPart2.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPart3.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPartConstants.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPartDescriptor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPartReference.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPartSite.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPreferenceConstants.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPreferencePage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPropertyPage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchSite.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchWindow.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchWindowActionDelegate.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchWindowPulldownDelegate.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchWindowPulldownDelegate2.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchWizard.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkingSet.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkingSetElementAdapter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkingSetManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkingSetUpdater.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/LegacyHandlerSubmissionExpression.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/NavigationLocation.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/PartInitException.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/PerspectiveAdapter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/PlatformUI.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/Saveable.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/SaveablesLifecycleEvent.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/SelectionEnabler.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/SubActionBars.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/SubActionBars2.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/WorkbenchEncoding.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/WorkbenchException.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/XMLMemento.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/about/ISystemSummarySection.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/about/package.html bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ActionContext.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ActionDelegate.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ActionFactory.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ActionGroup.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/BaseNewWizardMenu.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/BaseSelectionListenerAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/CompoundContributionItem.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ContributionItemFactory.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ExportResourcesAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ImportResourcesAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/LabelRetargetAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/NewWizardAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/NewWizardDropDownAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/OpenInNewWindowAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/OpenNewPageMenu.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/OpenNewWindowMenu.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/OpenPerspectiveAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/OpenPerspectiveMenu.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/PartEventAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/PerspectiveMenu.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/QuickMenuCreator.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/RetargetAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/SelectionProviderAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/SimpleWildcardTester.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/WorkingSetFilterActionGroup.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/package.html bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/activities/ActivitiesPreferencePage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/activities/ActivityCategoryPreferencePage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/activities/ActivityEvent.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/activities/ActivityManagerEvent.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/activities/CategoryEvent.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/activities/IActivity.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/activities/IActivityListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/activities/IActivityManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/activities/IActivityManagerListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/activities/IActivityPatternBinding.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/activities/IActivityRequirementBinding.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/activities/ICategory.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/activities/ICategoryActivityBinding.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/activities/ICategoryListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/activities/IIdentifier.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/activities/IIdentifierListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/activities/IMutableActivityManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/activities/ITriggerPoint.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/activities/ITriggerPointAdvisor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/activities/ITriggerPointManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/activities/IWorkbenchActivitySupport.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/activities/IdentifierEvent.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/activities/NotDefinedException.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/activities/WorkbenchActivityHelper.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/activities/WorkbenchTriggerPointAdvisor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/activities/package.html bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/application/ActionBarAdvisor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/application/IActionBarConfigurer.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/application/IWorkbenchConfigurer.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/application/IWorkbenchWindowConfigurer.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/application/WorkbenchAdvisor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/application/WorkbenchWindowAdvisor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/application/package.html bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/branding/IBundleGroupConstants.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/branding/IProductConstants.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/browser/AbstractWebBrowser.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/browser/AbstractWorkbenchBrowserSupport.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/browser/IWebBrowser.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/browser/IWorkbenchBrowserSupport.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/browser/package.html bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/AbstractHandler.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ActionHandler.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/CategoryEvent.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/CommandEvent.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/CommandException.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/CommandManagerEvent.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ExecutionException.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ExtensionParameterValues.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/HandlerEvent.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/HandlerSubmission.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ICategory.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ICategoryListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ICommand.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ICommandListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ICommandManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ICommandManagerListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ICommandService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/IElementReference.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/IElementUpdater.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/IHandler.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/IHandlerListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/IKeyConfiguration.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/IKeyConfigurationListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/IKeySequenceBinding.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/IWorkbenchCommandSupport.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/KeyConfigurationEvent.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/NotDefinedException.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/NotHandledException.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/Priority.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/contexts/ContextEvent.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/contexts/ContextException.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/contexts/ContextManagerEvent.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/contexts/EnabledSubmission.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/contexts/IContext.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/contexts/IContextActivation.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/contexts/IContextListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/contexts/IContextManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/contexts/IContextManagerListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/contexts/IContextService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/contexts/IWorkbenchContextSupport.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/contexts/NotDefinedException.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/contexts/package.html bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/AbstractElementListSelectionDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/CheckedTreeSelectionDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/ContainerCheckedTreeViewer.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/EditorSelectionDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/ElementListSelectionDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/ElementTreeSelectionDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/FileEditorMappingContentProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/FileEditorMappingLabelProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/FileSystemElement.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/FilteredItemsSelectionDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/FilteredList.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/FilteredTree.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/IOverwriteQuery.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/ISelectionStatusValidator.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/ISelectionValidator.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/IWorkingSetEditWizard.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/IWorkingSetNewWizard.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/IWorkingSetPage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/IWorkingSetSelectionDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/ListDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/ListSelectionDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/PatternFilter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/PreferenceLinkArea.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/PreferencesUtil.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/PropertyDialogAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/PropertyPage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/SearchPattern.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/SelectionDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/SelectionStatusDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/TwoArrayQuickSorter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/TwoPaneElementSelector.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/TypeFilteringDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/YesNoCancelListSelectionDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/package.html bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dnd/IDragAndDropService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dnd/package.html bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/fieldassist/ContentAssistCommandAdapter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/fieldassist/ContentAssistField.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/fieldassist/package.html bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/handlers/HandlerUtil.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/handlers/IHandlerActivation.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/handlers/IHandlerService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/handlers/RegistryRadioState.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/handlers/RegistryToggleState.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/handlers/ShowPerspectiveHandler.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/handlers/ShowViewHandler.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/handlers/package.html bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/help/AbstractHelpUI.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/help/DialogPageContextComputer.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/help/IContextComputer.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/help/IWorkbenchHelpSystem.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/help/ViewContextComputer.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/help/WorkbenchHelp.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/help/package.html bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/AbstractPartSelectionTracker.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/AbstractSelectionService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/AbstractWorkingSet.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/AbstractWorkingSetManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ActionDescriptor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ActionExpression.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ActionPresentation.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ActionSetActionBars.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ActionSetContributionItem.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ActionSetManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ActionSetMenuManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ActionSetSeparator.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ActionSetsEvent.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ActivateEditorAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ActiveEditorAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ActivityPersistanceHelper.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/AggregateWorkingSet.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/BaseSaveAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/BrandingProperties.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/BundleGroupProperties.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ChangeToPerspectiveMenu.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CloseAllAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CloseAllPerspectivesAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CloseAllSavedAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CloseEditorAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CloseOthersAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ClosePerspectiveAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CompatibleWorkbenchPage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ContainerPlaceholder.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CycleEditorAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CyclePartAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CyclePerspectiveAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/DefaultAnimationFeedback.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/DefaultSaveable.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/DefaultStackPresentationSite.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/DetachedPlaceHolder.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/DetachedWindow.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/DirtyPerspectiveMarker.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/DragCursors.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/DragHandle.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EarlyStartupRunnable.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditActionSetsAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorActionBars.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorActionBuilder.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorAreaHelper.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorAreaTrimPart.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorHistory.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorHistoryItem.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorMenuManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorPane.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorPluginAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorReference.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorSashContainer.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorSite.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorSiteDragAndDropServiceImpl.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorStack.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ErrorEditorPart.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ErrorViewPart.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ExceptionHandler.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ExtensionEventHandler.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ExtensionEventHandler.properties bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ExtensionEventHandlerMessages.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/FastViewBar.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/FastViewBarContextMenuContribution.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/FastViewPane.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/FolderLayout.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/HeapStatus.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IActionSetContributionItem.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IBackgroundSaveListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IChangeListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ICompatibleWorkbenchPage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IHeapStatusConstants.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ILayoutContainer.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IObjectActionContributor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IObjectContributor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IPreferenceConstants.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IReorderListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ISelectionConversionService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ITrimAreaChangeListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IWorkbenchConstants.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IWorkbenchGraphicConstants.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IWorkbenchHelpContextIds.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IWorkbenchThemeConstants.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ImageAnimationFeedback.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IntModel.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/InternalSaveable.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IntroAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/JFaceUtil.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/KeyBindingService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/LayoutHelper.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/LayoutPart.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/LayoutPartSash.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/LayoutTree.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/LayoutTreeNode.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/LegacyResourceSupport.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/LocalWorkingSetManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/LockToolBarAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/MaximizePartAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/MessageLine.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/MinimizePartAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Model.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/MultiEditorInnerPane.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/NavigationHistory.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/NavigationHistoryAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/NavigationHistoryEditorInfo.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/NavigationHistoryEntry.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ObjectActionContributor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ObjectActionContributorManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ObjectActionContributorReader.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ObjectContributorManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ObjectFilterTest.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ObjectPluginAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/OpenEmptyEditorTabHandler.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/OpenPreferencesAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/OverlayIcon.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PageEventAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PageLayout.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PageListenerList.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PagePartSelectionTracker.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PageSelectionService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartList.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartListenerList.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartListenerList2.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartPane.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartPlaceholder.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartPluginAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartSashContainer.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartSite.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartStack.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartTester.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Perspective.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveBarContributionItem.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveBarManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveBarNewContributionItem.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveHelper.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveListenerList.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveSwitcher.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveTracker.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PinEditorAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PlaceholderContributionItem.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PlaceholderFolderLayout.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PlatformUIPreferenceListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PluginAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PluginActionBuilder.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PluginActionContributionItem.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PluginActionCoolBarContributionItem.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PluginActionSet.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PluginActionSetBuilder.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PluginActionSetReader.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PopupMenuExtender.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ProductInfo.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ProductProperties.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/QuickAccessMenu.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/QuitAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/RadioMenu.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/RectangleAnimation.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ReferenceCounter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ReopenEditorMenu.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ResetPerspectiveAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveAllAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveAsAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SavePerspectiveAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveableHelper.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveablesList.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SelectionConversionService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Semaphore.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SharedImages.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShellPool.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowFastViewContribution.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowInAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowInMenu.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowPartPaneMenuAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowViewAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowViewMenu.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowViewMenuAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/StartupThreading.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SwitchToWindowMenu.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ToggleEditorsVisibilityAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/TrimArea.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/TrimDragPreferences.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/TrimDropTarget.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/TrimFrame.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/TrimLayoutData.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/TrimPart.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/TrimUtil.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/UILockListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/UISynchronizer.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewActionBars.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewActionBuilder.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewFactory.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewIntroAdapterPart.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewIntroAdapterSite.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewLayout.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewLayoutRec.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewPane.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewPluginAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewReference.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewSashContainer.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewSite.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewStack.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewStackTrimPart.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewerActionBuilder.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WWinActionBars.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WWinPartService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WWinPluginAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WWinPluginPulldown.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WindowPartSelectionTracker.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WindowSelectionService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WindowTrimProxy.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchColors.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchConfigurer.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchEditorsAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchErrorHandlerProxy.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchImages.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchIntroManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchLayout.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchLayoutSettingsTransfer.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchMessages.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPagePartList.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPartReference.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPlugin.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPreferenceInitializer.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindowConfigurer.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbookEditorsAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkingSet.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkingSetComparator.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkingSetFactory.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkingSetManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkingSetMenuContributionItem.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/AboutAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/AboutBundleData.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/AboutBundleGroupData.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/AboutData.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/AboutFeaturesButtonManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/AboutHandler.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/AboutItem.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/ConfigurationLogDefaultSection.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/AbstractWorkingSetPulldownDelegate.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/ClearWorkingSetAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/CommandAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/DynamicHelpAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/EditWorkingSetAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/HelpContentsAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/HelpSearchAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/HelpSearchContributionItem.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/ModifyWorkingSetDelegate.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/NewEditorAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/NewWizardShortcutAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/OpenPerspectiveDialogAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/PinEditorContributionItem.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/SelectWorkingSetAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/SelectWorkingSetsAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/ToggleCoolbarVisibilityAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/AbstractActivityManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/AbstractActivityRegistry.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/Activity.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ActivityDefinition.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ActivityManagerFactory.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ActivityPatternBinding.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ActivityPatternBindingDefinition.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ActivityPropertyTester.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ActivityRegistryEvent.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ActivityRequirementBinding.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ActivityRequirementBindingDefinition.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/Category.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/CategoryActivityBinding.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/CategoryActivityBindingDefinition.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/CategoryDefinition.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ExtensionActivityRegistry.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/IActivityRegistry.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/IActivityRegistryListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/Identifier.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/MutableActivityManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/Persistence.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ProxyActivityManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ws/AbstractTriggerPoint.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ws/ActivityCategoryContentProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ws/ActivityCategoryLabelProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ws/ActivityContentProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ws/ActivityEnabler.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ws/ActivityLabelProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ws/ActivityMessages.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ws/ActivityViewerFilter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ws/CategorizedActivity.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ws/EnablementDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ws/EnablementDialog.properties bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ws/ImageBindingRegistry.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ws/RegistryTriggerPoint.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ws/TriggerPointAdvisorDescriptor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ws/TriggerPointAdvisorRegistry.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ws/TriggerPointManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ws/WorkbenchActivitySupport.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ws/WorkbenchTriggerPoints.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ws/messages.properties bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/application/CompatibilityActionBarAdvisor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/application/CompatibilityWorkbenchWindowAdvisor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/browser/DefaultWebBrowser.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/browser/DefaultWorkbenchBrowserSupport.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/browser/WorkbenchBrowserSupport.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/CommandImageManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/CommandImageManagerEvent.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/CommandImagePersistence.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/CommandImageService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/CommandLegacyWrapper.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/CommandManagerFactory.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/CommandManagerLegacyWrapper.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/CommandPersistence.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/CommandService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/CommandStateProxy.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/ElementReference.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/ICommandImageManagerListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/ICommandImageService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/ILegacyAttributeNames.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/LegacyCommandListenerWrapper.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/Parameter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/ParameterValueConverterProxy.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/SlaveCommandService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/WorkbenchCommandSupport.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/contexts/ActiveContextSourceProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/contexts/ContextActivation.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/contexts/ContextAuthority.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/contexts/ContextLegacyWrapper.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/contexts/ContextManagerFactory.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/contexts/ContextManagerLegacyWrapper.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/contexts/ContextPersistence.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/contexts/ContextService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/contexts/LegacyContextListenerWrapper.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/contexts/NestableContextService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/contexts/SlaveContextService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/contexts/WorkbenchContextSupport.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/DeclarativeDecorator.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/DecorationBuilder.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/DecorationReference.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/DecorationResult.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/DecorationScheduler.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/DecoratorDefinition.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/DecoratorManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/DecoratorRegistryReader.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/FullDecoratorDefinition.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/FullDecoratorRunnable.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/FullImageDecoratorRunnable.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/FullTextDecoratorRunnable.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/LightweightActionDescriptor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/LightweightDecoratorDefinition.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/LightweightDecoratorManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/OverlayCache.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/AboutDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/AboutFeaturesDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/AboutPluginsDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/AboutSystemDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/AbstractWorkingSetDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ActionSetComparator.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/AdaptableForwarder.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/BundleSigningTray.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/CapabilityFilter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ContentTypesPreferencePage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/CustomizePerspectiveDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/DataTransferWizardCollectionComparator.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/DecoratorsPreferencePage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/DialogUtil.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/EditorsPreferencePage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/EmptyPreferencePage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/EmptyPropertyPage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ErrorPreferencePage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/EventLoopProgressMonitor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ExportPage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ExportWizard.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/FileEditorsPreferencePage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/FileExtensionDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/FilteredPreferenceDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/IPropertyPageContributor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ImportExportPage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ImportExportWizard.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ImportPage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ImportWizard.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/NewWizard.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/NewWizardCollectionComparator.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/NewWizardNewPage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/NewWizardSelectionPage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PerspContentProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PerspectivesPreferencePage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PreferenceBoldLabelProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PreferenceHistoryEntry.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PreferenceNodeFilter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PreferencePageHistory.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PreferencePatternFilter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PreferencesPageContainer.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ProductInfoDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PropertyDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PropertyPageContributorManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PropertyPageManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PropertyPageNode.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/RegistryPageContributor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/SavePerspectiveDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/SelectPerspectiveDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ShowViewDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/StartupPreferencePage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ViewComparator.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ViewContentProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ViewLabelProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ViewPatternFilter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ViewsPreferencePage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WizardActivityFilter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WizardCollectionElement.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WizardContentProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WizardPatternFilter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WizardTagFilter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchDialogBlockedHandler.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchEditorsDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchPreferenceDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchPreferenceManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchPreferenceNode.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchPreferencePage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchWizardElement.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchWizardListSelectionPage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchWizardNode.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchWizardSelectionPage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkingSetEditWizard.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkingSetFilter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkingSetLabelProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkingSetNewWizard.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkingSetSelectionDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkingSetTypePage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dnd/AbstractDropTarget.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dnd/CompatibilityDragTarget.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dnd/DragBorder.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dnd/DragUtil.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dnd/IDragOverListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dnd/IDropTarget.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dnd/IDropTarget2.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dnd/InsertCaret.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dnd/SwtUtil.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dnd/TestDropLocation.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/expressions/ActivePartExpression.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/expressions/AndExpression.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/expressions/CompositeExpression.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/expressions/LegacyActionExpressionWrapper.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/expressions/LegacyActionSetExpression.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/expressions/LegacyEditorActionBarExpression.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/expressions/LegacyEditorContributionExpression.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/expressions/LegacySelectionEnablerWrapper.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/expressions/LegacyViewContributionExpression.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/expressions/LegacyViewerContributionExpression.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/expressions/WorkbenchWindowExpression.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/ActionCommandMappingService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/ActionDelegateHandlerProxy.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/ClosePartHandler.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/CommandLegacyActionWrapper.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/DisplayHelpHandler.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/ExecutableExtensionHandler.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/HandlerActivation.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/HandlerAuthority.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/HandlerPersistence.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/HandlerProxy.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/HandlerService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/IActionCommandMappingService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/IWorkbenchWindowHandlerDelegate.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/LegacyHandlerListenerWrapper.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/LegacyHandlerProxy.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/LegacyHandlerWrapper.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/NestableHandlerService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/SelectAllHandler.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/ShowKeyAssistHandler.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/ShowPreferencePageHandler.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/SlaveHandlerService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/WidgetMethodHandler.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/WizardHandler.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/WorkbenchWindowHandlerDelegate.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/help/WorkbenchHelpSystem.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/incubator/AbstractElement.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/incubator/AbstractProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/incubator/ActionElement.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/incubator/ActionProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/incubator/CommandElement.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/incubator/CommandProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/incubator/CtrlEAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/incubator/EditorElement.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/incubator/EditorProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/incubator/FilteringInfoPopup.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/incubator/IncubatorMessages.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/incubator/PerspectiveElement.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/incubator/PerspectiveProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/incubator/PreferenceElement.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/incubator/PreferenceProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/incubator/PropertiesElement.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/incubator/PropertiesProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/incubator/ViewElement.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/incubator/ViewProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/incubator/WizardElement.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/incubator/WizardProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/incubator/messages.properties bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/intro/IIntroConstants.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/intro/IIntroDescriptor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/intro/IIntroRegistry.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/intro/IntroDescriptor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/intro/IntroMessages.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/intro/IntroRegistry.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/intro/intro.properties bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/AbstractKeyFormatter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/AbstractKeyFormatter.properties bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/AbstractModifierKeyComparator.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/AlphabeticModifierKeyComparator.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/BindingPersistence.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/BindingService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/CancelOnModifyListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/CompactKeyFormatter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/EmacsKeyFormatter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/EmacsKeyFormatter.properties bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/FormalKeyFormatter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/GnomeKeyFormatter.properties bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/ImageFactory.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/KdeKeyFormatter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/KdeKeyFormatter.properties bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/KeyAssistDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/KeyAssistDialog.properties bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/KeyAssistMessages.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/KeyBindingState.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/KeySequenceBinding.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/KeysPreferencePage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/KeysPreferencePage.properties bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/LegacySchemeListenerWrapper.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/MacKeyFormatter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/MacKeyFormatter.properties bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/NativeKeyFormatter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/NativeKeyFormatter.properties bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/NativeModifierKeyComparator.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/NewKeysPreferenceMessages.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/NewKeysPreferencePage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/NewKeysPreferencePage.properties bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/OutOfOrderListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/OutOfOrderVerifyListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/SchemeLegacyWrapper.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/WindowsKeyFormatter.properties bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/WorkbenchKeyboard.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/WorkbenchKeyboard.properties bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/layout/CacheWrapper.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/layout/CellData.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/layout/CellLayout.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/layout/CellLayoutUtil.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/layout/GridInfo.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/layout/ICachingLayout.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/layout/ITrimManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/layout/IWindowTrim.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/layout/LayoutCache.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/layout/LayoutUtil.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/layout/Row.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/layout/SizeCache.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/layout/TrimArea.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/layout/TrimCommonUIHandle.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/layout/TrimDescriptor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/layout/TrimDragPreferenceDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/layout/TrimLayout.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/AbstractWorkbenchWidget.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/IActionSetsListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/IMenuActivation.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/IMenuLabelProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/InternalControlContribution.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/LegacyActionPersistence.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/MenuActivation.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/MenuAdditionCacheEntry.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/MenuAuthority.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/MenuLocationURI.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/MenuPersistence.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/PulldownDelegateWidgetProxy.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/TrimAdditionCacheEntry.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/TrimBarManager2.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/TrimContributionManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/WidgetProxy.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/WindowMenuService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/WorkbenchMenuService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/messages.properties bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/misc/ExternalEditor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/misc/ExternalProgramImageDescriptor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/misc/Policy.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/misc/ProgramImageDescriptor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/misc/StatusUtil.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/misc/StringMatcher.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/misc/TestPartListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/misc/UIListenerLogging.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/misc/UIStats.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/operations/AdvancedValidationUserApprover.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/operations/TimeTriggeredProgressMonitorDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/operations/WorkbenchOperationSupport.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/part/IPartHost.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/part/IPartPropertyProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/part/IWorkbenchScopeConstants.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/part/NullEditorInput.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/part/NullPersistable.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/part/Part.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/part/SelectionProviderAdapter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/part/StatusPart.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/preferences/AbstractBooleanListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/preferences/AbstractIntegerListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/preferences/AbstractPropertyListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/preferences/Base64.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/preferences/IDynamicPropertyMap.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/preferences/IPropertyMap.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/preferences/IPropertyMapListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/preferences/PreferenceStoreAdapter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/preferences/PreferenceTransferElement.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/preferences/PreferenceTransferManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/preferences/PreferencesAdapter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/preferences/PropertyListenerList.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/preferences/PropertyMapAdapter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/preferences/PropertyMapUnion.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/preferences/PropertyUtil.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/preferences/SettingsTransferRegistryReader.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/preferences/ThemeAdapter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/preferences/ThemeManagerAdapter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/preferences/WorkbenchPreferenceExtensionNode.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/preferences/WorkbenchSettingsTransfer.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/preferences/WorkingCopyPreferences.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/preferences/WorkingSetSettingsTransfer.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/AbstractTableInformationControl.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/BasicPartList.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/DefaultActionBarPresentationFactory.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/ISelfUpdatingAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/NativePresentationFactory.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/NativeStackPresentation.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/PaneFolder.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/PaneFolderButtonListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/PresentablePart.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/PresentationFactoryUtil.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/PresentationSerializer.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/SystemMenuClose.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/SystemMenuCloseAll.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/SystemMenuCloseOthers.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/SystemMenuDetach.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/SystemMenuFastView.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/SystemMenuFastViewOrientation.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/SystemMenuMaximize.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/SystemMenuMinimize.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/SystemMenuMove.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/SystemMenuMoveFolder.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/SystemMenuMovePane.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/SystemMenuNewEditor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/SystemMenuPinEditor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/SystemMenuRestore.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/SystemMenuSize.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/SystemMenuSizeFastView.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/SystemMenuStateChange.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/UpdatingActionContributionItem.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/defaultpresentation/DefaultMultiTabListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/defaultpresentation/DefaultPartList.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/defaultpresentation/DefaultSimpleTabListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/defaultpresentation/DefaultTabFolder.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/defaultpresentation/DefaultTabFolderColors.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/defaultpresentation/DefaultTabItem.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/defaultpresentation/DefaultThemeListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/defaultpresentation/EmptyTabFolder.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/defaultpresentation/EmptyTabItem.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/defaultpresentation/NativePresentationFactory.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/defaultpresentation/NativeTabFolder.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/defaultpresentation/NativeTabItem.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/r33/CTabFolder.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/r33/CTabFolder2Adapter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/r33/CTabFolder2Listener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/r33/CTabFolderAdapter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/r33/CTabFolderEvent.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/r33/CTabFolderLayout.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/r33/CTabFolderListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/r33/CTabItem.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/r33/DefaultSimpleTabListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/r33/DefaultTabFolder.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/r33/DefaultTabFolderColors.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/r33/DefaultTabItem.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/r33/DefaultThemeListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/r33/PaneFolder.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/r33/PaneFolderButtonListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/r33/WorkbenchPresentationFactory_33.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/util/AbstractTabFolder.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/util/AbstractTabItem.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/util/EnhancedFillLayout.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/util/IPresentablePartList.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/util/ISystemMenu.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/util/LeftToRightTabOrder.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/util/PartInfo.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/util/PresentablePartFolder.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/util/ProxyControl.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/util/ReplaceDragHandler.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/util/StandardEditorSystemMenu.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/util/StandardSystemToolbar.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/util/StandardViewSystemMenu.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/util/TabDragHandler.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/util/TabFolderEvent.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/util/TabFolderListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/util/TabOrder.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/util/TabbedStackPresentation.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/util/WidgetTabItem.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/AbstractProgressViewer.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/AnimationItem.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/AnimationManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/BlockedJobsDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/DetailedProgressViewer.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ErrorInfo.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ErrorNotificationManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/FinishedJobs.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/GroupInfo.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/IAnimationProcessor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/IJobBusyListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/IJobProgressManagerListener.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/IProgressUpdateCollector.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/JobErrorDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/JobInfo.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/JobTreeElement.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/JobsViewPreferenceDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressAnimationItem.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressAnimationProcessor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressCanvasViewer.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressContentProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressInfoItem.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressLabelProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressManagerUtil.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressMessages.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressMonitorFocusJobDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressMonitorJobsDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressRegion.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressView.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressViewUpdater.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressViewerContentProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressViewerLabelProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/SubTaskInfo.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/TaskInfo.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/VirtualInfoItem.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/VirtualProgressView.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/VirtualProgressViewer.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/WorkbenchSiteProgressService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/messages.properties bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/provisional/application/IActionBarConfigurer2.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/provisional/presentations/IActionBarPresentationFactory.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/ActionSetDescriptor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/ActionSetRegistry.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/CategorizedPageRegistryReader.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/Category.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/EditorDescriptor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/EditorRegistry.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/EditorRegistryReader.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/FileEditorMapping.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/IActionSet.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/IActionSetDescriptor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/IWorkbenchRegistryConstants.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/KeywordRegistry.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/PerspectiveDescriptor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/PerspectiveExtensionReader.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/PerspectiveRegistry.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/PerspectiveRegistryReader.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/PreferencePageParameterValues.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/PreferencePageRegistryReader.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/PreferenceTransferRegistryReader.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/PropertyPagesRegistryReader.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/RegistryReader.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/ShowViewHandler.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/StickyViewDescriptor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/UIExtensionTracker.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/ViewDescriptor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/ViewParameterValues.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/ViewRegistry.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/ViewRegistryReader.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/WizardParameterValues.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/WizardsRegistryReader.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/WorkingSetDescriptor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/WorkingSetRegistry.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/WorkingSetRegistryReader.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/ActionSetSourceProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/ActivePartSourceProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/ActiveShellSourceProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/CurrentSelectionSourceProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/EvaluationResultCache.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/EvaluationResultCacheComparator.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/ExpressionAuthority.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/IEvaluationResultCache.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/INestable.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/ISourceProviderService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/MenuSourceProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/PreferencePersistence.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/RegistryPersistence.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/ServiceLocator.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/SourcePriorityNameMapping.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/SourceProviderService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/splash/EclipseSplashHandler.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/splash/SplashHandlerFactory.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/StatusHandlerDescriptor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/StatusHandlerDescriptorsMap.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/StatusHandlerProductBindingDescriptor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/StatusHandlerRegistry.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/package.html bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/testing/WorkbenchPartTestable.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/testing/WorkbenchTestable.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/CascadingColorRegistry.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/CascadingFontRegistry.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/CascadingMap.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/CascadingTheme.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ColorDefinition.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ColorsAndFontsPreferencePage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ColorsAndFontsPreferencePage.properties bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/FontDefinition.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ICategorizedThemeElementDefinition.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/IEditable.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/IHierarchalThemeElementDefinition.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/IThemeDescriptor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/IThemeElementDefinition.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/IThemeRegistry.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/RGBContrastFactory.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/Theme.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/Theme.properties bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ThemeDescriptor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ThemeElementCategory.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ThemeElementHelper.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ThemeRegistry.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ThemeRegistryReader.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ThemeRegistryReader.properties bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/WorkbenchPreview.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/WorkbenchThemeManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/util/BundleUtility.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/util/ConfigurationElementMemento.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/util/Descriptors.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/util/ImageSupport.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/util/PrefUtil.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/util/SWTResourceUtil.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/util/StatusLineContributionItem.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/util/Util.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/wizards/AbstractExtensionWizardRegistry.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/wizards/AbstractWizardRegistry.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/wizards/ExportWizardRegistry.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/wizards/ImportWizardRegistry.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/wizards/NewWizardRegistry.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/wizards/preferences/PreferencesExportWizard.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/wizards/preferences/PreferencesImportWizard.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/wizards/preferences/PreferencesMessages.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/wizards/preferences/WizardPreferencesExportPage1.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/wizards/preferences/WizardPreferencesImportPage1.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/wizards/preferences/WizardPreferencesPage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/wizards/preferences/messages.properties bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/intro/IIntroManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/intro/IIntroPart.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/intro/IIntroSite.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/intro/package.html bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/CharacterKey.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/IBindingService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/IKeyFormatter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/Key.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/KeyFormatterFactory.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/KeySequence.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/KeyStroke.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/ModifierKey.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/NaturalKey.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/ParseException.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/SWTKeySupport.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/SpecialKey.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/package.html bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/AbstractContributionFactory.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/AbstractWorkbenchTrimWidget.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/CommandContributionItem.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/IMenuService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/IWorkbenchWidget.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/MenuUtil.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/UIElement.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/WorkbenchWindowControlContribution.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/package.html bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/model/AdaptableList.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/model/BaseWorkbenchContentProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/model/IWorkbenchAdapter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/model/IWorkbenchAdapter2.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/model/PerspectiveLabelProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/model/WorkbenchAdapter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/model/WorkbenchLabelProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/model/WorkbenchPartLabelProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/model/WorkbenchViewerComparator.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/model/WorkbenchViewerSorter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/model/package.html bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/operations/IWorkbenchOperationSupport.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/operations/LinearUndoViolationUserApprover.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/operations/NonLocalUndoUserApprover.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/operations/OperationHistoryActionHandler.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/operations/RedoActionHandler.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/operations/UndoActionHandler.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/operations/UndoRedoActionGroup.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/operations/package.html bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/package.html bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/CellEditorActionHandler.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/CoolItemGroupMarker.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/DrillDownAdapter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/DrillDownComposite.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/DrillFrame.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/DrillStack.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/EditorActionBarContributor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/EditorInputTransfer.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/EditorPart.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/IContributedContentsView.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/IDropActionDelegate.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/IPage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/IPageBookViewPage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/IPageSite.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/ISetSelectionTarget.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/IShowInSource.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/IShowInTarget.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/IShowInTargetList.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/IWorkbenchPartOrientation.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/IntroPart.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/MessagePage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/MultiEditor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/MultiEditorInput.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/MultiPageEditor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/MultiPageEditorActionBarContributor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/MultiPageEditorPart.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/MultiPageEditorSite.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/MultiPageSelectionProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/Page.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/PageBook.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/PageBookView.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/PageSite.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/PluginDropAdapter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/PluginTransfer.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/PluginTransferData.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/ShowInContext.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/ViewPart.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/WorkbenchPart.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/package.html bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/plugin/AbstractUIPlugin.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/plugin/package.html bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/preferences/IWorkbenchPreferenceContainer.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/preferences/IWorkingCopyManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/preferences/ScopedPreferenceStore.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/preferences/SettingsTransfer.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/preferences/ViewPreferencesAction.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/preferences/ViewSettingsDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/preferences/WorkingCopyManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/preferences/package.html bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/presentations/AbstractPresentationFactory.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/presentations/IPartMenu.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/presentations/IPresentablePart.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/presentations/IPresentationSerializer.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/presentations/IStackPresentationSite.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/presentations/PresentationUtil.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/presentations/StackDropResult.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/presentations/StackPresentation.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/presentations/WorkbenchPresentationFactory.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/progress/DeferredTreeContentManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/progress/IDeferredWorkbenchAdapter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/progress/IElementCollector.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/progress/IJobRunnable.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/progress/IProgressConstants.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/progress/IProgressService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/progress/IWorkbenchSiteProgressService.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/progress/PendingUpdateAdapter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/progress/UIJob.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/progress/WorkbenchJob.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/progress/package.html bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/services/IDisposable.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/services/IServiceLocator.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/services/IServiceScopes.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/services/IServiceWithSources.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/splash/AbstractSplashHandler.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/splash/BasicSplashHandler.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/splash/package.html bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/statushandlers/AbstractStatusHandler.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/statushandlers/StatusAdapter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/statushandlers/StatusDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/statushandlers/StatusManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/statushandlers/StatusNotificationManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/statushandlers/WorkbenchErrorHandler.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/statushandlers/package.html bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/testing/ITestHarness.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/testing/IWorkbenchPartTestable.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/testing/TestableObject.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/themes/ColorUtil.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/themes/IColorFactory.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/themes/ITheme.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/themes/IThemeManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/themes/IThemePreview.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/themes/RGBBlendColorFactory.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/themes/package.html bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/views/IStickyViewDescriptor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/views/IViewCategory.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/views/IViewDescriptor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/views/IViewRegistry.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/views/package.html bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/wizards/IWizardCategory.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/wizards/IWizardDescriptor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/wizards/IWizardRegistry.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/wizards/package.html bundles/org.eclipse.ui.workbench/META-INF/MANIFEST.MF bundles/org.eclipse.ui.workbench/about.html bundles/org.eclipse.ui.workbench/build.properties bundles/org.eclipse.ui.workbench/plugin.properties bundles/org.eclipse.ui.workbench/plugin.xml bundles/org.eclipse.ui.workbench/scripts/exportplugin.xml bundles/org.eclipse.ui/.classpath bundles/org.eclipse.ui/.cvsignore bundles/org.eclipse.ui/.options bundles/org.eclipse.ui/.project bundles/org.eclipse.ui/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.ui/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.ui/.settings/org.eclipse.pde.prefs bundles/org.eclipse.ui/META-INF/MANIFEST.MF bundles/org.eclipse.ui/about.html bundles/org.eclipse.ui/build.properties bundles/org.eclipse.ui/buildnotes_workbench.html bundles/org.eclipse.ui/component.xml bundles/org.eclipse.ui/icons/full/dlcl16/backward_nav.gif bundles/org.eclipse.ui/icons/full/dlcl16/close_view.gif bundles/org.eclipse.ui/icons/full/dlcl16/collapseall.gif bundles/org.eclipse.ui/icons/full/dlcl16/forward_nav.gif bundles/org.eclipse.ui/icons/full/dlcl16/home_nav.gif bundles/org.eclipse.ui/icons/full/dlcl16/linkto_help.gif bundles/org.eclipse.ui/icons/full/dlcl16/min_view.gif bundles/org.eclipse.ui/icons/full/dlcl16/pin_view.gif bundles/org.eclipse.ui/icons/full/dlcl16/progress_rem.gif bundles/org.eclipse.ui/icons/full/dlcl16/progress_remall.gif bundles/org.eclipse.ui/icons/full/dlcl16/progress_stop.gif bundles/org.eclipse.ui/icons/full/dlcl16/step_current.gif bundles/org.eclipse.ui/icons/full/dlcl16/step_done.gif bundles/org.eclipse.ui/icons/full/dlcl16/synced.gif bundles/org.eclipse.ui/icons/full/dlcl16/trash.gif bundles/org.eclipse.ui/icons/full/dlcl16/up_nav.gif bundles/org.eclipse.ui/icons/full/dlcl16/view_menu.gif bundles/org.eclipse.ui/icons/full/dtool16/clear_co.gif bundles/org.eclipse.ui/icons/full/dtool16/copy_edit.gif bundles/org.eclipse.ui/icons/full/dtool16/cut_edit.gif bundles/org.eclipse.ui/icons/full/dtool16/delete_edit.gif bundles/org.eclipse.ui/icons/full/dtool16/export_wiz.gif bundles/org.eclipse.ui/icons/full/dtool16/help_contents.gif bundles/org.eclipse.ui/icons/full/dtool16/import_wiz.gif bundles/org.eclipse.ui/icons/full/dtool16/new_fastview.gif bundles/org.eclipse.ui/icons/full/dtool16/new_wiz.gif bundles/org.eclipse.ui/icons/full/dtool16/paste_edit.gif bundles/org.eclipse.ui/icons/full/dtool16/pin_editor.gif bundles/org.eclipse.ui/icons/full/dtool16/print_edit.gif bundles/org.eclipse.ui/icons/full/dtool16/redo_edit.gif bundles/org.eclipse.ui/icons/full/dtool16/save_edit.gif bundles/org.eclipse.ui/icons/full/dtool16/saveall_edit.gif bundles/org.eclipse.ui/icons/full/dtool16/saveas_edit.gif bundles/org.eclipse.ui/icons/full/dtool16/undo_edit.gif bundles/org.eclipse.ui/icons/full/elcl16/backward_nav.gif bundles/org.eclipse.ui/icons/full/elcl16/close_view.gif bundles/org.eclipse.ui/icons/full/elcl16/collapseall.gif bundles/org.eclipse.ui/icons/full/elcl16/forward_nav.gif bundles/org.eclipse.ui/icons/full/elcl16/home_nav.gif bundles/org.eclipse.ui/icons/full/elcl16/linkto_help.gif bundles/org.eclipse.ui/icons/full/elcl16/min_view.gif bundles/org.eclipse.ui/icons/full/elcl16/pin_view.gif bundles/org.eclipse.ui/icons/full/elcl16/progress_rem.gif bundles/org.eclipse.ui/icons/full/elcl16/progress_remall.gif bundles/org.eclipse.ui/icons/full/elcl16/progress_stop.gif bundles/org.eclipse.ui/icons/full/elcl16/step_current.gif bundles/org.eclipse.ui/icons/full/elcl16/step_done.gif bundles/org.eclipse.ui/icons/full/elcl16/synced.gif bundles/org.eclipse.ui/icons/full/elcl16/thin_close_view.gif bundles/org.eclipse.ui/icons/full/elcl16/thin_hide_toolbar.GIF bundles/org.eclipse.ui/icons/full/elcl16/thin_max_view.gif bundles/org.eclipse.ui/icons/full/elcl16/thin_min_view.gif bundles/org.eclipse.ui/icons/full/elcl16/thin_restore_view.GIF bundles/org.eclipse.ui/icons/full/elcl16/thin_show_toolbar.GIF bundles/org.eclipse.ui/icons/full/elcl16/thin_view_menu.GIF bundles/org.eclipse.ui/icons/full/elcl16/trash.gif bundles/org.eclipse.ui/icons/full/elcl16/up_nav.gif bundles/org.eclipse.ui/icons/full/elcl16/view_menu.gif bundles/org.eclipse.ui/icons/full/etool16/clear_co.gif bundles/org.eclipse.ui/icons/full/etool16/copy_edit.gif bundles/org.eclipse.ui/icons/full/etool16/cut_edit.gif bundles/org.eclipse.ui/icons/full/etool16/delete_edit.gif bundles/org.eclipse.ui/icons/full/etool16/editor_area.gif bundles/org.eclipse.ui/icons/full/etool16/export_wiz.gif bundles/org.eclipse.ui/icons/full/etool16/fastview_restore.gif bundles/org.eclipse.ui/icons/full/etool16/help_contents.gif bundles/org.eclipse.ui/icons/full/etool16/help_search.gif bundles/org.eclipse.ui/icons/full/etool16/import_wiz.gif bundles/org.eclipse.ui/icons/full/etool16/new_fastview.gif bundles/org.eclipse.ui/icons/full/etool16/new_wiz.gif bundles/org.eclipse.ui/icons/full/etool16/paste_edit.gif bundles/org.eclipse.ui/icons/full/etool16/pin_editor.gif bundles/org.eclipse.ui/icons/full/etool16/print_edit.gif bundles/org.eclipse.ui/icons/full/etool16/redo_edit.gif bundles/org.eclipse.ui/icons/full/etool16/save_edit.gif bundles/org.eclipse.ui/icons/full/etool16/saveall_edit.gif bundles/org.eclipse.ui/icons/full/etool16/saveas_edit.gif bundles/org.eclipse.ui/icons/full/etool16/undo_edit.gif bundles/org.eclipse.ui/icons/full/eview16/bkmrk_nav.gif bundles/org.eclipse.ui/icons/full/eview16/default_persp.gif bundles/org.eclipse.ui/icons/full/eview16/defaultview_misc.gif bundles/org.eclipse.ui/icons/full/eview16/filenav_nav.gif bundles/org.eclipse.ui/icons/full/eview16/new_persp.gif bundles/org.eclipse.ui/icons/full/eview16/outline_co.gif bundles/org.eclipse.ui/icons/full/eview16/problems_view.gif bundles/org.eclipse.ui/icons/full/eview16/prop_ps.gif bundles/org.eclipse.ui/icons/full/eview16/tasks_tsk.gif bundles/org.eclipse.ui/icons/full/obj16/activity.gif bundles/org.eclipse.ui/icons/full/obj16/activity_category.gif bundles/org.eclipse.ui/icons/full/obj16/add_obj.gif bundles/org.eclipse.ui/icons/full/obj16/blank.gif bundles/org.eclipse.ui/icons/full/obj16/change_obj.gif bundles/org.eclipse.ui/icons/full/obj16/delete_obj.gif bundles/org.eclipse.ui/icons/full/obj16/elements_obj.gif bundles/org.eclipse.ui/icons/full/obj16/error_tsk.gif bundles/org.eclipse.ui/icons/full/obj16/file_obj.gif bundles/org.eclipse.ui/icons/full/obj16/fldr_obj.gif bundles/org.eclipse.ui/icons/full/obj16/font.gif bundles/org.eclipse.ui/icons/full/obj16/generic_element.gif bundles/org.eclipse.ui/icons/full/obj16/generic_elements.gif bundles/org.eclipse.ui/icons/full/obj16/info_tsk.gif bundles/org.eclipse.ui/icons/full/obj16/keygroups_obj.gif bundles/org.eclipse.ui/icons/full/obj16/layout_co.gif bundles/org.eclipse.ui/icons/full/obj16/menu.gif bundles/org.eclipse.ui/icons/full/obj16/separator.gif bundles/org.eclipse.ui/icons/full/obj16/signed_no.gif bundles/org.eclipse.ui/icons/full/obj16/signed_unknown.gif bundles/org.eclipse.ui/icons/full/obj16/signed_yes.gif bundles/org.eclipse.ui/icons/full/obj16/submenu.gif bundles/org.eclipse.ui/icons/full/obj16/theme_category.gif bundles/org.eclipse.ui/icons/full/obj16/toolbar.gif bundles/org.eclipse.ui/icons/full/obj16/warn_tsk.gif bundles/org.eclipse.ui/icons/full/obj16/workingsets.gif bundles/org.eclipse.ui/icons/full/ovr16/lock_ovr.gif bundles/org.eclipse.ui/icons/full/ovr16/pinned_ovr.gif bundles/org.eclipse.ui/icons/full/pointer/bottom_mask.bmp bundles/org.eclipse.ui/icons/full/pointer/bottom_source.bmp bundles/org.eclipse.ui/icons/full/pointer/invalid_mask.bmp bundles/org.eclipse.ui/icons/full/pointer/invalid_source.bmp bundles/org.eclipse.ui/icons/full/pointer/left_mask.bmp bundles/org.eclipse.ui/icons/full/pointer/left_source.bmp bundles/org.eclipse.ui/icons/full/pointer/offscreen_mask.bmp bundles/org.eclipse.ui/icons/full/pointer/offscreen_source.bmp bundles/org.eclipse.ui/icons/full/pointer/right_mask.bmp bundles/org.eclipse.ui/icons/full/pointer/right_source.bmp bundles/org.eclipse.ui/icons/full/pointer/stack_mask.bmp bundles/org.eclipse.ui/icons/full/pointer/stack_source.bmp bundles/org.eclipse.ui/icons/full/pointer/tofastview_mask.bmp bundles/org.eclipse.ui/icons/full/pointer/tofastview_source.bmp bundles/org.eclipse.ui/icons/full/pointer/top_mask.bmp bundles/org.eclipse.ui/icons/full/pointer/top_source.bmp bundles/org.eclipse.ui/icons/full/progress/errorstate.gif bundles/org.eclipse.ui/icons/full/progress/lockedstate.gif bundles/org.eclipse.ui/icons/full/progress/progress_error.gif bundles/org.eclipse.ui/icons/full/progress/progress_none.gif bundles/org.eclipse.ui/icons/full/progress/progress_ok.gif bundles/org.eclipse.ui/icons/full/progress/progress_task.gif bundles/org.eclipse.ui/icons/full/progress/pview.gif bundles/org.eclipse.ui/icons/full/progress/sleeping.gif bundles/org.eclipse.ui/icons/full/progress/waiting.gif bundles/org.eclipse.ui/icons/full/wizban/export_wiz.png bundles/org.eclipse.ui/icons/full/wizban/exportdir_wiz.png bundles/org.eclipse.ui/icons/full/wizban/exportpref_wiz.png bundles/org.eclipse.ui/icons/full/wizban/import_wiz.png bundles/org.eclipse.ui/icons/full/wizban/importdir_wiz.png bundles/org.eclipse.ui/icons/full/wizban/importpref_wiz.png bundles/org.eclipse.ui/icons/full/wizban/new_wiz.png bundles/org.eclipse.ui/icons/full/wizban/workset_wiz.png bundles/org.eclipse.ui/plugin.properties bundles/org.eclipse.ui/plugin.xml bundles/org.eclipse.ui/schema/acceleratorConfigurations.exsd bundles/org.eclipse.ui/schema/acceleratorScopes.exsd bundles/org.eclipse.ui/schema/acceleratorSets.exsd bundles/org.eclipse.ui/schema/actionDefinitions.exsd bundles/org.eclipse.ui/schema/actionSetPartAssociations.exsd bundles/org.eclipse.ui/schema/actionSets.exsd bundles/org.eclipse.ui/schema/activities.exsd bundles/org.eclipse.ui/schema/activitySupport.exsd bundles/org.eclipse.ui/schema/bindings.exsd bundles/org.eclipse.ui/schema/browserSupport.exsd bundles/org.eclipse.ui/schema/commandImages.exsd bundles/org.eclipse.ui/schema/commands.exsd bundles/org.eclipse.ui/schema/commonAction.exsd bundles/org.eclipse.ui/schema/commonExpression.exsd bundles/org.eclipse.ui/schema/contexts.exsd bundles/org.eclipse.ui/schema/decorators.exsd bundles/org.eclipse.ui/schema/dropActions.exsd bundles/org.eclipse.ui/schema/editorActions.exsd bundles/org.eclipse.ui/schema/editors.exsd bundles/org.eclipse.ui/schema/elementFactories.exsd bundles/org.eclipse.ui/schema/encodings.exsd bundles/org.eclipse.ui/schema/exportWizards.exsd bundles/org.eclipse.ui/schema/fontDefinitions.exsd bundles/org.eclipse.ui/schema/handlers.exsd bundles/org.eclipse.ui/schema/helpSupport.exsd bundles/org.eclipse.ui/schema/importWizards.exsd bundles/org.eclipse.ui/schema/intro.exsd bundles/org.eclipse.ui/schema/keywords.exsd bundles/org.eclipse.ui/schema/menus.exsd bundles/org.eclipse.ui/schema/newWizards.exsd bundles/org.eclipse.ui/schema/perspectiveExtensions.exsd bundles/org.eclipse.ui/schema/perspectives.exsd bundles/org.eclipse.ui/schema/popupMenus.exsd bundles/org.eclipse.ui/schema/preferencePages.exsd bundles/org.eclipse.ui/schema/preferenceTransfer.exsd bundles/org.eclipse.ui/schema/presentationFactories.exsd bundles/org.eclipse.ui/schema/propertyPages.exsd bundles/org.eclipse.ui/schema/splashHandlers.exsd bundles/org.eclipse.ui/schema/startup.exsd bundles/org.eclipse.ui/schema/statusHandlers.exsd bundles/org.eclipse.ui/schema/systemSummarySections.exsd bundles/org.eclipse.ui/schema/themes.exsd bundles/org.eclipse.ui/schema/viewActions.exsd bundles/org.eclipse.ui/schema/views.exsd bundles/org.eclipse.ui/schema/workingSets.exsd bundles/org.eclipse.ui/scripts/exportplugin.xml bundles/org.eclipse.ui/src/org/eclipse/ui/internal/UIPlugin.java bundles/org.eclipse.ui/src/org/eclipse/ui/internal/UIPreferenceInitializer.java examples/org.eclipse.jface.examples.databinding/.classpath examples/org.eclipse.jface.examples.databinding/.cvsignore examples/org.eclipse.jface.examples.databinding/.project examples/org.eclipse.jface.examples.databinding/.settings/org.eclipse.jdt.core.prefs examples/org.eclipse.jface.examples.databinding/.settings/org.eclipse.jdt.ui.prefs examples/org.eclipse.jface.examples.databinding/.settings/org.eclipse.pde.prefs examples/org.eclipse.jface.examples.databinding/META-INF/MANIFEST.MF examples/org.eclipse.jface.examples.databinding/about.html examples/org.eclipse.jface.examples.databinding/build.properties examples/org.eclipse.jface.examples.databinding/plugin.properties examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/ModelObject.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/AsynchronousTestSet.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/LabelProviderTest.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/LabelProviderTest2.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/RenamableItem.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/SimpleNode.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/SomeMathFunction.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/StructuredContentProviderTest.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/TreeContentProviderTest.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/ducks/DuckType.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/ducks/ReflectedMethod.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/ducks/ReflectedProperty.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/ducks/RelaxedDuckType.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/EditMask.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/EditMaskParseException.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/EditMaskTest.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/internal/EditMaskLexerAndToken.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/internal/EditMaskParser.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/internal/SWTUtil.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/internal/WorkQueue.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Account.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Adventure.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/AdventureFactory.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/AggregateObservableValue.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Cart.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Catalog.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Category.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Lodging.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/PriceModelObject.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/SampleData.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Signon.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/SimpleModel.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/SimpleOrder.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/SimplePerson.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Transportation.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/nestedselection/TestMasterDetail.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/radioGroup/RadioGroup.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/radioGroup/VetoableSelectionListener.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet000HelloWorld.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet001NestedSelectionWithCombo.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet002UpdateComboRetainSelection.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet003UpdateComboBindUsingViewer.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet004DataBindingContextErrorLabel.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet005MenuUpdater.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet006Spreadsheet.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet007ColorLabelProvider.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet008ComputedValue.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet009TableViewer.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet010MasterDetail.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet011ValidateMultipleBindingsSnippet.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet0xffffffff.java examples/org.eclipse.jface.snippets/.classpath examples/org.eclipse.jface.snippets/.project examples/org.eclipse.jface.snippets/.settings/org.eclipse.jdt.core.prefs examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/dialogs/Snippet012DialogWithImageButtons.java examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/dialogs/cancel.png examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/dialogs/filesave.png examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/layout/Snippet013GridLayoutFactory.java examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet001TableViewer.java examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet002TreeViewer.java examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet003TableLabelProvider.java examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet004HideSelection.java examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet005TreeCustomMenu.java examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet006TableMultiLineCells.java examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet007FullSelection.java examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet008RevealElement.java examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet009CellEditors.java examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet010OwnerDraw.java examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet011CustomTooltips.java examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet013TableViewerNoMandatoryLabelProvider.java examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet014TreeViewerNoMandatoryLabelProvider.java examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet015CustomTooltipsForTree.java examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet016TableLayout.java examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet017TableViewerHideShowColumns.java examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet018TableViewerAddRemoveColumnsWithEditing.java examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet019TableViewerAddRemoveColumnsWithEditingNewAPI.java examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet021CellEditorsOnDoubleClick.java examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet022TableViewerRefreshNoScroll.java examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet023TreeViewerCustomTooltips.java examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet024TableViewerExploreNewAPI.java examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet025TabEditing.java examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/window/Snippet020CustomizedControlTooltips.java examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/window/linkto_help.gif examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/window/showerr_tsk.gif examples/org.eclipse.jface.snippets/META-INF/MANIFEST.MF examples/org.eclipse.jface.snippets/build.properties examples/org.eclipse.ui.examples.contributions/.project examples/org.eclipse.ui.examples.fieldassist/.classpath examples/org.eclipse.ui.examples.fieldassist/.cvsignore examples/org.eclipse.ui.examples.fieldassist/.project examples/org.eclipse.ui.examples.fieldassist/.settings/org.eclipse.jdt.core.prefs examples/org.eclipse.ui.examples.fieldassist/.settings/org.eclipse.jdt.ui.prefs examples/org.eclipse.ui.examples.fieldassist/.settings/org.eclipse.pde.prefs examples/org.eclipse.ui.examples.fieldassist/Eclipse UI Examples Field Assist/org/eclipse/ui/examples/fieldassist/ControlDecorationTestDialog.java examples/org.eclipse.ui.examples.fieldassist/Eclipse UI Examples Field Assist/org/eclipse/ui/examples/fieldassist/DecoratedFieldTestDialog.java examples/org.eclipse.ui.examples.fieldassist/Eclipse UI Examples Field Assist/org/eclipse/ui/examples/fieldassist/FieldAssistPlugin.java examples/org.eclipse.ui.examples.fieldassist/Eclipse UI Examples Field Assist/org/eclipse/ui/examples/fieldassist/FieldAssistTestDialog.java examples/org.eclipse.ui.examples.fieldassist/Eclipse UI Examples Field Assist/org/eclipse/ui/examples/fieldassist/TaskAssistExampleMessages.java examples/org.eclipse.ui.examples.fieldassist/Eclipse UI Examples Field Assist/org/eclipse/ui/examples/fieldassist/actions/TestDialogAction.java examples/org.eclipse.ui.examples.fieldassist/Eclipse UI Examples Field Assist/org/eclipse/ui/examples/fieldassist/messages.properties examples/org.eclipse.ui.examples.fieldassist/Eclipse UI Examples Field Assist/org/eclipse/ui/examples/fieldassist/preferences/ContentAssistPreferencePage.java examples/org.eclipse.ui.examples.fieldassist/Eclipse UI Examples Field Assist/org/eclipse/ui/examples/fieldassist/preferences/FieldAssistPreferencePage.java examples/org.eclipse.ui.examples.fieldassist/Eclipse UI Examples Field Assist/org/eclipse/ui/examples/fieldassist/preferences/PreferenceConstants.java examples/org.eclipse.ui.examples.fieldassist/Eclipse UI Examples Field Assist/org/eclipse/ui/examples/fieldassist/preferences/PreferenceInitializer.java examples/org.eclipse.ui.examples.fieldassist/META-INF/MANIFEST.MF examples/org.eclipse.ui.examples.fieldassist/about.html examples/org.eclipse.ui.examples.fieldassist/build.properties examples/org.eclipse.ui.examples.fieldassist/doc-html/hglegal.htm examples/org.eclipse.ui.examples.fieldassist/doc-html/ui_fieldassist_ex.html examples/org.eclipse.ui.examples.fieldassist/icons/sample.gif examples/org.eclipse.ui.examples.fieldassist/plugin.properties examples/org.eclipse.ui.examples.fieldassist/plugin.xml examples/org.eclipse.ui.examples.job/.classpath examples/org.eclipse.ui.examples.job/.cvsignore examples/org.eclipse.ui.examples.job/.project examples/org.eclipse.ui.examples.job/META-INF/MANIFEST.MF examples/org.eclipse.ui.examples.job/README.TXT examples/org.eclipse.ui.examples.job/about.html examples/org.eclipse.ui.examples.job/build.properties examples/org.eclipse.ui.examples.job/doc/Responsive UIs.ppt examples/org.eclipse.ui.examples.job/doc/eclipse-con-talk_2.doc examples/org.eclipse.ui.examples.job/doc/responsive_ui.html examples/org.eclipse.ui.examples.job/doc/usecases.txt examples/org.eclipse.ui.examples.job/doc/workspace-lock.html examples/org.eclipse.ui.examples.job/icons/job_view.gif examples/org.eclipse.ui.examples.job/icons/sample.gif examples/org.eclipse.ui.examples.job/icons/suspend.gif examples/org.eclipse.ui.examples.job/icons/tree_view.gif examples/org.eclipse.ui.examples.job/plugin.xml examples/org.eclipse.ui.examples.job/src/org/eclipse/ui/examples/jobs/BusyShowWhileDialog.java examples/org.eclipse.ui.examples.job/src/org/eclipse/ui/examples/jobs/ProgressExamplesPlugin.java examples/org.eclipse.ui.examples.job/src/org/eclipse/ui/examples/jobs/TestJob.java examples/org.eclipse.ui.examples.job/src/org/eclipse/ui/examples/jobs/UITestJob.java examples/org.eclipse.ui.examples.job/src/org/eclipse/ui/examples/jobs/actions/CreateJobsAction.java examples/org.eclipse.ui.examples.job/src/org/eclipse/ui/examples/jobs/actions/DebugJobManagerAction.java examples/org.eclipse.ui.examples.job/src/org/eclipse/ui/examples/jobs/actions/ForegroundAction.java examples/org.eclipse.ui.examples.job/src/org/eclipse/ui/examples/jobs/actions/JobAction.java examples/org.eclipse.ui.examples.job/src/org/eclipse/ui/examples/jobs/actions/SuspendJobManagerAction.java examples/org.eclipse.ui.examples.job/src/org/eclipse/ui/examples/jobs/views/DeferredContentProvider.java examples/org.eclipse.ui.examples.job/src/org/eclipse/ui/examples/jobs/views/JobsView.java examples/org.eclipse.ui.examples.job/src/org/eclipse/ui/examples/jobs/views/LazyTreeView.java examples/org.eclipse.ui.examples.job/src/org/eclipse/ui/examples/jobs/views/ProgressExampleAdapterFactory.java examples/org.eclipse.ui.examples.job/src/org/eclipse/ui/examples/jobs/views/SlowElement.java examples/org.eclipse.ui.examples.job/src/org/eclipse/ui/examples/jobs/views/SlowElementAdapter.java examples/org.eclipse.ui.examples.multipageeditor/.classpath examples/org.eclipse.ui.examples.multipageeditor/.cvsignore examples/org.eclipse.ui.examples.multipageeditor/.project examples/org.eclipse.ui.examples.multipageeditor/.settings/org.eclipse.jdt.core.prefs examples/org.eclipse.ui.examples.multipageeditor/.settings/org.eclipse.jdt.ui.prefs examples/org.eclipse.ui.examples.multipageeditor/.settings/org.eclipse.pde.prefs examples/org.eclipse.ui.examples.multipageeditor/Eclipse UI Examples MultiPageEditor/org/eclipse/ui/examples/multipageeditor/MessageUtil.java examples/org.eclipse.ui.examples.multipageeditor/Eclipse UI Examples MultiPageEditor/org/eclipse/ui/examples/multipageeditor/MultiPageContributor.java examples/org.eclipse.ui.examples.multipageeditor/Eclipse UI Examples MultiPageEditor/org/eclipse/ui/examples/multipageeditor/MultiPageEditorExample.java examples/org.eclipse.ui.examples.multipageeditor/Eclipse UI Examples MultiPageEditor/org/eclipse/ui/examples/multipageeditor/messages.properties examples/org.eclipse.ui.examples.multipageeditor/META-INF/MANIFEST.MF examples/org.eclipse.ui.examples.multipageeditor/about.html examples/org.eclipse.ui.examples.multipageeditor/build.properties examples/org.eclipse.ui.examples.multipageeditor/doc-html/hglegal.htm examples/org.eclipse.ui.examples.multipageeditor/doc-html/ui_multipageeditor_ex.html examples/org.eclipse.ui.examples.multipageeditor/icons/copy.gif examples/org.eclipse.ui.examples.multipageeditor/plugin.properties examples/org.eclipse.ui.examples.multipageeditor/plugin.xml examples/org.eclipse.ui.examples.navigator/.classpath examples/org.eclipse.ui.examples.navigator/.project examples/org.eclipse.ui.examples.navigator/.settings/org.eclipse.jdt.core.prefs examples/org.eclipse.ui.examples.navigator/.settings/org.eclipse.jdt.ui.prefs examples/org.eclipse.ui.examples.navigator/.settings/org.eclipse.pde.prefs examples/org.eclipse.ui.examples.navigator/META-INF/MANIFEST.MF examples/org.eclipse.ui.examples.navigator/about.html examples/org.eclipse.ui.examples.navigator/build.properties examples/org.eclipse.ui.examples.navigator/icons/delete_obj.gif examples/org.eclipse.ui.examples.navigator/icons/filenav_nav.gif examples/org.eclipse.ui.examples.navigator/icons/prop_ps.gif examples/org.eclipse.ui.examples.navigator/plugin.properties examples/org.eclipse.ui.examples.navigator/plugin.xml examples/org.eclipse.ui.examples.navigator/src/org/eclipse/ui/examples/navigator/PropertiesContentProvider.java examples/org.eclipse.ui.examples.navigator/src/org/eclipse/ui/examples/navigator/PropertiesLabelProvider.java examples/org.eclipse.ui.examples.navigator/src/org/eclipse/ui/examples/navigator/PropertiesTreeData.java examples/org.eclipse.ui.examples.navigator/src/org/eclipse/ui/examples/navigator/actions/DeletePropertyAction.java examples/org.eclipse.ui.examples.navigator/src/org/eclipse/ui/examples/navigator/actions/OpenPropertyAction.java examples/org.eclipse.ui.examples.navigator/src/org/eclipse/ui/examples/navigator/actions/PropertyActionProvider.java examples/org.eclipse.ui.examples.navigator/src/org/eclipse/ui/internal/examples/navigator/Activator.java examples/org.eclipse.ui.examples.presentation/.classpath examples/org.eclipse.ui.examples.presentation/.cvsignore examples/org.eclipse.ui.examples.presentation/.project examples/org.eclipse.ui.examples.presentation/BareBonesPresentation.ini examples/org.eclipse.ui.examples.presentation/WrappedTabsPresentation.ini examples/org.eclipse.ui.examples.presentation/about.html examples/org.eclipse.ui.examples.presentation/build.properties examples/org.eclipse.ui.examples.presentation/eclipsecon2005-presentationsAPI.ppt examples/org.eclipse.ui.examples.presentation/icons/close_view.gif examples/org.eclipse.ui.examples.presentation/icons/hide_toolbar.GIF examples/org.eclipse.ui.examples.presentation/icons/max_view.gif examples/org.eclipse.ui.examples.presentation/icons/min_view.gif examples/org.eclipse.ui.examples.presentation/icons/restore_view.GIF examples/org.eclipse.ui.examples.presentation/icons/show_toolbar.GIF examples/org.eclipse.ui.examples.presentation/icons/view_menu.GIF examples/org.eclipse.ui.examples.presentation/plugin.xml examples/org.eclipse.ui.examples.presentation/src/org/eclipse/ui/examples/presentation/PresentationExamplesPlugin.java examples/org.eclipse.ui.examples.presentation/src/org/eclipse/ui/examples/presentation/PresentationImages.java examples/org.eclipse.ui.examples.presentation/src/org/eclipse/ui/examples/presentation/PresentationPlugin.java examples/org.eclipse.ui.examples.presentation/src/org/eclipse/ui/examples/presentation/barebones/BareBonesPartPresentation.java examples/org.eclipse.ui.examples.presentation/src/org/eclipse/ui/examples/presentation/barebones/BareBonesPresentationFactory.java examples/org.eclipse.ui.examples.presentation/src/org/eclipse/ui/examples/presentation/baretittle/BareTitlePresentationFactory.java examples/org.eclipse.ui.examples.presentation/src/org/eclipse/ui/examples/presentation/baretittle/BareTitleStackPresentation.java examples/org.eclipse.ui.examples.presentation/src/org/eclipse/ui/examples/presentation/sidewinder/ClosePartContributionItem.java examples/org.eclipse.ui.examples.presentation/src/org/eclipse/ui/examples/presentation/sidewinder/PartItem.java examples/org.eclipse.ui.examples.presentation/src/org/eclipse/ui/examples/presentation/sidewinder/SideWinderItemViewPresentation.java examples/org.eclipse.ui.examples.presentation/src/org/eclipse/ui/examples/presentation/sidewinder/SideWinderPresentationFactory.java examples/org.eclipse.ui.examples.presentation/src/org/eclipse/ui/examples/presentation/wrappedtabs/ChangeStackStateContributionItem.java examples/org.eclipse.ui.examples.presentation/src/org/eclipse/ui/examples/presentation/wrappedtabs/CloseAllContributionItem.java examples/org.eclipse.ui.examples.presentation/src/org/eclipse/ui/examples/presentation/wrappedtabs/CloseContributionItem.java examples/org.eclipse.ui.examples.presentation/src/org/eclipse/ui/examples/presentation/wrappedtabs/CloseOthersContributionItem.java examples/org.eclipse.ui.examples.presentation/src/org/eclipse/ui/examples/presentation/wrappedtabs/PartListContributionItem.java examples/org.eclipse.ui.examples.presentation/src/org/eclipse/ui/examples/presentation/wrappedtabs/ProxyControl.java examples/org.eclipse.ui.examples.presentation/src/org/eclipse/ui/examples/presentation/wrappedtabs/ShowToolbarContributionItem.java examples/org.eclipse.ui.examples.presentation/src/org/eclipse/ui/examples/presentation/wrappedtabs/WrappedTabsPartPresentation.java examples/org.eclipse.ui.examples.presentation/src/org/eclipse/ui/examples/presentation/wrappedtabs/WrappedTabsPresentationFactory.java examples/org.eclipse.ui.examples.presentation/src/org/eclipse/ui/examples/presentation/wrappedtabs/WrappedTabsThemeConstants.java examples/org.eclipse.ui.examples.presentation/src/org/eclipse/ui/examples/presentation/wrappedtabs/WrappedTabsUtil.java examples/org.eclipse.ui.examples.propertysheet/.classpath examples/org.eclipse.ui.examples.propertysheet/.cvsignore examples/org.eclipse.ui.examples.propertysheet/.project examples/org.eclipse.ui.examples.propertysheet/.settings/org.eclipse.jdt.core.prefs examples/org.eclipse.ui.examples.propertysheet/.settings/org.eclipse.jdt.ui.prefs examples/org.eclipse.ui.examples.propertysheet/.settings/org.eclipse.pde.prefs examples/org.eclipse.ui.examples.propertysheet/Eclipse UI Examples PropertySheet/org/eclipse/ui/examples/propertysheet/Address.java examples/org.eclipse.ui.examples.propertysheet/Eclipse UI Examples PropertySheet/org/eclipse/ui/examples/propertysheet/Birthday.java examples/org.eclipse.ui.examples.propertysheet/Eclipse UI Examples PropertySheet/org/eclipse/ui/examples/propertysheet/EmailAddress.java examples/org.eclipse.ui.examples.propertysheet/Eclipse UI Examples PropertySheet/org/eclipse/ui/examples/propertysheet/EmailAddressValidator.java examples/org.eclipse.ui.examples.propertysheet/Eclipse UI Examples PropertySheet/org/eclipse/ui/examples/propertysheet/GroupElement.java examples/org.eclipse.ui.examples.propertysheet/Eclipse UI Examples PropertySheet/org/eclipse/ui/examples/propertysheet/IUserConstants.java examples/org.eclipse.ui.examples.propertysheet/Eclipse UI Examples PropertySheet/org/eclipse/ui/examples/propertysheet/MessageUtil.java examples/org.eclipse.ui.examples.propertysheet/Eclipse UI Examples PropertySheet/org/eclipse/ui/examples/propertysheet/Name.java examples/org.eclipse.ui.examples.propertysheet/Eclipse UI Examples PropertySheet/org/eclipse/ui/examples/propertysheet/OrganizationElement.java examples/org.eclipse.ui.examples.propertysheet/Eclipse UI Examples PropertySheet/org/eclipse/ui/examples/propertysheet/PopupMenuActionDelegate.java examples/org.eclipse.ui.examples.propertysheet/Eclipse UI Examples PropertySheet/org/eclipse/ui/examples/propertysheet/PropertySheetContentOutlinePage.java examples/org.eclipse.ui.examples.propertysheet/Eclipse UI Examples PropertySheet/org/eclipse/ui/examples/propertysheet/PropertySheetPlugin.java examples/org.eclipse.ui.examples.propertysheet/Eclipse UI Examples PropertySheet/org/eclipse/ui/examples/propertysheet/StreetAddress.java examples/org.eclipse.ui.examples.propertysheet/Eclipse UI Examples PropertySheet/org/eclipse/ui/examples/propertysheet/UserEditor.java examples/org.eclipse.ui.examples.propertysheet/Eclipse UI Examples PropertySheet/org/eclipse/ui/examples/propertysheet/UserElement.java examples/org.eclipse.ui.examples.propertysheet/Eclipse UI Examples PropertySheet/org/eclipse/ui/examples/propertysheet/UserFileParser.java examples/org.eclipse.ui.examples.propertysheet/Eclipse UI Examples PropertySheet/org/eclipse/ui/examples/propertysheet/messages.properties examples/org.eclipse.ui.examples.propertysheet/HelpContexts.xml examples/org.eclipse.ui.examples.propertysheet/META-INF/MANIFEST.MF examples/org.eclipse.ui.examples.propertysheet/about.html examples/org.eclipse.ui.examples.propertysheet/build.properties examples/org.eclipse.ui.examples.propertysheet/doc-html/hglegal.htm examples/org.eclipse.ui.examples.propertysheet/doc-html/ui_propertysheet_ex.html examples/org.eclipse.ui.examples.propertysheet/doc.zip examples/org.eclipse.ui.examples.propertysheet/icons/obj16/usereditor.gif examples/org.eclipse.ui.examples.propertysheet/plugin.properties examples/org.eclipse.ui.examples.propertysheet/plugin.xml examples/org.eclipse.ui.examples.rcp.browser/.classpath examples/org.eclipse.ui.examples.rcp.browser/.cvsignore examples/org.eclipse.ui.examples.rcp.browser/.project examples/org.eclipse.ui.examples.rcp.browser/.settings/org.eclipse.jdt.core.prefs examples/org.eclipse.ui.examples.rcp.browser/.settings/org.eclipse.jdt.ui.prefs examples/org.eclipse.ui.examples.rcp.browser/Browser.product examples/org.eclipse.ui.examples.rcp.browser/META-INF/MANIFEST.MF examples/org.eclipse.ui.examples.rcp.browser/about.html examples/org.eclipse.ui.examples.rcp.browser/build.properties examples/org.eclipse.ui.examples.rcp.browser/icons/alt16.gif examples/org.eclipse.ui.examples.rcp.browser/icons/alt32.gif examples/org.eclipse.ui.examples.rcp.browser/icons/alt_about.gif examples/org.eclipse.ui.examples.rcp.browser/icons/eclipse.gif examples/org.eclipse.ui.examples.rcp.browser/icons/eclipse32.gif examples/org.eclipse.ui.examples.rcp.browser/icons/eclipse_lg.gif examples/org.eclipse.ui.examples.rcp.browser/plugin.properties examples/org.eclipse.ui.examples.rcp.browser/plugin.xml examples/org.eclipse.ui.examples.rcp.browser/plugin_customization.ini examples/org.eclipse.ui.examples.rcp.browser/readme.html examples/org.eclipse.ui.examples.rcp.browser/splash.bmp examples/org.eclipse.ui.examples.rcp.browser/src/org/eclipse/ui/examples/rcp/browser/BrowserActionBarAdvisor.java examples/org.eclipse.ui.examples.rcp.browser/src/org/eclipse/ui/examples/rcp/browser/BrowserAdvisor.java examples/org.eclipse.ui.examples.rcp.browser/src/org/eclipse/ui/examples/rcp/browser/BrowserApp.java examples/org.eclipse.ui.examples.rcp.browser/src/org/eclipse/ui/examples/rcp/browser/BrowserPerspectiveFactory.java examples/org.eclipse.ui.examples.rcp.browser/src/org/eclipse/ui/examples/rcp/browser/BrowserPlugin.java examples/org.eclipse.ui.examples.rcp.browser/src/org/eclipse/ui/examples/rcp/browser/BrowserPreferenceInitializer.java examples/org.eclipse.ui.examples.rcp.browser/src/org/eclipse/ui/examples/rcp/browser/BrowserView.java examples/org.eclipse.ui.examples.rcp.browser/src/org/eclipse/ui/examples/rcp/browser/BrowserWindowAdvisor.java examples/org.eclipse.ui.examples.rcp.browser/src/org/eclipse/ui/examples/rcp/browser/HistoryView.java examples/org.eclipse.ui.examples.rcp.browser/src/org/eclipse/ui/examples/rcp/browser/IBrowserConstants.java examples/org.eclipse.ui.examples.rcp.browser/src/org/eclipse/ui/examples/rcp/browser/ISecondaryPart.java examples/org.eclipse.ui.examples.readmetool/.classpath examples/org.eclipse.ui.examples.readmetool/.cvsignore examples/org.eclipse.ui.examples.readmetool/.project examples/org.eclipse.ui.examples.readmetool/.settings/org.eclipse.jdt.core.prefs examples/org.eclipse.ui.examples.readmetool/.settings/org.eclipse.jdt.ui.prefs examples/org.eclipse.ui.examples.readmetool/.settings/org.eclipse.pde.prefs examples/org.eclipse.ui.examples.readmetool/Eclipse UI Examples Readme Tool/org/eclipse/ui/examples/readmetool/AdaptableList.java examples/org.eclipse.ui.examples.readmetool/Eclipse UI Examples Readme Tool/org/eclipse/ui/examples/readmetool/AddReadmeMarkerAction.java examples/org.eclipse.ui.examples.readmetool/Eclipse UI Examples Readme Tool/org/eclipse/ui/examples/readmetool/AddSentenceResolution.java examples/org.eclipse.ui.examples.readmetool/Eclipse UI Examples Readme Tool/org/eclipse/ui/examples/readmetool/DefaultSectionsParser.java examples/org.eclipse.ui.examples.readmetool/Eclipse UI Examples Readme Tool/org/eclipse/ui/examples/readmetool/DirtyStateContribution.java examples/org.eclipse.ui.examples.readmetool/Eclipse UI Examples Readme Tool/org/eclipse/ui/examples/readmetool/EditorActionDelegate.java examples/org.eclipse.ui.examples.readmetool/Eclipse UI Examples Readme Tool/org/eclipse/ui/examples/readmetool/IReadmeConstants.java examples/org.eclipse.ui.examples.readmetool/Eclipse UI Examples Readme Tool/org/eclipse/ui/examples/readmetool/IReadmeFileParser.java examples/org.eclipse.ui.examples.readmetool/Eclipse UI Examples Readme Tool/org/eclipse/ui/examples/readmetool/MarkElement.java examples/org.eclipse.ui.examples.readmetool/Eclipse UI Examples Readme Tool/org/eclipse/ui/examples/readmetool/MarkElementProperties.java examples/org.eclipse.ui.examples.readmetool/Eclipse UI Examples Readme Tool/org/eclipse/ui/examples/readmetool/MessageUtil.java examples/org.eclipse.ui.examples.readmetool/Eclipse UI Examples Readme Tool/org/eclipse/ui/examples/readmetool/PopupMenuActionDelegate.java examples/org.eclipse.ui.examples.readmetool/Eclipse UI Examples Readme Tool/org/eclipse/ui/examples/readmetool/ReadmeContentOutlineDragListener.java examples/org.eclipse.ui.examples.readmetool/Eclipse UI Examples Readme Tool/org/eclipse/ui/examples/readmetool/ReadmeContentOutlinePage.java examples/org.eclipse.ui.examples.readmetool/Eclipse UI Examples Readme Tool/org/eclipse/ui/examples/readmetool/ReadmeControlContribution.java examples/org.eclipse.ui.examples.readmetool/Eclipse UI Examples Readme Tool/org/eclipse/ui/examples/readmetool/ReadmeCreationPage.java examples/org.eclipse.ui.examples.readmetool/Eclipse UI Examples Readme Tool/org/eclipse/ui/examples/readmetool/ReadmeCreationWizard.java examples/org.eclipse.ui.examples.readmetool/Eclipse UI Examples Readme Tool/org/eclipse/ui/examples/readmetool/ReadmeDropActionDelegate.java examples/org.eclipse.ui.examples.readmetool/Eclipse UI Examples Readme Tool/org/eclipse/ui/examples/readmetool/ReadmeEditor.java examples/org.eclipse.ui.examples.readmetool/Eclipse UI Examples Readme Tool/org/eclipse/ui/examples/readmetool/ReadmeEditorActionBarContributor.java examples/org.eclipse.ui.examples.readmetool/Eclipse UI Examples Readme Tool/org/eclipse/ui/examples/readmetool/ReadmeFilePropertyPage.java examples/org.eclipse.ui.examples.readmetool/Eclipse UI Examples Readme Tool/org/eclipse/ui/examples/readmetool/ReadmeFilePropertyPage2.java examples/org.eclipse.ui.examples.readmetool/Eclipse UI Examples Readme Tool/org/eclipse/ui/examples/readmetool/ReadmeImages.java examples/org.eclipse.ui.examples.readmetool/Eclipse UI Examples Readme Tool/org/eclipse/ui/examples/readmetool/ReadmeMarkerResolutionGenerator.java examples/org.eclipse.ui.examples.readmetool/Eclipse UI Examples Readme Tool/org/eclipse/ui/examples/readmetool/ReadmeModelFactory.java examples/org.eclipse.ui.examples.readmetool/Eclipse UI Examples Readme Tool/org/eclipse/ui/examples/readmetool/ReadmePlugin.java examples/org.eclipse.ui.examples.readmetool/Eclipse UI Examples Readme Tool/org/eclipse/ui/examples/readmetool/ReadmePreferenceInitializer.java examples/org.eclipse.ui.examples.readmetool/Eclipse UI Examples Readme Tool/org/eclipse/ui/examples/readmetool/ReadmePreferencePage.java examples/org.eclipse.ui.examples.readmetool/Eclipse UI Examples Readme Tool/org/eclipse/ui/examples/readmetool/ReadmeSectionsView.java examples/org.eclipse.ui.examples.readmetool/Eclipse UI Examples Readme Tool/org/eclipse/ui/examples/readmetool/ReadmeTrimWidget.java examples/org.eclipse.ui.examples.readmetool/Eclipse UI Examples Readme Tool/org/eclipse/ui/examples/readmetool/SectionsDialog.java examples/org.eclipse.ui.examples.readmetool/Eclipse UI Examples Readme Tool/org/eclipse/ui/examples/readmetool/ViewActionDelegate.java examples/org.eclipse.ui.examples.readmetool/Eclipse UI Examples Readme Tool/org/eclipse/ui/examples/readmetool/WindowActionDelegate.java examples/org.eclipse.ui.examples.readmetool/Eclipse UI Examples Readme Tool/org/eclipse/ui/examples/readmetool/messages.properties examples/org.eclipse.ui.examples.readmetool/HelpContexts.xml examples/org.eclipse.ui.examples.readmetool/META-INF/MANIFEST.MF examples/org.eclipse.ui.examples.readmetool/about.html examples/org.eclipse.ui.examples.readmetool/build.properties examples/org.eclipse.ui.examples.readmetool/doc-html/hglegal.htm examples/org.eclipse.ui.examples.readmetool/doc-html/ui_readmetool_ex.html examples/org.eclipse.ui.examples.readmetool/doc.zip examples/org.eclipse.ui.examples.readmetool/doc/hglegal.htm examples/org.eclipse.ui.examples.readmetool/doc/org_eclipse_ui_examples_readmetool.html examples/org.eclipse.ui.examples.readmetool/doc/org_eclipse_ui_examples_readmetool_sectionParser.html examples/org.eclipse.ui.examples.readmetool/icons/ctool16/action1.gif examples/org.eclipse.ui.examples.readmetool/icons/ctool16/action2.gif examples/org.eclipse.ui.examples.readmetool/icons/ctool16/action3.gif examples/org.eclipse.ui.examples.readmetool/icons/ctool16/openbrwsr.gif examples/org.eclipse.ui.examples.readmetool/icons/dtool16/action1.gif examples/org.eclipse.ui.examples.readmetool/icons/dtool16/action2.gif examples/org.eclipse.ui.examples.readmetool/icons/dtool16/action3.gif examples/org.eclipse.ui.examples.readmetool/icons/dtool16/openbrwsr.gif examples/org.eclipse.ui.examples.readmetool/icons/etool16/action1.gif examples/org.eclipse.ui.examples.readmetool/icons/etool16/action2.gif examples/org.eclipse.ui.examples.readmetool/icons/etool16/action3.gif examples/org.eclipse.ui.examples.readmetool/icons/etool16/openbrwsr.gif examples/org.eclipse.ui.examples.readmetool/icons/obj16/editor.gif examples/org.eclipse.ui.examples.readmetool/icons/obj16/newreadme_wiz.gif examples/org.eclipse.ui.examples.readmetool/icons/obj16/usereditor.gif examples/org.eclipse.ui.examples.readmetool/icons/view16/sections.gif examples/org.eclipse.ui.examples.readmetool/icons/wizban/newreadme_wiz.gif examples/org.eclipse.ui.examples.readmetool/plugin.properties examples/org.eclipse.ui.examples.readmetool/plugin.xml examples/org.eclipse.ui.examples.undo/.classpath examples/org.eclipse.ui.examples.undo/.cvsignore examples/org.eclipse.ui.examples.undo/.project examples/org.eclipse.ui.examples.undo/.settings/org.eclipse.jdt.core.prefs examples/org.eclipse.ui.examples.undo/.settings/org.eclipse.jdt.ui.prefs examples/org.eclipse.ui.examples.undo/.settings/org.eclipse.pde.prefs examples/org.eclipse.ui.examples.undo/Eclipse UI Examples Undo/org/eclipse/ui/examples/undo/AddBoxOperation.java examples/org.eclipse.ui.examples.undo/Eclipse UI Examples Undo/org/eclipse/ui/examples/undo/Box.java examples/org.eclipse.ui.examples.undo/Eclipse UI Examples Undo/org/eclipse/ui/examples/undo/BoxOperation.java examples/org.eclipse.ui.examples.undo/Eclipse UI Examples Undo/org/eclipse/ui/examples/undo/Boxes.java examples/org.eclipse.ui.examples.undo/Eclipse UI Examples Undo/org/eclipse/ui/examples/undo/ClearBoxesOperation.java examples/org.eclipse.ui.examples.undo/Eclipse UI Examples Undo/org/eclipse/ui/examples/undo/MoveBoxOperation.java examples/org.eclipse.ui.examples.undo/Eclipse UI Examples Undo/org/eclipse/ui/examples/undo/PromptingUserApprover.java examples/org.eclipse.ui.examples.undo/Eclipse UI Examples Undo/org/eclipse/ui/examples/undo/UndoExampleMessages.java examples/org.eclipse.ui.examples.undo/Eclipse UI Examples Undo/org/eclipse/ui/examples/undo/UndoPlugin.java examples/org.eclipse.ui.examples.undo/Eclipse UI Examples Undo/org/eclipse/ui/examples/undo/messages.properties examples/org.eclipse.ui.examples.undo/Eclipse UI Examples Undo/org/eclipse/ui/examples/undo/preferences/PreferenceConstants.java examples/org.eclipse.ui.examples.undo/Eclipse UI Examples Undo/org/eclipse/ui/examples/undo/preferences/PreferenceInitializer.java examples/org.eclipse.ui.examples.undo/Eclipse UI Examples Undo/org/eclipse/ui/examples/undo/preferences/UndoPreferencePage.java examples/org.eclipse.ui.examples.undo/Eclipse UI Examples Undo/org/eclipse/ui/examples/undo/views/BoxView.java examples/org.eclipse.ui.examples.undo/Eclipse UI Examples Undo/org/eclipse/ui/examples/undo/views/UndoHistoryView.java examples/org.eclipse.ui.examples.undo/META-INF/MANIFEST.MF examples/org.eclipse.ui.examples.undo/about.html examples/org.eclipse.ui.examples.undo/build.properties examples/org.eclipse.ui.examples.undo/doc-html/ui_undo_ex.html examples/org.eclipse.ui.examples.undo/icons/sample.gif examples/org.eclipse.ui.examples.undo/plugin.properties examples/org.eclipse.ui.examples.undo/plugin.xml examples/org.eclipse.ui.examples.views.properties.tabbed.article/.classpath examples/org.eclipse.ui.examples.views.properties.tabbed.article/.cvsignore examples/org.eclipse.ui.examples.views.properties.tabbed.article/.project examples/org.eclipse.ui.examples.views.properties.tabbed.article/.settings/org.eclipse.jdt.core.prefs examples/org.eclipse.ui.examples.views.properties.tabbed.article/.settings/org.eclipse.jdt.ui.prefs examples/org.eclipse.ui.examples.views.properties.tabbed.article/.settings/org.eclipse.pde.prefs examples/org.eclipse.ui.examples.views.properties.tabbed.article/META-INF/MANIFEST.MF examples/org.eclipse.ui.examples.views.properties.tabbed.article/about.html examples/org.eclipse.ui.examples.views.properties.tabbed.article/build.properties examples/org.eclipse.ui.examples.views.properties.tabbed.article/icons/sample.gif examples/org.eclipse.ui.examples.views.properties.tabbed.article/plugin.properties examples/org.eclipse.ui.examples.views.properties.tabbed.article/plugin.xml examples/org.eclipse.ui.examples.views.properties.tabbed.article/src/org/eclipse/ui/examples/views/properties/tabbed/article/Activator.java examples/org.eclipse.ui.examples.views.properties.tabbed.article/src/org/eclipse/ui/examples/views/properties/tabbed/article/views/ButtonElement.java examples/org.eclipse.ui.examples.views.properties.tabbed.article/src/org/eclipse/ui/examples/views/properties/tabbed/article/views/ButtonElementProperties.java examples/org.eclipse.ui.examples.views.properties.tabbed.article/src/org/eclipse/ui/examples/views/properties/tabbed/article/views/CheckBoxPropertyDescriptor.java examples/org.eclipse.ui.examples.views.properties.tabbed.article/src/org/eclipse/ui/examples/views/properties/tabbed/article/views/FontDialogCellEditor.java examples/org.eclipse.ui.examples.views.properties.tabbed.article/src/org/eclipse/ui/examples/views/properties/tabbed/article/views/FontPropertyDescriptor.java examples/org.eclipse.ui.examples.views.properties.tabbed.article/src/org/eclipse/ui/examples/views/properties/tabbed/article/views/FontSection.java examples/org.eclipse.ui.examples.views.properties.tabbed.article/src/org/eclipse/ui/examples/views/properties/tabbed/article/views/LabelSection.java examples/org.eclipse.ui.examples.views.properties.tabbed.article/src/org/eclipse/ui/examples/views/properties/tabbed/article/views/SampleView.java examples/org.eclipse.ui.examples.views.properties.tabbed.article/src/org/eclipse/ui/examples/views/properties/tabbed/article/views/SizePropertySource.java examples/org.eclipse.ui.examples.views.properties.tabbed.article/src/org/eclipse/ui/examples/views/properties/tabbed/article/views/SizeSection.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/.classpath examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/.cvsignore examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/.project examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/.settings/org.eclipse.jdt.core.prefs examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/.settings/org.eclipse.jdt.ui.prefs examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/.settings/org.eclipse.pde.prefs examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/META-INF/MANIFEST.MF examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/about.html examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/build.properties examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/icons/full/ctool16/CreateDefence_playerStats_PlayerStats.gif examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/icons/full/ctool16/CreateForward_playerStats_PlayerStats.gif examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/icons/full/ctool16/CreateGoalie_goalieStats_GoalieStats.gif examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/icons/full/ctool16/CreateLeague_teams_Team.gif examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/icons/full/ctool16/CreateTeam_arena_Arena.gif examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/icons/full/ctool16/CreateTeam_defencemen_Defence.gif examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/icons/full/ctool16/CreateTeam_forwards_Forward.gif examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/icons/full/ctool16/CreateTeam_goalies_Goalie.gif examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/icons/full/obj16/Arena.gif examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/icons/full/obj16/Defence.gif examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/icons/full/obj16/Forward.gif examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/icons/full/obj16/Goalie.gif examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/icons/full/obj16/GoalieStats.gif examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/icons/full/obj16/Height.gif examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/icons/full/obj16/HockeyleagueModelFile.gif examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/icons/full/obj16/HockeyleagueObject.gif examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/icons/full/obj16/League.gif examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/icons/full/obj16/Player.gif examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/icons/full/obj16/PlayerStats.gif examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/icons/full/obj16/Team.gif examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/icons/full/obj16/Weight.gif examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/icons/full/wizban/NewHockeyleague.gif examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/icons/hockeyleague.gif examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/model/hockeyleague.ecore examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/model/hockeyleague.genmodel examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/plugin.properties examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/plugin.xml examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/Arena.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/Defence.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/DefencePositionKind.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/Forward.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ForwardPositionKind.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/Goalie.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/GoalieStats.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/HeightKind.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/HockeyleagueFactory.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/HockeyleagueObject.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/HockeyleaguePackage.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/HockeyleaguePlugin.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/League.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/Player.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/PlayerStats.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ShotKind.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/Team.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/WeightKind.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/impl/ArenaImpl.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/impl/DefenceImpl.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/impl/ForwardImpl.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/impl/GoalieImpl.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/impl/GoalieStatsImpl.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/impl/HockeyleagueFactoryImpl.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/impl/HockeyleagueObjectImpl.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/impl/HockeyleaguePackageImpl.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/impl/LeagueImpl.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/impl/PlayerImpl.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/impl/PlayerStatsImpl.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/impl/TeamImpl.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/provider/ArenaItemProvider.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/provider/DefenceItemProvider.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/provider/ForwardItemProvider.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/provider/GoalieItemProvider.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/provider/GoalieStatsItemProvider.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/provider/HockeyleagueItemProviderAdapterFactory.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/provider/HockeyleagueObjectItemProvider.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/provider/LeagueItemProvider.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/provider/PlayerItemProvider.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/provider/PlayerStatsItemProvider.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/provider/TeamItemProvider.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/actions/HockeyleagueCreateChildAction.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/dialogs/HockeyleagueSetDefaultsDialog.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/editor/HockeyleagueActionBarContributor.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/editor/HockeyleagueEditor.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/properties/HockeyleagueLabelProvider.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/properties/HockeyleaguePropertySheetPage.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/properties/TextChangeHelper.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/properties/sections/AbstractEnumerationPropertySection.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/properties/sections/AbstractHockeyleaguePropertySection.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/properties/sections/AbstractIntegerPropertySection.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/properties/sections/AbstractMeasurementPropertySection.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/properties/sections/AbstractPlayersPropertySection.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/properties/sections/AbstractStringPropertySection.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/properties/sections/AbstractTablePropertySection.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/properties/sections/AbstractTextPropertySection.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/properties/sections/AddressPropertySection.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/properties/sections/AdvancedPropertySection.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/properties/sections/BirthDatePropertySection.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/properties/sections/BirthPlacePropertySection.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/properties/sections/CapacityPropertySection.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/properties/sections/DefencePositionPropertySection.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/properties/sections/DefencemenPropertySection.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/properties/sections/ForwardPositionPropertySection.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/properties/sections/ForwardsPropertySection.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/properties/sections/GoaliesPropertySection.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/properties/sections/HeadOfficePropertySection.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/properties/sections/HeightPropertySection.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/properties/sections/NamePropertySection.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/properties/sections/NumberPropertySection.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/properties/sections/PlayerStatsPropertySection.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/properties/sections/ShotPropertySection.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/properties/sections/TeamsPropertySection.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/properties/sections/WeightPropertySection.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/wizards/NewHockeyleagueFileWizard.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/wizards/NewHockeyleagueFileWizardPage.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/ui/wizards/NewHockeyleagueProjectWizard.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/util/HockeyleagueAdapterFactory.java examples/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague/src/org/eclipse/ui/examples/views/properties/tabbed/hockeyleague/util/HockeyleagueSwitch.java examples/org.eclipse.ui.examples.views.properties.tabbed.logic/.classpath examples/org.eclipse.ui.examples.views.properties.tabbed.logic/.cvsignore examples/org.eclipse.ui.examples.views.properties.tabbed.logic/.project examples/org.eclipse.ui.examples.views.properties.tabbed.logic/.settings/org.eclipse.jdt.core.prefs examples/org.eclipse.ui.examples.views.properties.tabbed.logic/.settings/org.eclipse.jdt.ui.prefs examples/org.eclipse.ui.examples.views.properties.tabbed.logic/.settings/org.eclipse.pde.prefs examples/org.eclipse.ui.examples.views.properties.tabbed.logic/META-INF/MANIFEST.MF examples/org.eclipse.ui.examples.views.properties.tabbed.logic/about.html examples/org.eclipse.ui.examples.views.properties.tabbed.logic/build.properties examples/org.eclipse.ui.examples.views.properties.tabbed.logic/icons/logic.gif examples/org.eclipse.ui.examples.views.properties.tabbed.logic/icons/logicbanner.gif examples/org.eclipse.ui.examples.views.properties.tabbed.logic/plugin.properties examples/org.eclipse.ui.examples.views.properties.tabbed.logic/plugin.xml examples/org.eclipse.ui.examples.views.properties.tabbed.logic/src/org/eclipse/ui/examples/views/properties/tabbed/logic/Activator.java examples/org.eclipse.ui.examples.views.properties.tabbed.logic/src/org/eclipse/ui/examples/views/properties/tabbed/logic/LogicCreationWizard.java examples/org.eclipse.ui.examples.views.properties.tabbed.logic/src/org/eclipse/ui/examples/views/properties/tabbed/logic/LogicWizardPage1.java examples/org.eclipse.ui.examples.views.properties.tabbed.logic/src/org/eclipse/ui/examples/views/properties/tabbed/logic/TabbedPropertiesLogicEditor.java examples/org.eclipse.ui.examples.views.properties.tabbed.logic/src/org/eclipse/ui/examples/views/properties/tabbed/logic/properties/AbstractSection.java examples/org.eclipse.ui.examples.views.properties.tabbed.logic/src/org/eclipse/ui/examples/views/properties/tabbed/logic/properties/LocationSection.java examples/org.eclipse.ui.examples.views.properties.tabbed.logic/src/org/eclipse/ui/examples/views/properties/tabbed/logic/properties/LogicElementLabelProvider.java examples/org.eclipse.ui.examples.views.properties.tabbed.logic/src/org/eclipse/ui/examples/views/properties/tabbed/logic/properties/LogicElementSizeFilter.java examples/org.eclipse.ui.examples.views.properties.tabbed.logic/src/org/eclipse/ui/examples/views/properties/tabbed/logic/properties/LogicElementTypeMapper.java examples/org.eclipse.ui.examples.views.properties.tabbed.logic/src/org/eclipse/ui/examples/views/properties/tabbed/logic/properties/NameSection.java examples/org.eclipse.ui.examples.views.properties.tabbed.logic/src/org/eclipse/ui/examples/views/properties/tabbed/logic/properties/SizeSection.java examples/org.eclipse.ui.examples.views.properties.tabbed.logic/src/org/eclipse/ui/examples/views/properties/tabbed/logic/properties/TextChangeHelper.java examples/org.eclipse.ui.examples.views.properties.tabbed.logic/src/org/eclipse/ui/examples/views/properties/tabbed/logic/properties/ValueSection.java examples/org.eclipse.ui.forms.examples/.classpath examples/org.eclipse.ui.forms.examples/.cvsignore examples/org.eclipse.ui.forms.examples/.project examples/org.eclipse.ui.forms.examples/.settings/org.eclipse.jdt.core.prefs examples/org.eclipse.ui.forms.examples/.settings/org.eclipse.jdt.ui.prefs examples/org.eclipse.ui.forms.examples/.settings/org.eclipse.pde.prefs examples/org.eclipse.ui.forms.examples/about.html examples/org.eclipse.ui.forms.examples/build.properties examples/org.eclipse.ui.forms.examples/icons/clear.gif examples/org.eclipse.ui.forms.examples/icons/close_view.gif examples/org.eclipse.ui.forms.examples/icons/container_obj.gif examples/org.eclipse.ui.forms.examples/icons/e_search_menu.gif examples/org.eclipse.ui.forms.examples/icons/file_obj.gif examples/org.eclipse.ui.forms.examples/icons/form_banner.gif examples/org.eclipse.ui.forms.examples/icons/help.gif examples/org.eclipse.ui.forms.examples/icons/help_topic.gif examples/org.eclipse.ui.forms.examples/icons/large_image.gif examples/org.eclipse.ui.forms.examples/icons/linkto_help.gif examples/org.eclipse.ui.forms.examples/icons/newprj_wiz.gif examples/org.eclipse.ui.forms.examples/icons/nw.gif examples/org.eclipse.ui.forms.examples/icons/progress.gif examples/org.eclipse.ui.forms.examples/icons/sample.gif examples/org.eclipse.ui.forms.examples/icons/th_horizontal.gif examples/org.eclipse.ui.forms.examples/icons/th_vertical.gif examples/org.eclipse.ui.forms.examples/icons/toc_closed.gif examples/org.eclipse.ui.forms.examples/icons/toc_open.gif examples/org.eclipse.ui.forms.examples/icons/topic_small.gif examples/org.eclipse.ui.forms.examples/plugin.properties examples/org.eclipse.ui.forms.examples/plugin.xml examples/org.eclipse.ui.forms.examples/src/org/eclipse/ui/forms/examples/internal/ExamplesPlugin.java examples/org.eclipse.ui.forms.examples/src/org/eclipse/ui/forms/examples/internal/ExamplesPluginResources.properties examples/org.eclipse.ui.forms.examples/src/org/eclipse/ui/forms/examples/internal/FormEditorInput.java examples/org.eclipse.ui.forms.examples/src/org/eclipse/ui/forms/examples/internal/OpenFormEditorAction.java examples/org.eclipse.ui.forms.examples/src/org/eclipse/ui/forms/examples/internal/dialogs/OpenFormDialog.java examples/org.eclipse.ui.forms.examples/src/org/eclipse/ui/forms/examples/internal/dialogs/SampleFormDialog.java examples/org.eclipse.ui.forms.examples/src/org/eclipse/ui/forms/examples/internal/rcp/ErrorMessagesPage.java examples/org.eclipse.ui.forms.examples/src/org/eclipse/ui/forms/examples/internal/rcp/FreeFormPage.java examples/org.eclipse.ui.forms.examples/src/org/eclipse/ui/forms/examples/internal/rcp/HeadlessPage.java examples/org.eclipse.ui.forms.examples/src/org/eclipse/ui/forms/examples/internal/rcp/IModelListener.java examples/org.eclipse.ui.forms.examples/src/org/eclipse/ui/forms/examples/internal/rcp/NamedObject.java examples/org.eclipse.ui.forms.examples/src/org/eclipse/ui/forms/examples/internal/rcp/NewStylePage.java examples/org.eclipse.ui.forms.examples/src/org/eclipse/ui/forms/examples/internal/rcp/OpenSimpleFormEditorAction.java examples/org.eclipse.ui.forms.examples/src/org/eclipse/ui/forms/examples/internal/rcp/OpenSingleHeaderEditorAction.java examples/org.eclipse.ui.forms.examples/src/org/eclipse/ui/forms/examples/internal/rcp/PageWithSubPages.java examples/org.eclipse.ui.forms.examples/src/org/eclipse/ui/forms/examples/internal/rcp/ScrolledPropertiesBlock.java examples/org.eclipse.ui.forms.examples/src/org/eclipse/ui/forms/examples/internal/rcp/ScrolledPropertiesPage.java examples/org.eclipse.ui.forms.examples/src/org/eclipse/ui/forms/examples/internal/rcp/SecondPage.java examples/org.eclipse.ui.forms.examples/src/org/eclipse/ui/forms/examples/internal/rcp/SimpleFormEditor.java examples/org.eclipse.ui.forms.examples/src/org/eclipse/ui/forms/examples/internal/rcp/SimpleFormEditorInput.java examples/org.eclipse.ui.forms.examples/src/org/eclipse/ui/forms/examples/internal/rcp/SimpleModel.java examples/org.eclipse.ui.forms.examples/src/org/eclipse/ui/forms/examples/internal/rcp/SingleHeaderEditor.java examples/org.eclipse.ui.forms.examples/src/org/eclipse/ui/forms/examples/internal/rcp/ThirdPage.java examples/org.eclipse.ui.forms.examples/src/org/eclipse/ui/forms/examples/internal/rcp/TypeOne.java examples/org.eclipse.ui.forms.examples/src/org/eclipse/ui/forms/examples/internal/rcp/TypeOneDetailsPage.java examples/org.eclipse.ui.forms.examples/src/org/eclipse/ui/forms/examples/internal/rcp/TypeTwo.java examples/org.eclipse.ui.forms.examples/src/org/eclipse/ui/forms/examples/internal/rcp/TypeTwoDetailsPage.java examples/org.eclipse.ui.forms.examples/src/org/eclipse/ui/forms/examples/internal/rcp/index.xml examples/org.eclipse.ui.forms.examples/src/org/eclipse/ui/forms/examples/views/FormView.java examples/org.eclipse.ui.forms.examples/src/org/eclipse/ui/forms/examples/views/ShowHelpAction.java tests/org.eclipse.jface.tests.databinding/.classpath tests/org.eclipse.jface.tests.databinding/.cvsignore tests/org.eclipse.jface.tests.databinding/.project tests/org.eclipse.jface.tests.databinding/.settings/org.eclipse.jdt.core.prefs tests/org.eclipse.jface.tests.databinding/.settings/org.eclipse.jdt.ui.prefs tests/org.eclipse.jface.tests.databinding/.settings/org.eclipse.pde.prefs tests/org.eclipse.jface.tests.databinding/JFace-Data Binding Test Suite.launch tests/org.eclipse.jface.tests.databinding/META-INF/MANIFEST.MF tests/org.eclipse.jface.tests.databinding/about.html tests/org.eclipse.jface.tests.databinding/build.properties tests/org.eclipse.jface.tests.databinding/plugin.properties tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/beans/BeansObservablesTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/observable/RealmTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/observable/map/AbstractObservableMapTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/observable/map/ObservableMapTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/observable/map/WritableMapTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/internal/databinding/observable/masterdetail/DetailObservableListTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/internal/databinding/observable/masterdetail/DetailObservableSetTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/internal/databinding/observable/masterdetail/DetailObservableValueTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/conversion/IdentityConverterTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/AbstractBindSupportFactoryTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryBooleanPrimitiveTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryBytePrimitiveTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryDoublePrimitiveTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryFloatPrimitiveTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryIntTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryLongPrimitiveTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryShortPrimitiveTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/validation/ObjectToPrimitiveValidatorTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/AbstractDefaultRealmTestCase.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/BindSpecTests.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/BindingTestSuite.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/ComputedValueTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/DatabindingContextTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/IDiffsTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/ObservableTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/RandomAccessListIteratorTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/SelectionAwareObservableCollectionTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/mask/EditMaskLexerAndTokenTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/mask/EditMaskParserTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/LockRealm.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/ThreadRealm.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/list/AbstractObservableListTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/list/ObservableListTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/list/WritableListTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/set/WritableSetTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/value/AbstractObservableValueTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/value/AbstractVetoableValueTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/value/WritableValueTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/AutomationUtil.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/BindingScenariosTestSuite.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ButtonControlScenario.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ComboScenarios.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ComboUpdatingTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ComboViewerScenario.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/CustomBeanBindSpec.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/CustomBeanModelType.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/CustomConverterScenarios.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/CustomScenarios.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/LabelControlScenario.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ListViewerScenario.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/MasterDetailScenarios.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/NPETestScenario.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/NewTableScenarios.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/PropertyScenarios.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ScenariosTestCase.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/SpinnerControlScenario.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/TableScenarios.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/TextControlScenario.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/smoketest/swt.xswt tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/AbstractGetAndSetSelectionObservableCollectionTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/AutoSelectTableViewerCollectionExtendedTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/AutoSelectTableViewerCollectionTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/CComboObservableCollectionTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/ComboObservableCollectionTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/CopyOfAutoSelectTableViewerCollectionExtendedTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/ListObservableCollectionTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/ObservableCollectionViewerTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/SWTObservablesTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/TableViewerObservableCollectionTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/TextObservableValueTests.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/util/RealmTester.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/viewers/ObservableMapLabelProviderTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/viewers/ObservableSetContentProviderTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/examples/model/PersonTests.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ListBindingTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ListBindingTest_Pipeline.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ListBindingTest_Policies.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/Pipeline.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ValueBindingTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ValueBindingTest_Pipeline.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ValueBindingTest_Policies.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/Bean.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/BeanObservableListDecoratorTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/BeanObservableSetDecoratorTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/BeanObservableValueDecoratorTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/JavaBeanObservableListTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/JavaBeanObservableMapTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/JavaBeanObservableSetTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/JavaBeanObservableValueTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/observable/UnmodifiableObservableListTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/ButtonObservableValueTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/CComboObservableValueTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/CLabelObservableValueTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/ComboObservableValueTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/ControlObservableValueTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/LabelObservableValueTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/SpinnerObservableValueTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/TableObservableValueTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/viewers/SelectionProviderSingleSelectionObservableValueTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/provisional/observable/AbstractObservableTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/provisional/observable/ObservablesTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/provisional/viewers/SelectionObservableValueTest.java tests/org.eclipse.jface.tests.databinding/test.xml tests/org.eclipse.ui.tests.browser/.classpath tests/org.eclipse.ui.tests.browser/.cvsignore tests/org.eclipse.ui.tests.browser/.options tests/org.eclipse.ui.tests.browser/.project tests/org.eclipse.ui.tests.browser/about.html tests/org.eclipse.ui.tests.browser/build.properties tests/org.eclipse.ui.tests.browser/plugin.xml tests/org.eclipse.ui.tests.browser/src/org/eclipse/ui/tests/browser/internal/AllTests.java tests/org.eclipse.ui.tests.browser/src/org/eclipse/ui/tests/browser/internal/DialogsTestCase.java tests/org.eclipse.ui.tests.browser/src/org/eclipse/ui/tests/browser/internal/ExistenceTestCase.java tests/org.eclipse.ui.tests.browser/src/org/eclipse/ui/tests/browser/internal/ExternalBrowserTestCase.java tests/org.eclipse.ui.tests.browser/src/org/eclipse/ui/tests/browser/internal/InternalBrowserEditorTestCase.java tests/org.eclipse.ui.tests.browser/src/org/eclipse/ui/tests/browser/internal/InternalBrowserViewTestCase.java tests/org.eclipse.ui.tests.browser/src/org/eclipse/ui/tests/browser/internal/OrderedTestSuite.java tests/org.eclipse.ui.tests.browser/src/org/eclipse/ui/tests/browser/internal/PreferencesTestCase.java tests/org.eclipse.ui.tests.browser/src/org/eclipse/ui/tests/browser/internal/ToolbarBrowserTestCase.java tests/org.eclipse.ui.tests.browser/src/org/eclipse/ui/tests/browser/internal/UITestHelper.java tests/org.eclipse.ui.tests.browser/src/org/eclipse/ui/tests/browser/internal/WebBrowserTestsPlugin.java tests/org.eclipse.ui.tests.browser/test.xml tests/org.eclipse.ui.tests.harness/.classpath tests/org.eclipse.ui.tests.harness/.cvsignore tests/org.eclipse.ui.tests.harness/.project tests/org.eclipse.ui.tests.harness/.settings/org.eclipse.jdt.core.prefs tests/org.eclipse.ui.tests.harness/.settings/org.eclipse.jdt.ui.prefs tests/org.eclipse.ui.tests.harness/.settings/org.eclipse.pde.prefs tests/org.eclipse.ui.tests.harness/META-INF/MANIFEST.MF tests/org.eclipse.ui.tests.harness/about.html tests/org.eclipse.ui.tests.harness/build.properties tests/org.eclipse.ui.tests.harness/icons/anything.gif tests/org.eclipse.ui.tests.harness/plugin.xml tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/AllTests.java tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/UITestHarnessPlugin.java tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/tests/MocksTest.java tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/util/ActionUtil.java tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/util/ArrayUtil.java tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/util/AutomationUtil.java tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/util/CallHistory.java tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/util/DialogCheck.java tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/util/EmptyPerspective.java tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/util/FileTool.java tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/util/FileUtil.java tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/util/ImageTests.java tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/util/Mocks.java tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/util/PlatformUtil.java tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/util/UITestCase.java tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/internal/util/AccessibilityTestPass.java tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/internal/util/FailureDialog.java tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/internal/util/FocusTestPass.java tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/internal/util/IDialogTestPass.java tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/internal/util/SizingTestPass.java tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/internal/util/VerifyDialog.java tests/org.eclipse.ui.tests.navigator/.classpath tests/org.eclipse.ui.tests.navigator/.cvsignore tests/org.eclipse.ui.tests.navigator/.project tests/org.eclipse.ui.tests.navigator/.settings/org.eclipse.jdt.core.prefs tests/org.eclipse.ui.tests.navigator/.settings/org.eclipse.jdt.ui.prefs tests/org.eclipse.ui.tests.navigator/META-INF/MANIFEST.MF tests/org.eclipse.ui.tests.navigator/Navigator Test Suite.launch tests/org.eclipse.ui.tests.navigator/about.html tests/org.eclipse.ui.tests.navigator/build.properties tests/org.eclipse.ui.tests.navigator/plugin.properties tests/org.eclipse.ui.tests.navigator/plugin.xml tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/DisplayHelper.java tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/DisplayWaiter.java tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/EditorTestHelper.java tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/INavigatorContentServiceTests.java tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/NavigatorTestSuite.java tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/NavigatorTestsPlugin.java tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/OpenTest.java tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/PipelineTest.java tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/ProgrammaticOpenTest.java tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/SWTEventHelper.java tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/extension/DependentAction.java tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/extension/DependentActionProvider.java tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/extension/TestAction.java tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/extension/TestActionProvider.java tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/extension/TestContentProvider.java tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/extension/TestDataSorter.java tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/extension/TestExtensionAdapterFactory.java tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/extension/TestExtensionTreeData.java tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/extension/TestItemsThatEndIn3.java tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/extension/TestLabelDecorator.java tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/extension/TestLabelProvider.java tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/extension/TestNestedActionProvider.java tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/util/ProjectUnzipUtil.java tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/util/TestWorkspace.java tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/wizards/ExportWizard1.java tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/wizards/ImportWizard1.java tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/wizards/NewWizard1.java tests/org.eclipse.ui.tests.navigator/test.xml tests/org.eclipse.ui.tests.navigator/testdata/Test.zip tests/org.eclipse.ui.tests.performance/.classpath tests/org.eclipse.ui.tests.performance/.cvsignore tests/org.eclipse.ui.tests.performance/.project tests/org.eclipse.ui.tests.performance/.settings/org.eclipse.jdt.core.prefs tests/org.eclipse.ui.tests.performance/.settings/org.eclipse.jdt.ui.prefs tests/org.eclipse.ui.tests.performance/.settings/org.eclipse.pde.prefs tests/org.eclipse.ui.tests.performance/META-INF/MANIFEST.MF tests/org.eclipse.ui.tests.performance/about.html tests/org.eclipse.ui.tests.performance/build.properties tests/org.eclipse.ui.tests.performance/icons/anything.gif tests/org.eclipse.ui.tests.performance/icons/binary_co.gif tests/org.eclipse.ui.tests.performance/icons/dynamic.gif tests/org.eclipse.ui.tests.performance/icons/editor.gif tests/org.eclipse.ui.tests.performance/icons/mockeditorpart1.gif tests/org.eclipse.ui.tests.performance/icons/mockeditorpart2.gif tests/org.eclipse.ui.tests.performance/icons/view.gif tests/org.eclipse.ui.tests.performance/plugin.xml tests/org.eclipse.ui.tests.performance/src/org/eclipse/jface/tests/performance/ComboViewerRefreshTest.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/jface/tests/performance/FastTableViewerRefreshTest.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/jface/tests/performance/FastTreeTest.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/jface/tests/performance/JFacePerformanceSuite.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/jface/tests/performance/ListPopulationTest.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/jface/tests/performance/ListViewerRefreshTest.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/jface/tests/performance/RefreshTestContentProvider.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/jface/tests/performance/RefreshTestTreeContentProvider.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/jface/tests/performance/SWTTreeTest.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/jface/tests/performance/TableViewerRefreshTest.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/jface/tests/performance/TestElement.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/jface/tests/performance/TestTreeElement.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/jface/tests/performance/TreeTest.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/jface/tests/performance/TreeViewerRefreshTest.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/jface/tests/performance/ViewerTest.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/ActivitiesPerformanceSuite.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/BasicPerformanceTest.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/CommandsPerformanceTest.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/ContentDescriberForTestsOnly.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/EditorPerformanceSuite.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/EditorSwitchTest.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/EditorTestHelper.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/GenerateIdentifiersTest.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/ObjectContributionClasses.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/ObjectContributionTest.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/ObjectContributionsPerformance.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/OpenCloseEditorTest.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/OpenClosePerspectiveTest.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/OpenCloseViewTest.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/OpenCloseWindowTest.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/OpenMultipleEditorTest.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/OpenNavigatorFolderTest.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/PerformancePerspective1.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/PerformancePerspective2.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/PerformanceTestRunner.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/PerformanceTester.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/PerspectiveSwitchTest.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/ProblemsViewPerformanceTest.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/ResourceTestHelper.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/TestRunnable.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/UIPerformancePlugin.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/UIPerformanceTestSetup.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/UIPerformanceTestSuite.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/ViewPerformanceSuite.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/WorkbenchPerformanceSuite.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/layout/ComputeSizeTest.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/layout/ConstantAreaLayout.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/layout/EditorWidgetFactory.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/layout/LayoutTest.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/layout/PerspectiveWidgetFactory.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/layout/PresentationWidgetFactory.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/layout/RecursiveTrimLayoutWidgetFactory.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/layout/ResizeTest.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/layout/TestWidgetFactory.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/layout/ViewWidgetFactory.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/marked.txt tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/parts/PerformanceEditorPart.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/parts/PerformanceProblemsView.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/parts/PerformanceViewPart.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/presentations/PresentationActivateTest.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/presentations/PresentationActivePartPropertyTest.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/presentations/PresentationCreateTest.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/presentations/PresentationInactivePartPropertyTest.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/presentations/PresentationPerformanceTest.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/presentations/PresentationPerformanceTestSuite.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/presentations/PresentationSelectTest.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/presentations/PresentationTestbed.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/presentations/StandaloneViewPerspective.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/presentations/StandaloneViewPerspective2.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/presentations/TestPresentablePart.java tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/test_ideas.txt tests/org.eclipse.ui.tests.performance/test.xml tests/org.eclipse.ui.tests.rcp/.classpath tests/org.eclipse.ui.tests.rcp/.cvsignore tests/org.eclipse.ui.tests.rcp/.project tests/org.eclipse.ui.tests.rcp/.settings/org.eclipse.jdt.core.prefs tests/org.eclipse.ui.tests.rcp/.settings/org.eclipse.jdt.ui.prefs tests/org.eclipse.ui.tests.rcp/Eclipse RCP Tests/org/eclipse/ui/tests/rcp/ActionBarConfigurerTest.java tests/org.eclipse.ui.tests.rcp/Eclipse RCP Tests/org/eclipse/ui/tests/rcp/IWorkbenchPageTest.java tests/org.eclipse.ui.tests.rcp/Eclipse RCP Tests/org/eclipse/ui/tests/rcp/PlatformUITest.java tests/org.eclipse.ui.tests.rcp/Eclipse RCP Tests/org/eclipse/ui/tests/rcp/RcpTestSuite.java tests/org.eclipse.ui.tests.rcp/Eclipse RCP Tests/org/eclipse/ui/tests/rcp/WorkbenchAdvisorTest.java tests/org.eclipse.ui.tests.rcp/Eclipse RCP Tests/org/eclipse/ui/tests/rcp/WorkbenchConfigurerTest.java tests/org.eclipse.ui.tests.rcp/Eclipse RCP Tests/org/eclipse/ui/tests/rcp/WorkbenchListenerTest.java tests/org.eclipse.ui.tests.rcp/Eclipse RCP Tests/org/eclipse/ui/tests/rcp/WorkbenchSaveRestoreStateTest.java tests/org.eclipse.ui.tests.rcp/Eclipse RCP Tests/org/eclipse/ui/tests/rcp/WorkbenchWindowConfigurerTest.java tests/org.eclipse.ui.tests.rcp/Eclipse RCP Tests/org/eclipse/ui/tests/rcp/performance/EmptyWorkbenchPerfTest.java tests/org.eclipse.ui.tests.rcp/Eclipse RCP Tests/org/eclipse/ui/tests/rcp/performance/PlatformUIPerfTest.java tests/org.eclipse.ui.tests.rcp/Eclipse RCP Tests/org/eclipse/ui/tests/rcp/performance/RCPPerformanceTestSetup.java tests/org.eclipse.ui.tests.rcp/Eclipse RCP Tests/org/eclipse/ui/tests/rcp/performance/RCPPerformanceTestSuite.java tests/org.eclipse.ui.tests.rcp/Eclipse RCP Tests/org/eclipse/ui/tests/rcp/util/EmptyPerspective.java tests/org.eclipse.ui.tests.rcp/Eclipse RCP Tests/org/eclipse/ui/tests/rcp/util/EmptyView.java tests/org.eclipse.ui.tests.rcp/Eclipse RCP Tests/org/eclipse/ui/tests/rcp/util/IPerformanceMeterArray.java tests/org.eclipse.ui.tests.rcp/Eclipse RCP Tests/org/eclipse/ui/tests/rcp/util/IntervalMeters.java tests/org.eclipse.ui.tests.rcp/Eclipse RCP Tests/org/eclipse/ui/tests/rcp/util/NullMeters.java tests/org.eclipse.ui.tests.rcp/Eclipse RCP Tests/org/eclipse/ui/tests/rcp/util/OpenWorkbenchIntervalMonitor.java tests/org.eclipse.ui.tests.rcp/Eclipse RCP Tests/org/eclipse/ui/tests/rcp/util/RCPTestWorkbenchAdvisor.java tests/org.eclipse.ui.tests.rcp/Eclipse RCP Tests/org/eclipse/ui/tests/rcp/util/RestoreWorkbenchIntervalMonitor.java tests/org.eclipse.ui.tests.rcp/Eclipse RCP Tests/org/eclipse/ui/tests/rcp/util/WorkbenchAdvisorObserver.java tests/org.eclipse.ui.tests.rcp/META-INF/MANIFEST.MF tests/org.eclipse.ui.tests.rcp/RCP Test Suite.launch tests/org.eclipse.ui.tests.rcp/about.html tests/org.eclipse.ui.tests.rcp/build.properties tests/org.eclipse.ui.tests.rcp/icons/sample.gif tests/org.eclipse.ui.tests.rcp/plugin.xml tests/org.eclipse.ui.tests.rcp/test.xml tests/org.eclipse.ui.tests.views.properties.tabbed/.classpath tests/org.eclipse.ui.tests.views.properties.tabbed/.cvsignore tests/org.eclipse.ui.tests.views.properties.tabbed/.project tests/org.eclipse.ui.tests.views.properties.tabbed/.settings/org.eclipse.jdt.core.prefs tests/org.eclipse.ui.tests.views.properties.tabbed/.settings/org.eclipse.jdt.ui.prefs tests/org.eclipse.ui.tests.views.properties.tabbed/.settings/org.eclipse.pde.prefs tests/org.eclipse.ui.tests.views.properties.tabbed/META-INF/MANIFEST.MF tests/org.eclipse.ui.tests.views.properties.tabbed/Tabbed Properties View-All Tests.launch tests/org.eclipse.ui.tests.views.properties.tabbed/about.html tests/org.eclipse.ui.tests.views.properties.tabbed/build.properties tests/org.eclipse.ui.tests.views.properties.tabbed/icons/sample.gif tests/org.eclipse.ui.tests.views.properties.tabbed/plugin.properties tests/org.eclipse.ui.tests.views.properties.tabbed/plugin.xml tests/org.eclipse.ui.tests.views.properties.tabbed/src/org/eclipse/ui/tests/views/properties/tabbed/Activator.java tests/org.eclipse.ui.tests.views.properties.tabbed/src/org/eclipse/ui/tests/views/properties/tabbed/AllTests.java tests/org.eclipse.ui.tests.views.properties.tabbed/src/org/eclipse/ui/tests/views/properties/tabbed/TabbedPropertySheetPageTest.java tests/org.eclipse.ui.tests.views.properties.tabbed/src/org/eclipse/ui/tests/views/properties/tabbed/model/Element.java tests/org.eclipse.ui.tests.views.properties.tabbed/src/org/eclipse/ui/tests/views/properties/tabbed/model/Error.java tests/org.eclipse.ui.tests.views.properties.tabbed/src/org/eclipse/ui/tests/views/properties/tabbed/model/File.java tests/org.eclipse.ui.tests.views.properties.tabbed/src/org/eclipse/ui/tests/views/properties/tabbed/model/Folder.java tests/org.eclipse.ui.tests.views.properties.tabbed/src/org/eclipse/ui/tests/views/properties/tabbed/model/Information.java tests/org.eclipse.ui.tests.views.properties.tabbed/src/org/eclipse/ui/tests/views/properties/tabbed/model/Project.java tests/org.eclipse.ui.tests.views.properties.tabbed/src/org/eclipse/ui/tests/views/properties/tabbed/model/Warning.java tests/org.eclipse.ui.tests.views.properties.tabbed/src/org/eclipse/ui/tests/views/properties/tabbed/sections/InformationTwoSection.java tests/org.eclipse.ui.tests.views.properties.tabbed/src/org/eclipse/ui/tests/views/properties/tabbed/sections/LabelSection.java tests/org.eclipse.ui.tests.views.properties.tabbed/src/org/eclipse/ui/tests/views/properties/tabbed/sections/MessageSection.java tests/org.eclipse.ui.tests.views.properties.tabbed/src/org/eclipse/ui/tests/views/properties/tabbed/sections/NameSection.java tests/org.eclipse.ui.tests.views.properties.tabbed/src/org/eclipse/ui/tests/views/properties/tabbed/sections/ResourceSection.java tests/org.eclipse.ui.tests.views.properties.tabbed/src/org/eclipse/ui/tests/views/properties/tabbed/views/InformationTwoFilter.java tests/org.eclipse.ui.tests.views.properties.tabbed/src/org/eclipse/ui/tests/views/properties/tabbed/views/LabelProvider.java tests/org.eclipse.ui.tests.views.properties.tabbed/src/org/eclipse/ui/tests/views/properties/tabbed/views/TestsView.java tests/org.eclipse.ui.tests.views.properties.tabbed/src/org/eclipse/ui/tests/views/properties/tabbed/views/TestsViewContentProvider.java tests/org.eclipse.ui.tests.views.properties.tabbed/src/org/eclipse/ui/tests/views/properties/tabbed/views/TypeMapper.java tests/org.eclipse.ui.tests.views.properties.tabbed/test.xml tests/org.eclipse.ui.tests/.classpath tests/org.eclipse.ui.tests/.cvsignore tests/org.eclipse.ui.tests/.project tests/org.eclipse.ui.tests/.settings/org.eclipse.jdt.core.prefs tests/org.eclipse.ui.tests/.settings/org.eclipse.jdt.ui.prefs tests/org.eclipse.ui.tests/.settings/org.eclipse.pde.prefs tests/org.eclipse.ui.tests/Benchmark Tests/org/eclipse/ui/tests/benchmarks/OpenCloseTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/AllTests.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/action/AllTests.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/action/ContributionItemTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/action/DummyAction.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/action/DummyContributionManager.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/action/JFaceActionTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/action/MenuManagerTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/dialogs/AllTests.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/dialogs/DialogSettingsTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/dialogs/InputDialogTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/dialogs/TitleAreaDialogTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/images/AllTests.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/images/ImageRegistryTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/images/ResourceManagerTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/layout/AllTests.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/layout/GeometryTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/AbstractTreeViewerTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/AllTests.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/Bug138608Test.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/CComboViewerTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/CheckboxTableViewerTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/CheckboxTreeViewerMissingTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/CheckboxTreeViewerTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/ComboViewerComparerTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/ComboViewerTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/ComparatorModelChange.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/IComparatorModelListener.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/ITestModelListener.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/LazySortedCollectionTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/ListViewerComparatorTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/ListViewerRefreshTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/ListViewerTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/MultipleEqualElementsTreeViewerTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/SimpleTableViewerTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/SimpleTreeViewerTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/SimpleVirtualLazyTreeViewerTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/StructuredItemViewerTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/StructuredSelectionTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/StructuredViewerTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/TableColorProviderTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/TableFontProviderTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/TableTreeViewerTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/TableViewerComparatorTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/TableViewerTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/TestComparator.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/TestElement.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/TestLabelProvider.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/TestLazyModelContentProvider.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/TestModel.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/TestModelChange.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/TestModelContentProvider.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/TestModelLazyTreeContentProvider.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/TreeSelectionTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/TreeViewerColumnTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/TreeViewerComparatorTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/TreeViewerTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/ViewerComparatorTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/ViewerTestCase.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/VirtualLazyTableViewerTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/VirtualLazyTreeViewerTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/VirtualTableViewerTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/VirtualTreeViewerTest.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/images/java.gif tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/AddChildAction.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/AddElementAction.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/AddFilterAction.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/AddSiblingAction.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/ChangeChildLabelAction.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/ChangeInputLabelAction.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/ChangeLabelAction.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/ClearSelectionAction.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/ConcurrentTableTestView.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/CreateModelAction.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/DeleteAction.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/DeleteChildrenAction.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/DeleteSiblingsAction.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/ExpandAllAction.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/Filter.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/FlushInputAction.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/LazyDeferredVirtualTableView.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/LazyVirtualTableView.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/ResetFilterAction.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/ResetSorterAction.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/SetLabelProviderAction.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/SetSorterAction.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/Sorter.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/TestApplicationWindow.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/TestBrowser.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/TestBrowserAction.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/TestCheckboxTree.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/TestLazyVirtualTree.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/TestList.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/TestSelectionAction.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/TestTable.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/TestTableTree.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/TestTableTreeLabelProvider.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/TestTree.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/TestVirtualTree.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/VirtualTableView.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/WorldChangedAction.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/ui/tests/propertyPages/TestPropertyPage.java tests/org.eclipse.ui.tests/Eclipse Part References Test/org/eclipse/ui/parts/tests/EditorsReferencesTest.java tests/org.eclipse.ui.tests/Eclipse Part References Test/org/eclipse/ui/parts/tests/PartsReferencesTestSuite.java tests/org.eclipse.ui.tests/Eclipse Part References Test/org/eclipse/ui/parts/tests/ViewsReferencesTest.java tests/org.eclipse.ui.tests/Eclipse Part References Test/org/eclipse/ui/parts/tests/util/PartsTestUtil.java tests/org.eclipse.ui.tests/Eclipse Part References Test/org/eclipse/ui/parts/tests/util/PartsWorkbenchAdvisor.java tests/org.eclipse.ui.tests/Eclipse Part References Test/org/eclipse/ui/parts/tests/util/PartsWorkbenchWindowAdvisor.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/PerspectiveState.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/SelectionProviderView.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/TestPlugin.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/UiTestSuite.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/activities/ActivitiesTestSuite.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/activities/ActivityPreferenceTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/activities/DynamicModelActivityRegistry.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/activities/DynamicTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/activities/ImagesTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/activities/PersistanceTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/activities/StaticTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/activities/UtilTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/adaptable/AdaptableDecoratorTestCase.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/adaptable/AdaptableResourceWrapper.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/adaptable/AdaptableTestSuite.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/adaptable/AdaptedResourceNavigator.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/adaptable/MarkerImageProviderTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/adaptable/NullLabelDecorator.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/adaptable/ResourceAction.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/adaptable/TestAdaptableContentProvider.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/adaptable/TestAdaptableWorkbenchAdapter.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/adaptable/TestMarkerImageProvider.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/adaptable/TestNavigatorActionGroup.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/adaptable/WorkingSetTestCase.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/ApiTestSuite.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/Bug42616Test.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/Bug75118Test.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/DeprecatedSessionRestoreTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/EditorIconTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/GenericCommandActionDelegate.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IActionBarsTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IActionDelegateTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IActionFilterTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IConstants.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IDeprecatedWorkbenchPageTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IEditorActionBarContributorTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IEditorActionDelegateTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IEditorDescriptorTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IEditorLauncherTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IEditorMatchingStrategyTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IEditorPartTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IEditorRegistryTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IEditorSiteTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IFileEditorMappingTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IPageLayoutTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IPageListenerTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IPageServiceTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IPartServiceTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IPerspectiveDescriptorTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IPerspectiveListenerTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IPerspectiveRegistryTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/ISelectionServiceTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IViewActionDelegateTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IViewPartTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IViewSiteTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IWorkbenchPageTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IWorkbenchPartSiteTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IWorkbenchPartTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IWorkbenchPartTestableTests.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IWorkbenchTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IWorkbenchTestSuite.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IWorkbenchWindowActionDelegateTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IWorkbenchWindowTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IWorkingSetManagerTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IWorkingSetTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/ListContentProvider.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/ListElement.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/ListElementActionFilter.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/ListElementPropertyTester.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/ListView.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/MockAction.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/MockActionDelegate.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/MockEditorActionBarContributor.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/MockEditorActionDelegate.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/MockEditorMatchingStrategy.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/MockEditorPart.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/MockEditorWithState.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/MockPart.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/MockPartListener.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/MockPropertyListener.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/MockSelectionProvider.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/MockViewActionDelegate.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/MockViewPart.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/MockViewPartMult.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/MockWorkbenchPart.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/MockWorkbenchWindowActionDelegate.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/MockWorkingSetPage.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/MockWorkingSetTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/PerspectiveViewsBug120934.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/PerspectiveViewsBug88345.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/PerspectiveWithFastView.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/PerspectiveWithMultiViewPlaceholdersAtTopLevel.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/PerspectiveWithMultiViewPlaceholdersInFolder.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/PerspectiveWithMultiViewPlaceholdersInPlaceholderFolder.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/PlatformUITest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/SaveableMockViewPart.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/SessionCreateTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/SessionEditorPart.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/SessionPerspective.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/SessionRestoreTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/SessionView.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/StartupClass.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/StartupTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/StickyViewTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/TrimLayoutTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/TrimList.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/UIJobTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/UserSaveableMockViewPart.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/UserSaveableSharedViewPart.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/ViewPerspective.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/ViewUtils.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/XMLMementoTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/workbenchpart/ArbitraryPropertyTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/workbenchpart/CustomTitleView.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/workbenchpart/DynamicItem.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/workbenchpart/EditorWithCreateControlsException.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/workbenchpart/EditorWithDisposeException.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/workbenchpart/EditorWithInitException.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/workbenchpart/EditorWithInitRuntimeException.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/workbenchpart/EditorWithInputException.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/workbenchpart/EmptyView.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/workbenchpart/HeavyResourceView.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/workbenchpart/MenuContributionHarness.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/workbenchpart/OverriddenTitleTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/workbenchpart/OverriddenTitleView.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/workbenchpart/RawIViewPart.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/workbenchpart/RawIViewPartTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/workbenchpart/TextWidget.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/workbenchpart/TitleTestEditor.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/workbenchpart/TitleTestView.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/workbenchpart/ViewPartTitleTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/workbenchpart/ViewWithCreateControlsException.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/workbenchpart/ViewWithDisposeException.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/workbenchpart/ViewWithInitException.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/workbenchpart/ViewWithInitRuntimeException.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/autotests/AbstractTestLogger.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/autotests/AutoTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/autotests/AutoTestLogger.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/autotests/AutoTestSuite.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/autotests/AutoTestWrapper.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/autotests/TestResult.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/autotests/TestResultFilter.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/autotests/TestResults.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/autotests/UITestCaseWithResult.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/autotests/XmlUtil.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/commands/ActiveActionSetExpression.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/commands/ActiveContextExpression.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/commands/Bug125792Test.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/commands/Bug66182Test.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/commands/Bug70503Test.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/commands/Bug73756Test.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/commands/Bug74982Test.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/commands/Bug74990Test.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/commands/Bug87856Test.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/commands/CommandCallbackTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/commands/CommandEnablementTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/commands/CommandManagerTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/commands/CommandParameterTypeTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/commands/CommandSerializationTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/commands/CommandsTestSuite.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/commands/HandlerActivationTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/commands/HelpContextIdTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/commands/IntegerConverter.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/commands/StateTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/commands/SubtractIntegerHandler.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/compare/UIComparePreferences.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/compare/UIComparePreferencesAuto.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/concurrency/ConcurrencyTestSuite.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/concurrency/NestedSyncExecDeadlockTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/concurrency/TestBug105491.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/concurrency/TestBug108162.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/concurrency/TestBug138695.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/concurrency/TestBug98621.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/concurrency/TransferRuleTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/contexts/Bug74990Test.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/contexts/Bug84763Test.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/contexts/ContextPage.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/contexts/ContextsTestSuite.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/contexts/ExtensionTestCase.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/contexts/MockPageView.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/contexts/MockViewPart5.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/contexts/PartContextTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/datatransfer/DataTransferTestSuite.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/datatransfer/ExportArchiveFileOperationTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/datatransfer/ExportFileSystemOperationTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/datatransfer/ImportArchiveOperationTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/datatransfer/ImportExistingTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/datatransfer/ImportExportWizardsCategoryTests.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/datatransfer/ImportOperationTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/datatransfer/TestExportWizard.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/datatransfer/TestImportWizard.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/datatransfer/tests.ini tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/decorators/BackgroundColorDecorator.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/decorators/BadIndexDecorator.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/decorators/BadIndexDecoratorTestCase.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/decorators/DecoratorAdaptableTests.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/decorators/DecoratorEnablementTestCase.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/decorators/DecoratorTableTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/decorators/DecoratorTableTreeTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/decorators/DecoratorTableTreeView.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/decorators/DecoratorTableView.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/decorators/DecoratorTestCase.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/decorators/DecoratorTestPart.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/decorators/DecoratorTreeTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/decorators/DecoratorTreeView.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/decorators/DecoratorViewerTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/decorators/DecoratorsTestSuite.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/decorators/ExceptionDecoratorTestCase.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/decorators/FontDecorator.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/decorators/ForegroundColorDecorator.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/decorators/HeavyNullImageDecorator.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/decorators/HeavyNullTextDecorator.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/decorators/LightweightDecoratorTestCase.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/decorators/NullImageDecorator.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/decorators/TableElement.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/decorators/TestAdaptableDecoratorContributor.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/decorators/TestDecoratorContributor.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/decorators/TestElement.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/decorators/TestLabelProvider.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/decorators/TestLightweightDecoratorContributor.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/decorators/TestLightweightDecoratorMultipleQuadrantContributor.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/decorators/TestResourceDecoratorContributor.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/decorators/TestResourceMappingDecoratorContributor.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/decorators/TestTableContentProvider.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/decorators/TestTreeContentProvider.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/decorators/TestUnadaptableDecoratorContributor.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/decorators/TreeElement.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs/DataTransferTestStub.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs/DeprecatedUIDialogs.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs/DeprecatedUIDialogsAuto.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs/DeprecatedUIPreferences.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs/DeprecatedUIPreferencesAuto.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs/DeprecatedUIWizards.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs/DeprecatedUIWizardsAuto.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs/EnableTestPreferencePage.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs/FontFieldEditorTestPreferencePage.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs/NavigatorTestStub.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs/PreferenceDialogWrapper.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs/PropertyDialogWrapper.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs/SearchPatternAuto.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs/TaskListTestStub.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs/TextEditorTestStub.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs/TextMessageDialogs.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs/TextMessageDialogsAuto.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs/UIAbstractFilteredResourcesSelectionDialog.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs/UIAutomatedSuite.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs/UIDialogs.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs/UIDialogsAuto.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs/UIEditWorkingSetWizardAuto.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs/UIErrorDialogs.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs/UIFilteredResourcesSelectionDialog.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs/UIFilteredResourcesSelectionDialogAuto.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs/UIInteractiveSuite.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs/UIMessageDialogs.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs/UIMessageDialogsAuto.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs/UINewWorkingSetWizardAuto.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs/UIPreferences.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs/UIPreferencesAuto.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs/UIWizards.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs/UIWizardsAuto.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs/UIWorkingSetWizardsAuto.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dnd/Bug87211Test.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dnd/DetachedDropTarget.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dnd/DetachedWindowDragTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dnd/DragDropPerspectiveFactory.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dnd/DragOperations.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dnd/DragTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dnd/DragTestSuite.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dnd/EditorAreaDropTarget.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dnd/EditorDragSource.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dnd/EditorDropTarget.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dnd/EditorTabDropTarget.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dnd/EditorTitleDropTarget.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dnd/ExistingWindowProvider.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dnd/FastViewBarDropTarget.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dnd/IWorkbenchWindowProvider.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dnd/StandaloneViewPerspective.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dnd/TestDragSource.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dnd/ViewDragSource.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dnd/ViewDropTarget.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dnd/ViewTabDropTarget.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dnd/ViewTitleDropTarget.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dnd/WindowDropTarget.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dnd/WorkbenchWindowDropTarget.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/AcceleratorConfigurationsExtensionDynamicTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/AcceleratorScopesExtensionDynamicTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/ActionDefinitionsExtensionDynamicTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/ActionSetTests.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/ActivitySupportTests.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/BindingsExtensionDynamicTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/BrowserTests.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/CommandsExtensionDynamicTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/ContextsExtensionDynamicTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/DecoratorTests.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/DynamicPluginsTestSuite.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/DynamicSupportTests.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/DynamicTestCase.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/DynamicTestType.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/DynamicUtils.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/EditorTests.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/EncodingTests.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/HandlersExtensionDynamicTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/HelpSupportTests.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/IntroTests.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/KeywordTests.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/MarkerSupportTests.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/NewWizardTests.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/ObjectContributionTests.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/PerspectiveTests.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/PreferencePageTests.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/PropertyPageTests.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/StartupTests.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/TestInstallUtil.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/ViewTests.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/WorkingSetTests.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/encoding/EncodingTestCase.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/encoding/EncodingTestSuite.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/fieldassist/FieldAssistAPITest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/fieldassist/FieldAssistTestSuite.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/filteredtree/FilteredTreeTests.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/ide/api/FileEditorInputTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/internal/ActionExpressionTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/internal/ActionSetExpressionTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/internal/Bug41931Test.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/internal/Bug78470Test.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/internal/Bug99858Test.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/internal/EditorActionBarsTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/internal/ExtendedSourceViewer.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/internal/ExtendedTextEditor.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/internal/ExtendedTextSelection.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/internal/ExtendedTextSelectionActionFilter.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/internal/ForcedException.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/internal/InternalTestSuite.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/internal/PopupMenuExpressionTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/internal/TestMemento.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/internal/TextSelectionActionExpressionTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/intro/IntroPartTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/intro/IntroTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/intro/IntroTestSuite.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/intro/MockIntroPart.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/intro/NoIntroPartTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/BindingInteractionsTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/BindingManagerTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/BindingPersistenceTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/Bug36420Test.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/Bug36537Test.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/Bug40023Test.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/Bug42024Test.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/Bug42035Test.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/Bug42627Test.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/Bug43168Test.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/Bug43321Test.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/Bug43538Test.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/Bug43597Test.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/Bug43610Test.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/Bug43800Test.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/Bug44460Test.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/Bug53489Test.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/KeysCsvTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/KeysTestSuite.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/PreferenceMutator.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/TestBinding.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/leaks/LeakTests.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/manual/BrokenUpdatePreferencePage.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/manual/TestBackgroundSaveEditor.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/manual/UIPreferencesManual.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/markers/Bug75909Test.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/markers/DeclarativeFilterActivityTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/markers/DeclarativeFilterDeclarationTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/markers/DeclarativeFilterTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/markers/MarkerSupportRegistryTests.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/markers/ResourceMappingMarkersTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/markers/ResourceMappingTestView.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/markers/TestResolutionGenerator.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/markers/TestResourceMapping.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/markers/old_dialog_settings.xml tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/menus/AddMarkersAction.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/menus/BrokenWorkbenchWindowPulldownDelegate.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/menus/ChangeEnablementHandler.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/menus/ContextIdValues.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/menus/HelloDHandler.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/menus/HelloEHandler.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/menus/HelloUpdateHandler.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/menus/MenuAuthorityTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/menus/MenuBaseTests.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/menus/MenuBuilder.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/menus/MenuPopulationTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/menus/MenuTestCase.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/menus/MenusTestSuite.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/menus/ObjectContributionClasses.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/menus/ObjectContributionTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/menus/RemoveMarkersAction.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/menus/ToggleContextHandler.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/multieditor/MultiEditorTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/multieditor/MultiEditorTestSuite.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/multieditor/TestActionBarContributor.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/multieditor/TestEditor.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/multieditor/TiledEditor.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/multipageeditor/ContextTextEditor.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/multipageeditor/MultiEditorInputTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/multipageeditor/MultiPageEditorTestSuite.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/multipageeditor/MultiPageKeyBindingTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/multipageeditor/MultiVariablePageEditor.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/multipageeditor/MultiVariablePageTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/multipageeditor/TestKeyBindingMultiPageEditorPart.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/multipageeditor/TestMultiPageEditor.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/navigator/AbstractNavigatorTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/navigator/DuplicateMenuItemTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/navigator/NavigatorTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/navigator/NavigatorTestSuite.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/navigator/ResourceNavigatorTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/operations/AdvancedTestOperation.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/operations/MultiThreadedOperationsTests.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/operations/OperationsAPITest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/operations/OperationsTestSuite.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/operations/TestOperation.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/operations/UnredoableTestOperation.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/operations/WorkbenchOperationHistoryTests.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/operations/WorkbenchOperationStressTests.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/operations/WorkspaceOperationsTests.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/preferences/DeprecatedFontPreferenceTestCase.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/preferences/FontPreferenceTestCase.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/preferences/ListenerRemovalTestCase.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/preferences/PreferencesTestSuite.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/preferences/ScopedPreferenceStoreTestCase.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/preferences/TestPreferenceInitializer.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/preferences/WorkingCopyPreferencesTestCase.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/presentations/Bug48589Test.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/presentations/PresentationsTestSuite.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/propertyPages/PropertyPageEnablementTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/propertyPages/TableResizePropertyPage.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/propertyPages/TreeResizePropertyPage.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/propertysheet/ComboBoxPropertyDescriptorTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/propertysheet/PropertySheetAuto.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/propertysheet/PropertySheetTestSuite.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/session/ArbitraryPropertiesEditorTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/session/ArbitraryPropertiesViewTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/session/Bug108033Test.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/session/Bug95357Test.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/session/Bug98800Test.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/session/EditorWithStateTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/session/HandlerStateTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/session/IntroSessionTests.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/session/LocaleTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/session/SessionTests.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/session/ViewWithState.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/session/WorkbenchSessionTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/stress/OpenCloseTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/stress/OpenCloseTestSuite.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/themes/JFaceThemeTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/themes/TestColorFactory.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/themes/ThemeAPITest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/themes/ThemePropertyListener.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/themes/ThemeTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/themes/ThemesTestSuite.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/zoom/ActivateTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/zoom/CloseTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/zoom/OpenEditorTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/zoom/ShowViewTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/zoom/ZoomPerspectiveFactory.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/zoom/ZoomTestCase.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/zoom/ZoomTestSuite.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/zoom/ZoomedEditorActivateTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/zoom/ZoomedEditorCloseTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/zoom/ZoomedViewActivateTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/zoom/ZoomedViewCloseTest.java tests/org.eclipse.ui.tests/JFace-All Tests.launch tests/org.eclipse.ui.tests/META-INF/MANIFEST.MF tests/org.eclipse.ui.tests/Manual Component Tests/CommonNavigator.txt tests/org.eclipse.ui.tests/Manual Component Tests/Component Tests.html tests/org.eclipse.ui.tests/Manual Component Tests/Export.txt tests/org.eclipse.ui.tests/Manual Component Tests/FilteredResourcesSelectionDialog.txt tests/org.eclipse.ui.tests/Manual Component Tests/Import.txt tests/org.eclipse.ui.tests/Manual Component Tests/Navigator.txt tests/org.eclipse.ui.tests/Manual Component Tests/Outline.txt tests/org.eclipse.ui.tests/Manual Component Tests/Preferences.txt tests/org.eclipse.ui.tests/Manual Component Tests/PropertiesDialog.txt tests/org.eclipse.ui.tests/Manual Component Tests/PropertiesView.txt tests/org.eclipse.ui.tests/Manual Component Tests/Tasks.txt tests/org.eclipse.ui.tests/Manual Component Tests/TextEditor.txt tests/org.eclipse.ui.tests/Manual Component Tests/Undo test files/A.java tests/org.eclipse.ui.tests/Manual Component Tests/Undo test files/B.java tests/org.eclipse.ui.tests/Manual Component Tests/Undo test files/C.java tests/org.eclipse.ui.tests/Manual Component Tests/Undo test files/D.java tests/org.eclipse.ui.tests/Manual Component Tests/Undo.txt tests/org.eclipse.ui.tests/Manual Component Tests/WelcomeEditor.txt tests/org.eclipse.ui.tests/Manual Component Tests/WorkbenchAction.txt tests/org.eclipse.ui.tests/Manual Component Tests/WorkbenchLayout.txt tests/org.eclipse.ui.tests/Manual Scenario Tests/Bookmarks View.html tests/org.eclipse.ui.tests/Manual Scenario Tests/Common Navigator Resource View.html tests/org.eclipse.ui.tests/Manual Scenario Tests/File System Export.html tests/org.eclipse.ui.tests/Manual Scenario Tests/File System Import.html tests/org.eclipse.ui.tests/Manual Scenario Tests/Navigator View.html tests/org.eclipse.ui.tests/Manual Scenario Tests/New File Wizard.html tests/org.eclipse.ui.tests/Manual Scenario Tests/New Folder Wizard.html tests/org.eclipse.ui.tests/Manual Scenario Tests/New Project Wizard.html tests/org.eclipse.ui.tests/Manual Scenario Tests/Outline View.html tests/org.eclipse.ui.tests/Manual Scenario Tests/Persistence.html tests/org.eclipse.ui.tests/Manual Scenario Tests/Preferences.html tests/org.eclipse.ui.tests/Manual Scenario Tests/Problems View.html tests/org.eclipse.ui.tests/Manual Scenario Tests/Properties Dialog.html tests/org.eclipse.ui.tests/Manual Scenario Tests/Properties View.html tests/org.eclipse.ui.tests/Manual Scenario Tests/Tasks View.html tests/org.eclipse.ui.tests/Manual Scenario Tests/Test Scenarios.html tests/org.eclipse.ui.tests/Manual Scenario Tests/Text Editor tests/org.eclipse.ui.tests/Manual Scenario Tests/Welcome Editor.html tests/org.eclipse.ui.tests/Manual Scenario Tests/Window Actions.html tests/org.eclipse.ui.tests/Manual Scenario Tests/Window Layout.html tests/org.eclipse.ui.tests/Manual Scenario Tests/ZIP Export.html tests/org.eclipse.ui.tests/Manual Scenario Tests/ZIP Import.html tests/org.eclipse.ui.tests/UI Test Suite.launch tests/org.eclipse.ui.tests/UI-Parts References Test Suite.launch tests/org.eclipse.ui.tests/UI-Session Tests.launch tests/org.eclipse.ui.tests/about.html tests/org.eclipse.ui.tests/build.properties tests/org.eclipse.ui.tests/data/PerspectiveSwitchSourceCode.txt tests/org.eclipse.ui.tests/data/dragtests.xml tests/org.eclipse.ui.tests/data/dynamic_classes.txt tests/org.eclipse.ui.tests/data/dynamic_classes.zip tests/org.eclipse.ui.tests/data/dynamic_classes/.classpath tests/org.eclipse.ui.tests/data/dynamic_classes/.cvsignore tests/org.eclipse.ui.tests/data/dynamic_classes/.externalToolBuilders/Jar Builder.launch tests/org.eclipse.ui.tests/data/dynamic_classes/.project tests/org.eclipse.ui.tests/data/dynamic_classes/.settings/org.eclipse.jdt.core.prefs tests/org.eclipse.ui.tests/data/dynamic_classes/META-INF/MANIFEST.MF tests/org.eclipse.ui.tests/data/dynamic_classes/browser/org/eclipse/ui/dynamic/DynamicBrowserSupport.java tests/org.eclipse.ui.tests/data/dynamic_classes/build.properties tests/org.eclipse.ui.tests/data/dynamic_classes/build.xml tests/org.eclipse.ui.tests/data/dynamic_classes/commands/org/eclipse/ui/dynamic/commands/DynamicHandler.java tests/org.eclipse.ui.tests/data/dynamic_classes/decorator/org/eclipse/ui/dynamic/DynamicLabelDecorator.java tests/org.eclipse.ui.tests/data/dynamic_classes/decorator/org/eclipse/ui/dynamic/DynamicLightweightLabelDecorator.java tests/org.eclipse.ui.tests/data/dynamic_classes/editor/org/eclipse/ui/dynamic/DynamicEditor.java tests/org.eclipse.ui.tests/data/dynamic_classes/handlers/org/eclipse/ui/dynamic/handlers/DynamicHandler.java tests/org.eclipse.ui.tests/data/dynamic_classes/help/org/eclipse/ui/dynamic/DynamicHelpSupport.java tests/org.eclipse.ui.tests/data/dynamic_classes/intro/org/eclipse/ui/dynamic/DynamicIntro.java tests/org.eclipse.ui.tests/data/dynamic_classes/markerSupport/org/eclipse/ui/dynamic/markerSupport/DynamicTestsSubCategoryProvider.java tests/org.eclipse.ui.tests/data/dynamic_classes/newWizard/org/eclipse/ui/dynamic/DynamicWizard.java tests/org.eclipse.ui.tests/data/dynamic_classes/oc/org/eclipse/ui/dynamic/MockObjectActionDelegate.java tests/org.eclipse.ui.tests/data/dynamic_classes/oc/org/eclipse/ui/dynamic/MockViewActionDelegate.java tests/org.eclipse.ui.tests/data/dynamic_classes/perspective/org/eclipse/ui/dynamic/DynamicPerspective.java tests/org.eclipse.ui.tests/data/dynamic_classes/preferencePage/org/eclipse/ui/dynamic/DynamicPreferencePage.java tests/org.eclipse.ui.tests/data/dynamic_classes/propertyPage/org/eclipse/ui/dynamic/DynamicPropertyPage.java tests/org.eclipse.ui.tests/data/dynamic_classes/startup/org/eclipse/ui/dynamic/DynamicStartup.java tests/org.eclipse.ui.tests/data/dynamic_classes/view/org/eclipse/ui/dynamic/DynamicView.java tests/org.eclipse.ui.tests/data/dynamic_classes/workingSet/org/eclipse/ui/dynamic/DynamicWorkingSetElementAdapter.java tests/org.eclipse.ui.tests/data/dynamic_classes/workingSet/org/eclipse/ui/dynamic/DynamicWorkingSetPage.java tests/org.eclipse.ui.tests/data/dynamic_classes/workingSet/org/eclipse/ui/dynamic/DynamicWorkingSetUpdater.java tests/org.eclipse.ui.tests/data/org.eclipse.acceleratorConfigurationsExtensionDynamicTest/plugin.xml tests/org.eclipse.ui.tests/data/org.eclipse.acceleratorScopesExtensionDynamicTest/plugin.xml tests/org.eclipse.ui.tests/data/org.eclipse.actionDefinitionsExtensionDynamicTest/plugin.xml tests/org.eclipse.ui.tests/data/org.eclipse.bindingsExtensionDynamicTest/plugin.xml tests/org.eclipse.ui.tests/data/org.eclipse.commandsExtensionDynamicTest/commands.jar tests/org.eclipse.ui.tests/data/org.eclipse.commandsExtensionDynamicTest/plugin.xml tests/org.eclipse.ui.tests/data/org.eclipse.contextsExtensionDynamicTest/plugin.xml tests/org.eclipse.ui.tests/data/org.eclipse.datatransferArchives/ArchiveTestSource.tar tests/org.eclipse.ui.tests/data/org.eclipse.datatransferArchives/ArchiveTestSource.zip tests/org.eclipse.ui.tests/data/org.eclipse.datatransferArchives/EmptyFolderInArchive.tar tests/org.eclipse.ui.tests/data/org.eclipse.datatransferArchives/EmptyFolderInArchive.zip tests/org.eclipse.ui.tests/data/org.eclipse.datatransferArchives/FileAtRootTest.tar tests/org.eclipse.ui.tests/data/org.eclipse.datatransferArchives/FileAtRootTest.zip tests/org.eclipse.ui.tests/data/org.eclipse.datatransferArchives/helloworld.tar tests/org.eclipse.ui.tests/data/org.eclipse.datatransferArchives/helloworld.zip tests/org.eclipse.ui.tests/data/org.eclipse.handlersExtensionDynamicTest/handlers.jar tests/org.eclipse.ui.tests/data/org.eclipse.handlersExtensionDynamicTest/plugin.xml tests/org.eclipse.ui.tests/data/org.eclipse.newActionSet1/WhatDoesItDo.txt tests/org.eclipse.ui.tests/data/org.eclipse.newActionSet1/anything.gif tests/org.eclipse.ui.tests/data/org.eclipse.newActionSet1/plugin.xml tests/org.eclipse.ui.tests/data/org.eclipse.newActivitySupport1/anything.gif tests/org.eclipse.ui.tests/data/org.eclipse.newActivitySupport1/plugin.xml tests/org.eclipse.ui.tests/data/org.eclipse.newBrowser1/browser.jar tests/org.eclipse.ui.tests/data/org.eclipse.newBrowser1/plugin.xml tests/org.eclipse.ui.tests/data/org.eclipse.newDecorator1/anything.gif tests/org.eclipse.ui.tests/data/org.eclipse.newDecorator1/decorator.jar tests/org.eclipse.ui.tests/data/org.eclipse.newDecorator1/plugin.xml tests/org.eclipse.ui.tests/data/org.eclipse.newEditor1/anything.gif tests/org.eclipse.ui.tests/data/org.eclipse.newEditor1/editor.jar tests/org.eclipse.ui.tests/data/org.eclipse.newEditor1/plugin.xml tests/org.eclipse.ui.tests/data/org.eclipse.newEncoding1/plugin.xml tests/org.eclipse.ui.tests/data/org.eclipse.newHelpSupport1/help.jar tests/org.eclipse.ui.tests/data/org.eclipse.newHelpSupport1/plugin.xml tests/org.eclipse.ui.tests/data/org.eclipse.newIntro1/intro.jar tests/org.eclipse.ui.tests/data/org.eclipse.newIntro1/plugin.xml tests/org.eclipse.ui.tests/data/org.eclipse.newKeyword1/plugin.xml tests/org.eclipse.ui.tests/data/org.eclipse.newMarkerSupport/markerSupport.jar tests/org.eclipse.ui.tests/data/org.eclipse.newMarkerSupport/plugin.xml tests/org.eclipse.ui.tests/data/org.eclipse.newMultiEditor/build.xml tests/org.eclipse.ui.tests/data/org.eclipse.newMultiEditor/test01.txt tests/org.eclipse.ui.tests/data/org.eclipse.newMultiEditor/test02.txt tests/org.eclipse.ui.tests/data/org.eclipse.newMultiEditor/test03.etest tests/org.eclipse.ui.tests/data/org.eclipse.newMultiEditor/test04.properties tests/org.eclipse.ui.tests/data/org.eclipse.newNewWizard1/anything.gif tests/org.eclipse.ui.tests/data/org.eclipse.newNewWizard1/newWizard.jar tests/org.eclipse.ui.tests/data/org.eclipse.newNewWizard1/plugin.xml tests/org.eclipse.ui.tests/data/org.eclipse.newOC1/oc.jar tests/org.eclipse.ui.tests/data/org.eclipse.newOC1/plugin.xml tests/org.eclipse.ui.tests/data/org.eclipse.newPerspective1/perspective.jar tests/org.eclipse.ui.tests/data/org.eclipse.newPerspective1/plugin.xml tests/org.eclipse.ui.tests/data/org.eclipse.newPerspectiveExtension1/anything.gif tests/org.eclipse.ui.tests/data/org.eclipse.newPerspectiveExtension1/plugin.xml tests/org.eclipse.ui.tests/data/org.eclipse.newPreferencePage1/plugin.xml tests/org.eclipse.ui.tests/data/org.eclipse.newPreferencePage1/preferencePage.jar tests/org.eclipse.ui.tests/data/org.eclipse.newPropertyPage1/plugin.xml tests/org.eclipse.ui.tests/data/org.eclipse.newPropertyPage1/propertyPage.jar tests/org.eclipse.ui.tests/data/org.eclipse.newStartup1/plugin.xml tests/org.eclipse.ui.tests/data/org.eclipse.newStartup1/startup.jar tests/org.eclipse.ui.tests/data/org.eclipse.newView1/anything.gif tests/org.eclipse.ui.tests/data/org.eclipse.newView1/plugin.xml tests/org.eclipse.ui.tests/data/org.eclipse.newView1/view.jar tests/org.eclipse.ui.tests/data/org.eclipse.newWorkingSet1/anything.gif tests/org.eclipse.ui.tests/data/org.eclipse.newWorkingSet1/plugin.xml tests/org.eclipse.ui.tests/data/org.eclipse.newWorkingSet1/workingSet.jar tests/org.eclipse.ui.tests/data/testContentType.zip tests/org.eclipse.ui.tests/data/workspaces/editorSessionTests.zip tests/org.eclipse.ui.tests/data/workspaces/importExistingFromDirTest.zip tests/org.eclipse.ui.tests/data/workspaces/introSessionTests.zip tests/org.eclipse.ui.tests/doc/Introduction.html tests/org.eclipse.ui.tests/doc/JUnitPractices.html tests/org.eclipse.ui.tests/icons/anything.gif tests/org.eclipse.ui.tests/icons/binary_co.gif tests/org.eclipse.ui.tests/icons/dynamic.gif tests/org.eclipse.ui.tests/icons/editor.gif tests/org.eclipse.ui.tests/icons/mockeditorpart1.gif tests/org.eclipse.ui.tests/icons/mockeditorpart2.gif tests/org.eclipse.ui.tests/icons/view.gif tests/org.eclipse.ui.tests/plugin.xml tests/org.eclipse.ui.tests/test.xml tests/org.eclipse.ui.tests/uiSniff tests/org.eclipse.ui.tests/uiSniff.bat
-rw-r--r--bundles/org.eclipse.core.databinding.beans/.classpath7
-rw-r--r--bundles/org.eclipse.core.databinding.beans/.cvsignore1
-rw-r--r--bundles/org.eclipse.core.databinding.beans/.project28
-rw-r--r--bundles/org.eclipse.core.databinding.beans/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--bundles/org.eclipse.core.databinding.beans/.settings/org.eclipse.jdt.ui.prefs7
-rw-r--r--bundles/org.eclipse.core.databinding.beans/.settings/org.eclipse.pde.prefs14
-rw-r--r--bundles/org.eclipse.core.databinding.beans/META-INF/MANIFEST.MF14
-rw-r--r--bundles/org.eclipse.core.databinding.beans/about.html28
-rw-r--r--bundles/org.eclipse.core.databinding.beans/build.properties17
-rw-r--r--bundles/org.eclipse.core.databinding.beans/plugin.properties12
-rw-r--r--bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/databinding/beans/BeansObservables.java420
-rw-r--r--bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/databinding/beans/IBeanObservable.java38
-rw-r--r--bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/databinding/beans/package.html16
-rw-r--r--bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/BeanObservableListDecorator.java215
-rw-r--r--bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/BeanObservableSetDecorator.java169
-rw-r--r--bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/BeanObservableValueDecorator.java126
-rw-r--r--bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/IdentityWrapper.java50
-rw-r--r--bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/JavaBeanObservableList.java133
-rw-r--r--bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/JavaBeanObservableMap.java116
-rw-r--r--bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/JavaBeanObservableSet.java136
-rw-r--r--bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/JavaBeanObservableValue.java277
-rw-r--r--bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/ListenerSupport.java168
-rw-r--r--bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/package.html16
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/AbstractObservable.java72
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/ChangeEvent.java41
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/ChangeManager.java152
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/ChangeSupport.java79
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/Diffs.java397
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IChangeListener.java40
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IDiff.java32
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IObservable.java108
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IObservableCollection.java42
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IObservablesListener.java23
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IStaleListener.java29
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/ObservableEvent.java52
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/ObservableTracker.java152
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/Observables.java165
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/Realm.java294
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/StaleEvent.java42
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/AbstractObservableList.java270
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/IListChangeListener.java30
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/IObservableList.java169
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/ListChangeEvent.java58
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/ListDiff.java61
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/ListDiffEntry.java53
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/ObservableList.java314
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/WritableList.java209
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/package.html16
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/AbstractObservableMap.java157
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/BidirectionalMap.java96
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/ComputedObservableMap.java161
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/IMapChangeListener.java28
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/IObservableMap.java104
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/MapChangeEvent.java57
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/MapDiff.java54
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/ObservableMap.java156
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/WritableMap.java101
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/package.html16
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/masterdetail/IObservableFactory.java31
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/masterdetail/MasterDetailObservables.java97
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/masterdetail/package.html16
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/package.html16
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/AbstractObservableSet.java198
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/IObservableSet.java126
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/ISetChangeListener.java27
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/ListToSetAdapter.java77
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/MappedSet.java149
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/ObservableSet.java198
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/SetChangeEvent.java57
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/SetDiff.java49
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/UnionSet.java201
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/WritableSet.java151
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/package.html16
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/tree/IOrderedTreeProvider.java41
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/tree/IUnorderedTreeProvider.java42
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/tree/package.html16
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/AbstractObservableValue.java86
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/AbstractVetoableValue.java85
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/ChangeVetoException.java28
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/ComputedValue.java207
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/IObservableValue.java68
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/IValueChangeListener.java27
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/IValueChangingListener.java29
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/IVetoableValue.java38
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/ValueChangeEvent.java59
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/ValueChangingEvent.java64
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/ValueDiff.java74
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/WritableValue.java109
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/package.html16
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/util/ILogger.java38
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/util/Policy.java75
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/util/package.html16
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/EmptyObservableList.java170
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/EmptyObservableSet.java129
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/IStalenessConsumer.java24
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/ProxyObservableSet.java72
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/StalenessTracker.java127
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/UnmodifiableObservableList.java71
-rwxr-xr-xbundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableList.java120
-rwxr-xr-xbundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableSet.java116
-rwxr-xr-xbundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableValue.java127
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/AbstractObservableTree.java151
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/IChildrenCountUpdate.java38
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/IChildrenUpdate.java53
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/IHasChildrenUpdate.java37
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/IObservableTree.java145
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/ITreeChangeListener.java24
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/IViewerUpdate.java47
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/TreeChangeEvent.java47
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/TreeDiff.java41
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/TreeDiffNode.java91
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/TreeDiffVisitor.java33
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/TreePath.java181
-rw-r--r--bundles/org.eclipse.core.databinding/.classpath7
-rw-r--r--bundles/org.eclipse.core.databinding/.cvsignore1
-rw-r--r--bundles/org.eclipse.core.databinding/.project28
-rw-r--r--bundles/org.eclipse.core.databinding/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--bundles/org.eclipse.core.databinding/.settings/org.eclipse.jdt.ui.prefs7
-rw-r--r--bundles/org.eclipse.core.databinding/.settings/org.eclipse.pde.prefs14
-rw-r--r--bundles/org.eclipse.core.databinding/META-INF/MANIFEST.MF29
-rw-r--r--bundles/org.eclipse.core.databinding/about.html28
-rw-r--r--bundles/org.eclipse.core.databinding/build.properties17
-rw-r--r--bundles/org.eclipse.core.databinding/component.xml39
-rw-r--r--bundles/org.eclipse.core.databinding/plugin.properties12
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/AggregateValidationStatus.java201
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/BindSpec.java471
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/Binding.java249
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/BindingEvent.java201
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/BindingException.java71
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/DataBindingContext.java349
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/DefaultBindSpec.java585
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/IBindingListener.java34
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertDate2String.java37
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Boolean.java36
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2BooleanPrimitive.java44
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Byte.java36
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2BytePrimitive.java41
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Character.java50
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Date.java34
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Double.java36
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2DoublePrimitive.java41
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Float.java36
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2FloatPrimitive.java41
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Integer.java36
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2IntegerPrimitive.java41
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Long.java36
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2LongPrimitive.java41
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Short.java36
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2ShortPrimitive.java41
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/Converter.java41
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/DateConversionSupport.java106
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/IConverter.java55
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/IdentityConverter.java107
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ToStringConverter.java60
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/package.html18
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/AbstractObservable.java72
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/ChangeEvent.java41
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/ChangeManager.java152
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/ChangeSupport.java79
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/Diffs.java397
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/IChangeListener.java40
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/IDiff.java32
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/IObservable.java108
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/IObservableCollection.java42
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/IObservablesListener.java23
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/IStaleListener.java29
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/ObservableEvent.java52
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/ObservableTracker.java152
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/Observables.java165
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/Realm.java294
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/StaleEvent.java42
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/AbstractObservableList.java270
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/IListChangeListener.java30
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/IObservableList.java169
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/ListChangeEvent.java58
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/ListDiff.java61
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/ListDiffEntry.java53
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/ObservableList.java314
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/WritableList.java209
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/package.html16
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/AbstractObservableMap.java157
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/BidirectionalMap.java96
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/ComputedObservableMap.java161
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/IMapChangeListener.java28
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/IObservableMap.java104
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/MapChangeEvent.java57
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/MapDiff.java54
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/ObservableMap.java156
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/WritableMap.java101
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/package.html16
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/masterdetail/IObservableFactory.java31
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/masterdetail/MasterDetailObservables.java97
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/masterdetail/package.html16
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/package.html16
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/AbstractObservableSet.java198
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/IObservableSet.java126
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/ISetChangeListener.java27
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/ListToSetAdapter.java77
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/MappedSet.java149
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/ObservableSet.java198
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/SetChangeEvent.java57
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/SetDiff.java49
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/UnionSet.java201
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/WritableSet.java151
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/package.html16
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/tree/IOrderedTreeProvider.java41
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/tree/IUnorderedTreeProvider.java42
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/tree/package.html16
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/AbstractObservableValue.java86
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/AbstractVetoableValue.java85
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/ChangeVetoException.java28
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/ComputedValue.java207
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/IObservableValue.java68
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/IValueChangeListener.java27
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/IValueChangingListener.java29
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/IVetoableValue.java38
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/ValueChangeEvent.java59
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/ValueChangingEvent.java64
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/ValueDiff.java74
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/WritableValue.java109
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/package.html16
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/package.html44
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/util/ILogger.java38
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/util/Policy.java75
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/util/package.html16
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/IValidator.java43
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/ObjectToPrimitiveValidator.java81
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/ReadOnlyValidator.java43
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2BytePrimitiveValidator.java43
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2ByteValidator.java29
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2DateValidator.java46
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2DoublePrimitiveValidator.java41
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2DoubleValidator.java29
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2FloatPrimitiveValidator.java39
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2FloatValidator.java29
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2IntegerPrimitiveValidator.java38
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2IntegerValidator.java29
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2LongPrimitiveValidator.java38
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2LongValidator.java29
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2ShortPrimitiveValidator.java38
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2ShortValidator.java29
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/ValidationStatus.java99
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/package.html16
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/BindingMessages.java54
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ClassLookupSupport.java90
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/IdentityWrapper.java50
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ListBinding.java344
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/Pair.java57
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/RandomAccessListIterator.java135
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/Util.java35
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ValidationStatusMap.java165
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ValueBinding.java436
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/messages.properties35
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/EmptyObservableList.java170
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/EmptyObservableSet.java129
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/IStalenessConsumer.java24
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/ProxyObservableSet.java72
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/StalenessTracker.java127
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/UnmodifiableObservableList.java71
-rwxr-xr-xbundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableList.java120
-rwxr-xr-xbundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableSet.java116
-rwxr-xr-xbundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableValue.java127
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/AbstractObservableTree.java151
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/IChildrenCountUpdate.java38
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/IChildrenUpdate.java53
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/IHasChildrenUpdate.java37
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/IObservableTree.java145
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/ITreeChangeListener.java24
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/IViewerUpdate.java47
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/TreeChangeEvent.java47
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/TreeDiff.java41
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/TreeDiffNode.java91
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/TreeDiffVisitor.java33
-rw-r--r--bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/TreePath.java181
-rw-r--r--bundles/org.eclipse.jface.databinding/.classpath7
-rw-r--r--bundles/org.eclipse.jface.databinding/.cvsignore1
-rw-r--r--bundles/org.eclipse.jface.databinding/.project28
-rw-r--r--bundles/org.eclipse.jface.databinding/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--bundles/org.eclipse.jface.databinding/.settings/org.eclipse.jdt.ui.prefs7
-rw-r--r--bundles/org.eclipse.jface.databinding/.settings/org.eclipse.pde.prefs14
-rw-r--r--bundles/org.eclipse.jface.databinding/META-INF/MANIFEST.MF22
-rw-r--r--bundles/org.eclipse.jface.databinding/about.html28
-rw-r--r--bundles/org.eclipse.jface.databinding/build.properties17
-rw-r--r--bundles/org.eclipse.jface.databinding/plugin.properties12
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/swt/ISWTObservable.java32
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/swt/ISWTObservableValue.java24
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/swt/SWTObservables.java318
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/swt/package.html16
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ListeningLabelProvider.java68
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableListContentProvider.java133
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableMapLabelProvider.java90
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableSetContentProvider.java204
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ViewersObservables.java38
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/package.html16
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/ButtonObservableValue.java67
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/CComboObservableList.java51
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/CComboObservableValue.java115
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/CLabelObservableValue.java48
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/ComboObservableList.java51
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/ComboObservableValue.java108
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/ControlObservableValue.java106
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/LabelObservableValue.java48
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/ListObservableList.java51
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/ListObservableValue.java94
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/SWTObservableList.java130
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/SWTProperties.java77
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/SpinnerObservableValue.java106
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/TableObservableValue.java81
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/TextObservableValue.java245
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/IPrefetchingTree.java37
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/LeafNodesSet.java260
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/OrderedTreeContentProvider.java433
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/OrderedTreeNode.java306
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/PrefetchingTree.java40
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/SelectionProviderSingleSelectionObservableValue.java131
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/UnorderedTreeContentProvider.java422
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/UnorderedTreeNode.java288
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/AbstractSWTObservableValue.java56
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/AbstractSWTVetoableValue.java59
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/ControlUpdater.java181
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/MenuUpdater.java166
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/SWTUtil.java177
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/TableUpdater.java172
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/WorkQueue.java147
-rw-r--r--bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/viewers/ViewerLabelProvider.java85
-rw-r--r--examples/org.eclipse.jface.examples.databinding/.classpath7
-rw-r--r--examples/org.eclipse.jface.examples.databinding/.cvsignore1
-rw-r--r--examples/org.eclipse.jface.examples.databinding/.project30
-rw-r--r--examples/org.eclipse.jface.examples.databinding/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--examples/org.eclipse.jface.examples.databinding/.settings/org.eclipse.jdt.ui.prefs7
-rw-r--r--examples/org.eclipse.jface.examples.databinding/.settings/org.eclipse.pde.prefs14
-rw-r--r--examples/org.eclipse.jface.examples.databinding/META-INF/MANIFEST.MF19
-rw-r--r--examples/org.eclipse.jface.examples.databinding/about.html28
-rw-r--r--examples/org.eclipse.jface.examples.databinding/build.properties17
-rw-r--r--examples/org.eclipse.jface.examples.databinding/plugin.properties12
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/ModelObject.java82
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/AsynchronousTestSet.java163
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/LabelProviderTest.java211
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/LabelProviderTest2.java210
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/RenamableItem.java53
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/SimpleNode.java39
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/SomeMathFunction.java124
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/StructuredContentProviderTest.java396
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/TreeContentProviderTest.java199
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/ducks/DuckType.java122
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/ducks/ReflectedMethod.java86
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/ducks/ReflectedProperty.java104
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/ducks/RelaxedDuckType.java70
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/EditMask.java451
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/EditMaskParseException.java51
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/EditMaskTest.java35
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/internal/EditMaskLexerAndToken.java189
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/internal/EditMaskParser.java147
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/internal/SWTUtil.java177
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/internal/WorkQueue.java148
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Account.java85
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Adventure.java114
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/AdventureFactory.java43
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/AggregateObservableValue.java102
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Cart.java25
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Catalog.java90
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Category.java40
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Lodging.java40
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/PriceModelObject.java61
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/SampleData.java172
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Signon.java41
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/SimpleModel.java37
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/SimpleOrder.java62
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/SimplePerson.java109
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Transportation.java40
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/nestedselection/TestMasterDetail.java230
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/radioGroup/RadioGroup.java549
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/radioGroup/VetoableSelectionListener.java19
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet000HelloWorld.java123
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet001NestedSelectionWithCombo.java215
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet002UpdateComboRetainSelection.java185
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet003UpdateComboBindUsingViewer.java191
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet004DataBindingContextErrorLabel.java96
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet005MenuUpdater.java85
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet006Spreadsheet.java313
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet007ColorLabelProvider.java216
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet008ComputedValue.java169
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet009TableViewer.java180
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet010MasterDetail.java94
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet011ValidateMultipleBindingsSnippet.java142
-rw-r--r--examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet0xffffffff.java152
-rw-r--r--tests/org.eclipse.jface.tests.databinding/.classpath7
-rw-r--r--tests/org.eclipse.jface.tests.databinding/.cvsignore1
-rw-r--r--tests/org.eclipse.jface.tests.databinding/.project28
-rw-r--r--tests/org.eclipse.jface.tests.databinding/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--tests/org.eclipse.jface.tests.databinding/.settings/org.eclipse.jdt.ui.prefs7
-rw-r--r--tests/org.eclipse.jface.tests.databinding/.settings/org.eclipse.pde.prefs14
-rw-r--r--tests/org.eclipse.jface.tests.databinding/JFace-Data Binding Test Suite.launch36
-rw-r--r--tests/org.eclipse.jface.tests.databinding/META-INF/MANIFEST.MF18
-rw-r--r--tests/org.eclipse.jface.tests.databinding/about.html28
-rw-r--r--tests/org.eclipse.jface.tests.databinding/build.properties20
-rw-r--r--tests/org.eclipse.jface.tests.databinding/plugin.properties12
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/beans/BeansObservablesTest.java182
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/observable/RealmTest.java37
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/observable/map/AbstractObservableMapTest.java95
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/observable/map/ObservableMapTest.java105
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/observable/map/WritableMapTest.java77
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/internal/databinding/observable/masterdetail/DetailObservableListTest.java87
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/internal/databinding/observable/masterdetail/DetailObservableSetTest.java96
-rwxr-xr-xtests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/internal/databinding/observable/masterdetail/DetailObservableValueTest.java86
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/conversion/IdentityConverterTest.java123
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/AbstractBindSupportFactoryTest.java43
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryBooleanPrimitiveTest.java151
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryBytePrimitiveTest.java149
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryDoublePrimitiveTest.java152
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryFloatPrimitiveTest.java150
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryIntTest.java140
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryLongPrimitiveTest.java150
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryShortPrimitiveTest.java150
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryTest.java96
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/validation/ObjectToPrimitiveValidatorTest.java49
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/AbstractDefaultRealmTestCase.java53
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/BindSpecTests.java257
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/BindingTestSuite.java240
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/ComputedValueTest.java133
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/DatabindingContextTest.java245
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/IDiffsTest.java136
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/ObservableTest.java93
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/RandomAccessListIteratorTest.java87
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/SelectionAwareObservableCollectionTest.java103
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/mask/EditMaskLexerAndTokenTest.java98
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/mask/EditMaskParserTest.java105
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/LockRealm.java99
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/ThreadRealm.java118
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/list/AbstractObservableListTest.java116
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/list/ObservableListTest.java117
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/list/WritableListTest.java167
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/set/WritableSetTest.java28
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/value/AbstractObservableValueTest.java89
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/value/AbstractVetoableValueTest.java86
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/value/WritableValueTest.java90
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/AutomationUtil.java59
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/BindingScenariosTestSuite.java79
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ButtonControlScenario.java118
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ComboScenarios.java563
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ComboUpdatingTest.java214
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ComboViewerScenario.java120
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/CustomBeanBindSpec.java90
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/CustomBeanModelType.java58
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/CustomConverterScenarios.java97
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/CustomScenarios.java90
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/LabelControlScenario.java61
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ListViewerScenario.java123
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/MasterDetailScenarios.java371
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/NPETestScenario.java70
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/NewTableScenarios.java443
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/PropertyScenarios.java549
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ScenariosTestCase.java147
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/SpinnerControlScenario.java63
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/TableScenarios.java451
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/TextControlScenario.java302
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/smoketest/swt.xswt301
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/AbstractGetAndSetSelectionObservableCollectionTest.java49
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/AutoSelectTableViewerCollectionExtendedTest.java56
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/AutoSelectTableViewerCollectionTest.java55
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/CComboObservableCollectionTest.java47
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/ComboObservableCollectionTest.java47
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/CopyOfAutoSelectTableViewerCollectionExtendedTest.java55
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/ListObservableCollectionTest.java47
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/ObservableCollectionViewerTest.java46
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/SWTObservablesTest.java59
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/TableViewerObservableCollectionTest.java46
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/TextObservableValueTests.java73
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/util/RealmTester.java118
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/viewers/ObservableMapLabelProviderTest.java62
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/viewers/ObservableSetContentProviderTest.java31
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/examples/model/PersonTests.java52
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ListBindingTest.java94
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ListBindingTest_Pipeline.java230
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ListBindingTest_Policies.java181
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/Pipeline.java115
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ValueBindingTest.java93
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ValueBindingTest_Pipeline.java315
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ValueBindingTest_Policies.java134
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/Bean.java80
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/BeanObservableListDecoratorTest.java59
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/BeanObservableSetDecoratorTest.java60
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/BeanObservableValueDecoratorTest.java60
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/JavaBeanObservableListTest.java51
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/JavaBeanObservableMapTest.java143
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/JavaBeanObservableSetTest.java55
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/JavaBeanObservableValueTest.java54
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/observable/UnmodifiableObservableListTest.java176
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/ButtonObservableValueTest.java39
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/CComboObservableValueTest.java39
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/CLabelObservableValueTest.java40
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/ComboObservableValueTest.java40
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/ControlObservableValueTest.java192
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/LabelObservableValueTest.java39
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/SpinnerObservableValueTest.java41
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/TableObservableValueTest.java42
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/viewers/SelectionProviderSingleSelectionObservableValueTest.java147
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/provisional/observable/AbstractObservableTest.java255
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/provisional/observable/ObservablesTest.java46
-rw-r--r--tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/provisional/viewers/SelectionObservableValueTest.java65
-rw-r--r--tests/org.eclipse.jface.tests.databinding/test.xml50
501 files changed, 0 insertions, 49863 deletions
diff --git a/bundles/org.eclipse.core.databinding.beans/.classpath b/bundles/org.eclipse.core.databinding.beans/.classpath
deleted file mode 100644
index ce739334..00000000
--- a/bundles/org.eclipse.core.databinding.beans/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.core.databinding.beans/.cvsignore b/bundles/org.eclipse.core.databinding.beans/.cvsignore
deleted file mode 100644
index ba077a40..00000000
--- a/bundles/org.eclipse.core.databinding.beans/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/bundles/org.eclipse.core.databinding.beans/.project b/bundles/org.eclipse.core.databinding.beans/.project
deleted file mode 100644
index b4a9c589..00000000
--- a/bundles/org.eclipse.core.databinding.beans/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.core.databinding.beans</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.core.databinding.beans/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.core.databinding.beans/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 0aade4c4..00000000
--- a/bundles/org.eclipse.core.databinding.beans/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Thu Feb 01 22:33:45 EST 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.core.databinding.beans/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.core.databinding.beans/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 59509e09..00000000
--- a/bundles/org.eclipse.core.databinding.beans/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Thu Aug 24 15:24:48 EDT 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.ui.exception.name=e
-org.eclipse.jdt.ui.gettersetter.use.is=true
-org.eclipse.jdt.ui.javadoc=true
-org.eclipse.jdt.ui.overrideannotation=true
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return Returns the ${bare_field_name}.\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} The ${bare_field_name} to set.\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*******************************************************************************\n * Copyright (c) ${year} IBM Corporation and others.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * IBM Corporation - initial API and implementation\n ******************************************************************************/\n</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @since 3.3\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template></templates>
diff --git a/bundles/org.eclipse.core.databinding.beans/.settings/org.eclipse.pde.prefs b/bundles/org.eclipse.core.databinding.beans/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index fee4b048..00000000
--- a/bundles/org.eclipse.core.databinding.beans/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,14 +0,0 @@
-#Sat Mar 19 15:31:31 EST 2005
-compilers.p.deprecated=0
-compilers.p.illegal-att-value=0
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=0
-compilers.p.unknown-attribute=0
-compilers.p.unknown-class=0
-compilers.p.unknown-element=1
-compilers.p.unknown-resource=0
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.p.unused-element-or-attribute=1
-compilers.use-project=true
-eclipse.preferences.version=1
diff --git a/bundles/org.eclipse.core.databinding.beans/META-INF/MANIFEST.MF b/bundles/org.eclipse.core.databinding.beans/META-INF/MANIFEST.MF
deleted file mode 100644
index dff130ca..00000000
--- a/bundles/org.eclipse.core.databinding.beans/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,14 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.core.databinding.beans
-Bundle-Version: 1.0.0.qualifier
-Bundle-ClassPath: .
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.core.databinding.beans,
- org.eclipse.core.internal.databinding.internal.beans;x-internal:=true
-Require-Bundle: org.eclipse.core.databinding;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.equinox.common;bundle-version="[3.2.0,4.0.0)"
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/bundles/org.eclipse.core.databinding.beans/about.html b/bundles/org.eclipse.core.databinding.beans/about.html
deleted file mode 100644
index 46023304..00000000
--- a/bundles/org.eclipse.core.databinding.beans/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.core.databinding.beans/build.properties b/bundles/org.eclipse.core.databinding.beans/build.properties
deleted file mode 100644
index 6f0a513e..00000000
--- a/bundles/org.eclipse.core.databinding.beans/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are 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:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = .,\
- META-INF/,\
- plugin.properties,\
- about.html
-output.databinding.jar = bin/
-src.includes = about.html
-source.. = src/
diff --git a/bundles/org.eclipse.core.databinding.beans/plugin.properties b/bundles/org.eclipse.core.databinding.beans/plugin.properties
deleted file mode 100644
index 083e360f..00000000
--- a/bundles/org.eclipse.core.databinding.beans/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are 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:
-# IBM Corporation - initial API and implementation
-###############################################################################
-pluginName = JFace Data Binding for JavaBeans
-providerName = Eclipse.org
diff --git a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/databinding/beans/BeansObservables.java b/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/databinding/beans/BeansObservables.java
deleted file mode 100644
index dde0e8ec..00000000
--- a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/databinding/beans/BeansObservables.java
+++ /dev/null
@@ -1,420 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164268, 171616
- * Brad Reynolds - bug 147515
- *******************************************************************************/
-package org.eclipse.core.databinding.beans;
-
-import java.beans.BeanInfo;
-import java.beans.IntrospectionException;
-import java.beans.Introspector;
-import java.beans.PropertyDescriptor;
-
-import org.eclipse.core.databinding.BindingException;
-import org.eclipse.core.databinding.observable.IObservable;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.map.IObservableMap;
-import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
-import org.eclipse.core.databinding.observable.masterdetail.MasterDetailObservables;
-import org.eclipse.core.databinding.observable.set.IObservableSet;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.internal.databinding.internal.beans.BeanObservableListDecorator;
-import org.eclipse.core.internal.databinding.internal.beans.BeanObservableSetDecorator;
-import org.eclipse.core.internal.databinding.internal.beans.BeanObservableValueDecorator;
-import org.eclipse.core.internal.databinding.internal.beans.JavaBeanObservableList;
-import org.eclipse.core.internal.databinding.internal.beans.JavaBeanObservableMap;
-import org.eclipse.core.internal.databinding.internal.beans.JavaBeanObservableSet;
-import org.eclipse.core.internal.databinding.internal.beans.JavaBeanObservableValue;
-
-/**
- * A factory for creating observable objects of Java
- * objects that conform to the <a
- * href="http://java.sun.com/products/javabeans/docs/spec.html">JavaBean
- * specification</a> for bound properties. When binding to the property
- * reflection is used to find an <code>addPropertyChangeListener(...)</code>
- * method that conforms to section 7.4.5 of the specification.
- *
- * @since 1.1
- *
- */
-final public class BeansObservables {
-
- /**
- *
- */
- public static final boolean DEBUG = true;
-
- /**
- * Returns an observable value in the default realm tracking the current
- * value of the named property of the given bean.
- *
- * @param bean
- * the object
- * @param propertyName
- * the name of the property
- * @return an observable value tracking the current value of the named
- * property of the given bean
- */
- public static IObservableValue observeValue(Object bean, String propertyName) {
- return observeValue(Realm.getDefault(), bean, propertyName);
- }
-
- /**
- * Returns an observable value in the given realm tracking the current value
- * of the named property of the given bean.
- *
- * @param realm
- * the realm
- * @param bean
- * the object
- * @param propertyName
- * the name of the property
- * @return an observable value tracking the current value of the named
- * property of the given bean
- */
- public static IObservableValue observeValue(Realm realm, Object bean,
- String propertyName) {
- PropertyDescriptor descriptor = getPropertyDescriptor(bean.getClass(),
- propertyName);
- return new JavaBeanObservableValue(realm, bean, descriptor, null);
- }
-
- /**
- * Returns an observable map in the default realm tracking the current
- * values of the named property for the beans in the given set.
- *
- * @param domain
- * the set of bean objects
- * @param beanClass
- * the common base type of bean objects that may be in the set
- * @param propertyName
- * the name of the property
- * @return an observable map tracking the current values of the named
- * property for the beans in the given domain set
- */
- public static IObservableMap observeMap(IObservableSet domain,
- Class beanClass, String propertyName) {
- PropertyDescriptor descriptor = getPropertyDescriptor(beanClass,
- propertyName);
- return new JavaBeanObservableMap(domain, descriptor);
- }
-
- private static PropertyDescriptor getPropertyDescriptor(Class beanClass,
- String propertyName) {
- BeanInfo beanInfo;
- try {
- beanInfo = Introspector.getBeanInfo(beanClass);
- } catch (IntrospectionException e) {
- // cannot introspect, give up
- return null;
- }
- PropertyDescriptor[] propertyDescriptors = beanInfo
- .getPropertyDescriptors();
- for (int i = 0; i < propertyDescriptors.length; i++) {
- PropertyDescriptor descriptor = propertyDescriptors[i];
- if (descriptor.getName().equals(propertyName)) {
- return descriptor;
- }
- }
- throw new BindingException(
- "Could not find property with name " + propertyName + " in class " + beanClass); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Returns an array of observable maps in the default realm tracking the
- * current values of the named propertys for the beans in the given set.
- *
- * @param domain
- * the set of objects
- * @param beanClass
- * the common base type of objects that may be in the set
- * @param propertyNames
- * the array of property names
- * @return an array of observable maps tracking the current values of the
- * named propertys for the beans in the given domain set
- */
- public static IObservableMap[] observeMaps(IObservableSet domain,
- Class beanClass, String[] propertyNames) {
- IObservableMap[] result = new IObservableMap[propertyNames.length];
- for (int i = 0; i < propertyNames.length; i++) {
- result[i] = observeMap(domain, beanClass, propertyNames[i]);
- }
- return result;
- }
-
- /**
- * Returns an observable list in the given realm tracking the
- * collection-typed named property of the given bean object
- *
- * @param realm
- * the realm
- * @param bean
- * the object
- * @param propertyName
- * the name of the collection-typed property
- * @return an observable list tracking the collection-typed named property
- * of the given bean object
- *
- */
- public static IObservableList observeList(Realm realm, Object bean,
- String propertyName) {
- return observeList(realm, bean, propertyName, null);
- }
-
- /**
- * Returns an observable list in the given realm tracking the
- * collection-typed named property of the given bean object
- *
- * @param realm
- * the realm
- * @param bean
- * the bean object
- * @param propertyName
- * the name of the property
- * @param elementType
- * type of the elements in the list. If <code>null</code> and
- * the property is an array the type will be inferred. If
- * <code>null</code> and the property type cannot be inferred
- * element type will be <code>null</code>.
- * @return an observable list tracking the collection-typed named property
- * of the given bean object
- */
- public static IObservableList observeList(Realm realm, Object bean,
- String propertyName, Class elementType) {
- PropertyDescriptor propertyDescriptor = getPropertyDescriptor(bean
- .getClass(), propertyName);
- elementType = getCollectionElementType(elementType, propertyDescriptor);
-
- return new JavaBeanObservableList(realm, bean, propertyDescriptor,
- elementType);
- }
-
- /**
- * Returns an observable set in the given realm tracking the
- * collection-typed named property of the given bean object
- *
- * @param realm
- * the realm
- * @param bean
- * the bean object
- * @param propertyName
- * the name of the property
- * @return an observable set tracking the collection-typed named property of
- * the given bean object
- */
- public static IObservableSet observeSet(Realm realm, Object bean,
- String propertyName) {
- return observeSet(realm, bean, propertyName, null);
- }
-
- /**
- * Returns a factory for creating obervable values tracking the given
- * property of a particular bean object
- *
- * @param realm
- * the realm to use
- * @param propertyName
- * the name of the property
- * @return an observable value factory
- */
- public static IObservableFactory valueFactory(final Realm realm,
- final String propertyName) {
- return new IObservableFactory() {
- public IObservable createObservable(Object target) {
- return observeValue(realm, target, propertyName);
- }
- };
- }
-
- /**
- * Returns a factory for creating obervable lists tracking the given
- * property of a particular bean object
- *
- * @param realm
- * the realm to use
- * @param propertyName
- * the name of the property
- * @param elementType
- * @return an observable list factory
- */
- public static IObservableFactory listFactory(final Realm realm,
- final String propertyName, final Class elementType) {
- return new IObservableFactory() {
- public IObservable createObservable(Object target) {
- return observeList(realm, target, propertyName, elementType);
- }
- };
- }
-
- /**
- * Returns a factory for creating obervable sets tracking the given property
- * of a particular bean object
- *
- * @param realm
- * the realm to use
- * @param propertyName
- * the name of the property
- * @return an observable set factory
- */
- public static IObservableFactory setFactory(final Realm realm,
- final String propertyName) {
- return new IObservableFactory() {
- public IObservable createObservable(Object target) {
- return observeSet(realm, target, propertyName);
- }
- };
- }
-
- /**
- * Helper method for
- * <code>MasterDetailObservables.detailValue(master, valueFactory(realm,
- propertyName), propertyType)</code>
- *
- * @param realm
- * @param master
- * @param propertyName
- * @param propertyType
- * can be <code>null</code>
- * @return an observable value that tracks the current value of the named
- * property for the current value of the master observable value
- *
- * @see MasterDetailObservables
- */
- public static IObservableValue observeDetailValue(Realm realm,
- IObservableValue master, String propertyName, Class propertyType) {
-
- IObservableValue value = MasterDetailObservables.detailValue(master,
- valueFactory(realm, propertyName), propertyType);
- BeanObservableValueDecorator decorator = new BeanObservableValueDecorator(
- value, master, getValueTypePropertyDescriptor(master,
- propertyName));
-
- return decorator;
- }
-
- /**
- * Helper method for
- * <code>MasterDetailObservables.detailList(master, listFactory(realm,
- propertyName, propertyType), propertyType)</code>
- *
- * @param realm
- * @param master
- * @param propertyName
- * @param propertyType
- * can be <code>null</code>
- * @return an observable list that tracks the named property for the current
- * value of the master observable value
- *
- * @see MasterDetailObservables
- */
- public static IObservableList observeDetailList(Realm realm,
- IObservableValue master, String propertyName, Class propertyType) {
- IObservableList observableList = MasterDetailObservables.detailList(
- master, listFactory(realm, propertyName, propertyType),
- propertyType);
- BeanObservableListDecorator decorator = new BeanObservableListDecorator(
- observableList, master, getValueTypePropertyDescriptor(master,
- propertyName));
-
- return decorator;
- }
-
- /**
- * Helper method for
- * <code>MasterDetailObservables.detailSet(master, setFactory(realm,
- propertyName), propertyType)</code>
- *
- * @param realm
- * @param master
- * @param propertyName
- * @param propertyType
- * can be <code>null</code>
- * @return an observable set that tracks the named property for the current
- * value of the master observable value
- *
- * @see MasterDetailObservables
- */
- public static IObservableSet observeDetailSet(Realm realm,
- IObservableValue master, String propertyName, Class propertyType) {
-
- IObservableSet observableSet = MasterDetailObservables.detailSet(
- master, setFactory(realm, propertyName, propertyType),
- propertyType);
- BeanObservableSetDecorator decorator = new BeanObservableSetDecorator(
- observableSet, master, getValueTypePropertyDescriptor(master,
- propertyName));
-
- return decorator;
- }
-
- /**
- * @param realm
- * @param bean
- * @param propertyName
- * @param elementType
- * can be <code>null</code>
- * @return an observable set that tracks the current value of the named
- * property for given bean object
- */
- public static IObservableSet observeSet(Realm realm, Object bean,
- String propertyName, Class elementType) {
- PropertyDescriptor propertyDescriptor = getPropertyDescriptor(bean
- .getClass(), propertyName);
- elementType = getCollectionElementType(elementType, propertyDescriptor);
-
- return new JavaBeanObservableSet(realm, bean, propertyDescriptor,
- elementType);
- }
-
- /**
- * @param realm
- * @param propertyName
- * @param elementType
- * can be <code>null</code>
- * @return an observable set factory for creating observable sets
- */
- public static IObservableFactory setFactory(final Realm realm,
- final String propertyName, final Class elementType) {
- return new IObservableFactory() {
- public IObservable createObservable(Object target) {
- return observeSet(realm, target, propertyName, elementType);
- }
- };
- }
-
- /**
- * @param elementType
- * can be <code>null</code>
- * @param propertyDescriptor
- * @return type of the items in a collection/array property
- */
- private static Class getCollectionElementType(Class elementType,
- PropertyDescriptor propertyDescriptor) {
- if (elementType == null) {
- Class propertyType = propertyDescriptor.getPropertyType();
- elementType = propertyType.isArray() ? propertyType
- .getComponentType() : Object.class;
- }
-
- return elementType;
- }
-
- /**
- * @param observable
- * @param propertyName
- * @return property descriptor or <code>null</code>
- */
- private static PropertyDescriptor getValueTypePropertyDescriptor(
- IObservableValue observable, String propertyName) {
- return (observable.getValueType() != null) ? getPropertyDescriptor(
- (Class) observable.getValueType(), propertyName) : null;
- }
-}
diff --git a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/databinding/beans/IBeanObservable.java b/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/databinding/beans/IBeanObservable.java
deleted file mode 100644
index 0dd58033..00000000
--- a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/databinding/beans/IBeanObservable.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- * Brad Reynolds - bug 147515
- ******************************************************************************/
-
-package org.eclipse.core.databinding.beans;
-
-import java.beans.PropertyDescriptor;
-
-/**
- * Provides access to details of bean observables.
- * <p>
- * This interface is not meant to be implemented by clients.
- * </p>
- *
- * @since 3.3
- */
-public interface IBeanObservable {
- /**
- * @return property descriptor of the property being observed,
- * <code>null</code> if the runtime time information was not
- * provided on construction of the observable
- */
- public PropertyDescriptor getPropertyDescriptor();
-
- /**
- * @return instance being observed. This can be either a bean or an
- * observable (e.g. master detail).
- */
- public Object getObserved();
-}
diff --git a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/databinding/beans/package.html b/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/databinding/beans/package.html
deleted file mode 100644
index d720e2b4..00000000
--- a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/databinding/beans/package.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <meta name="GENERATOR" content="Mozilla/4.5 [en] (Win98; I) [Netscape]">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-To be written.
-<h2>
-Package Specification</h2>
-<p>
-This package provides classes that can be used to ...</p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/BeanObservableListDecorator.java b/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/BeanObservableListDecorator.java
deleted file mode 100644
index fdf1cdf4..00000000
--- a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/BeanObservableListDecorator.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding.internal.beans;
-
-import java.beans.PropertyDescriptor;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-
-import org.eclipse.core.databinding.beans.IBeanObservable;
-import org.eclipse.core.databinding.observable.IChangeListener;
-import org.eclipse.core.databinding.observable.IStaleListener;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.list.IListChangeListener;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-
-/**
- * {@link IBeanObservable} decorator for an {@link IObservableList}.
- *
- * @since 3.3
- */
-public class BeanObservableListDecorator implements IObservableList,
- IBeanObservable {
- private IObservableList delegate;
- private Object observed;
- private PropertyDescriptor propertyDescriptor;
-
- /**
- * @param delegate
- * @param observed
- * @param propertyDescriptor
- */
- public BeanObservableListDecorator(IObservableList delegate,
- Object observed, PropertyDescriptor propertyDescriptor) {
-
- this.delegate = delegate;
- this.observed = observed;
- this.propertyDescriptor = propertyDescriptor;
- }
-
- public void add(int index, Object element) {
- delegate.add(index, element);
- }
-
- public boolean add(Object o) {
- return delegate.add(o);
- }
-
- public boolean addAll(Collection c) {
- return delegate.addAll(c);
- }
-
- public boolean addAll(int index, Collection c) {
- return delegate.addAll(index, c);
- }
-
- public void addChangeListener(IChangeListener listener) {
- delegate.addChangeListener(listener);
- }
-
- public void addListChangeListener(IListChangeListener listener) {
- delegate.addListChangeListener(listener);
- }
-
- public void addStaleListener(IStaleListener listener) {
- delegate.addStaleListener(listener);
- }
-
- public void clear() {
- delegate.clear();
- }
-
- public boolean contains(Object o) {
- return delegate.contains(o);
- }
-
- public boolean containsAll(Collection c) {
- return delegate.containsAll(c);
- }
-
- public void dispose() {
- delegate.dispose();
- }
-
- public boolean equals(Object o) {
- return delegate.equals(o);
- }
-
- public Object get(int index) {
- return delegate.get(index);
- }
-
- public Object getElementType() {
- return delegate.getElementType();
- }
-
- public Realm getRealm() {
- return delegate.getRealm();
- }
-
- public int hashCode() {
- return delegate.hashCode();
- }
-
- public int indexOf(Object o) {
- return delegate.indexOf(o);
- }
-
- public boolean isEmpty() {
- return delegate.isEmpty();
- }
-
- public boolean isStale() {
- return delegate.isStale();
- }
-
- public Iterator iterator() {
- return delegate.iterator();
- }
-
- public int lastIndexOf(Object o) {
- return delegate.lastIndexOf(o);
- }
-
- public ListIterator listIterator() {
- return delegate.listIterator();
- }
-
- public ListIterator listIterator(int index) {
- return delegate.listIterator(index);
- }
-
- public Object remove(int index) {
- return delegate.remove(index);
- }
-
- public boolean remove(Object o) {
- return delegate.remove(o);
- }
-
- public boolean removeAll(Collection c) {
- return delegate.removeAll(c);
- }
-
- public void removeChangeListener(IChangeListener listener) {
- delegate.removeChangeListener(listener);
- }
-
- public void removeListChangeListener(IListChangeListener listener) {
- delegate.removeListChangeListener(listener);
- }
-
- public void removeStaleListener(IStaleListener listener) {
- delegate.removeStaleListener(listener);
- }
-
- public boolean retainAll(Collection c) {
- return delegate.retainAll(c);
- }
-
- public Object set(int index, Object element) {
- return delegate.set(index, element);
- }
-
- public int size() {
- return delegate.size();
- }
-
- public List subList(int fromIndex, int toIndex) {
- return delegate.subList(fromIndex, toIndex);
- }
-
- public Object[] toArray() {
- return delegate.toArray();
- }
-
- public Object[] toArray(Object[] a) {
- return delegate.toArray(a);
- }
-
- /**
- * @return list being delegated to
- */
- public IObservableList getDelegate() {
- return delegate;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.databinding.beans.IBeanObservable#getObserved()
- */
- public Object getObserved() {
- return observed;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.databinding.beans.IBeanObservable#getPropertyDescriptor()
- */
- public PropertyDescriptor getPropertyDescriptor() {
- return propertyDescriptor;
- }
-}
diff --git a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/BeanObservableSetDecorator.java b/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/BeanObservableSetDecorator.java
deleted file mode 100644
index 420b0782..00000000
--- a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/BeanObservableSetDecorator.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding.internal.beans;
-
-import java.beans.PropertyDescriptor;
-import java.util.Collection;
-import java.util.Iterator;
-
-import org.eclipse.core.databinding.beans.IBeanObservable;
-import org.eclipse.core.databinding.observable.IChangeListener;
-import org.eclipse.core.databinding.observable.IStaleListener;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.set.IObservableSet;
-import org.eclipse.core.databinding.observable.set.ISetChangeListener;
-
-/**
- * {@link IBeanObservable} decorator for an {@link IObservableSet}.
- *
- * @since 3.3
- */
-public class BeanObservableSetDecorator implements IObservableSet, IBeanObservable {
- private IObservableSet delegate;
- private Object observed;
- private PropertyDescriptor propertyDescriptor;
-
- /**
- * @param delegate
- * @param observed
- * @param propertyDescriptor
- */
- public BeanObservableSetDecorator(IObservableSet delegate,
- Object observed,
- PropertyDescriptor propertyDescriptor) {
-
- this.delegate = delegate;
- this.observed = observed;
- this.propertyDescriptor = propertyDescriptor;
- }
-
- public boolean add(Object o) {
- return delegate.add(o);
- }
-
- public boolean addAll(Collection c) {
- return delegate.addAll(c);
- }
-
- public void addChangeListener(IChangeListener listener) {
- delegate.addChangeListener(listener);
- }
-
- public void addSetChangeListener(ISetChangeListener listener) {
- delegate.addSetChangeListener(listener);
- }
-
- public void addStaleListener(IStaleListener listener) {
- delegate.addStaleListener(listener);
- }
-
- public void clear() {
- delegate.clear();
- }
-
- public boolean contains(Object o) {
- return delegate.contains(o);
- }
-
- public boolean containsAll(Collection c) {
- return delegate.containsAll(c);
- }
-
- public void dispose() {
- delegate.dispose();
- }
-
- public boolean equals(Object o) {
- return delegate.equals(o);
- }
-
- public Object getElementType() {
- return delegate.getElementType();
- }
-
- public Realm getRealm() {
- return delegate.getRealm();
- }
-
- public int hashCode() {
- return delegate.hashCode();
- }
-
- public boolean isEmpty() {
- return delegate.isEmpty();
- }
-
- public boolean isStale() {
- return delegate.isStale();
- }
-
- public Iterator iterator() {
- return delegate.iterator();
- }
-
- public boolean remove(Object o) {
- return delegate.remove(o);
- }
-
- public boolean removeAll(Collection c) {
- return delegate.removeAll(c);
- }
-
- public void removeChangeListener(IChangeListener listener) {
- delegate.removeChangeListener(listener);
- }
-
- public void removeSetChangeListener(ISetChangeListener listener) {
- delegate.removeSetChangeListener(listener);
- }
-
- public void removeStaleListener(IStaleListener listener) {
- delegate.removeStaleListener(listener);
- }
-
- public boolean retainAll(Collection c) {
- return delegate.retainAll(c);
- }
-
- public int size() {
- return delegate.size();
- }
-
- public Object[] toArray() {
- return delegate.toArray();
- }
-
- public Object[] toArray(Object[] a) {
- return delegate.toArray(a);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.databinding.beans.IBeanObservable#getObserved()
- */
- public Object getObserved() {
- return observed;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.databinding.beans.IBeanObservable#getPropertyDescriptor()
- */
- public PropertyDescriptor getPropertyDescriptor() {
- return propertyDescriptor;
- }
-
- /**
- * @return the wrapped set
- */
- public IObservableSet getDelegate() {
- return delegate;
- }
-}
diff --git a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/BeanObservableValueDecorator.java b/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/BeanObservableValueDecorator.java
deleted file mode 100644
index f58cb7fe..00000000
--- a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/BeanObservableValueDecorator.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding.internal.beans;
-
-import java.beans.PropertyDescriptor;
-
-import org.eclipse.core.databinding.beans.IBeanObservable;
-import org.eclipse.core.databinding.observable.IChangeListener;
-import org.eclipse.core.databinding.observable.IStaleListener;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.databinding.observable.value.IValueChangeListener;
-
-/**
- * {@link IBeanObservable} decorator for an {@link IObservableValue}.
- *
- * @since 3.3
- */
-public class BeanObservableValueDecorator implements IObservableValue,
- IBeanObservable {
- private final IObservableValue delegate;
- private final PropertyDescriptor descriptor;
- private final Object observed;
-
- /**
- * @param delegate
- * @param observed
- * @param descriptor
- */
- public BeanObservableValueDecorator(IObservableValue delegate, Object observed,
- PropertyDescriptor descriptor) {
- this.delegate = delegate;
- this.observed = observed;
- this.descriptor = descriptor;
- }
-
- public void addChangeListener(IChangeListener listener) {
- delegate.addChangeListener(listener);
- }
-
- public void addStaleListener(IStaleListener listener) {
- delegate.addStaleListener(listener);
- }
-
- public void addValueChangeListener(IValueChangeListener listener) {
- delegate.addValueChangeListener(listener);
- }
-
- public void dispose() {
- delegate.dispose();
- }
-
- public boolean equals(Object obj) {
- return delegate.equals(obj);
- }
-
- public Realm getRealm() {
- return delegate.getRealm();
- }
-
- public Object getValue() {
- return delegate.getValue();
- }
-
- public Object getValueType() {
- return delegate.getValueType();
- }
-
- public int hashCode() {
- return delegate.hashCode();
- }
-
- public boolean isStale() {
- return delegate.isStale();
- }
-
- public void removeChangeListener(IChangeListener listener) {
- delegate.removeChangeListener(listener);
- }
-
- public void removeStaleListener(IStaleListener listener) {
- delegate.removeStaleListener(listener);
- }
-
- public void removeValueChangeListener(IValueChangeListener listener) {
- delegate.removeValueChangeListener(listener);
- }
-
- public void setValue(Object value) {
- delegate.setValue(value);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.databinding.beans.IBeanObservable#getObserved()
- */
- public Object getObserved() {
- return observed;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.databinding.beans.IBeanObservable#getPropertyDescriptor()
- */
- public PropertyDescriptor getPropertyDescriptor() {
- return descriptor;
- }
-
- /**
- * @return observable value delegate
- */
- public IObservableValue getDelegate() {
- return delegate;
- }
-}
diff --git a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/IdentityWrapper.java b/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/IdentityWrapper.java
deleted file mode 100644
index 491f9edb..00000000
--- a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/IdentityWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Daniel Kruegler - bug 137435
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding.internal.beans;
-
-/**
- * Used for wrapping objects that define their own implementations of equals()
- * and hashCode() when putting them in sets or hashmaps to ensure identity
- * comparison.
- *
- * @since 1.0
- *
- */
-public class IdentityWrapper {
- final Object o;
-
- /**
- * @param o
- */
- public IdentityWrapper(Object o) {
- this.o = o;
- }
-
- /**
- * @return the unwrapped object
- */
- public Object unwrap() {
- return o;
- }
-
- public boolean equals(Object obj) {
- if (obj == null || obj.getClass() != IdentityWrapper.class) {
- return false;
- }
- return o == ((IdentityWrapper) obj).o;
- }
-
- public int hashCode() {
- return System.identityHashCode(o);
- }
-}
diff --git a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/JavaBeanObservableList.java b/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/JavaBeanObservableList.java
deleted file mode 100644
index 47a0f006..00000000
--- a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/JavaBeanObservableList.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 171616
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding.internal.beans;
-
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyDescriptor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-
-import org.eclipse.core.databinding.beans.IBeanObservable;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.list.ObservableList;
-import org.eclipse.core.runtime.Assert;
-
-/**
- * @since 1.0
- *
- */
-public class JavaBeanObservableList extends ObservableList implements IBeanObservable {
-
- private final Object object;
-
- private PropertyChangeListener collectionListener = new PropertyChangeListener() {
- public void propertyChange(java.beans.PropertyChangeEvent event) {
- if (!updating) {
- if (JavaBeanObservableList.this.descriptor.getName().equals(
- event.getPropertyName())) {
- updateWrappedList(Arrays.asList(getValues()));
- }
- }
- }
- };
-
- private boolean updating = false;
-
- private PropertyDescriptor descriptor;
-
- private ListenerSupport collectionListenSupport = new ListenerSupport(
- collectionListener);
-
- /**
- * @param realm
- * @param object
- * @param descriptor
- * @param elementType
- */
- public JavaBeanObservableList(Realm realm, Object object, PropertyDescriptor descriptor,
- Class elementType) {
- super(realm, new ArrayList(), elementType);
- this.object = object;
- this.descriptor = descriptor;
- // initialize list without firing events
- wrappedList.addAll(Arrays.asList(getValues()));
- }
-
- protected void firstListenerAdded() {
- collectionListenSupport.hookListener(this.object);
- }
-
- protected void lastListenerRemoved() {
- if (collectionListenSupport != null) {
- collectionListenSupport.dispose();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.databinding.observable.list.ObservableList#dispose()
- */
- public void dispose() {
- super.dispose();
- lastListenerRemoved();
- }
-
- private Object primGetValues() {
- try {
- Method readMethod = descriptor.getReadMethod();
- if (!readMethod.isAccessible()) {
- readMethod.setAccessible(true);
- }
- return readMethod.invoke(object, new Object[0]);
- } catch (IllegalArgumentException e) {
- } catch (IllegalAccessException e) {
- } catch (InvocationTargetException e) {
- }
- Assert.isTrue(false, "Could not read collection values"); //$NON-NLS-1$
- return null;
- }
-
- private Object[] getValues() {
- Object[] values = null;
-
- Object result = primGetValues();
- if (descriptor.getPropertyType().isArray())
- values = (Object[]) result;
- else {
- // TODO add jUnit for POJO (var. SettableValue) collections
- Collection list = (Collection) result;
- if (list != null) {
- values = list.toArray();
- } else {
- values = new Object[] {};
- }
- }
- return values;
- }
- /* (non-Javadoc)
- * @see org.eclipse.core.databinding.beans.IBeanObservable#getObserved()
- */
- public Object getObserved() {
- return object;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.databinding.beans.IBeanObservable#getPropertyDescriptor()
- */
- public PropertyDescriptor getPropertyDescriptor() {
- return descriptor;
- }
-}
-
diff --git a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/JavaBeanObservableMap.java b/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/JavaBeanObservableMap.java
deleted file mode 100644
index 606f9cd5..00000000
--- a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/JavaBeanObservableMap.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 171616
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding.internal.beans;
-
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyDescriptor;
-import java.lang.reflect.Method;
-
-import org.eclipse.core.databinding.beans.IBeanObservable;
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.map.ComputedObservableMap;
-import org.eclipse.core.databinding.observable.set.IObservableSet;
-import org.eclipse.core.databinding.util.Policy;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-/**
- * @since 1.0
- *
- */
-public class JavaBeanObservableMap extends ComputedObservableMap implements IBeanObservable {
-
- private PropertyDescriptor propertyDescriptor;
-
- private PropertyChangeListener elementListener = new PropertyChangeListener() {
- public void propertyChange(final java.beans.PropertyChangeEvent event) {
- if (!updating) {
- if (propertyDescriptor.getName()
- .equals(event.getPropertyName())) {
- fireMapChange(Diffs.createMapDiffSingleChange(event
- .getSource(), event.getOldValue(), event
- .getNewValue()));
- }
- }
- }
- };
-
- private ListenerSupport listenerSupport = new ListenerSupport(
- elementListener);
-
- private boolean updating = false;
-
- /**
- * @param domain
- * @param propertyDescriptor
- */
- public JavaBeanObservableMap(IObservableSet domain,
- PropertyDescriptor propertyDescriptor) {
- super(domain);
-
- this.propertyDescriptor = propertyDescriptor;
- init();
- }
-
- protected void hookListener(Object domainElement) {
- listenerSupport.hookListener(domainElement);
- }
-
- protected void unhookListener(Object domainElement) {
- listenerSupport.unhookListener(domainElement);
- }
-
- protected Object doGet(Object key) {
- try {
- Method readMethod = propertyDescriptor.getReadMethod();
- if (!readMethod.isAccessible()) {
- readMethod.setAccessible(true);
- }
- return readMethod.invoke(key, new Object[0]);
- } catch (Exception e) {
- Policy.getLog().log(
- new Status(IStatus.ERROR, Policy.JFACE_DATABINDING,
- IStatus.ERROR, "cannot get value", e)); //$NON-NLS-1$
- throw new RuntimeException(e);
- }
- }
-
- protected Object doPut(Object key, Object value) {
- try {
- Object oldValue = get(key);
- propertyDescriptor.getWriteMethod().invoke(key,
- new Object[] { value });
- keySet().add(key);
- return oldValue;
- } catch (Exception e) {
- Policy.getLog().log(
- new Status(IStatus.ERROR, Policy.JFACE_DATABINDING,
- IStatus.ERROR, "cannot set value", e)); //$NON-NLS-1$
- throw new RuntimeException(e);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.databinding.beans.IBeanObservable#getObserved()
- */
- public Object getObserved() {
- return keySet();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.databinding.beans.IBeanObservable#getPropertyDescriptor()
- */
- public PropertyDescriptor getPropertyDescriptor() {
- return propertyDescriptor;
- }
-}
diff --git a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/JavaBeanObservableSet.java b/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/JavaBeanObservableSet.java
deleted file mode 100644
index 01c8a402..00000000
--- a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/JavaBeanObservableSet.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 171616
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding.internal.beans;
-
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyDescriptor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.databinding.beans.IBeanObservable;
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.set.ObservableSet;
-import org.eclipse.core.runtime.Assert;
-
-/**
- * @since 1.0
- *
- */
-public class JavaBeanObservableSet extends ObservableSet implements IBeanObservable {
-
- private final Object object;
-
- private PropertyChangeListener collectionListener = new PropertyChangeListener() {
- public void propertyChange(java.beans.PropertyChangeEvent event) {
- if (!updating) {
- if (JavaBeanObservableSet.this.descriptor.getName().equals(
- event.getPropertyName())) {
- Set newElements = new HashSet(Arrays.asList(getValues()));
- Set addedElements = new HashSet(newElements);
- Set removedElements = new HashSet(wrappedSet);
- // remove all new elements from old elements to compute the
- // removed elements
- removedElements.removeAll(newElements);
- addedElements.removeAll(wrappedSet);
- wrappedSet = newElements;
- fireSetChange(Diffs.createSetDiff(addedElements,
- removedElements));
- }
- }
- }
- };
-
- private boolean updating = false;
-
- private PropertyDescriptor descriptor;
-
- private ListenerSupport collectionListenSupport = new ListenerSupport(
- collectionListener);
-
- /**
- * @param realm
- * @param object
- * @param descriptor
- * @param elementType
- */
- public JavaBeanObservableSet(Realm realm, Object object, PropertyDescriptor descriptor,
- Class elementType) {
- super(realm, new HashSet(), elementType);
- this.object = object;
- this.descriptor = descriptor;
- wrappedSet.addAll(Arrays.asList(getValues()));
- }
-
- protected void firstListenerAdded() {
- collectionListenSupport.hookListener(this.object);
- }
-
- protected void lastListenerRemoved() {
- if (collectionListenSupport != null) {
- collectionListenSupport.dispose();
- }
- }
-
- private Object primGetValues() {
- try {
- Method readMethod = descriptor.getReadMethod();
- if (!readMethod.isAccessible()) {
- readMethod.setAccessible(true);
- }
- return readMethod.invoke(object, new Object[0]);
- } catch (IllegalArgumentException e) {
- } catch (IllegalAccessException e) {
- } catch (InvocationTargetException e) {
- }
- Assert.isTrue(false, "Could not read collection values"); //$NON-NLS-1$
- return null;
- }
-
- private Object[] getValues() {
- Object[] values = null;
-
- Object result = primGetValues();
- if (descriptor.getPropertyType().isArray())
- values = (Object[]) result;
- else {
- // TODO add jUnit for POJO (var. SettableValue) collections
- Collection list = (Collection) result;
- if (list != null) {
- values = list.toArray();
- } else {
- values = new Object[] {};
- }
- }
- return values;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.databinding.beans.IBeanObservable#getObserved()
- */
- public Object getObserved() {
- return object;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.databinding.beans.IBeanObservable#getPropertyDescriptor()
- */
- public PropertyDescriptor getPropertyDescriptor() {
- return descriptor;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/JavaBeanObservableValue.java b/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/JavaBeanObservableValue.java
deleted file mode 100644
index 7bf4993d..00000000
--- a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/JavaBeanObservableValue.java
+++ /dev/null
@@ -1,277 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164653
- * Brad Reynolds - bug 164134, 171616
- *******************************************************************************/
-package org.eclipse.core.internal.databinding.internal.beans;
-
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyDescriptor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-import org.eclipse.core.databinding.BindingException;
-import org.eclipse.core.databinding.beans.BeansObservables;
-import org.eclipse.core.databinding.beans.IBeanObservable;
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.value.AbstractObservableValue;
-import org.eclipse.core.databinding.observable.value.ValueDiff;
-import org.eclipse.core.databinding.util.Policy;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-/**
- * @since 1.0
- *
- */
-public class JavaBeanObservableValue extends AbstractObservableValue implements IBeanObservable {
- private final Object object;
-
- private PropertyChangeListener listener;
-
- private boolean updating = false;
-
- private final PropertyDescriptor propertyDescriptor;
- private final Class overrideType;
-
- /**
- * @param realm
- * @param object
- * @param descriptor
- * @param overrideType
- */
- public JavaBeanObservableValue(Realm realm, Object object,
- PropertyDescriptor descriptor, Class overrideType) {
- super(realm);
- this.object = object;
- this.propertyDescriptor = descriptor;
- this.overrideType = overrideType;
- }
-
- protected void firstListenerAdded() {
- listener = new PropertyChangeListener() {
- public void propertyChange(java.beans.PropertyChangeEvent event) {
- if (!updating
- && event.getPropertyName().equals(
- propertyDescriptor.getName())) {
- final ValueDiff diff = Diffs.createValueDiff(event.getOldValue(),
- event.getNewValue());
- getRealm().exec(new Runnable(){
- public void run() {
- fireValueChange(diff);
- }});
- }
- }
- };
- Method addPropertyChangeListenerMethod = null;
- try {
- addPropertyChangeListenerMethod = object.getClass().getMethod(
- "addPropertyChangeListener", //$NON-NLS-1$
- new Class[] { String.class, PropertyChangeListener.class });
- } catch (SecurityException e) {
- // ignore
- } catch (NoSuchMethodException e) {
- // ignore
- }
- if (addPropertyChangeListenerMethod != null) {
- try {
- addPropertyChangeListenerMethod.invoke(object, new Object[] {
- propertyDescriptor.getName(), listener });
- return;
- } catch (IllegalArgumentException e) {
- if (BeansObservables.DEBUG) {
- Policy
- .getLog()
- .log(
- new Status(
- IStatus.WARNING,
- Policy.JFACE_DATABINDING,
- IStatus.OK,
- "Could not attach listener to " + object, e)); //$NON-NLS-1$
- }
- } catch (IllegalAccessException e) {
- if (BeansObservables.DEBUG) {
- Policy
- .getLog()
- .log(
- new Status(
- IStatus.WARNING,
- Policy.JFACE_DATABINDING,
- IStatus.OK,
- "Could not attach listener to " + object, e)); //$NON-NLS-1$
- }
- } catch (InvocationTargetException e) {
- if (BeansObservables.DEBUG) {
- Policy
- .getLog()
- .log(
- new Status(
- IStatus.WARNING,
- Policy.JFACE_DATABINDING,
- IStatus.OK,
- "Could not attach listener to " + object, e)); //$NON-NLS-1$
- }
- }
- }
- // set listener to null because we are not listening
- listener = null;
- }
-
- public void doSetValue(Object value) {
- updating = true;
- try {
- Object oldValue = doGetValue();
- Method writeMethod = propertyDescriptor.getWriteMethod();
- if (!writeMethod.isAccessible()) {
- writeMethod.setAccessible(true);
- }
- writeMethod.invoke(object, new Object[] { value });
- fireValueChange(Diffs.createValueDiff(oldValue, doGetValue()));
- } catch (Exception e) {
- if (BeansObservables.DEBUG) {
- Policy
- .getLog()
- .log(
- new Status(
- IStatus.WARNING,
- Policy.JFACE_DATABINDING,
- IStatus.OK,
- "Could not change value of " + object + "." + propertyDescriptor.getName(), e)); //$NON-NLS-1$ //$NON-NLS-2$
- }
- } finally {
- updating = false;
- }
- }
-
- public Object doGetValue() {
- try {
- Method readMethod = propertyDescriptor.getReadMethod();
- if (readMethod == null) {
- throw new BindingException(propertyDescriptor.getName()
- + " property does not have a read method."); //$NON-NLS-1$
- }
- if (!readMethod.isAccessible()) {
- readMethod.setAccessible(true);
- }
- return readMethod.invoke(object, null);
- } catch (Exception e) {
- if (BeansObservables.DEBUG) {
- Policy
- .getLog()
- .log(
- new Status(
- IStatus.WARNING,
- Policy.JFACE_DATABINDING,
- IStatus.OK,
- "Could not read value of " + object + "." + propertyDescriptor.getName(), e)); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return null;
- }
- }
-
- protected void lastListenerRemoved() {
- if (listener != null) {
- Method removePropertyChangeListenerMethod = null;
- try {
- removePropertyChangeListenerMethod = object.getClass()
- .getMethod(
- "removePropertyChangeListener", //$NON-NLS-1$
- new Class[] { String.class,
- PropertyChangeListener.class });
- } catch (SecurityException e) {
- if (BeansObservables.DEBUG) {
- Policy
- .getLog()
- .log(
- new Status(
- IStatus.WARNING,
- Policy.JFACE_DATABINDING,
- IStatus.OK,
- "Could not remove listener from " + object, e)); //$NON-NLS-1$
- }
- } catch (NoSuchMethodException e) {
- if (BeansObservables.DEBUG) {
- Policy
- .getLog()
- .log(
- new Status(
- IStatus.WARNING,
- Policy.JFACE_DATABINDING,
- IStatus.OK,
- "Could not remove listener from " + object, e)); //$NON-NLS-1$
- }
- }
- if (removePropertyChangeListenerMethod != null) {
- try {
- removePropertyChangeListenerMethod.invoke(object,
- new Object[] { propertyDescriptor.getName(),
- listener });
- } catch (IllegalArgumentException e) {
- if (BeansObservables.DEBUG) {
- Policy
- .getLog()
- .log(
- new Status(
- IStatus.WARNING,
- Policy.JFACE_DATABINDING,
- IStatus.OK,
- "Could not remove listener from " + object, e)); //$NON-NLS-1$
- }
- } catch (IllegalAccessException e) {
- if (BeansObservables.DEBUG) {
- Policy
- .getLog()
- .log(
- new Status(
- IStatus.WARNING,
- Policy.JFACE_DATABINDING,
- IStatus.OK,
- "Could not remove listener from " + object, e)); //$NON-NLS-1$
- }
- } catch (InvocationTargetException e) {
- if (BeansObservables.DEBUG) {
- Policy
- .getLog()
- .log(
- new Status(
- IStatus.WARNING,
- Policy.JFACE_DATABINDING,
- IStatus.OK,
- "Could not remove listener from " + object, e)); //$NON-NLS-1$
- }
- }
- }
- // set listener to null because we are no longer listening
- listener = null;
- }
- }
-
- public Object getValueType() {
- Class type = propertyDescriptor.getPropertyType();
- if (type == Object.class && overrideType != null)
- type = overrideType;
- return type;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.databinding.beans.IBeanObservable#getObserved()
- */
- public Object getObserved() {
- return object;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.databinding.beans.IBeanObservable#getPropertyDescriptor()
- */
- public PropertyDescriptor getPropertyDescriptor() {
- return propertyDescriptor;
- }
-}
diff --git a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/ListenerSupport.java b/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/ListenerSupport.java
deleted file mode 100644
index 652c5b48..00000000
--- a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/ListenerSupport.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.databinding.internal.beans;
-
-import java.beans.PropertyChangeListener;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-
-/**
- * This is a helper that will hook up and listen for <code>PropertyChangeEvent</code> events
- * for a set of target JavaBeans
- *
- * @since 1.0
- */
-public class ListenerSupport {
-
- private Set elementsListenedTo = new HashSet();
-
- private PropertyChangeListener listener;
-
- /**
- * @param listener is the callback that will be called
- * when a <code>PropertyChangeEvent</code> is fired on any
- * of the target objects.
- */
- public ListenerSupport (PropertyChangeListener listener) {
- this.listener=listener;
- }
-
-
- /**
- * Start listen to target (if it supports the JavaBean property change listener pattern)
- *
- * @param target
- */
- public void hookListener(Object target) {
- Method addPropertyChangeListenerMethod = null;
- try {
- addPropertyChangeListenerMethod = target.getClass().getMethod(
- "addPropertyChangeListener", //$NON-NLS-1$
- new Class[] { PropertyChangeListener.class });
- } catch (SecurityException e) {
- // ignore
- } catch (NoSuchMethodException e) {
- // ignore
- }
- if (addPropertyChangeListenerMethod != null) {
- try {
- if (!addPropertyChangeListenerMethod.isAccessible()) {
- addPropertyChangeListenerMethod.setAccessible(true);
- }
- addPropertyChangeListenerMethod.invoke(target,
- new Object[] { listener });
- elementsListenedTo.add(new IdentityWrapper(target));
- return;
- } catch (IllegalArgumentException e) {
- // ignore
- } catch (IllegalAccessException e) {
- // ignore
- } catch (InvocationTargetException e) {
- // ignore
- }
- }
- }
-
- /**
- * Add listeners for new targets (those this instance of<code>ListenerSupport</code> does not
- * already listen to),
- * Stop to listen to those object that this instance listen to and is one of the object in targets
- *
- * @param targets
- */
- public void setHookTargets(Object[] targets) {
- Set elementsToUnhook = new HashSet(elementsListenedTo);
- if (targets!=null) {
- for (int i = 0; i < targets.length; i++) {
- Object newValue = targets[i];
- IdentityWrapper identityWrapper = new IdentityWrapper(newValue);
- if(!elementsToUnhook.remove(identityWrapper))
- hookListener(newValue);
- }
- }
-
- for (Iterator it = elementsToUnhook.iterator(); it.hasNext();) {
- Object o = it.next();
- if (o.getClass()!=IdentityWrapper.class)
- o = new IdentityWrapper(o);
- elementsListenedTo.remove(o);
- unhookListener(o);
- }
- }
-
- /**
- * Stop listen to target
- *
- * @param target
- */
- public void unhookListener(Object target) {
- if (target.getClass()==IdentityWrapper.class)
- target = ((IdentityWrapper)target).unwrap();
-
- Method removePropertyChangeListenerMethod = null;
- try {
- removePropertyChangeListenerMethod = target.getClass().getMethod(
- "removePropertyChangeListener", //$NON-NLS-1$
- new Class[] { PropertyChangeListener.class });
- } catch (SecurityException e) {
- // ignore
- } catch (NoSuchMethodException e) {
- // ignore
- }
- if (removePropertyChangeListenerMethod != null) {
- try {
- removePropertyChangeListenerMethod.invoke(target,
- new Object[] { listener });
- elementsListenedTo.remove(new IdentityWrapper(target));
- return;
- } catch (IllegalArgumentException e) {
- // ignore
- } catch (IllegalAccessException e) {
- // ignore
- } catch (InvocationTargetException e) {
- // ignore
- }
- }
- }
-
-
- /**
- *
- */
- public void dispose() {
- if (elementsListenedTo!=null) {
- Object[] targets = elementsListenedTo.toArray();
- for (int i = 0; i < targets.length; i++) {
- unhookListener(targets[i]);
- }
- elementsListenedTo=null;
- listener=null;
- }
- }
-
- /**
- * @return elements that were registred to
- */
- public Object[] getHookedTargets() {
- Object[] targets = null;
- if (elementsListenedTo!=null && elementsListenedTo.size()>0) {
- Object[] identityList = elementsListenedTo.toArray();
- targets = new Object[identityList.length];
- for (int i = 0; i < identityList.length; i++)
- targets[i]=((IdentityWrapper)identityList[i]).unwrap();
- }
- return targets;
- }
-}
diff --git a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/package.html b/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/package.html
deleted file mode 100644
index d720e2b4..00000000
--- a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/package.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <meta name="GENERATOR" content="Mozilla/4.5 [en] (Win98; I) [Netscape]">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-To be written.
-<h2>
-Package Specification</h2>
-<p>
-This package provides classes that can be used to ...</p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/AbstractObservable.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/AbstractObservable.java
deleted file mode 100644
index d2cbcb2c..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/AbstractObservable.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164653
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.AssertionFailedException;
-
-/**
- * @since 1.0
- */
-public abstract class AbstractObservable extends ChangeManager implements IObservable {
-
- /**
- * @param realm
- */
- public AbstractObservable(Realm realm) {
- super(realm);
- }
-
- public synchronized void addChangeListener(IChangeListener listener) {
- addListener(ChangeEvent.TYPE, listener);
- }
-
- public synchronized void removeChangeListener(IChangeListener listener) {
- removeListener(ChangeEvent.TYPE, listener);
- }
-
- public synchronized void addStaleListener(IStaleListener listener) {
- addListener(StaleEvent.TYPE, listener);
- }
-
- public synchronized void removeStaleListener(IStaleListener listener) {
- removeListener(StaleEvent.TYPE, listener);
- }
-
- protected void fireChange() {
- checkRealm();
- fireEvent(new ChangeEvent(this));
- }
-
- protected void fireStale() {
- checkRealm();
- fireEvent(new StaleEvent(this));
- }
-
- /**
- *
- */
- public synchronized void dispose() {
- super.dispose();
- }
-
- /**
- * Asserts that the realm is the current realm.
- *
- * @see Realm#isCurrent()
- * @throws AssertionFailedException if the realm is not the current realm
- */
- protected void checkRealm() {
- Assert.isTrue(getRealm().isCurrent());
- }
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/ChangeEvent.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/ChangeEvent.java
deleted file mode 100644
index 8a07cdb6..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/ChangeEvent.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable;
-
-/**
- * @since 3.3
- *
- */
-public class ChangeEvent extends ObservableEvent {
-
- /**
- *
- */
- private static final long serialVersionUID = -3241193109844979384L;
- static final Object TYPE = new Object();
-
- /**
- * @param source
- */
- public ChangeEvent(IObservable source) {
- super(source);
- }
-
- protected void dispatch(IObservablesListener listener) {
- ((IChangeListener) listener).handleChange(this);
- }
-
- protected Object getListenerType() {
- return TYPE;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/ChangeManager.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/ChangeManager.java
deleted file mode 100644
index 2a88f43c..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/ChangeManager.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.ListenerList;
-
-/**
- * Listener management implementation. Exposed to subclasses in form of
- * {@link AbstractObservable} and {@link ChangeSupport}.
- *
- * @since 1.0
- *
- */
-/* package */ class ChangeManager {
-
- ListenerList[] listenerLists = null;
- Object listenerTypes[] = null;
- private Realm realm;
-
- /**
- * @param realm
- *
- */
- /* package */ ChangeManager(Realm realm) {
- Assert.isNotNull(realm);
- this.realm = realm;
- }
-
- /**
- * @param listenerType
- * @param listener
- */
- protected void addListener(Object listenerType,
- IObservablesListener listener) {
- int listenerTypeIndex = findListenerTypeIndex(listenerType);
- if (listenerTypeIndex == -1) {
- int length;
- if (listenerTypes == null) {
- length = 0;
- listenerTypes = new Object[1];
- listenerLists = new ListenerList[1];
- } else {
- length = listenerTypes.length;
- System.arraycopy(listenerTypes, 0,
- listenerTypes = new Object[length + 1], 0, length);
- System
- .arraycopy(listenerLists, 0,
- listenerLists = new ListenerList[length + 1],
- 0, length);
- }
- listenerTypes[length] = listenerType;
- listenerLists[length] = new ListenerList();
- listenerLists[length].add(listener);
- if (length == 0) {
- this.firstListenerAdded();
- }
- return;
- }
- listenerLists[listenerTypeIndex].add(listener);
- }
-
- /**
- * @param listenerType
- * @param listener
- */
- protected void removeListener(Object listenerType,
- IObservablesListener listener) {
- int listenerTypeIndex = findListenerTypeIndex(listenerType);
- if (listenerTypeIndex != -1) {
- listenerLists[listenerTypeIndex].remove(listener);
- if (listenerLists[listenerTypeIndex].size() == 0) {
- if (!hasListeners()) {
- this.lastListenerRemoved();
- }
- }
- }
- }
-
- protected boolean hasListeners() {
- if (listenerTypes == null) {
- return false;
- }
- for (int i = 0; i < listenerTypes.length; i++) {
- if (listenerLists[i].size() > 0) {
- return true;
- }
- }
- return false;
- }
-
- private int findListenerTypeIndex(Object listenerType) {
- if (listenerTypes != null) {
- for (int i = 0; i < listenerTypes.length; i++) {
- if (listenerTypes[i] == listenerType) {
- return i;
- }
- }
- }
- return -1;
- }
-
- protected void fireEvent(ObservableEvent event) {
- Object listenerType = event.getListenerType();
- int listenerTypeIndex = findListenerTypeIndex(listenerType);
- if (listenerTypeIndex != -1) {
- Object[] listeners = listenerLists[listenerTypeIndex]
- .getListeners();
- for (int i = 0; i < listeners.length; i++) {
- event.dispatch((IObservablesListener) listeners[i]);
- }
- }
- }
-
- /**
- *
- */
- protected void firstListenerAdded() {
- }
-
- /**
- *
- */
- protected void lastListenerRemoved() {
- }
-
- /**
- *
- */
- public void dispose() {
- listenerLists = null;
- listenerTypes = null;
- realm = null;
- }
-
- /**
- * @return Returns the realm.
- */
- public Realm getRealm() {
- return realm;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/ChangeSupport.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/ChangeSupport.java
deleted file mode 100644
index f00dfbdc..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/ChangeSupport.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable;
-
-/**
- * @since 1.0
- *
- */
-public abstract class ChangeSupport extends ChangeManager {
-
- /**
- * @param realm
- */
- public ChangeSupport(Realm realm) {
- super(realm);
- }
-
- public void addListener(Object listenerType,
- IObservablesListener listener) {
- super.addListener(listenerType, listener);
- }
-
- public void removeListener(Object listenerType,
- IObservablesListener listener) {
- super.removeListener(listenerType, listener);
- }
-
- public void fireEvent(ObservableEvent event) {
- super.fireEvent(event);
- }
-
- /**
- *
- */
- protected abstract void firstListenerAdded();
-
- /**
- *
- */
- protected abstract void lastListenerRemoved();
-
- /**
- * @param listener
- */
- public void addChangeListener(IChangeListener listener) {
- addListener(ChangeEvent.TYPE, listener);
- }
-
- /**
- * @param listener
- */
- public void removeChangeListener(IChangeListener listener) {
- removeListener(ChangeEvent.TYPE, listener);
- }
-
- /**
- * @param listener
- */
- public void addStaleListener(IStaleListener listener) {
- addListener(StaleEvent.TYPE, listener);
- }
-
- /**
- * @param listener
- */
- public void removeStaleListener(IStaleListener listener) {
- removeListener(StaleEvent.TYPE, listener);
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/Diffs.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/Diffs.java
deleted file mode 100644
index b4132fd9..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/Diffs.java
+++ /dev/null
@@ -1,397 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.list.ListDiff;
-import org.eclipse.core.databinding.observable.list.ListDiffEntry;
-import org.eclipse.core.databinding.observable.map.MapDiff;
-import org.eclipse.core.databinding.observable.set.SetDiff;
-import org.eclipse.core.databinding.observable.value.ValueDiff;
-import org.eclipse.core.internal.databinding.Util;
-
-/**
- * @since 1.0
- *
- */
-public class Diffs {
-
- /**
- * @param oldList
- * @param newList
- * @return the differences between oldList and newList
- */
- public static ListDiff computeListDiff(List oldList, List newList) {
- List diffEntries = new ArrayList();
- for (Iterator it = oldList.iterator(); it.hasNext();) {
- Object oldElement = it.next();
- diffEntries.add(createListDiffEntry(0, false, oldElement));
- }
- int i = 0;
- for (Iterator it = newList.iterator(); it.hasNext();) {
- Object newElement = it.next();
- diffEntries.add(createListDiffEntry(i++, true, newElement));
- }
- ListDiff listDiff = createListDiff((ListDiffEntry[]) diffEntries
- .toArray(new ListDiffEntry[diffEntries.size()]));
- return listDiff;
- }
-
- /**
- * Checks whether the two objects are <code>null</code> -- allowing for
- * <code>null</code>.
- *
- * @param left
- * The left object to compare; may be <code>null</code>.
- * @param right
- * The right object to compare; may be <code>null</code>.
- * @return <code>true</code> if the two objects are equivalent;
- * <code>false</code> otherwise.
- */
- public static final boolean equals(final Object left, final Object right) {
- return left == null ? right == null : ((right != null) && left
- .equals(right));
- }
-
- /**
- * @param oldSet
- * @param newSet
- * @return a set diff
- */
- public static SetDiff computeSetDiff(Set oldSet, Set newSet) {
- Set additions = new HashSet(newSet);
- additions.removeAll(oldSet);
- Set removals = new HashSet(oldSet);
- removals.removeAll(newSet);
- return createSetDiff(additions, removals);
- }
-
- /**
- * Computes the difference between two maps.
- *
- * @param oldMap
- * @param newMap
- * @return a map diff representing the changes needed to turn oldMap into
- * newMap
- */
- public static MapDiff computeMapDiff(Map oldMap, Map newMap) {
- // starts out with all keys from the new map, we will remove keys from
- // the old map as we go
- final Set addedKeys = new HashSet(newMap.keySet());
- final Set removedKeys = new HashSet();
- final Set changedKeys = new HashSet();
- final Map oldValues = new HashMap();
- final Map newValues = new HashMap();
- for (Iterator it = oldMap.keySet().iterator(); it.hasNext();) {
- Object oldKey = it.next();
- if (addedKeys.remove(oldKey)) {
- // potentially changed key since it is in oldMap and newMap
- Object oldValue = oldMap.get(oldKey);
- Object newValue = newMap.get(oldKey);
- if (!Util.equals(oldValue, newValue)) {
- changedKeys.add(oldKey);
- oldValues.put(oldKey, oldValue);
- newValues.put(oldKey, newValue);
- }
- } else {
- removedKeys.add(oldKey);
- oldValues.put(oldKey, oldMap.get(oldKey));
- }
- }
- for (Iterator it = addedKeys.iterator(); it.hasNext();) {
- Object newKey = it.next();
- newValues.put(newKey, newMap.get(newKey));
- }
- return new MapDiff() {
- public Set getAddedKeys() {
- return addedKeys;
- }
-
- public Set getChangedKeys() {
- return changedKeys;
- }
-
- public Set getRemovedKeys() {
- return removedKeys;
- }
-
- public Object getNewValue(Object key) {
- return newValues.get(key);
- }
-
- public Object getOldValue(Object key) {
- return oldValues.get(key);
- }
- };
- }
-
- /**
- * @param oldValue
- * @param newValue
- * @return a value diff
- */
- public static ValueDiff createValueDiff(final Object oldValue,
- final Object newValue) {
- return new ValueDiff() {
-
- public Object getOldValue() {
- return oldValue;
- }
-
- public Object getNewValue() {
- return newValue;
- }
- };
- }
-
- /**
- * @param additions
- * @param removals
- * @return a set diff
- */
- public static SetDiff createSetDiff(Set additions, Set removals) {
- final Set unmodifiableAdditions = Collections
- .unmodifiableSet(additions);
- final Set unmodifiableRemovals = Collections.unmodifiableSet(removals);
- return new SetDiff() {
-
- public Set getAdditions() {
- return unmodifiableAdditions;
- }
-
- public Set getRemovals() {
- return unmodifiableRemovals;
- }
- };
- }
-
- /**
- * @param difference
- * @return a list diff with one differing entry
- */
- public static ListDiff createListDiff(ListDiffEntry difference) {
- return createListDiff(new ListDiffEntry[] { difference });
- }
-
- /**
- * @param difference1
- * @param difference2
- * @return a list diff with two differing entries
- */
- public static ListDiff createListDiff(ListDiffEntry difference1,
- ListDiffEntry difference2) {
- return createListDiff(new ListDiffEntry[] { difference1, difference2 });
- }
-
- /**
- * @param differences
- * @return a list diff with the given entries
- */
- public static ListDiff createListDiff(final ListDiffEntry[] differences) {
- return new ListDiff() {
- public ListDiffEntry[] getDifferences() {
- return differences;
- }
- };
- }
-
- /**
- * @param position
- * @param isAddition
- * @param element
- * @return a list diff entry
- */
- public static ListDiffEntry createListDiffEntry(final int position,
- final boolean isAddition, final Object element) {
- return new ListDiffEntry() {
-
- public int getPosition() {
- return position;
- }
-
- public boolean isAddition() {
- return isAddition;
- }
-
- public Object getElement() {
- return element;
- }
- };
- }
-
- /**
- * @param addedKey
- * @param newValue
- * @return a map diff
- */
- public static MapDiff createMapDiffSingleAdd(final Object addedKey,
- final Object newValue) {
- return new MapDiff() {
-
- public Set getAddedKeys() {
- return Collections.singleton(addedKey);
- }
-
- public Set getChangedKeys() {
- return Collections.EMPTY_SET;
- }
-
- public Object getNewValue(Object key) {
- return newValue;
- }
-
- public Object getOldValue(Object key) {
- return null;
- }
-
- public Set getRemovedKeys() {
- return Collections.EMPTY_SET;
- }
- };
- }
-
- /**
- * @param existingKey
- * @param oldValue
- * @param newValue
- * @return a map diff
- */
- public static MapDiff createMapDiffSingleChange(final Object existingKey,
- final Object oldValue, final Object newValue) {
- return new MapDiff() {
-
- public Set getAddedKeys() {
- return Collections.EMPTY_SET;
- }
-
- public Set getChangedKeys() {
- return Collections.singleton(existingKey);
- }
-
- public Object getNewValue(Object key) {
- return newValue;
- }
-
- public Object getOldValue(Object key) {
- return oldValue;
- }
-
- public Set getRemovedKeys() {
- return Collections.EMPTY_SET;
- }
- };
- }
-
- /**
- * @param removedKey
- * @param oldValue
- * @return a map diff
- */
- public static MapDiff createMapDiffSingleRemove(final Object removedKey,
- final Object oldValue) {
- return new MapDiff() {
-
- public Set getAddedKeys() {
- return Collections.EMPTY_SET;
- }
-
- public Set getChangedKeys() {
- return Collections.EMPTY_SET;
- }
-
- public Object getNewValue(Object key) {
- return null;
- }
-
- public Object getOldValue(Object key) {
- return oldValue;
- }
-
- public Set getRemovedKeys() {
- return Collections.singleton(removedKey);
- }
- };
- }
-
- /**
- * @param copyOfOldMap
- * @return a map diff
- */
- public static MapDiff createMapDiffRemoveAll(final Map copyOfOldMap) {
- return new MapDiff() {
-
- public Set getAddedKeys() {
- return Collections.EMPTY_SET;
- }
-
- public Set getChangedKeys() {
- return Collections.EMPTY_SET;
- }
-
- public Object getNewValue(Object key) {
- return null;
- }
-
- public Object getOldValue(Object key) {
- return copyOfOldMap.get(key);
- }
-
- public Set getRemovedKeys() {
- return copyOfOldMap.keySet();
- }
- };
- }
-
- /**
- * @param addedKeys
- * @param removedKeys
- * @param changedKeys
- * @param oldValues
- * @param newValues
- * @return a map diff
- */
- public static MapDiff createMapDiff(final Set addedKeys,
- final Set removedKeys, final Set changedKeys, final Map oldValues,
- final Map newValues) {
- return new MapDiff() {
-
- public Set getAddedKeys() {
- return addedKeys;
- }
-
- public Set getChangedKeys() {
- return changedKeys;
- }
-
- public Object getNewValue(Object key) {
- return newValues.get(key);
- }
-
- public Object getOldValue(Object key) {
- return oldValues.get(key);
- }
-
- public Set getRemovedKeys() {
- return removedKeys;
- }
- };
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IChangeListener.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IChangeListener.java
deleted file mode 100644
index a4ed1ccb..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IChangeListener.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable;
-
-import org.eclipse.core.databinding.observable.list.IListChangeListener;
-import org.eclipse.core.databinding.observable.map.IMapChangeListener;
-import org.eclipse.core.databinding.observable.set.ISetChangeListener;
-import org.eclipse.core.databinding.observable.value.IValueChangeListener;
-
-/**
- * Listener for generic change events. Note that the change events do not carry information about
- * the change, they only specify the affected observable. To listen for specific change events, use
- * more specific change listeners.
- *
- * @see IValueChangeListener
- * @see IListChangeListener
- * @see ISetChangeListener
- * @see IMapChangeListener
- *
- * @since 1.0
- */
-public interface IChangeListener extends IObservablesListener {
-
- /**
- * Handle a generic change to the given observable.
- *
- * @param event
- */
- public void handleChange(ChangeEvent event);
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IDiff.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IDiff.java
deleted file mode 100644
index aacd9faf..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IDiff.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable;
-
-import org.eclipse.core.databinding.observable.list.ListDiff;
-import org.eclipse.core.databinding.observable.map.MapDiff;
-import org.eclipse.core.databinding.observable.set.SetDiff;
-import org.eclipse.core.databinding.observable.value.ValueDiff;
-
-/**
- * A diff represents a state change of an observable object.
- *
- * @see ValueDiff
- * @see ListDiff
- * @see SetDiff
- * @see MapDiff
- *
- * @since 1.0
- *
- */
-public interface IDiff {
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IObservable.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IObservable.java
deleted file mode 100644
index 9f8e5bd5..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IObservable.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.databinding.observable;
-
-/**
- * An object with state that allows to listen for state changes.
- *
- * <p>
- * This interface is not intended to be implemented by clients. Clients should
- * instead subclass one of the classes in the framework that implement this
- * interface. Note that direct implementers of this interface outside of the
- * framework will be broken in future releases when methods are added to this
- * interface.
- * </p>
- * <p>
- * Implementations must not manage listeners themselves, listener management
- * must be delegated to a private instance of type {@link ChangeSupport} if
- * it is not inherited from {@link AbstractObservable}.
- * </p>
- *
- * @since 1.0
- *
- */
-public interface IObservable {
-
- /**
- * Returns the realm for this observable. Unless otherwise specified,
- * getters and setters must be accessed from within this realm. Listeners
- * will be within this realm when they receive events from this observable.
- * <p>
- * Because observables can only be accessed from within one realm, and they
- * always fire events on that realm, their state can be observed in an
- * incremental way. It is always safe to call getters of an observable from
- * within a change listener attached to that observable.
- * </p>
- *
- * @return the realm
- */
- public Realm getRealm();
-
- /**
- * Adds the given change listener to the list of change listeners. Change
- * listeners are notified about changes of the state of this observable in a
- * generic way, without specifying the change that happened. To get the
- * changed state, a change listener needs to query for the current state of
- * this observable.
- *
- * @param listener
- */
- public void addChangeListener(IChangeListener listener);
-
- /**
- * Removes the given change listener from the list of change listeners. Has
- * no effect if the given listener is not registered as a change listener.
- *
- * @param listener
- */
- public void removeChangeListener(IChangeListener listener);
-
- /**
- * Adds the given stale listener to the list of stale listeners. Stale
- * listeners are notified when an observable object becomes stale, not when
- * is becomes non-stale.
- *
- * @param listener
- *
- * @see #isStale()
- */
- public void addStaleListener(IStaleListener listener);
-
- /**
- * Removes the given stale listener from the list of stale listeners. Has no
- * effect if the given listener is not registered as a stale listener.
- *
- * @param listener
- */
- public void removeStaleListener(IStaleListener listener);
-
- /**
- * Returns whether the state of this observable is stale and is expected to
- * change soon. A non-stale observable that becomes stale will notify its
- * stale listeners. A stale object that becomes non-stale does so by
- * changing its state and notifying its change listeners, it does <b>not</b>
- * notify its stale listeners about becoming non-stale. Clients that do not
- * expect asynchronous changes may ignore staleness of observable objects.
- *
- * @return true if this observable's state is stale and will change soon.
- *
- * @TrackedGetter - implementers must call
- * {@link ObservableTracker#getterCalled(IObservable)}.
- */
- public boolean isStale();
-
- /**
- * Disposes of this observable object, removing all listeners registered
- * with this object, and all listeners this object might have registered on
- * other objects.
- */
- public void dispose();
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IObservableCollection.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IObservableCollection.java
deleted file mode 100644
index d12c384f..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IObservableCollection.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable;
-
-import java.util.Collection;
-
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.set.IObservableSet;
-
-/**
- * Interface for observable collections. Only general change listeners can be
- * added to an observable collection. Listeners interested in incremental
- * changes have to be added using more concrete subtypes such as
- * {@link IObservableList} or {@link IObservableSet}.
- *
- * <p>
- * This interface is not intended to be implemented by clients. Clients should
- * instead subclass one of the classes that implement this interface. Note that
- * direct implementers of this interface outside of the framework will be broken
- * in future releases when methods are added to this interface.
- * </p>
- *
- * @since 1.0
- */
-public interface IObservableCollection extends IObservable, Collection {
-
- /**
- * @return the element type of this observable value, or <code>null</code>
- * if this observable collection is untyped.
- */
- Object getElementType();
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IObservablesListener.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IObservablesListener.java
deleted file mode 100644
index 4c0864f7..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IObservablesListener.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable;
-
-/**
- * Marker interface for all listener types in the observables framework. Not
- * intended to be directly implemented by clients.
- *
- * @since 1.0
- *
- */
-public interface IObservablesListener {
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IStaleListener.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IStaleListener.java
deleted file mode 100644
index b05535d4..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IStaleListener.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable;
-
-/**
- * Listener for staleness events. An observable object is stale if its state
- * will change eventually.
- *
- * @since 1.0
- */
-public interface IStaleListener extends IObservablesListener {
-
- /**
- * Handle the event that the given observable object is now stale.
- *
- * @param staleEvent
- */
- public void handleStale(StaleEvent staleEvent);
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/ObservableEvent.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/ObservableEvent.java
deleted file mode 100644
index f1926592..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/ObservableEvent.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable;
-
-import java.util.EventObject;
-
-/**
- * @since 3.3
- *
- */
-public abstract class ObservableEvent extends EventObject {
-
- /**
- * @param source
- */
- public ObservableEvent(IObservable source) {
- super(source);
- }
-
- /**
- *
- */
- private static final long serialVersionUID = 7693906965267871813L;
-
- /**
- * @return the observable that generated this event
- */
- public IObservable getObservable() {
- return (IObservable) getSource();
- }
-
- /**
- *
- * @param listener
- */
- protected abstract void dispatch(IObservablesListener listener);
-
- /**
- * @return a unique object representing the concrete type of this event.
- */
- protected abstract Object getListenerType();
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/ObservableTracker.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/ObservableTracker.java
deleted file mode 100644
index 95a4c1f3..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/ObservableTracker.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.databinding.observable;
-
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.eclipse.core.internal.databinding.IdentityWrapper;
-import org.eclipse.core.runtime.Assert;
-
-/**
- * This class makes it possible to monitor whenever an IObservable is read from.
- * This can be used to automatically attach and remove listeners. How to use it:
- *
- * <p>
- * If you are implementing an IObservable, invoke getterCalled(this) whenever a
- * getter is called - that is, whenever your observable is read from. You only
- * need to do this once per method call. If one getter delegates to another, the
- * outer getter doesn't need to call the method since the inner one will.
- * </p>
- *
- * <p>
- * If you want to determine what observables were used in a particular block of
- * code, call runAndMonitor(Runnable). This will execute the given runnable and
- * return the set of observables that were read from.
- * </p>
- *
- * <p>
- * This can be used to automatically attach listeners. For example, imagine you
- * have a block of code that updates some widget by reading from a bunch of
- * observables. Whenever one of those observables changes, you want to re-run
- * the code and cause the widget to be refreshed. You could do this in the
- * traditional manner by attaching one listener to each observable and
- * re-running your widget update code whenever one of them changes, but this
- * code is repetitive and requires updating the listener code whenever you
- * refactor the widget updating code.
- * </p>
- *
- * <p>
- * Alternatively, you could use a utility class that runs the code in a
- * runAndMonitor block and automatically attach listeners to any observable used
- * in updating the widget. The advantage of the latter approach is that it,
- * eliminates the code for attaching and detaching listeners and will always
- * stay in synch with changes to the widget update logic.
- * </p>
- *
- * @since 1.0
- */
-public class ObservableTracker {
-
- /**
- * Threadlocal storage pointing to the current Set of IObservables, or null
- * if none. Note that this is actually the top of a stack. Whenever a method
- * changes the current value, it remembers the old value as a local variable
- * and restores the old value when the method exits.
- */
- private static ThreadLocal currentChangeListener = new ThreadLocal();
-
- private static ThreadLocal currentStaleListener = new ThreadLocal();
-
- private static ThreadLocal currentObservableSet = new ThreadLocal();
-
- /**
- * Invokes the given runnable, and returns the set of IObservables that were
- * read by the runnable. If the runnable calls this method recursively, the
- * result will not contain IObservables that were used within the inner
- * runnable.
- *
- * @param runnable
- * runnable to execute
- * @param changeListener
- * listener to register with all accessed observables
- * @param staleListener
- * listener to register with all accessed observables, or
- * <code>null</code> if no stale listener is to be registered
- * @return an array of unique observable objects
- */
- public static IObservable[] runAndMonitor(Runnable runnable,
- IChangeListener changeListener, IStaleListener staleListener) {
- // Remember the previous value in the listener stack
- Set lastObservableSet = (Set) currentObservableSet.get();
- IChangeListener lastChangeListener = (IChangeListener) currentChangeListener
- .get();
- IStaleListener lastStaleListener = (IStaleListener) currentStaleListener
- .get();
-
- Set observableSet = new HashSet();
- // Push the new listeners to the top of the stack
- currentObservableSet.set(observableSet);
- currentChangeListener.set(changeListener);
- currentStaleListener.set(staleListener);
- try {
- runnable.run();
- } finally {
- // Pop the new listener off the top of the stack (by restoring the
- // previous listener)
- currentObservableSet.set(lastObservableSet);
- currentChangeListener.set(lastChangeListener);
- currentStaleListener.set(lastStaleListener);
- }
-
- int i = 0;
- IObservable[] result = new IObservable[observableSet.size()];
- for (Iterator it = observableSet.iterator(); it.hasNext();) {
- IdentityWrapper wrapper = (IdentityWrapper) it.next();
- result[i++] = (IObservable) wrapper.unwrap();
- }
-
- return result;
- }
-
- /**
- * Notifies the ObservableTracker that an observable was read from. The
- * JavaDoc for methods that invoke this method should include the following
- * tag: "@TrackedGetter This method will notify ObservableTracker that the
- * receiver has been read from". This lets callers know that they can rely
- * on automatic updates from the object without explicitly attaching a
- * listener.
- *
- * @param observable
- */
- public static void getterCalled(IObservable observable) {
- Assert.isTrue(observable.getRealm().isCurrent());
- Set lastObservableSet = (Set) currentObservableSet.get();
- IChangeListener lastChangeListener = (IChangeListener) currentChangeListener
- .get();
- IStaleListener lastStaleListener = (IStaleListener) currentStaleListener
- .get();
-
- boolean added = false;
- if (lastObservableSet != null) {
- added = lastObservableSet.add(new IdentityWrapper(observable));
- }
-
- // If anyone is listening for observable usage...
- if (added && lastChangeListener != null) {
- observable.addChangeListener(lastChangeListener);
- }
- if (added && lastStaleListener != null) {
- observable.addStaleListener(lastStaleListener);
- }
- }
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/Observables.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/Observables.java
deleted file mode 100644
index 9a5abfa3..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/Observables.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Cerner Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable;
-
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.list.IListChangeListener;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.list.ObservableList;
-import org.eclipse.core.databinding.observable.set.IObservableSet;
-import org.eclipse.core.databinding.observable.set.ISetChangeListener;
-import org.eclipse.core.databinding.observable.set.ObservableSet;
-import org.eclipse.core.internal.databinding.observable.EmptyObservableList;
-import org.eclipse.core.internal.databinding.observable.EmptyObservableSet;
-import org.eclipse.core.internal.databinding.observable.ProxyObservableSet;
-import org.eclipse.core.internal.databinding.observable.UnmodifiableObservableList;
-
-/**
- * Contains static methods to operate on or return
- * {@link IObservable Observables}.
- *
- * @since 3.2
- */
-public class Observables {
- /**
- * @param list
- * @return list Returns an unmodifiable view of the provided
- * <code>list</code>.
- */
- public static IObservableList unmodifiableObservableList(
- IObservableList list) {
- if (list == null) {
- throw new IllegalArgumentException(
- "Parameter " + list + " was null."); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- return new UnmodifiableObservableList(list);
- }
-
- /**
- * Returns an empty observable list. The returned list continues to work
- * after it has been disposed of and can be disposed of multiple times.
- *
- * @return an empty observable list.
- */
- public static IObservableList emptyObservableList() {
- return new EmptyObservableList(Realm.getDefault());
- }
-
- /**
- * Returns an empty observable list. The returned list continues to work
- * after it has been disposed of and can be disposed of multiple times.
- *
- * @param realm
- * @return an empty observable list.
- */
- public static IObservableList emptyObservableList(Realm realm) {
- return new EmptyObservableList(realm);
- }
-
- /**
- * Returns an empty observable set. The returned set continues to work after
- * it has been disposed of and can be disposed of multiple times.
- *
- * @return an empty observable set.
- */
- public static IObservableSet emptyObservableSet() {
- return new EmptyObservableSet(Realm.getDefault());
- }
-
- /**
- * Returns an empty observable set. The returned set continues to work after
- * it has been disposed of and can be disposed of multiple times.
- *
- * @param realm
- * @return an empty observable set.
- */
- public static IObservableSet emptyObservableSet(Realm realm) {
- return new EmptyObservableSet(realm);
- }
-
- /**
- * @param set
- * @return Returns an observableSet backed by the given set
- */
- public static IObservableSet staticObservableSet(Set set) {
- return new ObservableSet(Realm.getDefault(), set, Object.class) {
- public void addChangeListener(IChangeListener listener) {
- }
-
- public void addStaleListener(IStaleListener listener) {
- }
-
- public void addSetChangeListener(ISetChangeListener listener) {
- }
- };
- }
-
- /**
- * @param realm
- * @param set
- * @return Returns an observableSet backed by the given set
- */
- public static IObservableSet staticObservableSet(Realm realm, Set set) {
- return new ObservableSet(realm, set, Object.class) {
- public void addChangeListener(IChangeListener listener) {
- }
-
- public void addStaleListener(IStaleListener listener) {
- }
-
- public void addSetChangeListener(ISetChangeListener listener) {
- }
- };
- }
-
- /**
- * Returns an observable set that contains the same elements as the given
- * set, and fires the same events as the given set, but can be disposed of
- * without disposing of the wrapped set.
- *
- * @param target
- * the set to wrap
- * @return a proxy observable set
- */
- public static IObservableSet proxyObservableSet(IObservableSet target) {
- return new ProxyObservableSet(target);
- }
-
- /**
- * @param list
- * @return an observable list that never fires events
- */
- public static IObservableList staticObservableList(List list) {
- return staticObservableList(Realm.getDefault(), list);
- }
-
- /**
- * @param realm
- * @param list
- * @return an observable list that never fires events
- */
- public static IObservableList staticObservableList(Realm realm, List list) {
- return new ObservableList(realm, list, Object.class) {
- public void addChangeListener(IChangeListener listener) {
- }
-
- public void addStaleListener(IStaleListener listener) {
- }
-
- public void addListChangeListener(IListChangeListener listener) {
- }
- };
- }
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/Realm.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/Realm.java
deleted file mode 100644
index 77222f67..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/Realm.java
+++ /dev/null
@@ -1,294 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 168153
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable;
-
-import java.util.LinkedList;
-
-import org.eclipse.core.databinding.Binding;
-import org.eclipse.core.databinding.util.Policy;
-import org.eclipse.core.runtime.ISafeRunnable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.SafeRunner;
-import org.eclipse.core.runtime.Status;
-
-/**
- * A realm defines a context from which objects implementing {@link IObservable}
- * must be accessed, and on which these objects will notify their listeners. To
- * bridge between observables from different realms, subclasses of
- * {@link Binding} can be used.
- * <p>
- * A block of code is said to be executing within a realm if calling
- * {@link #getDefault()} from that block returns true. Code reached by calling
- * methods from that block will execute within the same realm, with the
- * exception of methods on this class that can be used to execute code within a
- * specific realm. Clients can use {@link #syncExec(Runnable)},
- * {@link #asyncExec(Runnable)}, or {@link #exec(Runnable)} to execute a
- * runnable within this realm. Note that using {@link #syncExec(Runnable)} can
- * lead to deadlocks and should be avoided if the current thread holds any
- * locks.
- * </p>
- * <p>
- * It is instructive to think about possible implementations of Realm: It can be
- * based on executing on a designated thread such as a UI thread, or based on
- * holding a lock. In the former case, calling syncExec on a realm that is not
- * the current realm will execute the given runnable on a different thread (the
- * designated thread). In the latter case, calling syncExec may execute the
- * given runnable on the calling thread, but calling
- * {@link #asyncExec(Runnable)} will execute the given runnable on a different
- * thread. Therefore, no assumptions can be made about the thread that will
- * execute arguments to {@link #asyncExec(Runnable)},
- * {@link #syncExec(Runnable)}, or {@link #exec(Runnable)}.
- * </p>
- * <p>
- * It is possible that a block of code is executing within more than one realm.
- * This can happen for implementations of Realm that are based on holding a lock
- * but don't use a separate thread to run runnables given to
- * {@link #syncExec(Runnable)}. Realm implementations of this kind should be
- * appropriately documented because it increases the opportunity for deadlock.
- * </p>
- * <p>
- * Some implementations of {@link IObservable} provide constructors which do not
- * take a Realm argument and are specified to create the observable instance
- * with the current default realm. The default realm can be set for the
- * currently executing thread by using {@link #runWithDefault(Realm, Runnable)}.
- * Note that the default realm does not have to be the current realm.
- * </p>
- * <p>
- * Subclasses must override at least one of asyncExec()/syncExec(). For realms
- * based on a designated thread, it may be easier to implement asyncExec and
- * keep the default implementation of syncExec. For realms based on holding a
- * lock, it may be easier to implement syncExec and keep the default
- * implementation of asyncExec.
- * </p>
- *
- * @since 1.0
- *
- * @see IObservable
- */
-public abstract class Realm {
-
- private static ThreadLocal defaultRealm = new ThreadLocal();
-
- /**
- * Returns the default realm for the calling thread, or <code>null</code>
- * if no default realm has been set.
- *
- * @return the default realm, or <code>null</code>
- */
- public static Realm getDefault() {
- return (Realm) defaultRealm.get();
- }
-
- /**
- * Sets the default realm for the calling thread, returning the current
- * default thread. This method is inherently unsafe, it is recommended to
- * use {@link #runWithDefault(Realm, Runnable)} instead. This method is
- * exposed to subclasses to facilitate testing.
- *
- * @param realm
- * the new default realm, or <code>null</code>
- * @return the previous default realm, or <code>null</code>
- */
- protected static Realm setDefault(Realm realm) {
- Realm oldValue = getDefault();
- defaultRealm.set(realm);
- return oldValue;
- }
-
- /**
- * @return true if the caller is executing in this realm. This method must
- * not have side-effects (such as, for example, implicitly placing
- * the caller in this realm).
- */
- abstract public boolean isCurrent();
-
- private Thread workerThread;
-
- LinkedList workQueue = new LinkedList();
-
- /**
- * Runs the given runnable. If an exception occurs within the runnable, it
- * is logged and not re-thrown. If the runnable implements
- * {@link ISafeRunnable}, the exception is passed to its
- * <code>handleException<code> method.
- *
- * @param runnable
- */
- protected static void safeRun(final Runnable runnable) {
- ISafeRunnable safeRunnable;
- if (runnable instanceof ISafeRunnable) {
- safeRunnable = (ISafeRunnable) runnable;
- } else {
- safeRunnable = new ISafeRunnable() {
- public void handleException(Throwable exception) {
- Policy
- .getLog()
- .log(
- new Status(
- IStatus.ERROR,
- Policy.JFACE_DATABINDING,
- IStatus.OK,
- "Unhandled exception: " + exception.getMessage(), exception)); //$NON-NLS-1$
- }
- public void run() throws Exception {
- runnable.run();
- }
- };
- }
- SafeRunner.run(safeRunnable);
- }
-
- /**
- * Causes the <code>run()</code> method of the runnable to be invoked from
- * within this realm. If the caller is executing in this realm, the
- * runnable's run method is invoked directly, otherwise it is run at the
- * next reasonable opportunity using asyncExec.
- * <p>
- * If the given runnable is an instance of {@link ISafeRunnable}, its
- * exception handler method will be called if any exceptions occur while
- * running it. Otherwise, the exception will be logged.
- * </p>
- *
- * @param runnable
- */
- public void exec(Runnable runnable) {
- if (isCurrent()) {
- safeRun(runnable);
- } else {
- asyncExec(runnable);
- }
- }
-
- /**
- * Causes the <code>run()</code> method of the runnable to be invoked from
- * within this realm at the next reasonable opportunity. The caller of this
- * method continues to run in parallel, and is not notified when the
- * runnable has completed.
- * <p>
- * If the given runnable is an instance of {@link ISafeRunnable}, its
- * exception handler method will be called if any exceptions occur while
- * running it. Otherwise, the exception will be logged.
- * </p>
- * <p>
- * Subclasses should use {@link #safeRun(Runnable)} to run the runnable.
- * </p>
- *
- * @param runnable
- */
- public void asyncExec(Runnable runnable) {
- synchronized (workQueue) {
- ensureWorkerThreadIsRunning();
- workQueue.addLast(runnable);
- workQueue.notifyAll();
- }
- }
-
- /**
- *
- */
- private void ensureWorkerThreadIsRunning() {
- if (workerThread == null) {
- workerThread = new Thread() {
- public void run() {
- try {
- while (true) {
- Runnable work = null;
- synchronized (workQueue) {
- while (workQueue.isEmpty()) {
- workQueue.wait();
- }
- work = (Runnable) workQueue.removeFirst();
- }
- syncExec(work);
- }
- } catch (InterruptedException e) {
- // exit
- }
- }
- };
- workerThread.start();
- }
- }
-
- /**
- * Causes the <code>run()</code> method of the runnable to be invoked from
- * within this realm at the next reasonable opportunity. This method is
- * blocking the caller until the runnable completes.
- * <p>
- * If the given runnable is an instance of {@link ISafeRunnable}, its
- * exception handler method will be called if any exceptions occur while
- * running it. Otherwise, the exception will be logged.
- * </p>
- * <p>
- * Subclasses should use {@link #safeRun(Runnable)} to run the runnable.
- * </p>
- * <p>
- * Note: This class is not meant to be called by clients and therefore has
- * only protected access.
- * </p>
- *
- * @param runnable
- */
- protected void syncExec(Runnable runnable) {
- SyncRunnable syncRunnable = new SyncRunnable(runnable);
- asyncExec(syncRunnable);
- synchronized (syncRunnable) {
- while (!syncRunnable.hasRun) {
- try {
- syncRunnable.wait();
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- }
- }
- }
- }
-
- static class SyncRunnable implements Runnable {
- boolean hasRun = false;
-
- private Runnable runnable;
-
- SyncRunnable(Runnable runnable) {
- this.runnable = runnable;
- }
-
- public void run() {
- try {
- safeRun(runnable);
- } finally {
- synchronized (this) {
- hasRun = true;
- this.notifyAll();
- }
- }
- }
- }
-
- /**
- * Sets the provided <code>realm</code> as the default for the duration of
- * {@link Runnable#run()} and resets the previous realm after completion.
- * Note that this will not set the given realm as the current realm.
- *
- * @param realm
- * @param runnable
- */
- public static void runWithDefault(Realm realm, Runnable runnable) {
- Realm oldRealm = Realm.getDefault();
- try {
- defaultRealm.set(realm);
- runnable.run();
- } finally {
- defaultRealm.set(oldRealm);
- }
- }
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/StaleEvent.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/StaleEvent.java
deleted file mode 100644
index 990a7d57..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/StaleEvent.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable;
-
-/**
- * @since 3.3
- *
- */
-public class StaleEvent extends ObservableEvent {
-
- /**
- * @param source
- */
- public StaleEvent(IObservable source) {
- super(source);
- }
-
- /**
- *
- */
- private static final long serialVersionUID = 3491012225431471077L;
-
- static final Object TYPE = new Object();
-
- protected void dispatch(IObservablesListener listener) {
- ((IStaleListener)listener).handleStale(this);
- }
-
- protected Object getListenerType() {
- return TYPE;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/AbstractObservableList.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/AbstractObservableList.java
deleted file mode 100644
index 057834ab..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/AbstractObservableList.java
+++ /dev/null
@@ -1,270 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164653
- * Brad Reynolds - bug 167204
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.list;
-
-import java.util.AbstractList;
-import java.util.Collection;
-import java.util.Iterator;
-
-import org.eclipse.core.databinding.observable.ChangeEvent;
-import org.eclipse.core.databinding.observable.ChangeSupport;
-import org.eclipse.core.databinding.observable.IChangeListener;
-import org.eclipse.core.databinding.observable.IStaleListener;
-import org.eclipse.core.databinding.observable.ObservableTracker;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.StaleEvent;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.AssertionFailedException;
-
-/**
- * Subclasses should override at least get(int index) and size().
- *
- * <p>
- * This class is thread safe. All state accessing methods must be invoked from
- * the {@link Realm#isCurrent() current realm}. Methods for adding and removing
- * listeners may be invoked from any thread.
- * </p>
- *
- * @since 1.0
- *
- */
-public abstract class AbstractObservableList extends AbstractList implements
- IObservableList {
-
- private ChangeSupport changeSupport;
-
- /**
- * @param realm
- *
- */
- public AbstractObservableList(Realm realm) {
- Assert.isNotNull(realm);
- changeSupport = new ChangeSupport(realm){
- protected void firstListenerAdded() {
- AbstractObservableList.this.firstListenerAdded();
- }
- protected void lastListenerRemoved() {
- AbstractObservableList.this.lastListenerRemoved();
- }
- };
- }
-
- /**
- *
- */
- public AbstractObservableList() {
- this(Realm.getDefault());
- }
-
- public boolean isStale() {
- return false;
- }
-
- public synchronized void addListChangeListener(IListChangeListener listener) {
- changeSupport.addListener(ListChangeEvent.TYPE, listener);
- }
-
- public synchronized void removeListChangeListener(IListChangeListener listener) {
- changeSupport.removeListener(ListChangeEvent.TYPE, listener);
- }
-
- protected void fireListChange(ListDiff diff) {
- // fire general change event first
- fireChange();
- changeSupport.fireEvent(new ListChangeEvent(this, diff));
- }
-
- public synchronized void addChangeListener(IChangeListener listener) {
- changeSupport.addChangeListener(listener);
- }
-
- public synchronized void removeChangeListener(IChangeListener listener) {
- changeSupport.removeChangeListener(listener);
- }
-
- public synchronized void addStaleListener(IStaleListener listener) {
- changeSupport.addStaleListener(listener);
- }
-
- public synchronized void removeStaleListener(IStaleListener listener) {
- changeSupport.removeStaleListener(listener);
- }
-
- /**
- * Fires change event. Must be invoked from the current realm.
- */
- protected void fireChange() {
- checkRealm();
- changeSupport.fireEvent(new ChangeEvent(this));
- }
-
- /**
- * Fires stale event. Must be invoked from the current realm.
- */
- protected void fireStale() {
- checkRealm();
- changeSupport.fireEvent(new StaleEvent(this));
- }
-
- /**
- *
- */
- protected void firstListenerAdded() {
- }
-
- /**
- *
- */
- protected void lastListenerRemoved() {
- }
-
- /**
- *
- */
- public synchronized void dispose() {
- changeSupport = null;
- lastListenerRemoved();
- }
-
- public final int size() {
- getterCalled();
- return doGetSize();
- }
-
- /**
- * @return the size
- */
- protected abstract int doGetSize();
-
- /**
- *
- */
- private void getterCalled() {
- ObservableTracker.getterCalled(this);
- }
-
- public boolean isEmpty() {
- getterCalled();
- return super.isEmpty();
- }
-
- public boolean contains(Object o) {
- getterCalled();
- return super.contains(o);
- }
-
- public Iterator iterator() {
- getterCalled();
- final Iterator wrappedIterator = super.iterator();
- return new Iterator() {
- public void remove() {
- wrappedIterator.remove();
- }
-
- public boolean hasNext() {
- return wrappedIterator.hasNext();
- }
-
- public Object next() {
- return wrappedIterator.next();
- }
- };
- }
-
- public Object[] toArray() {
- getterCalled();
- return super.toArray();
- }
-
- public Object[] toArray(Object a[]) {
- getterCalled();
- return super.toArray(a);
- }
-
- // Modification Operations
-
- public boolean add(Object o) {
- getterCalled();
- return super.add(o);
- }
-
- public boolean remove(Object o) {
- getterCalled();
- return super.remove(o);
- }
-
- // Bulk Modification Operations
-
- public boolean containsAll(Collection c) {
- getterCalled();
- return super.containsAll(c);
- }
-
- public boolean addAll(Collection c) {
- getterCalled();
- return super.addAll(c);
- }
-
- public boolean addAll(int index, Collection c) {
- getterCalled();
- return super.addAll(c);
- }
-
- public boolean removeAll(Collection c) {
- getterCalled();
- return super.removeAll(c);
- }
-
- public boolean retainAll(Collection c) {
- getterCalled();
- return super.retainAll(c);
- }
-
- // Comparison and hashing
-
- public boolean equals(Object o) {
- getterCalled();
- return super.equals(o);
- }
-
- public int hashCode() {
- getterCalled();
- return super.hashCode();
- }
-
- public int indexOf(Object o) {
- getterCalled();
- return super.indexOf(o);
- }
-
- public int lastIndexOf(Object o) {
- getterCalled();
- return super.lastIndexOf(o);
- }
-
- public Realm getRealm() {
- return changeSupport.getRealm();
- }
-
- /**
- * Asserts that the realm is the current realm.
- *
- * @see Realm#isCurrent()
- * @throws AssertionFailedException
- * if the realm is not the current realm
- */
- protected void checkRealm() {
- Assert.isTrue(getRealm().isCurrent());
- }
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/IListChangeListener.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/IListChangeListener.java
deleted file mode 100644
index 40d4bbca..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/IListChangeListener.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.list;
-
-import org.eclipse.core.databinding.observable.IObservablesListener;
-
-
-/**
- * Listener for changes of observable lists.
- *
- * @since 1.0
- */
-public interface IListChangeListener extends IObservablesListener {
-
- /**
- * Handle a change to the given observable list. The change is described by the diff objects.
- * @param event
- */
- void handleListChange(ListChangeEvent event);
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/IObservableList.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/IObservableList.java
deleted file mode 100644
index 0cbc13a3..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/IObservableList.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 167204
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.list;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-
-import org.eclipse.core.databinding.observable.IObservableCollection;
-
-/**
- * A list whose changes can be tracked by list change listeners.
- *
- * <p>
- * This interface is not intended to be implemented by clients. Clients should
- * instead subclass one of the framework classes that implement this interface.
- * Note that direct implementers of this interface outside of the framework will
- * be broken in future releases when methods are added to this interface.
- * </p>
- *
- * @since 1.0
- */
-public interface IObservableList extends List, IObservableCollection {
-
- /**
- * Adds the given list change listener to the list of list change listeners.
- * @param listener
- */
- public void addListChangeListener(IListChangeListener listener);
-
- /**
- * Removes the given list change listener from the list of list change listeners.
- * Has no effect if the given listener is not registered as a list change listener.
- *
- * @param listener
- */
- public void removeListChangeListener(IListChangeListener listener);
-
- /**
- * @TrackedGetter
- */
- public int size();
-
- /**
- * @TrackedGetter
- */
- public boolean isEmpty();
-
- /**
- * @TrackedGetter
- */
- public boolean contains(Object o);
-
- /**
- * @TrackedGetter
- */
- public Iterator iterator();
-
- /**
- * @TrackedGetter
- */
- public Object[] toArray();
-
- /**
- * @TrackedGetter
- */
- public Object[] toArray(Object a[]);
-
- /**
- *
- */
- public boolean add(Object o);
-
- /**
- *
- */
- public boolean remove(Object o);
-
- /**
- * @TrackedGetter
- */
- public boolean containsAll(Collection c);
-
- /**
- *
- */
- public boolean addAll(Collection c);
-
- /**
- *
- */
- public boolean addAll(int index, Collection c);
-
- /**
- *
- */
- public boolean removeAll(Collection c);
-
- /**
- *
- */
- public boolean retainAll(Collection c);
-
- /**
- * @TrackedGetter
- */
- public boolean equals(Object o);
-
- /**
- * @TrackedGetter
- */
- public int hashCode();
-
- /**
- * @TrackedGetter
- */
- public Object get(int index);
-
- /**
- *
- */
- public Object set(int index, Object element);
-
- /**
- *
- */
- public Object remove(int index);
-
- /**
- * @TrackedGetter
- */
- public int indexOf(Object o);
-
- /**
- * @TrackedGetter
- */
- public int lastIndexOf(Object o);
-
- /**
- * @TrackedGetter
- */
- public ListIterator listIterator();
-
- /**
- * @TrackedGetter
- */
- public ListIterator listIterator(int index);
-
- /**
- * @TrackedGetter
- */
- public List subList(int fromIndex, int toIndex);
-
- /**
- * @return the type of the elements or <code>null</code> if untyped
- */
- Object getElementType();
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/ListChangeEvent.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/ListChangeEvent.java
deleted file mode 100644
index 46d9c1fe..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/ListChangeEvent.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.list;
-
-import org.eclipse.core.databinding.observable.IObservablesListener;
-import org.eclipse.core.databinding.observable.ObservableEvent;
-
-/**
- * @since 3.3
- *
- */
-public class ListChangeEvent extends ObservableEvent {
-
- /**
- *
- */
- private static final long serialVersionUID = -9154315534258776672L;
-
- static final Object TYPE = new Object();
- /**
- *
- */
- public ListDiff diff;
-
- /**
- * @param source
- * @param diff
- */
- public ListChangeEvent(IObservableList source, ListDiff diff) {
- super(source);
- this.diff = diff;
- }
-
- /**
- * @return the observable list from which this event originated
- */
- public IObservableList getObservableList() {
- return (IObservableList) getSource();
- }
-
- protected void dispatch(IObservablesListener listener) {
- ((IListChangeListener) listener).handleListChange(this);
- }
-
- protected Object getListenerType() {
- return TYPE;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/ListDiff.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/ListDiff.java
deleted file mode 100644
index 544b70e9..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/ListDiff.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.list;
-
-import org.eclipse.core.databinding.observable.IDiff;
-
-/**
- * Object describing a diff between two lists.
- *
- * @since 1.0
- */
-public abstract class ListDiff implements IDiff {
-
- /**
- * Returns a list of ListDiffEntry
- *
- * @return a list of ListDiffEntry
- */
- public abstract ListDiffEntry[] getDifferences();
-
- /**
- * @see java.lang.Object#toString()
- */
- public String toString() {
- ListDiffEntry[] differences = getDifferences();
- StringBuffer buffer = new StringBuffer();
- buffer.append(getClass().getName());
-
- if (differences == null || differences.length == 0) {
- buffer
- .append("{}"); //$NON-NLS-1$
- } else {
- buffer
- .append("{"); //$NON-NLS-1$
-
- for (int i = 0; i < differences.length; i++) {
- if (i > 0)
- buffer.append(", "); //$NON-NLS-1$
-
- buffer
- .append("difference[") //$NON-NLS-1$
- .append(i)
- .append("] [") //$NON-NLS-1$
- .append(differences[i] != null ? differences[i].toString() : "null") //$NON-NLS-1$
- .append("]"); //$NON-NLS-1$
- }
- buffer.append("}"); //$NON-NLS-1$
- }
-
- return buffer.toString();
- }
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/ListDiffEntry.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/ListDiffEntry.java
deleted file mode 100644
index da2e79ff..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/ListDiffEntry.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.list;
-
-/**
- * A single addition of an element to a list or removal of an element from a list.
- *
- * @since 1.0
- */
-public abstract class ListDiffEntry {
-
- /**
- * @return the 0-based position of the addition or removal
- */
- public abstract int getPosition();
-
- /**
- * @return true if this represents an addition, false if this represents a removal
- */
- public abstract boolean isAddition();
-
- /**
- * @return the element that was added or removed
- */
- public abstract Object getElement();
-
- /**
- * @see java.lang.Object#toString()
- */
- public String toString() {
- StringBuffer buffer = new StringBuffer();
- buffer
- .append(this.getClass().getName())
- .append("{position [") //$NON-NLS-1$
- .append(getPosition())
- .append("], isAddition [") //$NON-NLS-1$
- .append(isAddition())
- .append("], element [") //$NON-NLS-1$
- .append(getElement() != null ? getElement().toString() : "null") //$NON-NLS-1$
- .append("]}"); //$NON-NLS-1$
-
- return buffer.toString();
- }
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/ObservableList.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/ObservableList.java
deleted file mode 100644
index 7b805687..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/ObservableList.java
+++ /dev/null
@@ -1,314 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164653
- * Brad Reynolds - bug 167204
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.list;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-
-import org.eclipse.core.databinding.observable.AbstractObservable;
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.ObservableTracker;
-import org.eclipse.core.databinding.observable.Realm;
-
-/**
- *
- * Abstract implementation of {@link IObservableList}, based on an underlying regular list.
- *
- * @since 1.0
- *
- */
-public abstract class ObservableList extends AbstractObservable implements
- IObservableList {
-
- protected List wrappedList;
-
- /**
- * Stale state of the list. Access must occur in the current realm.
- */
- private boolean stale = false;
-
- private Object elementType;
-
- protected ObservableList(List wrappedList, Object elementType) {
- this(Realm.getDefault(), wrappedList, elementType);
- }
-
- protected ObservableList(Realm realm, List wrappedList, Object elementType) {
- super(realm);
- this.wrappedList = wrappedList;
- this.elementType = elementType;
- }
-
- public synchronized void addListChangeListener(IListChangeListener listener) {
- addListener(ListChangeEvent.TYPE, listener);
- }
-
- public synchronized void removeListChangeListener(IListChangeListener listener) {
- removeListener(ListChangeEvent.TYPE, listener);
- }
-
- protected void fireListChange(ListDiff diff) {
- // fire general change event first
- super.fireChange();
- fireEvent(new ListChangeEvent(this, diff));
- }
-
- public boolean contains(Object o) {
- getterCalled();
- return wrappedList.contains(o);
- }
-
- public boolean containsAll(Collection c) {
- getterCalled();
- return wrappedList.containsAll(c);
- }
-
- public boolean equals(Object o) {
- getterCalled();
- return wrappedList.equals(o);
- }
-
- public int hashCode() {
- getterCalled();
- return wrappedList.hashCode();
- }
-
- public boolean isEmpty() {
- getterCalled();
- return wrappedList.isEmpty();
- }
-
- public Iterator iterator() {
- getterCalled();
- final Iterator wrappedIterator = wrappedList.iterator();
- return new Iterator() {
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
-
- public boolean hasNext() {
- return wrappedIterator.hasNext();
- }
-
- public Object next() {
- return wrappedIterator.next();
- }
- };
- }
-
- public int size() {
- getterCalled();
- return wrappedList.size();
- }
-
- public Object[] toArray() {
- getterCalled();
- return wrappedList.toArray();
- }
-
- public Object[] toArray(Object[] a) {
- getterCalled();
- return wrappedList.toArray(a);
- }
-
- public String toString() {
- getterCalled();
- return wrappedList.toString();
- }
-
- /**
- * @TrackedGetter
- */
- public Object get(int index) {
- getterCalled();
- return wrappedList.get(index);
- }
-
- /**
- * @TrackedGetter
- */
- public int indexOf(Object o) {
- getterCalled();
- return wrappedList.indexOf(o);
- }
-
- /**
- * @TrackedGetter
- */
- public int lastIndexOf(Object o) {
- getterCalled();
- return wrappedList.lastIndexOf(o);
- }
-
- // List Iterators
-
- /**
- * @TrackedGetter
- */
- public ListIterator listIterator() {
- return listIterator(0);
- }
-
- /**
- * @TrackedGetter
- */
- public ListIterator listIterator(int index) {
- getterCalled();
- final ListIterator wrappedIterator = wrappedList.listIterator(index);
- return new ListIterator() {
-
- public int nextIndex() {
- return wrappedIterator.nextIndex();
- }
-
- public int previousIndex() {
- return wrappedIterator.previousIndex();
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
-
- public boolean hasNext() {
- return wrappedIterator.hasNext();
- }
-
- public boolean hasPrevious() {
- return wrappedIterator.hasPrevious();
- }
-
- public Object next() {
- return wrappedIterator.next();
- }
-
- public Object previous() {
- return wrappedIterator.previous();
- }
-
- public void add(Object o) {
- throw new UnsupportedOperationException();
- }
-
- public void set(Object o) {
- throw new UnsupportedOperationException();
- }
- };
- }
-
-
- public List subList(int fromIndex, int toIndex) {
- getterCalled();
- return wrappedList.subList(fromIndex, toIndex);
- }
-
- protected void getterCalled() {
- ObservableTracker.getterCalled(this);
- }
-
- public Object set(int index, Object element) {
- throw new UnsupportedOperationException();
- }
-
- public Object remove(int index) {
- throw new UnsupportedOperationException();
- }
-
- public boolean add(Object o) {
- throw new UnsupportedOperationException();
- }
-
- public void add(int index, Object element) {
- throw new UnsupportedOperationException();
- }
-
- public boolean addAll(Collection c) {
- throw new UnsupportedOperationException();
- }
-
- public boolean addAll(int index, Collection c) {
- throw new UnsupportedOperationException();
- }
-
- public boolean remove(Object o) {
- throw new UnsupportedOperationException();
- }
-
- public boolean removeAll(Collection c) {
- throw new UnsupportedOperationException();
- }
-
- public boolean retainAll(Collection c) {
- throw new UnsupportedOperationException();
- }
-
- public void clear() {
- throw new UnsupportedOperationException();
- }
-
- /**
- * Returns the stale state. Must be invoked from the current realm.
- *
- * @return stale state
- */
- public boolean isStale() {
- checkRealm();
- return stale;
- }
-
- /**
- * Sets the stale state. Must be invoked from the current realm.
- *
- * @param stale
- * The stale state to list. This will fire a stale event if the
- * given boolean is true and this observable list was not already
- * stale.
- */
- public void setStale(boolean stale) {
- checkRealm();
-
- boolean wasStale = this.stale;
- this.stale = stale;
- if (!wasStale && stale) {
- fireStale();
- }
- }
-
- protected void fireChange() {
- throw new RuntimeException("fireChange should not be called, use fireListChange() instead"); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.provisional.databinding.observable.AbstractObservable#dispose()
- */
- public synchronized void dispose() {
- super.dispose();
- }
-
- public Object getElementType() {
- return elementType;
- }
-
- protected void updateWrappedList(List newList) {
- // TODO this is a naive list diff algorithm, we need a
- // smarter one
- List oldList = wrappedList;
- ListDiff listDiff = Diffs.computeListDiff(oldList, newList);
- wrappedList = newList;
- fireListChange(listDiff);
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/WritableList.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/WritableList.java
deleted file mode 100644
index 891b9830..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/WritableList.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164653
- * Brad Reynolds - bug 167204
- * Gautam Saggar - bug 169529
- * Brad Reynolds - bug 147515
- *******************************************************************************/
-package org.eclipse.core.databinding.observable.list;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.Realm;
-
-/**
- * Mutable observable list backed by an ArrayList. All mutators (e.g. set, add,
- * remove, etc.) must be invoked from the current realm.
- *
- * @since 1.0
- */
-public class WritableList extends ObservableList {
-
- /**
- * Creates an empty writable list in the default realm with a
- * <code>null</code> element type.
- *
- */
- public WritableList() {
- this(Realm.getDefault());
- }
-
- /**
- * Creates an empty writable list with a <code>null</code> element type.
- *
- * @param realm
- */
- public WritableList(Realm realm) {
- this(realm, new ArrayList(), null);
- }
-
- /**
- * Construts a new instance with the default realm.
- *
- * @param toWrap
- * @param elementType
- * can be <code>null</code>
- */
- public WritableList(List toWrap, Object elementType) {
- this(Realm.getDefault(), toWrap, elementType);
- }
-
- /**
- * Creates a writable list containing elements of the given type, wrapping
- * an existing client-supplied list.
- *
- * @param realm
- * @param toWrap
- * The java.utilList to wrap
- * @param elementType
- * can be <code>null</code>
- */
- public WritableList(Realm realm, List toWrap, Object elementType) {
- super(realm, toWrap, elementType);
- }
-
- public Object set(int index, Object element) {
- checkRealm();
- Object oldElement = wrappedList.set(index, element);
- fireListChange(Diffs.createListDiff(Diffs.createListDiffEntry(index,
- false, oldElement), Diffs.createListDiffEntry(index, true,
- element)));
- return oldElement;
- }
-
- public Object remove(int index) {
- checkRealm();
- Object oldElement = wrappedList.remove(index);
- fireListChange(Diffs.createListDiff(Diffs.createListDiffEntry(index,
- false, oldElement)));
- return oldElement;
- }
-
- public boolean add(Object element) {
- checkRealm();
- boolean added = wrappedList.add(element);
- if (added) {
- fireListChange(Diffs.createListDiff(Diffs.createListDiffEntry(
- wrappedList.size() - 1, true, element)));
- }
- return added;
- }
-
- public void add(int index, Object element) {
- checkRealm();
- wrappedList.add(index, element);
- fireListChange(Diffs.createListDiff(Diffs.createListDiffEntry(index,
- true, element)));
- }
-
- public boolean addAll(Collection c) {
- checkRealm();
- ListDiffEntry[] entries = new ListDiffEntry[c.size()];
- int i = 0;
- int addIndex = wrappedList.size();
- for (Iterator it = c.iterator(); it.hasNext();) {
- Object element = it.next();
- entries[i++] = Diffs.createListDiffEntry(addIndex++, true, element);
- }
- boolean added = wrappedList.addAll(c);
- fireListChange(Diffs.createListDiff(entries));
- return added;
- }
-
- public boolean addAll(int index, Collection c) {
- checkRealm();
- ListDiffEntry[] entries = new ListDiffEntry[c.size()];
- int i = 0;
- int addIndex = index;
- for (Iterator it = c.iterator(); it.hasNext();) {
- Object element = it.next();
- entries[i++] = Diffs.createListDiffEntry(addIndex++, true, element);
- }
- boolean added = wrappedList.addAll(index, c);
- fireListChange(Diffs.createListDiff(entries));
- return added;
- }
-
- public boolean remove(Object o) {
- checkRealm();
- int index = wrappedList.indexOf(o);
- if (index == -1) {
- return false;
- }
- wrappedList.remove(index);
- fireListChange(Diffs.createListDiff(Diffs.createListDiffEntry(index,
- false, o)));
- return true;
- }
-
- public boolean removeAll(Collection c) {
- checkRealm();
- List entries = new ArrayList();
- for (Iterator it = c.iterator(); it.hasNext();) {
- Object element = it.next();
- int removeIndex = wrappedList.indexOf(element);
- if (removeIndex != -1) {
- wrappedList.remove(removeIndex);
- entries.add(Diffs.createListDiffEntry(removeIndex, true,
- element));
- }
- }
- fireListChange(Diffs.createListDiff((ListDiffEntry[]) entries
- .toArray(new ListDiffEntry[entries.size()])));
- return entries.size() > 0;
- }
-
- public boolean retainAll(Collection c) {
- checkRealm();
- List entries = new ArrayList();
- int removeIndex = 0;
- for (Iterator it = wrappedList.iterator(); it.hasNext();) {
- Object element = it.next();
- if (!c.contains(element)) {
- entries.add(Diffs.createListDiffEntry(removeIndex, false,
- element));
- it.remove();
- } else {
- // only increment if we haven't removed the current element
- removeIndex++;
- }
- }
- fireListChange(Diffs.createListDiff((ListDiffEntry[]) entries
- .toArray(new ListDiffEntry[entries.size()])));
- return entries.size() > 0;
- }
-
- public void clear() {
- checkRealm();
- List entries = new ArrayList();
- for (Iterator it = wrappedList.iterator(); it.hasNext();) {
- Object element = it.next();
- // always report 0 as the remove index
- entries.add(Diffs.createListDiffEntry(0, false, element));
- it.remove();
- }
- fireListChange(Diffs.createListDiff((ListDiffEntry[]) entries
- .toArray(new ListDiffEntry[entries.size()])));
- }
-
- /**
- * @param elementType
- * can be <code>null</code>
- * @return new list with the default realm.
- */
- public static WritableList withElementType(Object elementType) {
- return new WritableList(Realm.getDefault(), new ArrayList(),
- elementType);
- }
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/package.html b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/package.html
deleted file mode 100644
index d720e2b4..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/package.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <meta name="GENERATOR" content="Mozilla/4.5 [en] (Win98; I) [Netscape]">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-To be written.
-<h2>
-Package Specification</h2>
-<p>
-This package provides classes that can be used to ...</p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/AbstractObservableMap.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/AbstractObservableMap.java
deleted file mode 100644
index 8c1e212c..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/AbstractObservableMap.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164653
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.map;
-
-import java.util.AbstractMap;
-
-import org.eclipse.core.databinding.observable.ChangeEvent;
-import org.eclipse.core.databinding.observable.ChangeSupport;
-import org.eclipse.core.databinding.observable.IChangeListener;
-import org.eclipse.core.databinding.observable.IStaleListener;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.StaleEvent;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.AssertionFailedException;
-
-/**
- * @since 3.3
- *
- */
-public abstract class AbstractObservableMap extends AbstractMap implements
- IObservableMap {
-
- private ChangeSupport changeSupport;
-
- private boolean stale;
-
- /**
- */
- public AbstractObservableMap() {
- this(Realm.getDefault());
- }
-
- /**
- *
- */
- protected void lastListenerRemoved() {
- }
-
- /**
- *
- */
- protected void firstListenerAdded() {
- }
-
- /**
- * @param realm
- */
- public AbstractObservableMap(Realm realm) {
- Assert.isNotNull(realm);
- changeSupport = new ChangeSupport(realm){
- protected void firstListenerAdded() {
- AbstractObservableMap.this.firstListenerAdded();
- }
- protected void lastListenerRemoved() {
- AbstractObservableMap.this.lastListenerRemoved();
- }
- };
- }
-
- public synchronized void addMapChangeListener(IMapChangeListener listener) {
- changeSupport.addListener(MapChangeEvent.TYPE, listener);
- }
-
- public synchronized void removeMapChangeListener(IMapChangeListener listener) {
- changeSupport.removeListener(MapChangeEvent.TYPE, listener);
- }
-
- public synchronized void addChangeListener(IChangeListener listener) {
- changeSupport.addChangeListener(listener);
- }
-
- public synchronized void addStaleListener(IStaleListener listener) {
- changeSupport.addStaleListener(listener);
- }
-
- public synchronized void dispose() {
- changeSupport.dispose();
- changeSupport = null;
- }
-
- public Realm getRealm() {
- return changeSupport.getRealm();
- }
-
- public boolean isStale() {
- checkRealm();
- return stale;
- }
-
- public synchronized void removeChangeListener(IChangeListener listener) {
- changeSupport.removeChangeListener(listener);
- }
-
- public synchronized void removeStaleListener(IStaleListener listener) {
- changeSupport.removeStaleListener(listener);
- }
-
- /**
- * Sets the stale state. Must be invoked from the current realm.
- *
- * @param stale
- */
- public void setStale(boolean stale) {
- checkRealm();
- this.stale = stale;
- if (stale) {
- fireStale();
- }
- }
-
- /**
- * Fires stale events. Must be invoked from current realm.
- */
- protected void fireStale() {
- checkRealm();
- changeSupport.fireEvent(new StaleEvent(this));
- }
-
- /**
- * Fires change events. Must be invoked from current realm.
- */
- protected void fireChange() {
- checkRealm();
- changeSupport.fireEvent(new ChangeEvent(this));
- }
-
- /**
- * Fires map change events. Must be invoked from current realm.
- *
- * @param diff
- */
- protected void fireMapChange(MapDiff diff) {
- checkRealm();
- changeSupport.fireEvent(new MapChangeEvent(this, diff));
- }
-
- /**
- * Asserts that the realm is the current realm.
- *
- * @see Realm#isCurrent()
- * @throws AssertionFailedException
- * if the realm is not the current realm
- */
- protected void checkRealm() {
- Assert.isTrue(getRealm().isCurrent());
- }
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/BidirectionalMap.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/BidirectionalMap.java
deleted file mode 100644
index 207066d8..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/BidirectionalMap.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.core.databinding.observable.map;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * @since 3.3
- *
- */
-public class BidirectionalMap extends ObservableMap {
-
- private Map valueToElements = new HashMap();
-
- private IMapChangeListener mapListener = new IMapChangeListener() {
-
- public void handleMapChange(MapChangeEvent event) {
- MapDiff diff = event.diff;
- for (Iterator it = diff.getAddedKeys().iterator(); it.hasNext();) {
- Object addedKey = it.next();
- addMapping(addedKey, diff.getNewValue(addedKey));
- }
- for (Iterator it = diff.getChangedKeys().iterator(); it.hasNext();) {
- Object changedKey = it.next();
- removeMapping(changedKey, diff.getOldValue(changedKey));
- addMapping(changedKey, diff.getNewValue(changedKey));
- }
- for (Iterator it = diff.getRemovedKeys().iterator(); it.hasNext();) {
- Object removedKey = it.next();
- removeMapping(removedKey, diff.getOldValue(removedKey));
- }
- fireMapChange(diff);
- }
- };
-
- /**
- * @param wrappedMap
- */
- public BidirectionalMap(IObservableMap wrappedMap) {
- super(wrappedMap.getRealm(), wrappedMap);
- wrappedMap.addMapChangeListener(mapListener);
- for (Iterator it = wrappedMap.entrySet().iterator(); it.hasNext();) {
- Map.Entry entry = (Entry) it.next();
- addMapping(entry.getKey(), entry.getValue());
- }
- }
-
- /**
- * @param key
- * @param value
- */
- private void addMapping(Object key, Object value) {
- Object elementOrSet = valueToElements.get(value);
- if (elementOrSet == null) {
- valueToElements.put(value, key);
- return;
- }
- if (!(elementOrSet instanceof Set)) {
- elementOrSet = new HashSet(Collections.singleton(elementOrSet));
- valueToElements.put(value, elementOrSet);
- }
- Set set = (Set) elementOrSet;
- set.add(key);
- }
-
- /**
- * @param functionValue
- * @param element
- */
- private void removeMapping(Object functionValue, Object element) {
- Object elementOrSet = valueToElements.get(functionValue);
- if (elementOrSet instanceof Set) {
- Set set = (Set) elementOrSet;
- set.remove(element);
- if (set.size() == 0) {
- valueToElements.remove(functionValue);
- }
- } else {
- valueToElements.remove(functionValue);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/ComputedObservableMap.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/ComputedObservableMap.java
deleted file mode 100644
index 64690d34..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/ComputedObservableMap.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.map;
-
-import java.util.AbstractSet;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.set.IObservableSet;
-import org.eclipse.core.databinding.observable.set.ISetChangeListener;
-import org.eclipse.core.databinding.observable.set.SetChangeEvent;
-
-/**
- * Maps objects to one of their attributes. Tracks changes to the underlying
- * observable set of objects (keys), as well as changes to attribute values.
- */
-public abstract class ComputedObservableMap extends AbstractObservableMap {
-
- private final IObservableSet keySet;
-
- private ISetChangeListener setChangeListener = new ISetChangeListener() {
- public void handleSetChange(SetChangeEvent event) {
- Set addedKeys = new HashSet(event.diff.getAdditions());
- Set removedKeys = new HashSet(event.diff.getRemovals());
- Map oldValues = new HashMap();
- Map newValues = new HashMap();
- for (Iterator it = removedKeys.iterator(); it.hasNext();) {
- Object removedKey = it.next();
- Object oldValue = doGet(removedKey);
- unhookListener(removedKey);
- if (oldValue != null) {
- oldValues.put(removedKey, oldValue);
- }
- }
- for (Iterator it = addedKeys.iterator(); it.hasNext();) {
- Object addedKey = it.next();
- hookListener(addedKey);
- Object newValue = doGet(addedKey);
- newValues.put(addedKey, newValue);
- }
- fireMapChange(Diffs.createMapDiff(addedKeys, removedKeys,
- Collections.EMPTY_SET, oldValues, newValues));
- }
- };
-
- private Set entrySet = new EntrySet();
-
- private class EntrySet extends AbstractSet {
-
- public Iterator iterator() {
- final Iterator keyIterator = keySet.iterator();
- return new Iterator() {
-
- public boolean hasNext() {
- return keyIterator.hasNext();
- }
-
- public Object next() {
- final Object key = keyIterator.next();
- return new Map.Entry() {
-
- public Object getKey() {
- return key;
- }
-
- public Object getValue() {
- return get(getKey());
- }
-
- public Object setValue(Object value) {
- return put(getKey(), value);
- }
- };
- }
-
- public void remove() {
- keyIterator.remove();
- }
- };
- }
-
- public int size() {
- return keySet.size();
- }
-
- }
-
- /**
- * @param keySet
- */
- public ComputedObservableMap(IObservableSet keySet) {
- super(keySet.getRealm());
- this.keySet = keySet;
- this.keySet.addSetChangeListener(setChangeListener);
- }
-
- protected void init() {
- for (Iterator it = this.keySet.iterator(); it.hasNext();) {
- Object key = it.next();
- hookListener(key);
- }
- }
-
- protected final void fireSingleChange(Object key, Object oldValue,
- Object newValue) {
- fireMapChange(Diffs.createMapDiffSingleChange(key, oldValue, newValue));
- }
-
- public Set entrySet() {
- return entrySet;
- }
-
- public Set keySet() {
- return keySet;
- }
-
- final public Object get(Object key) {
- return doGet(key);
- }
-
- final public Object put(Object key, Object value) {
- return doPut(key, value);
- }
-
- /**
- * @param removedKey
- */
- protected abstract void unhookListener(Object removedKey);
-
- /**
- * @param addedKey
- */
- protected abstract void hookListener(Object addedKey);
-
- /**
- * @param key
- * @return the value for the given key
- */
- protected abstract Object doGet(Object key);
-
- /**
- * @param key
- * @param value
- * @return the old value for the given key
- */
- protected abstract Object doPut(Object key, Object value);
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/IMapChangeListener.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/IMapChangeListener.java
deleted file mode 100644
index 96bc2f6b..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/IMapChangeListener.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.map;
-
-import org.eclipse.core.databinding.observable.IObservablesListener;
-
-
-/**
- * @since 1.1
- *
- */
-public interface IMapChangeListener extends IObservablesListener {
-
- /**
- * @param event
- */
- void handleMapChange(MapChangeEvent event);
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/IObservableMap.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/IObservableMap.java
deleted file mode 100644
index 17d06649..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/IObservableMap.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164653
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.map;
-
-import java.util.Collection;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.IObservable;
-
-/**
- * Observable Map.
- *
- * <p>
- * This interface is not intended to be implemented by clients. Clients should
- * instead subclass one of the classes that implement this interface. Note that
- * direct implementers of this interface outside of the framework will be broken
- * in future releases when methods are added to this interface.
- * </p>
- *
- * @since 1.1
- */
-public interface IObservableMap extends Map, IObservable {
-
- /**
- * @param listener
- */
- public void addMapChangeListener(IMapChangeListener listener);
-
- /**
- * @param listener
- */
- public void removeMapChangeListener(IMapChangeListener listener);
-
- /**
- * @TrackedGetter
- */
- public int size();
-
- /**
- * @TrackedGetter
- */
- public boolean isEmpty();
-
- /**
- * @TrackedGetter
- */
- public boolean containsKey(Object key);
-
- /**
- * @TrackedGetter
- */
- public boolean containsValue(Object value);
-
- /**
- * @TrackedGetter
- */
- public Object get(Object key);
-
- /**
- *
- */
- public Object put(Object key, Object value);
-
- /**
- *
- */
- public Object remove(Object key);
-
- /**
- * @TrackedGetter
- */
- public Set keySet();
-
- /**
- * @TrackedGetter
- */
- public Collection values();
-
- /**
- * @TrackedGetter
- */
- public Set entrySet();
-
- /**
- * @TrackedGetter
- */
- public boolean equals(Object o);
-
- /**
- * @TrackedGetter
- */
- public int hashCode();
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/MapChangeEvent.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/MapChangeEvent.java
deleted file mode 100644
index 959c1bc8..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/MapChangeEvent.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.map;
-
-import org.eclipse.core.databinding.observable.IObservablesListener;
-import org.eclipse.core.databinding.observable.ObservableEvent;
-
-/**
- * @since 3.3
- *
- */
-public class MapChangeEvent extends ObservableEvent {
-
- /**
- *
- */
- private static final long serialVersionUID = -8092347212410548463L;
- static final Object TYPE = new Object();
- /**
- *
- */
- public MapDiff diff;
-
- /**
- * @param source
- * @param diff
- */
- public MapChangeEvent(IObservableMap source, MapDiff diff) {
- super(source);
- this.diff = diff;
- }
-
- /**
- * @return the observable map from which this event originated
- */
- public IObservableMap getObservableMap() {
- return (IObservableMap) getSource();
- }
-
- protected void dispatch(IObservablesListener listener) {
- ((IMapChangeListener)listener).handleMapChange(this);
- }
-
- protected Object getListenerType() {
- return TYPE;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/MapDiff.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/MapDiff.java
deleted file mode 100644
index 8aa633f3..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/MapDiff.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.map;
-
-import java.util.Set;
-
-/**
- * @since 1.1
- *
- */
-public abstract class MapDiff {
-
- /**
- * @return the set of keys which were added
- */
- public abstract Set getAddedKeys();
-
- /**
- * @return the set of keys which were removed
- */
- public abstract Set getRemovedKeys();
-
- /**
- * @return the set of keys for which the value has changed
- */
- public abstract Set getChangedKeys();
-
- /**
- * Returns the old value for the given key, which must be an element of
- * {@link #getRemovedKeys()} or {@link #getChangedKeys()}.
- *
- * @param key
- * @return the old value for the given key.
- */
- public abstract Object getOldValue(Object key);
-
- /**
- * Returns the new value for the given key, which must be an element of
- * {@link #getChangedKeys()} or {@link #getAddedKeys()}.
- *
- * @param key
- * @return the new value for the given key.
- */
- public abstract Object getNewValue(Object key);
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/ObservableMap.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/ObservableMap.java
deleted file mode 100644
index a802d544..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/ObservableMap.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164653
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.map;
-
-import java.util.Collection;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.AbstractObservable;
-import org.eclipse.core.databinding.observable.ObservableTracker;
-import org.eclipse.core.databinding.observable.Realm;
-
-/**
- * @since 1.1
- *
- */
-public class ObservableMap extends AbstractObservable implements IObservableMap {
-
- protected Map wrappedMap;
-
- private boolean stale = false;
-
- /**
- * @param wrappedMap
- */
- public ObservableMap(Map wrappedMap) {
- this(Realm.getDefault(), wrappedMap);
- }
-
- /**
- * @param realm
- * @param wrappedMap
- */
- public ObservableMap(Realm realm, Map wrappedMap) {
- super(realm);
- this.wrappedMap = wrappedMap;
- }
-
- public synchronized void addMapChangeListener(IMapChangeListener listener) {
- addListener(MapChangeEvent.TYPE, listener);
- }
-
- public synchronized void removeMapChangeListener(IMapChangeListener listener) {
- removeListener(MapChangeEvent.TYPE, listener);
- }
-
- protected void getterCalled() {
- ObservableTracker.getterCalled(this);
- }
-
- protected void fireMapChange(MapDiff diff) {
- checkRealm();
-
- // fire general change event first
- super.fireChange();
-
- fireEvent(new MapChangeEvent(this, diff));
- }
-
- public boolean containsKey(Object key) {
- getterCalled();
- return wrappedMap.containsKey(key);
- }
-
- public boolean containsValue(Object value) {
- getterCalled();
- return wrappedMap.containsValue(value);
- }
-
- public Set entrySet() {
- getterCalled();
- return wrappedMap.entrySet();
- }
-
- public Object get(Object key) {
- getterCalled();
- return wrappedMap.get(key);
- }
-
- public boolean isEmpty() {
- getterCalled();
- return wrappedMap.isEmpty();
- }
-
- public Set keySet() {
- getterCalled();
- return wrappedMap.keySet();
- }
-
- public int size() {
- getterCalled();
- return wrappedMap.size();
- }
-
- public Collection values() {
- getterCalled();
- return wrappedMap.values();
- }
-
- /**
- * Returns the stale state. Must be invoked from the current realm.
- *
- * @return stale state
- */
- public boolean isStale() {
- checkRealm();
- return stale;
- }
-
- /**
- * Sets the stale state. Must be invoked from the current realm.
- *
- * @param stale
- * The stale state to set. This will fire a stale event if the
- * given boolean is true and this observable set was not already
- * stale.
- */
- public void setStale(boolean stale) {
- checkRealm();
- boolean wasStale = this.stale;
- this.stale = stale;
- if (!wasStale && stale) {
- fireStale();
- }
- }
-
- public Object put(Object key, Object value) {
- throw new UnsupportedOperationException();
- }
-
- public Object remove(Object key) {
- throw new UnsupportedOperationException();
- }
-
- public void clear() {
- throw new UnsupportedOperationException();
- }
-
- public void putAll(Map arg0) {
- throw new UnsupportedOperationException();
- }
-
- public synchronized void dispose() {
- super.dispose();
- }
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/WritableMap.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/WritableMap.java
deleted file mode 100644
index 25b3a392..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/WritableMap.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164653
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.map;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.Realm;
-
-/**
- * @since 3.3
- *
- */
-public class WritableMap extends ObservableMap {
-
- /**
- *
- */
- public WritableMap() {
- this(Realm.getDefault());
- }
-
- /**
- * @param realm
- */
- public WritableMap(Realm realm) {
- super(realm, new HashMap());
- }
-
- /**
- * Associates the provided <code>value</code> with the <code>key</code>. Must be invoked from the current realm.
- */
- public Object put(Object key, Object value) {
- checkRealm();
- Object result = wrappedMap.put(key, value);
- if (result==null) {
- fireMapChange(Diffs.createMapDiffSingleAdd(key, value));
- } else {
- fireMapChange(Diffs.createMapDiffSingleChange(key, value, result));
- }
- return result;
- }
-
- /**
- * Removes the value with the provide <code>key</code>. Must be invoked from the current realm.
- */
- public Object remove(Object key) {
- checkRealm();
- Object result = wrappedMap.remove(key);
- if (result!=null) {
- fireMapChange(Diffs.createMapDiffSingleRemove(key, result));
- }
- return result;
- }
-
- /**
- * Clears the map. Must be invoked from the current realm.
- */
- public void clear() {
- checkRealm();
- Map copy = new HashMap(wrappedMap.size());
- copy.putAll(wrappedMap);
- wrappedMap.clear();
- fireMapChange(Diffs.createMapDiffRemoveAll(copy));
- }
-
- /**
- * Adds the provided <code>map</code>'s contents to this map. Must be invoked from the current realm.
- */
- public void putAll(Map map) {
- checkRealm();
- Set addedKeys = new HashSet(map.size());
- Map changes = new HashMap(map.size());
- for (Iterator it = map.entrySet().iterator(); it.hasNext();) {
- Map.Entry entry = (Entry) it.next();
- Object previousValue = wrappedMap.put(entry.getKey(), entry.getValue());
- if (previousValue==null) {
- addedKeys.add(entry.getKey());
- } else {
- changes.put(entry.getKey(), previousValue);
- }
- }
- fireMapChange(Diffs.createMapDiff(addedKeys, Collections.EMPTY_SET, changes.keySet(), changes, wrappedMap));
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/package.html b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/package.html
deleted file mode 100644
index d720e2b4..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/package.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <meta name="GENERATOR" content="Mozilla/4.5 [en] (Win98; I) [Netscape]">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-To be written.
-<h2>
-Package Specification</h2>
-<p>
-This package provides classes that can be used to ...</p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/masterdetail/IObservableFactory.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/masterdetail/IObservableFactory.java
deleted file mode 100644
index e1fe5a01..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/masterdetail/IObservableFactory.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.masterdetail;
-
-import org.eclipse.core.databinding.observable.IObservable;
-
-/**
- * Generates an {@link IObservable} when passed a target instance.
- *
- * @since 1.0
- */
-public interface IObservableFactory {
-
- /**
- * Creates an observable for the given target object.
- *
- * @param target
- * @return the new observable
- */
- public IObservable createObservable(Object target);
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/masterdetail/MasterDetailObservables.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/masterdetail/MasterDetailObservables.java
deleted file mode 100644
index 4bc4e786..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/masterdetail/MasterDetailObservables.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 147515
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.masterdetail;
-
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.set.IObservableSet;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.internal.databinding.observable.masterdetail.DetailObservableList;
-import org.eclipse.core.internal.databinding.observable.masterdetail.DetailObservableSet;
-import org.eclipse.core.internal.databinding.observable.masterdetail.DetailObservableValue;
-
-/**
- * Allows for the observation of an attribute, the detail, of an observable
- * representing selection or another transient instance, the master.
- *
- * @since 1.0
- */
-public class MasterDetailObservables {
-
- /**
- * Creates a detail observable value from a master observable value and a
- * factory. This can be used to create observable values that represent a
- * property of a selected object in a table.
- *
- * @param master
- * the observable value to track
- * @param detailFactory
- * a factory for creating {@link IObservableValue} instances
- * given a current value of the master
- * @param detailType
- * the value type of the detail observable value, typically of
- * type java.lang.Class and can be <code>null</code>
- * @return an observable value of the given value type that, for any current
- * value of the given master value, behaves like the observable
- * value created by the factory for that current value.
- */
- public static IObservableValue detailValue(IObservableValue master,
- IObservableFactory detailFactory, Object detailType) {
- return new DetailObservableValue(master, detailFactory, detailType);
- }
-
- /**
- * Creates a detail observable list from a master observable value and a
- * factory. This can be used to create observable lists that represent a
- * list property of a selected object in a table.
- *
- * @param master
- * the observable value to track
- * @param detailFactory
- * a factory for creating {@link IObservableList} instances given
- * a current value of the master
- * @param detailElementType
- * the element type of the detail observable list, typically of
- * type java.lang.Class and can be <code>null</code>
- * @return an observable list with the given element type that, for any
- * current value of the given master value, behaves like the
- * observable list created by the factory for that current value.
- */
- public static IObservableList detailList(IObservableValue master,
- IObservableFactory detailFactory, Object detailElementType) {
- return new DetailObservableList(detailFactory, master,
- detailElementType);
- }
-
- /**
- * Creates a detail observable set from a master observable value and a
- * factory. This can be used to create observable sets that represent a set
- * property of a selected object in a table.
- *
- * @param master
- * the observable value to track
- * @param detailFactory
- * a factory for creating {@link IObservableSet} instances given
- * a current value of the master
- * @param detailElementType
- * the element type of the detail observable set, typically of
- * type java.lang.Class and can be <code>null</code>
- * @return an observable set with the given element type that, for any
- * current value of the given master value, behaves like the
- * observable set created by the factory for that current value.
- */
- public static IObservableSet detailSet(IObservableValue master,
- IObservableFactory detailFactory, Object detailElementType) {
- return new DetailObservableSet(detailFactory, master, detailElementType);
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/masterdetail/package.html b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/masterdetail/package.html
deleted file mode 100644
index d720e2b4..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/masterdetail/package.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <meta name="GENERATOR" content="Mozilla/4.5 [en] (Win98; I) [Netscape]">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-To be written.
-<h2>
-Package Specification</h2>
-<p>
-This package provides classes that can be used to ...</p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/package.html b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/package.html
deleted file mode 100644
index d720e2b4..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/package.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <meta name="GENERATOR" content="Mozilla/4.5 [en] (Win98; I) [Netscape]">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-To be written.
-<h2>
-Package Specification</h2>
-<p>
-This package provides classes that can be used to ...</p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/AbstractObservableSet.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/AbstractObservableSet.java
deleted file mode 100644
index 2d762a67..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/AbstractObservableSet.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.set;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.AbstractObservable;
-import org.eclipse.core.databinding.observable.ChangeSupport;
-import org.eclipse.core.databinding.observable.ObservableTracker;
-import org.eclipse.core.databinding.observable.Realm;
-
-/**
- *
- * Abstract implementation of {@link IObservableSet}.
- *
- * @since 1.0
- *
- */
-public abstract class AbstractObservableSet extends AbstractObservable implements
- IObservableSet {
-
- private ChangeSupport changeSupport;
-
- private boolean stale = false;
-
- protected AbstractObservableSet() {
- this(Realm.getDefault());
- }
-
- protected AbstractObservableSet(Realm realm) {
- super(realm);
- changeSupport = new ChangeSupport(realm){
- protected void firstListenerAdded() {
- AbstractObservableSet.this.firstListenerAdded();
- }
- protected void lastListenerRemoved() {
- AbstractObservableSet.this.lastListenerRemoved();
- }
- };
- }
-
- public void addSetChangeListener(ISetChangeListener listener) {
- changeSupport.addListener(SetChangeEvent.TYPE, listener);
- }
-
- public void removeSetChangeListener(ISetChangeListener listener) {
- changeSupport.removeListener(SetChangeEvent.TYPE, listener);
- }
-
- protected abstract Set getWrappedSet();
-
- protected void fireSetChange(SetDiff diff) {
- // fire general change event first
- super.fireChange();
-
- changeSupport.fireEvent(new SetChangeEvent(this, diff));
- }
-
- public boolean contains(Object o) {
- getterCalled();
- return getWrappedSet().contains(o);
- }
-
- public boolean containsAll(Collection c) {
- getterCalled();
- return getWrappedSet().containsAll(c);
- }
-
- public boolean equals(Object o) {
- getterCalled();
- return getWrappedSet().equals(o);
- }
-
- public int hashCode() {
- getterCalled();
- return getWrappedSet().hashCode();
- }
-
- public boolean isEmpty() {
- getterCalled();
- return getWrappedSet().isEmpty();
- }
-
- public Iterator iterator() {
- final Iterator wrappedIterator = getWrappedSet().iterator();
- return new Iterator() {
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
-
- public boolean hasNext() {
- ObservableTracker.getterCalled(AbstractObservableSet.this);
- return wrappedIterator.hasNext();
- }
-
- public Object next() {
- ObservableTracker.getterCalled(AbstractObservableSet.this);
- return wrappedIterator.next();
- }
- };
- }
-
- public int size() {
- getterCalled();
- return getWrappedSet().size();
- }
-
- public Object[] toArray() {
- getterCalled();
- return getWrappedSet().toArray();
- }
-
- public Object[] toArray(Object[] a) {
- getterCalled();
- return getWrappedSet().toArray(a);
- }
-
- public String toString() {
- getterCalled();
- return getWrappedSet().toString();
- }
-
- protected void getterCalled() {
- ObservableTracker.getterCalled(this);
- }
-
- public boolean add(Object o) {
- throw new UnsupportedOperationException();
- }
-
- public boolean addAll(Collection c) {
- throw new UnsupportedOperationException();
- }
-
- public boolean remove(Object o) {
- throw new UnsupportedOperationException();
- }
-
- public boolean removeAll(Collection c) {
- throw new UnsupportedOperationException();
- }
-
- public boolean retainAll(Collection c) {
- throw new UnsupportedOperationException();
- }
-
- public void clear() {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @return Returns the stale state.
- */
- public boolean isStale() {
- return stale;
- }
-
- /**
- * @param stale
- * The stale state to set. This will fire a stale event if the
- * given boolean is true and this observable set was not already
- * stale.
- */
- public void setStale(boolean stale) {
- boolean wasStale = this.stale;
- this.stale = stale;
- if (!wasStale && stale) {
- fireStale();
- }
- }
-
-
- protected void fireChange() {
- throw new RuntimeException("fireChange should not be called, use fireSetChange() instead"); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.provisional.databinding.observable.AbstractObservable#dispose()
- */
- public void dispose() {
- super.dispose();
- changeSupport.dispose();
- changeSupport = null;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/IObservableSet.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/IObservableSet.java
deleted file mode 100644
index 3210f622..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/IObservableSet.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.set;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.IObservableCollection;
-
-/**
- * A set whose changes can be tracked by set change listeners.
- *
- * <p>
- * This interface is not intended to be implemented by clients. Clients should
- * instead subclass one of the classes that implement this interface. Note that
- * direct implementers of this interface outside of the framework will be broken
- * in future releases when methods are added to this interface.
- * </p>
- *
- * @since 1.0
- *
- */
-public interface IObservableSet extends Set, IObservableCollection {
-
- /**
- * @param listener
- */
- public void addSetChangeListener(ISetChangeListener listener);
-
- /**
- * @param listener
- */
- public void removeSetChangeListener(ISetChangeListener listener);
-
- /**
- * @return the element type or <code>null</code> if untyped
- */
- public Object getElementType();
-
- /**
- * @TrackedGetter
- */
- int size();
-
- /**
- * @TrackedGetter
- */
- boolean isEmpty();
-
- /**
- * @TrackedGetter
- */
- boolean contains(Object o);
-
- /**
- * @TrackedGetter
- */
- Iterator iterator();
-
- /**
- * @TrackedGetter
- */
- Object[] toArray();
-
- /**
- * @TrackedGetter
- */
- Object[] toArray(Object a[]);
-
- // Modification Operations
-
- /**
- * @TrackedGetter
- */
- boolean add(Object o);
-
- /**
- * @TrackedGetter
- */
- boolean remove(Object o);
-
- // Bulk Operations
-
- /**
- * @TrackedGetter
- */
- boolean containsAll(Collection c);
-
- /**
- * @TrackedGetter
- */
- boolean addAll(Collection c);
-
- /**
- * @TrackedGetter
- */
- boolean retainAll(Collection c);
-
- /**
- * @TrackedGetter
- */
- boolean removeAll(Collection c);
-
- // Comparison and hashing
-
- /**
- * @TrackedGetter
- */
- boolean equals(Object o);
-
- /**
- * @TrackedGetter
- */
- int hashCode();
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/ISetChangeListener.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/ISetChangeListener.java
deleted file mode 100644
index 01bb5247..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/ISetChangeListener.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.set;
-
-import org.eclipse.core.databinding.observable.IObservablesListener;
-
-/**
- * @since 1.0
- *
- */
-public interface ISetChangeListener extends IObservablesListener {
-
- /**
- * @param event
- */
- void handleSetChange(SetChangeEvent event);
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/ListToSetAdapter.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/ListToSetAdapter.java
deleted file mode 100644
index 448ac6a1..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/ListToSetAdapter.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.set;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.list.IListChangeListener;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.list.ListChangeEvent;
-import org.eclipse.core.databinding.observable.list.ListDiffEntry;
-
-/**
- * Observable set backed by an observable list. The wrapped list must not
- * contain duplicate elements.
- *
- * @since 3.2
- *
- */
-public class ListToSetAdapter extends ObservableSet {
-
- private final IObservableList list;
-
- private IListChangeListener listener = new IListChangeListener() {
-
- public void handleListChange(ListChangeEvent event) {
- Set added = new HashSet();
- Set removed = new HashSet();
- ListDiffEntry[] differences = event.diff.getDifferences();
- for (int i = 0; i < differences.length; i++) {
- ListDiffEntry entry = differences[i];
- Object element = entry.getElement();
- if (entry.isAddition()) {
- if (wrappedSet.add(element)) {
- if (!removed.remove(element))
- added.add(element);
- }
- } else {
- if (wrappedSet.remove(element)) {
- removed.add(element);
- added.remove(element);
- }
- }
- }
- fireSetChange(Diffs.createSetDiff(added, removed));
- }
- };
-
- /**
- * @param list
- */
- public ListToSetAdapter(IObservableList list) {
- super(list.getRealm(), new HashSet(), list.getElementType());
- this.list = list;
- wrappedSet.addAll(list);
- this.list.addListChangeListener(listener);
- }
-
- public void dispose() {
- super.dispose();
- if (list != null && listener != null) {
- list.removeListChangeListener(listener);
- listener = null;
- }
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/MappedSet.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/MappedSet.java
deleted file mode 100644
index 2fb1dfbe..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/MappedSet.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.set;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.map.IMapChangeListener;
-import org.eclipse.core.databinding.observable.map.IObservableMap;
-import org.eclipse.core.databinding.observable.map.MapChangeEvent;
-import org.eclipse.core.databinding.observable.map.MapDiff;
-
-/**
- * @since 1.0
- *
- */
-public class MappedSet extends ObservableSet {
-
- private final IObservableMap wrappedMap;
-
- /*
- * Map from values (range elements) to Integer ref counts
- */
- private Map valueCounts = new HashMap();
-
- private ISetChangeListener domainListener = new ISetChangeListener() {
- public void handleSetChange(SetChangeEvent event) {
- Set additions = new HashSet();
- for (Iterator it = event.diff.getAdditions().iterator(); it.hasNext();) {
- Object added = it.next();
- Object mapValue = wrappedMap.get(added);
- if (handleAddition(mapValue)) {
- additions.add(mapValue);
- }
- }
- Set removals = new HashSet();
- for (Iterator it = event.diff.getRemovals().iterator(); it.hasNext();) {
- Object removed = it.next();
- Object mapValue = wrappedMap.get(removed);
- if (handleRemoval(mapValue)) {
- removals.add(mapValue);
- }
- }
- fireSetChange(Diffs.createSetDiff(additions, removals));
- }
- };
-
- private IMapChangeListener mapChangeListener = new IMapChangeListener() {
- public void handleMapChange(MapChangeEvent event) {
- MapDiff diff = event.diff;
- Set additions = new HashSet();
- Set removals = new HashSet();
- for (Iterator it = diff.getRemovedKeys().iterator(); it.hasNext();) {
- Object key = it.next();
- Object oldValue = diff.getOldValue(key);
- if (handleRemoval(oldValue)) {
- removals.add(oldValue);
- }
- }
- for (Iterator it = diff.getChangedKeys().iterator(); it.hasNext();) {
- Object key = it.next();
- Object oldValue = diff.getOldValue(key);
- Object newValue = diff.getNewValue(key);
- if (handleRemoval(oldValue)) {
- removals.add(oldValue);
- }
- if (handleAddition(newValue)) {
- additions.add(newValue);
- }
- }
- for (Iterator it = diff.getAddedKeys().iterator(); it.hasNext();) {
- Object key = it.next();
- Object newValue = diff.getNewValue(key);
- if (handleAddition(newValue)) {
- additions.add(newValue);
- }
- }
- fireSetChange(Diffs.createSetDiff(additions, removals));
- }
- };
-
- private IObservableSet input;
-
- /**
- * @param input
- * @param map
- */
- public MappedSet(IObservableSet input, IObservableMap map) {
- super(input.getRealm(), Collections.EMPTY_SET, Object.class);
- setWrappedSet(valueCounts.keySet());
- this.wrappedMap = map;
- this.input = input;
- for (Iterator it = input.iterator(); it.hasNext();) {
- Object element = it.next();
- Object functionValue = wrappedMap.get(element);
- handleAddition(functionValue);
- }
- input.addSetChangeListener(domainListener);
- map.addMapChangeListener(mapChangeListener);
- }
-
- /**
- * @param mapValue
- * @return true if the given mapValue was an addition
- */
- protected boolean handleAddition(Object mapValue) {
- Integer count = (Integer) valueCounts.get(mapValue);
- if (count == null) {
- valueCounts.put(mapValue, new Integer(1));
- return true;
- }
- valueCounts.put(mapValue, new Integer(count.intValue() + 1));
- return false;
- }
-
- /**
- * @param mapValue
- * @return true if the given mapValue has been removed
- */
- protected boolean handleRemoval(Object mapValue) {
- Integer count = (Integer) valueCounts.get(mapValue);
- if (count.intValue() <= 1) {
- valueCounts.remove(mapValue);
- return true;
- }
- valueCounts.put(mapValue, new Integer(count.intValue() - 1));
- return false;
- }
-
- public void dispose() {
- wrappedMap.removeMapChangeListener(mapChangeListener);
- input.removeSetChangeListener(domainListener);
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/ObservableSet.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/ObservableSet.java
deleted file mode 100644
index e32386bf..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/ObservableSet.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.set;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.AbstractObservable;
-import org.eclipse.core.databinding.observable.ObservableTracker;
-import org.eclipse.core.databinding.observable.Realm;
-
-/**
- *
- * Abstract implementation of {@link IObservableSet}.
- *
- * @since 1.0
- *
- */
-public abstract class ObservableSet extends AbstractObservable implements
- IObservableSet {
-
- protected Set wrappedSet;
-
- private boolean stale = false;
-
- protected Object elementType;
-
- protected ObservableSet(Set wrappedSet, Object elementType) {
- this(Realm.getDefault(), wrappedSet, elementType);
- }
-
- protected ObservableSet(Realm realm, Set wrappedSet, Object elementType) {
- super(realm);
- this.wrappedSet = wrappedSet;
- this.elementType = elementType;
- }
-
- public void addSetChangeListener(ISetChangeListener listener) {
- addListener(SetChangeEvent.TYPE, listener);
- }
-
- public void removeSetChangeListener(ISetChangeListener listener) {
- removeListener(SetChangeEvent.TYPE, listener);
- }
-
- protected void fireSetChange(SetDiff diff) {
- // fire general change event first
- super.fireChange();
-
- fireEvent(new SetChangeEvent(this, diff));
- }
-
- public boolean contains(Object o) {
- getterCalled();
- return wrappedSet.contains(o);
- }
-
- public boolean containsAll(Collection c) {
- getterCalled();
- return wrappedSet.containsAll(c);
- }
-
- public boolean equals(Object o) {
- getterCalled();
- return wrappedSet.equals(o);
- }
-
- public int hashCode() {
- getterCalled();
- return wrappedSet.hashCode();
- }
-
- public boolean isEmpty() {
- getterCalled();
- return wrappedSet.isEmpty();
- }
-
- public Iterator iterator() {
- final Iterator wrappedIterator = wrappedSet.iterator();
- return new Iterator() {
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
-
- public boolean hasNext() {
- ObservableTracker.getterCalled(ObservableSet.this);
- return wrappedIterator.hasNext();
- }
-
- public Object next() {
- ObservableTracker.getterCalled(ObservableSet.this);
- return wrappedIterator.next();
- }
- };
- }
-
- public int size() {
- getterCalled();
- return wrappedSet.size();
- }
-
- public Object[] toArray() {
- getterCalled();
- return wrappedSet.toArray();
- }
-
- public Object[] toArray(Object[] a) {
- getterCalled();
- return wrappedSet.toArray(a);
- }
-
- public String toString() {
- getterCalled();
- return wrappedSet.toString();
- }
-
- protected void getterCalled() {
- ObservableTracker.getterCalled(this);
- }
-
- public boolean add(Object o) {
- throw new UnsupportedOperationException();
- }
-
- public boolean addAll(Collection c) {
- throw new UnsupportedOperationException();
- }
-
- public boolean remove(Object o) {
- throw new UnsupportedOperationException();
- }
-
- public boolean removeAll(Collection c) {
- throw new UnsupportedOperationException();
- }
-
- public boolean retainAll(Collection c) {
- throw new UnsupportedOperationException();
- }
-
- public void clear() {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @return Returns the stale state.
- */
- public boolean isStale() {
- return stale;
- }
-
- /**
- * @param stale
- * The stale state to set. This will fire a stale event if the
- * given boolean is true and this observable set was not already
- * stale.
- */
- public void setStale(boolean stale) {
- boolean wasStale = this.stale;
- this.stale = stale;
- if (!wasStale && stale) {
- fireStale();
- }
- }
-
- /**
- * @param wrappedSet The wrappedSet to set.
- */
- protected void setWrappedSet(Set wrappedSet) {
- this.wrappedSet = wrappedSet;
- }
-
- protected void fireChange() {
- throw new RuntimeException("fireChange should not be called, use fireSetChange() instead"); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.provisional.databinding.observable.AbstractObservable#dispose()
- */
- public void dispose() {
- super.dispose();
- }
-
- public Object getElementType() {
- return elementType;
- }
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/SetChangeEvent.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/SetChangeEvent.java
deleted file mode 100644
index c0399143..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/SetChangeEvent.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.set;
-
-import org.eclipse.core.databinding.observable.IObservablesListener;
-import org.eclipse.core.databinding.observable.ObservableEvent;
-
-/**
- * @since 3.3
- *
- */
-public class SetChangeEvent extends ObservableEvent {
-
- /**
- *
- */
- private static final long serialVersionUID = 7436547103857482256L;
- static final Object TYPE = new Object();
- /**
- *
- */
- public SetDiff diff;
-
- /**
- * @param source
- * @param diff
- */
- public SetChangeEvent(IObservableSet source, SetDiff diff) {
- super(source);
- this.diff = diff;
- }
-
- /**
- * @return the observable set from which this event originated
- */
- public IObservableSet getObservableSet() {
- return (IObservableSet) getSource();
- }
-
- protected void dispatch(IObservablesListener listener) {
- ((ISetChangeListener)listener).handleSetChange(this);
- }
-
- protected Object getListenerType() {
- return TYPE;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/SetDiff.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/SetDiff.java
deleted file mode 100644
index a694287d..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/SetDiff.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.set;
-
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.IDiff;
-
-/**
- * @since 1.0
- *
- */
-public abstract class SetDiff implements IDiff {
-
- /**
- * @return the set of added elements
- */
- public abstract Set getAdditions();
-
- /**
- * @return the set of removed elements
- */
- public abstract Set getRemovals();
-
- /**
- * @see java.lang.Object#toString()
- */
- public String toString() {
- StringBuffer buffer = new StringBuffer();
- buffer
- .append(getClass().getName())
- .append("{additions [") //$NON-NLS-1$
- .append(getAdditions() != null ? getAdditions().toString() : "null") //$NON-NLS-1$
- .append("], removals [") //$NON-NLS-1$
- .append(getRemovals() != null ? getRemovals().toString() : "null") //$NON-NLS-1$
- .append("]}"); //$NON-NLS-1$
-
- return buffer.toString();
- }
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/UnionSet.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/UnionSet.java
deleted file mode 100644
index a16cb08f..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/UnionSet.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.set;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.internal.databinding.observable.IStalenessConsumer;
-import org.eclipse.core.internal.databinding.observable.StalenessTracker;
-
-/**
- * Represents a set consisting of the union of elements from one or more other
- * sets. This object does not need to be explicitly disposed. If nobody is
- * listening to the UnionSet, the set will remove its listeners.
- *
- * @since 1.0
- */
-public final class UnionSet extends ObservableSet {
-
- /**
- * child sets
- */
- private IObservableSet[] childSets;
-
- private boolean stale = false;
-
- /**
- * Map of elements onto Integer reference counts. This map is constructed
- * when the first listener is added to the union set. Null if nobody is
- * listening to the UnionSet.
- */
- private HashMap refCounts = null;
-
- private StalenessTracker stalenessTracker;
-
- /**
- * @param childSets
- */
- public UnionSet(IObservableSet[] childSets) {
- super(childSets[0].getRealm(), null, childSets[0].getElementType());
- this.childSets = childSets;
- this.stalenessTracker = new StalenessTracker(childSets,
- stalenessConsumer);
- }
-
- private ISetChangeListener childSetChangeListener = new ISetChangeListener() {
- public void handleSetChange(SetChangeEvent event) {
- processAddsAndRemoves(event.diff.getAdditions(), event.diff.getRemovals());
- }
- };
-
- private IStalenessConsumer stalenessConsumer = new IStalenessConsumer() {
- public void setStale(boolean stale) {
- boolean oldStale = UnionSet.this.stale;
- UnionSet.this.stale = stale;
- if (stale && !oldStale) {
- fireStale();
- }
- }
- };
-
- public boolean isStale() {
- if (refCounts != null) {
- return stale;
- }
-
- for (int i = 0; i < childSets.length; i++) {
- IObservableSet childSet = childSets[i];
-
- if (childSet.isStale()) {
- return true;
- }
- }
- return false;
- }
-
- private void processAddsAndRemoves(Set adds, Set removes) {
- Set addsToFire = new HashSet();
- Set removesToFire = new HashSet();
-
- for (Iterator iter = adds.iterator(); iter.hasNext();) {
- Object added = iter.next();
-
- Integer refCount = (Integer) refCounts.get(added);
- if (refCount == null) {
- refCounts.put(added, new Integer(1));
- addsToFire.add(added);
- } else {
- int refs = refCount.intValue();
- refCount = new Integer(refs + 1);
- refCounts.put(added, refCount);
- }
- }
-
- for (Iterator iter = removes.iterator(); iter.hasNext();) {
- Object removed = iter.next();
-
- Integer refCount = (Integer) refCounts.get(removed);
- if (refCount != null) {
- int refs = refCount.intValue();
- if (refs <= 1) {
- removesToFire.add(removed);
- refCounts.remove(removed);
- } else {
- refCount = new Integer(refCount.intValue() - 1);
- refCounts.put(removed, refCount);
- }
- }
- }
-
- // just in case the removes overlapped with the adds
- addsToFire.removeAll(removesToFire);
-
- if (addsToFire.size() > 0 || removesToFire.size() > 0) {
- fireSetChange(Diffs.createSetDiff(addsToFire, removesToFire));
- }
- }
-
- protected void firstListenerAdded() {
- super.firstListenerAdded();
-
- refCounts = new HashMap();
- for (int i = 0; i < childSets.length; i++) {
- IObservableSet next = childSets[i];
- next.addSetChangeListener(childSetChangeListener);
- incrementRefCounts(next);
- }
- stalenessTracker = new StalenessTracker(childSets, stalenessConsumer);
- setWrappedSet(refCounts.keySet());
- }
-
- protected void lastListenerRemoved() {
- super.lastListenerRemoved();
-
- for (int i = 0; i < childSets.length; i++) {
- IObservableSet next = childSets[i];
-
- next.removeSetChangeListener(childSetChangeListener);
- stalenessTracker.removeObservable(next);
- }
- refCounts = null;
- stalenessTracker = null;
- setWrappedSet(null);
- }
-
- private ArrayList incrementRefCounts(Collection added) {
- ArrayList adds = new ArrayList();
-
- for (Iterator iter = added.iterator(); iter.hasNext();) {
- Object next = iter.next();
-
- Integer refCount = (Integer) refCounts.get(next);
- if (refCount == null) {
- adds.add(next);
- refCount = new Integer(1);
- refCounts.put(next, refCount);
- } else {
- refCount = new Integer(refCount.intValue() + 1);
- refCounts.put(next, refCount);
- }
- }
- return adds;
- }
-
- protected void getterCalled() {
- super.getterCalled();
- if (refCounts == null) {
- // no listeners, recompute
- setWrappedSet(computeElements());
- }
- }
-
- private Set computeElements() {
- // If there is no cached value, compute the union from scratch
- if (refCounts == null) {
- Set result = new HashSet();
- for (int i = 0; i < childSets.length; i++) {
- result.addAll(childSets[i]);
- }
- return result;
- }
-
- // Else there is a cached value. Return it.
- return refCounts.keySet();
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/WritableSet.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/WritableSet.java
deleted file mode 100644
index 4f77afe2..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/WritableSet.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 147515
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.set;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.Realm;
-
-/**
- * @since 1.0
- *
- */
-public class WritableSet extends ObservableSet {
-
- /**
- * Constructs a new instance with the default realm, empty list, and a
- * <code>null</code> element type.
- *
- */
- public WritableSet() {
- this(Realm.getDefault());
- }
-
- /**
- * Construts a new instance with the default realm.
- *
- * @param c
- * @param elementType
- * can be <code>null</code>
- */
- public WritableSet(Collection c, Object elementType) {
- this(Realm.getDefault(), new HashSet(c), elementType);
- }
-
- /**
- * Constructs a new instance with an empty list and a <code>null</code> element type.
- *
- * @param realm
- */
- public WritableSet(Realm realm) {
- this(realm, new HashSet(), null);
- }
-
- /**
- * Constructs a new instance.
- *
- * @param realm
- * @param c
- * @param elementType
- * can be <code>null</code>
- */
- public WritableSet(Realm realm, Collection c, Object elementType) {
- super(realm, new HashSet(c), elementType);
- this.elementType = elementType;
- }
-
- public boolean add(Object o) {
- boolean added = wrappedSet.add(o);
- if (added) {
- fireSetChange(Diffs.createSetDiff(Collections.singleton(o), Collections.EMPTY_SET));
- }
- return added;
- }
-
- public boolean addAll(Collection c) {
- Set adds = new HashSet();
- Iterator it = c.iterator();
- while (it.hasNext()) {
- Object element = it.next();
- if (wrappedSet.add(element)) {
- adds.add(element);
- }
- }
- if (adds.size() > 0) {
- fireSetChange(Diffs.createSetDiff(adds, Collections.EMPTY_SET));
- return true;
- }
- return false;
- }
-
- public boolean remove(Object o) {
- boolean removed = wrappedSet.remove(o);
- if (removed) {
- fireSetChange(Diffs.createSetDiff(Collections.EMPTY_SET, Collections
- .singleton(o)));
- }
- return removed;
- }
-
- public boolean removeAll(Collection c) {
- Set removes = new HashSet();
- Iterator it = c.iterator();
- while (it.hasNext()) {
- Object element = it.next();
- if (wrappedSet.remove(element)) {
- removes.add(element);
- }
- }
- if (removes.size() > 0) {
- fireSetChange(Diffs.createSetDiff(Collections.EMPTY_SET, removes));
- return true;
- }
- return false;
- }
-
- public boolean retainAll(Collection c) {
- Set removes = new HashSet();
- Iterator it = wrappedSet.iterator();
- while (it.hasNext()) {
- Object element = it.next();
- if (!c.contains(element)) {
- it.remove();
- removes.add(element);
- }
- }
- if (removes.size() > 0) {
- fireSetChange(Diffs.createSetDiff(Collections.EMPTY_SET, removes));
- return true;
- }
- return false;
- }
-
- public void clear() {
- Set removes = new HashSet(wrappedSet);
- wrappedSet.clear();
- fireSetChange(Diffs.createSetDiff(Collections.EMPTY_SET, removes));
- }
-
- /**
- * @param elementType can be <code>null</code>
- * @return new instance with the default realm
- */
- public static WritableSet withElementType(Object elementType) {
- return new WritableSet(Realm.getDefault(), new HashSet(), elementType);
- }
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/package.html b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/package.html
deleted file mode 100644
index d720e2b4..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/package.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <meta name="GENERATOR" content="Mozilla/4.5 [en] (Win98; I) [Netscape]">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-To be written.
-<h2>
-Package Specification</h2>
-<p>
-This package provides classes that can be used to ...</p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/tree/IOrderedTreeProvider.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/tree/IOrderedTreeProvider.java
deleted file mode 100644
index 1716eccc..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/tree/IOrderedTreeProvider.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.tree;
-
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.internal.databinding.observable.tree.TreePath;
-
-/**
- * Objects that implement this interface are capable of describing a tree by
- * returning the list of children of any given element in the tree.
- *
- * @since 3.3
- */
-public interface IOrderedTreeProvider {
- /**
- * Returns the children of the given element, or null if the element is a
- * leaf node. The caller of this method is expected to dispose the result
- * list when it is no longer needed.
- *
- * @param element
- * the tree path of the element to query
- * @return the children of the given element, or null if the element is a
- * leaf node
- */
- IObservableList createChildList(TreePath element);
-
- /**
- * @return the realm shared by all child lists
- */
- Realm getRealm();
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/tree/IUnorderedTreeProvider.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/tree/IUnorderedTreeProvider.java
deleted file mode 100644
index 9efd06f4..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/tree/IUnorderedTreeProvider.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.tree;
-
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.set.IObservableSet;
-import org.eclipse.core.internal.databinding.observable.tree.TreePath;
-
-/**
- * Objects that implement this interface are capable of describing a tree by
- * returning the set of children of any given element in the tree.
- *
- * @since 3.3
- */
-public interface IUnorderedTreeProvider {
-
- /**
- * @return the realm shared by all child sets
- */
- public Realm getRealm();
-
- /**
- * Returns the children of the given element, or null if the element is a
- * leaf node. The caller of this method is expected to dispose the result
- * set when it is no longer needed.
- *
- * @param element
- * the tree path of the element to query
- * @return the children of the given element, or null if the element is a
- * leaf node
- */
- public IObservableSet createChildSet(TreePath element);
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/tree/package.html b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/tree/package.html
deleted file mode 100644
index d720e2b4..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/tree/package.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <meta name="GENERATOR" content="Mozilla/4.5 [en] (Win98; I) [Netscape]">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-To be written.
-<h2>
-Package Specification</h2>
-<p>
-This package provides classes that can be used to ...</p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/AbstractObservableValue.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/AbstractObservableValue.java
deleted file mode 100644
index c6eac039..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/AbstractObservableValue.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164653
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.value;
-
-import org.eclipse.core.databinding.observable.AbstractObservable;
-import org.eclipse.core.databinding.observable.ObservableTracker;
-import org.eclipse.core.databinding.observable.Realm;
-
-/**
- * @since 1.0
- *
- */
-abstract public class AbstractObservableValue extends AbstractObservable implements IObservableValue {
- /**
- * Constructs a new instance with the default realm.
- */
- public AbstractObservableValue() {
- this(Realm.getDefault());
- }
-
- /**
- * @param realm
- */
- public AbstractObservableValue(Realm realm) {
- super(realm);
- }
-
- public synchronized void addValueChangeListener(IValueChangeListener listener) {
- addListener(ValueChangeEvent.TYPE, listener);
- }
-
- public synchronized void removeValueChangeListener(IValueChangeListener listener) {
- removeListener(ValueChangeEvent.TYPE, listener);
- }
-
- final public void setValue(Object value) {
- checkRealm();
- doSetValue(value);
- }
-
- /**
- * Template method for setting the value of the observable. By default the
- * method throws an {@link UnsupportedOperationException}.
- *
- * @param value
- */
- protected void doSetValue(Object value) {
- throw new UnsupportedOperationException();
- }
-
- protected void fireValueChange(ValueDiff diff) {
- // fire general change event first
- super.fireChange();
- fireEvent(new ValueChangeEvent(this, diff));
- }
-
- public final Object getValue() {
- ObservableTracker.getterCalled(this);
- return doGetValue();
- }
-
- abstract protected Object doGetValue();
-
- public boolean isStale() {
- return false;
- }
-
- protected void fireChange() {
- throw new RuntimeException(
- "fireChange should not be called, use fireValueChange() instead"); //$NON-NLS-1$
- }
-
- public synchronized void dispose() {
- super.dispose();
- }
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/AbstractVetoableValue.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/AbstractVetoableValue.java
deleted file mode 100644
index 7fdffef9..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/AbstractVetoableValue.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164653
- *******************************************************************************/
-package org.eclipse.core.databinding.observable.value;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.Realm;
-
-/**
- * @since 1.0
- *
- */
-public abstract class AbstractVetoableValue extends AbstractObservableValue
- implements IVetoableValue {
-
- /**
- * Creates a new vetoable value.
- */
- public AbstractVetoableValue() {
- this(Realm.getDefault());
- }
-
- /**
- * @param realm
- */
- public AbstractVetoableValue(Realm realm) {
- super(realm);
- }
-
- final protected void doSetValue(Object value) {
- Object currentValue = doGetValue();
- ValueDiff diff = Diffs.createValueDiff(currentValue, value);
- boolean okToProceed = fireValueChanging(diff);
- if (!okToProceed) {
- throw new ChangeVetoException("Change not permitted"); //$NON-NLS-1$
- }
- doSetApprovedValue(value);
- fireValueChange(diff);
- }
-
- /**
- * Sets the value. Invoked after performing veto checks.
- *
- * @param value
- */
- protected abstract void doSetApprovedValue(Object value);
-
- public synchronized void addValueChangingListener(
- IValueChangingListener listener) {
- addListener(ValueChangingEvent.TYPE, listener);
- }
-
- public synchronized void removeValueChangingListener(
- IValueChangingListener listener) {
- removeListener(ValueChangingEvent.TYPE, listener);
- }
-
- /**
- * Notifies listeners about a pending change, and returns true if no
- * listener vetoed the change.
- *
- * @param diff
- * @return false if the change was vetoed, true otherwise
- */
- protected boolean fireValueChanging(ValueDiff diff) {
- checkRealm();
-
- ValueChangingEvent event = new ValueChangingEvent(this, diff);
- fireEvent(event);
- return !event.veto;
- }
-
- public void dispose() {
- super.dispose();
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/ChangeVetoException.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/ChangeVetoException.java
deleted file mode 100644
index 3c9261ff..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/ChangeVetoException.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.databinding.observable.value;
-
-/**
- * @since 1.0
- *
- */
-public class ChangeVetoException extends RuntimeException {
-
- /**
- * @param string
- */
- public ChangeVetoException(String string) {
- super(string);
- }
-
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/ComputedValue.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/ComputedValue.java
deleted file mode 100644
index 37bcf65d..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/ComputedValue.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920
- * Brad Reynolds - bug 147515
- *******************************************************************************/
-package org.eclipse.core.databinding.observable.value;
-
-import org.eclipse.core.databinding.observable.ChangeEvent;
-import org.eclipse.core.databinding.observable.IChangeListener;
-import org.eclipse.core.databinding.observable.IObservable;
-import org.eclipse.core.databinding.observable.IStaleListener;
-import org.eclipse.core.databinding.observable.ObservableTracker;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.StaleEvent;
-
-/**
- * A Lazily calculated value that automatically computes and registers listeners
- * on its dependencies as long as all of its dependencies are IObservable
- * objects
- *
- * @since 1.0
- */
-public abstract class ComputedValue extends AbstractObservableValue {
-
- private boolean dirty = true;
-
- private boolean stale = false;
-
- private Object cachedValue = null;
-
- /**
- * Dependencies list. This is a collection that contains no duplicates. It
- * is normally an ArrayList to conserve memory, but if it ever grows above a
- * certain number of elements, a HashSet is substited to conserve runtime.
- */
- private IObservable[] dependencies = new IObservable[0];
-
- /**
- *
- */
- public ComputedValue() {
- this(Realm.getDefault(), null);
- }
-
- /**
- * @param valueType can be <code>null</code>
- */
- public ComputedValue(Object valueType) {
- this(Realm.getDefault(), valueType);
- }
-
- /**
- * @param realm
- *
- */
- public ComputedValue(Realm realm) {
- this(realm, null);
- }
-
- /**
- * @param realm
- * @param valueType
- */
- public ComputedValue(Realm realm, Object valueType) {
- super(realm);
- this.valueType = valueType;
- }
-
- /**
- * Inner class that implements interfaces that we don't want to expose as
- * public API. Each interface could have been implemented using a separate
- * anonymous class, but we combine them here to reduce the memory overhead
- * and number of classes.
- *
- * <p>
- * The Runnable calls computeValue and stores the result in cachedValue.
- * </p>
- *
- * <p>
- * The IChangeListener stores each observable in the dependencies list.
- * This is registered as the listener when calling ObservableTracker, to
- * detect every observable that is used by computeValue.
- * </p>
- *
- * <p>
- * The IChangeListener is attached to every dependency.
- * </p>
- *
- */
- private class PrivateInterface implements Runnable, IChangeListener,
- IStaleListener {
- public void run() {
- cachedValue = calculate();
- }
-
- public void handleStale(StaleEvent event) {
- if (!dirty && !stale) {
- stale = true;
- fireStale();
- }
- }
-
- public void handleChange(ChangeEvent event) {
- makeDirty();
- }
- }
-
- private PrivateInterface privateInterface = new PrivateInterface();
-
- private Object valueType;
-
- protected final Object doGetValue() {
- if (dirty) {
- // This line will do the following:
- // - Run the calculate method
- // - While doing so, add any observable that is touched to the
- // dependencies list
- IObservable[] newDependencies = ObservableTracker.runAndMonitor(
- privateInterface, privateInterface, null);
-
- stale = false;
- for (int i = 0; i < newDependencies.length; i++) {
- IObservable observable = newDependencies[i];
- // Add a change listener to the new dependency.
- if (observable.isStale()) {
- stale = true;
- } else {
- observable.addStaleListener(privateInterface);
- }
- }
-
- dependencies = newDependencies;
-
- dirty = false;
- }
-
- return cachedValue;
- }
-
- /**
- * Subclasses must override this method to provide the object's value.
- *
- * @return the object's value
- */
- protected abstract Object calculate();
-
- protected final void makeDirty() {
- if (!dirty) {
- dirty = true;
-
- // Stop listening for dependency changes.
- for (int i = 0; i < dependencies.length; i++) {
- IObservable observable = dependencies[i];
-
- observable.removeChangeListener(privateInterface);
- observable.removeStaleListener(privateInterface);
- }
-
- // copy the old value
- final Object oldValue = cachedValue;
- // Fire the "dirty" event. This implementation recomputes the new
- // value lazily.
- fireValueChange(new ValueDiff() {
-
- public Object getOldValue() {
- return oldValue;
- }
-
- public Object getNewValue() {
- return getValue();
- }
- });
- }
- }
-
- public boolean isStale() {
- // we need to recompute, otherwise staleness wouldn't mean anything
- getValue();
- return stale;
- }
-
- public Object getValueType() {
- return valueType;
- }
-
- public void addChangeListener(IChangeListener listener) {
- super.addChangeListener(listener);
- // If somebody is listening, we need to make sure we attach our own
- // listeners
- getValue();
- }
-
- public void addValueChangeListener(IValueChangeListener listener) {
- super.addValueChangeListener(listener);
- // If somebody is listening, we need to make sure we attach our own
- // listeners
- getValue();
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/IObservableValue.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/IObservableValue.java
deleted file mode 100644
index ecff44f5..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/IObservableValue.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.value;
-
-import org.eclipse.core.databinding.observable.IObservable;
-import org.eclipse.core.databinding.observable.Realm;
-
-/**
- * A value whose changes can be tracked by value change listeners.
- *
- * <p>
- * This interface is not intended to be implemented by clients. Clients should
- * instead subclass one of the classes that implement this interface. Note that
- * direct implementers of this interface outside of the framework will be broken
- * in future releases when methods are added to this interface.
- * </p>
- *
- * @since 1.0
- *
- */
-public interface IObservableValue extends IObservable {
-
- /**
- * The value type of this observable value, or <code>null</code> if this
- * observable value is untyped.
- *
- * @return the value type, or <code>null</null>
- */
- public Object getValueType();
-
- /**
- * Returns the value. Must be invoked in the {@link Realm} of the observable.
- *
- * @return the current value
- * @TrackedGetter
- */
- public Object getValue();
-
- /**
- * Sets the value. Must be invoked in the {@link Realm} of the observable.
- *
- * @param value
- * the value to set
- * @throws UnsupportedOperationException
- * if this observable value cannot be set.
- */
- public void setValue(Object value);
-
- /**
- *
- * @param listener
- */
- public void addValueChangeListener(IValueChangeListener listener);
-
- /**
- * @param listener
- */
- public void removeValueChangeListener(IValueChangeListener listener);
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/IValueChangeListener.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/IValueChangeListener.java
deleted file mode 100644
index 99f52412..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/IValueChangeListener.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.value;
-
-import org.eclipse.core.databinding.observable.IObservablesListener;
-
-/**
- * @since 1.0
- *
- */
-public interface IValueChangeListener extends IObservablesListener {
-
- /**
- * @param event
- */
- void handleValueChange(ValueChangeEvent event);
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/IValueChangingListener.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/IValueChangingListener.java
deleted file mode 100644
index 85623e7e..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/IValueChangingListener.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.databinding.observable.value;
-
-import org.eclipse.core.databinding.observable.IObservablesListener;
-
-/**
- * @since 1.0
- *
- */
-public interface IValueChangingListener extends IObservablesListener {
-
- /**
- * This method is called when the value is about to change and provides an
- * opportunity to veto the change.
- *
- * @param event
- */
- public void handleValueChanging(ValueChangingEvent event);
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/IVetoableValue.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/IVetoableValue.java
deleted file mode 100644
index 15cdee48..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/IVetoableValue.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.databinding.observable.value;
-
-/**
- * An observable value whose changes can be vetoed by listeners.
- *
- * <p>
- * This interface is not intended to be implemented by clients. Clients should
- * instead subclass one of the classes that implement this interface. Note that
- * direct implementers of this interface outside of the framework will be broken
- * in future releases when methods are added to this interface.
- * </p>
- *
- * @since 1.0
- *
- */
-public interface IVetoableValue extends IObservableValue {
-
- /**
- * @param listener
- */
- public void addValueChangingListener(IValueChangingListener listener);
-
- /**
- * @param listener
- */
- public void removeValueChangingListener(IValueChangingListener listener);
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/ValueChangeEvent.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/ValueChangeEvent.java
deleted file mode 100644
index 8f0604e0..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/ValueChangeEvent.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.value;
-
-import org.eclipse.core.databinding.observable.IObservablesListener;
-import org.eclipse.core.databinding.observable.ObservableEvent;
-
-/**
- * @since 3.3
- *
- */
-public class ValueChangeEvent extends ObservableEvent {
-
- /**
- *
- */
- private static final long serialVersionUID = 2305345286999701156L;
-
- static final Object TYPE = new Object();
-
- /**
- *
- */
- public ValueDiff diff;
-
- /**
- * @param source
- * @param diff
- */
- public ValueChangeEvent(IObservableValue source, ValueDiff diff) {
- super(source);
- this.diff = diff;
- }
-
- /**
- * @return returns the observable value from which this event originated
- */
- public IObservableValue getObservableValue() {
- return (IObservableValue) source;
- }
-
- protected void dispatch(IObservablesListener listener) {
- ((IValueChangeListener)listener).handleValueChange(this);
- }
-
- protected Object getListenerType() {
- return TYPE;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/ValueChangingEvent.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/ValueChangingEvent.java
deleted file mode 100644
index eb3d1c92..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/ValueChangingEvent.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.value;
-
-import org.eclipse.core.databinding.observable.IObservablesListener;
-import org.eclipse.core.databinding.observable.ObservableEvent;
-
-/**
- * @since 3.3
- *
- */
-public class ValueChangingEvent extends ObservableEvent {
-
- /**
- *
- */
- private static final long serialVersionUID = 2305345286999701156L;
-
- static final Object TYPE = new Object();
-
- /**
- *
- */
- public ValueDiff diff;
-
- /**
- *
- */
- public boolean veto = false;
-
- /**
- * @param source
- * @param diff
- */
- public ValueChangingEvent(IObservableValue source, ValueDiff diff) {
- super(source);
- this.diff = diff;
- }
-
- /**
- * @return the observable value from which this event originated
- */
- public IObservableValue getObservableValue() {
- return (IObservableValue) source;
- }
-
- protected void dispatch(IObservablesListener listener) {
- ((IValueChangingListener) listener).handleValueChanging(this);
- }
-
- protected Object getListenerType() {
- return TYPE;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/ValueDiff.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/ValueDiff.java
deleted file mode 100644
index 918b55d6..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/ValueDiff.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.value;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.IDiff;
-
-/**
- * @since 1.0
- *
- */
-public abstract class ValueDiff implements IDiff {
- /**
- * Creates a value diff.
- */
- public ValueDiff() {
- }
-
- /**
- * @return the old value
- */
- public abstract Object getOldValue();
-
- /**
- * @return the new value
- */
- public abstract Object getNewValue();
-
- public boolean equals(Object obj) {
- if (obj instanceof ValueDiff) {
- ValueDiff val = (ValueDiff) obj;
-
- return Diffs.equals(val.getNewValue(), getNewValue())
- && Diffs.equals(val.getOldValue(), getOldValue());
-
- }
- return false;
- }
-
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- Object nv = getNewValue();
- Object ov = getOldValue();
- result = prime * result + ((nv == null) ? 0 : nv.hashCode());
- result = prime * result + ((ov == null) ? 0 : ov.hashCode());
- return result;
- }
-
- /**
- * @see java.lang.Object#toString()
- */
- public String toString() {
- StringBuffer buffer = new StringBuffer();
- buffer
- .append(getClass().getName())
- .append("{oldValue [") //$NON-NLS-1$
- .append(getOldValue() != null ? getOldValue().toString() : "null") //$NON-NLS-1$
- .append("], newValue [") //$NON-NLS-1$
- .append(getNewValue() != null ? getNewValue().toString() : "null") //$NON-NLS-1$
- .append("]}"); //$NON-NLS-1$
-
- return buffer.toString();
- }
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/WritableValue.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/WritableValue.java
deleted file mode 100644
index 9d865f0b..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/WritableValue.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 158687
- * Brad Reynolds - bug 164653, 147515
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.value;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.Realm;
-
-/**
- * Mutable (writable) implementation of {@link IObservableValue} that will maintain a value and fire
- * change events when the value changes.
- *
- * @since 1.0
- */
-public class WritableValue extends AbstractObservableValue {
-
- private final Object valueType;
-
- /**
- * Constructs a new instance with the default realm, a <code>null</code>
- * value type, and a <code>null</code> value.
- */
- public WritableValue() {
- this(null, null);
- }
-
- /**
- * Constructs a new instance with the default realm.
- *
- * @param initialValue
- * can be <code>null</code>
- * @param valueType
- * can be <code>null</code>
- */
- public WritableValue(Object initialValue, Object valueType) {
- this(Realm.getDefault(), initialValue, valueType);
- }
-
- /**
- * Constructs a new instance with the provided <code>realm</code>, a
- * <code>null</code> value type, and a <code>null</code> initial value.
- *
- * @param realm
- */
- public WritableValue(Realm realm) {
- this(realm, null, null);
- }
-
- /**
- * Constructs a new instance.
- *
- * @param realm
- * @param initialValue
- * can be <code>null</code>
- * @param valueType
- * can be <code>null</code>
- */
- public WritableValue(Realm realm, Object initialValue, Object valueType) {
- super(realm);
- this.valueType = valueType;
- this.value = initialValue;
- }
-
- private Object value = null;
-
- public Object doGetValue() {
- return value;
- }
-
- /**
- * @param value
- * The value to set.
- */
- public void doSetValue(Object value) {
- boolean changed = false;
-
- if (this.value == null && value != null) {
- changed = true;
- } else if (this.value != null && !this.value.equals(value)) {
- changed = true;
- }
-
- if (changed) {
- fireValueChange(Diffs.createValueDiff(this.value, this.value = value));
- }
- }
-
- public Object getValueType() {
- return valueType;
- }
-
- /**
- * @param elementType can be <code>null</code>
- * @return new instance with the default realm and a value of <code>null</code>
- */
- public static WritableValue withValueType(Object elementType) {
- return new WritableValue(Realm.getDefault(), null, elementType);
- }
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/package.html b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/package.html
deleted file mode 100644
index d720e2b4..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/value/package.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <meta name="GENERATOR" content="Mozilla/4.5 [en] (Win98; I) [Netscape]">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-To be written.
-<h2>
-Package Specification</h2>
-<p>
-This package provides classes that can be used to ...</p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/util/ILogger.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/util/ILogger.java
deleted file mode 100644
index 6e794fc9..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/util/ILogger.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Chris Gross (schtoo@schtoo.com) - initial API and implementation
- * (bug 49497 [RCP] JFace dependency on org.eclipse.core.runtime enlarges standalone JFace applications)
- *******************************************************************************/
-
-package org.eclipse.core.databinding.util;
-
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * A mechanism to log errors throughout JFace Data Binding.
- * <p>
- * Clients may provide their own implementation to change how errors are logged
- * from within JFace Data Binding.
- * </p>
- *
- * @see Policy#getLog()
- * @see Policy#setLog(ILogger)
- * @since 1.1
- */
-public interface ILogger {
-
- /**
- * Logs the given status.
- *
- * @param status
- * the status to log
- */
- public void log(IStatus status);
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/util/Policy.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/util/Policy.java
deleted file mode 100644
index b45ae024..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/util/Policy.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Chris Gross (schtoo@schtoo.com) - support for ILogger added
- * (bug 49497 [RCP] JFace dependency on org.eclipse.core.runtime enlarges standalone JFace applications)
- * Brad Reynolds - bug 164653
- *******************************************************************************/
-package org.eclipse.core.databinding.util;
-
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * The Policy class handles settings for behaviour, debug flags and logging
- * within JFace Data Binding.
- *
- * @since 1.1
- */
-public class Policy {
-
- /**
- * Constant for the the default setting for debug options.
- */
- public static final boolean DEFAULT = false;
-
- /**
- * The unique identifier of the JFace plug-in.
- */
- public static final String JFACE_DATABINDING = "org.eclipse.core.databinding";//$NON-NLS-1$
-
- private static ILogger log;
-
- /**
- * Returns the dummy log to use if none has been set
- */
- private static ILogger getDummyLog() {
- return new ILogger() {
- public void log(IStatus status) {
- System.err.println(status.getMessage());
- }
- };
- }
-
- /**
- * Sets the logger used by JFace Data Binding to log errors.
- *
- * @param logger
- * the logger to use, or <code>null</code> to use the default
- * logger
- */
- public static synchronized void setLog(ILogger logger) {
- log = logger;
- }
-
- /**
- * Returns the logger used by JFace Data Binding to log errors.
- * <p>
- * The default logger prints the status to <code>System.err</code>.
- * </p>
- *
- * @return the logger
- */
- public static synchronized ILogger getLog() {
- if (log == null) {
- log = getDummyLog();
- }
- return log;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/util/package.html b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/util/package.html
deleted file mode 100644
index d720e2b4..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/util/package.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <meta name="GENERATOR" content="Mozilla/4.5 [en] (Win98; I) [Netscape]">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-To be written.
-<h2>
-Package Specification</h2>
-<p>
-This package provides classes that can be used to ...</p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/EmptyObservableList.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/EmptyObservableList.java
deleted file mode 100644
index ce166328..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/EmptyObservableList.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding.observable;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-
-import org.eclipse.core.databinding.observable.IChangeListener;
-import org.eclipse.core.databinding.observable.IStaleListener;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.list.IListChangeListener;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-
-/**
- * Singleton empty list
- */
-public class EmptyObservableList implements IObservableList {
-
- private static final List emptyList = Collections.EMPTY_LIST;
-
- private Realm realm;
-
- /**
- * Creates a singleton empty list. This list may be disposed multiple times
- * without any side-effects.
- *
- * @param realm
- */
- public EmptyObservableList(Realm realm) {
- this.realm = realm;
- }
-
- public void addListChangeListener(IListChangeListener listener) {
- }
-
- public void removeListChangeListener(IListChangeListener listener) {
- }
-
- public Object getElementType() {
- return null;
- }
-
- public int size() {
- return 0;
- }
-
- public boolean isEmpty() {
- return true;
- }
-
- public boolean contains(Object o) {
- return false;
- }
-
- public Iterator iterator() {
- return emptyList.iterator();
- }
-
- public Object[] toArray() {
- return emptyList.toArray();
- }
-
- public Object[] toArray(Object[] a) {
- return emptyList.toArray(a);
- }
-
- public boolean add(Object o) {
- throw new UnsupportedOperationException();
- }
-
- public boolean remove(Object o) {
- throw new UnsupportedOperationException();
- }
-
- public boolean containsAll(Collection c) {
- return c.isEmpty();
- }
-
- public boolean addAll(Collection c) {
- throw new UnsupportedOperationException();
- }
-
- public boolean retainAll(Collection c) {
- throw new UnsupportedOperationException();
- }
-
- public boolean removeAll(Collection c) {
- throw new UnsupportedOperationException();
- }
-
- public void clear() {
- throw new UnsupportedOperationException();
- }
-
- public void addChangeListener(IChangeListener listener) {
- }
-
- public void removeChangeListener(IChangeListener listener) {
- }
-
- public void addStaleListener(IStaleListener listener) {
- }
-
- public void removeStaleListener(IStaleListener listener) {
- }
-
- public boolean isStale() {
- return false;
- }
-
- public void dispose() {
- }
-
- public boolean addAll(int index, Collection c) {
- throw new UnsupportedOperationException();
- }
-
- public Object get(int index) {
- return emptyList.get(index);
- }
-
- public int indexOf(Object o) {
- return -1;
- }
-
- public int lastIndexOf(Object o) {
- return -1;
- }
-
- public ListIterator listIterator() {
- return emptyList.listIterator();
- }
-
- public ListIterator listIterator(int index) {
- return emptyList.listIterator(index);
- }
-
- public Object remove(int index) {
- throw new UnsupportedOperationException();
- }
-
- public Object set(int index, Object element) {
- throw new UnsupportedOperationException();
- }
-
- public List subList(int fromIndex, int toIndex) {
- return emptyList.subList(fromIndex, toIndex);
- }
-
- public void add(int arg0, Object arg1) {
- throw new UnsupportedOperationException();
- }
-
- public Realm getRealm() {
- return realm;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/EmptyObservableSet.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/EmptyObservableSet.java
deleted file mode 100644
index 0bb66b16..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/EmptyObservableSet.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding.observable;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.IChangeListener;
-import org.eclipse.core.databinding.observable.IStaleListener;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.set.IObservableSet;
-import org.eclipse.core.databinding.observable.set.ISetChangeListener;
-
-/**
- * Singleton empty set
- */
-public class EmptyObservableSet implements IObservableSet {
-
- private static final Set emptySet = Collections.EMPTY_SET;
-
- private Realm realm;
-
- /**
- * Creates a singleton empty set. This set may be disposed multiple times
- * without any side-effects.
- *
- * @param realm
- */
- public EmptyObservableSet(Realm realm) {
- this.realm = realm;
- }
-
- public void addSetChangeListener(ISetChangeListener listener) {
- }
-
- public void removeSetChangeListener(ISetChangeListener listener) {
- }
-
- public Object getElementType() {
- return null;
- }
-
- public int size() {
- return 0;
- }
-
- public boolean isEmpty() {
- return true;
- }
-
- public boolean contains(Object o) {
- return false;
- }
-
- public Iterator iterator() {
- return emptySet.iterator();
- }
-
- public Object[] toArray() {
- return emptySet.toArray();
- }
-
- public Object[] toArray(Object[] a) {
- return emptySet.toArray(a);
- }
-
- public boolean add(Object o) {
- throw new UnsupportedOperationException();
- }
-
- public boolean remove(Object o) {
- throw new UnsupportedOperationException();
- }
-
- public boolean containsAll(Collection c) {
- return c.isEmpty();
- }
-
- public boolean addAll(Collection c) {
- throw new UnsupportedOperationException();
- }
-
- public boolean retainAll(Collection c) {
- throw new UnsupportedOperationException();
- }
-
- public boolean removeAll(Collection c) {
- throw new UnsupportedOperationException();
- }
-
- public void clear() {
- throw new UnsupportedOperationException();
- }
-
- public void addChangeListener(IChangeListener listener) {
- }
-
- public void removeChangeListener(IChangeListener listener) {
- }
-
- public void addStaleListener(IStaleListener listener) {
- }
-
- public void removeStaleListener(IStaleListener listener) {
- }
-
- public boolean isStale() {
- return false;
- }
-
- public void dispose() {
- }
-
- public Realm getRealm() {
- return realm;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/IStalenessConsumer.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/IStalenessConsumer.java
deleted file mode 100644
index cfe5c612..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/IStalenessConsumer.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding.observable;
-
-/**
- * @since 1.0
- *
- */
-public interface IStalenessConsumer {
- /**
- * @param stale
- *
- */
- public void setStale(boolean stale);
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/ProxyObservableSet.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/ProxyObservableSet.java
deleted file mode 100644
index 93e1145a..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/ProxyObservableSet.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding.observable;
-
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.set.AbstractObservableSet;
-import org.eclipse.core.databinding.observable.set.IObservableSet;
-import org.eclipse.core.databinding.observable.set.ISetChangeListener;
-import org.eclipse.core.databinding.observable.set.SetChangeEvent;
-
-/**
- * Wraps an observable set. This object acts like an exact copy of the original
- * set, and tracks all the changes in the original. The only difference is that
- * disposing the wrapper will not dispose the original. You can use this whenever
- * you need to return an IObservableSet from a method that expects the caller
- * to dispose the set, but you have an IObservableSet that you don't want disposed.
- */
-public final class ProxyObservableSet extends AbstractObservableSet {
-
- private IObservableSet toDelegateTo;
- private ISetChangeListener listener = new ISetChangeListener() {
- /* (non-Javadoc)
- * @see org.eclipse.jface.internal.databinding.provisional.observable.set.ISetChangeListener#handleSetChange(org.eclipse.jface.internal.databinding.provisional.observable.set.IObservableSet, org.eclipse.jface.internal.databinding.provisional.observable.set.SetDiff)
- */
- public void handleSetChange(SetChangeEvent event) {
- fireSetChange(event.diff);
- }
- };
-
- /**
- * Constructs a DelegatingObservableSet that tracks the state of the given set.
- *
- * @param toDelegate
- */
- public ProxyObservableSet(IObservableSet toDelegate) {
- super(toDelegate.getRealm());
- this.toDelegateTo = toDelegate;
- toDelegate.addSetChangeListener(listener);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.internal.databinding.provisional.observable.set.AbstractObservableSet#getWrappedSet()
- */
- protected Set getWrappedSet() {
- return toDelegateTo;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.internal.databinding.provisional.observable.set.IObservableSet#getElementType()
- */
- public Object getElementType() {
- return toDelegateTo.getElementType();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.internal.databinding.provisional.observable.set.AbstractObservableSet#dispose()
- */
- public void dispose() {
- toDelegateTo.removeSetChangeListener(listener);
- super.dispose();
- }
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/StalenessTracker.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/StalenessTracker.java
deleted file mode 100644
index 6324325e..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/StalenessTracker.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding.observable;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.databinding.observable.ChangeEvent;
-import org.eclipse.core.databinding.observable.IChangeListener;
-import org.eclipse.core.databinding.observable.IObservable;
-import org.eclipse.core.databinding.observable.IStaleListener;
-import org.eclipse.core.databinding.observable.StaleEvent;
-import org.eclipse.core.internal.databinding.IdentityWrapper;
-
-/**
- * @since 1.0
- *
- */
-public class StalenessTracker {
-
- private Map staleMap = new HashMap();
-
- private int staleCount = 0;
-
- private final IStalenessConsumer stalenessConsumer;
-
- private class ChildListener implements IStaleListener, IChangeListener {
- public void handleStale(StaleEvent event) {
- processStalenessChange((IObservable) event.getSource(), true);
- }
-
- public void handleChange(ChangeEvent event) {
- processStalenessChange((IObservable) event.getSource(), true);
- }
- }
-
- private ChildListener childListener = new ChildListener();
-
- /**
- * @param observables
- * @param stalenessConsumer
- */
- public StalenessTracker(IObservable[] observables,
- IStalenessConsumer stalenessConsumer) {
- this.stalenessConsumer = stalenessConsumer;
- for (int i = 0; i < observables.length; i++) {
- IObservable observable = observables[i];
- doAddObservable(observable, false);
- }
- stalenessConsumer.setStale(staleCount > 0);
- }
-
- /**
- * @param child
- * @param callback
- */
- public void processStalenessChange(IObservable child, boolean callback) {
- boolean oldStale = staleCount > 0;
- IdentityWrapper wrappedChild = new IdentityWrapper(child);
- boolean oldChildStale = getOldChildStale(wrappedChild);
- boolean newChildStale = child.isStale();
- if (oldChildStale != newChildStale) {
- if (oldChildStale) {
- staleCount--;
- } else {
- staleCount++;
- }
- staleMap.put(wrappedChild, newChildStale ? Boolean.TRUE : Boolean.FALSE);
- }
- boolean newStale = staleCount > 0;
- if (callback && (newStale != oldStale)) {
- stalenessConsumer.setStale(newStale);
- }
- }
-
- /**
- * @param wrappedChild
- */
- private boolean getOldChildStale(IdentityWrapper wrappedChild) {
- Object oldChildValue = staleMap.get(wrappedChild);
- boolean oldChildStale = oldChildValue == null ? false
- : ((Boolean) oldChildValue).booleanValue();
- return oldChildStale;
- }
-
- /**
- * @param observable
- */
- public void addObservable(IObservable observable) {
- doAddObservable(observable, true);
- }
-
- private void doAddObservable(IObservable observable, boolean callback) {
- processStalenessChange(observable, callback);
- observable.addChangeListener(childListener);
- observable.addStaleListener(childListener);
- }
-
- /**
- * @param observable
- */
- public void removeObservable(IObservable observable) {
- boolean oldStale = staleCount > 0;
- IdentityWrapper wrappedChild = new IdentityWrapper(observable);
- boolean oldChildStale = getOldChildStale(wrappedChild);
- if (oldChildStale) {
- staleCount--;
- }
- staleMap.remove(wrappedChild);
- observable.removeChangeListener(childListener);
- observable.removeStaleListener(childListener);
- boolean newStale = staleCount > 0;
- if (newStale != oldStale) {
- stalenessConsumer.setStale(newStale);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/UnmodifiableObservableList.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/UnmodifiableObservableList.java
deleted file mode 100644
index 87ab6eac..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/UnmodifiableObservableList.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Cerner Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding.observable;
-
-import org.eclipse.core.databinding.observable.IStaleListener;
-import org.eclipse.core.databinding.observable.StaleEvent;
-import org.eclipse.core.databinding.observable.list.IListChangeListener;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.list.ListChangeEvent;
-import org.eclipse.core.databinding.observable.list.ObservableList;
-
-/**
- * ObservableList implementation that prevents modification by consumers. Events
- * in the originating wrapped list are propagated and thrown from this instance
- * when appropriate. All mutators throw an UnsupportedOperationException.
- *
- * @since 3.2
- */
-/*
- * Implementation makes the assumption that the superclass (UnmodifiableList) is
- * unmodifiable and that all modify methods throw an
- * UnsupportedOperationException.
- */
-public class UnmodifiableObservableList extends ObservableList {
- /**
- * List that is being made unmodifiable.
- */
- private final IObservableList wrappedList;
-
- /**
- * @param wrappedList
- */
- public UnmodifiableObservableList(IObservableList wrappedList) {
- super(wrappedList.getRealm(), wrappedList, wrappedList.getElementType());
- this.wrappedList = wrappedList;
-
- wrappedList.addListChangeListener(new IListChangeListener() {
- public void handleListChange(ListChangeEvent event) {
- // Fires a Change and then ListChange event.
- fireListChange(event.diff);
- }
- });
-
- wrappedList.addStaleListener(new IStaleListener() {
- public void handleStale(StaleEvent event) {
- fireStale();
- }
- });
- }
-
- /**
- * Because this instance is immutable staleness cannot be changed.
- *
- */
- public void setStale(boolean stale) {
- throw new UnsupportedOperationException();
- }
-
- public boolean isStale() {
- return wrappedList.isStale();
- }
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableList.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableList.java
deleted file mode 100755
index 2825d315..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableList.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 147515
- *******************************************************************************/
-package org.eclipse.core.internal.databinding.observable.masterdetail;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.list.IListChangeListener;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.list.ListChangeEvent;
-import org.eclipse.core.databinding.observable.list.ObservableList;
-import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.databinding.observable.value.IValueChangeListener;
-import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
-import org.eclipse.core.runtime.Assert;
-
-/**
- * @since 3.2
- *
- */
-
-public class DetailObservableList extends ObservableList {
-
- private boolean updating = false;
-
- private IListChangeListener innerChangeListener = new IListChangeListener() {
- public void handleListChange(ListChangeEvent event) {
- if (!updating) {
- fireListChange(event.diff);
- }
- }
- };
-
- private Object currentOuterValue;
-
- private IObservableList innerObservableList;
-
- private IObservableFactory factory;
-
- private IObservableValue outerObservableValue;
-
- private Object detailType;
-
- /**
- * @param factory
- * @param outerObservableValue
- * @param detailType
- */
- public DetailObservableList(IObservableFactory factory,
- IObservableValue outerObservableValue, Object detailType) {
- super(outerObservableValue.getRealm(), new ArrayList(), detailType);
- this.factory = factory;
- this.outerObservableValue = outerObservableValue;
- this.detailType = detailType;
- updateInnerObservableValue(outerObservableValue);
-
- outerObservableValue.addValueChangeListener(outerChangeListener);
- }
-
- IValueChangeListener outerChangeListener = new IValueChangeListener() {
- public void handleValueChange(ValueChangeEvent event) {
- List oldList = new ArrayList(wrappedList);
- updateInnerObservableValue(outerObservableValue);
- fireListChange(Diffs.computeListDiff(oldList, wrappedList));
- }
- };
-
- private void updateInnerObservableValue(
- IObservableValue outerObservableValue) {
- currentOuterValue = outerObservableValue.getValue();
- if (innerObservableList != null) {
- innerObservableList.removeListChangeListener(innerChangeListener);
- innerObservableList.dispose();
- }
- if (currentOuterValue == null) {
- innerObservableList = null;
- wrappedList = new ArrayList();
- } else {
- this.innerObservableList = (IObservableList) factory
- .createObservable(currentOuterValue);
- wrappedList = innerObservableList;
-
- if (detailType != null) {
- Object innerValueType = innerObservableList.getElementType();
- Assert.isTrue(getElementType().equals(innerValueType),
- "Cannot change value type in a nested observable list"); //$NON-NLS-1$
- }
- innerObservableList.addListChangeListener(innerChangeListener);
- }
- }
-
- public void dispose() {
- super.dispose();
-
- if (outerObservableValue != null) {
- outerObservableValue.removeValueChangeListener(outerChangeListener);
- outerObservableValue.dispose();
- }
- if (innerObservableList != null) {
- innerObservableList.removeListChangeListener(innerChangeListener);
- innerObservableList.dispose();
- }
- currentOuterValue = null;
- factory = null;
- innerObservableList = null;
- innerChangeListener = null;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableSet.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableSet.java
deleted file mode 100755
index f81d2f4a..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableSet.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.databinding.observable.masterdetail;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
-import org.eclipse.core.databinding.observable.set.IObservableSet;
-import org.eclipse.core.databinding.observable.set.ISetChangeListener;
-import org.eclipse.core.databinding.observable.set.ObservableSet;
-import org.eclipse.core.databinding.observable.set.SetChangeEvent;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.databinding.observable.value.IValueChangeListener;
-import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
-import org.eclipse.core.runtime.Assert;
-
-/**
- * @since 3.2
- *
- */
-public class DetailObservableSet extends ObservableSet {
-
- private boolean updating = false;
-
- private ISetChangeListener innerChangeListener = new ISetChangeListener() {
- public void handleSetChange(SetChangeEvent event) {
- if (!updating) {
- fireSetChange(event.diff);
- }
- }
- };
-
- private Object currentOuterValue;
-
- private IObservableSet innerObservableSet;
-
- private IObservableValue outerObservableValue;
-
- private IObservableFactory factory;
-
- /**
- * @param factory
- * @param outerObservableValue
- * @param detailType
- */
- public DetailObservableSet(IObservableFactory factory,
- IObservableValue outerObservableValue, Object detailType) {
- super(outerObservableValue.getRealm(), new HashSet(), detailType);
- this.factory = factory;
- this.outerObservableValue = outerObservableValue;
- updateInnerObservableValue(outerObservableValue);
-
- outerObservableValue.addValueChangeListener(outerChangeListener);
- }
-
- IValueChangeListener outerChangeListener = new IValueChangeListener() {
- public void handleValueChange(ValueChangeEvent event) {
- Set oldSet = new HashSet(wrappedSet);
- updateInnerObservableValue(outerObservableValue);
- fireSetChange(Diffs.computeSetDiff(oldSet, wrappedSet));
- }
- };
-
- private void updateInnerObservableValue(
- IObservableValue outerObservableValue) {
- currentOuterValue = outerObservableValue.getValue();
- if (innerObservableSet != null) {
- innerObservableSet.removeSetChangeListener(innerChangeListener);
- innerObservableSet.dispose();
- }
- if (currentOuterValue == null) {
- innerObservableSet = null;
- wrappedSet = new HashSet();
- } else {
- this.innerObservableSet = (IObservableSet) factory
- .createObservable(currentOuterValue);
- wrappedSet = innerObservableSet;
-
- if (elementType != null) {
- Object innerValueType = innerObservableSet.getElementType();
-
- Assert.isTrue(elementType.equals(innerValueType),
- "Cannot change value type in a nested observable set"); //$NON-NLS-1$
- }
-
- innerObservableSet.addSetChangeListener(innerChangeListener);
- }
- }
-
- public void dispose() {
- super.dispose();
-
- if (outerObservableValue != null) {
- outerObservableValue.removeValueChangeListener(outerChangeListener);
- outerObservableValue.dispose();
- }
- if (innerObservableSet != null) {
- innerObservableSet.removeSetChangeListener(innerChangeListener);
- innerObservableSet.dispose();
- }
- currentOuterValue = null;
- factory = null;
- innerObservableSet = null;
- innerChangeListener = null;
- }
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableValue.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableValue.java
deleted file mode 100755
index 9e1abeb2..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableValue.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164653
- * Brad Reynolds - bug 147515
- *******************************************************************************/
-package org.eclipse.core.internal.databinding.observable.masterdetail;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
-import org.eclipse.core.databinding.observable.value.AbstractObservableValue;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.databinding.observable.value.IValueChangeListener;
-import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
-import org.eclipse.core.runtime.Assert;
-
-/**
- * @since 1.0
- *
- */
-public class DetailObservableValue extends AbstractObservableValue {
-
- private boolean updating = false;
-
- private IValueChangeListener innerChangeListener = new IValueChangeListener() {
- public void handleValueChange(ValueChangeEvent event) {
- if (!updating) {
- fireValueChange(event.diff);
- }
- }
- };
-
- private Object currentOuterValue;
-
- private IObservableValue innerObservableValue;
-
- private Object detailType;
-
- private IObservableValue outerObservableValue;
-
- private IObservableFactory factory;
-
- /**
- * @param outerObservableValue
- * @param factory
- * @param detailType
- */
- public DetailObservableValue(IObservableValue outerObservableValue,
- IObservableFactory factory, Object detailType) {
- super(outerObservableValue.getRealm());
- this.factory = factory;
- this.detailType = detailType;
- this.outerObservableValue = outerObservableValue;
- updateInnerObservableValue(outerObservableValue);
-
- outerObservableValue.addValueChangeListener(outerChangeListener);
- }
-
- IValueChangeListener outerChangeListener = new IValueChangeListener() {
- public void handleValueChange(ValueChangeEvent event) {
- Object oldValue = doGetValue();
- updateInnerObservableValue(outerObservableValue);
- fireValueChange(Diffs.createValueDiff(oldValue, doGetValue()));
- }
- };
-
- private void updateInnerObservableValue(
- IObservableValue outerObservableValue) {
- currentOuterValue = outerObservableValue.getValue();
- if (innerObservableValue != null) {
- innerObservableValue.removeValueChangeListener(innerChangeListener);
- innerObservableValue.dispose();
- }
- if (currentOuterValue == null) {
- innerObservableValue = null;
- } else {
- this.innerObservableValue = (IObservableValue) factory
- .createObservable(currentOuterValue);
- Object innerValueType = innerObservableValue.getValueType();
-
- if (detailType != null) {
- Assert
- .isTrue(detailType.equals(innerValueType),
- "Cannot change value type in a nested observable value"); //$NON-NLS-1$
- }
- innerObservableValue.addValueChangeListener(innerChangeListener);
- }
- }
-
- public void doSetValue(Object value) {
- if (innerObservableValue != null)
- innerObservableValue.setValue(value);
- }
-
- public Object doGetValue() {
- return innerObservableValue == null ? null : innerObservableValue
- .getValue();
- }
-
- public Object getValueType() {
- return detailType;
- }
-
- public void dispose() {
- super.dispose();
-
- if (outerObservableValue != null) {
- outerObservableValue.removeValueChangeListener(outerChangeListener);
- outerObservableValue.dispose();
- }
- if (innerObservableValue != null) {
- innerObservableValue.removeValueChangeListener(innerChangeListener);
- innerObservableValue.dispose();
- }
- currentOuterValue = null;
- factory = null;
- innerObservableValue = null;
- innerChangeListener = null;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/AbstractObservableTree.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/AbstractObservableTree.java
deleted file mode 100644
index b5c5271d..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/AbstractObservableTree.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164134
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding.observable.tree;
-
-import org.eclipse.core.databinding.observable.AbstractObservable;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.util.Policy;
-import org.eclipse.core.internal.databinding.BindingMessages;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.core.runtime.Status;
-
-/**
- * @since 3.3
- *
- */
-public abstract class AbstractObservableTree extends AbstractObservable
- implements IObservableTree {
-
- private boolean stale;
-
- private ListenerList treeListeners = new ListenerList(ListenerList.IDENTITY);
-
- /**
- * @param realm
- */
- public AbstractObservableTree(Realm realm) {
- super(realm);
- }
-
- public void addChild(TreePath parentPath, Object childElement) {
- throw new UnsupportedOperationException();
- }
-
- public void addTreeChangeListener(ITreeChangeListener listener) {
- treeListeners.add(listener);
- }
-
- public int getChildCount(TreePath parentPath) {
- return getChildren(parentPath).length;
- }
-
- public boolean hasChildren(TreePath parentPath) {
- return getChildCount(parentPath) > 0;
- }
-
- public void insertChild(TreePath parentPath, int index, Object childElement) {
- throw new UnsupportedOperationException();
- }
-
- public boolean isLazy() {
- return false;
- }
-
- public boolean isOrdered() {
- return false;
- }
-
- public void removeChild(TreePath parentPath, Object childElement) {
- throw new UnsupportedOperationException();
- }
-
- public void removeChild(TreePath parentPath, int index) {
- throw new UnsupportedOperationException();
- }
-
- public void removeTreeChangeListener(ITreeChangeListener listener) {
- treeListeners.remove(listener);
- }
-
- public void setChildCount(TreePath parentPath, int count) {
- throw new UnsupportedOperationException();
- }
-
- public void setChildren(TreePath parentPath, Object[] children) {
- throw new UnsupportedOperationException();
- }
-
- public void updateChildren(IChildrenUpdate update) {
- TreePath parent = update.getParent();
- Object[] children = getChildren(parent);
- for (int i = 0; i < update.getLength(); i++) {
- int targetIndex = update.getOffset() + i;
- if (targetIndex < children.length) {
- update.setChild(children[targetIndex], targetIndex);
- } else {
- update
- .setStatus(new Status(
- IStatus.WARNING,
- Policy.JFACE_DATABINDING,
- IStatus.OK,
- BindingMessages
- .getString(BindingMessages.INDEX_OUT_OF_RANGE),
- null));
- }
- }
- update.done();
- }
-
- public void updateChildrenCount(IChildrenCountUpdate update) {
- TreePath[] parents = update.getParents();
- for (int i = 0; i < parents.length; i++) {
- update.setChildCount(parents[i], getChildCount(parents[i]));
- }
- update.done();
- }
-
- public void updateHasChildren(IHasChildrenUpdate update) {
- TreePath[] parents = update.getElements();
- for (int i = 0; i < parents.length; i++) {
- update.setHasChilren(parents[i], hasChildren(parents[i]));
- }
- update.done();
- }
-
- public boolean isStale() {
- return stale;
- }
-
- /**
- * @param stale
- */
- public void setStale(boolean stale) {
- this.stale = stale;
- if (stale) {
- fireStale();
- }
- }
-
- protected void fireTreeChange(TreeDiff diff) {
- // fire general change event first
- fireChange();
-
- Object[] listeners = treeListeners.getListeners();
- TreeChangeEvent event = new TreeChangeEvent(this, diff);
- for (int i = 0; i < listeners.length; i++) {
- ((ITreeChangeListener) listeners[i]).handleTreeChange(event);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/IChildrenCountUpdate.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/IChildrenCountUpdate.java
deleted file mode 100644
index 5672de42..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/IChildrenCountUpdate.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.databinding.observable.tree;
-
-/**
- * Request monitor used to collect the number of children for an element in a lazy
- * observable tree.
- *
- * @since 3.3
- */
-public interface IChildrenCountUpdate extends IViewerUpdate {
-
- /**
- * Returns the parent elements that children counts have been requested for
- * as tree paths. An empty path identifies the root element.
- *
- * @return parent elements as tree paths
- */
- public TreePath[] getParents();
-
- /**
- * Sets the number of children for the given parent.
- *
- * @param parentPath
- * parent element or empty path for root element
- * @param numChildren
- * number of children
- */
- public void setChildCount(TreePath parentPath, int numChildren);
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/IChildrenUpdate.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/IChildrenUpdate.java
deleted file mode 100644
index 6fafcd87..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/IChildrenUpdate.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.databinding.observable.tree;
-
-/**
- * Context sensitive children update request for a parent and subrange of its
- * children.
- *
- * @since 3.3
- */
-public interface IChildrenUpdate extends IViewerUpdate {
-
- /**
- * Returns the parent element that children are being requested for
- * as a tree path. An empty path identifies the root element.
- *
- * @return parent element as a tree path
- */
- public TreePath getParent();
-
- /**
- * Returns the offset at which children have been requested for. This is
- * the index of the first child being requested.
- *
- * @return offset at which children have been requested for
- */
- public int getOffset();
-
- /**
- * Returns the number of children requested.
- *
- * @return number of children requested
- */
- public int getLength();
-
- /**
- * Sets the child for this request's parent at the given offset.
- *
- * @param child child
- * @param index child offset
- *
- * TODO: what to do with <code>null</code>
- */
- public void setChild(Object child, int index);
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/IHasChildrenUpdate.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/IHasChildrenUpdate.java
deleted file mode 100644
index f9a88cdd..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/IHasChildrenUpdate.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.databinding.observable.tree;
-
-/**
- * Context sensitive update request for whether elements have children.
- *
- * @since 3.3
- */
-public interface IHasChildrenUpdate extends IViewerUpdate {
-
- /**
- * The elements this request is for specified as tree paths. An empty path
- * identifies the root element.
- *
- * @return elements as tree paths
- */
- public TreePath[] getElements();
-
- /**
- * Sets whether the given element has children.
- *
- * @param element
- * tree path to element, or empty for root element
- * @param hasChildren
- * whether it has children
- */
- public void setHasChilren(TreePath element, boolean hasChildren);
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/IObservableTree.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/IObservableTree.java
deleted file mode 100644
index 778c3620..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/IObservableTree.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding.observable.tree;
-
-import org.eclipse.core.databinding.observable.IObservable;
-
-/**
- *
- * A tree whose changes can be tracked by tree change listeners. If the tree is
- * ordered ({@link #isOrdered()}), the order of children for a given tree path
- * matters, and tree change notifications will always specify indices. If the
- * tree is unordered, the children of a tree path are an unordered set and
- * indices in change notifications are not specified.
- *
- * <p>
- * This interface is not intended to be implemented by clients. Clients should
- * instead subclass one of the framework classes that implement this interface.
- * Note that direct implementers of this interface outside of the framework will
- * be broken in future releases when methods are added to this interface.
- * </p>
- *
- * @since 1.1
- */
-public interface IObservableTree extends IObservable {
-
- /**
- * Element that can be returned from synchronous getters if this observable
- * tree is lazy.
- */
- public final static Object UNKNOWN_ELEMENT = new Object();
-
- /**
- * @param listener
- */
- public void addTreeChangeListener(ITreeChangeListener listener);
-
- /**
- * @param listener
- */
- public void removeTreeChangeListener(ITreeChangeListener listener);
-
- /**
- * Returns whether the order of children for a given parent is important. If
- * this tree is ordered, tree change notifications will always specify
- * indices.
- *
- * @return true if the order of children for a given parent is important
- */
- public boolean isOrdered();
-
- /**
- * Returns whether this tree is optimized to fetch subsets of children
- * lazily and possibly asynchronously. Implies {@link #isOrdered()}.
- *
- * @return true if this tree
- */
- public boolean isLazy();
-
- /**
- * @param parentPath
- * @return the children at the given parent path
- */
- public Object[] getChildren(TreePath parentPath);
-
- /**
- * @param parentPath
- * @param children
- */
- public void setChildren(TreePath parentPath, Object[] children);
-
- /**
- * @param parentPath
- * @param childElement
- */
- public void addChild(TreePath parentPath, Object childElement);
-
- /**
- * @param parentPath
- * @param childElement
- */
- public void removeChild(TreePath parentPath, Object childElement);
-
- /**
- * @param parentPath
- * @param index
- * @param childElement
- */
- public void insertChild(TreePath parentPath, int index, Object childElement);
-
- /**
- * @param parentPath
- * @param index
- */
- public void removeChild(TreePath parentPath, int index);
-
- /**
- * @param parentPath
- * @return <code>true</code> if the element at the given path has children
- */
- public boolean hasChildren(TreePath parentPath);
-
- /**
- * @param parentPath
- * @return the number of children of the element at the given path
- */
- public int getChildCount(TreePath parentPath);
-
- /**
- * @param parentPath
- * @param count
- */
- public void setChildCount(TreePath parentPath, int count);
-
- /**
- * Updates the number of children for the given parent elements in the
- * specified request.
- *
- * @param update specifies counts to update and stores result
- */
- public void updateChildrenCount(IChildrenCountUpdate update);
-
- /**
- * Updates children as requested by the update.
- *
- * @param update specifies children to update and stores result
- */
- public void updateChildren(IChildrenUpdate update);
-
- /**
- * Updates whether elements have children.
- *
- * @param update specifies elements to update and stores result
- */
- public void updateHasChildren(IHasChildrenUpdate update);
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/ITreeChangeListener.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/ITreeChangeListener.java
deleted file mode 100644
index 7a35f993..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/ITreeChangeListener.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding.observable.tree;
-
-/**
- * @since 3.3
- *
- */
-public interface ITreeChangeListener {
- /**
- * @param event
- */
- void handleTreeChange(TreeChangeEvent event);
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/IViewerUpdate.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/IViewerUpdate.java
deleted file mode 100644
index c446c7d1..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/IViewerUpdate.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.databinding.observable.tree;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * A context sensitive viewer update request.
- *
- * @since 3.3
- */
-public interface IViewerUpdate extends IProgressMonitor {
-
- /**
- * Sets the status of this request, possibly <code>null</code>.
- * When a request fails, the status indicates why the request failed.
- * A <code>null</code> status is considered to be successful.
- *
- * @param status request status
- */
- public void setStatus(IStatus status);
-
- /**
- * Returns the status of this request, or <code>null</code>.
- *
- * @return request status or <code>null</code>
- */
- public IStatus getStatus();
-
- /**
- * Returns the model element corresponding to the given tree path.
- * Returns the root element for the empty path.
- *
- * @param path viewer tree path
- * @return corresponding model element
- */
- public Object getElement(TreePath path);
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/TreeChangeEvent.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/TreeChangeEvent.java
deleted file mode 100644
index e376e728..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/TreeChangeEvent.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding.observable.tree;
-
-import java.util.EventObject;
-
-/**
- * @since 3.3
- *
- */
-public class TreeChangeEvent extends EventObject {
-
- /**
- *
- */
- private static final long serialVersionUID = -3198503763995528027L;
- /**
- *
- */
- public TreeDiff diff;
-
- /**
- * @param source
- * @param diff
- */
- public TreeChangeEvent(IObservableTree source, TreeDiff diff) {
- super(source);
- this.diff = diff;
- }
-
- /**
- * @return the observable tree from which this event originated
- */
- public IObservableTree getObservable() {
- return (IObservableTree) getSource();
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/TreeDiff.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/TreeDiff.java
deleted file mode 100644
index 92a8933f..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/TreeDiff.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding.observable.tree;
-
-import org.eclipse.core.databinding.observable.IDiff;
-
-/**
- * Describes the difference between two trees as a tree of tree diff nodes.
- *
- * @since 1.1
- *
- */
-public abstract class TreeDiff extends TreeDiffNode implements IDiff {
-
- /**
- * Returns the tree path (possibly empty) of the parent, or
- * <code>null</code> if the underlying tree is not lazy and never contains
- * duplicate elements.
- *
- * @return the tree path (possibly empty) of the unchanged parent, or
- * <code>null</code>
- */
- public abstract TreePath getParentPath();
-
- /**
- * @param visitor
- */
- public void accept(TreeDiffVisitor visitor) {
- doAccept(visitor, getParentPath());
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/TreeDiffNode.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/TreeDiffNode.java
deleted file mode 100644
index 7179290a..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/TreeDiffNode.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding.observable.tree;
-
-/**
- * @since 1.1
- *
- */
-public abstract class TreeDiffNode {
-
- /**
- *
- */
- public final static int NO_CHANGE = 0x00;
-
- /**
- *
- */
- public final static int ADDED = 0x01;
-
- /**
- *
- */
- public final static int REMOVED = 0x02;
-
- /**
- *
- */
- public final static int REPLACED = 0x03;
-
- /**
- *
- */
- public static final TreeDiffNode[] NO_CHILDREN = new TreeDiffNode[0];
-
- /**
- *
- */
- public static final int INDEX_UNKNOWN = -1;
-
- /**
- * @return the change type
- */
- public abstract int getChangeType();
-
- /**
- * @return the element that was removed, or the replaced element
- */
- public abstract Object getOldElement();
-
- /**
- * @return the element that was not changed, added, or the replacement
- * element
- */
- public abstract Object getNewElement();
-
- /**
- * @return the index at which the element was added, removed, or replaced
- */
- public abstract int getIndex();
-
- /**
- * Returns the child tree diff objects that describe changes to children. If
- * the change type is REMOVED, there will be no children.
- *
- * @return the nodes representing changes to children
- */
- public abstract TreeDiffNode[] getChildren();
-
- protected void doAccept(TreeDiffVisitor visitor, TreePath parentPath) {
- TreePath currentPath = parentPath.createChildPath(getNewElement());
- boolean recurse = visitor.visit(this, currentPath);
- if (recurse) {
- TreeDiffNode[] children = getChildren();
- for (int i = 0; i < children.length; i++) {
- TreeDiffNode child = children[i];
- child.doAccept(visitor, currentPath);
- }
- }
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/TreeDiffVisitor.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/TreeDiffVisitor.java
deleted file mode 100644
index b988405a..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/TreeDiffVisitor.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding.observable.tree;
-
-/**
- * @since 3.3
- *
- */
-public abstract class TreeDiffVisitor {
-
- /**
- * Visits the given tree diff.
- *
- * @param diff
- * the diff to visit
- * @param currentPath
- * the current path (the diff's element is the last segment of
- * the path)
- *
- * @return <code>true</code> if the tree diff's children should be
- * visited; <code>false</code> if they should be skipped.
- */
- public abstract boolean visit(TreeDiffNode diff, TreePath currentPath);
-}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/TreePath.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/TreePath.java
deleted file mode 100644
index 574f0a18..00000000
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/tree/TreePath.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.databinding.observable.tree;
-
-import org.eclipse.core.runtime.Assert;
-
-/**
- * A tree path denotes a model element in a tree viewer. Tree path objects have
- * value semantics. A model element is represented by a path of elements in the
- * tree from the root element to the leaf element.
- * <p>
- * Clients may instantiate this class. Not intended to be subclassed.
- * </p>
- *
- * @since 3.2
- */
-public final class TreePath {
-
- /**
- * Constant for representing an empty tree path.
- */
- public static final TreePath EMPTY = new TreePath(new Object[0]);
-
- private Object[] segments;
-
- private int hash;
-
- /**
- * Constructs a path identifying a leaf node in a tree.
- *
- * @param segments
- * path of elements to a leaf node in a tree, starting with the
- * root element
- */
- public TreePath(Object[] segments) {
- Assert.isNotNull(segments);
- for (int i = 0; i < segments.length; i++) {
- Assert.isNotNull(segments[i]);
- }
- this.segments = segments;
- }
-
- /**
- * Returns the element at the specified index in this path.
- *
- * @param index
- * index of element to return
- * @return element at the specified index
- */
- public Object getSegment(int index) {
- return segments[index];
- }
-
- /**
- * Returns the number of elements in this path.
- *
- * @return the number of elements in this path
- */
- public int getSegmentCount() {
- return segments.length;
- }
-
- /**
- * Returns the first element in this path.
- *
- * @return the first element in this path
- */
- public Object getFirstSegment() {
- if (segments.length == 0) {
- return null;
- }
- return segments[0];
- }
-
- /**
- * Returns the last element in this path.
- *
- * @return the last element in this path
- */
- public Object getLastSegment() {
- if (segments.length == 0) {
- return null;
- }
- return segments[segments.length - 1];
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object other) {
- if (!(other instanceof TreePath)) {
- return false;
- }
- TreePath otherPath = (TreePath) other;
- if (segments.length != otherPath.segments.length) {
- return false;
- }
- for (int i = 0; i < segments.length; i++) {
- if (!segments[i].equals(otherPath.segments[i])) {
- return false;
- }
- }
- return true;
- }
-
- public int hashCode() {
- if (hash == 0) {
- for (int i = 0; i < segments.length; i++) {
- hash += segments[i].hashCode();
- }
- }
- return hash;
- }
-
- /**
- * Returns whether this path starts with the same segments as the given
- * path, using the given comparer to compare segments.
- *
- * @param treePath
- * path to compare to
- * @return whether the given path is a prefix of this path, or the same as
- * this path
- */
- public boolean startsWith(TreePath treePath) {
- int thisSegmentCount = getSegmentCount();
- int otherSegmentCount = treePath.getSegmentCount();
- if (otherSegmentCount == thisSegmentCount) {
- return equals(treePath);
- }
- if (otherSegmentCount > thisSegmentCount) {
- return false;
- }
- for (int i = 0; i < otherSegmentCount; i++) {
- Object otherSegment = treePath.getSegment(i);
- if (!otherSegment.equals(segments[i])) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * Returns a copy of this tree path with one segment removed from the end,
- * or <code>null</code> if this tree path has no segments.
- * @return a tree path
- */
- public TreePath getParentPath() {
- int segmentCount = getSegmentCount();
- if (segmentCount <= 1) {
- return null;
- }
- Object[] parentSegments = new Object[segmentCount - 1];
- System.arraycopy(segments, 0, parentSegments, 0, segmentCount - 1);
- return new TreePath(parentSegments);
- }
-
- /**
- * Returns a copy of this tree path with the given segment added at the end.
- * @param newSegment
- * @return a tree path
- */
- public TreePath createChildPath(Object newSegment) {
- int segmentCount = getSegmentCount();
- Object[] childSegments = new Object[segmentCount + 1];
- if(segmentCount>0) {
- System.arraycopy(segments, 0, childSegments, 0, segmentCount);
- }
- childSegments[segmentCount] = newSegment;
- return new TreePath(childSegments);
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/.classpath b/bundles/org.eclipse.core.databinding/.classpath
deleted file mode 100644
index ce739334..00000000
--- a/bundles/org.eclipse.core.databinding/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.core.databinding/.cvsignore b/bundles/org.eclipse.core.databinding/.cvsignore
deleted file mode 100644
index ba077a40..00000000
--- a/bundles/org.eclipse.core.databinding/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/bundles/org.eclipse.core.databinding/.project b/bundles/org.eclipse.core.databinding/.project
deleted file mode 100644
index 20fa52a7..00000000
--- a/bundles/org.eclipse.core.databinding/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.core.databinding</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.core.databinding/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.core.databinding/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index f1b4e192..00000000
--- a/bundles/org.eclipse.core.databinding/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Thu Feb 01 22:16:54 EST 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.core.databinding/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.core.databinding/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 59509e09..00000000
--- a/bundles/org.eclipse.core.databinding/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Thu Aug 24 15:24:48 EDT 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.ui.exception.name=e
-org.eclipse.jdt.ui.gettersetter.use.is=true
-org.eclipse.jdt.ui.javadoc=true
-org.eclipse.jdt.ui.overrideannotation=true
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return Returns the ${bare_field_name}.\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} The ${bare_field_name} to set.\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*******************************************************************************\n * Copyright (c) ${year} IBM Corporation and others.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * IBM Corporation - initial API and implementation\n ******************************************************************************/\n</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @since 3.3\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template></templates>
diff --git a/bundles/org.eclipse.core.databinding/.settings/org.eclipse.pde.prefs b/bundles/org.eclipse.core.databinding/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index fee4b048..00000000
--- a/bundles/org.eclipse.core.databinding/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,14 +0,0 @@
-#Sat Mar 19 15:31:31 EST 2005
-compilers.p.deprecated=0
-compilers.p.illegal-att-value=0
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=0
-compilers.p.unknown-attribute=0
-compilers.p.unknown-class=0
-compilers.p.unknown-element=1
-compilers.p.unknown-resource=0
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.p.unused-element-or-attribute=1
-compilers.use-project=true
-eclipse.preferences.version=1
diff --git a/bundles/org.eclipse.core.databinding/META-INF/MANIFEST.MF b/bundles/org.eclipse.core.databinding/META-INF/MANIFEST.MF
deleted file mode 100644
index b951e468..00000000
--- a/bundles/org.eclipse.core.databinding/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,29 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.core.databinding
-Bundle-Version: 1.0.0.qualifier
-Bundle-ClassPath: .
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.core.databinding,
- org.eclipse.core.databinding.conversion;x-internal:=false,
- org.eclipse.core.databinding.observable,
- org.eclipse.core.databinding.observable.list;x-internal:=false,
- org.eclipse.core.databinding.observable.map,
- org.eclipse.core.databinding.observable.masterdetail,
- org.eclipse.core.databinding.observable.set;x-internal:=false,
- org.eclipse.core.databinding.observable.tree,
- org.eclipse.core.databinding.observable.value;x-internal:=false,
- org.eclipse.core.databinding.util,
- org.eclipse.core.databinding.validation;x-internal:=false,
- org.eclipse.core.internal.databinding;x-internal:=true,
- org.eclipse.core.internal.databinding.observable;x-internal:=true,
- org.eclipse.core.internal.databinding.observable.masterdetail;x-friends:="org.eclipse.jface.tests.databinding",
- org.eclipse.core.internal.databinding.observable.tree;x-friends:="org.eclipse.jface.databinding,org.eclipse.jface.tests.databinding"
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.1.0,4.0.0)";resolution:=optional,
- org.eclipse.equinox.common;bundle-version="[3.2.0,4.0.0)";resolution:=optional
-Import-Package: com.ibm.icu.text
-Bundle-RequiredExecutionEnvironment: J2SE-1.4,
- CDC-1.0/Foundation-1.0
diff --git a/bundles/org.eclipse.core.databinding/about.html b/bundles/org.eclipse.core.databinding/about.html
deleted file mode 100644
index 46023304..00000000
--- a/bundles/org.eclipse.core.databinding/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.core.databinding/build.properties b/bundles/org.eclipse.core.databinding/build.properties
deleted file mode 100644
index 67499e3d..00000000
--- a/bundles/org.eclipse.core.databinding/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are 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:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = .,\
- META-INF/,\
- plugin.properties,\
- about.html
-output.databinding.jar = bin/
-src.includes = about.html
-source.. = src/
diff --git a/bundles/org.eclipse.core.databinding/component.xml b/bundles/org.eclipse.core.databinding/component.xml
deleted file mode 100644
index 82e5e40a..00000000
--- a/bundles/org.eclipse.core.databinding/component.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<component xmlns="http://eclipse.org/component"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://eclipse.org/component ../component.xsd "
- name="JFace Data Binding">
- <plugin id="org.eclipse.core.databinding" />
-
- <package name="org.eclipse.jface.internal.provisional.databinding" >
- <type name="BindingException" subclass="false"/>
- <type name="BindSpec"/>
- <type name="ChangeEvent" subclass="false"/>
- <type name="ConditionalUpdatableValue"/>
- <type name="Converter"/>
- <type name="DataBinding" subclass="false"/>
- <type name="DefaultCellModifier" subclass="false"/>
- <type name="IBindSpec" implement="false"/>
- <type name="IBindSupportFactory"/>
- <type name="IChangeEvent" implement="false"/>
- <type name="IChangeListener"/>
- <type name="IConverter"/>
- <type name="IDataBindingContext" implement="false"/>
- <type name="IdentityConverter" subclass="false"/>
- <type name="IUpdatable" implement="false"/>
- <type name="IUpdatableCollection"/>
- <type name="IUpdatableFactory"/>
- <type name="IUpdatableValue"/>
- <type name="IValidationContext" implement="false"/>
- <type name="IValidator"/>
- <type name="PropertyDescription" subclass="false"/>
- <type name="SettableValue"/>
- <type name="TableViewerDescription" subclass="false"/>
- <type name="Updatable"/>
- <type name="UpdatableValue"/>
- </package>
-
- <component-depends unrestricted="true"/>
-
-</component>
diff --git a/bundles/org.eclipse.core.databinding/plugin.properties b/bundles/org.eclipse.core.databinding/plugin.properties
deleted file mode 100644
index e18f3957..00000000
--- a/bundles/org.eclipse.core.databinding/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are 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:
-# IBM Corporation - initial API and implementation
-###############################################################################
-pluginName = JFace Data Binding
-providerName = Eclipse.org
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/AggregateValidationStatus.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/AggregateValidationStatus.java
deleted file mode 100644
index df9cbaac..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/AggregateValidationStatus.java
+++ /dev/null
@@ -1,201 +0,0 @@
-package org.eclipse.core.databinding;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.databinding.observable.IChangeListener;
-import org.eclipse.core.databinding.observable.IObservableCollection;
-import org.eclipse.core.databinding.observable.IStaleListener;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.value.ComputedValue;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.databinding.observable.value.IValueChangeListener;
-import org.eclipse.core.databinding.util.Policy;
-import org.eclipse.core.internal.databinding.BindingMessages;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.Status;
-
-/**
- * This class can be used to aggregate status values from a data binding context
- * into a single status value. Instances of this class can be used as an
- * observable value with a value type of {@link IStatus}, or the static methods
- * can be called directly if an aggregated status result is only needed once.
- *
- * @since 1.0
- *
- */
-public final class AggregateValidationStatus implements IObservableValue {
-
- private IObservableValue implementation;
-
- /**
- * Constant denoting an aggregation strategy that merges multiple non-OK
- * status objects in a {@link MultiStatus}. Returns an OK status result if
- * all statuses from the given bindings are the an OK status. Returns a
- * single status if there is only one non-OK status.
- *
- * @see #getStatusMerged(Collection)
- */
- public static final int MERGED = 1;
-
- /**
- * Constant denoting an aggregation strategy that always returns the most
- * severe status from the given bindings. If there is more than one status
- * at the same severity level, it picks the first one it encounters.
- *
- * @see #getStatusMaxSeverity(Collection)
- */
- public static final int MAX_SEVERITY = 2;
-
- /**
- * @param bindings
- * an observable collection containing elements of type IStatus
- * @param strategy
- * a strategy constant, one of {@link #MERGED} or
- * {@link #MAX_SEVERITY}.
- */
- public AggregateValidationStatus(final IObservableCollection bindings,
- int strategy) {
- if (strategy == MERGED) {
- implementation = new ComputedValue() {
- protected Object calculate() {
- return getStatusMerged(bindings);
- }
- };
- } else {
- implementation = new ComputedValue() {
- protected Object calculate() {
- return getStatusMaxSeverity(bindings);
- }
- };
- }
- }
-
- /**
- * @param listener
- * @see org.eclipse.core.databinding.observable.IObservable#addChangeListener(org.eclipse.core.databinding.observable.IChangeListener)
- */
- public void addChangeListener(IChangeListener listener) {
- implementation.addChangeListener(listener);
- }
-
- /**
- * @param listener
- * @see org.eclipse.core.databinding.observable.IObservable#addStaleListener(org.eclipse.core.databinding.observable.IStaleListener)
- */
- public void addStaleListener(IStaleListener listener) {
- implementation.addStaleListener(listener);
- }
-
- /**
- * @param listener
- * @see org.eclipse.core.databinding.observable.value.IObservableValue#addValueChangeListener(org.eclipse.core.databinding.observable.value.IValueChangeListener)
- */
- public void addValueChangeListener(IValueChangeListener listener) {
- implementation.addValueChangeListener(listener);
- }
-
- public void dispose() {
- implementation.dispose();
- }
-
- public Realm getRealm() {
- return implementation.getRealm();
- }
-
- public Object getValue() {
- return implementation.getValue();
- }
-
- public Object getValueType() {
- return implementation.getValueType();
- }
-
- public boolean isStale() {
- return implementation.isStale();
- }
-
- public void removeChangeListener(IChangeListener listener) {
- implementation.removeChangeListener(listener);
- }
-
- public void removeStaleListener(IStaleListener listener) {
- implementation.removeStaleListener(listener);
- }
-
- public void removeValueChangeListener(IValueChangeListener listener) {
- implementation.removeValueChangeListener(listener);
- }
-
- public void setValue(Object value) {
- implementation.setValue(value);
- }
-
- /**
- * Returns a status object that merges multiple non-OK status objects in a
- * {@link MultiStatus}. Returns an OK status result if all statuses from
- * the given bindings are the an OK status. Returns a single status if there
- * is only one non-OK status.
- *
- * @param bindings
- * a collection of bindings
- * @return a merged status
- */
- public static IStatus getStatusMerged(Collection bindings) {
- List statuses = new ArrayList();
- for (Iterator it = bindings.iterator(); it.hasNext();) {
- Binding binding = (Binding) it.next();
- IStatus status = (IStatus) binding
- .getValidationStatus().getValue();
- if (!status.isOK()) {
- statuses.add(status);
- }
- }
- if (statuses.size() == 1) {
- return (IStatus) statuses.get(0);
- }
- if (!statuses.isEmpty()) {
- MultiStatus result = new MultiStatus(
- Policy.JFACE_DATABINDING,
- 0,
- BindingMessages
- .getString(BindingMessages.MULTIPLE_PROBLEMS),
- null);
- for (Iterator it = statuses.iterator(); it.hasNext();) {
- IStatus status = (IStatus) it.next();
- result.merge(status);
- }
- return result;
- }
- return Status.OK_STATUS;
- }
-
- /**
- * Returns a status that always returns the most severe status from the
- * given bindings. If there is more than one status at the same severity
- * level, it picks the first one it encounters.
- *
- * @param bindings
- * a collection of bindings
- * @return a single status reflecting the most severe status from the given
- * bindings
- */
- public static IStatus getStatusMaxSeverity(Collection bindings) {
- int maxSeverity = IStatus.OK;
- IStatus maxStatus = Status.OK_STATUS;
- for (Iterator it = bindings.iterator(); it.hasNext();) {
- Binding binding = (Binding) it.next();
- IStatus status = (IStatus) binding
- .getValidationStatus().getValue();
- if (status.getSeverity() > maxSeverity) {
- maxSeverity = status.getSeverity();
- maxStatus = status;
- }
- }
- return maxStatus;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/BindSpec.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/BindSpec.java
deleted file mode 100644
index 4f00fc23..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/BindSpec.java
+++ /dev/null
@@ -1,471 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 159768
- ******************************************************************************/
-
-package org.eclipse.core.databinding;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.Map;
-
-import org.eclipse.core.databinding.conversion.IConverter;
-import org.eclipse.core.databinding.observable.IObservable;
-import org.eclipse.core.databinding.validation.IValidator;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-/**
- * Data binding has three concerns, the target, the model, and the data flow
- * between the target and model. BindSpec contains values and settings that
- * influence how bindings manage this data flow between the target and the
- * model.
- *
- * @since 1.0
- */
-public class BindSpec {
- /**
- * Policy constant specifying that update or validation should occur
- * automatically whenever a bound observable object generates a change
- * event.
- */
- public static final Integer POLICY_AUTOMATIC = new Integer(1);
-
- /**
- * Policy constant specifying that update or validation should only occur
- * when explicitly requested by calling
- * {@link Binding#updateModelFromTarget()} or
- * {@link Binding#updateTargetFromModel()}.
- */
- public static final Integer POLICY_EXPLICIT = new Integer(2);
-
- /**
- * Empty validator array to represent no validators.
- */
- private static final IValidator[] NO_VALIDATORS = new IValidator[0];
-
- /*
- * Default validator implementation that always returns an OK status.
- */
- static class DefaultValidator implements IValidator {
- public IStatus validate(Object value) {
- return Status.OK_STATUS;
- }
- }
-
- /*
- * Default converter implementation, does not perform any conversion.
- */
- static class DefaultConverter implements IConverter {
-
- private final Object toType;
-
- private final Object fromType;
-
- /**
- * @param fromType
- * @param toType
- */
- DefaultConverter(Object fromType, Object toType) {
- this.toType = toType;
- this.fromType = fromType;
- }
-
- public Object convert(Object fromObject) {
- return fromObject;
- }
-
- public Object getFromType() {
- return fromType;
- }
-
- public Object getToType() {
- return toType;
- }
- }
-
- private IConverter modelToTargetConverter;
-
- private Integer modelUpdatePolicy;
-
- private IConverter targetToModelConverter;
-
- private Integer targetUpdatePolicy;
-
- private boolean updateModel = true;
-
- private boolean updateTarget = true;
-
- private Map targetValidatorsContainers;
-
- private Map modelValidatorsContainers;
-
- private Integer targetValidatePosition;
-
- private Integer modelValidatePosition;
-
- /**
- * Default constructor. Does not set any values.
- */
- public BindSpec() {
- }
-
- /**
- * Returns the converter to be used, or <code>null</code> if a default
- * converter should be used.
- *
- * @return the converter, or <code>null</code>
- */
- public IConverter getModelToTargetConverter() {
- return modelToTargetConverter;
- }
-
- /**
- * Returns the update policy to be used for updating the model when the
- * target has changed
- *
- * @return the update policy, or <code>null</code> if unspecified
- *
- * @see BindSpec#POLICY_AUTOMATIC
- * @see BindSpec#POLICY_EXPLICIT
- */
- public Integer getModelUpdatePolicy() {
- return modelUpdatePolicy;
- }
-
- /**
- * Returns the converter to be used, or <code>null</code> if a default
- * converter should be used.
- *
- * @return the converter, or <code>null</code>
- */
- public IConverter getTargetToModelConverter() {
- return targetToModelConverter;
- }
-
- /**
- * Returns the update policy to be used for updating the target when the
- * model has changed
- *
- * @return the update policy, or <code>null</code> if unspecified
- *
- * @see BindSpec#POLICY_AUTOMATIC
- * @see BindSpec#POLICY_EXPLICIT
- */
- public Integer getTargetUpdatePolicy() {
- return targetUpdatePolicy;
- }
-
- /**
- * @return true if the model should be updated by the binding
- */
- public boolean isUpdateModel() {
- return updateModel;
- }
-
- /**
- * @return true if the target should be updated by the binding
- */
- public boolean isUpdateTarget() {
- return updateTarget;
- }
-
- /**
- * Sets the model to target converter.
- *
- * @param converter
- * <code>null</code> allowed and will remove all existing
- * converters.
- * @return this BindSpec, to enable chaining of method calls
- */
- public BindSpec setModelToTargetConverter(IConverter converter) {
- modelToTargetConverter = converter;
- return this;
- }
-
- /**
- * @param modelUpdatePolicy
- * The modelUpdatePolicy to set.
- * @return this BindSpec, to enable chaining of method calls
- */
- public BindSpec setModelUpdatePolicy(Integer modelUpdatePolicy) {
- this.modelUpdatePolicy = modelUpdatePolicy;
- return this;
- }
-
- /**
- * Sets the target to model converter.
- *
- * @param converter
- * <code>null</code> allowed and will remove all existing
- * converters.
- * @return this BindSpec, to enable chaining of method calls
- */
- public BindSpec setTargetToModelConverter(IConverter converter) {
- targetToModelConverter = converter;
- return this;
- }
-
- /**
- * @param targetUpdatePolicy
- * The targetUpdatePolicy to set.
- * @return this BindSpec, to enable chaining of method calls
- */
- public BindSpec setTargetUpdatePolicy(Integer targetUpdatePolicy) {
- this.targetUpdatePolicy = targetUpdatePolicy;
- return this;
- }
-
- /**
- * @param updateModel
- * The updateModel to set.
- * @return this BindSpec, to enable chaining of method calls
- */
- public BindSpec setUpdateModel(boolean updateModel) {
- this.updateModel = updateModel;
- return this;
- }
-
- /**
- * @param updateTarget
- * The updateTarget to set.
- * @return this BindSpec, to enable chaining of method calls
- */
- public BindSpec setUpdateTarget(boolean updateTarget) {
- this.updateTarget = updateTarget;
- return this;
- }
-
- /**
- * Fills any values not explicitly set with defaults. This implementation of
- * {@link #fillBindSpecDefaults(IObservable, IObservable)} creates
- * validators that always return {@link Status#OK_STATUS}, and converters
- * that perform no conversion.
- *
- * @param target
- * @param model
- */
- protected void fillBindSpecDefaults(IObservable target, IObservable model) {
- if (getModelToTargetConverter() == null) {
- setModelToTargetConverter(new DefaultConverter(Object.class,
- Object.class));
- }
- if (getTargetToModelConverter() == null) {
- setTargetToModelConverter(new DefaultConverter(Object.class,
- Object.class));
- }
-
- for (Iterator it = BindingEvent.PIPELINE_CONSTANTS.keySet().iterator(); it
- .hasNext();) {
- Integer position = (Integer) it.next();
- addTargetValidator(position.intValue(), new DefaultValidator());
- addModelValidator(position.intValue(), new DefaultValidator());
- }
- }
-
- /**
- * @return pipeline position to automatically validate up to on every target
- * change when {@link #getModelUpdatePolicy()} is
- * {@link BindSpec#POLICY_EXPLICIT}, can be <code>null</code>
- */
- public Integer getTargetValidatePolicy() {
- return targetValidatePosition;
- }
-
- /**
- * Sets the position to validate to automatically on every target change
- * when the {@link #getModelUpdatePolicy()} is
- * {@link BindSpec#POLICY_EXPLICIT}.
- *
- * @param pipelinePosition
- * BindingEvent.PIPELINE_* constant, <code>null</code> for
- * default
- * @return this BindSpec, to enable chaining of method calls
- */
- public BindSpec setTargetValidatePolicy(Integer pipelinePosition) {
- this.targetValidatePosition = pipelinePosition;
- return this;
- }
-
- /**
- * Registers a target validator to be run after the provided
- * <code>pipelinePosition</code>. Multiple instances of the same
- * validator can be registered for the same position.
- *
- * @param pipelinePosition
- * BindingEvent.PIPELINE_* constant
- * @param validator
- * @return this BindSpec, to enable chaining of method calls
- */
- public BindSpec addTargetValidator(int pipelinePosition,
- IValidator validator) {
- if (validator == null) {
- throw new IllegalArgumentException("Argument 'validator' was null"); //$NON-NLS-1$
- }
-
- if (targetValidatorsContainers == null) {
- targetValidatorsContainers = new HashMap();
- }
-
- addValidator(pipelinePosition, validator, targetValidatorsContainers);
-
- return this;
- }
-
- /**
- * Retrieves the target validators to be executed at the provided
- * <code>pipelinePosition</code>.
- *
- * @param pipelinePosition
- * BindingEvent.PIPELINE_* constant
- * @return validators, empty array if none are registered
- */
- public IValidator[] getTargetValidators(int pipelinePosition) {
- return getValidators(pipelinePosition, targetValidatorsContainers);
- }
-
- /**
- * Registers a model validator to be run after the provided
- * <code>pipelinePosition</code>. Multiple instances of the same
- * validator can be registered for the same position.
- *
- * @param pipelinePosition
- * BindingEvent.PIPELINE_* constant
- * @param validator
- * @return this BindSpec, to enable chaining of method calls
- */
- public BindSpec addModelValidator(int pipelinePosition, IValidator validator) {
- if (validator == null) {
- throw new IllegalArgumentException("Argument 'validator' was null"); //$NON-NLS-1$
- }
-
- if (modelValidatorsContainers == null) {
- modelValidatorsContainers = new HashMap();
- }
-
- addValidator(pipelinePosition, validator, modelValidatorsContainers);
-
- return this;
- }
-
- /**
- * Retrieves the model validators to be executed at the provided
- * <code>pipelinePosition</code>.
- *
- * @param pipelinePosition
- * BindingEvent.PIPELINE_* constant
- * @return validators, empty array if none are registered
- */
- public IValidator[] getModelValidators(int pipelinePosition) {
- return getValidators(pipelinePosition, modelValidatorsContainers);
- }
-
- /**
- * Registers a validator.
- *
- * @param position
- * @param validator
- * @param validatorsContainers
- */
- private static void addValidator(int position, IValidator validator,
- Map validatorsContainers) {
- Assert.isNotNull(validator);
- Assert.isNotNull(validatorsContainers);
-
- Integer positionInteger = new Integer(position);
- ValidatorsContainer container = null;
- container = (ValidatorsContainer) validatorsContainers
- .get(positionInteger);
-
- if (container == null) {
- validatorsContainers.put(positionInteger, new ValidatorsContainer(
- position, validator));
- } else {
- container.addValidator(validator);
- }
- }
-
- /**
- * @param position
- * @param validatorsContainers
- * can be <code>null</code>
- * @return validators, empty array if none found
- */
- private static IValidator[] getValidators(int position,
- Map validatorsContainers) {
- IValidator[] result = NO_VALIDATORS;
-
- if (validatorsContainers != null) {
- ValidatorsContainer container = (ValidatorsContainer) validatorsContainers
- .get(new Integer(position));
-
- if (container != null) {
- result = container.getValidators();
- }
- }
-
- return result;
- }
-
- /**
- * Stores validators along with the pipeline position to validate.
- *
- */
- private static class ValidatorsContainer {
- final int pipelinePosition;
- final LinkedList validators = new LinkedList();
-
- ValidatorsContainer(int pipelinePosition, IValidator validator) {
- this.pipelinePosition = pipelinePosition;
- addValidator(validator);
- }
-
- void addValidator(IValidator validator) {
- validators.add(validator);
- }
-
- IValidator[] getValidators() {
- IValidator[] result = NO_VALIDATORS;
-
- if (validators != null) {
- result = (IValidator[]) validators
- .toArray(new IValidator[validators.size()]);
- }
-
- return result;
- }
- }
-
- /**
- * @return pipeline position to automatically validate up to on every model
- * change when {@link #getTargetUpdatePolicy()} is
- * {@link BindSpec#POLICY_EXPLICIT}, can be <code>null</code>
- */
- public Integer getModelValidatePolicy() {
- return modelValidatePosition;
- }
-
- /**
- * Sets the position to validate to automatically on every model change
- * when the {@link #getTargetUpdatePolicy()} is
- * {@link BindSpec#POLICY_EXPLICIT}.
- *
- * @param pipelinePosition
- * BindingEvent.PIPELINE_* constant, <code>null</code> for
- * default
- * @return this BindSpec, to enable chaining of method calls
- */
- public BindSpec setModelValidatePolicy(Integer pipelinePosition) {
- this.modelValidatePosition = pipelinePosition;
- return this;
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/Binding.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/Binding.java
deleted file mode 100644
index b625a69b..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/Binding.java
+++ /dev/null
@@ -1,249 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 159768
- ******************************************************************************/
-
-package org.eclipse.core.databinding;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.databinding.observable.IDiff;
-import org.eclipse.core.databinding.observable.IObservable;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-/**
- * This abstract class represents a binding between a model and a target. Newly
- * created instances need to be added to a data binding context using
- * {@link #init(DataBindingContext)}.
- *
- * @since 1.0
- */
-public abstract class Binding {
-
- private List bindingEventListeners = new ArrayList();
-
- protected DataBindingContext context;
- private IObservable target;
- private IObservable model;
-
- /**
- * Creates a new binding.
- *
- * @param target target observable
- * @param model model observable
- */
- public Binding(IObservable target, IObservable model) {
- this.target = target;
- this.model = model;
- }
-
- /**
- * Initializes this binding with the given context and adds it to the list
- * of bindings of the context.
- * <p>
- * Subclasses may extend, but must call the super implementation.
- * </p>
- *
- * @param context
- */
- public final void init(DataBindingContext context) {
- this.context = context;
- preInit();
- context.addBinding(this);
- postInit();
- }
-
- /**
- * Called by {@link #init(DataBindingContext)} after setting
- * {@link #context} but before adding this binding to the context.
- * Subclasses may use this method to perform initialization that could not
- * be done in the constructor. Care should be taken not to cause any events
- * while running this method.
- */
- protected abstract void preInit();
-
- /**
- * Called by {@link #init(DataBindingContext)} after adding this binding to
- * the context. Subclasses may use this method to perform initialization
- * that may cause events to be fired, including BindingEvents that are
- * forwarded to the data binding context.
- */
- protected abstract void postInit();
-
- /**
- * This method allows subclasses to fill bind spec defaults. Usually called
- * from subclass constructors.
- *
- * @param bindSpec
- * @param target
- * @param model
- */
- protected void fillBindSpecDefaults(BindSpec bindSpec, IObservable target, IObservable model) {
- bindSpec.fillBindSpecDefaults(target, model);
- }
-
- /**
- * Add a listener to the set of listeners that will be notified when an
- * event occurs in the data flow pipeline that is managed by this Binding.
- *
- * @param listener
- * The listener to add.
- */
- public void addBindingEventListener(IBindingListener listener) {
- synchronized (bindingEventListeners) {
- bindingEventListeners.add(listener);
- }
- }
-
- /**
- * Fires the given event to the binding event listeners, exiting early when
- * one of the listeners flags a validation error. If no listener flags a
- * validation error, the data binding context's binding listeners will be
- * notified in the same manner.
- *
- * @param event
- * @return the validation error, or null
- */
- protected IStatus fireBindingEvent(BindingEvent event) {
- IStatus result = Status.OK_STATUS;
- IBindingListener[] listeners;
- synchronized (bindingEventListeners) {
- listeners = (IBindingListener[]) bindingEventListeners
- .toArray(new IBindingListener[bindingEventListeners.size()]);
- }
- for (int i = 0; i < listeners.length; i++) {
- IBindingListener listener = listeners[i];
- result = listener.handleBindingEvent(event);
- if (!result.isOK())
- break;
- }
- if (result.isOK())
- result = context.fireBindingEvent(event);
- return result;
- }
-
- /**
- * @return an observable value containing the current partial validation
- * status
- */
- public abstract IObservableValue getPartialValidationStatus();
-
- /**
- * @return an observable value containing the current validation status
- */
- public abstract IObservableValue getValidationStatus();
-
- /**
- * Removes a listener from the set of listeners that will be notified when
- * an event occurs in the data flow pipeline that is managed by this
- * Binding.
- *
- * @param listener
- * The listener to remove.
- */
- public void removeBindingEventListener(IBindingListener listener) {
- synchronized (bindingEventListeners) {
- bindingEventListeners.remove(listener);
- }
- }
-
- /**
- * Updates the model's state from the target's state at the next reasonable
- * opportunity. There is no guarantee that the state will have been updated
- * by the time this call returns.
- */
- public abstract void updateModelFromTarget();
-
- /**
- * Updates the target's state from the model's state at the next reasonable
- * opportunity. There is no guarantee that the state will have been updated
- * by the time this call returns.
- */
- public abstract void updateTargetFromModel();
-
- /**
- * Disposes of this Binding. Subclasses may extend, but must call super.dispose().
- */
- public void dispose() {
- bindingEventListeners = null;
- if (context != null) {
- context.removeBinding(this);
- }
- context = null;
- target = null;
- model = null;
- disposed = true;
- }
-
- protected boolean disposed = false;
-
- /**
- * @return true if the binding has been disposed. false otherwise.
- */
- public boolean isDisposed() {
- return disposed;
- }
-
- /**
- * @param context
- */
- /* package */ void setDataBindingContext(DataBindingContext context) {
- this.context = context;
- }
-
- /**
- * Invokes the pipeline positions from the target to the model up to and
- * including the provided <code>pipelinePosition</code> but no further.
- *
- * @param pipelinePosition BindingEvent.PIPELINE_* constant
- */
- public abstract void updateModelFromTarget(int pipelinePosition);
-
- /**
- * Invokes the pipeline posistions from the model to the target up to and
- * including the provided <code>pipelinePosition</code> but no further.
- *
- * @param pipelinePosition BindingEvent.PIPELINE_* constant
- */
- public abstract void updateTargetFromModel(int pipelinePosition);
-
- /**
- * Returns a new BindingEvent object.
- *
- * @param diff
- * a diff object representing the change
- * @param copyType
- * one of {@link BindingEvent#EVENT_COPY_TO_MODEL} or
- * {@link BindingEvent#EVENT_COPY_TO_TARGET}
- * @param pipelinePosition
- * The initial processing pipeline position.
- * @return the new binding event
- */
- protected BindingEvent createBindingEvent(IDiff diff, int copyType, int pipelinePosition) {
- return new BindingEvent(this, diff, copyType, pipelinePosition);
- }
-
- /**
- * @return target observable
- */
- public IObservable getTarget() {
- return target;
- }
-
- /**
- * @return model observable
- */
- public IObservable getModel() {
- return model;
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/BindingEvent.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/BindingEvent.java
deleted file mode 100644
index fd7ad44f..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/BindingEvent.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 159768
- ******************************************************************************/
-
-package org.eclipse.core.databinding;
-
-import java.util.Collections;
-import java.util.EventObject;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.databinding.observable.IDiff;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-/**
- * Instances of this class provide a description of a particular event that
- * occurred in a binding. It is passed to
- * {@link IBindingListener#handleBindingEvent(BindingEvent)}.
- * <p>
- * This class is not intended to be subclassed by clients.
- * </p>
- *
- * @since 1.0
- */
-public class BindingEvent extends EventObject {
-
- /**
- *
- */
- private static final long serialVersionUID = 8410698137884587257L;
-
- /**
- * The binding object from which this event originated.
- */
- public final Binding binding;
-
- /**
- * The diff describing the change, or <code>null</code> if no diff is
- * available.
- */
- public final IDiff diff;
-
- /**
- * The direction in which data is copied, either EVENT_COPY_TO_TARGET or
- * EVENT_COPY_TO_MODEL.
- */
- public final int copyType;
-
- /**
- * The position in the processing pipeline where this event is occuring. One
- * of the PIPELINE_* constants. The order in which these events occur may be
- * version or implementation dependent. The contract is that these events
- * will accurately reflect the internal processing that the data binding
- * framework is currently performing.
- * <p>
- * Although this value is not declared final, changing it does not have any
- * effect.
- */
- public int pipelinePosition;
-
- /**
- * The current validation status (if there is one).
- */
- public IStatus validationStatus = Status.OK_STATUS;
-
- /**
- * Holds the value that was retrieved from the source observable. Setting
- * the value of this field changes the value that will be processed by all
- * subsequent steps in the data flow pipeline.
- */
- public Object originalValue = null;
-
- /**
- * Holds the value that will be copied into the final observable. This value
- * is null if the original value has not been converted into the final
- * observable's data type or if no conversion will be performed. Setting the
- * value of this field changes the value that will be processed by all
- * subsequent steps in the data flow pipeline.
- */
- public Object convertedValue = null;
-
- /**
- * A constant indicating that this event is occuring during a copy from
- * model to target.
- */
- public static final int EVENT_COPY_TO_TARGET = 0;
-
- /**
- * A constant indicating that this event is occuring during a copy from
- * target to model.
- */
- public static final int EVENT_COPY_TO_MODEL = 1;
-
- /**
- * A constant indication that this event is occurring immediately after a
- * value changing event fired of an observable.
- */
- public static final int PIPELINE_VALUE_CHANGING = 1;
-
- /**
- * A constant indicating that this event is occuring immedately after the
- * value to copy has been gotten from its observable.
- */
- public static final int PIPELINE_AFTER_GET = 2;
-
- /**
- * A constant indicating that this event is occuring immedately after the
- * original value has been converted to the other observable's data type.
- */
- public static final int PIPELINE_AFTER_CONVERT = 3;
-
- /**
- * A constant indicating that this event is occurring immediately before the
- * converted value has been set/changed on the observable.
- */
- public static final int PIPELINE_BEFORE_CHANGE = 4;
-
- /**
- * A constant indicating that this event is occuring immedately after the
- * converted value has been set/changed on the observable.
- */
- public static final int PIPELINE_AFTER_CHANGE = 5;
-
- /**
- * A Map of Integer --> String mapping the integer constants for the
- * pipeline events defined in this class to their String symbols. Can be
- * used for debugging purposes.
- */
- public static final Map PIPELINE_CONSTANTS;
- static {
- Map constants = new HashMap();
- constants.put(new Integer(BindingEvent.PIPELINE_VALUE_CHANGING),
- "PIPELINE_VALUE_CHANGING"); //$NON-NLS-1$
- constants.put(new Integer(BindingEvent.PIPELINE_AFTER_GET),
- "PIPELINE_AFTER_GET"); //$NON-NLS-1$
- constants.put(new Integer(BindingEvent.PIPELINE_AFTER_CONVERT),
- "PIPELINE_AFTER_CONVERT"); //$NON-NLS-1$
- constants.put(new Integer(BindingEvent.PIPELINE_BEFORE_CHANGE),
- "PIPELINE_BEFORE_CHANGE"); //$NON-NLS-1$
- constants.put(new Integer(BindingEvent.PIPELINE_AFTER_CHANGE),
- "PIPELINE_AFTER_CHANGE"); //$NON-NLS-1$
- PIPELINE_CONSTANTS = Collections.unmodifiableMap(constants);
- }
-
- /**
- * A Map of Integer --> String mapping the integer constants for the event
- * constants defined in this class to their String symbols. Can be used for
- * debugging purposes.
- */
- public static final Map EVENT_CONSTANTS;
- static {
- Map constants = new HashMap();
- constants.put(new Integer(BindingEvent.EVENT_COPY_TO_TARGET),
- "EVENT_COPY_TO_TARGET"); //$NON-NLS-1$
- constants.put(new Integer(BindingEvent.EVENT_COPY_TO_MODEL),
- "EVENT_COPY_TO_MODEL"); //$NON-NLS-1$
- EVENT_CONSTANTS = Collections.unmodifiableMap(constants);
- }
-
- /**
- * (Non-API Method) Construct a BindingEvent.
- *
- * @param binding
- * @param diff
- * @param copyType
- * @param pipelinePosition
- * The initial processing pipeline position.
- */
- /* package */BindingEvent(Binding binding, IDiff diff, int copyType,
- int pipelinePosition) {
- super(binding);
- this.binding = binding;
- this.diff = diff;
- this.copyType = copyType;
- this.pipelinePosition = pipelinePosition;
- }
-
- /**
- * Returns a string representation of this event for debugging purposes. The
- * format of the string representation is not guaranteed to remain the same.
- */
- public String toString() {
- StringBuffer result = new StringBuffer();
- result.append(EVENT_CONSTANTS.get(new Integer(copyType))
- + ": Diff(" + diff + "): "); //$NON-NLS-1$ //$NON-NLS-2$
- result.append("("); //$NON-NLS-1$
- result.append(PIPELINE_CONSTANTS.get(new Integer(pipelinePosition)));
- result.append(")"); //$NON-NLS-1$
- return result.toString();
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/BindingException.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/BindingException.java
deleted file mode 100644
index 46a01f69..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/BindingException.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.databinding;
-
-import java.io.PrintStream;
-import java.io.PrintWriter;
-
-/**
- * An unchecked exception indicating a binding problem.
- *
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
- * part of a work in progress. There is no guarantee that this API will remain
- * unchanged during the 3.2 release cycle. Please do not use this API without
- * consulting with the Platform/UI team.
- * </p>
- *
- * @since 1.0
- */
-public class BindingException extends RuntimeException {
-
- /*
- * Needed because all Throwables are Serializable.
- */
- private static final long serialVersionUID = -4092828452936724217L;
- private Throwable cause;
-
- /**
- * Creates a new BindingException with the given message.
- *
- * @param message
- */
- public BindingException(String message) {
- super(message);
- }
-
- /**
- * Creates a new BindingException with the given message and cause.
- *
- * @param message
- * @param cause
- */
- public BindingException(String message, Throwable cause) {
- super(message);
- this.cause = cause;
- }
-
- public void printStackTrace(PrintStream err) {
- super.printStackTrace(err);
- if (cause != null) {
- err.println("caused by:"); //$NON-NLS-1$
- cause.printStackTrace(err);
- }
- }
-
- public void printStackTrace(PrintWriter err) {
- super.printStackTrace(err);
- if (cause != null) {
- err.println("caused by:"); //$NON-NLS-1$
- cause.printStackTrace(err);
- }
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/DataBindingContext.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/DataBindingContext.java
deleted file mode 100644
index 2f1684a2..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/DataBindingContext.java
+++ /dev/null
@@ -1,349 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 159539
- * Brad Reynolds - bug 140644
- * Brad Reynolds - bug 159940
- * Brad Reynolds - bug 116920, 159768
- *******************************************************************************/
-package org.eclipse.core.databinding;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.databinding.observable.Observables;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.list.WritableList;
-import org.eclipse.core.databinding.observable.map.IObservableMap;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.internal.databinding.ListBinding;
-import org.eclipse.core.internal.databinding.ValidationStatusMap;
-import org.eclipse.core.internal.databinding.ValueBinding;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-/**
- * A context for binding observable objects. This class is not intended to be
- * subclassed by clients.
- *
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
- * part of a work in progress. There is no guarantee that this API will remain
- * unchanged during the 3.2 release cycle. Please do not use this API without
- * consulting with the Platform/UI team.
- * </p>
- *
- * @since 1.0
- *
- */
-public class DataBindingContext {
- private List bindingEventListeners = new ArrayList();
-
- private WritableList bindings;
-
- /**
- * Unmodifiable version of {@link #bindings} for public exposure.
- */
- private IObservableList unmodifiableBindings;
-
- private IObservableMap validationStatusMap;
-
- private Realm validationRealm;
-
- /**
- * Creates a data binding context, using the current default realm for the
- * validation observables.
- *
- * @see Realm
- */
- public DataBindingContext() {
- this(Realm.getDefault());
- }
-
- /**
- * Creates a data binding context using the given realm for the validation
- * observables.
- *
- * @param validationRealm
- * the realm to be used for the validation observables
- *
- * @see Realm
- */
- public DataBindingContext(Realm validationRealm) {
- Assert.isNotNull(validationRealm);
- this.validationRealm = validationRealm;
- bindings = new WritableList(validationRealm);
-
- unmodifiableBindings = Observables.unmodifiableObservableList(bindings);
- validationStatusMap = new ValidationStatusMap(validationRealm,
- bindings, false);
- }
-
- /**
- * Add a listener to the set of listeners that will be notified when an
- * event occurs in the data flow pipeline managed by any binding in this
- * data binding context.
- *
- * @param listener
- * The listener to add.
- */
- public void addBindingEventListener(IBindingListener listener) {
- bindingEventListeners.add(listener);
- }
-
- /**
- * Binds two observable values using converters and validators as specified
- * in <code>bindSpec</code>. If <code>bindSpec</code> is <code>null</code>,
- * default converters and validators as defined by {@link DefaultBindSpec}
- * will be used.
- * <p>
- * The phases performed for a value binding occur in the following order for
- * each event: {@link BindingEvent#EVENT_COPY_TO_MODEL} and
- * {@link BindingEvent#EVENT_COPY_TO_TARGET}:
- * <ol>
- * <li>{@link BindingEvent#PIPELINE_VALUE_CHANGING} (target to model only)</li>
- * <li>{@link BindingEvent#PIPELINE_AFTER_GET}</li>
- * <li>{@link BindingEvent#PIPELINE_AFTER_CONVERT}</li>
- * <li>{@link BindingEvent#PIPELINE_BEFORE_CHANGE}</li>
- * <li>{@link BindingEvent#PIPELINE_AFTER_CHANGE}</li>
- * </ol>
- * Multiple validators are honored for every phase except <code>BindingEvent.PIPELINE_AFTER_CHANGE</code>
- * (it doesn't make sense to validate after the change is applied).
- * Validators will be invoked in the order that they are added and a failure
- * in validation will terminate pipeline processing. The provided validation
- * status will be propagated to {@link Binding#getValidationStatus()} and
- * {@link #getValidationStatusMap()}.
- * </p>
- * <p>
- * All phases perform the duty their name implies except <code>PIPELINE_BEFORE_CHANGE</code>;
- * it has no defined role in the pipeline. This phase is provided as a means
- * to perform validation during data entry but to defer other validation
- * until a copy to the model is to occur. A common use case where this is
- * employed is the editing of a model in a dialog. The model should not be
- * updated until OK/Apply is selected but common validation (e.g. type and
- * range checking) is to be performed as the user is interacting with the
- * UI. The following {@link BindSpec} configuration will setup such a use
- * case:
- *
- * <pre>
- * <code>
- * new DefaultBindSpec().setModelUpdatePolicy(BindSpec.POLICY_EXPLICIT)
- * .addTargetValidator(BindingEvent.PIPELINE_BEFORE_CHANGE,
- * new Validator());
- * </code>
- * </pre>
- *
- * By default with a
- * {@link BindSpec#setModelUpdatePolicy(Integer) model update policy} of
- * {@link BindSpec#POLICY_EXPLICIT} validation is ran up to and including
- * <code>BindingEvent.PIPELINE_AFTER_CONVERT</code> on every change of the
- * target. In the above example the provided validator will only be invoked
- * on an explicit model updates {@link Binding#updateModelFromTarget()}.
- * </p>
- *
- * @param targetObservableValue
- * @param modelObservableValue
- * @param bindSpec
- * the bind spec, or null. A bindSpec object must not be reused
- * or changed after it is passed to this method.
- * @return a Binding synchronizing the state of the two observables
- */
- public Binding bindValue(IObservableValue targetObservableValue,
- IObservableValue modelObservableValue, BindSpec bindSpec) {
- if (bindSpec == null) {
- bindSpec = new DefaultBindSpec();
- }
- Binding result = new ValueBinding(targetObservableValue,
- modelObservableValue, bindSpec);
- result.init(this);
- return result;
- }
-
- /**
- * Binds two observable lists using converter and validator as specified in
- * bindSpec. If bindSpec is null, default converters and validators as
- * defined by {@link DefaultBindSpec} will be used.
- * <p>
- * The phases performed for a list binding occur in the following order for
- * each event: {@link BindingEvent#EVENT_COPY_TO_MODEL} and
- * {@link BindingEvent#EVENT_COPY_TO_TARGET}:
- * <ol>
- * <li>{@link BindingEvent#PIPELINE_AFTER_GET}</li>
- * <li>{@link BindingEvent#PIPELINE_BEFORE_CHANGE}</li>
- * <li>{@link BindingEvent#PIPELINE_AFTER_CHANGE}</li>
- * </ol>
- * Multiple validators are honored for every phase except
- * <code>BindingEvent.PIPELINE_AFTER_CHANGE</code> (it doesn't make sense
- * to validate after the change is applied). Validators will be invoked in
- * the order that they are added and a failure in validation will terminate
- * pipeline processing. The provided validation status will be propagated to
- * {@link Binding#getValidationStatus()} and
- * {@link #getValidationStatusMap()}.
- * </p>
- * <p>
- * All phases perform the duty their name implies except
- * <code>PIPELINE_BEFORE_CHANGE</code>; it has no defined role in the
- * pipeline. This phase is provided as a means to perform validation during
- * data entry but to defer other validation until a copy to the model is to
- * occur. A common use case where this is employed is the editing of a model
- * in a dialog. The model should not be updated until OK/Apply is selected
- * but common validation (e.g. type and range checking) is to be performed
- * as the user is interacting with the UI. The following {@link BindSpec}
- * configuration will setup such a use case:
- *
- * <pre>
- * <code>
- * new DefaultBindSpec().setModelUpdatePolicy(BindSpec.POLICY_EXPLICIT)
- * .addTargetValidator(BindingEvent.PIPELINE_BEFORE_CHANGE,
- * new Validator());
- * </code>
- * </pre>
- * </p>
- *
- * @param targetObservableList
- * @param modelObservableList
- * @param bindSpec
- * the bind spec, or null. A bindSpec object must not be reused
- * or changed after it is passed to this method.
- * @return a Binding synchronizing the state of the two observables
- */
- public Binding bindList(IObservableList targetObservableList,
- IObservableList modelObservableList, BindSpec bindSpec) {
- if (bindSpec == null) {
- bindSpec = new DefaultBindSpec();
- }
- Binding result = new ListBinding(targetObservableList,
- modelObservableList, bindSpec);
- result.init(this);
- return result;
- }
-
- /**
- * Disposes of this data binding context and all bindings that were added to
- * this context.
- */
- public void dispose() {
- Binding[] bindingArray = (Binding[]) bindings.toArray(new Binding[bindings.size()]);
- for (int i = 0; i < bindingArray.length; i++) {
- bindingArray[i].dispose();
- }
- }
-
- /**
- * Fires a binding event to all binding listeners. To be called by bindings
- * in this data binding context.
- *
- * @param event
- * @return a status object
- */
- protected IStatus fireBindingEvent(BindingEvent event) {
- IStatus result = Status.OK_STATUS;
- for (Iterator bindingEventIter = bindingEventListeners.iterator(); bindingEventIter
- .hasNext();) {
- IBindingListener listener = (IBindingListener) bindingEventIter
- .next();
- result = listener.handleBindingEvent(event);
- if (!result.isOK())
- break;
- }
- return result;
- }
-
- /**
- * Returns an unmodifiable observable list with elements of type {@link Binding},
- * ordered by time of addition.
- *
- * @return the observable list containing all bindings
- */
- public IObservableList getBindings() {
- return unmodifiableBindings;
- }
-
- /**
- * Returns an observable map from bindings (type: {@link Binding}) to
- * statuses (type: {@link IStatus}). The keys of the map are the bindings
- * returned by {@link #getBindings()}, and the values are the current
- * validaion status objects for each binding.
- *
- * @return the observable map from bindings to status objects.
- */
- public IObservableMap getValidationStatusMap() {
- return validationStatusMap;
- }
-
- /**
- * Adds the given binding to this data binding context.
- *
- * @param binding
- * The binding to add.
- */
- /* package */ void addBinding(Binding binding) {
- bindings.add(binding);
- }
-
- /**
- * Removes a listener from the set of listeners that will be notified when
- * an event occurs in the data flow pipeline that is managed by any binding
- * created by this data binding context.
- *
- * @param listener
- * The listener to remove.
- */
- public void removeBindingEventListener(IBindingListener listener) {
- bindingEventListeners.remove(listener);
- }
-
- /**
- * Updates all model observable objects to reflect the current state of the
- * target observable objects.
- *
- */
- public void updateModels() {
- for (Iterator it = bindings.iterator(); it.hasNext();) {
- Binding binding = (Binding) it.next();
- binding.updateModelFromTarget();
- }
- }
-
- /**
- * Updates all target observable objects to reflect the current state of the
- * model observable objects.
- *
- */
- public void updateTargets() {
- for (Iterator it = bindings.iterator(); it.hasNext();) {
- Binding binding = (Binding) it.next();
- binding.updateTargetFromModel();
- }
- }
-
- /**
- * Removes the given binding.
- *
- * @param binding
- * @return <code>true</code> if was associated with the context,
- * <code>false</code> if not
- */
- /* package */ boolean removeBinding(Binding binding) {
- return bindings.remove(binding);
- }
-
- /**
- * Returns the validation realm.
- *
- * @return the realm for the validation observables
- * @see Realm
- */
- public Realm getValidationRealm() {
- return validationRealm;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/DefaultBindSpec.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/DefaultBindSpec.java
deleted file mode 100644
index 136f6e50..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/DefaultBindSpec.java
+++ /dev/null
@@ -1,585 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds (bug 135316)
- * Brad Reynolds - bug 116920, 159768
- *******************************************************************************/
-package org.eclipse.core.databinding;
-
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.core.databinding.conversion.IConverter;
-import org.eclipse.core.databinding.conversion.IdentityConverter;
-import org.eclipse.core.databinding.conversion.ToStringConverter;
-import org.eclipse.core.databinding.observable.IObservable;
-import org.eclipse.core.databinding.observable.IObservableCollection;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.databinding.util.Policy;
-import org.eclipse.core.databinding.validation.IValidator;
-import org.eclipse.core.databinding.validation.ObjectToPrimitiveValidator;
-import org.eclipse.core.databinding.validation.String2BytePrimitiveValidator;
-import org.eclipse.core.databinding.validation.String2ByteValidator;
-import org.eclipse.core.databinding.validation.String2DateValidator;
-import org.eclipse.core.databinding.validation.String2DoublePrimitiveValidator;
-import org.eclipse.core.databinding.validation.String2DoubleValidator;
-import org.eclipse.core.databinding.validation.String2FloatPrimitiveValidator;
-import org.eclipse.core.databinding.validation.String2FloatValidator;
-import org.eclipse.core.databinding.validation.String2IntegerPrimitiveValidator;
-import org.eclipse.core.databinding.validation.String2IntegerValidator;
-import org.eclipse.core.databinding.validation.String2LongPrimitiveValidator;
-import org.eclipse.core.databinding.validation.String2LongValidator;
-import org.eclipse.core.databinding.validation.String2ShortPrimitiveValidator;
-import org.eclipse.core.databinding.validation.String2ShortValidator;
-import org.eclipse.core.internal.databinding.ClassLookupSupport;
-import org.eclipse.core.internal.databinding.Pair;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-/**
- * This class provides default validators and converters for common data types
- * in form of a BindSpec subclass that can be passed to bind methods, e.g.
- * {@link DataBindingContext#bindValue(IObservableValue, IObservableValue, BindSpec)}.
- *
- * APIREVIEW We need to list all provided validators and converters.
- *
- * @since 1.0
- */
-public class DefaultBindSpec extends BindSpec {
-
- private static class ValidatorRegistry {
-
- private HashMap validators = new HashMap();
-
- /**
- * Adds the system-provided validators to the current validator
- * registry. This is done automatically for the validator registry
- * singleton.
- */
- private ValidatorRegistry() {
- // Standalone validators here...
- associate(String.class, Integer.TYPE,
- new String2IntegerPrimitiveValidator());
- associate(String.class, Byte.TYPE,
- new String2BytePrimitiveValidator());
- associate(String.class, Short.TYPE,
- new String2ShortPrimitiveValidator());
- associate(String.class, Long.TYPE,
- new String2LongPrimitiveValidator());
- associate(String.class, Float.TYPE,
- new String2FloatPrimitiveValidator());
- associate(String.class, Double.TYPE,
- new String2DoublePrimitiveValidator());
-
- associate(String.class, Integer.class,
- new String2IntegerValidator());
- associate(String.class, Byte.class, new String2ByteValidator());
- associate(String.class, Short.class, new String2ShortValidator());
- associate(String.class, Long.class, new String2LongValidator());
- associate(String.class, Float.class, new String2FloatValidator());
- associate(String.class, Double.class, new String2DoubleValidator());
- associate(String.class, Date.class, new String2DateValidator());
-
- associate(Integer.class, Integer.TYPE,
- new ObjectToPrimitiveValidator(Integer.TYPE));
- associate(Byte.class, Byte.TYPE, new ObjectToPrimitiveValidator(
- Byte.TYPE));
- associate(Short.class, Short.TYPE, new ObjectToPrimitiveValidator(
- Short.TYPE));
- associate(Long.class, Long.TYPE, new ObjectToPrimitiveValidator(
- Long.TYPE));
- associate(Float.class, Float.TYPE, new ObjectToPrimitiveValidator(
- Float.TYPE));
- associate(Double.class, Double.TYPE,
- new ObjectToPrimitiveValidator(Double.TYPE));
- associate(Boolean.class, Boolean.TYPE,
- new ObjectToPrimitiveValidator(Boolean.TYPE));
-
- associate(Object.class, Integer.TYPE,
- new ObjectToPrimitiveValidator(Integer.TYPE));
- associate(Object.class, Byte.TYPE, new ObjectToPrimitiveValidator(
- Byte.TYPE));
- associate(Object.class, Short.TYPE, new ObjectToPrimitiveValidator(
- Short.TYPE));
- associate(Object.class, Long.TYPE, new ObjectToPrimitiveValidator(
- Long.TYPE));
- associate(Object.class, Float.TYPE, new ObjectToPrimitiveValidator(
- Float.TYPE));
- associate(Object.class, Double.TYPE,
- new ObjectToPrimitiveValidator(Double.TYPE));
- associate(Object.class, Boolean.TYPE,
- new ObjectToPrimitiveValidator(Boolean.TYPE));
- }
-
- /**
- * Associate a particular validator that can validate the conversion
- * (fromClass, toClass)
- *
- * @param fromClass
- * The Class to convert from
- * @param toClass
- * The Class to convert to
- * @param validator
- * The IValidator
- */
- private void associate(Object fromClass, Object toClass,
- IValidator validator) {
- validators.put(new Pair(fromClass, toClass), validator);
- }
-
- /**
- * Return an IValidator for a specific fromClass and toClass.
- *
- * @param fromClass
- * The Class to convert from
- * @param toClass
- * The Class to convert to
- * @return An appropriate IValidator
- */
- private IValidator get(Object fromClass, Object toClass) {
- IValidator result = (IValidator) validators.get(new Pair(fromClass,
- toClass));
- if (result != null)
- return result;
- if (fromClass != null && toClass != null && fromClass == toClass) {
- return new IValidator() {
- public IStatus validate(Object value) {
- return Status.OK_STATUS;
- }
- };
- }
- return new IValidator() {
- public IStatus validate(Object value) {
- return Status.OK_STATUS;
- }
- };
- }
- }
-
- private static final String BOOLEAN_TYPE = "java.lang.Boolean.TYPE"; //$NON-NLS-1$
-
- private static final String BYTE_TYPE = "java.lang.Byte.TYPE"; //$NON-NLS-1$
-
- private static final String DOUBLE_TYPE = "java.lang.Double.TYPE"; //$NON-NLS-1$
-
- private static final String FLOAT_TYPE = "java.lang.Float.TYPE"; //$NON-NLS-1$
-
- private static final String INTEGER_TYPE = "java.lang.Integer.TYPE"; //$NON-NLS-1$
-
- private static final String LONG_TYPE = "java.lang.Long.TYPE"; //$NON-NLS-1$
-
- private static final String SHORT_TYPE = "java.lang.Short.TYPE"; //$NON-NLS-1$
-
- private Map converterMap;
-
- private ValidatorRegistry validatorRegistry = new ValidatorRegistry();
-
- private Class autoboxed(Class clazz) {
- if (clazz == Float.TYPE)
- return Float.class;
- else if (clazz == Double.TYPE)
- return Double.class;
- else if (clazz == Short.TYPE)
- return Short.class;
- else if (clazz == Integer.TYPE)
- return Integer.class;
- else if (clazz == Long.TYPE)
- return Long.class;
- else if (clazz == Byte.TYPE)
- return Byte.class;
- else if (clazz == Boolean.TYPE)
- return Boolean.class;
- return clazz;
- }
-
- private void checkAssignable(Object toType, Object fromType,
- String errorString) {
- Boolean assignableFromModelToModelConverter = isAssignableFromTo(
- fromType, toType);
- if (assignableFromModelToModelConverter != null
- && !assignableFromModelToModelConverter.booleanValue()) {
- throw new BindingException(errorString
- + " Expected: " + fromType + ", actual: " + toType); //$NON-NLS-1$//$NON-NLS-2$
- }
- }
-
- /**
- * Tries to create a converter that can convert from values of type
- * fromType. Returns <code>null</code> if no converter could be created.
- * Either toType or modelDescription can be <code>null</code>, but not
- * both.
- *
- * @param fromType
- * @param toType
- * @return an IConverter, or <code>null</code> if unsuccessful
- */
- protected IConverter createConverter(Object fromType, Object toType) {
- if (!(fromType instanceof Class) || !(toType instanceof Class)) {
- return new BindSpec.DefaultConverter(fromType, toType);
- }
- Class toClass = (Class) toType;
- if (toClass.isPrimitive()) {
- toClass = autoboxed(toClass);
- }
- Class fromClass = (Class) fromType;
- if (fromClass.isPrimitive()) {
- fromClass = autoboxed(fromClass);
- }
- if (!((Class) toType).isPrimitive()
- && toClass.isAssignableFrom(fromClass)) {
- return new IdentityConverter(fromClass, toClass);
- }
- if (((Class) fromType).isPrimitive() && ((Class) toType).isPrimitive()
- && fromType.equals(toType)) {
- return new IdentityConverter((Class) fromType, (Class) toType);
- }
- Map converterMap = getConverterMap();
- Class[] supertypeHierarchyFlattened = ClassLookupSupport
- .getTypeHierarchyFlattened(fromClass);
- for (int i = 0; i < supertypeHierarchyFlattened.length; i++) {
- Class currentFromClass = supertypeHierarchyFlattened[i];
- if (currentFromClass == toType) {
- // converting to toType is just a widening
- return new IdentityConverter(fromClass, toClass);
- }
- Pair key = new Pair(getKeyForClass(fromType, currentFromClass),
- getKeyForClass(toType, toClass));
- Object converterOrClassname = converterMap.get(key);
- if (converterOrClassname instanceof IConverter) {
- return (IConverter) converterOrClassname;
- } else if (converterOrClassname instanceof String) {
- String classname = (String) converterOrClassname;
- Class converterClass;
- try {
- converterClass = Class.forName(classname);
- IConverter result = (IConverter) converterClass
- .newInstance();
- converterMap.put(key, result);
- return result;
- } catch (Exception e) {
- Policy
- .getLog()
- .log(
- new Status(
- IStatus.ERROR,
- Policy.JFACE_DATABINDING,
- 0,
- "Error while instantiating default converter", e)); //$NON-NLS-1$
- }
- }
- }
- // Since we found no converter yet, try a "downcast" converter;
- // the IdentityConverter will automatically check the actual types at
- // runtime.
- if (fromClass.isAssignableFrom(toClass)) {
- return new IdentityConverter(fromClass, toClass);
- }
- return new BindSpec.DefaultConverter(fromType, toType);
- }
-
- /**
- * @param pipelinePosition
- * position BindingEvent.PIPELINE_* constant
- * @param modelType
- * @return an IValidator, or null if unsuccessful
- */
- protected IValidator createValidator(int pipelinePosition, Object modelType) {
- return new IValidator() {
- public IStatus validate(Object value) {
- return Status.OK_STATUS;
- }
- };
- }
-
- /**
- * Tries to create a validator that can validate values of type fromType.
- * Returns <code>null</code> if no validator could be created. Either
- * toType or modelDescription can be <code>null</code>, but not both.
- *
- * @param fromType
- * @param toType
- * @return an IValidator, or <code>null</code> if unsuccessful
- */
- protected IValidator createValidator(Object fromType, Object toType) {
- if (fromType == null || toType == null) {
- return new IValidator() {
-
- public IStatus validate(Object value) {
- return Status.OK_STATUS;
- }
- };
- }
-
- IValidator dataTypeValidator = findValidator(fromType, toType);
- if (dataTypeValidator == null) {
- throw new BindingException(
- "No IValidator is registered for conversions from " + fromType + " to " + toType); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return dataTypeValidator;
- }
-
- /**
- * This implementation of
- * {@link #fillBindSpecDefaults(IObservable, IObservable)}
- *
- * @param target
- * @param model
- */
- protected void fillBindSpecDefaults(IObservable target, IObservable model) {
- Object targetType = null;
- if (target instanceof IObservableValue) {
- targetType = ((IObservableValue) target).getValueType();
- } else if (target instanceof IObservableCollection) {
- targetType = ((IObservableCollection) target).getElementType();
- }
- Object modelType = null;
- if (model instanceof IObservableValue) {
- modelType = ((IObservableValue) model).getValueType();
- } else if (model instanceof IObservableCollection) {
- modelType = ((IObservableCollection) model).getElementType();
- }
-
- for (Iterator it = BindingEvent.PIPELINE_CONSTANTS.keySet().iterator(); it
- .hasNext();) {
- int position = ((Integer) it.next()).intValue();
-
- if (position == BindingEvent.PIPELINE_AFTER_GET) {
- // Assuming that the consumer wants to validate types after get
- if (getTargetValidators(position).length == 0) {
- addTargetValidator(position, createValidator(targetType,
- modelType));
- }
- if (getModelValidators(position).length == 0) {
- addModelValidator(position, createValidator(modelType,
- targetType));
- }
- } else {
- if (getTargetValidators(position).length == 0) {
- addTargetValidator(position, createValidator(position,
- modelType));
- }
- if (getModelValidators(position).length == 0) {
- addModelValidator(position, createValidator(position,
- targetType));
- }
- }
- }
-
- if (getModelToTargetConverter() == null) {
- setModelToTargetConverter(createConverter(modelType, targetType));
- }
- if (getTargetToModelConverter() == null) {
- setTargetToModelConverter(createConverter(targetType, modelType));
- }
- super.fillBindSpecDefaults(target, model);
- checkAssignable(getModelToTargetConverter().getFromType(), modelType,
- "model to target converter does not convert from model type."); //$NON-NLS-1$
- checkAssignable(getModelToTargetConverter().getToType(), targetType,
- "model to target converter does not convert to target type."); //$NON-NLS-1$
- checkAssignable(targetType, getTargetToModelConverter().getFromType(),
- "target to model converter does not convert from target type."); //$NON-NLS-1$
- checkAssignable(getTargetToModelConverter().getToType(), modelType,
- "target to model converter does not convert to model type."); //$NON-NLS-1$
- }
-
- private IValidator findValidator(Object fromType, Object toType) {
- // TODO string-based lookup of validator
- return validatorRegistry.get(fromType, toType);
- }
-
- private Map getConverterMap() {
- // using string-based lookup avoids loading of too many classes
- if (converterMap == null) {
- converterMap = new HashMap();
- converterMap
- .put(
- new Pair("java.util.Date", "java.lang.String"), "org.eclipse.core.databinding.conversion.ConvertDate2String"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- converterMap
- .put(
- new Pair("java.lang.String", "java.math.BigDecimal"), "org.eclipse.core.databinding.conversion.ConvertString2BigDecimal"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
- converterMap
- .put(
- new Pair("java.lang.String", "java.lang.Boolean"), "org.eclipse.core.databinding.conversion.ConvertString2Boolean"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
- converterMap
- .put(
- new Pair("java.lang.String", "java.lang.Byte"), "org.eclipse.core.databinding.conversion.ConvertString2Byte"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
- converterMap
- .put(
- new Pair("java.lang.String", "java.lang.Character"), "org.eclipse.core.databinding.conversion.ConvertString2Character"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
- converterMap
- .put(
- new Pair("java.lang.String", "java.util.Date"), "org.eclipse.core.databinding.conversion.ConvertString2Date"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
- converterMap
- .put(
- new Pair("java.lang.String", "java.lang.Double"), "org.eclipse.core.databinding.conversion.ConvertString2Double"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
- converterMap
- .put(
- new Pair("java.lang.String", "java.lang.Float"), "org.eclipse.core.databinding.conversion.ConvertString2Float"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
- converterMap
- .put(
- new Pair("java.lang.String", "java.lang.Integer"), "org.eclipse.core.databinding.conversion.ConvertString2Integer"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
- converterMap
- .put(
- new Pair("java.lang.String", "java.lang.Long"), "org.eclipse.core.databinding.conversion.ConvertString2Long"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
- converterMap
- .put(
- new Pair("java.lang.String", "java.lang.Short"), "org.eclipse.core.databinding.conversion.ConvertString2Short"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
- converterMap
- .put(
- new Pair("java.lang.Object", "java.lang.String"), "org.eclipse.core.databinding.conversion.ToStringConverter"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
-
- // Integer.TYPE
- converterMap
- .put(
- new Pair("java.lang.String", INTEGER_TYPE), "org.eclipse.core.databinding.conversion.ConvertString2IntegerPrimitive"); //$NON-NLS-1$ //$NON-NLS-2$
- converterMap
- .put(
- new Pair(INTEGER_TYPE, "java.lang.Integer"), new IdentityConverter(Integer.TYPE, Integer.class)); //$NON-NLS-1$
- converterMap
- .put(
- new Pair(INTEGER_TYPE, "java.lang.String"), new ToStringConverter(Integer.TYPE)); //$NON-NLS-1$
- converterMap
- .put(
- new Pair(INTEGER_TYPE, "java.lang.Object"), new IdentityConverter(Integer.TYPE, Object.class)); //$NON-NLS-1$
-
- // Byte.TYPE
- converterMap
- .put(
- new Pair("java.lang.String", BYTE_TYPE), "org.eclipse.core.databinding.conversion.ConvertString2BytePrimitive"); //$NON-NLS-1$ //$NON-NLS-2$
- converterMap
- .put(
- new Pair(BYTE_TYPE, "java.lang.Byte"), new IdentityConverter(Byte.TYPE, Byte.class)); //$NON-NLS-1$
- converterMap
- .put(
- new Pair(BYTE_TYPE, "java.lang.String"), new ToStringConverter(Byte.TYPE)); //$NON-NLS-1$
- converterMap
- .put(
- new Pair(BYTE_TYPE, "java.lang.Object"), new IdentityConverter(Byte.TYPE, Object.class)); //$NON-NLS-1$
-
- // Double.TYPE
- converterMap
- .put(
- new Pair("java.lang.String", DOUBLE_TYPE), "org.eclipse.core.databinding.conversion.ConvertString2DoublePrimitive"); //$NON-NLS-1$ //$NON-NLS-2$
- converterMap
- .put(
- new Pair(DOUBLE_TYPE, "java.lang.Double"), new IdentityConverter(Double.TYPE, Double.class)); //$NON-NLS-1$
- converterMap
- .put(
- new Pair(DOUBLE_TYPE, "java.lang.String"), new ToStringConverter(Double.TYPE)); //$NON-NLS-1$
- converterMap
- .put(
- new Pair(DOUBLE_TYPE, "java.lang.Object"), new IdentityConverter(Double.TYPE, Object.class)); //$NON-NLS-1$
-
- // Boolean.TYPE
- converterMap
- .put(
- new Pair("java.lang.String", BOOLEAN_TYPE), "org.eclipse.core.databinding.conversion.ConvertString2BooleanPrimitive"); //$NON-NLS-1$ //$NON-NLS-2$
- converterMap
- .put(
- new Pair(BOOLEAN_TYPE, "java.lang.Boolean"), new IdentityConverter(Boolean.TYPE, Boolean.class)); //$NON-NLS-1$
- converterMap
- .put(
- new Pair(BOOLEAN_TYPE, "java.lang.String"), new ToStringConverter(Boolean.TYPE)); //$NON-NLS-1$
- converterMap
- .put(
- new Pair(BOOLEAN_TYPE, "java.lang.Object"), new IdentityConverter(Boolean.TYPE, Object.class)); //$NON-NLS-1$
-
- // Float.TYPE
- converterMap
- .put(
- new Pair("java.lang.String", FLOAT_TYPE), "org.eclipse.core.databinding.conversion.ConvertString2FloatPrimitive"); //$NON-NLS-1$ //$NON-NLS-2$
- converterMap
- .put(
- new Pair(FLOAT_TYPE, "java.lang.Float"), new IdentityConverter(Float.TYPE, Float.class)); //$NON-NLS-1$
- converterMap
- .put(
- new Pair(FLOAT_TYPE, "java.lang.String"), new ToStringConverter(Float.TYPE)); //$NON-NLS-1$
- converterMap
- .put(
- new Pair(FLOAT_TYPE, "java.lang.Object"), new IdentityConverter(Float.TYPE, Object.class)); //$NON-NLS-1$
-
- // Short.TYPE
- converterMap
- .put(
- new Pair("java.lang.String", SHORT_TYPE), "org.eclipse.core.databinding.conversion.ConvertString2ShortPrimitive"); //$NON-NLS-1$ //$NON-NLS-2$
- converterMap
- .put(
- new Pair(SHORT_TYPE, "java.lang.Short"), new IdentityConverter(Short.TYPE, Short.class)); //$NON-NLS-1$
- converterMap
- .put(
- new Pair(SHORT_TYPE, "java.lang.String"), new ToStringConverter(Short.TYPE)); //$NON-NLS-1$
- converterMap
- .put(
- new Pair(SHORT_TYPE, "java.lang.Object"), new IdentityConverter(Short.TYPE, Object.class)); //$NON-NLS-1$
-
- // Long.TYPE
- converterMap
- .put(
- new Pair("java.lang.String", LONG_TYPE), "org.eclipse.core.databinding.conversion.ConvertString2LongPrimitive"); //$NON-NLS-1$ //$NON-NLS-2$
- converterMap
- .put(
- new Pair(LONG_TYPE, "java.lang.Long"), new IdentityConverter(Long.TYPE, Long.class)); //$NON-NLS-1$
- converterMap
- .put(
- new Pair(LONG_TYPE, "java.lang.String"), new ToStringConverter(Long.TYPE)); //$NON-NLS-1$
- converterMap
- .put(
- new Pair(LONG_TYPE, "java.lang.Object"), new IdentityConverter(Long.TYPE, Object.class)); //$NON-NLS-1$
-
- }
-
- return converterMap;
- }
-
- private String getKeyForClass(Object originalValue, Class filteredValue) {
- if (originalValue instanceof Class) {
- Class originalClass = (Class) originalValue;
- if (originalClass.equals(Integer.TYPE)) {
- return INTEGER_TYPE;
- } else if (originalClass.equals(Byte.TYPE)) {
- return BYTE_TYPE;
- } else if (originalClass.equals(Boolean.TYPE)) {
- return BOOLEAN_TYPE;
- } else if (originalClass.equals(Double.TYPE)) {
- return DOUBLE_TYPE;
- } else if (originalClass.equals(Float.TYPE)) {
- return FLOAT_TYPE;
- } else if (originalClass.equals(Long.TYPE)) {
- return LONG_TYPE;
- } else if (originalClass.equals(Short.TYPE)) {
- return SHORT_TYPE;
- }
- }
- return filteredValue.getName();
- }
-
- /**
- * @param fromType
- * @param toType
- * @return whether fromType is assignable to toType
- */
- protected Boolean isAssignableFromTo(Object fromType, Object toType) {
- if (fromType instanceof Class && toType instanceof Class) {
- Class toClass = (Class) toType;
- if (toClass.isPrimitive()) {
- toClass = autoboxed(toClass);
- }
- Class fromClass = (Class) fromType;
- if (fromClass.isPrimitive()) {
- fromClass = autoboxed(fromClass);
- }
- return toClass.isAssignableFrom(fromClass) ? Boolean.TRUE
- : Boolean.FALSE;
- }
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/IBindingListener.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/IBindingListener.java
deleted file mode 100644
index a333e3f7..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/IBindingListener.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding;
-
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * An interface for objects that need to listen to events that occur while
- * synchronizing the state of two observables in a binding.
- *
- * @since 1.0
- */
-public interface IBindingListener {
- /**
- * This method is called when a binding event occurred.
- *
- * @param e
- * The IBindingEvent to handle.
- * @return a status object. To abort the operation, a status object with an
- * error or cancel status is returned. The error will be propagated
- * to the data binding context.
- */
- public IStatus handleBindingEvent(BindingEvent e);
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertDate2String.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertDate2String.java
deleted file mode 100644
index efdd86fa..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertDate2String.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2005 db4objects Inc. http://www.db4o.com
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- */
-package org.eclipse.core.databinding.conversion;
-
-import java.util.Date;
-
-
-/**
- * Converts a Java.util.Date to a String using the current locale. Null date
- * values are converted to an empty string.
- *
- * @since 1.0
- */
-public class ConvertDate2String extends DateConversionSupport implements IConverter {
- public Object convert(Object source) {
- if (source != null)
- return format((Date)source);
- return ""; //$NON-NLS-1$
- }
-
- public Object getFromType() {
- return Date.class;
- }
-
- public Object getToType() {
- return String.class;
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Boolean.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Boolean.java
deleted file mode 100644
index cdf33ee8..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Boolean.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2005 db4objects Inc. http://www.db4o.com
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- */
-package org.eclipse.core.databinding.conversion;
-
-/**
- * ConvertString2Boolean.
- */
-public class ConvertString2Boolean extends ConvertString2BooleanPrimitive {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.binding.converter.IConverter#convert(java.lang.Object)
- */
- public Object convert(Object source) {
- String sourceString = (String) source;
- if ("".equals(sourceString.trim())) { //$NON-NLS-1$
- return null;
- }
- return super.convert(source);
- }
-
- public Object getToType() {
- return Boolean.class;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2BooleanPrimitive.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2BooleanPrimitive.java
deleted file mode 100644
index 16d53e29..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2BooleanPrimitive.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2005 db4objects Inc. http://www.db4o.com
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- */
-package org.eclipse.core.databinding.conversion;
-
-import org.eclipse.core.internal.databinding.BindingMessages;
-
-
-
-/**
- * ConvertString2BooleanPrimitive.
- */
-public class ConvertString2BooleanPrimitive implements IConverter {
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.binding.converter.IConverter#convert(java.lang.Object)
- */
- public Object convert(Object source) {
- String s = (String) source;
- if (s.equals(BindingMessages.getString("Yes")) || s.equals(BindingMessages.getString("yes")) || s.equals(BindingMessages.getString("true")) || s.equals(BindingMessages.getString("True"))) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- return Boolean.TRUE;
- if (s.equals(BindingMessages.getString("No")) || s.equals(BindingMessages.getString("no")) || s.equals(BindingMessages.getString("false")) || s.equals(BindingMessages.getString("False"))) //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
- return Boolean.FALSE;
-
- throw new IllegalArgumentException(s + " is not a legal boolean value"); //$NON-NLS-1$
- }
-
- public Object getFromType() {
- return String.class;
- }
-
- public Object getToType() {
- return Boolean.TYPE;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Byte.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Byte.java
deleted file mode 100644
index d64ac352..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Byte.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2005 db4objects Inc. http://www.db4o.com
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- */
-package org.eclipse.core.databinding.conversion;
-
-/**
- * ConvertString2Byte.
- */
-public class ConvertString2Byte extends ConvertString2BytePrimitive {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.binding.converter.IConverter#convert(java.lang.Object)
- */
- public Object convert(Object source) {
- String sourceString = (String) source;
- if ("".equals(sourceString.trim())) { //$NON-NLS-1$
- return null;
- }
- return super.convert(source);
- }
-
- public Object getToType() {
- return Byte.class;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2BytePrimitive.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2BytePrimitive.java
deleted file mode 100644
index 627361b2..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2BytePrimitive.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2005 db4objects Inc. http://www.db4o.com
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- */
-package org.eclipse.core.databinding.conversion;
-
-
-
-
-/**
- * ConvertString2BytePrimitive.
- */
-public class ConvertString2BytePrimitive implements IConverter {
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.binding.converter.IConverter#convert(java.lang.Object)
- */
- public Object convert(Object source) {
- try {
- return new Byte(Byte.parseByte((String) source));
- } catch (Exception e) {
- throw new IllegalArgumentException("String2Byte: " + e.getMessage() + ": " + source); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- public Object getFromType() {
- return String.class;
- }
-
- public Object getToType() {
- return Byte.TYPE;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Character.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Character.java
deleted file mode 100644
index 86720f6b..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Character.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2005 db4objects Inc. http://www.db4o.com
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- */
-package org.eclipse.core.databinding.conversion;
-
-/**
- * ConvertString2Character.
- */
-public class ConvertString2Character implements IConverter {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.binding.converter.IConverter#convert(java.lang.Object)
- */
- public Object convert(Object source) {
- String s = (String) source;
- Character result;
-
- if (s.length() > 1)
- throw new IllegalArgumentException(
- "String2Character: string too long: " + s); //$NON-NLS-1$
-
- try {
- result = new Character(s.charAt(0));
- } catch (Exception e) {
- throw new IllegalArgumentException(
- "String2Character: " + e.getMessage() + ": " + s); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- return result;
- }
-
- public Object getFromType() {
- return String.class;
- }
-
- public Object getToType() {
- return Character.class;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Date.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Date.java
deleted file mode 100644
index e320afd6..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Date.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2005 db4objects Inc. http://www.db4o.com
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- */
-package org.eclipse.core.databinding.conversion;
-
-import java.util.Date;
-
-
-/**
- * Convert a String to a java.util.Date, respecting the current locale
- *
- * @since 1.0
- */
-public class ConvertString2Date extends DateConversionSupport implements IConverter {
- public Object convert(Object source) {
- return parse(source.toString());
- }
-
- public Object getFromType() {
- return String.class;
- }
-
- public Object getToType() {
- return Date.class;
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Double.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Double.java
deleted file mode 100644
index a763829d..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Double.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2005 db4objects Inc. http://www.db4o.com
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- */
-package org.eclipse.core.databinding.conversion;
-
-/**
- * ConvertString2Double.
- */
-public class ConvertString2Double extends ConvertString2DoublePrimitive {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.binding.converter.IConverter#convert(java.lang.Object)
- */
- public Object convert(Object source) {
- String sourceString = (String) source;
- if ("".equals(sourceString.trim())) { //$NON-NLS-1$
- return null;
- }
- return super.convert(source);
- }
-
- public Object getToType() {
- return Double.class;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2DoublePrimitive.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2DoublePrimitive.java
deleted file mode 100644
index 01fedc40..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2DoublePrimitive.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2005 db4objects Inc. http://www.db4o.com
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- */
-package org.eclipse.core.databinding.conversion;
-
-
-
-
-/**
- * ConvertString2DoublePrimitive.
- */
-public class ConvertString2DoublePrimitive implements IConverter {
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.binding.converter.IConverter#convert(java.lang.Object)
- */
- public Object convert(Object source) {
- try {
- return new Double(Double.parseDouble((String) source));
- } catch (Exception e) {
- throw new IllegalArgumentException("String2Double: " + e.getMessage() + ": " + source); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- public Object getFromType() {
- return String.class;
- }
-
- public Object getToType() {
- return Double.TYPE;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Float.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Float.java
deleted file mode 100644
index b44b7eae..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Float.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2005 db4objects Inc. http://www.db4o.com
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- */
-package org.eclipse.core.databinding.conversion;
-
-/**
- * ConvertString2Float.
- */
-public class ConvertString2Float extends ConvertString2FloatPrimitive {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.binding.converter.IConverter#convert(java.lang.Object)
- */
- public Object convert(Object source) {
- String sourceString = (String) source;
- if ("".equals(sourceString.trim())) { //$NON-NLS-1$
- return null;
- }
- return super.convert(source);
- }
-
- public Object getToType() {
- return Float.class;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2FloatPrimitive.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2FloatPrimitive.java
deleted file mode 100644
index 6ca2bdd8..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2FloatPrimitive.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2005 db4objects Inc. http://www.db4o.com
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- */
-package org.eclipse.core.databinding.conversion;
-
-
-
-
-/**
- * ConvertString2FloatPrimitive.
- */
-public class ConvertString2FloatPrimitive implements IConverter {
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.binding.converter.IConverter#convert(java.lang.Object)
- */
- public Object convert(Object source) {
- try {
- return new Float(Float.parseFloat((String) source));
- } catch (Exception e) {
- throw new IllegalArgumentException("String2Float: " + e.getMessage() + ": " + source); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- public Object getFromType() {
- return String.class;
- }
-
- public Object getToType() {
- return Float.TYPE;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Integer.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Integer.java
deleted file mode 100644
index 78917377..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Integer.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2005 db4objects Inc. http://www.db4o.com
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- */
-package org.eclipse.core.databinding.conversion;
-
-/**
- * ConvertString2Integer.
- */
-public class ConvertString2Integer extends ConvertString2IntegerPrimitive {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.binding.converter.IConverter#convert(java.lang.Object)
- */
- public Object convert(Object source) {
- String sourceString = (String) source;
- if ("".equals(sourceString.trim())) { //$NON-NLS-1$
- return null;
- }
- return super.convert(source);
- }
-
- public Object getToType() {
- return Integer.class;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2IntegerPrimitive.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2IntegerPrimitive.java
deleted file mode 100644
index 3e43e8f8..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2IntegerPrimitive.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2005 db4objects Inc. http://www.db4o.com
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- */
-package org.eclipse.core.databinding.conversion;
-
-
-
-
-/**
- * ConvertString2IntegerPrimitive.
- */
-public class ConvertString2IntegerPrimitive implements IConverter {
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.binding.converter.IConverter#convert(java.lang.Object)
- */
- public Object convert(Object source) {
- try {
- return new Integer(Integer.parseInt((String) source));
- } catch (Exception e) {
- throw new IllegalArgumentException("String2Int: " + e.getMessage() + ": " + source); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- public Object getFromType() {
- return String.class;
- }
-
- public Object getToType() {
- return Integer.TYPE;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Long.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Long.java
deleted file mode 100644
index 802ef8da..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Long.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2005 db4objects Inc. http://www.db4o.com
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- */
-package org.eclipse.core.databinding.conversion;
-
-/**
- * ConvertString2Long.
- */
-public class ConvertString2Long extends ConvertString2LongPrimitive {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.binding.converter.IConverter#convert(java.lang.Object)
- */
- public Object convert(Object source) {
- String sourceString = (String) source;
- if ("".equals(sourceString.trim())) { //$NON-NLS-1$
- return null;
- }
- return super.convert(source);
- }
-
- public Object getToType() {
- return Long.class;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2LongPrimitive.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2LongPrimitive.java
deleted file mode 100644
index 94247458..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2LongPrimitive.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2005 db4objects Inc. http://www.db4o.com
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- */
-package org.eclipse.core.databinding.conversion;
-
-
-
-
-/**
- * ConvertString2LongPrimitive.
- */
-public class ConvertString2LongPrimitive implements IConverter {
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.binding.converter.IConverter#convert(java.lang.Object)
- */
- public Object convert(Object source) {
- try {
- return new Long(Long.parseLong((String) source));
- } catch (Exception e) {
- throw new IllegalArgumentException("String2Long: " + e.getMessage() + ": " + source); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- public Object getFromType() {
- return String.class;
- }
-
- public Object getToType() {
- return Long.TYPE;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Short.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Short.java
deleted file mode 100644
index 7519a115..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Short.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2005 db4objects Inc. http://www.db4o.com
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- */
-package org.eclipse.core.databinding.conversion;
-
-/**
- * ConvertString2Long.
- */
-public class ConvertString2Short extends ConvertString2ShortPrimitive {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.binding.converter.IConverter#convert(java.lang.Object)
- */
- public Object convert(Object source) {
- String sourceString = (String) source;
- if ("".equals(sourceString.trim())) { //$NON-NLS-1$
- return null;
- }
- return super.convert(source);
- }
-
- public Object getToType() {
- return Short.class;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2ShortPrimitive.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2ShortPrimitive.java
deleted file mode 100644
index 3b693c11..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2ShortPrimitive.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2005 db4objects Inc. http://www.db4o.com
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- */
-package org.eclipse.core.databinding.conversion;
-
-
-
-
-/**
- * ConvertString2ShortPrimitive.
- */
-public class ConvertString2ShortPrimitive implements IConverter {
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.binding.converter.IConverter#convert(java.lang.Object)
- */
- public Object convert(Object source) {
- try {
- return new Short(Short.parseShort((String) source));
- } catch (Exception e) {
- throw new IllegalArgumentException("String2Short: " + e.getMessage() + ": " + source); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- public Object getFromType() {
- return String.class;
- }
-
- public Object getToType() {
- return Short.TYPE;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/Converter.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/Converter.java
deleted file mode 100644
index d3ac250e..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/Converter.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.conversion;
-
-
-/**
- * @since 1.0
- *
- */
-public abstract class Converter implements IConverter {
-
- private Object fromType;
- private Object toType;
-
- /**
- * @param fromType
- * @param toType
- */
- public Converter(Object fromType, Object toType) {
- this.fromType = fromType;
- this.toType = toType;
- }
-
- public Object getFromType() {
- return fromType;
- }
-
- public Object getToType() {
- return toType;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/DateConversionSupport.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/DateConversionSupport.java
deleted file mode 100644
index 1c0e5e25..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/DateConversionSupport.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (C) 2005 db4objects Inc. http://www.db4o.com
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- */
-package org.eclipse.core.databinding.conversion;
-
-import com.ibm.icu.text.DateFormat;
-import java.text.ParsePosition;
-import com.ibm.icu.text.SimpleDateFormat;
-import java.util.Date;
-
-/**
- * Base support for date/string conversion handling according to the
- * default locale or in plain long milliseconds.
- *
- * NOTE: parse(format(date)) will generally *not* be equal to date, since the
- * string representation may not cover the sub-second range, time-only string
- * representations will be counted from the beginning of the era, etc.
- */
-public abstract class DateConversionSupport {
- private final static int DATE_FORMAT=DateFormat.SHORT;
- private final static int DEFAULT_FORMATTER_INDEX=0;
-
- private final static int NUM_VIRTUAL_FORMATTERS=1;
-
- /**
- * Alternative formatters for date, time and date/time.
- * Raw milliseconds are covered as a special case.
- */
- // TODO: These could be shared, but would have to be synchronized.
- private DateFormat[] formatters={
- new SimpleDateFormat("dd.MM.yyyy HH:mm:ss.SSS Z"), //$NON-NLS-1$
- new SimpleDateFormat("HH:mm:ss.SSS"), //$NON-NLS-1$
- DateFormat.getDateTimeInstance(DATE_FORMAT,DateFormat.SHORT),
- DateFormat.getDateInstance(DATE_FORMAT),
- DateFormat.getTimeInstance(DateFormat.SHORT),
- DateFormat.getDateTimeInstance(DATE_FORMAT,DateFormat.MEDIUM),
- DateFormat.getTimeInstance(DateFormat.MEDIUM)
- };
-
- /**
- * Tries all available formatters to parse the given string according to the
- * default locale or as a raw millisecond value and returns the result of the
- * first successful run.
- *
- * @param str A string specifying a date according to the default locale or in raw milliseconds
- * @return The parsed date, or null, if no available formatter could interpret the input string
- */
- protected Date parse(String str) {
- for (int formatterIdx = 0; formatterIdx < formatters.length; formatterIdx++) {
- Date parsed=parse(str,formatterIdx);
- if(parsed!=null) {
- return parsed;
- }
- }
- return null;
- }
-
- protected Date parse(String str,int formatterIdx) {
- if(formatterIdx>=0) {
- ParsePosition pos=new ParsePosition(0);
- if (str == null) {
- return null;
- }
- Date date=formatters[formatterIdx].parse(str,pos);
- if(pos.getErrorIndex()!=-1||pos.getIndex()!=str.length()) {
- return null;
- }
- return date;
- }
- try {
- long millisecs=Long.parseLong(str);
- return new Date(millisecs);
- }
- catch(NumberFormatException exc) {
- }
- return null;
- }
-
- /**
- * Formats the given date with the default formatter according to the default locale.
- * @param date a date
- * @return a string representation of the given date according to the default locale
- */
- protected String format(Date date) {
- return format(date,DEFAULT_FORMATTER_INDEX);
- }
-
- protected String format(Date date,int formatterIdx) {
- if(formatterIdx>=0) {
- return formatters[formatterIdx].format(date);
- }
- return String.valueOf(date.getTime());
- }
-
- protected int numFormatters() {
- return formatters.length+NUM_VIRTUAL_FORMATTERS;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/IConverter.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/IConverter.java
deleted file mode 100644
index 00b7fca2..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/IConverter.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.databinding.conversion;
-
-/**
- * A one-way converter.
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
- * part of a work in progress. There is no guarantee that this API will remain
- * unchanged during the 3.2 release cycle. Please do not use this API without
- * consulting with the Platform/UI team.
- * </p>
- *
- * @since 1.0
- *
- */
-public interface IConverter {
-
- /**
- * Returns the type whose instances can be converted by this converter. The
- * return type is Object rather than Class to optionally support richer type
- * systems than the one provided by Java reflection.
- *
- * @return the type whose instances can be converted, or null if this
- * converter is untyped
- */
- public Object getFromType();
-
- /**
- * Returns the type to which this converter can convert. The return type is
- * Object rather than Class to optionally support richer type systems than
- * the one provided by Java reflection.
- *
- * @return the type to which this converter can convert, or null if this
- * converter is untyped
- */
- public Object getToType();
-
- /**
- * Returns the result of the conversion of the given object.
- *
- * @param fromObject
- * the object to convert, of type {@link #getFromType()}
- * @return the converted object, of type {@link #getToType()}
- */
- public Object convert(Object fromObject);
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/IdentityConverter.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/IdentityConverter.java
deleted file mode 100644
index 8a7c27f0..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/IdentityConverter.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (C) 2005 db4objects Inc. http://www.db4o.com
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- */
-package org.eclipse.core.databinding.conversion;
-
-import org.eclipse.core.databinding.BindingException;
-
-/**
- * TheIdentityConverter. Returns the source value (the identity function).
- */
-public class IdentityConverter implements IConverter {
-
- private Class fromType;
-
- private Class toType;
-
- /**
- * @param type
- */
- public IdentityConverter(Class type) {
- this.fromType = type;
- this.toType = type;
- }
-
- /**
- * @param fromType
- * @param toType
- */
- public IdentityConverter(Class fromType, Class toType) {
- this.fromType = fromType;
- this.toType = toType;
- }
-
- private Class[][] primitiveMap = new Class[][] {
- { Integer.TYPE, Integer.class }, { Short.TYPE, Short.class },
- { Long.TYPE, Long.class }, { Double.TYPE, Double.class },
- { Byte.TYPE, Byte.class }, { Float.TYPE, Float.class },
- { Boolean.TYPE, Boolean.class }, };
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.binding.converter.IConverter#convert(java.lang.Object)
- */
- public Object convert(Object source) {
- if (toType.isPrimitive()) {
- if (source == null) {
- throw new BindingException("Cannot convert null to a primitive"); //$NON-NLS-1$
- }
- }
- if (source != null) {
- Class sourceClass = source.getClass();
- if (toType.isPrimitive() || sourceClass.isPrimitive()) {
- if (sourceClass.equals(toType)
- || isPrimitiveTypeMatchedWithBoxed(sourceClass, toType)) {
- return source;
- }
- throw new BindingException(
- "Boxed and unboxed types do not match"); //$NON-NLS-1$
- }
- if (!toType.isAssignableFrom(sourceClass)) {
- throw new BindingException(sourceClass.getName()
- + " is not assignable to " + toType.getName()); //$NON-NLS-1$
- }
- }
- return source;
- }
-
- /**
- * (Non-API) isPrimitiveTypeMatchedWithBoxed.
- *
- * @param sourceClass
- * @param toClass
- * @return true if sourceClass and toType are matched primitive/boxed types
- */
- public boolean isPrimitiveTypeMatchedWithBoxed(Class sourceClass,
- Class toClass) {
- for (int i = 0; i < primitiveMap.length; i++) {
- if (toClass.equals(primitiveMap[i][0])
- && sourceClass.equals(primitiveMap[i][1])) {
- return true;
- }
- if (sourceClass.equals(primitiveMap[i][0])
- && toClass.equals(primitiveMap[i][1])) {
- return true;
- }
- }
- return false;
- }
-
- public Object getFromType() {
- return fromType;
- }
-
- public Object getToType() {
- return toType;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ToStringConverter.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ToStringConverter.java
deleted file mode 100644
index a5aabace..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ToStringConverter.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) 2005 db4objects Inc. http://www.db4o.com
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- */
-package org.eclipse.core.databinding.conversion;
-
-/**
- * Converts any object to a string by calling its toString() method.
- */
-public class ToStringConverter implements IConverter {
-
- /**
- * A singleton for the toString() converter function
- */
- public static final ToStringConverter TOSTRINGFUNCTION = new ToStringConverter();
-
- private final Class fromClass;
-
- /**
- *
- */
- public ToStringConverter() {
- this(Object.class);
- }
-
- /**
- * @param fromClass
- */
- public ToStringConverter(Class fromClass) {
- this.fromClass = fromClass;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.binding.converter.IConverter#convert(java.lang.Object)
- */
- public Object convert(Object source) {
- if (source == null) {
- return ""; //$NON-NLS-1$
- }
- return source.toString();
- }
-
- public Object getFromType() {
- return fromClass;
- }
-
- public Object getToType() {
- return String.class;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/package.html b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/package.html
deleted file mode 100644
index 06a1b53e..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/package.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <meta name="GENERATOR" content="Mozilla/4.5 [en] (Win98; I) [Netscape]">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Provides interfaces and classes for data type conversion.
-<h2>
-Package Specification</h2>
-<p>
-This package provides the <tt>IConverter</tt> interface along with classes
-that implement the interface to convert between common data types.
-<p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/AbstractObservable.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/AbstractObservable.java
deleted file mode 100644
index d2cbcb2c..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/AbstractObservable.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164653
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.AssertionFailedException;
-
-/**
- * @since 1.0
- */
-public abstract class AbstractObservable extends ChangeManager implements IObservable {
-
- /**
- * @param realm
- */
- public AbstractObservable(Realm realm) {
- super(realm);
- }
-
- public synchronized void addChangeListener(IChangeListener listener) {
- addListener(ChangeEvent.TYPE, listener);
- }
-
- public synchronized void removeChangeListener(IChangeListener listener) {
- removeListener(ChangeEvent.TYPE, listener);
- }
-
- public synchronized void addStaleListener(IStaleListener listener) {
- addListener(StaleEvent.TYPE, listener);
- }
-
- public synchronized void removeStaleListener(IStaleListener listener) {
- removeListener(StaleEvent.TYPE, listener);
- }
-
- protected void fireChange() {
- checkRealm();
- fireEvent(new ChangeEvent(this));
- }
-
- protected void fireStale() {
- checkRealm();
- fireEvent(new StaleEvent(this));
- }
-
- /**
- *
- */
- public synchronized void dispose() {
- super.dispose();
- }
-
- /**
- * Asserts that the realm is the current realm.
- *
- * @see Realm#isCurrent()
- * @throws AssertionFailedException if the realm is not the current realm
- */
- protected void checkRealm() {
- Assert.isTrue(getRealm().isCurrent());
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/ChangeEvent.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/ChangeEvent.java
deleted file mode 100644
index 8a07cdb6..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/ChangeEvent.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable;
-
-/**
- * @since 3.3
- *
- */
-public class ChangeEvent extends ObservableEvent {
-
- /**
- *
- */
- private static final long serialVersionUID = -3241193109844979384L;
- static final Object TYPE = new Object();
-
- /**
- * @param source
- */
- public ChangeEvent(IObservable source) {
- super(source);
- }
-
- protected void dispatch(IObservablesListener listener) {
- ((IChangeListener) listener).handleChange(this);
- }
-
- protected Object getListenerType() {
- return TYPE;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/ChangeManager.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/ChangeManager.java
deleted file mode 100644
index 2a88f43c..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/ChangeManager.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.ListenerList;
-
-/**
- * Listener management implementation. Exposed to subclasses in form of
- * {@link AbstractObservable} and {@link ChangeSupport}.
- *
- * @since 1.0
- *
- */
-/* package */ class ChangeManager {
-
- ListenerList[] listenerLists = null;
- Object listenerTypes[] = null;
- private Realm realm;
-
- /**
- * @param realm
- *
- */
- /* package */ ChangeManager(Realm realm) {
- Assert.isNotNull(realm);
- this.realm = realm;
- }
-
- /**
- * @param listenerType
- * @param listener
- */
- protected void addListener(Object listenerType,
- IObservablesListener listener) {
- int listenerTypeIndex = findListenerTypeIndex(listenerType);
- if (listenerTypeIndex == -1) {
- int length;
- if (listenerTypes == null) {
- length = 0;
- listenerTypes = new Object[1];
- listenerLists = new ListenerList[1];
- } else {
- length = listenerTypes.length;
- System.arraycopy(listenerTypes, 0,
- listenerTypes = new Object[length + 1], 0, length);
- System
- .arraycopy(listenerLists, 0,
- listenerLists = new ListenerList[length + 1],
- 0, length);
- }
- listenerTypes[length] = listenerType;
- listenerLists[length] = new ListenerList();
- listenerLists[length].add(listener);
- if (length == 0) {
- this.firstListenerAdded();
- }
- return;
- }
- listenerLists[listenerTypeIndex].add(listener);
- }
-
- /**
- * @param listenerType
- * @param listener
- */
- protected void removeListener(Object listenerType,
- IObservablesListener listener) {
- int listenerTypeIndex = findListenerTypeIndex(listenerType);
- if (listenerTypeIndex != -1) {
- listenerLists[listenerTypeIndex].remove(listener);
- if (listenerLists[listenerTypeIndex].size() == 0) {
- if (!hasListeners()) {
- this.lastListenerRemoved();
- }
- }
- }
- }
-
- protected boolean hasListeners() {
- if (listenerTypes == null) {
- return false;
- }
- for (int i = 0; i < listenerTypes.length; i++) {
- if (listenerLists[i].size() > 0) {
- return true;
- }
- }
- return false;
- }
-
- private int findListenerTypeIndex(Object listenerType) {
- if (listenerTypes != null) {
- for (int i = 0; i < listenerTypes.length; i++) {
- if (listenerTypes[i] == listenerType) {
- return i;
- }
- }
- }
- return -1;
- }
-
- protected void fireEvent(ObservableEvent event) {
- Object listenerType = event.getListenerType();
- int listenerTypeIndex = findListenerTypeIndex(listenerType);
- if (listenerTypeIndex != -1) {
- Object[] listeners = listenerLists[listenerTypeIndex]
- .getListeners();
- for (int i = 0; i < listeners.length; i++) {
- event.dispatch((IObservablesListener) listeners[i]);
- }
- }
- }
-
- /**
- *
- */
- protected void firstListenerAdded() {
- }
-
- /**
- *
- */
- protected void lastListenerRemoved() {
- }
-
- /**
- *
- */
- public void dispose() {
- listenerLists = null;
- listenerTypes = null;
- realm = null;
- }
-
- /**
- * @return Returns the realm.
- */
- public Realm getRealm() {
- return realm;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/ChangeSupport.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/ChangeSupport.java
deleted file mode 100644
index f00dfbdc..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/ChangeSupport.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable;
-
-/**
- * @since 1.0
- *
- */
-public abstract class ChangeSupport extends ChangeManager {
-
- /**
- * @param realm
- */
- public ChangeSupport(Realm realm) {
- super(realm);
- }
-
- public void addListener(Object listenerType,
- IObservablesListener listener) {
- super.addListener(listenerType, listener);
- }
-
- public void removeListener(Object listenerType,
- IObservablesListener listener) {
- super.removeListener(listenerType, listener);
- }
-
- public void fireEvent(ObservableEvent event) {
- super.fireEvent(event);
- }
-
- /**
- *
- */
- protected abstract void firstListenerAdded();
-
- /**
- *
- */
- protected abstract void lastListenerRemoved();
-
- /**
- * @param listener
- */
- public void addChangeListener(IChangeListener listener) {
- addListener(ChangeEvent.TYPE, listener);
- }
-
- /**
- * @param listener
- */
- public void removeChangeListener(IChangeListener listener) {
- removeListener(ChangeEvent.TYPE, listener);
- }
-
- /**
- * @param listener
- */
- public void addStaleListener(IStaleListener listener) {
- addListener(StaleEvent.TYPE, listener);
- }
-
- /**
- * @param listener
- */
- public void removeStaleListener(IStaleListener listener) {
- removeListener(StaleEvent.TYPE, listener);
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/Diffs.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/Diffs.java
deleted file mode 100644
index b4132fd9..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/Diffs.java
+++ /dev/null
@@ -1,397 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.list.ListDiff;
-import org.eclipse.core.databinding.observable.list.ListDiffEntry;
-import org.eclipse.core.databinding.observable.map.MapDiff;
-import org.eclipse.core.databinding.observable.set.SetDiff;
-import org.eclipse.core.databinding.observable.value.ValueDiff;
-import org.eclipse.core.internal.databinding.Util;
-
-/**
- * @since 1.0
- *
- */
-public class Diffs {
-
- /**
- * @param oldList
- * @param newList
- * @return the differences between oldList and newList
- */
- public static ListDiff computeListDiff(List oldList, List newList) {
- List diffEntries = new ArrayList();
- for (Iterator it = oldList.iterator(); it.hasNext();) {
- Object oldElement = it.next();
- diffEntries.add(createListDiffEntry(0, false, oldElement));
- }
- int i = 0;
- for (Iterator it = newList.iterator(); it.hasNext();) {
- Object newElement = it.next();
- diffEntries.add(createListDiffEntry(i++, true, newElement));
- }
- ListDiff listDiff = createListDiff((ListDiffEntry[]) diffEntries
- .toArray(new ListDiffEntry[diffEntries.size()]));
- return listDiff;
- }
-
- /**
- * Checks whether the two objects are <code>null</code> -- allowing for
- * <code>null</code>.
- *
- * @param left
- * The left object to compare; may be <code>null</code>.
- * @param right
- * The right object to compare; may be <code>null</code>.
- * @return <code>true</code> if the two objects are equivalent;
- * <code>false</code> otherwise.
- */
- public static final boolean equals(final Object left, final Object right) {
- return left == null ? right == null : ((right != null) && left
- .equals(right));
- }
-
- /**
- * @param oldSet
- * @param newSet
- * @return a set diff
- */
- public static SetDiff computeSetDiff(Set oldSet, Set newSet) {
- Set additions = new HashSet(newSet);
- additions.removeAll(oldSet);
- Set removals = new HashSet(oldSet);
- removals.removeAll(newSet);
- return createSetDiff(additions, removals);
- }
-
- /**
- * Computes the difference between two maps.
- *
- * @param oldMap
- * @param newMap
- * @return a map diff representing the changes needed to turn oldMap into
- * newMap
- */
- public static MapDiff computeMapDiff(Map oldMap, Map newMap) {
- // starts out with all keys from the new map, we will remove keys from
- // the old map as we go
- final Set addedKeys = new HashSet(newMap.keySet());
- final Set removedKeys = new HashSet();
- final Set changedKeys = new HashSet();
- final Map oldValues = new HashMap();
- final Map newValues = new HashMap();
- for (Iterator it = oldMap.keySet().iterator(); it.hasNext();) {
- Object oldKey = it.next();
- if (addedKeys.remove(oldKey)) {
- // potentially changed key since it is in oldMap and newMap
- Object oldValue = oldMap.get(oldKey);
- Object newValue = newMap.get(oldKey);
- if (!Util.equals(oldValue, newValue)) {
- changedKeys.add(oldKey);
- oldValues.put(oldKey, oldValue);
- newValues.put(oldKey, newValue);
- }
- } else {
- removedKeys.add(oldKey);
- oldValues.put(oldKey, oldMap.get(oldKey));
- }
- }
- for (Iterator it = addedKeys.iterator(); it.hasNext();) {
- Object newKey = it.next();
- newValues.put(newKey, newMap.get(newKey));
- }
- return new MapDiff() {
- public Set getAddedKeys() {
- return addedKeys;
- }
-
- public Set getChangedKeys() {
- return changedKeys;
- }
-
- public Set getRemovedKeys() {
- return removedKeys;
- }
-
- public Object getNewValue(Object key) {
- return newValues.get(key);
- }
-
- public Object getOldValue(Object key) {
- return oldValues.get(key);
- }
- };
- }
-
- /**
- * @param oldValue
- * @param newValue
- * @return a value diff
- */
- public static ValueDiff createValueDiff(final Object oldValue,
- final Object newValue) {
- return new ValueDiff() {
-
- public Object getOldValue() {
- return oldValue;
- }
-
- public Object getNewValue() {
- return newValue;
- }
- };
- }
-
- /**
- * @param additions
- * @param removals
- * @return a set diff
- */
- public static SetDiff createSetDiff(Set additions, Set removals) {
- final Set unmodifiableAdditions = Collections
- .unmodifiableSet(additions);
- final Set unmodifiableRemovals = Collections.unmodifiableSet(removals);
- return new SetDiff() {
-
- public Set getAdditions() {
- return unmodifiableAdditions;
- }
-
- public Set getRemovals() {
- return unmodifiableRemovals;
- }
- };
- }
-
- /**
- * @param difference
- * @return a list diff with one differing entry
- */
- public static ListDiff createListDiff(ListDiffEntry difference) {
- return createListDiff(new ListDiffEntry[] { difference });
- }
-
- /**
- * @param difference1
- * @param difference2
- * @return a list diff with two differing entries
- */
- public static ListDiff createListDiff(ListDiffEntry difference1,
- ListDiffEntry difference2) {
- return createListDiff(new ListDiffEntry[] { difference1, difference2 });
- }
-
- /**
- * @param differences
- * @return a list diff with the given entries
- */
- public static ListDiff createListDiff(final ListDiffEntry[] differences) {
- return new ListDiff() {
- public ListDiffEntry[] getDifferences() {
- return differences;
- }
- };
- }
-
- /**
- * @param position
- * @param isAddition
- * @param element
- * @return a list diff entry
- */
- public static ListDiffEntry createListDiffEntry(final int position,
- final boolean isAddition, final Object element) {
- return new ListDiffEntry() {
-
- public int getPosition() {
- return position;
- }
-
- public boolean isAddition() {
- return isAddition;
- }
-
- public Object getElement() {
- return element;
- }
- };
- }
-
- /**
- * @param addedKey
- * @param newValue
- * @return a map diff
- */
- public static MapDiff createMapDiffSingleAdd(final Object addedKey,
- final Object newValue) {
- return new MapDiff() {
-
- public Set getAddedKeys() {
- return Collections.singleton(addedKey);
- }
-
- public Set getChangedKeys() {
- return Collections.EMPTY_SET;
- }
-
- public Object getNewValue(Object key) {
- return newValue;
- }
-
- public Object getOldValue(Object key) {
- return null;
- }
-
- public Set getRemovedKeys() {
- return Collections.EMPTY_SET;
- }
- };
- }
-
- /**
- * @param existingKey
- * @param oldValue
- * @param newValue
- * @return a map diff
- */
- public static MapDiff createMapDiffSingleChange(final Object existingKey,
- final Object oldValue, final Object newValue) {
- return new MapDiff() {
-
- public Set getAddedKeys() {
- return Collections.EMPTY_SET;
- }
-
- public Set getChangedKeys() {
- return Collections.singleton(existingKey);
- }
-
- public Object getNewValue(Object key) {
- return newValue;
- }
-
- public Object getOldValue(Object key) {
- return oldValue;
- }
-
- public Set getRemovedKeys() {
- return Collections.EMPTY_SET;
- }
- };
- }
-
- /**
- * @param removedKey
- * @param oldValue
- * @return a map diff
- */
- public static MapDiff createMapDiffSingleRemove(final Object removedKey,
- final Object oldValue) {
- return new MapDiff() {
-
- public Set getAddedKeys() {
- return Collections.EMPTY_SET;
- }
-
- public Set getChangedKeys() {
- return Collections.EMPTY_SET;
- }
-
- public Object getNewValue(Object key) {
- return null;
- }
-
- public Object getOldValue(Object key) {
- return oldValue;
- }
-
- public Set getRemovedKeys() {
- return Collections.singleton(removedKey);
- }
- };
- }
-
- /**
- * @param copyOfOldMap
- * @return a map diff
- */
- public static MapDiff createMapDiffRemoveAll(final Map copyOfOldMap) {
- return new MapDiff() {
-
- public Set getAddedKeys() {
- return Collections.EMPTY_SET;
- }
-
- public Set getChangedKeys() {
- return Collections.EMPTY_SET;
- }
-
- public Object getNewValue(Object key) {
- return null;
- }
-
- public Object getOldValue(Object key) {
- return copyOfOldMap.get(key);
- }
-
- public Set getRemovedKeys() {
- return copyOfOldMap.keySet();
- }
- };
- }
-
- /**
- * @param addedKeys
- * @param removedKeys
- * @param changedKeys
- * @param oldValues
- * @param newValues
- * @return a map diff
- */
- public static MapDiff createMapDiff(final Set addedKeys,
- final Set removedKeys, final Set changedKeys, final Map oldValues,
- final Map newValues) {
- return new MapDiff() {
-
- public Set getAddedKeys() {
- return addedKeys;
- }
-
- public Set getChangedKeys() {
- return changedKeys;
- }
-
- public Object getNewValue(Object key) {
- return newValues.get(key);
- }
-
- public Object getOldValue(Object key) {
- return oldValues.get(key);
- }
-
- public Set getRemovedKeys() {
- return removedKeys;
- }
- };
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/IChangeListener.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/IChangeListener.java
deleted file mode 100644
index a4ed1ccb..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/IChangeListener.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable;
-
-import org.eclipse.core.databinding.observable.list.IListChangeListener;
-import org.eclipse.core.databinding.observable.map.IMapChangeListener;
-import org.eclipse.core.databinding.observable.set.ISetChangeListener;
-import org.eclipse.core.databinding.observable.value.IValueChangeListener;
-
-/**
- * Listener for generic change events. Note that the change events do not carry information about
- * the change, they only specify the affected observable. To listen for specific change events, use
- * more specific change listeners.
- *
- * @see IValueChangeListener
- * @see IListChangeListener
- * @see ISetChangeListener
- * @see IMapChangeListener
- *
- * @since 1.0
- */
-public interface IChangeListener extends IObservablesListener {
-
- /**
- * Handle a generic change to the given observable.
- *
- * @param event
- */
- public void handleChange(ChangeEvent event);
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/IDiff.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/IDiff.java
deleted file mode 100644
index aacd9faf..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/IDiff.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable;
-
-import org.eclipse.core.databinding.observable.list.ListDiff;
-import org.eclipse.core.databinding.observable.map.MapDiff;
-import org.eclipse.core.databinding.observable.set.SetDiff;
-import org.eclipse.core.databinding.observable.value.ValueDiff;
-
-/**
- * A diff represents a state change of an observable object.
- *
- * @see ValueDiff
- * @see ListDiff
- * @see SetDiff
- * @see MapDiff
- *
- * @since 1.0
- *
- */
-public interface IDiff {
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/IObservable.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/IObservable.java
deleted file mode 100644
index 9f8e5bd5..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/IObservable.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.databinding.observable;
-
-/**
- * An object with state that allows to listen for state changes.
- *
- * <p>
- * This interface is not intended to be implemented by clients. Clients should
- * instead subclass one of the classes in the framework that implement this
- * interface. Note that direct implementers of this interface outside of the
- * framework will be broken in future releases when methods are added to this
- * interface.
- * </p>
- * <p>
- * Implementations must not manage listeners themselves, listener management
- * must be delegated to a private instance of type {@link ChangeSupport} if
- * it is not inherited from {@link AbstractObservable}.
- * </p>
- *
- * @since 1.0
- *
- */
-public interface IObservable {
-
- /**
- * Returns the realm for this observable. Unless otherwise specified,
- * getters and setters must be accessed from within this realm. Listeners
- * will be within this realm when they receive events from this observable.
- * <p>
- * Because observables can only be accessed from within one realm, and they
- * always fire events on that realm, their state can be observed in an
- * incremental way. It is always safe to call getters of an observable from
- * within a change listener attached to that observable.
- * </p>
- *
- * @return the realm
- */
- public Realm getRealm();
-
- /**
- * Adds the given change listener to the list of change listeners. Change
- * listeners are notified about changes of the state of this observable in a
- * generic way, without specifying the change that happened. To get the
- * changed state, a change listener needs to query for the current state of
- * this observable.
- *
- * @param listener
- */
- public void addChangeListener(IChangeListener listener);
-
- /**
- * Removes the given change listener from the list of change listeners. Has
- * no effect if the given listener is not registered as a change listener.
- *
- * @param listener
- */
- public void removeChangeListener(IChangeListener listener);
-
- /**
- * Adds the given stale listener to the list of stale listeners. Stale
- * listeners are notified when an observable object becomes stale, not when
- * is becomes non-stale.
- *
- * @param listener
- *
- * @see #isStale()
- */
- public void addStaleListener(IStaleListener listener);
-
- /**
- * Removes the given stale listener from the list of stale listeners. Has no
- * effect if the given listener is not registered as a stale listener.
- *
- * @param listener
- */
- public void removeStaleListener(IStaleListener listener);
-
- /**
- * Returns whether the state of this observable is stale and is expected to
- * change soon. A non-stale observable that becomes stale will notify its
- * stale listeners. A stale object that becomes non-stale does so by
- * changing its state and notifying its change listeners, it does <b>not</b>
- * notify its stale listeners about becoming non-stale. Clients that do not
- * expect asynchronous changes may ignore staleness of observable objects.
- *
- * @return true if this observable's state is stale and will change soon.
- *
- * @TrackedGetter - implementers must call
- * {@link ObservableTracker#getterCalled(IObservable)}.
- */
- public boolean isStale();
-
- /**
- * Disposes of this observable object, removing all listeners registered
- * with this object, and all listeners this object might have registered on
- * other objects.
- */
- public void dispose();
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/IObservableCollection.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/IObservableCollection.java
deleted file mode 100644
index d12c384f..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/IObservableCollection.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable;
-
-import java.util.Collection;
-
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.set.IObservableSet;
-
-/**
- * Interface for observable collections. Only general change listeners can be
- * added to an observable collection. Listeners interested in incremental
- * changes have to be added using more concrete subtypes such as
- * {@link IObservableList} or {@link IObservableSet}.
- *
- * <p>
- * This interface is not intended to be implemented by clients. Clients should
- * instead subclass one of the classes that implement this interface. Note that
- * direct implementers of this interface outside of the framework will be broken
- * in future releases when methods are added to this interface.
- * </p>
- *
- * @since 1.0
- */
-public interface IObservableCollection extends IObservable, Collection {
-
- /**
- * @return the element type of this observable value, or <code>null</code>
- * if this observable collection is untyped.
- */
- Object getElementType();
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/IObservablesListener.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/IObservablesListener.java
deleted file mode 100644
index 4c0864f7..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/IObservablesListener.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable;
-
-/**
- * Marker interface for all listener types in the observables framework. Not
- * intended to be directly implemented by clients.
- *
- * @since 1.0
- *
- */
-public interface IObservablesListener {
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/IStaleListener.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/IStaleListener.java
deleted file mode 100644
index b05535d4..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/IStaleListener.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable;
-
-/**
- * Listener for staleness events. An observable object is stale if its state
- * will change eventually.
- *
- * @since 1.0
- */
-public interface IStaleListener extends IObservablesListener {
-
- /**
- * Handle the event that the given observable object is now stale.
- *
- * @param staleEvent
- */
- public void handleStale(StaleEvent staleEvent);
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/ObservableEvent.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/ObservableEvent.java
deleted file mode 100644
index f1926592..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/ObservableEvent.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable;
-
-import java.util.EventObject;
-
-/**
- * @since 3.3
- *
- */
-public abstract class ObservableEvent extends EventObject {
-
- /**
- * @param source
- */
- public ObservableEvent(IObservable source) {
- super(source);
- }
-
- /**
- *
- */
- private static final long serialVersionUID = 7693906965267871813L;
-
- /**
- * @return the observable that generated this event
- */
- public IObservable getObservable() {
- return (IObservable) getSource();
- }
-
- /**
- *
- * @param listener
- */
- protected abstract void dispatch(IObservablesListener listener);
-
- /**
- * @return a unique object representing the concrete type of this event.
- */
- protected abstract Object getListenerType();
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/ObservableTracker.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/ObservableTracker.java
deleted file mode 100644
index 95a4c1f3..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/ObservableTracker.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.databinding.observable;
-
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.eclipse.core.internal.databinding.IdentityWrapper;
-import org.eclipse.core.runtime.Assert;
-
-/**
- * This class makes it possible to monitor whenever an IObservable is read from.
- * This can be used to automatically attach and remove listeners. How to use it:
- *
- * <p>
- * If you are implementing an IObservable, invoke getterCalled(this) whenever a
- * getter is called - that is, whenever your observable is read from. You only
- * need to do this once per method call. If one getter delegates to another, the
- * outer getter doesn't need to call the method since the inner one will.
- * </p>
- *
- * <p>
- * If you want to determine what observables were used in a particular block of
- * code, call runAndMonitor(Runnable). This will execute the given runnable and
- * return the set of observables that were read from.
- * </p>
- *
- * <p>
- * This can be used to automatically attach listeners. For example, imagine you
- * have a block of code that updates some widget by reading from a bunch of
- * observables. Whenever one of those observables changes, you want to re-run
- * the code and cause the widget to be refreshed. You could do this in the
- * traditional manner by attaching one listener to each observable and
- * re-running your widget update code whenever one of them changes, but this
- * code is repetitive and requires updating the listener code whenever you
- * refactor the widget updating code.
- * </p>
- *
- * <p>
- * Alternatively, you could use a utility class that runs the code in a
- * runAndMonitor block and automatically attach listeners to any observable used
- * in updating the widget. The advantage of the latter approach is that it,
- * eliminates the code for attaching and detaching listeners and will always
- * stay in synch with changes to the widget update logic.
- * </p>
- *
- * @since 1.0
- */
-public class ObservableTracker {
-
- /**
- * Threadlocal storage pointing to the current Set of IObservables, or null
- * if none. Note that this is actually the top of a stack. Whenever a method
- * changes the current value, it remembers the old value as a local variable
- * and restores the old value when the method exits.
- */
- private static ThreadLocal currentChangeListener = new ThreadLocal();
-
- private static ThreadLocal currentStaleListener = new ThreadLocal();
-
- private static ThreadLocal currentObservableSet = new ThreadLocal();
-
- /**
- * Invokes the given runnable, and returns the set of IObservables that were
- * read by the runnable. If the runnable calls this method recursively, the
- * result will not contain IObservables that were used within the inner
- * runnable.
- *
- * @param runnable
- * runnable to execute
- * @param changeListener
- * listener to register with all accessed observables
- * @param staleListener
- * listener to register with all accessed observables, or
- * <code>null</code> if no stale listener is to be registered
- * @return an array of unique observable objects
- */
- public static IObservable[] runAndMonitor(Runnable runnable,
- IChangeListener changeListener, IStaleListener staleListener) {
- // Remember the previous value in the listener stack
- Set lastObservableSet = (Set) currentObservableSet.get();
- IChangeListener lastChangeListener = (IChangeListener) currentChangeListener
- .get();
- IStaleListener lastStaleListener = (IStaleListener) currentStaleListener
- .get();
-
- Set observableSet = new HashSet();
- // Push the new listeners to the top of the stack
- currentObservableSet.set(observableSet);
- currentChangeListener.set(changeListener);
- currentStaleListener.set(staleListener);
- try {
- runnable.run();
- } finally {
- // Pop the new listener off the top of the stack (by restoring the
- // previous listener)
- currentObservableSet.set(lastObservableSet);
- currentChangeListener.set(lastChangeListener);
- currentStaleListener.set(lastStaleListener);
- }
-
- int i = 0;
- IObservable[] result = new IObservable[observableSet.size()];
- for (Iterator it = observableSet.iterator(); it.hasNext();) {
- IdentityWrapper wrapper = (IdentityWrapper) it.next();
- result[i++] = (IObservable) wrapper.unwrap();
- }
-
- return result;
- }
-
- /**
- * Notifies the ObservableTracker that an observable was read from. The
- * JavaDoc for methods that invoke this method should include the following
- * tag: "@TrackedGetter This method will notify ObservableTracker that the
- * receiver has been read from". This lets callers know that they can rely
- * on automatic updates from the object without explicitly attaching a
- * listener.
- *
- * @param observable
- */
- public static void getterCalled(IObservable observable) {
- Assert.isTrue(observable.getRealm().isCurrent());
- Set lastObservableSet = (Set) currentObservableSet.get();
- IChangeListener lastChangeListener = (IChangeListener) currentChangeListener
- .get();
- IStaleListener lastStaleListener = (IStaleListener) currentStaleListener
- .get();
-
- boolean added = false;
- if (lastObservableSet != null) {
- added = lastObservableSet.add(new IdentityWrapper(observable));
- }
-
- // If anyone is listening for observable usage...
- if (added && lastChangeListener != null) {
- observable.addChangeListener(lastChangeListener);
- }
- if (added && lastStaleListener != null) {
- observable.addStaleListener(lastStaleListener);
- }
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/Observables.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/Observables.java
deleted file mode 100644
index 9a5abfa3..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/Observables.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Cerner Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable;
-
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.list.IListChangeListener;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.list.ObservableList;
-import org.eclipse.core.databinding.observable.set.IObservableSet;
-import org.eclipse.core.databinding.observable.set.ISetChangeListener;
-import org.eclipse.core.databinding.observable.set.ObservableSet;
-import org.eclipse.core.internal.databinding.observable.EmptyObservableList;
-import org.eclipse.core.internal.databinding.observable.EmptyObservableSet;
-import org.eclipse.core.internal.databinding.observable.ProxyObservableSet;
-import org.eclipse.core.internal.databinding.observable.UnmodifiableObservableList;
-
-/**
- * Contains static methods to operate on or return
- * {@link IObservable Observables}.
- *
- * @since 3.2
- */
-public class Observables {
- /**
- * @param list
- * @return list Returns an unmodifiable view of the provided
- * <code>list</code>.
- */
- public static IObservableList unmodifiableObservableList(
- IObservableList list) {
- if (list == null) {
- throw new IllegalArgumentException(
- "Parameter " + list + " was null."); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- return new UnmodifiableObservableList(list);
- }
-
- /**
- * Returns an empty observable list. The returned list continues to work
- * after it has been disposed of and can be disposed of multiple times.
- *
- * @return an empty observable list.
- */
- public static IObservableList emptyObservableList() {
- return new EmptyObservableList(Realm.getDefault());
- }
-
- /**
- * Returns an empty observable list. The returned list continues to work
- * after it has been disposed of and can be disposed of multiple times.
- *
- * @param realm
- * @return an empty observable list.
- */
- public static IObservableList emptyObservableList(Realm realm) {
- return new EmptyObservableList(realm);
- }
-
- /**
- * Returns an empty observable set. The returned set continues to work after
- * it has been disposed of and can be disposed of multiple times.
- *
- * @return an empty observable set.
- */
- public static IObservableSet emptyObservableSet() {
- return new EmptyObservableSet(Realm.getDefault());
- }
-
- /**
- * Returns an empty observable set. The returned set continues to work after
- * it has been disposed of and can be disposed of multiple times.
- *
- * @param realm
- * @return an empty observable set.
- */
- public static IObservableSet emptyObservableSet(Realm realm) {
- return new EmptyObservableSet(realm);
- }
-
- /**
- * @param set
- * @return Returns an observableSet backed by the given set
- */
- public static IObservableSet staticObservableSet(Set set) {
- return new ObservableSet(Realm.getDefault(), set, Object.class) {
- public void addChangeListener(IChangeListener listener) {
- }
-
- public void addStaleListener(IStaleListener listener) {
- }
-
- public void addSetChangeListener(ISetChangeListener listener) {
- }
- };
- }
-
- /**
- * @param realm
- * @param set
- * @return Returns an observableSet backed by the given set
- */
- public static IObservableSet staticObservableSet(Realm realm, Set set) {
- return new ObservableSet(realm, set, Object.class) {
- public void addChangeListener(IChangeListener listener) {
- }
-
- public void addStaleListener(IStaleListener listener) {
- }
-
- public void addSetChangeListener(ISetChangeListener listener) {
- }
- };
- }
-
- /**
- * Returns an observable set that contains the same elements as the given
- * set, and fires the same events as the given set, but can be disposed of
- * without disposing of the wrapped set.
- *
- * @param target
- * the set to wrap
- * @return a proxy observable set
- */
- public static IObservableSet proxyObservableSet(IObservableSet target) {
- return new ProxyObservableSet(target);
- }
-
- /**
- * @param list
- * @return an observable list that never fires events
- */
- public static IObservableList staticObservableList(List list) {
- return staticObservableList(Realm.getDefault(), list);
- }
-
- /**
- * @param realm
- * @param list
- * @return an observable list that never fires events
- */
- public static IObservableList staticObservableList(Realm realm, List list) {
- return new ObservableList(realm, list, Object.class) {
- public void addChangeListener(IChangeListener listener) {
- }
-
- public void addStaleListener(IStaleListener listener) {
- }
-
- public void addListChangeListener(IListChangeListener listener) {
- }
- };
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/Realm.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/Realm.java
deleted file mode 100644
index 77222f67..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/Realm.java
+++ /dev/null
@@ -1,294 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 168153
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable;
-
-import java.util.LinkedList;
-
-import org.eclipse.core.databinding.Binding;
-import org.eclipse.core.databinding.util.Policy;
-import org.eclipse.core.runtime.ISafeRunnable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.SafeRunner;
-import org.eclipse.core.runtime.Status;
-
-/**
- * A realm defines a context from which objects implementing {@link IObservable}
- * must be accessed, and on which these objects will notify their listeners. To
- * bridge between observables from different realms, subclasses of
- * {@link Binding} can be used.
- * <p>
- * A block of code is said to be executing within a realm if calling
- * {@link #getDefault()} from that block returns true. Code reached by calling
- * methods from that block will execute within the same realm, with the
- * exception of methods on this class that can be used to execute code within a
- * specific realm. Clients can use {@link #syncExec(Runnable)},
- * {@link #asyncExec(Runnable)}, or {@link #exec(Runnable)} to execute a
- * runnable within this realm. Note that using {@link #syncExec(Runnable)} can
- * lead to deadlocks and should be avoided if the current thread holds any
- * locks.
- * </p>
- * <p>
- * It is instructive to think about possible implementations of Realm: It can be
- * based on executing on a designated thread such as a UI thread, or based on
- * holding a lock. In the former case, calling syncExec on a realm that is not
- * the current realm will execute the given runnable on a different thread (the
- * designated thread). In the latter case, calling syncExec may execute the
- * given runnable on the calling thread, but calling
- * {@link #asyncExec(Runnable)} will execute the given runnable on a different
- * thread. Therefore, no assumptions can be made about the thread that will
- * execute arguments to {@link #asyncExec(Runnable)},
- * {@link #syncExec(Runnable)}, or {@link #exec(Runnable)}.
- * </p>
- * <p>
- * It is possible that a block of code is executing within more than one realm.
- * This can happen for implementations of Realm that are based on holding a lock
- * but don't use a separate thread to run runnables given to
- * {@link #syncExec(Runnable)}. Realm implementations of this kind should be
- * appropriately documented because it increases the opportunity for deadlock.
- * </p>
- * <p>
- * Some implementations of {@link IObservable} provide constructors which do not
- * take a Realm argument and are specified to create the observable instance
- * with the current default realm. The default realm can be set for the
- * currently executing thread by using {@link #runWithDefault(Realm, Runnable)}.
- * Note that the default realm does not have to be the current realm.
- * </p>
- * <p>
- * Subclasses must override at least one of asyncExec()/syncExec(). For realms
- * based on a designated thread, it may be easier to implement asyncExec and
- * keep the default implementation of syncExec. For realms based on holding a
- * lock, it may be easier to implement syncExec and keep the default
- * implementation of asyncExec.
- * </p>
- *
- * @since 1.0
- *
- * @see IObservable
- */
-public abstract class Realm {
-
- private static ThreadLocal defaultRealm = new ThreadLocal();
-
- /**
- * Returns the default realm for the calling thread, or <code>null</code>
- * if no default realm has been set.
- *
- * @return the default realm, or <code>null</code>
- */
- public static Realm getDefault() {
- return (Realm) defaultRealm.get();
- }
-
- /**
- * Sets the default realm for the calling thread, returning the current
- * default thread. This method is inherently unsafe, it is recommended to
- * use {@link #runWithDefault(Realm, Runnable)} instead. This method is
- * exposed to subclasses to facilitate testing.
- *
- * @param realm
- * the new default realm, or <code>null</code>
- * @return the previous default realm, or <code>null</code>
- */
- protected static Realm setDefault(Realm realm) {
- Realm oldValue = getDefault();
- defaultRealm.set(realm);
- return oldValue;
- }
-
- /**
- * @return true if the caller is executing in this realm. This method must
- * not have side-effects (such as, for example, implicitly placing
- * the caller in this realm).
- */
- abstract public boolean isCurrent();
-
- private Thread workerThread;
-
- LinkedList workQueue = new LinkedList();
-
- /**
- * Runs the given runnable. If an exception occurs within the runnable, it
- * is logged and not re-thrown. If the runnable implements
- * {@link ISafeRunnable}, the exception is passed to its
- * <code>handleException<code> method.
- *
- * @param runnable
- */
- protected static void safeRun(final Runnable runnable) {
- ISafeRunnable safeRunnable;
- if (runnable instanceof ISafeRunnable) {
- safeRunnable = (ISafeRunnable) runnable;
- } else {
- safeRunnable = new ISafeRunnable() {
- public void handleException(Throwable exception) {
- Policy
- .getLog()
- .log(
- new Status(
- IStatus.ERROR,
- Policy.JFACE_DATABINDING,
- IStatus.OK,
- "Unhandled exception: " + exception.getMessage(), exception)); //$NON-NLS-1$
- }
- public void run() throws Exception {
- runnable.run();
- }
- };
- }
- SafeRunner.run(safeRunnable);
- }
-
- /**
- * Causes the <code>run()</code> method of the runnable to be invoked from
- * within this realm. If the caller is executing in this realm, the
- * runnable's run method is invoked directly, otherwise it is run at the
- * next reasonable opportunity using asyncExec.
- * <p>
- * If the given runnable is an instance of {@link ISafeRunnable}, its
- * exception handler method will be called if any exceptions occur while
- * running it. Otherwise, the exception will be logged.
- * </p>
- *
- * @param runnable
- */
- public void exec(Runnable runnable) {
- if (isCurrent()) {
- safeRun(runnable);
- } else {
- asyncExec(runnable);
- }
- }
-
- /**
- * Causes the <code>run()</code> method of the runnable to be invoked from
- * within this realm at the next reasonable opportunity. The caller of this
- * method continues to run in parallel, and is not notified when the
- * runnable has completed.
- * <p>
- * If the given runnable is an instance of {@link ISafeRunnable}, its
- * exception handler method will be called if any exceptions occur while
- * running it. Otherwise, the exception will be logged.
- * </p>
- * <p>
- * Subclasses should use {@link #safeRun(Runnable)} to run the runnable.
- * </p>
- *
- * @param runnable
- */
- public void asyncExec(Runnable runnable) {
- synchronized (workQueue) {
- ensureWorkerThreadIsRunning();
- workQueue.addLast(runnable);
- workQueue.notifyAll();
- }
- }
-
- /**
- *
- */
- private void ensureWorkerThreadIsRunning() {
- if (workerThread == null) {
- workerThread = new Thread() {
- public void run() {
- try {
- while (true) {
- Runnable work = null;
- synchronized (workQueue) {
- while (workQueue.isEmpty()) {
- workQueue.wait();
- }
- work = (Runnable) workQueue.removeFirst();
- }
- syncExec(work);
- }
- } catch (InterruptedException e) {
- // exit
- }
- }
- };
- workerThread.start();
- }
- }
-
- /**
- * Causes the <code>run()</code> method of the runnable to be invoked from
- * within this realm at the next reasonable opportunity. This method is
- * blocking the caller until the runnable completes.
- * <p>
- * If the given runnable is an instance of {@link ISafeRunnable}, its
- * exception handler method will be called if any exceptions occur while
- * running it. Otherwise, the exception will be logged.
- * </p>
- * <p>
- * Subclasses should use {@link #safeRun(Runnable)} to run the runnable.
- * </p>
- * <p>
- * Note: This class is not meant to be called by clients and therefore has
- * only protected access.
- * </p>
- *
- * @param runnable
- */
- protected void syncExec(Runnable runnable) {
- SyncRunnable syncRunnable = new SyncRunnable(runnable);
- asyncExec(syncRunnable);
- synchronized (syncRunnable) {
- while (!syncRunnable.hasRun) {
- try {
- syncRunnable.wait();
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- }
- }
- }
- }
-
- static class SyncRunnable implements Runnable {
- boolean hasRun = false;
-
- private Runnable runnable;
-
- SyncRunnable(Runnable runnable) {
- this.runnable = runnable;
- }
-
- public void run() {
- try {
- safeRun(runnable);
- } finally {
- synchronized (this) {
- hasRun = true;
- this.notifyAll();
- }
- }
- }
- }
-
- /**
- * Sets the provided <code>realm</code> as the default for the duration of
- * {@link Runnable#run()} and resets the previous realm after completion.
- * Note that this will not set the given realm as the current realm.
- *
- * @param realm
- * @param runnable
- */
- public static void runWithDefault(Realm realm, Runnable runnable) {
- Realm oldRealm = Realm.getDefault();
- try {
- defaultRealm.set(realm);
- runnable.run();
- } finally {
- defaultRealm.set(oldRealm);
- }
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/StaleEvent.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/StaleEvent.java
deleted file mode 100644
index 990a7d57..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/StaleEvent.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable;
-
-/**
- * @since 3.3
- *
- */
-public class StaleEvent extends ObservableEvent {
-
- /**
- * @param source
- */
- public StaleEvent(IObservable source) {
- super(source);
- }
-
- /**
- *
- */
- private static final long serialVersionUID = 3491012225431471077L;
-
- static final Object TYPE = new Object();
-
- protected void dispatch(IObservablesListener listener) {
- ((IStaleListener)listener).handleStale(this);
- }
-
- protected Object getListenerType() {
- return TYPE;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/AbstractObservableList.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/AbstractObservableList.java
deleted file mode 100644
index 057834ab..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/AbstractObservableList.java
+++ /dev/null
@@ -1,270 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164653
- * Brad Reynolds - bug 167204
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.list;
-
-import java.util.AbstractList;
-import java.util.Collection;
-import java.util.Iterator;
-
-import org.eclipse.core.databinding.observable.ChangeEvent;
-import org.eclipse.core.databinding.observable.ChangeSupport;
-import org.eclipse.core.databinding.observable.IChangeListener;
-import org.eclipse.core.databinding.observable.IStaleListener;
-import org.eclipse.core.databinding.observable.ObservableTracker;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.StaleEvent;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.AssertionFailedException;
-
-/**
- * Subclasses should override at least get(int index) and size().
- *
- * <p>
- * This class is thread safe. All state accessing methods must be invoked from
- * the {@link Realm#isCurrent() current realm}. Methods for adding and removing
- * listeners may be invoked from any thread.
- * </p>
- *
- * @since 1.0
- *
- */
-public abstract class AbstractObservableList extends AbstractList implements
- IObservableList {
-
- private ChangeSupport changeSupport;
-
- /**
- * @param realm
- *
- */
- public AbstractObservableList(Realm realm) {
- Assert.isNotNull(realm);
- changeSupport = new ChangeSupport(realm){
- protected void firstListenerAdded() {
- AbstractObservableList.this.firstListenerAdded();
- }
- protected void lastListenerRemoved() {
- AbstractObservableList.this.lastListenerRemoved();
- }
- };
- }
-
- /**
- *
- */
- public AbstractObservableList() {
- this(Realm.getDefault());
- }
-
- public boolean isStale() {
- return false;
- }
-
- public synchronized void addListChangeListener(IListChangeListener listener) {
- changeSupport.addListener(ListChangeEvent.TYPE, listener);
- }
-
- public synchronized void removeListChangeListener(IListChangeListener listener) {
- changeSupport.removeListener(ListChangeEvent.TYPE, listener);
- }
-
- protected void fireListChange(ListDiff diff) {
- // fire general change event first
- fireChange();
- changeSupport.fireEvent(new ListChangeEvent(this, diff));
- }
-
- public synchronized void addChangeListener(IChangeListener listener) {
- changeSupport.addChangeListener(listener);
- }
-
- public synchronized void removeChangeListener(IChangeListener listener) {
- changeSupport.removeChangeListener(listener);
- }
-
- public synchronized void addStaleListener(IStaleListener listener) {
- changeSupport.addStaleListener(listener);
- }
-
- public synchronized void removeStaleListener(IStaleListener listener) {
- changeSupport.removeStaleListener(listener);
- }
-
- /**
- * Fires change event. Must be invoked from the current realm.
- */
- protected void fireChange() {
- checkRealm();
- changeSupport.fireEvent(new ChangeEvent(this));
- }
-
- /**
- * Fires stale event. Must be invoked from the current realm.
- */
- protected void fireStale() {
- checkRealm();
- changeSupport.fireEvent(new StaleEvent(this));
- }
-
- /**
- *
- */
- protected void firstListenerAdded() {
- }
-
- /**
- *
- */
- protected void lastListenerRemoved() {
- }
-
- /**
- *
- */
- public synchronized void dispose() {
- changeSupport = null;
- lastListenerRemoved();
- }
-
- public final int size() {
- getterCalled();
- return doGetSize();
- }
-
- /**
- * @return the size
- */
- protected abstract int doGetSize();
-
- /**
- *
- */
- private void getterCalled() {
- ObservableTracker.getterCalled(this);
- }
-
- public boolean isEmpty() {
- getterCalled();
- return super.isEmpty();
- }
-
- public boolean contains(Object o) {
- getterCalled();
- return super.contains(o);
- }
-
- public Iterator iterator() {
- getterCalled();
- final Iterator wrappedIterator = super.iterator();
- return new Iterator() {
- public void remove() {
- wrappedIterator.remove();
- }
-
- public boolean hasNext() {
- return wrappedIterator.hasNext();
- }
-
- public Object next() {
- return wrappedIterator.next();
- }
- };
- }
-
- public Object[] toArray() {
- getterCalled();
- return super.toArray();
- }
-
- public Object[] toArray(Object a[]) {
- getterCalled();
- return super.toArray(a);
- }
-
- // Modification Operations
-
- public boolean add(Object o) {
- getterCalled();
- return super.add(o);
- }
-
- public boolean remove(Object o) {
- getterCalled();
- return super.remove(o);
- }
-
- // Bulk Modification Operations
-
- public boolean containsAll(Collection c) {
- getterCalled();
- return super.containsAll(c);
- }
-
- public boolean addAll(Collection c) {
- getterCalled();
- return super.addAll(c);
- }
-
- public boolean addAll(int index, Collection c) {
- getterCalled();
- return super.addAll(c);
- }
-
- public boolean removeAll(Collection c) {
- getterCalled();
- return super.removeAll(c);
- }
-
- public boolean retainAll(Collection c) {
- getterCalled();
- return super.retainAll(c);
- }
-
- // Comparison and hashing
-
- public boolean equals(Object o) {
- getterCalled();
- return super.equals(o);
- }
-
- public int hashCode() {
- getterCalled();
- return super.hashCode();
- }
-
- public int indexOf(Object o) {
- getterCalled();
- return super.indexOf(o);
- }
-
- public int lastIndexOf(Object o) {
- getterCalled();
- return super.lastIndexOf(o);
- }
-
- public Realm getRealm() {
- return changeSupport.getRealm();
- }
-
- /**
- * Asserts that the realm is the current realm.
- *
- * @see Realm#isCurrent()
- * @throws AssertionFailedException
- * if the realm is not the current realm
- */
- protected void checkRealm() {
- Assert.isTrue(getRealm().isCurrent());
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/IListChangeListener.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/IListChangeListener.java
deleted file mode 100644
index 40d4bbca..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/IListChangeListener.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.list;
-
-import org.eclipse.core.databinding.observable.IObservablesListener;
-
-
-/**
- * Listener for changes of observable lists.
- *
- * @since 1.0
- */
-public interface IListChangeListener extends IObservablesListener {
-
- /**
- * Handle a change to the given observable list. The change is described by the diff objects.
- * @param event
- */
- void handleListChange(ListChangeEvent event);
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/IObservableList.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/IObservableList.java
deleted file mode 100644
index 0cbc13a3..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/IObservableList.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 167204
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.list;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-
-import org.eclipse.core.databinding.observable.IObservableCollection;
-
-/**
- * A list whose changes can be tracked by list change listeners.
- *
- * <p>
- * This interface is not intended to be implemented by clients. Clients should
- * instead subclass one of the framework classes that implement this interface.
- * Note that direct implementers of this interface outside of the framework will
- * be broken in future releases when methods are added to this interface.
- * </p>
- *
- * @since 1.0
- */
-public interface IObservableList extends List, IObservableCollection {
-
- /**
- * Adds the given list change listener to the list of list change listeners.
- * @param listener
- */
- public void addListChangeListener(IListChangeListener listener);
-
- /**
- * Removes the given list change listener from the list of list change listeners.
- * Has no effect if the given listener is not registered as a list change listener.
- *
- * @param listener
- */
- public void removeListChangeListener(IListChangeListener listener);
-
- /**
- * @TrackedGetter
- */
- public int size();
-
- /**
- * @TrackedGetter
- */
- public boolean isEmpty();
-
- /**
- * @TrackedGetter
- */
- public boolean contains(Object o);
-
- /**
- * @TrackedGetter
- */
- public Iterator iterator();
-
- /**
- * @TrackedGetter
- */
- public Object[] toArray();
-
- /**
- * @TrackedGetter
- */
- public Object[] toArray(Object a[]);
-
- /**
- *
- */
- public boolean add(Object o);
-
- /**
- *
- */
- public boolean remove(Object o);
-
- /**
- * @TrackedGetter
- */
- public boolean containsAll(Collection c);
-
- /**
- *
- */
- public boolean addAll(Collection c);
-
- /**
- *
- */
- public boolean addAll(int index, Collection c);
-
- /**
- *
- */
- public boolean removeAll(Collection c);
-
- /**
- *
- */
- public boolean retainAll(Collection c);
-
- /**
- * @TrackedGetter
- */
- public boolean equals(Object o);
-
- /**
- * @TrackedGetter
- */
- public int hashCode();
-
- /**
- * @TrackedGetter
- */
- public Object get(int index);
-
- /**
- *
- */
- public Object set(int index, Object element);
-
- /**
- *
- */
- public Object remove(int index);
-
- /**
- * @TrackedGetter
- */
- public int indexOf(Object o);
-
- /**
- * @TrackedGetter
- */
- public int lastIndexOf(Object o);
-
- /**
- * @TrackedGetter
- */
- public ListIterator listIterator();
-
- /**
- * @TrackedGetter
- */
- public ListIterator listIterator(int index);
-
- /**
- * @TrackedGetter
- */
- public List subList(int fromIndex, int toIndex);
-
- /**
- * @return the type of the elements or <code>null</code> if untyped
- */
- Object getElementType();
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/ListChangeEvent.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/ListChangeEvent.java
deleted file mode 100644
index 46d9c1fe..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/ListChangeEvent.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.list;
-
-import org.eclipse.core.databinding.observable.IObservablesListener;
-import org.eclipse.core.databinding.observable.ObservableEvent;
-
-/**
- * @since 3.3
- *
- */
-public class ListChangeEvent extends ObservableEvent {
-
- /**
- *
- */
- private static final long serialVersionUID = -9154315534258776672L;
-
- static final Object TYPE = new Object();
- /**
- *
- */
- public ListDiff diff;
-
- /**
- * @param source
- * @param diff
- */
- public ListChangeEvent(IObservableList source, ListDiff diff) {
- super(source);
- this.diff = diff;
- }
-
- /**
- * @return the observable list from which this event originated
- */
- public IObservableList getObservableList() {
- return (IObservableList) getSource();
- }
-
- protected void dispatch(IObservablesListener listener) {
- ((IListChangeListener) listener).handleListChange(this);
- }
-
- protected Object getListenerType() {
- return TYPE;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/ListDiff.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/ListDiff.java
deleted file mode 100644
index 544b70e9..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/ListDiff.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.list;
-
-import org.eclipse.core.databinding.observable.IDiff;
-
-/**
- * Object describing a diff between two lists.
- *
- * @since 1.0
- */
-public abstract class ListDiff implements IDiff {
-
- /**
- * Returns a list of ListDiffEntry
- *
- * @return a list of ListDiffEntry
- */
- public abstract ListDiffEntry[] getDifferences();
-
- /**
- * @see java.lang.Object#toString()
- */
- public String toString() {
- ListDiffEntry[] differences = getDifferences();
- StringBuffer buffer = new StringBuffer();
- buffer.append(getClass().getName());
-
- if (differences == null || differences.length == 0) {
- buffer
- .append("{}"); //$NON-NLS-1$
- } else {
- buffer
- .append("{"); //$NON-NLS-1$
-
- for (int i = 0; i < differences.length; i++) {
- if (i > 0)
- buffer.append(", "); //$NON-NLS-1$
-
- buffer
- .append("difference[") //$NON-NLS-1$
- .append(i)
- .append("] [") //$NON-NLS-1$
- .append(differences[i] != null ? differences[i].toString() : "null") //$NON-NLS-1$
- .append("]"); //$NON-NLS-1$
- }
- buffer.append("}"); //$NON-NLS-1$
- }
-
- return buffer.toString();
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/ListDiffEntry.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/ListDiffEntry.java
deleted file mode 100644
index da2e79ff..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/ListDiffEntry.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.list;
-
-/**
- * A single addition of an element to a list or removal of an element from a list.
- *
- * @since 1.0
- */
-public abstract class ListDiffEntry {
-
- /**
- * @return the 0-based position of the addition or removal
- */
- public abstract int getPosition();
-
- /**
- * @return true if this represents an addition, false if this represents a removal
- */
- public abstract boolean isAddition();
-
- /**
- * @return the element that was added or removed
- */
- public abstract Object getElement();
-
- /**
- * @see java.lang.Object#toString()
- */
- public String toString() {
- StringBuffer buffer = new StringBuffer();
- buffer
- .append(this.getClass().getName())
- .append("{position [") //$NON-NLS-1$
- .append(getPosition())
- .append("], isAddition [") //$NON-NLS-1$
- .append(isAddition())
- .append("], element [") //$NON-NLS-1$
- .append(getElement() != null ? getElement().toString() : "null") //$NON-NLS-1$
- .append("]}"); //$NON-NLS-1$
-
- return buffer.toString();
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/ObservableList.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/ObservableList.java
deleted file mode 100644
index 7b805687..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/ObservableList.java
+++ /dev/null
@@ -1,314 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164653
- * Brad Reynolds - bug 167204
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.list;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-
-import org.eclipse.core.databinding.observable.AbstractObservable;
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.ObservableTracker;
-import org.eclipse.core.databinding.observable.Realm;
-
-/**
- *
- * Abstract implementation of {@link IObservableList}, based on an underlying regular list.
- *
- * @since 1.0
- *
- */
-public abstract class ObservableList extends AbstractObservable implements
- IObservableList {
-
- protected List wrappedList;
-
- /**
- * Stale state of the list. Access must occur in the current realm.
- */
- private boolean stale = false;
-
- private Object elementType;
-
- protected ObservableList(List wrappedList, Object elementType) {
- this(Realm.getDefault(), wrappedList, elementType);
- }
-
- protected ObservableList(Realm realm, List wrappedList, Object elementType) {
- super(realm);
- this.wrappedList = wrappedList;
- this.elementType = elementType;
- }
-
- public synchronized void addListChangeListener(IListChangeListener listener) {
- addListener(ListChangeEvent.TYPE, listener);
- }
-
- public synchronized void removeListChangeListener(IListChangeListener listener) {
- removeListener(ListChangeEvent.TYPE, listener);
- }
-
- protected void fireListChange(ListDiff diff) {
- // fire general change event first
- super.fireChange();
- fireEvent(new ListChangeEvent(this, diff));
- }
-
- public boolean contains(Object o) {
- getterCalled();
- return wrappedList.contains(o);
- }
-
- public boolean containsAll(Collection c) {
- getterCalled();
- return wrappedList.containsAll(c);
- }
-
- public boolean equals(Object o) {
- getterCalled();
- return wrappedList.equals(o);
- }
-
- public int hashCode() {
- getterCalled();
- return wrappedList.hashCode();
- }
-
- public boolean isEmpty() {
- getterCalled();
- return wrappedList.isEmpty();
- }
-
- public Iterator iterator() {
- getterCalled();
- final Iterator wrappedIterator = wrappedList.iterator();
- return new Iterator() {
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
-
- public boolean hasNext() {
- return wrappedIterator.hasNext();
- }
-
- public Object next() {
- return wrappedIterator.next();
- }
- };
- }
-
- public int size() {
- getterCalled();
- return wrappedList.size();
- }
-
- public Object[] toArray() {
- getterCalled();
- return wrappedList.toArray();
- }
-
- public Object[] toArray(Object[] a) {
- getterCalled();
- return wrappedList.toArray(a);
- }
-
- public String toString() {
- getterCalled();
- return wrappedList.toString();
- }
-
- /**
- * @TrackedGetter
- */
- public Object get(int index) {
- getterCalled();
- return wrappedList.get(index);
- }
-
- /**
- * @TrackedGetter
- */
- public int indexOf(Object o) {
- getterCalled();
- return wrappedList.indexOf(o);
- }
-
- /**
- * @TrackedGetter
- */
- public int lastIndexOf(Object o) {
- getterCalled();
- return wrappedList.lastIndexOf(o);
- }
-
- // List Iterators
-
- /**
- * @TrackedGetter
- */
- public ListIterator listIterator() {
- return listIterator(0);
- }
-
- /**
- * @TrackedGetter
- */
- public ListIterator listIterator(int index) {
- getterCalled();
- final ListIterator wrappedIterator = wrappedList.listIterator(index);
- return new ListIterator() {
-
- public int nextIndex() {
- return wrappedIterator.nextIndex();
- }
-
- public int previousIndex() {
- return wrappedIterator.previousIndex();
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
-
- public boolean hasNext() {
- return wrappedIterator.hasNext();
- }
-
- public boolean hasPrevious() {
- return wrappedIterator.hasPrevious();
- }
-
- public Object next() {
- return wrappedIterator.next();
- }
-
- public Object previous() {
- return wrappedIterator.previous();
- }
-
- public void add(Object o) {
- throw new UnsupportedOperationException();
- }
-
- public void set(Object o) {
- throw new UnsupportedOperationException();
- }
- };
- }
-
-
- public List subList(int fromIndex, int toIndex) {
- getterCalled();
- return wrappedList.subList(fromIndex, toIndex);
- }
-
- protected void getterCalled() {
- ObservableTracker.getterCalled(this);
- }
-
- public Object set(int index, Object element) {
- throw new UnsupportedOperationException();
- }
-
- public Object remove(int index) {
- throw new UnsupportedOperationException();
- }
-
- public boolean add(Object o) {
- throw new UnsupportedOperationException();
- }
-
- public void add(int index, Object element) {
- throw new UnsupportedOperationException();
- }
-
- public boolean addAll(Collection c) {
- throw new UnsupportedOperationException();
- }
-
- public boolean addAll(int index, Collection c) {
- throw new UnsupportedOperationException();
- }
-
- public boolean remove(Object o) {
- throw new UnsupportedOperationException();
- }
-
- public boolean removeAll(Collection c) {
- throw new UnsupportedOperationException();
- }
-
- public boolean retainAll(Collection c) {
- throw new UnsupportedOperationException();
- }
-
- public void clear() {
- throw new UnsupportedOperationException();
- }
-
- /**
- * Returns the stale state. Must be invoked from the current realm.
- *
- * @return stale state
- */
- public boolean isStale() {
- checkRealm();
- return stale;
- }
-
- /**
- * Sets the stale state. Must be invoked from the current realm.
- *
- * @param stale
- * The stale state to list. This will fire a stale event if the
- * given boolean is true and this observable list was not already
- * stale.
- */
- public void setStale(boolean stale) {
- checkRealm();
-
- boolean wasStale = this.stale;
- this.stale = stale;
- if (!wasStale && stale) {
- fireStale();
- }
- }
-
- protected void fireChange() {
- throw new RuntimeException("fireChange should not be called, use fireListChange() instead"); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.provisional.databinding.observable.AbstractObservable#dispose()
- */
- public synchronized void dispose() {
- super.dispose();
- }
-
- public Object getElementType() {
- return elementType;
- }
-
- protected void updateWrappedList(List newList) {
- // TODO this is a naive list diff algorithm, we need a
- // smarter one
- List oldList = wrappedList;
- ListDiff listDiff = Diffs.computeListDiff(oldList, newList);
- wrappedList = newList;
- fireListChange(listDiff);
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/WritableList.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/WritableList.java
deleted file mode 100644
index 891b9830..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/WritableList.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164653
- * Brad Reynolds - bug 167204
- * Gautam Saggar - bug 169529
- * Brad Reynolds - bug 147515
- *******************************************************************************/
-package org.eclipse.core.databinding.observable.list;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.Realm;
-
-/**
- * Mutable observable list backed by an ArrayList. All mutators (e.g. set, add,
- * remove, etc.) must be invoked from the current realm.
- *
- * @since 1.0
- */
-public class WritableList extends ObservableList {
-
- /**
- * Creates an empty writable list in the default realm with a
- * <code>null</code> element type.
- *
- */
- public WritableList() {
- this(Realm.getDefault());
- }
-
- /**
- * Creates an empty writable list with a <code>null</code> element type.
- *
- * @param realm
- */
- public WritableList(Realm realm) {
- this(realm, new ArrayList(), null);
- }
-
- /**
- * Construts a new instance with the default realm.
- *
- * @param toWrap
- * @param elementType
- * can be <code>null</code>
- */
- public WritableList(List toWrap, Object elementType) {
- this(Realm.getDefault(), toWrap, elementType);
- }
-
- /**
- * Creates a writable list containing elements of the given type, wrapping
- * an existing client-supplied list.
- *
- * @param realm
- * @param toWrap
- * The java.utilList to wrap
- * @param elementType
- * can be <code>null</code>
- */
- public WritableList(Realm realm, List toWrap, Object elementType) {
- super(realm, toWrap, elementType);
- }
-
- public Object set(int index, Object element) {
- checkRealm();
- Object oldElement = wrappedList.set(index, element);
- fireListChange(Diffs.createListDiff(Diffs.createListDiffEntry(index,
- false, oldElement), Diffs.createListDiffEntry(index, true,
- element)));
- return oldElement;
- }
-
- public Object remove(int index) {
- checkRealm();
- Object oldElement = wrappedList.remove(index);
- fireListChange(Diffs.createListDiff(Diffs.createListDiffEntry(index,
- false, oldElement)));
- return oldElement;
- }
-
- public boolean add(Object element) {
- checkRealm();
- boolean added = wrappedList.add(element);
- if (added) {
- fireListChange(Diffs.createListDiff(Diffs.createListDiffEntry(
- wrappedList.size() - 1, true, element)));
- }
- return added;
- }
-
- public void add(int index, Object element) {
- checkRealm();
- wrappedList.add(index, element);
- fireListChange(Diffs.createListDiff(Diffs.createListDiffEntry(index,
- true, element)));
- }
-
- public boolean addAll(Collection c) {
- checkRealm();
- ListDiffEntry[] entries = new ListDiffEntry[c.size()];
- int i = 0;
- int addIndex = wrappedList.size();
- for (Iterator it = c.iterator(); it.hasNext();) {
- Object element = it.next();
- entries[i++] = Diffs.createListDiffEntry(addIndex++, true, element);
- }
- boolean added = wrappedList.addAll(c);
- fireListChange(Diffs.createListDiff(entries));
- return added;
- }
-
- public boolean addAll(int index, Collection c) {
- checkRealm();
- ListDiffEntry[] entries = new ListDiffEntry[c.size()];
- int i = 0;
- int addIndex = index;
- for (Iterator it = c.iterator(); it.hasNext();) {
- Object element = it.next();
- entries[i++] = Diffs.createListDiffEntry(addIndex++, true, element);
- }
- boolean added = wrappedList.addAll(index, c);
- fireListChange(Diffs.createListDiff(entries));
- return added;
- }
-
- public boolean remove(Object o) {
- checkRealm();
- int index = wrappedList.indexOf(o);
- if (index == -1) {
- return false;
- }
- wrappedList.remove(index);
- fireListChange(Diffs.createListDiff(Diffs.createListDiffEntry(index,
- false, o)));
- return true;
- }
-
- public boolean removeAll(Collection c) {
- checkRealm();
- List entries = new ArrayList();
- for (Iterator it = c.iterator(); it.hasNext();) {
- Object element = it.next();
- int removeIndex = wrappedList.indexOf(element);
- if (removeIndex != -1) {
- wrappedList.remove(removeIndex);
- entries.add(Diffs.createListDiffEntry(removeIndex, true,
- element));
- }
- }
- fireListChange(Diffs.createListDiff((ListDiffEntry[]) entries
- .toArray(new ListDiffEntry[entries.size()])));
- return entries.size() > 0;
- }
-
- public boolean retainAll(Collection c) {
- checkRealm();
- List entries = new ArrayList();
- int removeIndex = 0;
- for (Iterator it = wrappedList.iterator(); it.hasNext();) {
- Object element = it.next();
- if (!c.contains(element)) {
- entries.add(Diffs.createListDiffEntry(removeIndex, false,
- element));
- it.remove();
- } else {
- // only increment if we haven't removed the current element
- removeIndex++;
- }
- }
- fireListChange(Diffs.createListDiff((ListDiffEntry[]) entries
- .toArray(new ListDiffEntry[entries.size()])));
- return entries.size() > 0;
- }
-
- public void clear() {
- checkRealm();
- List entries = new ArrayList();
- for (Iterator it = wrappedList.iterator(); it.hasNext();) {
- Object element = it.next();
- // always report 0 as the remove index
- entries.add(Diffs.createListDiffEntry(0, false, element));
- it.remove();
- }
- fireListChange(Diffs.createListDiff((ListDiffEntry[]) entries
- .toArray(new ListDiffEntry[entries.size()])));
- }
-
- /**
- * @param elementType
- * can be <code>null</code>
- * @return new list with the default realm.
- */
- public static WritableList withElementType(Object elementType) {
- return new WritableList(Realm.getDefault(), new ArrayList(),
- elementType);
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/package.html b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/package.html
deleted file mode 100644
index d720e2b4..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/package.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <meta name="GENERATOR" content="Mozilla/4.5 [en] (Win98; I) [Netscape]">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-To be written.
-<h2>
-Package Specification</h2>
-<p>
-This package provides classes that can be used to ...</p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/AbstractObservableMap.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/AbstractObservableMap.java
deleted file mode 100644
index 8c1e212c..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/AbstractObservableMap.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164653
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.map;
-
-import java.util.AbstractMap;
-
-import org.eclipse.core.databinding.observable.ChangeEvent;
-import org.eclipse.core.databinding.observable.ChangeSupport;
-import org.eclipse.core.databinding.observable.IChangeListener;
-import org.eclipse.core.databinding.observable.IStaleListener;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.StaleEvent;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.AssertionFailedException;
-
-/**
- * @since 3.3
- *
- */
-public abstract class AbstractObservableMap extends AbstractMap implements
- IObservableMap {
-
- private ChangeSupport changeSupport;
-
- private boolean stale;
-
- /**
- */
- public AbstractObservableMap() {
- this(Realm.getDefault());
- }
-
- /**
- *
- */
- protected void lastListenerRemoved() {
- }
-
- /**
- *
- */
- protected void firstListenerAdded() {
- }
-
- /**
- * @param realm
- */
- public AbstractObservableMap(Realm realm) {
- Assert.isNotNull(realm);
- changeSupport = new ChangeSupport(realm){
- protected void firstListenerAdded() {
- AbstractObservableMap.this.firstListenerAdded();
- }
- protected void lastListenerRemoved() {
- AbstractObservableMap.this.lastListenerRemoved();
- }
- };
- }
-
- public synchronized void addMapChangeListener(IMapChangeListener listener) {
- changeSupport.addListener(MapChangeEvent.TYPE, listener);
- }
-
- public synchronized void removeMapChangeListener(IMapChangeListener listener) {
- changeSupport.removeListener(MapChangeEvent.TYPE, listener);
- }
-
- public synchronized void addChangeListener(IChangeListener listener) {
- changeSupport.addChangeListener(listener);
- }
-
- public synchronized void addStaleListener(IStaleListener listener) {
- changeSupport.addStaleListener(listener);
- }
-
- public synchronized void dispose() {
- changeSupport.dispose();
- changeSupport = null;
- }
-
- public Realm getRealm() {
- return changeSupport.getRealm();
- }
-
- public boolean isStale() {
- checkRealm();
- return stale;
- }
-
- public synchronized void removeChangeListener(IChangeListener listener) {
- changeSupport.removeChangeListener(listener);
- }
-
- public synchronized void removeStaleListener(IStaleListener listener) {
- changeSupport.removeStaleListener(listener);
- }
-
- /**
- * Sets the stale state. Must be invoked from the current realm.
- *
- * @param stale
- */
- public void setStale(boolean stale) {
- checkRealm();
- this.stale = stale;
- if (stale) {
- fireStale();
- }
- }
-
- /**
- * Fires stale events. Must be invoked from current realm.
- */
- protected void fireStale() {
- checkRealm();
- changeSupport.fireEvent(new StaleEvent(this));
- }
-
- /**
- * Fires change events. Must be invoked from current realm.
- */
- protected void fireChange() {
- checkRealm();
- changeSupport.fireEvent(new ChangeEvent(this));
- }
-
- /**
- * Fires map change events. Must be invoked from current realm.
- *
- * @param diff
- */
- protected void fireMapChange(MapDiff diff) {
- checkRealm();
- changeSupport.fireEvent(new MapChangeEvent(this, diff));
- }
-
- /**
- * Asserts that the realm is the current realm.
- *
- * @see Realm#isCurrent()
- * @throws AssertionFailedException
- * if the realm is not the current realm
- */
- protected void checkRealm() {
- Assert.isTrue(getRealm().isCurrent());
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/BidirectionalMap.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/BidirectionalMap.java
deleted file mode 100644
index 207066d8..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/BidirectionalMap.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.core.databinding.observable.map;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * @since 3.3
- *
- */
-public class BidirectionalMap extends ObservableMap {
-
- private Map valueToElements = new HashMap();
-
- private IMapChangeListener mapListener = new IMapChangeListener() {
-
- public void handleMapChange(MapChangeEvent event) {
- MapDiff diff = event.diff;
- for (Iterator it = diff.getAddedKeys().iterator(); it.hasNext();) {
- Object addedKey = it.next();
- addMapping(addedKey, diff.getNewValue(addedKey));
- }
- for (Iterator it = diff.getChangedKeys().iterator(); it.hasNext();) {
- Object changedKey = it.next();
- removeMapping(changedKey, diff.getOldValue(changedKey));
- addMapping(changedKey, diff.getNewValue(changedKey));
- }
- for (Iterator it = diff.getRemovedKeys().iterator(); it.hasNext();) {
- Object removedKey = it.next();
- removeMapping(removedKey, diff.getOldValue(removedKey));
- }
- fireMapChange(diff);
- }
- };
-
- /**
- * @param wrappedMap
- */
- public BidirectionalMap(IObservableMap wrappedMap) {
- super(wrappedMap.getRealm(), wrappedMap);
- wrappedMap.addMapChangeListener(mapListener);
- for (Iterator it = wrappedMap.entrySet().iterator(); it.hasNext();) {
- Map.Entry entry = (Entry) it.next();
- addMapping(entry.getKey(), entry.getValue());
- }
- }
-
- /**
- * @param key
- * @param value
- */
- private void addMapping(Object key, Object value) {
- Object elementOrSet = valueToElements.get(value);
- if (elementOrSet == null) {
- valueToElements.put(value, key);
- return;
- }
- if (!(elementOrSet instanceof Set)) {
- elementOrSet = new HashSet(Collections.singleton(elementOrSet));
- valueToElements.put(value, elementOrSet);
- }
- Set set = (Set) elementOrSet;
- set.add(key);
- }
-
- /**
- * @param functionValue
- * @param element
- */
- private void removeMapping(Object functionValue, Object element) {
- Object elementOrSet = valueToElements.get(functionValue);
- if (elementOrSet instanceof Set) {
- Set set = (Set) elementOrSet;
- set.remove(element);
- if (set.size() == 0) {
- valueToElements.remove(functionValue);
- }
- } else {
- valueToElements.remove(functionValue);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/ComputedObservableMap.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/ComputedObservableMap.java
deleted file mode 100644
index 64690d34..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/ComputedObservableMap.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.map;
-
-import java.util.AbstractSet;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.set.IObservableSet;
-import org.eclipse.core.databinding.observable.set.ISetChangeListener;
-import org.eclipse.core.databinding.observable.set.SetChangeEvent;
-
-/**
- * Maps objects to one of their attributes. Tracks changes to the underlying
- * observable set of objects (keys), as well as changes to attribute values.
- */
-public abstract class ComputedObservableMap extends AbstractObservableMap {
-
- private final IObservableSet keySet;
-
- private ISetChangeListener setChangeListener = new ISetChangeListener() {
- public void handleSetChange(SetChangeEvent event) {
- Set addedKeys = new HashSet(event.diff.getAdditions());
- Set removedKeys = new HashSet(event.diff.getRemovals());
- Map oldValues = new HashMap();
- Map newValues = new HashMap();
- for (Iterator it = removedKeys.iterator(); it.hasNext();) {
- Object removedKey = it.next();
- Object oldValue = doGet(removedKey);
- unhookListener(removedKey);
- if (oldValue != null) {
- oldValues.put(removedKey, oldValue);
- }
- }
- for (Iterator it = addedKeys.iterator(); it.hasNext();) {
- Object addedKey = it.next();
- hookListener(addedKey);
- Object newValue = doGet(addedKey);
- newValues.put(addedKey, newValue);
- }
- fireMapChange(Diffs.createMapDiff(addedKeys, removedKeys,
- Collections.EMPTY_SET, oldValues, newValues));
- }
- };
-
- private Set entrySet = new EntrySet();
-
- private class EntrySet extends AbstractSet {
-
- public Iterator iterator() {
- final Iterator keyIterator = keySet.iterator();
- return new Iterator() {
-
- public boolean hasNext() {
- return keyIterator.hasNext();
- }
-
- public Object next() {
- final Object key = keyIterator.next();
- return new Map.Entry() {
-
- public Object getKey() {
- return key;
- }
-
- public Object getValue() {
- return get(getKey());
- }
-
- public Object setValue(Object value) {
- return put(getKey(), value);
- }
- };
- }
-
- public void remove() {
- keyIterator.remove();
- }
- };
- }
-
- public int size() {
- return keySet.size();
- }
-
- }
-
- /**
- * @param keySet
- */
- public ComputedObservableMap(IObservableSet keySet) {
- super(keySet.getRealm());
- this.keySet = keySet;
- this.keySet.addSetChangeListener(setChangeListener);
- }
-
- protected void init() {
- for (Iterator it = this.keySet.iterator(); it.hasNext();) {
- Object key = it.next();
- hookListener(key);
- }
- }
-
- protected final void fireSingleChange(Object key, Object oldValue,
- Object newValue) {
- fireMapChange(Diffs.createMapDiffSingleChange(key, oldValue, newValue));
- }
-
- public Set entrySet() {
- return entrySet;
- }
-
- public Set keySet() {
- return keySet;
- }
-
- final public Object get(Object key) {
- return doGet(key);
- }
-
- final public Object put(Object key, Object value) {
- return doPut(key, value);
- }
-
- /**
- * @param removedKey
- */
- protected abstract void unhookListener(Object removedKey);
-
- /**
- * @param addedKey
- */
- protected abstract void hookListener(Object addedKey);
-
- /**
- * @param key
- * @return the value for the given key
- */
- protected abstract Object doGet(Object key);
-
- /**
- * @param key
- * @param value
- * @return the old value for the given key
- */
- protected abstract Object doPut(Object key, Object value);
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/IMapChangeListener.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/IMapChangeListener.java
deleted file mode 100644
index 96bc2f6b..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/IMapChangeListener.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.map;
-
-import org.eclipse.core.databinding.observable.IObservablesListener;
-
-
-/**
- * @since 1.1
- *
- */
-public interface IMapChangeListener extends IObservablesListener {
-
- /**
- * @param event
- */
- void handleMapChange(MapChangeEvent event);
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/IObservableMap.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/IObservableMap.java
deleted file mode 100644
index 17d06649..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/IObservableMap.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164653
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.map;
-
-import java.util.Collection;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.IObservable;
-
-/**
- * Observable Map.
- *
- * <p>
- * This interface is not intended to be implemented by clients. Clients should
- * instead subclass one of the classes that implement this interface. Note that
- * direct implementers of this interface outside of the framework will be broken
- * in future releases when methods are added to this interface.
- * </p>
- *
- * @since 1.1
- */
-public interface IObservableMap extends Map, IObservable {
-
- /**
- * @param listener
- */
- public void addMapChangeListener(IMapChangeListener listener);
-
- /**
- * @param listener
- */
- public void removeMapChangeListener(IMapChangeListener listener);
-
- /**
- * @TrackedGetter
- */
- public int size();
-
- /**
- * @TrackedGetter
- */
- public boolean isEmpty();
-
- /**
- * @TrackedGetter
- */
- public boolean containsKey(Object key);
-
- /**
- * @TrackedGetter
- */
- public boolean containsValue(Object value);
-
- /**
- * @TrackedGetter
- */
- public Object get(Object key);
-
- /**
- *
- */
- public Object put(Object key, Object value);
-
- /**
- *
- */
- public Object remove(Object key);
-
- /**
- * @TrackedGetter
- */
- public Set keySet();
-
- /**
- * @TrackedGetter
- */
- public Collection values();
-
- /**
- * @TrackedGetter
- */
- public Set entrySet();
-
- /**
- * @TrackedGetter
- */
- public boolean equals(Object o);
-
- /**
- * @TrackedGetter
- */
- public int hashCode();
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/MapChangeEvent.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/MapChangeEvent.java
deleted file mode 100644
index 959c1bc8..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/MapChangeEvent.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.map;
-
-import org.eclipse.core.databinding.observable.IObservablesListener;
-import org.eclipse.core.databinding.observable.ObservableEvent;
-
-/**
- * @since 3.3
- *
- */
-public class MapChangeEvent extends ObservableEvent {
-
- /**
- *
- */
- private static final long serialVersionUID = -8092347212410548463L;
- static final Object TYPE = new Object();
- /**
- *
- */
- public MapDiff diff;
-
- /**
- * @param source
- * @param diff
- */
- public MapChangeEvent(IObservableMap source, MapDiff diff) {
- super(source);
- this.diff = diff;
- }
-
- /**
- * @return the observable map from which this event originated
- */
- public IObservableMap getObservableMap() {
- return (IObservableMap) getSource();
- }
-
- protected void dispatch(IObservablesListener listener) {
- ((IMapChangeListener)listener).handleMapChange(this);
- }
-
- protected Object getListenerType() {
- return TYPE;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/MapDiff.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/MapDiff.java
deleted file mode 100644
index 8aa633f3..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/MapDiff.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.map;
-
-import java.util.Set;
-
-/**
- * @since 1.1
- *
- */
-public abstract class MapDiff {
-
- /**
- * @return the set of keys which were added
- */
- public abstract Set getAddedKeys();
-
- /**
- * @return the set of keys which were removed
- */
- public abstract Set getRemovedKeys();
-
- /**
- * @return the set of keys for which the value has changed
- */
- public abstract Set getChangedKeys();
-
- /**
- * Returns the old value for the given key, which must be an element of
- * {@link #getRemovedKeys()} or {@link #getChangedKeys()}.
- *
- * @param key
- * @return the old value for the given key.
- */
- public abstract Object getOldValue(Object key);
-
- /**
- * Returns the new value for the given key, which must be an element of
- * {@link #getChangedKeys()} or {@link #getAddedKeys()}.
- *
- * @param key
- * @return the new value for the given key.
- */
- public abstract Object getNewValue(Object key);
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/ObservableMap.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/ObservableMap.java
deleted file mode 100644
index a802d544..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/ObservableMap.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164653
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.map;
-
-import java.util.Collection;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.AbstractObservable;
-import org.eclipse.core.databinding.observable.ObservableTracker;
-import org.eclipse.core.databinding.observable.Realm;
-
-/**
- * @since 1.1
- *
- */
-public class ObservableMap extends AbstractObservable implements IObservableMap {
-
- protected Map wrappedMap;
-
- private boolean stale = false;
-
- /**
- * @param wrappedMap
- */
- public ObservableMap(Map wrappedMap) {
- this(Realm.getDefault(), wrappedMap);
- }
-
- /**
- * @param realm
- * @param wrappedMap
- */
- public ObservableMap(Realm realm, Map wrappedMap) {
- super(realm);
- this.wrappedMap = wrappedMap;
- }
-
- public synchronized void addMapChangeListener(IMapChangeListener listener) {
- addListener(MapChangeEvent.TYPE, listener);
- }
-
- public synchronized void removeMapChangeListener(IMapChangeListener listener) {
- removeListener(MapChangeEvent.TYPE, listener);
- }
-
- protected void getterCalled() {
- ObservableTracker.getterCalled(this);
- }
-
- protected void fireMapChange(MapDiff diff) {
- checkRealm();
-
- // fire general change event first
- super.fireChange();
-
- fireEvent(new MapChangeEvent(this, diff));
- }
-
- public boolean containsKey(Object key) {
- getterCalled();
- return wrappedMap.containsKey(key);
- }
-
- public boolean containsValue(Object value) {
- getterCalled();
- return wrappedMap.containsValue(value);
- }
-
- public Set entrySet() {
- getterCalled();
- return wrappedMap.entrySet();
- }
-
- public Object get(Object key) {
- getterCalled();
- return wrappedMap.get(key);
- }
-
- public boolean isEmpty() {
- getterCalled();
- return wrappedMap.isEmpty();
- }
-
- public Set keySet() {
- getterCalled();
- return wrappedMap.keySet();
- }
-
- public int size() {
- getterCalled();
- return wrappedMap.size();
- }
-
- public Collection values() {
- getterCalled();
- return wrappedMap.values();
- }
-
- /**
- * Returns the stale state. Must be invoked from the current realm.
- *
- * @return stale state
- */
- public boolean isStale() {
- checkRealm();
- return stale;
- }
-
- /**
- * Sets the stale state. Must be invoked from the current realm.
- *
- * @param stale
- * The stale state to set. This will fire a stale event if the
- * given boolean is true and this observable set was not already
- * stale.
- */
- public void setStale(boolean stale) {
- checkRealm();
- boolean wasStale = this.stale;
- this.stale = stale;
- if (!wasStale && stale) {
- fireStale();
- }
- }
-
- public Object put(Object key, Object value) {
- throw new UnsupportedOperationException();
- }
-
- public Object remove(Object key) {
- throw new UnsupportedOperationException();
- }
-
- public void clear() {
- throw new UnsupportedOperationException();
- }
-
- public void putAll(Map arg0) {
- throw new UnsupportedOperationException();
- }
-
- public synchronized void dispose() {
- super.dispose();
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/WritableMap.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/WritableMap.java
deleted file mode 100644
index 25b3a392..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/WritableMap.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164653
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.map;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.Realm;
-
-/**
- * @since 3.3
- *
- */
-public class WritableMap extends ObservableMap {
-
- /**
- *
- */
- public WritableMap() {
- this(Realm.getDefault());
- }
-
- /**
- * @param realm
- */
- public WritableMap(Realm realm) {
- super(realm, new HashMap());
- }
-
- /**
- * Associates the provided <code>value</code> with the <code>key</code>. Must be invoked from the current realm.
- */
- public Object put(Object key, Object value) {
- checkRealm();
- Object result = wrappedMap.put(key, value);
- if (result==null) {
- fireMapChange(Diffs.createMapDiffSingleAdd(key, value));
- } else {
- fireMapChange(Diffs.createMapDiffSingleChange(key, value, result));
- }
- return result;
- }
-
- /**
- * Removes the value with the provide <code>key</code>. Must be invoked from the current realm.
- */
- public Object remove(Object key) {
- checkRealm();
- Object result = wrappedMap.remove(key);
- if (result!=null) {
- fireMapChange(Diffs.createMapDiffSingleRemove(key, result));
- }
- return result;
- }
-
- /**
- * Clears the map. Must be invoked from the current realm.
- */
- public void clear() {
- checkRealm();
- Map copy = new HashMap(wrappedMap.size());
- copy.putAll(wrappedMap);
- wrappedMap.clear();
- fireMapChange(Diffs.createMapDiffRemoveAll(copy));
- }
-
- /**
- * Adds the provided <code>map</code>'s contents to this map. Must be invoked from the current realm.
- */
- public void putAll(Map map) {
- checkRealm();
- Set addedKeys = new HashSet(map.size());
- Map changes = new HashMap(map.size());
- for (Iterator it = map.entrySet().iterator(); it.hasNext();) {
- Map.Entry entry = (Entry) it.next();
- Object previousValue = wrappedMap.put(entry.getKey(), entry.getValue());
- if (previousValue==null) {
- addedKeys.add(entry.getKey());
- } else {
- changes.put(entry.getKey(), previousValue);
- }
- }
- fireMapChange(Diffs.createMapDiff(addedKeys, Collections.EMPTY_SET, changes.keySet(), changes, wrappedMap));
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/package.html b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/package.html
deleted file mode 100644
index d720e2b4..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/package.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <meta name="GENERATOR" content="Mozilla/4.5 [en] (Win98; I) [Netscape]">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-To be written.
-<h2>
-Package Specification</h2>
-<p>
-This package provides classes that can be used to ...</p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/masterdetail/IObservableFactory.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/masterdetail/IObservableFactory.java
deleted file mode 100644
index e1fe5a01..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/masterdetail/IObservableFactory.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.masterdetail;
-
-import org.eclipse.core.databinding.observable.IObservable;
-
-/**
- * Generates an {@link IObservable} when passed a target instance.
- *
- * @since 1.0
- */
-public interface IObservableFactory {
-
- /**
- * Creates an observable for the given target object.
- *
- * @param target
- * @return the new observable
- */
- public IObservable createObservable(Object target);
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/masterdetail/MasterDetailObservables.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/masterdetail/MasterDetailObservables.java
deleted file mode 100644
index 4bc4e786..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/masterdetail/MasterDetailObservables.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 147515
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.masterdetail;
-
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.set.IObservableSet;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.internal.databinding.observable.masterdetail.DetailObservableList;
-import org.eclipse.core.internal.databinding.observable.masterdetail.DetailObservableSet;
-import org.eclipse.core.internal.databinding.observable.masterdetail.DetailObservableValue;
-
-/**
- * Allows for the observation of an attribute, the detail, of an observable
- * representing selection or another transient instance, the master.
- *
- * @since 1.0
- */
-public class MasterDetailObservables {
-
- /**
- * Creates a detail observable value from a master observable value and a
- * factory. This can be used to create observable values that represent a
- * property of a selected object in a table.
- *
- * @param master
- * the observable value to track
- * @param detailFactory
- * a factory for creating {@link IObservableValue} instances
- * given a current value of the master
- * @param detailType
- * the value type of the detail observable value, typically of
- * type java.lang.Class and can be <code>null</code>
- * @return an observable value of the given value type that, for any current
- * value of the given master value, behaves like the observable
- * value created by the factory for that current value.
- */
- public static IObservableValue detailValue(IObservableValue master,
- IObservableFactory detailFactory, Object detailType) {
- return new DetailObservableValue(master, detailFactory, detailType);
- }
-
- /**
- * Creates a detail observable list from a master observable value and a
- * factory. This can be used to create observable lists that represent a
- * list property of a selected object in a table.
- *
- * @param master
- * the observable value to track
- * @param detailFactory
- * a factory for creating {@link IObservableList} instances given
- * a current value of the master
- * @param detailElementType
- * the element type of the detail observable list, typically of
- * type java.lang.Class and can be <code>null</code>
- * @return an observable list with the given element type that, for any
- * current value of the given master value, behaves like the
- * observable list created by the factory for that current value.
- */
- public static IObservableList detailList(IObservableValue master,
- IObservableFactory detailFactory, Object detailElementType) {
- return new DetailObservableList(detailFactory, master,
- detailElementType);
- }
-
- /**
- * Creates a detail observable set from a master observable value and a
- * factory. This can be used to create observable sets that represent a set
- * property of a selected object in a table.
- *
- * @param master
- * the observable value to track
- * @param detailFactory
- * a factory for creating {@link IObservableSet} instances given
- * a current value of the master
- * @param detailElementType
- * the element type of the detail observable set, typically of
- * type java.lang.Class and can be <code>null</code>
- * @return an observable set with the given element type that, for any
- * current value of the given master value, behaves like the
- * observable set created by the factory for that current value.
- */
- public static IObservableSet detailSet(IObservableValue master,
- IObservableFactory detailFactory, Object detailElementType) {
- return new DetailObservableSet(detailFactory, master, detailElementType);
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/masterdetail/package.html b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/masterdetail/package.html
deleted file mode 100644
index d720e2b4..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/masterdetail/package.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <meta name="GENERATOR" content="Mozilla/4.5 [en] (Win98; I) [Netscape]">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-To be written.
-<h2>
-Package Specification</h2>
-<p>
-This package provides classes that can be used to ...</p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/package.html b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/package.html
deleted file mode 100644
index d720e2b4..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/package.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <meta name="GENERATOR" content="Mozilla/4.5 [en] (Win98; I) [Netscape]">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-To be written.
-<h2>
-Package Specification</h2>
-<p>
-This package provides classes that can be used to ...</p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/AbstractObservableSet.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/AbstractObservableSet.java
deleted file mode 100644
index 2d762a67..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/AbstractObservableSet.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.set;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.AbstractObservable;
-import org.eclipse.core.databinding.observable.ChangeSupport;
-import org.eclipse.core.databinding.observable.ObservableTracker;
-import org.eclipse.core.databinding.observable.Realm;
-
-/**
- *
- * Abstract implementation of {@link IObservableSet}.
- *
- * @since 1.0
- *
- */
-public abstract class AbstractObservableSet extends AbstractObservable implements
- IObservableSet {
-
- private ChangeSupport changeSupport;
-
- private boolean stale = false;
-
- protected AbstractObservableSet() {
- this(Realm.getDefault());
- }
-
- protected AbstractObservableSet(Realm realm) {
- super(realm);
- changeSupport = new ChangeSupport(realm){
- protected void firstListenerAdded() {
- AbstractObservableSet.this.firstListenerAdded();
- }
- protected void lastListenerRemoved() {
- AbstractObservableSet.this.lastListenerRemoved();
- }
- };
- }
-
- public void addSetChangeListener(ISetChangeListener listener) {
- changeSupport.addListener(SetChangeEvent.TYPE, listener);
- }
-
- public void removeSetChangeListener(ISetChangeListener listener) {
- changeSupport.removeListener(SetChangeEvent.TYPE, listener);
- }
-
- protected abstract Set getWrappedSet();
-
- protected void fireSetChange(SetDiff diff) {
- // fire general change event first
- super.fireChange();
-
- changeSupport.fireEvent(new SetChangeEvent(this, diff));
- }
-
- public boolean contains(Object o) {
- getterCalled();
- return getWrappedSet().contains(o);
- }
-
- public boolean containsAll(Collection c) {
- getterCalled();
- return getWrappedSet().containsAll(c);
- }
-
- public boolean equals(Object o) {
- getterCalled();
- return getWrappedSet().equals(o);
- }
-
- public int hashCode() {
- getterCalled();
- return getWrappedSet().hashCode();
- }
-
- public boolean isEmpty() {
- getterCalled();
- return getWrappedSet().isEmpty();
- }
-
- public Iterator iterator() {
- final Iterator wrappedIterator = getWrappedSet().iterator();
- return new Iterator() {
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
-
- public boolean hasNext() {
- ObservableTracker.getterCalled(AbstractObservableSet.this);
- return wrappedIterator.hasNext();
- }
-
- public Object next() {
- ObservableTracker.getterCalled(AbstractObservableSet.this);
- return wrappedIterator.next();
- }
- };
- }
-
- public int size() {
- getterCalled();
- return getWrappedSet().size();
- }
-
- public Object[] toArray() {
- getterCalled();
- return getWrappedSet().toArray();
- }
-
- public Object[] toArray(Object[] a) {
- getterCalled();
- return getWrappedSet().toArray(a);
- }
-
- public String toString() {
- getterCalled();
- return getWrappedSet().toString();
- }
-
- protected void getterCalled() {
- ObservableTracker.getterCalled(this);
- }
-
- public boolean add(Object o) {
- throw new UnsupportedOperationException();
- }
-
- public boolean addAll(Collection c) {
- throw new UnsupportedOperationException();
- }
-
- public boolean remove(Object o) {
- throw new UnsupportedOperationException();
- }
-
- public boolean removeAll(Collection c) {
- throw new UnsupportedOperationException();
- }
-
- public boolean retainAll(Collection c) {
- throw new UnsupportedOperationException();
- }
-
- public void clear() {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @return Returns the stale state.
- */
- public boolean isStale() {
- return stale;
- }
-
- /**
- * @param stale
- * The stale state to set. This will fire a stale event if the
- * given boolean is true and this observable set was not already
- * stale.
- */
- public void setStale(boolean stale) {
- boolean wasStale = this.stale;
- this.stale = stale;
- if (!wasStale && stale) {
- fireStale();
- }
- }
-
-
- protected void fireChange() {
- throw new RuntimeException("fireChange should not be called, use fireSetChange() instead"); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.provisional.databinding.observable.AbstractObservable#dispose()
- */
- public void dispose() {
- super.dispose();
- changeSupport.dispose();
- changeSupport = null;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/IObservableSet.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/IObservableSet.java
deleted file mode 100644
index 3210f622..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/IObservableSet.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.set;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.IObservableCollection;
-
-/**
- * A set whose changes can be tracked by set change listeners.
- *
- * <p>
- * This interface is not intended to be implemented by clients. Clients should
- * instead subclass one of the classes that implement this interface. Note that
- * direct implementers of this interface outside of the framework will be broken
- * in future releases when methods are added to this interface.
- * </p>
- *
- * @since 1.0
- *
- */
-public interface IObservableSet extends Set, IObservableCollection {
-
- /**
- * @param listener
- */
- public void addSetChangeListener(ISetChangeListener listener);
-
- /**
- * @param listener
- */
- public void removeSetChangeListener(ISetChangeListener listener);
-
- /**
- * @return the element type or <code>null</code> if untyped
- */
- public Object getElementType();
-
- /**
- * @TrackedGetter
- */
- int size();
-
- /**
- * @TrackedGetter
- */
- boolean isEmpty();
-
- /**
- * @TrackedGetter
- */
- boolean contains(Object o);
-
- /**
- * @TrackedGetter
- */
- Iterator iterator();
-
- /**
- * @TrackedGetter
- */
- Object[] toArray();
-
- /**
- * @TrackedGetter
- */
- Object[] toArray(Object a[]);
-
- // Modification Operations
-
- /**
- * @TrackedGetter
- */
- boolean add(Object o);
-
- /**
- * @TrackedGetter
- */
- boolean remove(Object o);
-
- // Bulk Operations
-
- /**
- * @TrackedGetter
- */
- boolean containsAll(Collection c);
-
- /**
- * @TrackedGetter
- */
- boolean addAll(Collection c);
-
- /**
- * @TrackedGetter
- */
- boolean retainAll(Collection c);
-
- /**
- * @TrackedGetter
- */
- boolean removeAll(Collection c);
-
- // Comparison and hashing
-
- /**
- * @TrackedGetter
- */
- boolean equals(Object o);
-
- /**
- * @TrackedGetter
- */
- int hashCode();
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/ISetChangeListener.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/ISetChangeListener.java
deleted file mode 100644
index 01bb5247..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/ISetChangeListener.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.set;
-
-import org.eclipse.core.databinding.observable.IObservablesListener;
-
-/**
- * @since 1.0
- *
- */
-public interface ISetChangeListener extends IObservablesListener {
-
- /**
- * @param event
- */
- void handleSetChange(SetChangeEvent event);
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/ListToSetAdapter.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/ListToSetAdapter.java
deleted file mode 100644
index 448ac6a1..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/ListToSetAdapter.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.set;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.list.IListChangeListener;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.list.ListChangeEvent;
-import org.eclipse.core.databinding.observable.list.ListDiffEntry;
-
-/**
- * Observable set backed by an observable list. The wrapped list must not
- * contain duplicate elements.
- *
- * @since 3.2
- *
- */
-public class ListToSetAdapter extends ObservableSet {
-
- private final IObservableList list;
-
- private IListChangeListener listener = new IListChangeListener() {
-
- public void handleListChange(ListChangeEvent event) {
- Set added = new HashSet();
- Set removed = new HashSet();
- ListDiffEntry[] differences = event.diff.getDifferences();
- for (int i = 0; i < differences.length; i++) {
- ListDiffEntry entry = differences[i];
- Object element = entry.getElement();
- if (entry.isAddition()) {
- if (wrappedSet.add(element)) {
- if (!removed.remove(element))
- added.add(element);
- }
- } else {
- if (wrappedSet.remove(element)) {
- removed.add(element);
- added.remove(element);
- }
- }
- }
- fireSetChange(Diffs.createSetDiff(added, removed));
- }
- };
-
- /**
- * @param list
- */
- public ListToSetAdapter(IObservableList list) {
- super(list.getRealm(), new HashSet(), list.getElementType());
- this.list = list;
- wrappedSet.addAll(list);
- this.list.addListChangeListener(listener);
- }
-
- public void dispose() {
- super.dispose();
- if (list != null && listener != null) {
- list.removeListChangeListener(listener);
- listener = null;
- }
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/MappedSet.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/MappedSet.java
deleted file mode 100644
index 2fb1dfbe..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/MappedSet.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.set;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.map.IMapChangeListener;
-import org.eclipse.core.databinding.observable.map.IObservableMap;
-import org.eclipse.core.databinding.observable.map.MapChangeEvent;
-import org.eclipse.core.databinding.observable.map.MapDiff;
-
-/**
- * @since 1.0
- *
- */
-public class MappedSet extends ObservableSet {
-
- private final IObservableMap wrappedMap;
-
- /*
- * Map from values (range elements) to Integer ref counts
- */
- private Map valueCounts = new HashMap();
-
- private ISetChangeListener domainListener = new ISetChangeListener() {
- public void handleSetChange(SetChangeEvent event) {
- Set additions = new HashSet();
- for (Iterator it = event.diff.getAdditions().iterator(); it.hasNext();) {
- Object added = it.next();
- Object mapValue = wrappedMap.get(added);
- if (handleAddition(mapValue)) {
- additions.add(mapValue);
- }
- }
- Set removals = new HashSet();
- for (Iterator it = event.diff.getRemovals().iterator(); it.hasNext();) {
- Object removed = it.next();
- Object mapValue = wrappedMap.get(removed);
- if (handleRemoval(mapValue)) {
- removals.add(mapValue);
- }
- }
- fireSetChange(Diffs.createSetDiff(additions, removals));
- }
- };
-
- private IMapChangeListener mapChangeListener = new IMapChangeListener() {
- public void handleMapChange(MapChangeEvent event) {
- MapDiff diff = event.diff;
- Set additions = new HashSet();
- Set removals = new HashSet();
- for (Iterator it = diff.getRemovedKeys().iterator(); it.hasNext();) {
- Object key = it.next();
- Object oldValue = diff.getOldValue(key);
- if (handleRemoval(oldValue)) {
- removals.add(oldValue);
- }
- }
- for (Iterator it = diff.getChangedKeys().iterator(); it.hasNext();) {
- Object key = it.next();
- Object oldValue = diff.getOldValue(key);
- Object newValue = diff.getNewValue(key);
- if (handleRemoval(oldValue)) {
- removals.add(oldValue);
- }
- if (handleAddition(newValue)) {
- additions.add(newValue);
- }
- }
- for (Iterator it = diff.getAddedKeys().iterator(); it.hasNext();) {
- Object key = it.next();
- Object newValue = diff.getNewValue(key);
- if (handleAddition(newValue)) {
- additions.add(newValue);
- }
- }
- fireSetChange(Diffs.createSetDiff(additions, removals));
- }
- };
-
- private IObservableSet input;
-
- /**
- * @param input
- * @param map
- */
- public MappedSet(IObservableSet input, IObservableMap map) {
- super(input.getRealm(), Collections.EMPTY_SET, Object.class);
- setWrappedSet(valueCounts.keySet());
- this.wrappedMap = map;
- this.input = input;
- for (Iterator it = input.iterator(); it.hasNext();) {
- Object element = it.next();
- Object functionValue = wrappedMap.get(element);
- handleAddition(functionValue);
- }
- input.addSetChangeListener(domainListener);
- map.addMapChangeListener(mapChangeListener);
- }
-
- /**
- * @param mapValue
- * @return true if the given mapValue was an addition
- */
- protected boolean handleAddition(Object mapValue) {
- Integer count = (Integer) valueCounts.get(mapValue);
- if (count == null) {
- valueCounts.put(mapValue, new Integer(1));
- return true;
- }
- valueCounts.put(mapValue, new Integer(count.intValue() + 1));
- return false;
- }
-
- /**
- * @param mapValue
- * @return true if the given mapValue has been removed
- */
- protected boolean handleRemoval(Object mapValue) {
- Integer count = (Integer) valueCounts.get(mapValue);
- if (count.intValue() <= 1) {
- valueCounts.remove(mapValue);
- return true;
- }
- valueCounts.put(mapValue, new Integer(count.intValue() - 1));
- return false;
- }
-
- public void dispose() {
- wrappedMap.removeMapChangeListener(mapChangeListener);
- input.removeSetChangeListener(domainListener);
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/ObservableSet.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/ObservableSet.java
deleted file mode 100644
index e32386bf..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/ObservableSet.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.set;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.AbstractObservable;
-import org.eclipse.core.databinding.observable.ObservableTracker;
-import org.eclipse.core.databinding.observable.Realm;
-
-/**
- *
- * Abstract implementation of {@link IObservableSet}.
- *
- * @since 1.0
- *
- */
-public abstract class ObservableSet extends AbstractObservable implements
- IObservableSet {
-
- protected Set wrappedSet;
-
- private boolean stale = false;
-
- protected Object elementType;
-
- protected ObservableSet(Set wrappedSet, Object elementType) {
- this(Realm.getDefault(), wrappedSet, elementType);
- }
-
- protected ObservableSet(Realm realm, Set wrappedSet, Object elementType) {
- super(realm);
- this.wrappedSet = wrappedSet;
- this.elementType = elementType;
- }
-
- public void addSetChangeListener(ISetChangeListener listener) {
- addListener(SetChangeEvent.TYPE, listener);
- }
-
- public void removeSetChangeListener(ISetChangeListener listener) {
- removeListener(SetChangeEvent.TYPE, listener);
- }
-
- protected void fireSetChange(SetDiff diff) {
- // fire general change event first
- super.fireChange();
-
- fireEvent(new SetChangeEvent(this, diff));
- }
-
- public boolean contains(Object o) {
- getterCalled();
- return wrappedSet.contains(o);
- }
-
- public boolean containsAll(Collection c) {
- getterCalled();
- return wrappedSet.containsAll(c);
- }
-
- public boolean equals(Object o) {
- getterCalled();
- return wrappedSet.equals(o);
- }
-
- public int hashCode() {
- getterCalled();
- return wrappedSet.hashCode();
- }
-
- public boolean isEmpty() {
- getterCalled();
- return wrappedSet.isEmpty();
- }
-
- public Iterator iterator() {
- final Iterator wrappedIterator = wrappedSet.iterator();
- return new Iterator() {
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
-
- public boolean hasNext() {
- ObservableTracker.getterCalled(ObservableSet.this);
- return wrappedIterator.hasNext();
- }
-
- public Object next() {
- ObservableTracker.getterCalled(ObservableSet.this);
- return wrappedIterator.next();
- }
- };
- }
-
- public int size() {
- getterCalled();
- return wrappedSet.size();
- }
-
- public Object[] toArray() {
- getterCalled();
- return wrappedSet.toArray();
- }
-
- public Object[] toArray(Object[] a) {
- getterCalled();
- return wrappedSet.toArray(a);
- }
-
- public String toString() {
- getterCalled();
- return wrappedSet.toString();
- }
-
- protected void getterCalled() {
- ObservableTracker.getterCalled(this);
- }
-
- public boolean add(Object o) {
- throw new UnsupportedOperationException();
- }
-
- public boolean addAll(Collection c) {
- throw new UnsupportedOperationException();
- }
-
- public boolean remove(Object o) {
- throw new UnsupportedOperationException();
- }
-
- public boolean removeAll(Collection c) {
- throw new UnsupportedOperationException();
- }
-
- public boolean retainAll(Collection c) {
- throw new UnsupportedOperationException();
- }
-
- public void clear() {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @return Returns the stale state.
- */
- public boolean isStale() {
- return stale;
- }
-
- /**
- * @param stale
- * The stale state to set. This will fire a stale event if the
- * given boolean is true and this observable set was not already
- * stale.
- */
- public void setStale(boolean stale) {
- boolean wasStale = this.stale;
- this.stale = stale;
- if (!wasStale && stale) {
- fireStale();
- }
- }
-
- /**
- * @param wrappedSet The wrappedSet to set.
- */
- protected void setWrappedSet(Set wrappedSet) {
- this.wrappedSet = wrappedSet;
- }
-
- protected void fireChange() {
- throw new RuntimeException("fireChange should not be called, use fireSetChange() instead"); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.provisional.databinding.observable.AbstractObservable#dispose()
- */
- public void dispose() {
- super.dispose();
- }
-
- public Object getElementType() {
- return elementType;
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/SetChangeEvent.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/SetChangeEvent.java
deleted file mode 100644
index c0399143..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/SetChangeEvent.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.set;
-
-import org.eclipse.core.databinding.observable.IObservablesListener;
-import org.eclipse.core.databinding.observable.ObservableEvent;
-
-/**
- * @since 3.3
- *
- */
-public class SetChangeEvent extends ObservableEvent {
-
- /**
- *
- */
- private static final long serialVersionUID = 7436547103857482256L;
- static final Object TYPE = new Object();
- /**
- *
- */
- public SetDiff diff;
-
- /**
- * @param source
- * @param diff
- */
- public SetChangeEvent(IObservableSet source, SetDiff diff) {
- super(source);
- this.diff = diff;
- }
-
- /**
- * @return the observable set from which this event originated
- */
- public IObservableSet getObservableSet() {
- return (IObservableSet) getSource();
- }
-
- protected void dispatch(IObservablesListener listener) {
- ((ISetChangeListener)listener).handleSetChange(this);
- }
-
- protected Object getListenerType() {
- return TYPE;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/SetDiff.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/SetDiff.java
deleted file mode 100644
index a694287d..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/SetDiff.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.set;
-
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.IDiff;
-
-/**
- * @since 1.0
- *
- */
-public abstract class SetDiff implements IDiff {
-
- /**
- * @return the set of added elements
- */
- public abstract Set getAdditions();
-
- /**
- * @return the set of removed elements
- */
- public abstract Set getRemovals();
-
- /**
- * @see java.lang.Object#toString()
- */
- public String toString() {
- StringBuffer buffer = new StringBuffer();
- buffer
- .append(getClass().getName())
- .append("{additions [") //$NON-NLS-1$
- .append(getAdditions() != null ? getAdditions().toString() : "null") //$NON-NLS-1$
- .append("], removals [") //$NON-NLS-1$
- .append(getRemovals() != null ? getRemovals().toString() : "null") //$NON-NLS-1$
- .append("]}"); //$NON-NLS-1$
-
- return buffer.toString();
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/UnionSet.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/UnionSet.java
deleted file mode 100644
index a16cb08f..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/UnionSet.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.set;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.internal.databinding.observable.IStalenessConsumer;
-import org.eclipse.core.internal.databinding.observable.StalenessTracker;
-
-/**
- * Represents a set consisting of the union of elements from one or more other
- * sets. This object does not need to be explicitly disposed. If nobody is
- * listening to the UnionSet, the set will remove its listeners.
- *
- * @since 1.0
- */
-public final class UnionSet extends ObservableSet {
-
- /**
- * child sets
- */
- private IObservableSet[] childSets;
-
- private boolean stale = false;
-
- /**
- * Map of elements onto Integer reference counts. This map is constructed
- * when the first listener is added to the union set. Null if nobody is
- * listening to the UnionSet.
- */
- private HashMap refCounts = null;
-
- private StalenessTracker stalenessTracker;
-
- /**
- * @param childSets
- */
- public UnionSet(IObservableSet[] childSets) {
- super(childSets[0].getRealm(), null, childSets[0].getElementType());
- this.childSets = childSets;
- this.stalenessTracker = new StalenessTracker(childSets,
- stalenessConsumer);
- }
-
- private ISetChangeListener childSetChangeListener = new ISetChangeListener() {
- public void handleSetChange(SetChangeEvent event) {
- processAddsAndRemoves(event.diff.getAdditions(), event.diff.getRemovals());
- }
- };
-
- private IStalenessConsumer stalenessConsumer = new IStalenessConsumer() {
- public void setStale(boolean stale) {
- boolean oldStale = UnionSet.this.stale;
- UnionSet.this.stale = stale;
- if (stale && !oldStale) {
- fireStale();
- }
- }
- };
-
- public boolean isStale() {
- if (refCounts != null) {
- return stale;
- }
-
- for (int i = 0; i < childSets.length; i++) {
- IObservableSet childSet = childSets[i];
-
- if (childSet.isStale()) {
- return true;
- }
- }
- return false;
- }
-
- private void processAddsAndRemoves(Set adds, Set removes) {
- Set addsToFire = new HashSet();
- Set removesToFire = new HashSet();
-
- for (Iterator iter = adds.iterator(); iter.hasNext();) {
- Object added = iter.next();
-
- Integer refCount = (Integer) refCounts.get(added);
- if (refCount == null) {
- refCounts.put(added, new Integer(1));
- addsToFire.add(added);
- } else {
- int refs = refCount.intValue();
- refCount = new Integer(refs + 1);
- refCounts.put(added, refCount);
- }
- }
-
- for (Iterator iter = removes.iterator(); iter.hasNext();) {
- Object removed = iter.next();
-
- Integer refCount = (Integer) refCounts.get(removed);
- if (refCount != null) {
- int refs = refCount.intValue();
- if (refs <= 1) {
- removesToFire.add(removed);
- refCounts.remove(removed);
- } else {
- refCount = new Integer(refCount.intValue() - 1);
- refCounts.put(removed, refCount);
- }
- }
- }
-
- // just in case the removes overlapped with the adds
- addsToFire.removeAll(removesToFire);
-
- if (addsToFire.size() > 0 || removesToFire.size() > 0) {
- fireSetChange(Diffs.createSetDiff(addsToFire, removesToFire));
- }
- }
-
- protected void firstListenerAdded() {
- super.firstListenerAdded();
-
- refCounts = new HashMap();
- for (int i = 0; i < childSets.length; i++) {
- IObservableSet next = childSets[i];
- next.addSetChangeListener(childSetChangeListener);
- incrementRefCounts(next);
- }
- stalenessTracker = new StalenessTracker(childSets, stalenessConsumer);
- setWrappedSet(refCounts.keySet());
- }
-
- protected void lastListenerRemoved() {
- super.lastListenerRemoved();
-
- for (int i = 0; i < childSets.length; i++) {
- IObservableSet next = childSets[i];
-
- next.removeSetChangeListener(childSetChangeListener);
- stalenessTracker.removeObservable(next);
- }
- refCounts = null;
- stalenessTracker = null;
- setWrappedSet(null);
- }
-
- private ArrayList incrementRefCounts(Collection added) {
- ArrayList adds = new ArrayList();
-
- for (Iterator iter = added.iterator(); iter.hasNext();) {
- Object next = iter.next();
-
- Integer refCount = (Integer) refCounts.get(next);
- if (refCount == null) {
- adds.add(next);
- refCount = new Integer(1);
- refCounts.put(next, refCount);
- } else {
- refCount = new Integer(refCount.intValue() + 1);
- refCounts.put(next, refCount);
- }
- }
- return adds;
- }
-
- protected void getterCalled() {
- super.getterCalled();
- if (refCounts == null) {
- // no listeners, recompute
- setWrappedSet(computeElements());
- }
- }
-
- private Set computeElements() {
- // If there is no cached value, compute the union from scratch
- if (refCounts == null) {
- Set result = new HashSet();
- for (int i = 0; i < childSets.length; i++) {
- result.addAll(childSets[i]);
- }
- return result;
- }
-
- // Else there is a cached value. Return it.
- return refCounts.keySet();
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/WritableSet.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/WritableSet.java
deleted file mode 100644
index 4f77afe2..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/WritableSet.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 147515
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.set;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.Realm;
-
-/**
- * @since 1.0
- *
- */
-public class WritableSet extends ObservableSet {
-
- /**
- * Constructs a new instance with the default realm, empty list, and a
- * <code>null</code> element type.
- *
- */
- public WritableSet() {
- this(Realm.getDefault());
- }
-
- /**
- * Construts a new instance with the default realm.
- *
- * @param c
- * @param elementType
- * can be <code>null</code>
- */
- public WritableSet(Collection c, Object elementType) {
- this(Realm.getDefault(), new HashSet(c), elementType);
- }
-
- /**
- * Constructs a new instance with an empty list and a <code>null</code> element type.
- *
- * @param realm
- */
- public WritableSet(Realm realm) {
- this(realm, new HashSet(), null);
- }
-
- /**
- * Constructs a new instance.
- *
- * @param realm
- * @param c
- * @param elementType
- * can be <code>null</code>
- */
- public WritableSet(Realm realm, Collection c, Object elementType) {
- super(realm, new HashSet(c), elementType);
- this.elementType = elementType;
- }
-
- public boolean add(Object o) {
- boolean added = wrappedSet.add(o);
- if (added) {
- fireSetChange(Diffs.createSetDiff(Collections.singleton(o), Collections.EMPTY_SET));
- }
- return added;
- }
-
- public boolean addAll(Collection c) {
- Set adds = new HashSet();
- Iterator it = c.iterator();
- while (it.hasNext()) {
- Object element = it.next();
- if (wrappedSet.add(element)) {
- adds.add(element);
- }
- }
- if (adds.size() > 0) {
- fireSetChange(Diffs.createSetDiff(adds, Collections.EMPTY_SET));
- return true;
- }
- return false;
- }
-
- public boolean remove(Object o) {
- boolean removed = wrappedSet.remove(o);
- if (removed) {
- fireSetChange(Diffs.createSetDiff(Collections.EMPTY_SET, Collections
- .singleton(o)));
- }
- return removed;
- }
-
- public boolean removeAll(Collection c) {
- Set removes = new HashSet();
- Iterator it = c.iterator();
- while (it.hasNext()) {
- Object element = it.next();
- if (wrappedSet.remove(element)) {
- removes.add(element);
- }
- }
- if (removes.size() > 0) {
- fireSetChange(Diffs.createSetDiff(Collections.EMPTY_SET, removes));
- return true;
- }
- return false;
- }
-
- public boolean retainAll(Collection c) {
- Set removes = new HashSet();
- Iterator it = wrappedSet.iterator();
- while (it.hasNext()) {
- Object element = it.next();
- if (!c.contains(element)) {
- it.remove();
- removes.add(element);
- }
- }
- if (removes.size() > 0) {
- fireSetChange(Diffs.createSetDiff(Collections.EMPTY_SET, removes));
- return true;
- }
- return false;
- }
-
- public void clear() {
- Set removes = new HashSet(wrappedSet);
- wrappedSet.clear();
- fireSetChange(Diffs.createSetDiff(Collections.EMPTY_SET, removes));
- }
-
- /**
- * @param elementType can be <code>null</code>
- * @return new instance with the default realm
- */
- public static WritableSet withElementType(Object elementType) {
- return new WritableSet(Realm.getDefault(), new HashSet(), elementType);
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/package.html b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/package.html
deleted file mode 100644
index d720e2b4..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/package.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <meta name="GENERATOR" content="Mozilla/4.5 [en] (Win98; I) [Netscape]">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-To be written.
-<h2>
-Package Specification</h2>
-<p>
-This package provides classes that can be used to ...</p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/tree/IOrderedTreeProvider.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/tree/IOrderedTreeProvider.java
deleted file mode 100644
index 1716eccc..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/tree/IOrderedTreeProvider.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.tree;
-
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.internal.databinding.observable.tree.TreePath;
-
-/**
- * Objects that implement this interface are capable of describing a tree by
- * returning the list of children of any given element in the tree.
- *
- * @since 3.3
- */
-public interface IOrderedTreeProvider {
- /**
- * Returns the children of the given element, or null if the element is a
- * leaf node. The caller of this method is expected to dispose the result
- * list when it is no longer needed.
- *
- * @param element
- * the tree path of the element to query
- * @return the children of the given element, or null if the element is a
- * leaf node
- */
- IObservableList createChildList(TreePath element);
-
- /**
- * @return the realm shared by all child lists
- */
- Realm getRealm();
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/tree/IUnorderedTreeProvider.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/tree/IUnorderedTreeProvider.java
deleted file mode 100644
index 9efd06f4..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/tree/IUnorderedTreeProvider.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.tree;
-
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.set.IObservableSet;
-import org.eclipse.core.internal.databinding.observable.tree.TreePath;
-
-/**
- * Objects that implement this interface are capable of describing a tree by
- * returning the set of children of any given element in the tree.
- *
- * @since 3.3
- */
-public interface IUnorderedTreeProvider {
-
- /**
- * @return the realm shared by all child sets
- */
- public Realm getRealm();
-
- /**
- * Returns the children of the given element, or null if the element is a
- * leaf node. The caller of this method is expected to dispose the result
- * set when it is no longer needed.
- *
- * @param element
- * the tree path of the element to query
- * @return the children of the given element, or null if the element is a
- * leaf node
- */
- public IObservableSet createChildSet(TreePath element);
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/tree/package.html b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/tree/package.html
deleted file mode 100644
index d720e2b4..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/tree/package.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <meta name="GENERATOR" content="Mozilla/4.5 [en] (Win98; I) [Netscape]">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-To be written.
-<h2>
-Package Specification</h2>
-<p>
-This package provides classes that can be used to ...</p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/AbstractObservableValue.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/AbstractObservableValue.java
deleted file mode 100644
index c6eac039..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/AbstractObservableValue.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164653
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.value;
-
-import org.eclipse.core.databinding.observable.AbstractObservable;
-import org.eclipse.core.databinding.observable.ObservableTracker;
-import org.eclipse.core.databinding.observable.Realm;
-
-/**
- * @since 1.0
- *
- */
-abstract public class AbstractObservableValue extends AbstractObservable implements IObservableValue {
- /**
- * Constructs a new instance with the default realm.
- */
- public AbstractObservableValue() {
- this(Realm.getDefault());
- }
-
- /**
- * @param realm
- */
- public AbstractObservableValue(Realm realm) {
- super(realm);
- }
-
- public synchronized void addValueChangeListener(IValueChangeListener listener) {
- addListener(ValueChangeEvent.TYPE, listener);
- }
-
- public synchronized void removeValueChangeListener(IValueChangeListener listener) {
- removeListener(ValueChangeEvent.TYPE, listener);
- }
-
- final public void setValue(Object value) {
- checkRealm();
- doSetValue(value);
- }
-
- /**
- * Template method for setting the value of the observable. By default the
- * method throws an {@link UnsupportedOperationException}.
- *
- * @param value
- */
- protected void doSetValue(Object value) {
- throw new UnsupportedOperationException();
- }
-
- protected void fireValueChange(ValueDiff diff) {
- // fire general change event first
- super.fireChange();
- fireEvent(new ValueChangeEvent(this, diff));
- }
-
- public final Object getValue() {
- ObservableTracker.getterCalled(this);
- return doGetValue();
- }
-
- abstract protected Object doGetValue();
-
- public boolean isStale() {
- return false;
- }
-
- protected void fireChange() {
- throw new RuntimeException(
- "fireChange should not be called, use fireValueChange() instead"); //$NON-NLS-1$
- }
-
- public synchronized void dispose() {
- super.dispose();
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/AbstractVetoableValue.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/AbstractVetoableValue.java
deleted file mode 100644
index 7fdffef9..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/AbstractVetoableValue.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164653
- *******************************************************************************/
-package org.eclipse.core.databinding.observable.value;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.Realm;
-
-/**
- * @since 1.0
- *
- */
-public abstract class AbstractVetoableValue extends AbstractObservableValue
- implements IVetoableValue {
-
- /**
- * Creates a new vetoable value.
- */
- public AbstractVetoableValue() {
- this(Realm.getDefault());
- }
-
- /**
- * @param realm
- */
- public AbstractVetoableValue(Realm realm) {
- super(realm);
- }
-
- final protected void doSetValue(Object value) {
- Object currentValue = doGetValue();
- ValueDiff diff = Diffs.createValueDiff(currentValue, value);
- boolean okToProceed = fireValueChanging(diff);
- if (!okToProceed) {
- throw new ChangeVetoException("Change not permitted"); //$NON-NLS-1$
- }
- doSetApprovedValue(value);
- fireValueChange(diff);
- }
-
- /**
- * Sets the value. Invoked after performing veto checks.
- *
- * @param value
- */
- protected abstract void doSetApprovedValue(Object value);
-
- public synchronized void addValueChangingListener(
- IValueChangingListener listener) {
- addListener(ValueChangingEvent.TYPE, listener);
- }
-
- public synchronized void removeValueChangingListener(
- IValueChangingListener listener) {
- removeListener(ValueChangingEvent.TYPE, listener);
- }
-
- /**
- * Notifies listeners about a pending change, and returns true if no
- * listener vetoed the change.
- *
- * @param diff
- * @return false if the change was vetoed, true otherwise
- */
- protected boolean fireValueChanging(ValueDiff diff) {
- checkRealm();
-
- ValueChangingEvent event = new ValueChangingEvent(this, diff);
- fireEvent(event);
- return !event.veto;
- }
-
- public void dispose() {
- super.dispose();
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/ChangeVetoException.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/ChangeVetoException.java
deleted file mode 100644
index 3c9261ff..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/ChangeVetoException.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.databinding.observable.value;
-
-/**
- * @since 1.0
- *
- */
-public class ChangeVetoException extends RuntimeException {
-
- /**
- * @param string
- */
- public ChangeVetoException(String string) {
- super(string);
- }
-
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/ComputedValue.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/ComputedValue.java
deleted file mode 100644
index 37bcf65d..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/ComputedValue.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920
- * Brad Reynolds - bug 147515
- *******************************************************************************/
-package org.eclipse.core.databinding.observable.value;
-
-import org.eclipse.core.databinding.observable.ChangeEvent;
-import org.eclipse.core.databinding.observable.IChangeListener;
-import org.eclipse.core.databinding.observable.IObservable;
-import org.eclipse.core.databinding.observable.IStaleListener;
-import org.eclipse.core.databinding.observable.ObservableTracker;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.StaleEvent;
-
-/**
- * A Lazily calculated value that automatically computes and registers listeners
- * on its dependencies as long as all of its dependencies are IObservable
- * objects
- *
- * @since 1.0
- */
-public abstract class ComputedValue extends AbstractObservableValue {
-
- private boolean dirty = true;
-
- private boolean stale = false;
-
- private Object cachedValue = null;
-
- /**
- * Dependencies list. This is a collection that contains no duplicates. It
- * is normally an ArrayList to conserve memory, but if it ever grows above a
- * certain number of elements, a HashSet is substited to conserve runtime.
- */
- private IObservable[] dependencies = new IObservable[0];
-
- /**
- *
- */
- public ComputedValue() {
- this(Realm.getDefault(), null);
- }
-
- /**
- * @param valueType can be <code>null</code>
- */
- public ComputedValue(Object valueType) {
- this(Realm.getDefault(), valueType);
- }
-
- /**
- * @param realm
- *
- */
- public ComputedValue(Realm realm) {
- this(realm, null);
- }
-
- /**
- * @param realm
- * @param valueType
- */
- public ComputedValue(Realm realm, Object valueType) {
- super(realm);
- this.valueType = valueType;
- }
-
- /**
- * Inner class that implements interfaces that we don't want to expose as
- * public API. Each interface could have been implemented using a separate
- * anonymous class, but we combine them here to reduce the memory overhead
- * and number of classes.
- *
- * <p>
- * The Runnable calls computeValue and stores the result in cachedValue.
- * </p>
- *
- * <p>
- * The IChangeListener stores each observable in the dependencies list.
- * This is registered as the listener when calling ObservableTracker, to
- * detect every observable that is used by computeValue.
- * </p>
- *
- * <p>
- * The IChangeListener is attached to every dependency.
- * </p>
- *
- */
- private class PrivateInterface implements Runnable, IChangeListener,
- IStaleListener {
- public void run() {
- cachedValue = calculate();
- }
-
- public void handleStale(StaleEvent event) {
- if (!dirty && !stale) {
- stale = true;
- fireStale();
- }
- }
-
- public void handleChange(ChangeEvent event) {
- makeDirty();
- }
- }
-
- private PrivateInterface privateInterface = new PrivateInterface();
-
- private Object valueType;
-
- protected final Object doGetValue() {
- if (dirty) {
- // This line will do the following:
- // - Run the calculate method
- // - While doing so, add any observable that is touched to the
- // dependencies list
- IObservable[] newDependencies = ObservableTracker.runAndMonitor(
- privateInterface, privateInterface, null);
-
- stale = false;
- for (int i = 0; i < newDependencies.length; i++) {
- IObservable observable = newDependencies[i];
- // Add a change listener to the new dependency.
- if (observable.isStale()) {
- stale = true;
- } else {
- observable.addStaleListener(privateInterface);
- }
- }
-
- dependencies = newDependencies;
-
- dirty = false;
- }
-
- return cachedValue;
- }
-
- /**
- * Subclasses must override this method to provide the object's value.
- *
- * @return the object's value
- */
- protected abstract Object calculate();
-
- protected final void makeDirty() {
- if (!dirty) {
- dirty = true;
-
- // Stop listening for dependency changes.
- for (int i = 0; i < dependencies.length; i++) {
- IObservable observable = dependencies[i];
-
- observable.removeChangeListener(privateInterface);
- observable.removeStaleListener(privateInterface);
- }
-
- // copy the old value
- final Object oldValue = cachedValue;
- // Fire the "dirty" event. This implementation recomputes the new
- // value lazily.
- fireValueChange(new ValueDiff() {
-
- public Object getOldValue() {
- return oldValue;
- }
-
- public Object getNewValue() {
- return getValue();
- }
- });
- }
- }
-
- public boolean isStale() {
- // we need to recompute, otherwise staleness wouldn't mean anything
- getValue();
- return stale;
- }
-
- public Object getValueType() {
- return valueType;
- }
-
- public void addChangeListener(IChangeListener listener) {
- super.addChangeListener(listener);
- // If somebody is listening, we need to make sure we attach our own
- // listeners
- getValue();
- }
-
- public void addValueChangeListener(IValueChangeListener listener) {
- super.addValueChangeListener(listener);
- // If somebody is listening, we need to make sure we attach our own
- // listeners
- getValue();
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/IObservableValue.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/IObservableValue.java
deleted file mode 100644
index ecff44f5..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/IObservableValue.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.value;
-
-import org.eclipse.core.databinding.observable.IObservable;
-import org.eclipse.core.databinding.observable.Realm;
-
-/**
- * A value whose changes can be tracked by value change listeners.
- *
- * <p>
- * This interface is not intended to be implemented by clients. Clients should
- * instead subclass one of the classes that implement this interface. Note that
- * direct implementers of this interface outside of the framework will be broken
- * in future releases when methods are added to this interface.
- * </p>
- *
- * @since 1.0
- *
- */
-public interface IObservableValue extends IObservable {
-
- /**
- * The value type of this observable value, or <code>null</code> if this
- * observable value is untyped.
- *
- * @return the value type, or <code>null</null>
- */
- public Object getValueType();
-
- /**
- * Returns the value. Must be invoked in the {@link Realm} of the observable.
- *
- * @return the current value
- * @TrackedGetter
- */
- public Object getValue();
-
- /**
- * Sets the value. Must be invoked in the {@link Realm} of the observable.
- *
- * @param value
- * the value to set
- * @throws UnsupportedOperationException
- * if this observable value cannot be set.
- */
- public void setValue(Object value);
-
- /**
- *
- * @param listener
- */
- public void addValueChangeListener(IValueChangeListener listener);
-
- /**
- * @param listener
- */
- public void removeValueChangeListener(IValueChangeListener listener);
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/IValueChangeListener.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/IValueChangeListener.java
deleted file mode 100644
index 99f52412..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/IValueChangeListener.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.value;
-
-import org.eclipse.core.databinding.observable.IObservablesListener;
-
-/**
- * @since 1.0
- *
- */
-public interface IValueChangeListener extends IObservablesListener {
-
- /**
- * @param event
- */
- void handleValueChange(ValueChangeEvent event);
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/IValueChangingListener.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/IValueChangingListener.java
deleted file mode 100644
index 85623e7e..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/IValueChangingListener.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.databinding.observable.value;
-
-import org.eclipse.core.databinding.observable.IObservablesListener;
-
-/**
- * @since 1.0
- *
- */
-public interface IValueChangingListener extends IObservablesListener {
-
- /**
- * This method is called when the value is about to change and provides an
- * opportunity to veto the change.
- *
- * @param event
- */
- public void handleValueChanging(ValueChangingEvent event);
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/IVetoableValue.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/IVetoableValue.java
deleted file mode 100644
index 15cdee48..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/IVetoableValue.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.databinding.observable.value;
-
-/**
- * An observable value whose changes can be vetoed by listeners.
- *
- * <p>
- * This interface is not intended to be implemented by clients. Clients should
- * instead subclass one of the classes that implement this interface. Note that
- * direct implementers of this interface outside of the framework will be broken
- * in future releases when methods are added to this interface.
- * </p>
- *
- * @since 1.0
- *
- */
-public interface IVetoableValue extends IObservableValue {
-
- /**
- * @param listener
- */
- public void addValueChangingListener(IValueChangingListener listener);
-
- /**
- * @param listener
- */
- public void removeValueChangingListener(IValueChangingListener listener);
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/ValueChangeEvent.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/ValueChangeEvent.java
deleted file mode 100644
index 8f0604e0..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/ValueChangeEvent.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.value;
-
-import org.eclipse.core.databinding.observable.IObservablesListener;
-import org.eclipse.core.databinding.observable.ObservableEvent;
-
-/**
- * @since 3.3
- *
- */
-public class ValueChangeEvent extends ObservableEvent {
-
- /**
- *
- */
- private static final long serialVersionUID = 2305345286999701156L;
-
- static final Object TYPE = new Object();
-
- /**
- *
- */
- public ValueDiff diff;
-
- /**
- * @param source
- * @param diff
- */
- public ValueChangeEvent(IObservableValue source, ValueDiff diff) {
- super(source);
- this.diff = diff;
- }
-
- /**
- * @return returns the observable value from which this event originated
- */
- public IObservableValue getObservableValue() {
- return (IObservableValue) source;
- }
-
- protected void dispatch(IObservablesListener listener) {
- ((IValueChangeListener)listener).handleValueChange(this);
- }
-
- protected Object getListenerType() {
- return TYPE;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/ValueChangingEvent.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/ValueChangingEvent.java
deleted file mode 100644
index eb3d1c92..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/ValueChangingEvent.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.value;
-
-import org.eclipse.core.databinding.observable.IObservablesListener;
-import org.eclipse.core.databinding.observable.ObservableEvent;
-
-/**
- * @since 3.3
- *
- */
-public class ValueChangingEvent extends ObservableEvent {
-
- /**
- *
- */
- private static final long serialVersionUID = 2305345286999701156L;
-
- static final Object TYPE = new Object();
-
- /**
- *
- */
- public ValueDiff diff;
-
- /**
- *
- */
- public boolean veto = false;
-
- /**
- * @param source
- * @param diff
- */
- public ValueChangingEvent(IObservableValue source, ValueDiff diff) {
- super(source);
- this.diff = diff;
- }
-
- /**
- * @return the observable value from which this event originated
- */
- public IObservableValue getObservableValue() {
- return (IObservableValue) source;
- }
-
- protected void dispatch(IObservablesListener listener) {
- ((IValueChangingListener) listener).handleValueChanging(this);
- }
-
- protected Object getListenerType() {
- return TYPE;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/ValueDiff.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/ValueDiff.java
deleted file mode 100644
index 918b55d6..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/ValueDiff.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.value;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.IDiff;
-
-/**
- * @since 1.0
- *
- */
-public abstract class ValueDiff implements IDiff {
- /**
- * Creates a value diff.
- */
- public ValueDiff() {
- }
-
- /**
- * @return the old value
- */
- public abstract Object getOldValue();
-
- /**
- * @return the new value
- */
- public abstract Object getNewValue();
-
- public boolean equals(Object obj) {
- if (obj instanceof ValueDiff) {
- ValueDiff val = (ValueDiff) obj;
-
- return Diffs.equals(val.getNewValue(), getNewValue())
- && Diffs.equals(val.getOldValue(), getOldValue());
-
- }
- return false;
- }
-
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- Object nv = getNewValue();
- Object ov = getOldValue();
- result = prime * result + ((nv == null) ? 0 : nv.hashCode());
- result = prime * result + ((ov == null) ? 0 : ov.hashCode());
- return result;
- }
-
- /**
- * @see java.lang.Object#toString()
- */
- public String toString() {
- StringBuffer buffer = new StringBuffer();
- buffer
- .append(getClass().getName())
- .append("{oldValue [") //$NON-NLS-1$
- .append(getOldValue() != null ? getOldValue().toString() : "null") //$NON-NLS-1$
- .append("], newValue [") //$NON-NLS-1$
- .append(getNewValue() != null ? getNewValue().toString() : "null") //$NON-NLS-1$
- .append("]}"); //$NON-NLS-1$
-
- return buffer.toString();
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/WritableValue.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/WritableValue.java
deleted file mode 100644
index 9d865f0b..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/WritableValue.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 158687
- * Brad Reynolds - bug 164653, 147515
- ******************************************************************************/
-
-package org.eclipse.core.databinding.observable.value;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.Realm;
-
-/**
- * Mutable (writable) implementation of {@link IObservableValue} that will maintain a value and fire
- * change events when the value changes.
- *
- * @since 1.0
- */
-public class WritableValue extends AbstractObservableValue {
-
- private final Object valueType;
-
- /**
- * Constructs a new instance with the default realm, a <code>null</code>
- * value type, and a <code>null</code> value.
- */
- public WritableValue() {
- this(null, null);
- }
-
- /**
- * Constructs a new instance with the default realm.
- *
- * @param initialValue
- * can be <code>null</code>
- * @param valueType
- * can be <code>null</code>
- */
- public WritableValue(Object initialValue, Object valueType) {
- this(Realm.getDefault(), initialValue, valueType);
- }
-
- /**
- * Constructs a new instance with the provided <code>realm</code>, a
- * <code>null</code> value type, and a <code>null</code> initial value.
- *
- * @param realm
- */
- public WritableValue(Realm realm) {
- this(realm, null, null);
- }
-
- /**
- * Constructs a new instance.
- *
- * @param realm
- * @param initialValue
- * can be <code>null</code>
- * @param valueType
- * can be <code>null</code>
- */
- public WritableValue(Realm realm, Object initialValue, Object valueType) {
- super(realm);
- this.valueType = valueType;
- this.value = initialValue;
- }
-
- private Object value = null;
-
- public Object doGetValue() {
- return value;
- }
-
- /**
- * @param value
- * The value to set.
- */
- public void doSetValue(Object value) {
- boolean changed = false;
-
- if (this.value == null && value != null) {
- changed = true;
- } else if (this.value != null && !this.value.equals(value)) {
- changed = true;
- }
-
- if (changed) {
- fireValueChange(Diffs.createValueDiff(this.value, this.value = value));
- }
- }
-
- public Object getValueType() {
- return valueType;
- }
-
- /**
- * @param elementType can be <code>null</code>
- * @return new instance with the default realm and a value of <code>null</code>
- */
- public static WritableValue withValueType(Object elementType) {
- return new WritableValue(Realm.getDefault(), null, elementType);
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/package.html b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/package.html
deleted file mode 100644
index d720e2b4..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/package.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <meta name="GENERATOR" content="Mozilla/4.5 [en] (Win98; I) [Netscape]">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-To be written.
-<h2>
-Package Specification</h2>
-<p>
-This package provides classes that can be used to ...</p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/package.html b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/package.html
deleted file mode 100644
index d9ede1f9..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/package.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <meta name="GENERATOR" content="Mozilla/4.5 [en] (Win98; I) [Netscape]">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Provides classes for binding observable objects, for example UI widgets and model objects.
-<h2>
-Package Specification</h2>
-<p>
-This package provides classes that can be used to synchronize state between pairs of
-observable objects with optional data type conversion and validation.
-<p>
-A <tt>DataBindingContext</tt> is used to manage a list of <tt>Bindings</tt>
-with their validation results.
-</p>
-<p>
-Concrete subclasses of <tt>Binding</tt> synchronize state between two observables,
-called the target observable and the model observable. Usually, the binding will
-first copy the current state of the model observable to the target observable and
-from then on track changes on both sides, reacting to changes on one side by
-performing the corresponding change on the other side.
-</p>
-<p>
-A <tt>BindSpec</tt> is used to control whether the binding should synchronize in
-both directions, and can be used to specify data type converters and validators.
-</p>
-<p>
-<tt>DefaultBindSpec</tt> provides default converters and validators.
-</p>
-<p>
-<tt>AggregateValidationStatus</tt> allows clients to aggregate the current validation
-statuses of a list of bindings, typically obtained from a data binding context.
-</p>
-<p>
-For advanced validation, conversion, or similar requirements that affect the way
-state is copied from one side to the other, an <tt>IBindingListener</tt> can be attached
-to a particular binding, or to a data binding context.
-</p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/util/ILogger.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/util/ILogger.java
deleted file mode 100644
index 6e794fc9..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/util/ILogger.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Chris Gross (schtoo@schtoo.com) - initial API and implementation
- * (bug 49497 [RCP] JFace dependency on org.eclipse.core.runtime enlarges standalone JFace applications)
- *******************************************************************************/
-
-package org.eclipse.core.databinding.util;
-
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * A mechanism to log errors throughout JFace Data Binding.
- * <p>
- * Clients may provide their own implementation to change how errors are logged
- * from within JFace Data Binding.
- * </p>
- *
- * @see Policy#getLog()
- * @see Policy#setLog(ILogger)
- * @since 1.1
- */
-public interface ILogger {
-
- /**
- * Logs the given status.
- *
- * @param status
- * the status to log
- */
- public void log(IStatus status);
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/util/Policy.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/util/Policy.java
deleted file mode 100644
index b45ae024..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/util/Policy.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Chris Gross (schtoo@schtoo.com) - support for ILogger added
- * (bug 49497 [RCP] JFace dependency on org.eclipse.core.runtime enlarges standalone JFace applications)
- * Brad Reynolds - bug 164653
- *******************************************************************************/
-package org.eclipse.core.databinding.util;
-
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * The Policy class handles settings for behaviour, debug flags and logging
- * within JFace Data Binding.
- *
- * @since 1.1
- */
-public class Policy {
-
- /**
- * Constant for the the default setting for debug options.
- */
- public static final boolean DEFAULT = false;
-
- /**
- * The unique identifier of the JFace plug-in.
- */
- public static final String JFACE_DATABINDING = "org.eclipse.core.databinding";//$NON-NLS-1$
-
- private static ILogger log;
-
- /**
- * Returns the dummy log to use if none has been set
- */
- private static ILogger getDummyLog() {
- return new ILogger() {
- public void log(IStatus status) {
- System.err.println(status.getMessage());
- }
- };
- }
-
- /**
- * Sets the logger used by JFace Data Binding to log errors.
- *
- * @param logger
- * the logger to use, or <code>null</code> to use the default
- * logger
- */
- public static synchronized void setLog(ILogger logger) {
- log = logger;
- }
-
- /**
- * Returns the logger used by JFace Data Binding to log errors.
- * <p>
- * The default logger prints the status to <code>System.err</code>.
- * </p>
- *
- * @return the logger
- */
- public static synchronized ILogger getLog() {
- if (log == null) {
- log = getDummyLog();
- }
- return log;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/util/package.html b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/util/package.html
deleted file mode 100644
index d720e2b4..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/util/package.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <meta name="GENERATOR" content="Mozilla/4.5 [en] (Win98; I) [Netscape]">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-To be written.
-<h2>
-Package Specification</h2>
-<p>
-This package provides classes that can be used to ...</p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/IValidator.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/IValidator.java
deleted file mode 100644
index 63b1b221..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/IValidator.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.databinding.validation;
-
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * A validator. This validator is responsible for determining if a given value
- * is valid. Validators can be used on target or model values. For example, a
- * String2IntValidator would only accept source Strings that can successfully be
- * converted to an integer value, and a PositiveIntegerValidator would only
- * accept positive integers.
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
- * part of a work in progress. There is no guarantee that this API will remain
- * unchanged during the 3.2 release cycle. Please do not use this API without
- * consulting with the Platform/UI team.
- * </p>
- *
- * @since 1.0
- *
- */
-public interface IValidator {
-
- /**
- * Determines if the given value is valid.
- *
- * @param value
- * the value to validate
- * @return a status object indicating whether the validation succeeded
- * {@link IStatus#isOK()} or not. Never null.
- */
- public IStatus validate(Object value);
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/ObjectToPrimitiveValidator.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/ObjectToPrimitiveValidator.java
deleted file mode 100644
index 3238247d..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/ObjectToPrimitiveValidator.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.databinding.validation;
-
-import org.eclipse.core.internal.databinding.BindingMessages;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-/**
- * @since 3.2
- *
- */
-public class ObjectToPrimitiveValidator implements IValidator {
-
- private Class toType;
-
- private Class[][] primitiveMap = new Class[][] {
- { Integer.TYPE, Integer.class }, { Short.TYPE, Short.class },
- { Long.TYPE, Long.class }, { Double.TYPE, Double.class },
- { Byte.TYPE, Byte.class }, { Float.TYPE, Float.class },
- { Boolean.TYPE, Boolean.class }, };
-
- /**
- * @param toType
- */
- public ObjectToPrimitiveValidator(Class toType) {
- this.toType = toType;
- }
-
- protected Class getToType() {
- return this.toType;
- }
-
- public IStatus validate(Object value) {
- return doValidate(value);
- }
-
- private IStatus doValidate(Object value) {
- if (value != null) {
- if (!mapContainsValues(toType, value.getClass())) {
- return ValidationStatus.error(getClassHint());
- }
- return Status.OK_STATUS;
- }
- return ValidationStatus.error(getNullHint());
- }
-
- private boolean mapContainsValues(Class toType, Class fromType) {
- for (int i = 0; i < primitiveMap.length; i++) {
- if ((primitiveMap[i][0].equals(toType))
- && (primitiveMap[i][1].equals(fromType))) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * @return a hint string
- */
- public String getNullHint() {
- return BindingMessages.getString("Validate_ConversionToPrimitive"); //$NON-NLS-1$
- }
-
- /**
- * @return a hint string
- */
- public String getClassHint() {
- return BindingMessages
- .getString("Validate_ConversionFromClassToPrimitive"); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/ReadOnlyValidator.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/ReadOnlyValidator.java
deleted file mode 100644
index 971ebb91..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/ReadOnlyValidator.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2005, 2006 db4objects Inc. (http://www.db4o.com) and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- * Boris Bokowski (IBM Corporation) - bug 118429
- */
-package org.eclipse.core.databinding.validation;
-
-import org.eclipse.core.internal.databinding.BindingMessages;
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * ReadOnlyValidator. A validator that can be used as a partial validator for read-only fields.
- */
-public class ReadOnlyValidator implements IValidator {
-
- private static ReadOnlyValidator singleton = null;
-
- /**
- * Returns the ReadOnlyValidator
- *
- * @return the ReadOnlyValidator
- */
- public static ReadOnlyValidator getDefault() {
- if (singleton == null) {
- singleton = new ReadOnlyValidator();
- }
- return singleton;
- }
-
- public IStatus validate(Object value) {
- // No changes are allowed
- return ValidationStatus.error(BindingMessages
- .getString("Validate_NoChangeAllowedHelp")); //$NON-NLS-1$
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2BytePrimitiveValidator.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2BytePrimitiveValidator.java
deleted file mode 100644
index 977b61b4..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2BytePrimitiveValidator.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2005, 2006 db4objects Inc. (http://www.db4o.com) and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- * Boris Bokowski (IBM Corporation) - bug 118429
- */
-package org.eclipse.core.databinding.validation;
-
-import org.eclipse.core.internal.databinding.BindingMessages;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-/**
- * ByteValidator. Validate String input for bytes
- */
-public class String2BytePrimitiveValidator implements IValidator {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.databinding.validator.IValidator#isValid(java.lang.Object)
- */
- public IStatus validate(Object value) {
- try {
- Byte.parseByte((String) value);
- return Status.OK_STATUS;
- } catch (Throwable t) {
- return ValidationStatus.error(getHint());
- }
- }
-
- private String getHint() {
- return BindingMessages.getString("Validate_RangeStart") + Byte.MIN_VALUE + //$NON-NLS-1$
- BindingMessages.getString("and") + Byte.MAX_VALUE + "."; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2ByteValidator.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2ByteValidator.java
deleted file mode 100644
index 839aa9d3..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2ByteValidator.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2005, 2006 db4objects Inc. (http://www.db4o.com) and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- * Boris Bokowski (IBM Corporation) - bug 118429
- */
-package org.eclipse.core.databinding.validation;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-/**
- * IntegerValidator. Validate String to Byte data input
- */
-public class String2ByteValidator extends String2BytePrimitiveValidator {
-
- public IStatus validate(Object value) {
- if ("".equals(value)) { //$NON-NLS-1$
- return Status.OK_STATUS;
- }
- return super.validate(value);
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2DateValidator.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2DateValidator.java
deleted file mode 100644
index 39c5a9a2..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2DateValidator.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2005, 2006 db4objects Inc. (http://www.db4o.com) and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- * Boris Bokowski (IBM Corporation) - bug 118429
- */
-package org.eclipse.core.databinding.validation;
-
-import java.util.Date;
-
-import org.eclipse.core.databinding.conversion.DateConversionSupport;
-import org.eclipse.core.internal.databinding.BindingMessages;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-/**
- * DateValidator. An IValidator implementation for dates.
- */
-public class String2DateValidator extends DateConversionSupport implements
- IValidator {
-
- public IStatus validate(Object value) {
- return parse((String) value) != null ? Status.OK_STATUS
- : ValidationStatus.error(getHint());
- }
-
- private String getHint() {
- Date sampleDate = new Date();
- StringBuffer samples = new StringBuffer();
- for (int formatterIdx = 1; formatterIdx < numFormatters() - 2; formatterIdx++) {
- samples.append('\'');
- samples.append(format(sampleDate, formatterIdx));
- samples.append("', "); //$NON-NLS-1$
- }
- samples.append('\'');
- samples.append(format(sampleDate, 0));
- samples.append('\'');
- return BindingMessages.getString("Examples") + ": " + samples + ",..."; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2DoublePrimitiveValidator.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2DoublePrimitiveValidator.java
deleted file mode 100644
index c9200f1c..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2DoublePrimitiveValidator.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2005, 2006 db4objects Inc. (http://www.db4o.com) and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- * Boris Bokowski (IBM Corporation) - bug 118429
- */
-package org.eclipse.core.databinding.validation;
-
-import org.eclipse.core.internal.databinding.BindingMessages;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-/**
- * DoubleValidator. Verify data input for doubles
- *
- * @author djo
- */
-public class String2DoublePrimitiveValidator implements IValidator {
-
- public IStatus validate(Object value) {
- try {
- Double.parseDouble((String) value);
- return Status.OK_STATUS;
- } catch (Throwable t) {
- return ValidationStatus.error(getHint());
- }
- }
-
- private String getHint() {
- return BindingMessages.getString("Validate_Like") + //$NON-NLS-1$
- BindingMessages.getString("Validate_Number_Examples") //$NON-NLS-1$
- + Double.MIN_VALUE + ", " + Double.MAX_VALUE + "."; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2DoubleValidator.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2DoubleValidator.java
deleted file mode 100644
index e2b2d722..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2DoubleValidator.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2005, 2006 db4objects Inc. (http://www.db4o.com) and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- * Boris Bokowski (IBM Corporation) - bug 118429
- */
-package org.eclipse.core.databinding.validation;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-/**
- * IntegerValidator. Validate String to Double data input
- */
-public class String2DoubleValidator extends String2DoublePrimitiveValidator {
-
- public IStatus validate(Object value) {
- if ("".equals(value)) { //$NON-NLS-1$
- return Status.OK_STATUS;
- }
- return super.validate(value);
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2FloatPrimitiveValidator.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2FloatPrimitiveValidator.java
deleted file mode 100644
index f3e05b42..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2FloatPrimitiveValidator.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2005, 2006 db4objects Inc. (http://www.db4o.com) and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- * Boris Bokowski (IBM Corporation) - bug 118429
- */
-package org.eclipse.core.databinding.validation;
-
-import org.eclipse.core.internal.databinding.BindingMessages;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-/**
- * FloatValidator. Verify string to float data conversion
- */
-public class String2FloatPrimitiveValidator implements IValidator {
-
- public IStatus validate(Object value) {
- try {
- Float.parseFloat((String) value);
- return Status.OK_STATUS;
- } catch (Exception e) {
- return ValidationStatus.error(getHint());
- }
- }
-
- private String getHint() {
- return BindingMessages.getString("Validate_Like") + //$NON-NLS-1$
- BindingMessages.getString("Validate_Number_Examples") //$NON-NLS-1$
- + Float.MIN_VALUE + ", " + Float.MAX_VALUE + "."; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2FloatValidator.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2FloatValidator.java
deleted file mode 100644
index 6e02afb0..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2FloatValidator.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2005, 2006 db4objects Inc. (http://www.db4o.com) and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- * Boris Bokowski (IBM Corporation) - bug 118429
- */
-package org.eclipse.core.databinding.validation;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-/**
- * IntegerValidator. Validate String to Float data input
- */
-public class String2FloatValidator extends String2FloatPrimitiveValidator {
-
- public IStatus validate(Object value) {
- if ("".equals(value)) { //$NON-NLS-1$
- return Status.OK_STATUS;
- }
- return super.validate(value);
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2IntegerPrimitiveValidator.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2IntegerPrimitiveValidator.java
deleted file mode 100644
index 003e2d28..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2IntegerPrimitiveValidator.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2005, 2006 db4objects Inc. (http://www.db4o.com) and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- * Boris Bokowski (IBM Corporation) - bug 118429
- */
-package org.eclipse.core.databinding.validation;
-
-import org.eclipse.core.internal.databinding.BindingMessages;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-/**
- * IntValidator. Validate String to int data input
- */
-public class String2IntegerPrimitiveValidator implements IValidator {
-
- public IStatus validate(Object value) {
- try {
- Integer.parseInt((String) value);
- return Status.OK_STATUS;
- } catch (Throwable t) {
- return ValidationStatus.error(getHint());
- }
- }
-
- private String getHint() {
- return BindingMessages.getString("Validate_RangeStart") + Integer.MIN_VALUE + //$NON-NLS-1$
- BindingMessages.getString("and") + Integer.MAX_VALUE + "."; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2IntegerValidator.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2IntegerValidator.java
deleted file mode 100644
index 15a7e66d..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2IntegerValidator.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2005, 2006 db4objects Inc. (http://www.db4o.com) and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- * Boris Bokowski (IBM Corporation) - bug 118429
- */
-package org.eclipse.core.databinding.validation;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-/**
- * IntegerValidator. Validate String to Integer data input
- */
-public class String2IntegerValidator extends String2IntegerPrimitiveValidator {
-
- public IStatus validate(Object value) {
- if ("".equals(value)) { //$NON-NLS-1$
- return Status.OK_STATUS;
- }
- return super.validate(value);
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2LongPrimitiveValidator.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2LongPrimitiveValidator.java
deleted file mode 100644
index 81a9ece0..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2LongPrimitiveValidator.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2005, 2006 db4objects Inc. (http://www.db4o.com) and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- * Boris Bokowski (IBM Corporation) - bug 118429
- */
-package org.eclipse.core.databinding.validation;
-
-import org.eclipse.core.internal.databinding.BindingMessages;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-/**
- * LongValidator. Validate String to long data input
- */
-public class String2LongPrimitiveValidator implements IValidator {
-
- public IStatus validate(Object value) {
- try {
- Long.parseLong((String) value);
- return Status.OK_STATUS;
- } catch (Throwable t) {
- return ValidationStatus.error(getHint());
- }
- }
-
- private String getHint() {
- return BindingMessages.getString("Validate_RangeStart") + Long.MIN_VALUE + //$NON-NLS-1$
- BindingMessages.getString("and") + Long.MAX_VALUE + "."; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2LongValidator.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2LongValidator.java
deleted file mode 100644
index 5e760499..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2LongValidator.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2005, 2006 db4objects Inc. (http://www.db4o.com) and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- * Boris Bokowski (IBM Corporation) - bug 118429
- */
-package org.eclipse.core.databinding.validation;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-/**
- * IntegerValidator. Validate String to Long data input
- */
-public class String2LongValidator extends String2LongPrimitiveValidator {
-
- public IStatus validate(Object value) {
- if ("".equals(value)) { //$NON-NLS-1$
- return Status.OK_STATUS;
- }
- return super.validate(value);
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2ShortPrimitiveValidator.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2ShortPrimitiveValidator.java
deleted file mode 100644
index 3cf14d64..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2ShortPrimitiveValidator.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2005, 2006 db4objects Inc. (http://www.db4o.com) and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- * Boris Bokowski (IBM Corporation) - bug 118429
- */
-package org.eclipse.core.databinding.validation;
-
-import org.eclipse.core.internal.databinding.BindingMessages;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-/**
- * ShortValidator. Validate String to short data input
- */
-public class String2ShortPrimitiveValidator implements IValidator {
-
- public IStatus validate(Object value) {
- try {
- Short.parseShort((String) value);
- return Status.OK_STATUS;
- } catch (Throwable t) {
- return ValidationStatus.error(getHint());
- }
- }
-
- private String getHint() {
- return BindingMessages.getString("Validate_RangeStart") + Short.MIN_VALUE + //$NON-NLS-1$
- BindingMessages.getString("and") + Short.MAX_VALUE + "."; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2ShortValidator.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2ShortValidator.java
deleted file mode 100644
index 3c4ba809..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2ShortValidator.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2005, 2006 db4objects Inc. (http://www.db4o.com) and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- * Boris Bokowski (IBM Corporation) - bug 118429
- */
-package org.eclipse.core.databinding.validation;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-/**
- * IntegerValidator. Validate String to Short data input
- */
-public class String2ShortValidator extends String2ShortPrimitiveValidator {
-
- public IStatus validate(Object value) {
- if ("".equals(value)) { //$NON-NLS-1$
- return Status.OK_STATUS;
- }
- return super.validate(value);
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/ValidationStatus.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/ValidationStatus.java
deleted file mode 100644
index 4216cd14..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/ValidationStatus.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164134
- ******************************************************************************/
-package org.eclipse.core.databinding.validation;
-
-import org.eclipse.core.databinding.util.Policy;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-/**
- * Convenience class for creating status objects.
- *
- * @since 3.3
- *
- */
-public class ValidationStatus extends Status {
-
- /**
- * Creates a new validation status with the given severity, message, and
- * exception.
- *
- * @param severity
- * @param message
- * @param exception
- */
- private ValidationStatus(int severity, String message, Throwable exception) {
- super(severity, Policy.JFACE_DATABINDING, IStatus.OK, message, exception);
- }
-
- /**
- * Creates a new validation status with the given severity and message.
- *
- * @param severity
- * @param message
- */
- private ValidationStatus(int severity, String message) {
- super(severity, Policy.JFACE_DATABINDING,IStatus.OK, message, null);
- }
-
- /**
- * Creates a new validation error status with the given message.
- *
- * @param message
- * @return a new error status with the given message
- */
- public static IStatus error(String message) {
- return new ValidationStatus(IStatus.ERROR, message);
- }
-
- /**
- * Creates a new validation error status with the given message and
- * exception.
- *
- * @param message
- * @param exception
- * @return a new error status with the given message and exception
- */
- public static IStatus error(String message, Throwable exception) {
- return new ValidationStatus(IStatus.ERROR, message, exception);
- }
-
- /**
- * Creates a new validation warning status with the given message.
- *
- * @param message
- * @return a new warning status with the given message
- */
- public static IStatus warning(String message) {
- return new ValidationStatus(IStatus.WARNING, message);
- }
-
- /**
- * Creates a new validation info status with the given message.
- *
- * @param message
- * @return a new info status with the given message
- */
- public static IStatus info(String message) {
- return new ValidationStatus(IStatus.INFO, message);
- }
-
- /**
- * Returns an OK status.
- *
- * @return an ok status
- */
- public static IStatus ok() {
- return Status.OK_STATUS;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/package.html b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/package.html
deleted file mode 100644
index d720e2b4..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/package.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <meta name="GENERATOR" content="Mozilla/4.5 [en] (Win98; I) [Netscape]">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-To be written.
-<h2>
-Package Specification</h2>
-<p>
-This package provides classes that can be used to ...</p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/BindingMessages.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/BindingMessages.java
deleted file mode 100644
index 8e3ab352..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/BindingMessages.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.databinding;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * @since 1.0
- *
- */
-public class BindingMessages {
-
- /**
- * The Binding resource bundle; eagerly initialized.
- */
- private static final ResourceBundle bundle = ResourceBundle
- .getBundle("org.eclipse.core.internal.databinding.messages"); //$NON-NLS-1$
-
- /**
- * Key to be used for an index out of range message.
- */
- public static final String INDEX_OUT_OF_RANGE = "IndexOutOfRange"; //$NON-NLS-1$
-
- /**
- * Key to be used for a "Multiple Problems." message.
- */
- public static final String MULTIPLE_PROBLEMS = "MultipleProblems"; //$NON-NLS-1$
-
- /**
- * Returns the resource object with the given key in the resource bundle for
- * JFace Data Binding. If there isn't any value under the given key, the key
- * is returned.
- *
- * @param key
- * the resource name
- * @return the string
- */
- public static String getString(String key) {
- try {
- return bundle.getString(key);
- } catch (MissingResourceException e) {
- return key;
- }
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ClassLookupSupport.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ClassLookupSupport.java
deleted file mode 100644
index 7b3e04ae..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ClassLookupSupport.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-/**
- * @since 1.0
- *
- */
-public class ClassLookupSupport {
-
- /*
- * code copied from AdapterManager.java
- */
- private static HashMap classSearchOrderLookup;
-
- /**
- * For a given class or interface, return an array containing the given type and all its direct and indirect supertypes.
- * @param type
- * @return an array containing the given type and all its direct and indirect supertypes
- */
- public static Class[] getTypeHierarchyFlattened(Class type) {
- List classes = null;
- //cache reference to lookup to protect against concurrent flush
- HashMap lookup = classSearchOrderLookup;
- if (lookup != null)
- classes = (List) lookup.get(type);
- // compute class order only if it hasn't been cached before
- if (classes == null) {
- classes = new ArrayList();
- computeClassOrder(type, classes);
- if (lookup == null)
- classSearchOrderLookup = lookup = new HashMap();
- lookup.put(type, classes);
- }
- return (Class[]) classes.toArray(new Class[classes.size()]);
- }
-
- /**
- * Builds and returns a table of adapters for the given adaptable type.
- * The table is keyed by adapter class name. The
- * value is the <b>sole<b> factory that defines that adapter. Note that
- * if multiple adapters technically define the same property, only the
- * first found in the search order is considered.
- *
- * Note that it is important to maintain a consistent class and interface
- * lookup order. See the class comment for more details.
- */
- private static void computeClassOrder(Class adaptable, Collection classes) {
- Class clazz = adaptable;
- Set seen = new HashSet(4);
- while (clazz != null) {
- classes.add(clazz);
- computeInterfaceOrder(clazz.getInterfaces(), classes, seen);
- clazz = clazz.isInterface() ? Object.class : clazz.getSuperclass();
- }
- }
-
- private static void computeInterfaceOrder(Class[] interfaces, Collection classes, Set seen) {
- List newInterfaces = new ArrayList(interfaces.length);
- for (int i = 0; i < interfaces.length; i++) {
- Class interfac = interfaces[i];
- if (seen.add(interfac)) {
- //note we cannot recurse here without changing the resulting interface order
- classes.add(interfac);
- newInterfaces.add(interfac);
- }
- }
- for (Iterator it = newInterfaces.iterator(); it.hasNext();)
- computeInterfaceOrder(((Class) it.next()).getInterfaces(), classes, seen);
- }
-
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/IdentityWrapper.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/IdentityWrapper.java
deleted file mode 100644
index 978c9962..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/IdentityWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Daniel Kruegler - bug 137435
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding;
-
-/**
- * Used for wrapping objects that define their own implementations of equals()
- * and hashCode() when putting them in sets or hashmaps to ensure identity
- * comparison.
- *
- * @since 1.0
- *
- */
-public class IdentityWrapper {
- final Object o;
-
- /**
- * @param o
- */
- public IdentityWrapper(Object o) {
- this.o = o;
- }
-
- /**
- * @return the unwrapped object
- */
- public Object unwrap() {
- return o;
- }
-
- public boolean equals(Object obj) {
- if (obj == null || obj.getClass() != IdentityWrapper.class) {
- return false;
- }
- return o == ((IdentityWrapper) obj).o;
- }
-
- public int hashCode() {
- return System.identityHashCode(o);
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ListBinding.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ListBinding.java
deleted file mode 100644
index e80bcc04..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ListBinding.java
+++ /dev/null
@@ -1,344 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 159768
- *******************************************************************************/
-package org.eclipse.core.internal.databinding;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.databinding.BindSpec;
-import org.eclipse.core.databinding.Binding;
-import org.eclipse.core.databinding.BindingEvent;
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.IDiff;
-import org.eclipse.core.databinding.observable.list.IListChangeListener;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.list.ListChangeEvent;
-import org.eclipse.core.databinding.observable.list.ListDiff;
-import org.eclipse.core.databinding.observable.list.ListDiffEntry;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.databinding.observable.value.WritableValue;
-import org.eclipse.core.databinding.validation.IValidator;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-/**
- *
- */
-public class ListBinding extends Binding {
-
- private boolean updating = false;
-
- private IObservableList modelList;
-
- private final IObservableList targetList;
-
- private Map targetValidators = new HashMap();
- private Map modelValidators = new HashMap();
-
- /**
- * Positions that validation will be performed.
- */
- private static final Integer[] VALIDATION_POSITIONS = new Integer[] {
- new Integer(BindingEvent.PIPELINE_AFTER_GET),
- new Integer(BindingEvent.PIPELINE_BEFORE_CHANGE) };
-
- /**
- * @param targetList
- * @param modelList
- * @param bindSpec
- */
- public ListBinding(IObservableList targetList,
- IObservableList modelList, BindSpec bindSpec) {
- super(targetList, modelList);
-
- this.targetList = targetList;
- this.modelList = modelList;
-
- for (int i = 0; i < VALIDATION_POSITIONS.length; i++) {
- Integer positionInteger = VALIDATION_POSITIONS[i];
-
- targetValidators.put(positionInteger, bindSpec
- .getTargetValidators(positionInteger.intValue()));
- modelValidators.put(positionInteger, bindSpec
- .getModelValidators(positionInteger.intValue()));
- }
-
- fillBindSpecDefaults(bindSpec, targetList, modelList);
-
- if (bindSpec.isUpdateModel()) {
- int stopPosition = getValidationPolicy(bindSpec
- .getModelUpdatePolicy(), bindSpec.getTargetValidatePolicy());
- targetList
- .addListChangeListener(targetChangeListener = new ChangeListener(
- BindingEvent.EVENT_COPY_TO_MODEL, stopPosition));
- } else {
- targetChangeListener = null;
- }
-
- if (bindSpec.isUpdateTarget()) {
- int stopPosition = getValidationPolicy(
- bindSpec.getTargetUpdatePolicy(), bindSpec
- .getModelValidatePolicy());
- modelList
- .addListChangeListener(modelChangeListener = new ChangeListener(
- BindingEvent.EVENT_COPY_TO_TARGET, stopPosition));
- } else {
- modelChangeListener = null;
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.internal.databinding.provisional.Binding#dispose()
- */
- public void dispose() {
- targetList.removeListChangeListener(targetChangeListener);
- modelList.removeListChangeListener(modelChangeListener);
- super.dispose();
- }
-
- private final IListChangeListener targetChangeListener;
- private final IListChangeListener modelChangeListener;
-
- private class ChangeListener implements IListChangeListener {
- private final int pipelinePosition;
- private final int copyType;
-
- ChangeListener(int copyType, int pipelinePosition) {
- this.pipelinePosition = pipelinePosition;
- this.copyType = copyType;
- }
-
- public void handleListChange(ListChangeEvent event) {
- if (copyType == BindingEvent.EVENT_COPY_TO_MODEL) {
- doUpdateModelFromTarget(event.diff, pipelinePosition);
- } else {
- doUpdateTargetFromModel(event.diff, pipelinePosition);
- }
- }
- }
-
- /**
- * Perform the target to model process up to and including the
- * <code>lastPosition</code>.
- *
- * @param diff
- * @param lastPosition
- * BindingEvent.PIPELINE_* constant
- */
- private void doUpdateModelFromTarget(IDiff diff, int lastPosition) {
- if (updating) {
- return;
- }
-
- BindingEvent e = createBindingEvent(diff,
- BindingEvent.EVENT_COPY_TO_MODEL,
- BindingEvent.PIPELINE_AFTER_GET);
-
- if (!performPosition(BindingEvent.PIPELINE_AFTER_GET, e, lastPosition)) {
- return;
- }
-
- updating = true;
- try {
- if (!performPosition(BindingEvent.PIPELINE_BEFORE_CHANGE, e,
- lastPosition)) {
- return;
- }
-
- // get setDiff from event object - might have been modified by a
- // listener
- ListDiff setDiff = (ListDiff) e.diff;
- ListDiffEntry[] differences = setDiff.getDifferences();
- for (int i = 0; i < differences.length; i++) {
- ListDiffEntry entry = differences[i];
- if (entry.isAddition()) {
- modelList.add(entry.getPosition(), entry.getElement());
- } else {
- modelList.remove(entry.getPosition());
- }
- }
-
- performPosition(BindingEvent.PIPELINE_AFTER_CHANGE, e, lastPosition);
- } finally {
- updating = false;
- }
- }
-
- /**
- * Performs the model to target process up to and including the
- * <code>lastPosition</code>.
- *
- * @param diff
- * @param lastPosition
- * BindingEvent.PIPELINE_* constant
- */
- private void doUpdateTargetFromModel(IDiff diff, int lastPosition) {
- if (updating) {
- return;
- }
- BindingEvent e = createBindingEvent(diff,
- BindingEvent.EVENT_COPY_TO_TARGET, BindingEvent.PIPELINE_AFTER_GET);
- if (!performPosition(BindingEvent.PIPELINE_AFTER_GET, e, lastPosition)) {
- return;
- }
-
- updating = true;
- try {
- if (!performPosition(BindingEvent.PIPELINE_BEFORE_CHANGE, e,
- lastPosition)) {
- return;
- }
-
- // get setDiff from event object - might have been modified by a
- // listener
- ListDiff setDiff = (ListDiff) e.diff;
- ListDiffEntry[] differences = setDiff.getDifferences();
- for (int i = 0; i < differences.length; i++) {
- ListDiffEntry entry = differences[i];
- if (entry.isAddition()) {
- targetList.add(entry.getPosition(), entry.getElement());
- } else {
- targetList.remove(entry.getPosition());
- }
- }
-
- performPosition(BindingEvent.PIPELINE_AFTER_CHANGE, e, lastPosition);
- } finally {
- updating = false;
- }
- }
-
- /**
- * Performs the necessary processing for the position.
- *
- * @param pipelinePosition
- * @param e
- * @param lastPosition
- * @return <code>true</code> if should proceed to the next position
- */
- private boolean performPosition(int pipelinePosition, BindingEvent e,
- int lastPosition) {
- Map validatorMap = null;
-
- if (e.copyType == BindingEvent.EVENT_COPY_TO_MODEL) {
- validatorMap = targetValidators;
- } else if (e.copyType == BindingEvent.EVENT_COPY_TO_TARGET) {
- validatorMap = modelValidators;
- }
-
- IStatus status = Status.OK_STATUS;
-
- if (validatorMap != null) {
- IValidator[] validators = (IValidator[]) validatorMap
- .get(new Integer(pipelinePosition));
- if (validators != null) {
- for (int i = 0; status.isOK() && i < validators.length; i++) {
- status = validators[i].validate(e.diff);
- }
- }
- }
-
- if (status.isOK()) {
- // Only notify listeners if validation passed.
- e.pipelinePosition = pipelinePosition;
- status = fireBindingEvent(e);
- }
-
- partialValidationErrorObservable.setValue(null);
- validationErrorObservable.setValue(status);
-
- return (status.isOK() && pipelinePosition != lastPosition);
- }
-
- private WritableValue partialValidationErrorObservable;
-
- private WritableValue validationErrorObservable;
-
- public void updateTargetFromModel() {
- updateTargetFromModel(BindingEvent.PIPELINE_AFTER_CHANGE);
- }
-
- public IObservableValue getValidationStatus() {
- return validationErrorObservable;
- }
-
- public IObservableValue getPartialValidationStatus() {
- return partialValidationErrorObservable;
- }
-
- public void updateModelFromTarget() {
- updateModelFromTarget(BindingEvent.PIPELINE_AFTER_CHANGE);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.databinding.Binding#performModelToTarget(int)
- */
- public void updateTargetFromModel(final int phase) {
- modelList.getRealm().exec(new Runnable() {
- public void run() {
- final ListDiff listDiff = Diffs.computeListDiff(targetList,
- modelList);
- targetList.getRealm().exec(new Runnable() {
- public void run() {
- doUpdateTargetFromModel(listDiff, phase);
- }
- });
- }
- });
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.databinding.Binding#performTargetToModel(int)
- */
- public void updateModelFromTarget(final int phase) {
- targetList.getRealm().exec(new Runnable() {
- public void run() {
- final ListDiff listDiff = Diffs.computeListDiff(modelList,
- targetList);
- modelList.getRealm().exec(new Runnable() {
- public void run() {
- doUpdateModelFromTarget(listDiff, phase);
- }
- });
- }
- });
- }
-
- protected void preInit() {
- partialValidationErrorObservable = new WritableValue(context
- .getValidationRealm(), Status.OK_STATUS, IStatus.class);
- validationErrorObservable = new WritableValue(context
- .getValidationRealm(), Status.OK_STATUS, IStatus.class);
- }
-
- protected void postInit() {
- updateTargetFromModel();
- }
-
- private static int getValidationPolicy(Integer updatePolicy,
- Integer validationPolicy) {
- int pipelineStop = BindingEvent.PIPELINE_AFTER_CHANGE;
-
- if (BindSpec.POLICY_EXPLICIT.equals(updatePolicy)) {
- pipelineStop = (validationPolicy == null) ? BindingEvent.PIPELINE_AFTER_GET
- : validationPolicy.intValue();
- }
-
- return pipelineStop;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/Pair.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/Pair.java
deleted file mode 100644
index 74be767b..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/Pair.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.databinding;
-
-/**
- * Class Pair. Represents a mathematical pair of objects (a, b).
- * @since 1.0
- */
-public class Pair {
-
- /**
- * a in the pair (a, b)
- */
- public final Object a;
-
- /**
- * b in the pair (a, b)
- */
- public final Object b;
-
- /**
- * Construct a Pair(a, b)
- *
- * @param a a in the pair (a, b)
- * @param b b in the pair (a, b)
- */
- public Pair(Object a, Object b) {
- this.a = a;
- this.b = b;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- if (obj.getClass() != Pair.class) {
- return false;
- }
- Pair other = (Pair) obj;
- return a.equals(other.a) && b.equals(other.b);
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return a.hashCode() + b.hashCode();
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/RandomAccessListIterator.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/RandomAccessListIterator.java
deleted file mode 100644
index 8a560ad7..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/RandomAccessListIterator.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 The Pampered Chef and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * The Pampered Chef - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding;
-
-import java.util.List;
-import java.util.ListIterator;
-
-/**
- * Class RandomAccessListIterator. A ListIterator implementation that also
- * provides access to individual elements based on the element's index.
- *
- * @since 3.3
- */
-public class RandomAccessListIterator implements ListIterator {
- private ListIterator delegate = null;
-
- /**
- * @param iterator
- */
- public RandomAccessListIterator(ListIterator iterator) {
- this.delegate = iterator;
- }
-
- /**
- * @param list
- */
- public RandomAccessListIterator(List list) {
- if (list == null) {
- throw new IllegalArgumentException("list is null"); //$NON-NLS-1$
- }
- this.delegate = list.listIterator();
- }
-
- /* (non-Javadoc)
- * @see java.util.ListIterator#add(java.lang.Object)
- */
- public void add(Object arg0) {
- delegate.add(arg0);
- }
-
- /* (non-Javadoc)
- * @see java.util.ListIterator#hasNext()
- */
- public boolean hasNext() {
- return delegate.hasNext();
- }
-
- /* (non-Javadoc)
- * @see java.util.ListIterator#hasPrevious()
- */
- public boolean hasPrevious() {
- return delegate.hasPrevious();
- }
-
- /* (non-Javadoc)
- * @see java.util.ListIterator#next()
- */
- public Object next() {
- return delegate.next();
- }
-
- /* (non-Javadoc)
- * @see java.util.ListIterator#nextIndex()
- */
- public int nextIndex() {
- return delegate.nextIndex();
- }
-
- /* (non-Javadoc)
- * @see java.util.ListIterator#previous()
- */
- public Object previous() {
- return delegate.previous();
- }
-
- /* (non-Javadoc)
- * @see java.util.ListIterator#previousIndex()
- */
- public int previousIndex() {
- return delegate.previousIndex();
- }
-
- /* (non-Javadoc)
- * @see java.util.ListIterator#remove()
- */
- public void remove() {
- delegate.remove();
- }
-
- /* (non-Javadoc)
- * @see java.util.ListIterator#set(java.lang.Object)
- */
- public void set(Object arg0) {
- delegate.set(arg0);
- }
-
- /**
- * Return the element at the specified position by moving the iterator
- * forward or backward in the list until it reaches the correct element.
- * The iterator's position after returning the element will be one after
- * the element returned.
- *
- * @param index The (0-based) index of the element to return.
- * @return the Object at index
- */
- public Object get(int index) {
- if (delegate.nextIndex() == 0 && !delegate.hasNext()) {
- throw new IndexOutOfBoundsException("Request for element from empty list"); //$NON-NLS-1$
- }
- if (index < 0) {
- throw new IndexOutOfBoundsException("Request for negative element index"); //$NON-NLS-1$
- }
-
- while (nextIndex() < index && hasNext()) {
- next();
- }
- while (previousIndex() > index-1) {
- previous();
- }
- if (!hasNext()) {
- throw new IndexOutOfBoundsException("Request for element past end of list"); //$NON-NLS-1$
- }
- return next();
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/Util.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/Util.java
deleted file mode 100644
index d0271773..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/Util.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding;
-
-/**
- * @since 3.3
- *
- */
-public class Util {
-
- /**
- * Checks whether the two objects are <code>null</code> -- allowing for
- * <code>null</code>.
- *
- * @param left
- * The left object to compare; may be <code>null</code>.
- * @param right
- * The right object to compare; may be <code>null</code>.
- * @return <code>true</code> if the two objects are equivalent;
- * <code>false</code> otherwise.
- */
- public static final boolean equals(final Object left, final Object right) {
- return left == null ? right == null : ((right != null) && left
- .equals(right));
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ValidationStatusMap.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ValidationStatusMap.java
deleted file mode 100644
index 5a603695..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ValidationStatusMap.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.databinding.Binding;
-import org.eclipse.core.databinding.observable.ChangeEvent;
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.IChangeListener;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.list.WritableList;
-import org.eclipse.core.databinding.observable.map.IMapChangeListener;
-import org.eclipse.core.databinding.observable.map.MapDiff;
-import org.eclipse.core.databinding.observable.map.ObservableMap;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * @since 1.0
- *
- */
-public class ValidationStatusMap extends ObservableMap {
-
- private boolean isDirty = true;
-
- private final WritableList bindings;
-
- private final boolean usePartialErrors;
-
- private List dependencies = new ArrayList();
-
- private IChangeListener markDirtyChangeListener = new IChangeListener() {
- public void handleChange(ChangeEvent event) {
- markDirty();
- }
- };
-
- /**
- * @param realm
- * @param bindings
- * @param usePartialErrors
- */
- public ValidationStatusMap(Realm realm, WritableList bindings,
- boolean usePartialErrors) {
- super(realm, new HashMap());
- this.bindings = bindings;
- this.usePartialErrors = usePartialErrors;
- bindings.addChangeListener(markDirtyChangeListener);
- }
-
- protected void getterCalled() {
- recompute();
- super.getterCalled();
- }
-
- private void markDirty() {
- // since we are dirty, we don't need to listen anymore
- removeElementChangeListener();
- final Map oldMap = wrappedMap;
- // lazy computation of diff
- MapDiff mapDiff = new MapDiff() {
- private MapDiff cachedDiff = null;
-
- private void ensureCached() {
- if (cachedDiff == null) {
- recompute();
- cachedDiff = Diffs.computeMapDiff(oldMap, wrappedMap);
- }
- }
-
- public Set getAddedKeys() {
- ensureCached();
- return cachedDiff.getAddedKeys();
- }
-
- public Set getChangedKeys() {
- ensureCached();
- return cachedDiff.getChangedKeys();
- }
-
- public Object getNewValue(Object key) {
- ensureCached();
- return cachedDiff.getNewValue(key);
- }
-
- public Object getOldValue(Object key) {
- ensureCached();
- return cachedDiff.getOldValue(key);
- }
-
- public Set getRemovedKeys() {
- ensureCached();
- return cachedDiff.getRemovedKeys();
- }
- };
- wrappedMap = new HashMap();
- isDirty = true;
- fireMapChange(mapDiff);
- }
-
- private void recompute() {
- if (isDirty) {
- Map newContents = new HashMap();
- for (Iterator it = bindings.iterator(); it.hasNext();) {
- Binding binding = (Binding) it.next();
- IObservableValue validationError = usePartialErrors ? binding
- .getPartialValidationStatus() : binding
- .getValidationStatus();
- dependencies.add(validationError);
- validationError.addChangeListener(markDirtyChangeListener);
- IStatus validationStatusValue = (IStatus) validationError
- .getValue();
- newContents.put(binding, validationStatusValue);
- }
- wrappedMap.putAll(newContents);
- isDirty = false;
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.databinding.observable.list.ObservableList#dispose()
- */
- public void dispose() {
- bindings.removeChangeListener(markDirtyChangeListener);
- removeElementChangeListener();
- super.dispose();
- }
-
- private void removeElementChangeListener() {
- for (Iterator it = dependencies.iterator(); it.hasNext();) {
- IObservableValue observableValue = (IObservableValue) it.next();
- observableValue.removeChangeListener(markDirtyChangeListener);
- }
- }
-
- public synchronized void addChangeListener(IChangeListener listener) {
- // this ensures that the next change will be seen by the new listener.
- recompute();
- super.addChangeListener(listener);
- }
-
- public synchronized void addMapChangeListener(IMapChangeListener listener) {
- // this ensures that the next change will be seen by the new listener.
- recompute();
- super.addMapChangeListener(listener);
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ValueBinding.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ValueBinding.java
deleted file mode 100644
index 1b7556ff..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ValueBinding.java
+++ /dev/null
@@ -1,436 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 152543, 159768
- *******************************************************************************/
-package org.eclipse.core.internal.databinding;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.databinding.BindSpec;
-import org.eclipse.core.databinding.Binding;
-import org.eclipse.core.databinding.BindingEvent;
-import org.eclipse.core.databinding.BindingException;
-import org.eclipse.core.databinding.conversion.IConverter;
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.databinding.observable.value.IValueChangeListener;
-import org.eclipse.core.databinding.observable.value.IValueChangingListener;
-import org.eclipse.core.databinding.observable.value.IVetoableValue;
-import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
-import org.eclipse.core.databinding.observable.value.ValueChangingEvent;
-import org.eclipse.core.databinding.observable.value.ValueDiff;
-import org.eclipse.core.databinding.observable.value.WritableValue;
-import org.eclipse.core.databinding.validation.IValidator;
-import org.eclipse.core.databinding.validation.ValidationStatus;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-/**
- * @since 1.0
- *
- */
-public class ValueBinding extends Binding {
- private final IObservableValue target;
-
- private final IObservableValue model;
-
- private IConverter targetToModelConverter;
-
- private IConverter modelToTargetConverter;
-
- private boolean updatingTarget = false;
- private boolean updatingModel = false;
-
- private WritableValue partialValidationErrorObservable;
-
- private WritableValue validationErrorObservable;
-
- private IValueChangeListener targetChangeListener;
-
- private Map targetValidators = new HashMap();
- private Map modelValidators = new HashMap();
-
- private static final Integer[] VALIDATION_POSITIONS = new Integer[] {
- new Integer(BindingEvent.PIPELINE_VALUE_CHANGING),
- new Integer(BindingEvent.PIPELINE_AFTER_GET),
- new Integer(BindingEvent.PIPELINE_AFTER_CONVERT),
- new Integer(BindingEvent.PIPELINE_BEFORE_CHANGE) };
-
- /**
- * @param target
- * @param model
- * @param bindSpec
- */
- public ValueBinding(IObservableValue target,
- IObservableValue model, BindSpec bindSpec) {
- super(target, model);
-
- this.target = target;
- this.model = model;
- fillBindSpecDefaults(bindSpec, target, model);
-
- for (int i = 0; i < VALIDATION_POSITIONS.length; i++) {
- Integer position = VALIDATION_POSITIONS[i];
-
- targetValidators.put(position, bindSpec
- .getTargetValidators(position.intValue()));
- modelValidators.put(position, bindSpec.getModelValidators(position
- .intValue()));
- }
-
- if (bindSpec.isUpdateTarget()) {
- modelToTargetConverter = bindSpec.getModelToTargetConverter();
- if (modelToTargetConverter == null) {
- throw new BindingException(
- "Missing model to target converter from " + model.getValueType() + " to " + target.getValueType()); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- int pipelineStop = getValidationPolicy(bindSpec
- .getTargetUpdatePolicy(), bindSpec.getModelValidatePolicy());
-
- model
- .addValueChangeListener(modelChangeListener = new ModelChangeListener(
- pipelineStop));
- }
- if (bindSpec.isUpdateModel()) {
- targetToModelConverter = bindSpec.getTargetToModelConverter();
- if (targetToModelConverter == null) {
- throw new BindingException(
- "Missing target to model converter from " + target.getValueType() + " to " + model.getValueType()); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- int pipelineStop = getValidationPolicy(bindSpec
- .getModelUpdatePolicy(), bindSpec.getTargetValidatePolicy());
-
- target
- .addValueChangeListener(targetChangeListener = new TargetChangeListener(
- pipelineStop));
-
- if (target instanceof IVetoableValue) {
- ((IVetoableValue) target)
- .addValueChangingListener(targetChangingListener);
- }
- }
- this.updateTarget = bindSpec.isUpdateTarget();
- }
-
- public void dispose() {
- target.removeValueChangeListener(targetChangeListener);
- if (target instanceof IVetoableValue) {
- ((IVetoableValue) target)
- .removeValueChangingListener(targetChangingListener);
- }
- model.removeValueChangeListener(modelChangeListener);
- super.dispose();
- }
-
- private final IValueChangingListener targetChangingListener = new IValueChangingListener() {
- public void handleValueChanging(ValueChangingEvent event) {
- if (updatingTarget)
- return;
- // we are notified of a pending change, do validation
- // and veto the change if it is not valid
- Object value = event.diff.getNewValue();
-
- BindingEvent e = createBindingEvent(event.diff,
- BindingEvent.EVENT_COPY_TO_MODEL,
- BindingEvent.PIPELINE_VALUE_CHANGING);
-
- if (!performPosition(value, BindingEvent.PIPELINE_VALUE_CHANGING,
- e, BindingEvent.PIPELINE_AFTER_CHANGE)) {
- event.veto = true;
- }
- }
- };
-
- private class TargetChangeListener implements IValueChangeListener {
- private int pipelinePosition;
-
- TargetChangeListener(int pipelinePosition) {
- this.pipelinePosition = pipelinePosition;
- }
-
- public void handleValueChange(ValueChangeEvent event) {
- final ValueDiff diff = event.diff;
- if (updatingTarget)
- return;
- // the target (usually a widget) has changed, validate
- // the value and update the source
- model.getRealm().exec(new Runnable() {
- public void run() {
- doUpdateModelFromTarget(diff, pipelinePosition);
- }
- });
- }
- }
-
- private IValueChangeListener modelChangeListener;
-
- private class ModelChangeListener implements IValueChangeListener {
- private int pipelinePosition;
-
- ModelChangeListener(int pipelinePosition) {
- this.pipelinePosition = pipelinePosition;
- }
-
- public void handleValueChange(ValueChangeEvent event) {
- final ValueDiff diff = event.diff;
- if (updatingModel)
- return;
- // The model has changed so we must update the target
- model.getRealm().exec(new Runnable() {
- public void run() {
- doUpdateTargetFromModel(diff, pipelinePosition);
- }
- });
- }
- }
-
- private boolean updateTarget;
-
- /**
- * Perform the target to model process up to and including the
- * <code>lastPosition</code>.
- *
- * @param diff
- * @param lastPosition
- * BindingEvent.PIPELINE_* constant
- */
- private void doUpdateModelFromTarget(ValueDiff diff, int lastPosition) {
- Assert.isTrue(model.getRealm().isCurrent());
- BindingEvent e = createBindingEvent(diff,
- BindingEvent.EVENT_COPY_TO_MODEL, BindingEvent.PIPELINE_AFTER_GET);
- e.originalValue = diff.getNewValue();
- if (!performPosition(e.originalValue, BindingEvent.PIPELINE_AFTER_GET,
- e, lastPosition)) {
- return;
- }
-
- try {
- updatingModel = true;
-
- e.convertedValue = targetToModelConverter.convert(e.originalValue);
- if (!performPosition(e.convertedValue,
- BindingEvent.PIPELINE_AFTER_CONVERT, e, lastPosition)) {
- return;
- }
-
- if (!performPosition(e.convertedValue,
- BindingEvent.PIPELINE_BEFORE_CHANGE, e, lastPosition)) {
- return;
- }
-
- model.setValue(e.convertedValue);
- performPosition(e.convertedValue,
- BindingEvent.PIPELINE_AFTER_CHANGE, e, lastPosition);
- } catch (Exception ex) {
- IStatus error = ValidationStatus.error(BindingMessages
- .getString("ValueBinding_ErrorWhileSettingValue"), //$NON-NLS-1$
- ex);
- validationErrorObservable.setValue(error);
- } finally {
- updatingModel = false;
- }
- }
-
- /**
- * Performs the necessary processing for the position.
- *
- * @param value
- * @param position
- * @param e
- * @param lastPosition
- * @return <code>true</code> if should proceed to the next position
- */
- private boolean performPosition(Object value, int position, BindingEvent e,
- int lastPosition) {
- Map validatorMap = null;
-
- if (e.copyType == BindingEvent.EVENT_COPY_TO_MODEL) {
- validatorMap = targetValidators;
- } else if (e.copyType == BindingEvent.EVENT_COPY_TO_TARGET) {
- validatorMap = modelValidators;
- }
-
- IStatus status = Status.OK_STATUS;
-
- if (validatorMap != null) {
- IValidator[] validators = (IValidator[]) validatorMap
- .get(new Integer(position));
- if (validators != null) {
- for (int i = 0; status.isOK() && i < validators.length; i++) {
- status = validators[i].validate(value);
- }
- }
- }
-
- if (status.isOK()) {
- // only notify listeners if validation passed
- e.pipelinePosition = position;
- status = fireBindingEvent(e);
- }
-
- final IStatus finalStatus = status;
-
- if (position == BindingEvent.PIPELINE_VALUE_CHANGING) {
- partialValidationErrorObservable.getRealm().exec(new Runnable() {
- public void run() {
- partialValidationErrorObservable.setValue(finalStatus);
- }
- });
- } else {
- Assert.isTrue(partialValidationErrorObservable.getRealm().equals(
- validationErrorObservable.getRealm()));
- partialValidationErrorObservable.getRealm().exec(new Runnable() {
- public void run() {
- partialValidationErrorObservable.setValue(Status.OK_STATUS);
- validationErrorObservable.setValue(finalStatus);
- }
- });
- }
-
- return (status.isOK() && position != lastPosition);
- }
-
- /**
- * Can be called from any thread/realm.
- */
- public void updateTargetFromModel() {
- updateTargetFromModel(BindingEvent.PIPELINE_AFTER_CHANGE);
- }
-
- /**
- * Perform the model to target process up to and including the
- * <code>lastPosition</code>.
- *
- * @param diff
- * @param lastPosition
- * BindingEvent.PIPELINE_* constant
- */
- private void doUpdateTargetFromModel(ValueDiff diff, int lastPosition) {
- Assert.isTrue(target.getRealm().isCurrent());
- try {
- updatingTarget = true;
- BindingEvent e = createBindingEvent(diff,
- BindingEvent.EVENT_COPY_TO_TARGET, BindingEvent.PIPELINE_AFTER_GET);
- e.originalValue = diff.getNewValue();
- if (!performPosition(e.originalValue,
- BindingEvent.PIPELINE_AFTER_GET, e, lastPosition)) {
- return;
- }
-
- e.convertedValue = modelToTargetConverter.convert(e.originalValue);
- if (!performPosition(e.convertedValue,
- BindingEvent.PIPELINE_AFTER_CONVERT, e, lastPosition)) {
- return;
- }
-
- if (!performPosition(e.convertedValue,
- BindingEvent.PIPELINE_BEFORE_CHANGE, e, lastPosition)) {
- return;
- }
-
- target.setValue(e.convertedValue);
- performPosition(e.convertedValue,
- BindingEvent.PIPELINE_AFTER_CHANGE, e, lastPosition);
- } catch (Exception ex) {
- final IStatus error = ValidationStatus.error(BindingMessages
- .getString("ValueBinding_ErrorWhileSettingValue"), //$NON-NLS-1$
- ex);
- validationErrorObservable.getRealm().exec(new Runnable() {
- public void run() {
- validationErrorObservable.setValue(error);
- }
- });
- } finally {
- updatingTarget = false;
- }
- }
-
- public IObservableValue getValidationStatus() {
- return validationErrorObservable;
- }
-
- public IObservableValue getPartialValidationStatus() {
- return partialValidationErrorObservable;
- }
-
- /**
- * Can be called from any thread/realm.
- */
- public void updateModelFromTarget() {
- updateModelFromTarget(BindingEvent.PIPELINE_AFTER_CHANGE);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.databinding.Binding#performTarget(int)
- */
- public void updateModelFromTarget(final int pipelinePosition) {
- target.getRealm().exec(new Runnable() {
- public void run() {
- final ValueDiff valueDiff = Diffs.createValueDiff(target
- .getValue(), target.getValue());
- model.getRealm().exec(new Runnable() {
- public void run() {
- doUpdateModelFromTarget(valueDiff, pipelinePosition);
- }
- });
- }
- });
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.databinding.Binding#performModelToTarget(int)
- */
- public void updateTargetFromModel(final int pipelinePosition) {
- model.getRealm().exec(new Runnable() {
- public void run() {
- final ValueDiff valueDiff = Diffs.createValueDiff(null, model
- .getValue());
- target.getRealm().exec(new Runnable() {
- public void run() {
- doUpdateTargetFromModel(valueDiff, pipelinePosition);
- }
- });
- }
- });
- }
-
- protected void preInit() {
- validationErrorObservable = new WritableValue(context
- .getValidationRealm(), Status.OK_STATUS, IStatus.class);
- partialValidationErrorObservable = new WritableValue(context
- .getValidationRealm(), Status.OK_STATUS, IStatus.class);
- }
-
- protected void postInit() {
- if (updateTarget) {
- updateTargetFromModel();
- }
- }
-
- private static int getValidationPolicy(Integer updatePolicy,
- Integer validationPolicy) {
- int pipelineStop = BindingEvent.PIPELINE_AFTER_CHANGE;
-
- if (BindSpec.POLICY_EXPLICIT.equals(updatePolicy)) {
- pipelineStop = (validationPolicy == null) ? BindingEvent.PIPELINE_AFTER_CONVERT
- : validationPolicy.intValue();
- }
-
- return pipelineStop;
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/messages.properties b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/messages.properties
deleted file mode 100644
index 0d6b3831..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/messages.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are 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:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# NLS file for JFace Data Binding
-###############################################################################
-Yes=Yes
-yes=yes
-No=No
-no=no
-True=True
-true=true
-False=False
-false=false
-and=and
-or=or
-Examples=Examples
-ValueBinding_ErrorWhileSettingValue=An error occurred while setting the value.
-Validate_BooleanHelp=Please type "Yes", "No", "True", or "False"
-Validate_ConversionToPrimitive="Null object values can not be converted to primitives."
-Validate_ConversionFromClassToPrimitive="Wrong object type to convert to primitive."
-Validate_CharacterHelp=Please type a character
-Validate_NoChangeAllowedHelp=Changes are not allowed in this field
-Validate_RangeStart=Please enter a number between
-Validate_Like=Please enter a number like
-Validate_Number_Examples= 1.234, 256E-15, 42
-
-IndexOutOfRange=Index out of Range.
-MultipleProblems=Multiple Problems.
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/EmptyObservableList.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/EmptyObservableList.java
deleted file mode 100644
index ce166328..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/EmptyObservableList.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding.observable;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-
-import org.eclipse.core.databinding.observable.IChangeListener;
-import org.eclipse.core.databinding.observable.IStaleListener;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.list.IListChangeListener;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-
-/**
- * Singleton empty list
- */
-public class EmptyObservableList implements IObservableList {
-
- private static final List emptyList = Collections.EMPTY_LIST;
-
- private Realm realm;
-
- /**
- * Creates a singleton empty list. This list may be disposed multiple times
- * without any side-effects.
- *
- * @param realm
- */
- public EmptyObservableList(Realm realm) {
- this.realm = realm;
- }
-
- public void addListChangeListener(IListChangeListener listener) {
- }
-
- public void removeListChangeListener(IListChangeListener listener) {
- }
-
- public Object getElementType() {
- return null;
- }
-
- public int size() {
- return 0;
- }
-
- public boolean isEmpty() {
- return true;
- }
-
- public boolean contains(Object o) {
- return false;
- }
-
- public Iterator iterator() {
- return emptyList.iterator();
- }
-
- public Object[] toArray() {
- return emptyList.toArray();
- }
-
- public Object[] toArray(Object[] a) {
- return emptyList.toArray(a);
- }
-
- public boolean add(Object o) {
- throw new UnsupportedOperationException();
- }
-
- public boolean remove(Object o) {
- throw new UnsupportedOperationException();
- }
-
- public boolean containsAll(Collection c) {
- return c.isEmpty();
- }
-
- public boolean addAll(Collection c) {
- throw new UnsupportedOperationException();
- }
-
- public boolean retainAll(Collection c) {
- throw new UnsupportedOperationException();
- }
-
- public boolean removeAll(Collection c) {
- throw new UnsupportedOperationException();
- }
-
- public void clear() {
- throw new UnsupportedOperationException();
- }
-
- public void addChangeListener(IChangeListener listener) {
- }
-
- public void removeChangeListener(IChangeListener listener) {
- }
-
- public void addStaleListener(IStaleListener listener) {
- }
-
- public void removeStaleListener(IStaleListener listener) {
- }
-
- public boolean isStale() {
- return false;
- }
-
- public void dispose() {
- }
-
- public boolean addAll(int index, Collection c) {
- throw new UnsupportedOperationException();
- }
-
- public Object get(int index) {
- return emptyList.get(index);
- }
-
- public int indexOf(Object o) {
- return -1;
- }
-
- public int lastIndexOf(Object o) {
- return -1;
- }
-
- public ListIterator listIterator() {
- return emptyList.listIterator();
- }
-
- public ListIterator listIterator(int index) {
- return emptyList.listIterator(index);
- }
-
- public Object remove(int index) {
- throw new UnsupportedOperationException();
- }
-
- public Object set(int index, Object element) {
- throw new UnsupportedOperationException();
- }
-
- public List subList(int fromIndex, int toIndex) {
- return emptyList.subList(fromIndex, toIndex);
- }
-
- public void add(int arg0, Object arg1) {
- throw new UnsupportedOperationException();
- }
-
- public Realm getRealm() {
- return realm;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/EmptyObservableSet.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/EmptyObservableSet.java
deleted file mode 100644
index 0bb66b16..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/EmptyObservableSet.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding.observable;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.IChangeListener;
-import org.eclipse.core.databinding.observable.IStaleListener;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.set.IObservableSet;
-import org.eclipse.core.databinding.observable.set.ISetChangeListener;
-
-/**
- * Singleton empty set
- */
-public class EmptyObservableSet implements IObservableSet {
-
- private static final Set emptySet = Collections.EMPTY_SET;
-
- private Realm realm;
-
- /**
- * Creates a singleton empty set. This set may be disposed multiple times
- * without any side-effects.
- *
- * @param realm
- */
- public EmptyObservableSet(Realm realm) {
- this.realm = realm;
- }
-
- public void addSetChangeListener(ISetChangeListener listener) {
- }
-
- public void removeSetChangeListener(ISetChangeListener listener) {
- }
-
- public Object getElementType() {
- return null;
- }
-
- public int size() {
- return 0;
- }
-
- public boolean isEmpty() {
- return true;
- }
-
- public boolean contains(Object o) {
- return false;
- }
-
- public Iterator iterator() {
- return emptySet.iterator();
- }
-
- public Object[] toArray() {
- return emptySet.toArray();
- }
-
- public Object[] toArray(Object[] a) {
- return emptySet.toArray(a);
- }
-
- public boolean add(Object o) {
- throw new UnsupportedOperationException();
- }
-
- public boolean remove(Object o) {
- throw new UnsupportedOperationException();
- }
-
- public boolean containsAll(Collection c) {
- return c.isEmpty();
- }
-
- public boolean addAll(Collection c) {
- throw new UnsupportedOperationException();
- }
-
- public boolean retainAll(Collection c) {
- throw new UnsupportedOperationException();
- }
-
- public boolean removeAll(Collection c) {
- throw new UnsupportedOperationException();
- }
-
- public void clear() {
- throw new UnsupportedOperationException();
- }
-
- public void addChangeListener(IChangeListener listener) {
- }
-
- public void removeChangeListener(IChangeListener listener) {
- }
-
- public void addStaleListener(IStaleListener listener) {
- }
-
- public void removeStaleListener(IStaleListener listener) {
- }
-
- public boolean isStale() {
- return false;
- }
-
- public void dispose() {
- }
-
- public Realm getRealm() {
- return realm;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/IStalenessConsumer.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/IStalenessConsumer.java
deleted file mode 100644
index cfe5c612..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/IStalenessConsumer.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding.observable;
-
-/**
- * @since 1.0
- *
- */
-public interface IStalenessConsumer {
- /**
- * @param stale
- *
- */
- public void setStale(boolean stale);
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/ProxyObservableSet.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/ProxyObservableSet.java
deleted file mode 100644
index 93e1145a..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/ProxyObservableSet.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding.observable;
-
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.set.AbstractObservableSet;
-import org.eclipse.core.databinding.observable.set.IObservableSet;
-import org.eclipse.core.databinding.observable.set.ISetChangeListener;
-import org.eclipse.core.databinding.observable.set.SetChangeEvent;
-
-/**
- * Wraps an observable set. This object acts like an exact copy of the original
- * set, and tracks all the changes in the original. The only difference is that
- * disposing the wrapper will not dispose the original. You can use this whenever
- * you need to return an IObservableSet from a method that expects the caller
- * to dispose the set, but you have an IObservableSet that you don't want disposed.
- */
-public final class ProxyObservableSet extends AbstractObservableSet {
-
- private IObservableSet toDelegateTo;
- private ISetChangeListener listener = new ISetChangeListener() {
- /* (non-Javadoc)
- * @see org.eclipse.jface.internal.databinding.provisional.observable.set.ISetChangeListener#handleSetChange(org.eclipse.jface.internal.databinding.provisional.observable.set.IObservableSet, org.eclipse.jface.internal.databinding.provisional.observable.set.SetDiff)
- */
- public void handleSetChange(SetChangeEvent event) {
- fireSetChange(event.diff);
- }
- };
-
- /**
- * Constructs a DelegatingObservableSet that tracks the state of the given set.
- *
- * @param toDelegate
- */
- public ProxyObservableSet(IObservableSet toDelegate) {
- super(toDelegate.getRealm());
- this.toDelegateTo = toDelegate;
- toDelegate.addSetChangeListener(listener);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.internal.databinding.provisional.observable.set.AbstractObservableSet#getWrappedSet()
- */
- protected Set getWrappedSet() {
- return toDelegateTo;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.internal.databinding.provisional.observable.set.IObservableSet#getElementType()
- */
- public Object getElementType() {
- return toDelegateTo.getElementType();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.internal.databinding.provisional.observable.set.AbstractObservableSet#dispose()
- */
- public void dispose() {
- toDelegateTo.removeSetChangeListener(listener);
- super.dispose();
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/StalenessTracker.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/StalenessTracker.java
deleted file mode 100644
index 6324325e..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/StalenessTracker.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding.observable;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.databinding.observable.ChangeEvent;
-import org.eclipse.core.databinding.observable.IChangeListener;
-import org.eclipse.core.databinding.observable.IObservable;
-import org.eclipse.core.databinding.observable.IStaleListener;
-import org.eclipse.core.databinding.observable.StaleEvent;
-import org.eclipse.core.internal.databinding.IdentityWrapper;
-
-/**
- * @since 1.0
- *
- */
-public class StalenessTracker {
-
- private Map staleMap = new HashMap();
-
- private int staleCount = 0;
-
- private final IStalenessConsumer stalenessConsumer;
-
- private class ChildListener implements IStaleListener, IChangeListener {
- public void handleStale(StaleEvent event) {
- processStalenessChange((IObservable) event.getSource(), true);
- }
-
- public void handleChange(ChangeEvent event) {
- processStalenessChange((IObservable) event.getSource(), true);
- }
- }
-
- private ChildListener childListener = new ChildListener();
-
- /**
- * @param observables
- * @param stalenessConsumer
- */
- public StalenessTracker(IObservable[] observables,
- IStalenessConsumer stalenessConsumer) {
- this.stalenessConsumer = stalenessConsumer;
- for (int i = 0; i < observables.length; i++) {
- IObservable observable = observables[i];
- doAddObservable(observable, false);
- }
- stalenessConsumer.setStale(staleCount > 0);
- }
-
- /**
- * @param child
- * @param callback
- */
- public void processStalenessChange(IObservable child, boolean callback) {
- boolean oldStale = staleCount > 0;
- IdentityWrapper wrappedChild = new IdentityWrapper(child);
- boolean oldChildStale = getOldChildStale(wrappedChild);
- boolean newChildStale = child.isStale();
- if (oldChildStale != newChildStale) {
- if (oldChildStale) {
- staleCount--;
- } else {
- staleCount++;
- }
- staleMap.put(wrappedChild, newChildStale ? Boolean.TRUE : Boolean.FALSE);
- }
- boolean newStale = staleCount > 0;
- if (callback && (newStale != oldStale)) {
- stalenessConsumer.setStale(newStale);
- }
- }
-
- /**
- * @param wrappedChild
- */
- private boolean getOldChildStale(IdentityWrapper wrappedChild) {
- Object oldChildValue = staleMap.get(wrappedChild);
- boolean oldChildStale = oldChildValue == null ? false
- : ((Boolean) oldChildValue).booleanValue();
- return oldChildStale;
- }
-
- /**
- * @param observable
- */
- public void addObservable(IObservable observable) {
- doAddObservable(observable, true);
- }
-
- private void doAddObservable(IObservable observable, boolean callback) {
- processStalenessChange(observable, callback);
- observable.addChangeListener(childListener);
- observable.addStaleListener(childListener);
- }
-
- /**
- * @param observable
- */
- public void removeObservable(IObservable observable) {
- boolean oldStale = staleCount > 0;
- IdentityWrapper wrappedChild = new IdentityWrapper(observable);
- boolean oldChildStale = getOldChildStale(wrappedChild);
- if (oldChildStale) {
- staleCount--;
- }
- staleMap.remove(wrappedChild);
- observable.removeChangeListener(childListener);
- observable.removeStaleListener(childListener);
- boolean newStale = staleCount > 0;
- if (newStale != oldStale) {
- stalenessConsumer.setStale(newStale);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/UnmodifiableObservableList.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/UnmodifiableObservableList.java
deleted file mode 100644
index 87ab6eac..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/UnmodifiableObservableList.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Cerner Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding.observable;
-
-import org.eclipse.core.databinding.observable.IStaleListener;
-import org.eclipse.core.databinding.observable.StaleEvent;
-import org.eclipse.core.databinding.observable.list.IListChangeListener;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.list.ListChangeEvent;
-import org.eclipse.core.databinding.observable.list.ObservableList;
-
-/**
- * ObservableList implementation that prevents modification by consumers. Events
- * in the originating wrapped list are propagated and thrown from this instance
- * when appropriate. All mutators throw an UnsupportedOperationException.
- *
- * @since 3.2
- */
-/*
- * Implementation makes the assumption that the superclass (UnmodifiableList) is
- * unmodifiable and that all modify methods throw an
- * UnsupportedOperationException.
- */
-public class UnmodifiableObservableList extends ObservableList {
- /**
- * List that is being made unmodifiable.
- */
- private final IObservableList wrappedList;
-
- /**
- * @param wrappedList
- */
- public UnmodifiableObservableList(IObservableList wrappedList) {
- super(wrappedList.getRealm(), wrappedList, wrappedList.getElementType());
- this.wrappedList = wrappedList;
-
- wrappedList.addListChangeListener(new IListChangeListener() {
- public void handleListChange(ListChangeEvent event) {
- // Fires a Change and then ListChange event.
- fireListChange(event.diff);
- }
- });
-
- wrappedList.addStaleListener(new IStaleListener() {
- public void handleStale(StaleEvent event) {
- fireStale();
- }
- });
- }
-
- /**
- * Because this instance is immutable staleness cannot be changed.
- *
- */
- public void setStale(boolean stale) {
- throw new UnsupportedOperationException();
- }
-
- public boolean isStale() {
- return wrappedList.isStale();
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableList.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableList.java
deleted file mode 100755
index 2825d315..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableList.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 147515
- *******************************************************************************/
-package org.eclipse.core.internal.databinding.observable.masterdetail;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.list.IListChangeListener;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.list.ListChangeEvent;
-import org.eclipse.core.databinding.observable.list.ObservableList;
-import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.databinding.observable.value.IValueChangeListener;
-import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
-import org.eclipse.core.runtime.Assert;
-
-/**
- * @since 3.2
- *
- */
-
-public class DetailObservableList extends ObservableList {
-
- private boolean updating = false;
-
- private IListChangeListener innerChangeListener = new IListChangeListener() {
- public void handleListChange(ListChangeEvent event) {
- if (!updating) {
- fireListChange(event.diff);
- }
- }
- };
-
- private Object currentOuterValue;
-
- private IObservableList innerObservableList;
-
- private IObservableFactory factory;
-
- private IObservableValue outerObservableValue;
-
- private Object detailType;
-
- /**
- * @param factory
- * @param outerObservableValue
- * @param detailType
- */
- public DetailObservableList(IObservableFactory factory,
- IObservableValue outerObservableValue, Object detailType) {
- super(outerObservableValue.getRealm(), new ArrayList(), detailType);
- this.factory = factory;
- this.outerObservableValue = outerObservableValue;
- this.detailType = detailType;
- updateInnerObservableValue(outerObservableValue);
-
- outerObservableValue.addValueChangeListener(outerChangeListener);
- }
-
- IValueChangeListener outerChangeListener = new IValueChangeListener() {
- public void handleValueChange(ValueChangeEvent event) {
- List oldList = new ArrayList(wrappedList);
- updateInnerObservableValue(outerObservableValue);
- fireListChange(Diffs.computeListDiff(oldList, wrappedList));
- }
- };
-
- private void updateInnerObservableValue(
- IObservableValue outerObservableValue) {
- currentOuterValue = outerObservableValue.getValue();
- if (innerObservableList != null) {
- innerObservableList.removeListChangeListener(innerChangeListener);
- innerObservableList.dispose();
- }
- if (currentOuterValue == null) {
- innerObservableList = null;
- wrappedList = new ArrayList();
- } else {
- this.innerObservableList = (IObservableList) factory
- .createObservable(currentOuterValue);
- wrappedList = innerObservableList;
-
- if (detailType != null) {
- Object innerValueType = innerObservableList.getElementType();
- Assert.isTrue(getElementType().equals(innerValueType),
- "Cannot change value type in a nested observable list"); //$NON-NLS-1$
- }
- innerObservableList.addListChangeListener(innerChangeListener);
- }
- }
-
- public void dispose() {
- super.dispose();
-
- if (outerObservableValue != null) {
- outerObservableValue.removeValueChangeListener(outerChangeListener);
- outerObservableValue.dispose();
- }
- if (innerObservableList != null) {
- innerObservableList.removeListChangeListener(innerChangeListener);
- innerObservableList.dispose();
- }
- currentOuterValue = null;
- factory = null;
- innerObservableList = null;
- innerChangeListener = null;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableSet.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableSet.java
deleted file mode 100755
index f81d2f4a..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableSet.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.databinding.observable.masterdetail;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
-import org.eclipse.core.databinding.observable.set.IObservableSet;
-import org.eclipse.core.databinding.observable.set.ISetChangeListener;
-import org.eclipse.core.databinding.observable.set.ObservableSet;
-import org.eclipse.core.databinding.observable.set.SetChangeEvent;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.databinding.observable.value.IValueChangeListener;
-import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
-import org.eclipse.core.runtime.Assert;
-
-/**
- * @since 3.2
- *
- */
-public class DetailObservableSet extends ObservableSet {
-
- private boolean updating = false;
-
- private ISetChangeListener innerChangeListener = new ISetChangeListener() {
- public void handleSetChange(SetChangeEvent event) {
- if (!updating) {
- fireSetChange(event.diff);
- }
- }
- };
-
- private Object currentOuterValue;
-
- private IObservableSet innerObservableSet;
-
- private IObservableValue outerObservableValue;
-
- private IObservableFactory factory;
-
- /**
- * @param factory
- * @param outerObservableValue
- * @param detailType
- */
- public DetailObservableSet(IObservableFactory factory,
- IObservableValue outerObservableValue, Object detailType) {
- super(outerObservableValue.getRealm(), new HashSet(), detailType);
- this.factory = factory;
- this.outerObservableValue = outerObservableValue;
- updateInnerObservableValue(outerObservableValue);
-
- outerObservableValue.addValueChangeListener(outerChangeListener);
- }
-
- IValueChangeListener outerChangeListener = new IValueChangeListener() {
- public void handleValueChange(ValueChangeEvent event) {
- Set oldSet = new HashSet(wrappedSet);
- updateInnerObservableValue(outerObservableValue);
- fireSetChange(Diffs.computeSetDiff(oldSet, wrappedSet));
- }
- };
-
- private void updateInnerObservableValue(
- IObservableValue outerObservableValue) {
- currentOuterValue = outerObservableValue.getValue();
- if (innerObservableSet != null) {
- innerObservableSet.removeSetChangeListener(innerChangeListener);
- innerObservableSet.dispose();
- }
- if (currentOuterValue == null) {
- innerObservableSet = null;
- wrappedSet = new HashSet();
- } else {
- this.innerObservableSet = (IObservableSet) factory
- .createObservable(currentOuterValue);
- wrappedSet = innerObservableSet;
-
- if (elementType != null) {
- Object innerValueType = innerObservableSet.getElementType();
-
- Assert.isTrue(elementType.equals(innerValueType),
- "Cannot change value type in a nested observable set"); //$NON-NLS-1$
- }
-
- innerObservableSet.addSetChangeListener(innerChangeListener);
- }
- }
-
- public void dispose() {
- super.dispose();
-
- if (outerObservableValue != null) {
- outerObservableValue.removeValueChangeListener(outerChangeListener);
- outerObservableValue.dispose();
- }
- if (innerObservableSet != null) {
- innerObservableSet.removeSetChangeListener(innerChangeListener);
- innerObservableSet.dispose();
- }
- currentOuterValue = null;
- factory = null;
- innerObservableSet = null;
- innerChangeListener = null;
- }
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableValue.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableValue.java
deleted file mode 100755
index 9e1abeb2..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableValue.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164653
- * Brad Reynolds - bug 147515
- *******************************************************************************/
-package org.eclipse.core.internal.databinding.observable.masterdetail;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
-import org.eclipse.core.databinding.observable.value.AbstractObservableValue;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.databinding.observable.value.IValueChangeListener;
-import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
-import org.eclipse.core.runtime.Assert;
-
-/**
- * @since 1.0
- *
- */
-public class DetailObservableValue extends AbstractObservableValue {
-
- private boolean updating = false;
-
- private IValueChangeListener innerChangeListener = new IValueChangeListener() {
- public void handleValueChange(ValueChangeEvent event) {
- if (!updating) {
- fireValueChange(event.diff);
- }
- }
- };
-
- private Object currentOuterValue;
-
- private IObservableValue innerObservableValue;
-
- private Object detailType;
-
- private IObservableValue outerObservableValue;
-
- private IObservableFactory factory;
-
- /**
- * @param outerObservableValue
- * @param factory
- * @param detailType
- */
- public DetailObservableValue(IObservableValue outerObservableValue,
- IObservableFactory factory, Object detailType) {
- super(outerObservableValue.getRealm());
- this.factory = factory;
- this.detailType = detailType;
- this.outerObservableValue = outerObservableValue;
- updateInnerObservableValue(outerObservableValue);
-
- outerObservableValue.addValueChangeListener(outerChangeListener);
- }
-
- IValueChangeListener outerChangeListener = new IValueChangeListener() {
- public void handleValueChange(ValueChangeEvent event) {
- Object oldValue = doGetValue();
- updateInnerObservableValue(outerObservableValue);
- fireValueChange(Diffs.createValueDiff(oldValue, doGetValue()));
- }
- };
-
- private void updateInnerObservableValue(
- IObservableValue outerObservableValue) {
- currentOuterValue = outerObservableValue.getValue();
- if (innerObservableValue != null) {
- innerObservableValue.removeValueChangeListener(innerChangeListener);
- innerObservableValue.dispose();
- }
- if (currentOuterValue == null) {
- innerObservableValue = null;
- } else {
- this.innerObservableValue = (IObservableValue) factory
- .createObservable(currentOuterValue);
- Object innerValueType = innerObservableValue.getValueType();
-
- if (detailType != null) {
- Assert
- .isTrue(detailType.equals(innerValueType),
- "Cannot change value type in a nested observable value"); //$NON-NLS-1$
- }
- innerObservableValue.addValueChangeListener(innerChangeListener);
- }
- }
-
- public void doSetValue(Object value) {
- if (innerObservableValue != null)
- innerObservableValue.setValue(value);
- }
-
- public Object doGetValue() {
- return innerObservableValue == null ? null : innerObservableValue
- .getValue();
- }
-
- public Object getValueType() {
- return detailType;
- }
-
- public void dispose() {
- super.dispose();
-
- if (outerObservableValue != null) {
- outerObservableValue.removeValueChangeListener(outerChangeListener);
- outerObservableValue.dispose();
- }
- if (innerObservableValue != null) {
- innerObservableValue.removeValueChangeListener(innerChangeListener);
- innerObservableValue.dispose();
- }
- currentOuterValue = null;
- factory = null;
- innerObservableValue = null;
- innerChangeListener = null;
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/AbstractObservableTree.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/AbstractObservableTree.java
deleted file mode 100644
index b5c5271d..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/AbstractObservableTree.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164134
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding.observable.tree;
-
-import org.eclipse.core.databinding.observable.AbstractObservable;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.util.Policy;
-import org.eclipse.core.internal.databinding.BindingMessages;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.core.runtime.Status;
-
-/**
- * @since 3.3
- *
- */
-public abstract class AbstractObservableTree extends AbstractObservable
- implements IObservableTree {
-
- private boolean stale;
-
- private ListenerList treeListeners = new ListenerList(ListenerList.IDENTITY);
-
- /**
- * @param realm
- */
- public AbstractObservableTree(Realm realm) {
- super(realm);
- }
-
- public void addChild(TreePath parentPath, Object childElement) {
- throw new UnsupportedOperationException();
- }
-
- public void addTreeChangeListener(ITreeChangeListener listener) {
- treeListeners.add(listener);
- }
-
- public int getChildCount(TreePath parentPath) {
- return getChildren(parentPath).length;
- }
-
- public boolean hasChildren(TreePath parentPath) {
- return getChildCount(parentPath) > 0;
- }
-
- public void insertChild(TreePath parentPath, int index, Object childElement) {
- throw new UnsupportedOperationException();
- }
-
- public boolean isLazy() {
- return false;
- }
-
- public boolean isOrdered() {
- return false;
- }
-
- public void removeChild(TreePath parentPath, Object childElement) {
- throw new UnsupportedOperationException();
- }
-
- public void removeChild(TreePath parentPath, int index) {
- throw new UnsupportedOperationException();
- }
-
- public void removeTreeChangeListener(ITreeChangeListener listener) {
- treeListeners.remove(listener);
- }
-
- public void setChildCount(TreePath parentPath, int count) {
- throw new UnsupportedOperationException();
- }
-
- public void setChildren(TreePath parentPath, Object[] children) {
- throw new UnsupportedOperationException();
- }
-
- public void updateChildren(IChildrenUpdate update) {
- TreePath parent = update.getParent();
- Object[] children = getChildren(parent);
- for (int i = 0; i < update.getLength(); i++) {
- int targetIndex = update.getOffset() + i;
- if (targetIndex < children.length) {
- update.setChild(children[targetIndex], targetIndex);
- } else {
- update
- .setStatus(new Status(
- IStatus.WARNING,
- Policy.JFACE_DATABINDING,
- IStatus.OK,
- BindingMessages
- .getString(BindingMessages.INDEX_OUT_OF_RANGE),
- null));
- }
- }
- update.done();
- }
-
- public void updateChildrenCount(IChildrenCountUpdate update) {
- TreePath[] parents = update.getParents();
- for (int i = 0; i < parents.length; i++) {
- update.setChildCount(parents[i], getChildCount(parents[i]));
- }
- update.done();
- }
-
- public void updateHasChildren(IHasChildrenUpdate update) {
- TreePath[] parents = update.getElements();
- for (int i = 0; i < parents.length; i++) {
- update.setHasChilren(parents[i], hasChildren(parents[i]));
- }
- update.done();
- }
-
- public boolean isStale() {
- return stale;
- }
-
- /**
- * @param stale
- */
- public void setStale(boolean stale) {
- this.stale = stale;
- if (stale) {
- fireStale();
- }
- }
-
- protected void fireTreeChange(TreeDiff diff) {
- // fire general change event first
- fireChange();
-
- Object[] listeners = treeListeners.getListeners();
- TreeChangeEvent event = new TreeChangeEvent(this, diff);
- for (int i = 0; i < listeners.length; i++) {
- ((ITreeChangeListener) listeners[i]).handleTreeChange(event);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/IChildrenCountUpdate.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/IChildrenCountUpdate.java
deleted file mode 100644
index 5672de42..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/IChildrenCountUpdate.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.databinding.observable.tree;
-
-/**
- * Request monitor used to collect the number of children for an element in a lazy
- * observable tree.
- *
- * @since 3.3
- */
-public interface IChildrenCountUpdate extends IViewerUpdate {
-
- /**
- * Returns the parent elements that children counts have been requested for
- * as tree paths. An empty path identifies the root element.
- *
- * @return parent elements as tree paths
- */
- public TreePath[] getParents();
-
- /**
- * Sets the number of children for the given parent.
- *
- * @param parentPath
- * parent element or empty path for root element
- * @param numChildren
- * number of children
- */
- public void setChildCount(TreePath parentPath, int numChildren);
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/IChildrenUpdate.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/IChildrenUpdate.java
deleted file mode 100644
index 6fafcd87..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/IChildrenUpdate.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.databinding.observable.tree;
-
-/**
- * Context sensitive children update request for a parent and subrange of its
- * children.
- *
- * @since 3.3
- */
-public interface IChildrenUpdate extends IViewerUpdate {
-
- /**
- * Returns the parent element that children are being requested for
- * as a tree path. An empty path identifies the root element.
- *
- * @return parent element as a tree path
- */
- public TreePath getParent();
-
- /**
- * Returns the offset at which children have been requested for. This is
- * the index of the first child being requested.
- *
- * @return offset at which children have been requested for
- */
- public int getOffset();
-
- /**
- * Returns the number of children requested.
- *
- * @return number of children requested
- */
- public int getLength();
-
- /**
- * Sets the child for this request's parent at the given offset.
- *
- * @param child child
- * @param index child offset
- *
- * TODO: what to do with <code>null</code>
- */
- public void setChild(Object child, int index);
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/IHasChildrenUpdate.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/IHasChildrenUpdate.java
deleted file mode 100644
index f9a88cdd..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/IHasChildrenUpdate.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.databinding.observable.tree;
-
-/**
- * Context sensitive update request for whether elements have children.
- *
- * @since 3.3
- */
-public interface IHasChildrenUpdate extends IViewerUpdate {
-
- /**
- * The elements this request is for specified as tree paths. An empty path
- * identifies the root element.
- *
- * @return elements as tree paths
- */
- public TreePath[] getElements();
-
- /**
- * Sets whether the given element has children.
- *
- * @param element
- * tree path to element, or empty for root element
- * @param hasChildren
- * whether it has children
- */
- public void setHasChilren(TreePath element, boolean hasChildren);
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/IObservableTree.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/IObservableTree.java
deleted file mode 100644
index 778c3620..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/IObservableTree.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding.observable.tree;
-
-import org.eclipse.core.databinding.observable.IObservable;
-
-/**
- *
- * A tree whose changes can be tracked by tree change listeners. If the tree is
- * ordered ({@link #isOrdered()}), the order of children for a given tree path
- * matters, and tree change notifications will always specify indices. If the
- * tree is unordered, the children of a tree path are an unordered set and
- * indices in change notifications are not specified.
- *
- * <p>
- * This interface is not intended to be implemented by clients. Clients should
- * instead subclass one of the framework classes that implement this interface.
- * Note that direct implementers of this interface outside of the framework will
- * be broken in future releases when methods are added to this interface.
- * </p>
- *
- * @since 1.1
- */
-public interface IObservableTree extends IObservable {
-
- /**
- * Element that can be returned from synchronous getters if this observable
- * tree is lazy.
- */
- public final static Object UNKNOWN_ELEMENT = new Object();
-
- /**
- * @param listener
- */
- public void addTreeChangeListener(ITreeChangeListener listener);
-
- /**
- * @param listener
- */
- public void removeTreeChangeListener(ITreeChangeListener listener);
-
- /**
- * Returns whether the order of children for a given parent is important. If
- * this tree is ordered, tree change notifications will always specify
- * indices.
- *
- * @return true if the order of children for a given parent is important
- */
- public boolean isOrdered();
-
- /**
- * Returns whether this tree is optimized to fetch subsets of children
- * lazily and possibly asynchronously. Implies {@link #isOrdered()}.
- *
- * @return true if this tree
- */
- public boolean isLazy();
-
- /**
- * @param parentPath
- * @return the children at the given parent path
- */
- public Object[] getChildren(TreePath parentPath);
-
- /**
- * @param parentPath
- * @param children
- */
- public void setChildren(TreePath parentPath, Object[] children);
-
- /**
- * @param parentPath
- * @param childElement
- */
- public void addChild(TreePath parentPath, Object childElement);
-
- /**
- * @param parentPath
- * @param childElement
- */
- public void removeChild(TreePath parentPath, Object childElement);
-
- /**
- * @param parentPath
- * @param index
- * @param childElement
- */
- public void insertChild(TreePath parentPath, int index, Object childElement);
-
- /**
- * @param parentPath
- * @param index
- */
- public void removeChild(TreePath parentPath, int index);
-
- /**
- * @param parentPath
- * @return <code>true</code> if the element at the given path has children
- */
- public boolean hasChildren(TreePath parentPath);
-
- /**
- * @param parentPath
- * @return the number of children of the element at the given path
- */
- public int getChildCount(TreePath parentPath);
-
- /**
- * @param parentPath
- * @param count
- */
- public void setChildCount(TreePath parentPath, int count);
-
- /**
- * Updates the number of children for the given parent elements in the
- * specified request.
- *
- * @param update specifies counts to update and stores result
- */
- public void updateChildrenCount(IChildrenCountUpdate update);
-
- /**
- * Updates children as requested by the update.
- *
- * @param update specifies children to update and stores result
- */
- public void updateChildren(IChildrenUpdate update);
-
- /**
- * Updates whether elements have children.
- *
- * @param update specifies elements to update and stores result
- */
- public void updateHasChildren(IHasChildrenUpdate update);
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/ITreeChangeListener.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/ITreeChangeListener.java
deleted file mode 100644
index 7a35f993..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/ITreeChangeListener.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding.observable.tree;
-
-/**
- * @since 3.3
- *
- */
-public interface ITreeChangeListener {
- /**
- * @param event
- */
- void handleTreeChange(TreeChangeEvent event);
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/IViewerUpdate.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/IViewerUpdate.java
deleted file mode 100644
index c446c7d1..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/IViewerUpdate.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.databinding.observable.tree;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * A context sensitive viewer update request.
- *
- * @since 3.3
- */
-public interface IViewerUpdate extends IProgressMonitor {
-
- /**
- * Sets the status of this request, possibly <code>null</code>.
- * When a request fails, the status indicates why the request failed.
- * A <code>null</code> status is considered to be successful.
- *
- * @param status request status
- */
- public void setStatus(IStatus status);
-
- /**
- * Returns the status of this request, or <code>null</code>.
- *
- * @return request status or <code>null</code>
- */
- public IStatus getStatus();
-
- /**
- * Returns the model element corresponding to the given tree path.
- * Returns the root element for the empty path.
- *
- * @param path viewer tree path
- * @return corresponding model element
- */
- public Object getElement(TreePath path);
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/TreeChangeEvent.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/TreeChangeEvent.java
deleted file mode 100644
index e376e728..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/TreeChangeEvent.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding.observable.tree;
-
-import java.util.EventObject;
-
-/**
- * @since 3.3
- *
- */
-public class TreeChangeEvent extends EventObject {
-
- /**
- *
- */
- private static final long serialVersionUID = -3198503763995528027L;
- /**
- *
- */
- public TreeDiff diff;
-
- /**
- * @param source
- * @param diff
- */
- public TreeChangeEvent(IObservableTree source, TreeDiff diff) {
- super(source);
- this.diff = diff;
- }
-
- /**
- * @return the observable tree from which this event originated
- */
- public IObservableTree getObservable() {
- return (IObservableTree) getSource();
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/TreeDiff.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/TreeDiff.java
deleted file mode 100644
index 92a8933f..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/TreeDiff.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding.observable.tree;
-
-import org.eclipse.core.databinding.observable.IDiff;
-
-/**
- * Describes the difference between two trees as a tree of tree diff nodes.
- *
- * @since 1.1
- *
- */
-public abstract class TreeDiff extends TreeDiffNode implements IDiff {
-
- /**
- * Returns the tree path (possibly empty) of the parent, or
- * <code>null</code> if the underlying tree is not lazy and never contains
- * duplicate elements.
- *
- * @return the tree path (possibly empty) of the unchanged parent, or
- * <code>null</code>
- */
- public abstract TreePath getParentPath();
-
- /**
- * @param visitor
- */
- public void accept(TreeDiffVisitor visitor) {
- doAccept(visitor, getParentPath());
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/TreeDiffNode.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/TreeDiffNode.java
deleted file mode 100644
index 7179290a..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/TreeDiffNode.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding.observable.tree;
-
-/**
- * @since 1.1
- *
- */
-public abstract class TreeDiffNode {
-
- /**
- *
- */
- public final static int NO_CHANGE = 0x00;
-
- /**
- *
- */
- public final static int ADDED = 0x01;
-
- /**
- *
- */
- public final static int REMOVED = 0x02;
-
- /**
- *
- */
- public final static int REPLACED = 0x03;
-
- /**
- *
- */
- public static final TreeDiffNode[] NO_CHILDREN = new TreeDiffNode[0];
-
- /**
- *
- */
- public static final int INDEX_UNKNOWN = -1;
-
- /**
- * @return the change type
- */
- public abstract int getChangeType();
-
- /**
- * @return the element that was removed, or the replaced element
- */
- public abstract Object getOldElement();
-
- /**
- * @return the element that was not changed, added, or the replacement
- * element
- */
- public abstract Object getNewElement();
-
- /**
- * @return the index at which the element was added, removed, or replaced
- */
- public abstract int getIndex();
-
- /**
- * Returns the child tree diff objects that describe changes to children. If
- * the change type is REMOVED, there will be no children.
- *
- * @return the nodes representing changes to children
- */
- public abstract TreeDiffNode[] getChildren();
-
- protected void doAccept(TreeDiffVisitor visitor, TreePath parentPath) {
- TreePath currentPath = parentPath.createChildPath(getNewElement());
- boolean recurse = visitor.visit(this, currentPath);
- if (recurse) {
- TreeDiffNode[] children = getChildren();
- for (int i = 0; i < children.length; i++) {
- TreeDiffNode child = children[i];
- child.doAccept(visitor, currentPath);
- }
- }
- }
-
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/TreeDiffVisitor.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/TreeDiffVisitor.java
deleted file mode 100644
index b988405a..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/TreeDiffVisitor.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.internal.databinding.observable.tree;
-
-/**
- * @since 3.3
- *
- */
-public abstract class TreeDiffVisitor {
-
- /**
- * Visits the given tree diff.
- *
- * @param diff
- * the diff to visit
- * @param currentPath
- * the current path (the diff's element is the last segment of
- * the path)
- *
- * @return <code>true</code> if the tree diff's children should be
- * visited; <code>false</code> if they should be skipped.
- */
- public abstract boolean visit(TreeDiffNode diff, TreePath currentPath);
-}
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/TreePath.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/TreePath.java
deleted file mode 100644
index 574f0a18..00000000
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/TreePath.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.databinding.observable.tree;
-
-import org.eclipse.core.runtime.Assert;
-
-/**
- * A tree path denotes a model element in a tree viewer. Tree path objects have
- * value semantics. A model element is represented by a path of elements in the
- * tree from the root element to the leaf element.
- * <p>
- * Clients may instantiate this class. Not intended to be subclassed.
- * </p>
- *
- * @since 3.2
- */
-public final class TreePath {
-
- /**
- * Constant for representing an empty tree path.
- */
- public static final TreePath EMPTY = new TreePath(new Object[0]);
-
- private Object[] segments;
-
- private int hash;
-
- /**
- * Constructs a path identifying a leaf node in a tree.
- *
- * @param segments
- * path of elements to a leaf node in a tree, starting with the
- * root element
- */
- public TreePath(Object[] segments) {
- Assert.isNotNull(segments);
- for (int i = 0; i < segments.length; i++) {
- Assert.isNotNull(segments[i]);
- }
- this.segments = segments;
- }
-
- /**
- * Returns the element at the specified index in this path.
- *
- * @param index
- * index of element to return
- * @return element at the specified index
- */
- public Object getSegment(int index) {
- return segments[index];
- }
-
- /**
- * Returns the number of elements in this path.
- *
- * @return the number of elements in this path
- */
- public int getSegmentCount() {
- return segments.length;
- }
-
- /**
- * Returns the first element in this path.
- *
- * @return the first element in this path
- */
- public Object getFirstSegment() {
- if (segments.length == 0) {
- return null;
- }
- return segments[0];
- }
-
- /**
- * Returns the last element in this path.
- *
- * @return the last element in this path
- */
- public Object getLastSegment() {
- if (segments.length == 0) {
- return null;
- }
- return segments[segments.length - 1];
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object other) {
- if (!(other instanceof TreePath)) {
- return false;
- }
- TreePath otherPath = (TreePath) other;
- if (segments.length != otherPath.segments.length) {
- return false;
- }
- for (int i = 0; i < segments.length; i++) {
- if (!segments[i].equals(otherPath.segments[i])) {
- return false;
- }
- }
- return true;
- }
-
- public int hashCode() {
- if (hash == 0) {
- for (int i = 0; i < segments.length; i++) {
- hash += segments[i].hashCode();
- }
- }
- return hash;
- }
-
- /**
- * Returns whether this path starts with the same segments as the given
- * path, using the given comparer to compare segments.
- *
- * @param treePath
- * path to compare to
- * @return whether the given path is a prefix of this path, or the same as
- * this path
- */
- public boolean startsWith(TreePath treePath) {
- int thisSegmentCount = getSegmentCount();
- int otherSegmentCount = treePath.getSegmentCount();
- if (otherSegmentCount == thisSegmentCount) {
- return equals(treePath);
- }
- if (otherSegmentCount > thisSegmentCount) {
- return false;
- }
- for (int i = 0; i < otherSegmentCount; i++) {
- Object otherSegment = treePath.getSegment(i);
- if (!otherSegment.equals(segments[i])) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * Returns a copy of this tree path with one segment removed from the end,
- * or <code>null</code> if this tree path has no segments.
- * @return a tree path
- */
- public TreePath getParentPath() {
- int segmentCount = getSegmentCount();
- if (segmentCount <= 1) {
- return null;
- }
- Object[] parentSegments = new Object[segmentCount - 1];
- System.arraycopy(segments, 0, parentSegments, 0, segmentCount - 1);
- return new TreePath(parentSegments);
- }
-
- /**
- * Returns a copy of this tree path with the given segment added at the end.
- * @param newSegment
- * @return a tree path
- */
- public TreePath createChildPath(Object newSegment) {
- int segmentCount = getSegmentCount();
- Object[] childSegments = new Object[segmentCount + 1];
- if(segmentCount>0) {
- System.arraycopy(segments, 0, childSegments, 0, segmentCount);
- }
- childSegments[segmentCount] = newSegment;
- return new TreePath(childSegments);
- }
-}
diff --git a/bundles/org.eclipse.jface.databinding/.classpath b/bundles/org.eclipse.jface.databinding/.classpath
deleted file mode 100644
index ce0c7a5d..00000000
--- a/bundles/org.eclipse.jface.databinding/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.0%Foundation-1.0"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.jface.databinding/.cvsignore b/bundles/org.eclipse.jface.databinding/.cvsignore
deleted file mode 100644
index ba077a40..00000000
--- a/bundles/org.eclipse.jface.databinding/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/bundles/org.eclipse.jface.databinding/.project b/bundles/org.eclipse.jface.databinding/.project
deleted file mode 100644
index e65e9851..00000000
--- a/bundles/org.eclipse.jface.databinding/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jface.databinding</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.jface.databinding/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.jface.databinding/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bc38b605..00000000
--- a/bundles/org.eclipse.jface.databinding/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Thu Feb 01 22:54:44 EST 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.1
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.3
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.jface.databinding/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.jface.databinding/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 59509e09..00000000
--- a/bundles/org.eclipse.jface.databinding/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Thu Aug 24 15:24:48 EDT 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.ui.exception.name=e
-org.eclipse.jdt.ui.gettersetter.use.is=true
-org.eclipse.jdt.ui.javadoc=true
-org.eclipse.jdt.ui.overrideannotation=true
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return Returns the ${bare_field_name}.\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} The ${bare_field_name} to set.\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*******************************************************************************\n * Copyright (c) ${year} IBM Corporation and others.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * IBM Corporation - initial API and implementation\n ******************************************************************************/\n</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @since 3.3\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template></templates>
diff --git a/bundles/org.eclipse.jface.databinding/.settings/org.eclipse.pde.prefs b/bundles/org.eclipse.jface.databinding/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index fee4b048..00000000
--- a/bundles/org.eclipse.jface.databinding/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,14 +0,0 @@
-#Sat Mar 19 15:31:31 EST 2005
-compilers.p.deprecated=0
-compilers.p.illegal-att-value=0
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=0
-compilers.p.unknown-attribute=0
-compilers.p.unknown-class=0
-compilers.p.unknown-element=1
-compilers.p.unknown-resource=0
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.p.unused-element-or-attribute=1
-compilers.use-project=true
-eclipse.preferences.version=1
diff --git a/bundles/org.eclipse.jface.databinding/META-INF/MANIFEST.MF b/bundles/org.eclipse.jface.databinding/META-INF/MANIFEST.MF
deleted file mode 100644
index 31ed8a7f..00000000
--- a/bundles/org.eclipse.jface.databinding/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,22 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.jface.databinding
-Bundle-Version: 1.1.0.qualifier
-Bundle-ClassPath: .
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.jface.databinding.swt,
- org.eclipse.jface.databinding.viewers,
- org.eclipse.jface.internal.databinding.internal.swt;x-internal:=true,
- org.eclipse.jface.internal.databinding.internal.viewers;x-internal:=true,
- org.eclipse.jface.internal.databinding.provisional.swt;x-internal:=false,
- org.eclipse.jface.internal.databinding.provisional.viewers;x-internal:=false
-Require-Bundle: org.eclipse.core.databinding;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.swt;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.jface;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.equinox.common;bundle-version="[3.2.0,4.0.0)"
-Import-Package: com.ibm.icu.text
-Bundle-RequiredExecutionEnvironment: CDC-1.0/Foundation-1.0,
- J2SE-1.3
diff --git a/bundles/org.eclipse.jface.databinding/about.html b/bundles/org.eclipse.jface.databinding/about.html
deleted file mode 100644
index 46023304..00000000
--- a/bundles/org.eclipse.jface.databinding/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.jface.databinding/build.properties b/bundles/org.eclipse.jface.databinding/build.properties
deleted file mode 100644
index 6f0a513e..00000000
--- a/bundles/org.eclipse.jface.databinding/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are 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:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = .,\
- META-INF/,\
- plugin.properties,\
- about.html
-output.databinding.jar = bin/
-src.includes = about.html
-source.. = src/
diff --git a/bundles/org.eclipse.jface.databinding/plugin.properties b/bundles/org.eclipse.jface.databinding/plugin.properties
deleted file mode 100644
index 2880743c..00000000
--- a/bundles/org.eclipse.jface.databinding/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are 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:
-# IBM Corporation - initial API and implementation
-###############################################################################
-pluginName = JFace Data Binding for SWT and JFace
-providerName = Eclipse.org
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/swt/ISWTObservable.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/swt/ISWTObservable.java
deleted file mode 100644
index 7f185248..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/swt/ISWTObservable.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.databinding.swt;
-
-import org.eclipse.core.databinding.observable.IObservable;
-import org.eclipse.swt.widgets.Widget;
-
-/**
- * {@link IObservable} observing an SWT widget.
- *
- * @since 1.1
- *
- */
-public interface ISWTObservable extends IObservable {
-
- /**
- * Returns the widget of this observable
- *
- * @return the widget
- */
- public Widget getWidget();
-
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/swt/ISWTObservableValue.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/swt/ISWTObservableValue.java
deleted file mode 100644
index 555232ae..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/swt/ISWTObservableValue.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.databinding.swt;
-
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-
-/**
- * {@link IObservableValue} observing an SWT widget.
- *
- * @since 1.0
- *
- */
-public interface ISWTObservableValue extends ISWTObservable, IObservableValue {
-
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/swt/SWTObservables.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/swt/SWTObservables.java
deleted file mode 100644
index f5fd2b91..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/swt/SWTObservables.java
+++ /dev/null
@@ -1,318 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Matt Carter - bug 170668
- * Brad Reynolds - bug 170848
- *******************************************************************************/
-package org.eclipse.jface.databinding.swt;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.jface.internal.databinding.internal.swt.ButtonObservableValue;
-import org.eclipse.jface.internal.databinding.internal.swt.CComboObservableList;
-import org.eclipse.jface.internal.databinding.internal.swt.CComboObservableValue;
-import org.eclipse.jface.internal.databinding.internal.swt.CLabelObservableValue;
-import org.eclipse.jface.internal.databinding.internal.swt.ComboObservableList;
-import org.eclipse.jface.internal.databinding.internal.swt.ComboObservableValue;
-import org.eclipse.jface.internal.databinding.internal.swt.ControlObservableValue;
-import org.eclipse.jface.internal.databinding.internal.swt.LabelObservableValue;
-import org.eclipse.jface.internal.databinding.internal.swt.ListObservableList;
-import org.eclipse.jface.internal.databinding.internal.swt.ListObservableValue;
-import org.eclipse.jface.internal.databinding.internal.swt.SWTProperties;
-import org.eclipse.jface.internal.databinding.internal.swt.SpinnerObservableValue;
-import org.eclipse.jface.internal.databinding.internal.swt.TableObservableValue;
-import org.eclipse.jface.internal.databinding.internal.swt.TextObservableValue;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CCombo;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.List;
-import org.eclipse.swt.widgets.Spinner;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * A factory for creating observables for SWT widgets
- *
- * @since 1.1
- *
- */
-public class SWTObservables {
-
- private static java.util.List realms = new ArrayList();
-
- /**
- * Returns the realm representing the UI thread for the given display.
- *
- * @param display
- * @return the realm representing the UI thread for the given display
- */
- public static Realm getRealm(final Display display) {
- synchronized (realms) {
- for (Iterator it = realms.iterator(); it.hasNext();) {
- DisplayRealm displayRealm = (DisplayRealm) it.next();
- if (displayRealm.display == display) {
- return displayRealm;
- }
- }
- DisplayRealm result = new DisplayRealm(display);
- realms.add(result);
- return result;
- }
- }
-
- /**
- * @param control
- * @return an observable value tracking the enabled state of the given
- * control
- */
- public static ISWTObservableValue observeEnabled(Control control) {
- return new ControlObservableValue(control, SWTProperties.ENABLED);
- }
-
- /**
- * @param control
- * @return an observable value tracking the visible state of the given
- * control
- */
- public static ISWTObservableValue observeVisible(Control control) {
- return new ControlObservableValue(control, SWTProperties.VISIBLE);
- }
-
- /**
- * @param control
- * @return an observable value tracking the tooltip text of the given
- * control
- */
- public static ISWTObservableValue observeTooltipText(Control control) {
- return new ControlObservableValue(control, SWTProperties.TOOLTIP_TEXT);
- }
-
- /**
- * @param spinner
- * @return an observable value tracking the selection of the given spinner
- */
- public static ISWTObservableValue observeSelection(Spinner spinner) {
- return new SpinnerObservableValue(spinner, SWTProperties.SELECTION);
- }
-
- /**
- * @param spinner
- * @return an observable value tracking the min of the given spinner
- */
- public static ISWTObservableValue observeMin(Spinner spinner) {
- return new SpinnerObservableValue(spinner, SWTProperties.MIN);
- }
-
- /**
- * @param spinner
- * @return an observable value tracking the max of the given spinner
- */
- public static ISWTObservableValue observeMax(Spinner spinner) {
- return new SpinnerObservableValue(spinner, SWTProperties.MAX);
- }
-
- /**
- * @param text
- * @param event
- * the SWT event type to use when adding the change listener (one
- * of {@link SWT#Modify} or {@link SWT#FocusOut}
- * @return an observable value tracking the current text of the given text
- * control
- */
- public static ISWTObservableValue observeText(Text text, int event) {
- return new TextObservableValue(text, event);
- }
-
- /**
- * @param label
- * @return an observable value tracking the text of the given label
- */
- public static ISWTObservableValue observeText(Label label) {
- return new LabelObservableValue(label);
- }
-
- /**
- * @param cLabel
- * @return an observable value tracking the text of the given CLabel
- */
- public static ISWTObservableValue observeText(CLabel cLabel) {
- return new CLabelObservableValue(cLabel);
- }
-
- /**
- * @param button
- * @return an observable value tracking the selection state of the given
- * button
- */
- public static ISWTObservableValue observeSelection(Button button) {
- return new ButtonObservableValue(button);
- }
-
- /**
- * @param combo
- * @return an observable value tracking the text of the given combo
- */
- public static ISWTObservableValue observeText(Combo combo) {
- return new ComboObservableValue(combo, SWTProperties.TEXT);
- }
-
- /**
- * @param combo
- * @return an observable value tracking the selection of the given combo
- */
- public static ISWTObservableValue observeSelection(Combo combo) {
- return new ComboObservableValue(combo, SWTProperties.SELECTION);
- }
-
- /**
- * @param combo
- * @return an observable list tracking the items of the given combo
- */
- public static IObservableList observeItems(Combo combo) {
- return new ComboObservableList(combo);
- }
-
- /**
- * @param combo
- * @return an observable value tracking the text of the given combo
- */
- public static ISWTObservableValue observeText(CCombo combo) {
- return new CComboObservableValue(combo, SWTProperties.TEXT);
- }
-
- /**
- * @param combo
- * @return an observable value tracking the selection state of the given
- * combo
- */
- public static ISWTObservableValue observeSelection(CCombo combo) {
- return new CComboObservableValue(combo, SWTProperties.SELECTION);
- }
-
- /**
- * @param combo
- * @return an observable list tracking the items of the given combo
- */
- public static IObservableList observeItems(CCombo combo) {
- return new CComboObservableList(combo);
- }
-
- /**
- * @param list
- * @return an observable value tracking the selection of the given list
- */
- public static ISWTObservableValue observeSelection(List list) {
- return new ListObservableValue(list);
- }
-
- /**
- * @param list
- * @return an observable list tracking the items of the given list
- */
- public static IObservableList observeItems(List list) {
- return new ListObservableList(list);
- }
-
- /**
- * @param table
- * @return an observable value tracking the (single) selection of the given
- * table
- */
- public static ISWTObservableValue observeSingleSelectionIndex(Table table) {
- return new TableObservableValue(table, SWTProperties.SELECTION);
- }
-
- /**
- * @param control
- * @return an observable value tracking the foreground color of the given
- * control
- */
- public static ISWTObservableValue observeForeground(Control control) {
- return new ControlObservableValue(control, SWTProperties.FOREGROUND);
- }
-
- /**
- * @param control
- * @return an observable value tracking the background color of the given
- * control
- */
- public static ISWTObservableValue observeBackground(Control control) {
- return new ControlObservableValue(control, SWTProperties.BACKGROUND);
- }
-
- /**
- * @param control
- * @return an observable value tracking the font of the given control
- */
- public static ISWTObservableValue observeFont(Control control) {
- return new ControlObservableValue(control, SWTProperties.FONT);
- }
-
- private static class DisplayRealm extends Realm {
- private Display display;
-
- /**
- * @param display
- */
- private DisplayRealm(Display display) {
- this.display = display;
- }
-
- public boolean isCurrent() {
- return Display.getCurrent() == display;
- }
-
- public void asyncExec(final Runnable runnable) {
- Runnable safeRunnable = new Runnable() {
- public void run() {
- safeRun(runnable);
- }
- };
- display.asyncExec(safeRunnable);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return (display == null) ? 0 : display.hashCode();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- final DisplayRealm other = (DisplayRealm) obj;
- if (display == null) {
- if (other.display != null)
- return false;
- } else if (!display.equals(other.display))
- return false;
- return true;
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/swt/package.html b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/swt/package.html
deleted file mode 100644
index d720e2b4..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/swt/package.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <meta name="GENERATOR" content="Mozilla/4.5 [en] (Win98; I) [Netscape]">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-To be written.
-<h2>
-Package Specification</h2>
-<p>
-This package provides classes that can be used to ...</p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ListeningLabelProvider.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ListeningLabelProvider.java
deleted file mode 100644
index 7cdd5939..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ListeningLabelProvider.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.databinding.viewers;
-
-import java.util.Iterator;
-
-import org.eclipse.core.databinding.observable.set.IObservableSet;
-import org.eclipse.core.databinding.observable.set.ISetChangeListener;
-import org.eclipse.core.databinding.observable.set.SetChangeEvent;
-import org.eclipse.jface.internal.databinding.provisional.viewers.ViewerLabelProvider;
-
-/**
- * @since 1.0
- *
- */
-public abstract class ListeningLabelProvider extends ViewerLabelProvider {
-
- private ISetChangeListener listener = new ISetChangeListener() {
- public void handleSetChange(SetChangeEvent event) {
- for (Iterator it = event.diff.getAdditions().iterator(); it.hasNext();) {
- addListenerTo(it.next());
- }
- for (Iterator it = event.diff.getRemovals().iterator(); it.hasNext();) {
- removeListenerFrom(it.next());
- }
- }
- };
-
- private IObservableSet items;
-
- /**
- * @param itemsThatNeedLabels
- */
- public ListeningLabelProvider(IObservableSet itemsThatNeedLabels) {
- this.items = itemsThatNeedLabels;
- items.addSetChangeListener(listener);
- for (Iterator it = items.iterator(); it.hasNext();) {
- addListenerTo(it.next());
- }
- }
-
- /**
- * @param next
- */
- protected abstract void removeListenerFrom(Object next);
-
- /**
- * @param next
- */
- protected abstract void addListenerTo(Object next);
-
- public void dispose() {
- for (Iterator iter = items.iterator(); iter.hasNext();) {
- removeListenerFrom(iter.next());
- }
- items.removeSetChangeListener(listener);
- super.dispose();
- }
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableListContentProvider.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableListContentProvider.java
deleted file mode 100644
index 406841bc..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableListContentProvider.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.databinding.viewers;
-
-import org.eclipse.core.databinding.observable.list.IListChangeListener;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.list.ListChangeEvent;
-import org.eclipse.core.databinding.observable.list.ListDiffEntry;
-import org.eclipse.core.databinding.observable.list.WritableList;
-import org.eclipse.core.databinding.observable.set.IObservableSet;
-import org.eclipse.core.databinding.observable.set.WritableSet;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.jface.viewers.AbstractListViewer;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * @since 1.0
- *
- */
-public class ObservableListContentProvider implements
- IStructuredContentProvider {
-
- private IObservableList observableList;
-
- private Viewer viewer;
-
- private IListChangeListener listener = new IListChangeListener() {
- public void handleListChange(ListChangeEvent event) {
- if (viewer.getControl().isDisposed()) {
- return;
- }
- ListDiffEntry[] differences = event.diff.getDifferences();
- for (int i = 0; i < differences.length; i++) {
- ListDiffEntry entry = differences[i];
- if (entry.isAddition()) {
- knownElements.add(entry.getElement());
- if (viewer instanceof AbstractListViewer) {
- ((AbstractListViewer) viewer).add(entry.getElement());
- } else {
- ((TableViewer) viewer).insert(entry.getElement(), entry
- .getPosition());
- }
- } else {
- if (viewer instanceof AbstractListViewer) {
- ((AbstractListViewer) viewer)
- .remove(entry.getElement());
- } else {
- ((TableViewer) viewer).remove(entry.getElement());
- }
- knownElements.remove(entry.getElement());
- }
- }
- }
- };
-
- private IObservableSet knownElements;
-
- /**
- *
- */
- public ObservableListContentProvider() {
- observableList = new WritableList(SWTObservables.getRealm(Display.getDefault()));
- knownElements = new WritableSet(SWTObservables.getRealm(Display.getDefault()));
- }
-
- public Object[] getElements(Object inputElement) {
- return observableList.toArray();
- }
-
- public void dispose() {
- observableList.removeListChangeListener(listener);
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- this.viewer = viewer;
-
- if (!(viewer instanceof TableViewer || viewer instanceof AbstractListViewer)) {
- throw new IllegalArgumentException(
- "This content provider only works with TableViewer or AbstractListViewer"); //$NON-NLS-1$
- }
-
- if (newInput != null && !(newInput instanceof IObservableList)) {
- throw new IllegalArgumentException(
- "This content provider only works with input of type IObservableList"); //$NON-NLS-1$
- }
-
- setInput((IObservableList) newInput);
- }
-
- /**
- * @param list
- */
- private void setInput(IObservableList list) {
-
- if (list == null) {
- list = new WritableList(SWTObservables.getRealm(Display.getDefault()));
- }
-
- if (observableList != null) {
- observableList.removeListChangeListener(listener);
- }
-
- knownElements.clear();
-
- observableList = list;
-
- knownElements.addAll(list);
-
- observableList.addListChangeListener(listener);
- }
-
- /**
- * @return the set of elements known to this content provider. Label providers may track
- * this set if they need to be notified about additions before the viewer sees the added
- * element, and notified about removals after the element was removed from the viewer.
- */
- public IObservableSet getKnownElements() {
- return knownElements;
- }
-
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableMapLabelProvider.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableMapLabelProvider.java
deleted file mode 100644
index 1b79d37b..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableMapLabelProvider.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164247
- * Brad Reynolds - bug 164134
- ******************************************************************************/
-
-package org.eclipse.jface.databinding.viewers;
-
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.map.IMapChangeListener;
-import org.eclipse.core.databinding.observable.map.IObservableMap;
-import org.eclipse.core.databinding.observable.map.MapChangeEvent;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.LabelProviderChangedEvent;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * @since 3.3
- *
- */
-public class ObservableMapLabelProvider extends LabelProvider
- implements ILabelProvider, ITableLabelProvider {
-
- private final IObservableMap[] attributeMaps;
-
- private IMapChangeListener mapChangeListener = new IMapChangeListener() {
- public void handleMapChange(MapChangeEvent event) {
- Set affectedElements = event.diff.getChangedKeys();
- LabelProviderChangedEvent newEvent = new LabelProviderChangedEvent(
- ObservableMapLabelProvider.this, affectedElements
- .toArray());
- fireLabelProviderChanged(newEvent);
- }
- };
-
- /**
- * @param attributeMap
- */
- public ObservableMapLabelProvider(IObservableMap attributeMap) {
- this(new IObservableMap[] { attributeMap });
- }
-
- /**
- * @param attributeMaps
- */
- public ObservableMapLabelProvider(IObservableMap[] attributeMaps) {
- this.attributeMaps = attributeMaps;
- for (int i = 0; i < attributeMaps.length; i++) {
- attributeMaps[i].addMapChangeListener(mapChangeListener);
- }
- }
-
- public void dispose() {
- for (int i = 0; i < attributeMaps.length; i++) {
- attributeMaps[i].removeMapChangeListener(mapChangeListener);
- }
- super.dispose();
- }
-
- public Image getImage(Object element) {
- return null;
- }
-
- public String getText(Object element) {
- return getColumnText(element, 0);
- }
-
- public Image getColumnImage(Object element, int columnIndex) {
- return null;
- }
-
- public String getColumnText(Object element, int columnIndex) {
- if (columnIndex < attributeMaps.length) {
- Object result = attributeMaps[columnIndex].get(element);
- return result == null ? "" : result.toString(); //$NON-NLS-1$
- }
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableSetContentProvider.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableSetContentProvider.java
deleted file mode 100644
index fb22ef75..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableSetContentProvider.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920
- ******************************************************************************/
-package org.eclipse.jface.databinding.viewers;
-
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.IStaleListener;
-import org.eclipse.core.databinding.observable.StaleEvent;
-import org.eclipse.core.databinding.observable.set.IObservableSet;
-import org.eclipse.core.databinding.observable.set.ISetChangeListener;
-import org.eclipse.core.databinding.observable.set.ObservableSet;
-import org.eclipse.core.databinding.observable.set.SetChangeEvent;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.jface.viewers.AbstractListViewer;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * @since 1.0
- *
- */
-public final class ObservableSetContentProvider implements
- IStructuredContentProvider {
-
- private class KnownElementsSet extends ObservableSet {
-
- KnownElementsSet(Set wrappedSet) {
- super(SWTObservables.getRealm(Display.getDefault()), wrappedSet, Object.class);
- }
-
- void doFireDiff(Set added, Set removed) {
- fireSetChange(Diffs.createSetDiff(added, removed));
- }
-
- void doFireStale(boolean isStale) {
- if (isStale) {
- fireStale();
- } else {
- fireChange();
- }
- }
- }
-
- private IObservableSet readableSet;
-
- private Viewer viewer;
-
- /**
- * This readableSet returns the same elements as the input readableSet.
- * However, it only fires events AFTER the elements have been added or
- * removed from the viewer.
- */
- private KnownElementsSet knownElements;
-
- private ISetChangeListener listener = new ISetChangeListener() {
-
- public void handleSetChange(SetChangeEvent event) {
- boolean wasStale = knownElements.isStale();
- if (isDisposed()) {
- return;
- }
- doDiff(event.diff.getAdditions(), event.diff.getRemovals(), true);
- if (!wasStale && event.getObservableSet().isStale()) {
- knownElements.doFireStale(true);
- }
- }
- };
-
- private IStaleListener staleListener = new IStaleListener() {
- public void handleStale(StaleEvent event) {
- knownElements.doFireStale(event.getObservable().isStale());
- }
- };
-
- /**
- *
- */
- public ObservableSetContentProvider() {
- readableSet = new ObservableSet(SWTObservables.getRealm(Display.getDefault()),
- Collections.EMPTY_SET, Object.class) {
- };
- knownElements = new KnownElementsSet(readableSet);
- }
-
- public void dispose() {
- setInput(null);
- }
-
- private void doDiff(Set added, Set removed, boolean updateViewer) {
- knownElements.doFireDiff(added, Collections.EMPTY_SET);
-
- if (updateViewer) {
- Object[] toAdd = added.toArray();
- if (viewer instanceof TableViewer) {
- TableViewer tv = (TableViewer) viewer;
- tv.add(toAdd);
- } else if (viewer instanceof AbstractListViewer) {
- AbstractListViewer lv = (AbstractListViewer) viewer;
- lv.add(toAdd);
- }
- Object[] toRemove = removed.toArray();
- if (viewer instanceof TableViewer) {
- TableViewer tv = (TableViewer) viewer;
- tv.remove(toRemove);
- } else if (viewer instanceof AbstractListViewer) {
- AbstractListViewer lv = (AbstractListViewer) viewer;
- lv.remove(toRemove);
- }
- }
- knownElements.doFireDiff(Collections.EMPTY_SET, removed);
- }
-
- public Object[] getElements(Object inputElement) {
- return readableSet.toArray();
- }
-
- /**
- * Returns the readableSet of elements known to this content provider. Items
- * are added to this readableSet before being added to the viewer, and they
- * are removed after being removed from the viewer. The readableSet is
- * always updated after the viewer. This is intended for use by label
- * providers, as it will always return the items that need labels.
- *
- * @return readableSet of items that will need labels
- */
- public IObservableSet getKnownElements() {
- return knownElements;
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- this.viewer = viewer;
-
- if (!(viewer instanceof TableViewer || viewer instanceof AbstractListViewer)) {
- throw new IllegalArgumentException(
- "This content provider only works with TableViewer or AbstractListViewer"); //$NON-NLS-1$
- }
-
- if (newInput != null && !(newInput instanceof IObservableSet)) {
- throw new IllegalArgumentException(
- "This content provider only works with input of type IReadableSet"); //$NON-NLS-1$
- }
-
- setInput((IObservableSet) newInput);
- }
-
- private boolean isDisposed() {
- return viewer.getControl() == null || viewer.getControl().isDisposed();
- }
-
- private void setInput(IObservableSet newSet) {
- boolean updateViewer = true;
- if (newSet == null) {
- newSet = new ObservableSet(SWTObservables.getRealm(Display.getDefault()), Collections.EMPTY_SET, Object.class) {
- };
- // don't update the viewer - its input is null
- updateViewer = false;
- }
-
- boolean wasStale = false;
- if (readableSet != null) {
- wasStale = readableSet.isStale();
- readableSet.removeSetChangeListener(listener);
- readableSet.removeStaleListener(staleListener);
- }
-
- HashSet additions = new HashSet();
- HashSet removals = new HashSet();
-
- additions.addAll(newSet);
- additions.removeAll(readableSet);
-
- removals.addAll(readableSet);
- removals.removeAll(newSet);
-
- readableSet = newSet;
-
- doDiff(additions, removals, updateViewer);
-
- if (readableSet != null) {
- readableSet.addSetChangeListener(listener);
- readableSet.addStaleListener(staleListener);
- }
-
- boolean isStale = (readableSet != null && readableSet.isStale());
- if (isStale != wasStale) {
- knownElements.doFireStale(isStale);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ViewersObservables.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ViewersObservables.java
deleted file mode 100644
index 48bc04ab..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ViewersObservables.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.databinding.viewers;
-
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.jface.internal.databinding.internal.viewers.SelectionProviderSingleSelectionObservableValue;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * @since 3.3
- *
- */
-public class ViewersObservables {
-
- /**
- * @param selectionProvider
- * @return the observable value tracking the (single) selection of the given
- * selection provider
- */
- public static IObservableValue observeSingleSelection(
- ISelectionProvider selectionProvider) {
- return new SelectionProviderSingleSelectionObservableValue(
- SWTObservables.getRealm(Display.getDefault()),
- selectionProvider);
- }
-
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/package.html b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/package.html
deleted file mode 100644
index d720e2b4..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/package.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <meta name="GENERATOR" content="Mozilla/4.5 [en] (Win98; I) [Netscape]">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-To be written.
-<h2>
-Package Specification</h2>
-<p>
-This package provides classes that can be used to ...</p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/ButtonObservableValue.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/ButtonObservableValue.java
deleted file mode 100644
index 6f8d3638..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/ButtonObservableValue.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164653
- *******************************************************************************/
-package org.eclipse.jface.internal.databinding.internal.swt;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.jface.internal.databinding.provisional.swt.AbstractSWTObservableValue;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-
-/**
- * @since 1.0
- *
- */
-public class ButtonObservableValue extends AbstractSWTObservableValue {
-
- private final Button button;
-
- private boolean selectionValue;
-
- private Listener updateListener = new Listener() {
- public void handleEvent(Event event) {
- boolean oldSelectionValue = selectionValue;
- selectionValue = button.getSelection();
- fireValueChange(Diffs.createValueDiff(oldSelectionValue ? Boolean.TRUE : Boolean.FALSE,
- selectionValue ? Boolean.TRUE : Boolean.FALSE));
- }
- };
-
- /**
- * @param button
- */
- public ButtonObservableValue(Button button) {
- super(button);
- this.button = button;
- button.addListener(SWT.Selection, updateListener);
- button.addListener(SWT.DefaultSelection, updateListener);
- }
-
- public void doSetValue(final Object value) {
- boolean oldSelectionValue = selectionValue;
- selectionValue = value == null ? false : ((Boolean) value)
- .booleanValue();
- button.setSelection(selectionValue);
- fireValueChange(Diffs.createValueDiff(oldSelectionValue ? Boolean.TRUE : Boolean.FALSE,
- selectionValue ? Boolean.TRUE : Boolean.FALSE));
- }
-
- public Object doGetValue() {
- return button.getSelection() ? Boolean.TRUE : Boolean.FALSE;
- }
-
- public Object getValueType() {
- return Boolean.class;
- }
-
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/CComboObservableList.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/CComboObservableList.java
deleted file mode 100644
index 3ec3cc3d..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/CComboObservableList.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jface.internal.databinding.internal.swt;
-
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.swt.custom.CCombo;
-
-/**
- * @since 3.2
- *
- */
-public class CComboObservableList extends SWTObservableList {
-
- private final CCombo ccombo;
-
- /**
- * @param ccombo
- */
- public CComboObservableList(CCombo ccombo) {
- super(SWTObservables.getRealm(ccombo.getDisplay()));
- this.ccombo = ccombo;
- }
-
- protected int getItemCount() {
- return ccombo.getItemCount();
- }
-
- protected void setItems(String[] newItems) {
- ccombo.setItems(newItems);
- }
-
- protected String[] getItems() {
- return ccombo.getItems();
- }
-
- protected String getItem(int index) {
- return ccombo.getItem(index);
- }
-
- protected void setItem(int index, String string) {
- ccombo.setItem(index, string);
- }
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/CComboObservableValue.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/CComboObservableValue.java
deleted file mode 100644
index 3e544dae..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/CComboObservableValue.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164653
- *******************************************************************************/
-package org.eclipse.jface.internal.databinding.internal.swt;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.jface.internal.databinding.provisional.swt.AbstractSWTObservableValue;
-import org.eclipse.jface.util.Assert;
-import org.eclipse.swt.custom.CCombo;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-
-/**
- * @since 3.2
- *
- */
-public class CComboObservableValue extends AbstractSWTObservableValue {
-
- /**
- *
- */
-
- private final CCombo ccombo;
-
- private final String attribute;
-
- private boolean updating = false;
-
- private String currentValue;
-
- /**
- * @param ccombo
- * @param attribute
- */
- public CComboObservableValue(CCombo ccombo, String attribute) {
- super(ccombo);
- this.ccombo = ccombo;
- this.attribute = attribute;
-
- if (attribute.equals(SWTProperties.SELECTION)
- || attribute.equals(SWTProperties.TEXT)) {
- this.currentValue = ccombo.getText();
- ccombo.addModifyListener(new ModifyListener() {
-
- public void modifyText(ModifyEvent e) {
- if (!updating) {
- String oldValue = currentValue;
- currentValue = CComboObservableValue.this.ccombo
- .getText();
- fireValueChange(Diffs.createValueDiff(oldValue,
- currentValue));
- }
- }
- });
- } else
- throw new IllegalArgumentException();
- }
-
- public void doSetValue(final Object value) {
- String oldValue = ccombo.getText();
- try {
- updating = true;
- if (attribute.equals(SWTProperties.TEXT)) {
- String stringValue = value != null ? value.toString() : ""; //$NON-NLS-1$
- ccombo.setText(stringValue);
- } else if (attribute.equals(SWTProperties.SELECTION)) {
- String items[] = ccombo.getItems();
- int index = -1;
- if (items != null && value != null) {
- for (int i = 0; i < items.length; i++) {
- if (value.equals(items[i])) {
- index = i;
- break;
- }
- }
- if (index == -1) {
- ccombo.setText((String) value);
- } else {
- ccombo.select(index); // -1 will not "unselect"
- }
- }
- }
- } finally {
- updating = false;
- }
- fireValueChange(Diffs.createValueDiff(oldValue, ccombo.getText()));
- }
-
- public Object doGetValue() {
- if (attribute.equals(SWTProperties.TEXT))
- return ccombo.getText();
-
- Assert.isTrue(attribute.equals(SWTProperties.SELECTION),
- "unexpected attribute: " + attribute); //$NON-NLS-1$
- // The problem with a ccombo, is that it changes the text and
- // fires before it update its selection index
- return ccombo.getText();
- }
-
- public Object getValueType() {
- Assert.isTrue(attribute.equals(SWTProperties.TEXT)
- || attribute.equals(SWTProperties.SELECTION),
- "unexpected attribute: " + attribute); //$NON-NLS-1$
- return String.class;
- }
-
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/CLabelObservableValue.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/CLabelObservableValue.java
deleted file mode 100644
index 2c6ce05f..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/CLabelObservableValue.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164653
- *******************************************************************************/
-package org.eclipse.jface.internal.databinding.internal.swt;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.jface.internal.databinding.provisional.swt.AbstractSWTObservableValue;
-import org.eclipse.swt.custom.CLabel;
-
-/**
- * @since 1.0
- *
- */
-public class CLabelObservableValue extends AbstractSWTObservableValue {
-
- private final CLabel label;
-
- /**
- * @param label
- */
- public CLabelObservableValue(CLabel label) {
- super(label);
- this.label = label;
- }
-
- public void doSetValue(final Object value) {
- String oldValue = label.getText();
- label.setText(value == null ? "" : value.toString()); //$NON-NLS-1$
- fireValueChange(Diffs.createValueDiff(oldValue, label.getText()));
- }
-
- public Object doGetValue() {
- return label.getText();
- }
-
- public Object getValueType() {
- return String.class;
- }
-
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/ComboObservableList.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/ComboObservableList.java
deleted file mode 100644
index ab49b149..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/ComboObservableList.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jface.internal.databinding.internal.swt;
-
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.swt.widgets.Combo;
-
-/**
- * @since 3.2
- *
- */
-public class ComboObservableList extends SWTObservableList {
-
- private final Combo combo;
-
- /**
- * @param combo
- */
- public ComboObservableList(Combo combo) {
- super(SWTObservables.getRealm(combo.getDisplay()));
- this.combo = combo;
- }
-
- protected int getItemCount() {
- return combo.getItemCount();
- }
-
- protected void setItems(String[] newItems) {
- combo.setItems(newItems);
- }
-
- protected String[] getItems() {
- return combo.getItems();
- }
-
- protected String getItem(int index) {
- return combo.getItem(index);
- }
-
- protected void setItem(int index, String string) {
- combo.setItem(index, string);
- }
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/ComboObservableValue.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/ComboObservableValue.java
deleted file mode 100644
index 6602495c..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/ComboObservableValue.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164653
- *******************************************************************************/
-package org.eclipse.jface.internal.databinding.internal.swt;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.jface.internal.databinding.provisional.swt.AbstractSWTObservableValue;
-import org.eclipse.jface.util.Assert;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.widgets.Combo;
-
-/**
- * @since 3.2
- *
- */
-public class ComboObservableValue extends AbstractSWTObservableValue {
-
- private final Combo combo;
- private final String attribute;
- private boolean updating = false;
- private String currentValue;
-
- /**
- * @param combo
- * @param attribute
- */
- public ComboObservableValue(Combo combo, String attribute) {
- super(combo);
- this.combo = combo;
- this.attribute = attribute;
-
- if (attribute.equals(SWTProperties.SELECTION)
- || attribute.equals(SWTProperties.TEXT)) {
- this.currentValue = combo.getText();
- combo.addModifyListener(new ModifyListener() {
-
- public void modifyText(ModifyEvent e) {
- if (!updating) {
- String oldValue = currentValue;
- currentValue = ComboObservableValue.this.combo
- .getText();
- fireValueChange(Diffs.createValueDiff(oldValue,
- currentValue));
- }
- }
- });
- } else
- throw new IllegalArgumentException();
- }
-
- public void doSetValue(final Object value) {
- String oldValue = combo.getText();
- try {
- updating = true;
- if (attribute.equals(SWTProperties.TEXT)) {
- String stringValue = value != null ? value.toString() : ""; //$NON-NLS-1$
- combo.setText(stringValue);
- } else if (attribute.equals(SWTProperties.SELECTION)) {
- String items[] = combo.getItems();
- int index = -1;
- if (items != null && value != null) {
- for (int i = 0; i < items.length; i++) {
- if (value.equals(items[i])) {
- index = i;
- break;
- }
- }
- if (index == -1) {
- combo.setText((String) value);
- } else {
- combo.select(index); // -1 will not "unselect"
- }
- }
- }
- } finally {
- updating = false;
- }
- fireValueChange(Diffs.createValueDiff(oldValue, combo.getText()));
- }
-
- public Object doGetValue() {
- if (attribute.equals(SWTProperties.TEXT))
- return combo.getText();
-
- Assert.isTrue(attribute.equals(SWTProperties.SELECTION),
- "unexpected attribute: " + attribute); //$NON-NLS-1$
- // The problem with a ccombo, is that it changes the text and
- // fires before it update its selection index
- return combo.getText();
- }
-
- public Object getValueType() {
- Assert.isTrue(attribute.equals(SWTProperties.TEXT)
- || attribute.equals(SWTProperties.SELECTION),
- "unexpected attribute: " + attribute); //$NON-NLS-1$
- return String.class;
- }
-
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/ControlObservableValue.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/ControlObservableValue.java
deleted file mode 100644
index b62a55bd..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/ControlObservableValue.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164653
- * Matt Carter - bug 170668
- * Brad Reynolds - bug 170848
- *******************************************************************************/
-package org.eclipse.jface.internal.databinding.internal.swt;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.jface.internal.databinding.provisional.swt.AbstractSWTObservableValue;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * @since 1.0
- *
- */
-public class ControlObservableValue extends AbstractSWTObservableValue {
-
- private final Control control;
-
- private final String attribute;
-
- private Object valueType;
-
- private static final Map SUPPORTED_ATTRIBUTES = new HashMap();
- static {
- SUPPORTED_ATTRIBUTES.put(SWTProperties.ENABLED, Boolean.TYPE);
- SUPPORTED_ATTRIBUTES.put(SWTProperties.VISIBLE, Boolean.TYPE);
- SUPPORTED_ATTRIBUTES.put(SWTProperties.TOOLTIP_TEXT, String.class);
- SUPPORTED_ATTRIBUTES.put(SWTProperties.FOREGROUND, Color.class);
- SUPPORTED_ATTRIBUTES.put(SWTProperties.BACKGROUND, Color.class);
- SUPPORTED_ATTRIBUTES.put(SWTProperties.FONT, Font.class);
- }
-
- /**
- * @param control
- * @param attribute
- */
- public ControlObservableValue(Control control, String attribute) {
- super(control);
- this.control = control;
- this.attribute = attribute;
- if (SUPPORTED_ATTRIBUTES.keySet().contains(attribute)) {
- this.valueType = SUPPORTED_ATTRIBUTES.get(attribute);
- } else {
- throw new IllegalArgumentException();
- }
- }
-
- public void doSetValue(Object value) {
- Object oldValue = doGetValue();
- if (attribute.equals(SWTProperties.ENABLED)) {
- control.setEnabled(((Boolean) value).booleanValue());
- } else if (attribute.equals(SWTProperties.VISIBLE)) {
- control.setVisible(((Boolean) value).booleanValue());
- } else if (attribute.equals(SWTProperties.TOOLTIP_TEXT)) {
- control.setToolTipText((String) value);
- } else if (attribute.equals(SWTProperties.FOREGROUND)) {
- control.setForeground((Color) value);
- } else if (attribute.equals(SWTProperties.BACKGROUND)) {
- control.setBackground((Color) value);
- } else if (attribute.equals(SWTProperties.FONT)) {
- control.setFont((Font) value);
- }
- fireValueChange(Diffs.createValueDiff(oldValue, value));
- }
-
- public Object doGetValue() {
- if (attribute.equals(SWTProperties.ENABLED)) {
- return control.getEnabled() ? Boolean.TRUE : Boolean.FALSE;
- }
- if (attribute.equals(SWTProperties.VISIBLE)) {
- return control.getVisible() ? Boolean.TRUE : Boolean.FALSE;
- }
- if (attribute.equals(SWTProperties.TOOLTIP_TEXT)) {
- return control.getToolTipText();
- }
- if (attribute.equals(SWTProperties.FOREGROUND)) {
- return control.getForeground();
- }
- if (attribute.equals(SWTProperties.BACKGROUND)) {
- return control.getBackground();
- }
- if (attribute.equals(SWTProperties.FONT)) {
- return control.getFont();
- }
-
- return null;
- }
-
- public Object getValueType() {
- return valueType;
- }
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/LabelObservableValue.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/LabelObservableValue.java
deleted file mode 100644
index 16c6570e..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/LabelObservableValue.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164653
- *******************************************************************************/
-package org.eclipse.jface.internal.databinding.internal.swt;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.jface.internal.databinding.provisional.swt.AbstractSWTObservableValue;
-import org.eclipse.swt.widgets.Label;
-
-/**
- * @since 3.3
- *
- */
-public class LabelObservableValue extends AbstractSWTObservableValue {
-
- private final Label label;
-
- /**
- * @param label
- */
- public LabelObservableValue(Label label) {
- super(label);
- this.label = label;
- }
-
- public void doSetValue(final Object value) {
- String oldValue = label.getText();
- label.setText(value == null ? "" : value.toString()); //$NON-NLS-1$
- fireValueChange(Diffs.createValueDiff(oldValue, label.getText()));
- }
-
- public Object doGetValue() {
- return label.getText();
- }
-
- public Object getValueType() {
- return String.class;
- }
-
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/ListObservableList.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/ListObservableList.java
deleted file mode 100644
index 2928c1ca..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/ListObservableList.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jface.internal.databinding.internal.swt;
-
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.swt.widgets.List;
-
-/**
- * @since 3.2
- *
- */
-public class ListObservableList extends SWTObservableList {
-
- private final List list;
-
- /**
- * @param list
- */
- public ListObservableList(List list) {
- super(SWTObservables.getRealm(list.getDisplay()));
- this.list = list;
- }
-
- protected int getItemCount() {
- return list.getItemCount();
- }
-
- protected void setItems(String[] newItems) {
- list.setItems(newItems);
- }
-
- protected String[] getItems() {
- return list.getItems();
- }
-
- protected String getItem(int index) {
- return list.getItem(index);
- }
-
- protected void setItem(int index, String string) {
- list.setItem(index, string);
- }
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/ListObservableValue.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/ListObservableValue.java
deleted file mode 100644
index c86ed21f..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/ListObservableValue.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164653
- *******************************************************************************/
-package org.eclipse.jface.internal.databinding.internal.swt;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.jface.internal.databinding.provisional.swt.AbstractSWTObservableValue;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.List;
-import org.eclipse.swt.widgets.Listener;
-
-/**
- * @since 3.2
- *
- */
-public class ListObservableValue extends AbstractSWTObservableValue {
-
- private final List list;
-
- private boolean updating = false;
-
- private String currentValue;
-
- /**
- * @param list
- */
- public ListObservableValue(List list) {
- super(list);
- this.list = list;
- this.currentValue = (String) doGetValue();
-
- if ((list.getStyle() & SWT.MULTI) > 0)
- throw new IllegalArgumentException(
- "SWT.SINGLE support only for a List selection"); //$NON-NLS-1$
-
- list.addListener(SWT.Selection, new Listener() {
-
- public void handleEvent(Event event) {
- if (!updating) {
- Object oldValue = currentValue;
- currentValue = (String) doGetValue();
- fireValueChange(Diffs.createValueDiff(oldValue,
- currentValue));
- }
- }
-
- });
- }
-
- public void doSetValue(Object value) {
- String oldValue = null;
- if (list.getSelection() != null && list.getSelection().length > 0)
- oldValue = list.getSelection()[0];
- try {
- updating = true;
- String items[] = list.getItems();
- int index = -1;
- if (items != null && value != null) {
- for (int i = 0; i < items.length; i++) {
- if (value.equals(items[i])) {
- index = i;
- break;
- }
- }
- list.select(index); // -1 will not "unselect"
- }
- currentValue = (String) value;
- } finally {
- updating = false;
- }
- fireValueChange(Diffs.createValueDiff(oldValue, value));
- }
-
- public Object doGetValue() {
- int index = list.getSelectionIndex();
- if (index >= 0)
- return list.getItem(index);
- return null;
- }
-
- public Object getValueType() {
- return String.class;
- }
-
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/SWTObservableList.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/SWTObservableList.java
deleted file mode 100644
index 09418794..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/SWTObservableList.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jface.internal.databinding.internal.swt;
-
-import org.eclipse.core.databinding.BindingException;
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.ObservableTracker;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.list.AbstractObservableList;
-
-/**
- * Abstract base class of CComboObservableList, ComboObservableList, and
- * ListObservableList.
- *
- * @since 3.2
- *
- */
-public abstract class SWTObservableList extends AbstractObservableList {
-
- /**
- *
- */
- public SWTObservableList() {
- super();
- }
-
- /**
- * @param realm
- */
- public SWTObservableList(Realm realm) {
- super(realm);
- }
-
- public void add(int index, Object element) {
- int size = doGetSize();
- if (index < 0 || index > size)
- index = size;
- String[] newItems = new String[size + 1];
- System.arraycopy(getItems(), 0, newItems, 0, index);
- newItems[index] = (String) element;
- System.arraycopy(getItems(), index, newItems, index + 1, size - index);
- setItems(newItems);
- fireListChange(Diffs.createListDiff(Diffs.createListDiffEntry(index,
- true, element)));
- }
-
- public int doGetSize() {
- return getItemCount();
- }
-
- public Object get(int index) {
- getterCalled();
- return getItem(index);
- }
-
- public Object getElementType() {
- return String.class;
- }
-
- /**
- * @param index
- * @return the item at the given index
- */
- protected abstract String getItem(int index);
-
- /**
- * @return the item count
- */
- protected abstract int getItemCount();
-
- /**
- * @return the items
- */
- protected abstract String[] getItems();
-
- private void getterCalled() {
- ObservableTracker.getterCalled(this);
- }
-
- public Object remove(int index) {
- getterCalled();
- int size = doGetSize();
- if (index < 0 || index > size - 1)
- throw new BindingException(
- "Request to remove an element out of the collection bounds"); //$NON-NLS-1$
-
- String[] newItems = new String[size - 1];
- String oldElement = getItem(index);
- if (newItems.length > 0) {
- System.arraycopy(getItems(), 0, newItems, 0, index);
- if (size - 1 > index) {
- System.arraycopy(getItems(), index + 1, newItems, index, size
- - index - 1);
- }
- }
- setItems(newItems);
- fireListChange(Diffs.createListDiff(Diffs.createListDiffEntry(index,
- false, oldElement)));
- return oldElement;
- }
-
- public Object set(int index, Object element) {
- String oldElement = getItem(index);
- setItem(index, (String) element);
- fireListChange(Diffs.createListDiff(Diffs.createListDiffEntry(index,
- false, oldElement), Diffs.createListDiffEntry(index, true,
- element)));
- return oldElement;
- }
-
- /**
- * @param index
- * @param string
- */
- protected abstract void setItem(int index, String string);
-
- /**
- * @param newItems
- */
- protected abstract void setItems(String[] newItems);
-
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/SWTProperties.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/SWTProperties.java
deleted file mode 100644
index a11ba0d6..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/SWTProperties.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Matt Carter - bug 170668
- * Brad Reynolds - bug 170848
- *******************************************************************************/
-package org.eclipse.jface.internal.databinding.internal.swt;
-
-/**
- * Constants used to describe properties of SWT controls.
- *
- * @since 1.0
- *
- */
-public interface SWTProperties {
-
- /**
- * Applies to Control
- */
- public static final String ENABLED = "enabled"; //$NON-NLS-1$
- /**
- * Applies to Control
- */
- public static final String VISIBLE = "visible"; //$NON-NLS-1$
- /**
- * Applies to Control
- */
- public static final String TOOLTIP_TEXT = "tooltip"; //$NON-NLS-1$
- /**
- * Applies to
- */
- public static final String ITEMS = "items"; //$NON-NLS-1$
- /**
- * Applies to Spinner
- */
- public static final String MAX = "max"; //$NON-NLS-1$
- /**
- * Applies to Spinner
- */
- public static final String MIN = "min"; //$NON-NLS-1$
- /**
- * Applies to Spinner, Button
- */
- public static final String SELECTION = "selection"; //$NON-NLS-1$
- /**
- * Applies to Spinner, Button
- */
- public static final String SELECTION_INDEX = "index"; //$NON-NLS-1$
- /**
- * Applies to Text, Label, Combo
- */
- public static final String TEXT = "text"; //$NON-NLS-1$
-
- /**
- * Applies to Label, CLabel.
- */
- public static final String IMAGE = "image"; //$NON-NLS-1$
- /**
- * Applies to Control
- */
- public static final String FOREGROUND = "foreground"; //$NON-NLS-1$
- /**
- * Applies to Control
- */
- public static final String BACKGROUND = "background"; //$NON-NLS-1$
- /**
- * Applies to Control
- */
- public static final String FONT = "font"; //$NON-NLS-1$
-
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/SpinnerObservableValue.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/SpinnerObservableValue.java
deleted file mode 100644
index 42841d81..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/SpinnerObservableValue.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164653
- *******************************************************************************/
-package org.eclipse.jface.internal.databinding.internal.swt;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.jface.internal.databinding.provisional.swt.AbstractSWTObservableValue;
-import org.eclipse.jface.util.Assert;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.widgets.Spinner;
-
-/**
- * @since 1.0
- *
- */
-public class SpinnerObservableValue extends AbstractSWTObservableValue {
-
- private final Spinner spinner;
-
- private final String attribute;
-
- private boolean updating = false;
-
- private int currentSelection;
-
- /**
- * @param spinner
- * @param attribute
- */
- public SpinnerObservableValue(Spinner spinner, String attribute) {
- super(spinner);
- this.spinner = spinner;
- this.attribute = attribute;
- if (attribute.equals(SWTProperties.SELECTION)) {
- currentSelection = spinner.getSelection();
- spinner.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- if (!updating) {
- int newSelection = SpinnerObservableValue.this.spinner
- .getSelection();
- fireValueChange(Diffs.createValueDiff(new Integer(
- currentSelection), new Integer(newSelection)));
- currentSelection = newSelection;
- }
- }
- });
- } else if (!attribute.equals(SWTProperties.MIN)
- && !attribute.equals(SWTProperties.MAX)) {
- throw new IllegalArgumentException(
- "Attribute name not valid: " + attribute); //$NON-NLS-1$
- }
- }
-
- public void doSetValue(final Object value) {
- int oldValue;
- int newValue;
- try {
- updating = true;
- newValue = ((Integer) value).intValue();
- if (attribute.equals(SWTProperties.SELECTION)) {
- oldValue = spinner.getSelection();
- spinner.setSelection(newValue);
- currentSelection = newValue;
- } else if (attribute.equals(SWTProperties.MIN)) {
- oldValue = spinner.getMinimum();
- spinner.setMinimum(newValue);
- } else if (attribute.equals(SWTProperties.MAX)) {
- oldValue = spinner.getMaximum();
- spinner.setMaximum(newValue);
- } else {
- Assert.isTrue(false, "invalid attribute name:" + attribute); //$NON-NLS-1$
- return;
- }
- fireValueChange(Diffs.createValueDiff(new Integer(oldValue),
- new Integer(newValue)));
- } finally {
- updating = false;
- }
- }
-
- public Object doGetValue() {
- int value = 0;
- if (attribute.equals(SWTProperties.SELECTION)) {
- value = spinner.getSelection();
- } else if (attribute.equals(SWTProperties.MIN)) {
- value = spinner.getMinimum();
- } else if (attribute.equals(SWTProperties.MAX)) {
- value = spinner.getMaximum();
- }
- return new Integer(value);
- }
-
- public Object getValueType() {
- return Integer.TYPE;
- }
-
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/TableObservableValue.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/TableObservableValue.java
deleted file mode 100644
index 6c342806..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/TableObservableValue.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164653
- *******************************************************************************/
-package org.eclipse.jface.internal.databinding.internal.swt;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.jface.internal.databinding.provisional.swt.AbstractSWTObservableValue;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.widgets.Table;
-
-/**
- * @since 1.0
- *
- */
-public class TableObservableValue extends AbstractSWTObservableValue {
-
- private final Table table;
-
- private boolean updating = false;
-
- private int currentSelection;
-
- /**
- * @param table
- * @param attribute
- */
- public TableObservableValue(Table table, String attribute) {
- super(table);
- this.table = table;
- currentSelection = table.getSelectionIndex();
- if (attribute.equals(SWTProperties.SELECTION)) {
- currentSelection = table.getSelectionIndex();
- table.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- if (!updating) {
- int newSelection = TableObservableValue.this.table
- .getSelectionIndex();
- fireValueChange(Diffs.createValueDiff(new Integer(
- currentSelection), new Integer(newSelection)));
- currentSelection = newSelection;
- }
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- widgetSelected(e);
- }
- });
- } else {
- throw new IllegalArgumentException();
- }
- }
-
- public void doSetValue(Object value) {
- try {
- updating = true;
- int intValue = ((Integer) value).intValue();
- table.setSelection(intValue);
- currentSelection = intValue;
- } finally {
- updating = false;
- }
- }
-
- public Object doGetValue() {
- return new Integer(table.getSelectionIndex());
- }
-
- public Object getValueType() {
- return Integer.class;
- }
-
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/TextObservableValue.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/TextObservableValue.java
deleted file mode 100644
index 737d6a87..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/TextObservableValue.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds (bug 135446)
- * Brad Reynolds - bug 164653
- *******************************************************************************/
-package org.eclipse.jface.internal.databinding.internal.swt;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.IObservable;
-import org.eclipse.jface.internal.databinding.provisional.swt.AbstractSWTVetoableValue;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.events.ShellAdapter;
-import org.eclipse.swt.events.ShellEvent;
-import org.eclipse.swt.events.ShellListener;
-import org.eclipse.swt.events.VerifyEvent;
-import org.eclipse.swt.events.VerifyListener;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * {@link IObservable} implementation that wraps a {@link Text} widget. The time
- * at which listeners should be notified about changes to the text is specified
- * on construction.
- *
- * <dl>
- * <dt>Events:</dt>
- * <dd> If the update event type (specified on construction) is
- * <code>SWT.Modify</code> a value change event will be fired on every key
- * stroke. If the update event type is <code>SWT.FocusOut</code> a value
- * change event will be fired on focus out. When in either mode if the user is
- * entering text and presses [Escape] the value will be reverted back to the
- * last value set using doSetValue(). Regardless of the update event type a
- * value changing event will fire on verify to enable vetoing of changes.</dd>
- * </dl>
- *
- * @since 1.0
- */
-public class TextObservableValue extends AbstractSWTVetoableValue {
-
- /**
- * {@link Text} widget that this is being observed.
- */
- private final Text text;
-
- /**
- * Flag to track when the model is updating the widget. When
- * <code>true</code> the handlers for the SWT events should not process
- * the event as this would cause an infinite loop.
- */
- private boolean updating = false;
-
- /**
- * SWT event that on firing this observable will fire change events to its
- * listeners.
- */
- private int updateEventType;
-
- /**
- * Valid types for the {@link #updateEventType}.
- */
- private static final int[] validUpdateEventTypes = new int[] { SWT.Modify,
- SWT.FocusOut, SWT.NONE };
-
- /**
- * Last value set using doSetValue(), or null. This is maintained so that
- * when entering text if the consumer were to press [Escape] the value can
- * be reverted back to the last known externally-set value.
- */
- private String bufferedValue;
-
- private Listener updateListener = new Listener() {
- public void handleEvent(Event event) {
- if (!updating) {
- String oldValue = bufferedValue;
- String newValue = text.getText();
-
- // If we are updating on focus lost then when we fire the change
- // event change the buffered value
- if (updateEventType == SWT.FocusOut) {
- bufferedValue = text.getText();
-
- if (!newValue.equals(oldValue)) {
- fireValueChange(Diffs.createValueDiff(oldValue,
- newValue));
- }
- } else {
- fireValueChange(Diffs.createValueDiff(oldValue, text
- .getText()));
- }
- }
- }
- };
-
- private VerifyListener verifyListener;
-
- private KeyListener keyListener;
-
- private ShellListener shellListener;
-
- /**
- * Constructs a new instance bound to the given <code>text</code> widget
- * and configured to fire change events to its listeners at the time of the
- * <code>updateEventType</code>.
- *
- * @param text
- * @param updateEventType
- * SWT event constant as to what SWT event to update the model in
- * response to. Appropriate values are: <code>SWT.Modify</code>,
- * <code>SWT.FocusOut</code>, <code>SWT.NONE</code>.
- * @throws IllegalArgumentException
- * if <code>updateEventType</code> is an incorrect type.
- */
- public TextObservableValue(final Text text, int updateEventType) {
- super(text);
- boolean eventValid = false;
- for (int i = 0; !eventValid && i < validUpdateEventTypes.length; i++) {
- eventValid = (updateEventType == validUpdateEventTypes[i]);
- }
- if (!eventValid) {
- throw new IllegalArgumentException(
- "UpdateEventType [" + updateEventType + "] is not supported."); //$NON-NLS-1$//$NON-NLS-2$
- }
- this.text = text;
- this.updateEventType = updateEventType;
- if (updateEventType != SWT.None) {
- text.addListener(updateEventType, updateListener);
- }
- // If the update policy is SWT.Modify then the model is notified of
- // changed on key stroke by key stroke
- // When escape is pressed we need to rollback to the previous value
- // which is done with a key listener, however
- // the bufferedValue (the last remembered change value) must be changed
- // on focus lost
- if (updateEventType == SWT.Modify) {
- text.addListener(SWT.FocusOut, new Listener() {
- public void handleEvent(Event event) {
- if (!updating) {
- bufferedValue = text.getText();
- }
- }
- });
- }
- verifyListener = new VerifyListener() {
- public void verifyText(VerifyEvent e) {
- if (!updating) {
- String currentText = TextObservableValue.this.text
- .getText();
- String newText = currentText.substring(0, e.start) + e.text
- + currentText.substring(e.end);
- if (!fireValueChanging(Diffs.createValueDiff(currentText,
- newText))) {
- e.doit = false;
- }
- }
- }
- };
- text.addVerifyListener(verifyListener);
- keyListener = new KeyListener() {
- public void keyPressed(KeyEvent e) {
- if (e.character == SWT.ESC && bufferedValue != null) {
- // Revert the value in the text field to the model value
- text.setText(bufferedValue);
- }
- }
-
- public void keyReleased(KeyEvent e) {
- }
- };
- text.addKeyListener(keyListener);
- shellListener = new ShellAdapter() {
- public void shellClosed(ShellEvent e) {
- if (!text.isDisposed()) {
- String oldValue = bufferedValue;
- String newValue = text.getText();
-
- if (!newValue.equals(oldValue)) {
- fireValueChange(Diffs.createValueDiff(oldValue,
- newValue));
- }
- }
- }
- };
- text.getShell().addShellListener(shellListener);
- }
-
- /**
- * Sets the bound {@link Text Text's} text to the passed <code>value</code>.
- *
- * @param value
- * new value, String expected
- * @see org.eclipse.core.databinding.observable.value.AbstractVetoableValue#doSetApprovedValue(java.lang.Object)
- * @throws ClassCastException
- * if the value is anything other than a String
- */
- public void doSetApprovedValue(final Object value) {
- try {
- updating = true;
- bufferedValue = (String) value;
- text.setText(value == null ? "" : value.toString()); //$NON-NLS-1$
- } finally {
- updating = false;
- }
- }
-
- /**
- * Returns the current value of the {@link Text}.
- *
- * @see org.eclipse.core.databinding.observable.value.AbstractVetoableValue#doGetValue()
- */
- public Object doGetValue() {
- return text.getText();
- }
-
- /**
- * Returns the type of the value from {@link #doGetValue()}, i.e.
- * String.class
- *
- * @see org.eclipse.core.databinding.observable.value.IObservableValue#getValueType()
- */
- public Object getValueType() {
- return String.class;
- }
-
- public void dispose() {
- if (!text.isDisposed()) {
- text.removeKeyListener(keyListener);
- if (updateEventType != SWT.None) {
- text.removeListener(updateEventType, updateListener);
- }
- text.removeVerifyListener(verifyListener);
- text.getShell().removeShellListener(shellListener);
- }
- super.dispose();
- }
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/IPrefetchingTree.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/IPrefetchingTree.java
deleted file mode 100644
index a4f8ee69..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/IPrefetchingTree.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jface.internal.databinding.internal.viewers;
-
-/**
- * @since 3.3
- *
- */
-public interface IPrefetchingTree {
- /**
- * Returns true if and only if the content provider should
- * try to prefetch the children of the given node.
- * Prefetching uses unused CPU cycles to fetch the children
- * of visible nodes so that they expand faster. This will
- * generally cause the application to run faster so should
- * usually be enabled.
- * <p>
- * In some circumstances computing the children of a node may
- * require network resources that need to be conserved, so
- * prefetching can be explicitly disabled these nodes. This
- * means that the user will need to wait for a "pending" node
- * every time they expand the parent node.
- * </p>
- *
- * @param parentNode
- * @return true iff the children should be eagerly fetched
- */
- boolean shouldPrefetch(Object parentNode);
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/LeafNodesSet.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/LeafNodesSet.java
deleted file mode 100644
index 613c2ee4..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/LeafNodesSet.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jface.internal.databinding.internal.viewers;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.IStaleListener;
-import org.eclipse.core.databinding.observable.StaleEvent;
-import org.eclipse.core.databinding.observable.set.AbstractObservableSet;
-import org.eclipse.core.databinding.observable.set.IObservableSet;
-import org.eclipse.core.databinding.observable.set.ISetChangeListener;
-import org.eclipse.core.databinding.observable.set.SetChangeEvent;
-import org.eclipse.core.databinding.observable.set.SetDiff;
-import org.eclipse.core.databinding.observable.tree.IUnorderedTreeProvider;
-import org.eclipse.core.internal.databinding.observable.tree.TreePath;
-
-/**
- * This set consists of all leaf nodes from the given tree (that is, all nodes
- * for which ITreeProvider.createChildSet returns null).
- */
-public class LeafNodesSet extends AbstractObservableSet {
-
- private HashSet leafNodes = new HashSet();
-
- private HashMap mapElementsOntoNodeInfo = new HashMap();
-
- private IUnorderedTreeProvider tree;
-
- private Object input;
-
- private int staleCount = 0;
-
- private class NodeInfo implements IStaleListener, ISetChangeListener {
- // Number of times the element occurs in the tree
- private int count;
-
- // Element
- private TreePath treePath;
-
- // Children set (or null if this is a leaf node)
- IObservableSet children;
-
- private boolean wasStale = false;
-
- /**
- * @param treePath
- */
- public NodeInfo(TreePath treePath) {
- this.treePath = treePath;
- children = tree.createChildSet(this.treePath);
- if (children != null) {
- children.addStaleListener(this);
- children.addSetChangeListener(this);
- }
- count = 1;
- }
-
- public void handleSetChange(SetChangeEvent event) {
- processDiff(treePath, event.diff);
- }
-
- public void handleStale(StaleEvent event) {
- if (wasStale != children.isStale()) {
- if (wasStale) {
- staleCount--;
- } else {
- staleCount++;
- }
- wasStale = !wasStale;
- }
- setStale(staleCount > 0);
- }
-
- /**
- *
- */
- public void dispose() {
- if (children != null) {
- children.dispose();
- children = null;
- if (wasStale) {
- staleCount--;
- }
- }
- }
- }
-
- /**
- * Creates a set that will contain the leaf nodes from the given tree
- *
- * @param tree
- * tree whose leaf nodes will be computed
- */
- public LeafNodesSet(IUnorderedTreeProvider tree) {
- this(null, tree);
- }
-
- /**
- * Creates a set that will contain the leaf nodes from the given tree, and
- * sets the root of the tree to the given element.
- *
- * @param initialInput
- * root of the tree
- * @param tree
- * tree whose leaf nodes will be computed
- */
- public LeafNodesSet(Object initialInput, IUnorderedTreeProvider tree) {
- super(tree.getRealm());
- this.tree = tree;
- if (initialInput != null) {
- setInput(initialInput);
- }
- }
-
- private void processDiff(TreePath treePath, SetDiff diff) {
- Set removals = new HashSet();
- HashSet additions = new HashSet();
-
- for (Iterator iter = diff.getRemovals().iterator(); iter.hasNext();) {
- Object next = iter.next();
-
- elementRemoved(treePath.createChildPath(next), removals);
- }
-
- for (Iterator iter = diff.getAdditions().iterator(); iter.hasNext();) {
- Object next = iter.next();
-
- elementDiscovered(treePath.createChildPath(next), additions);
- }
-
- HashSet newRemovals = new HashSet();
- newRemovals.addAll(removals);
- newRemovals.removeAll(additions);
-
- HashSet newAdditions = new HashSet();
- newAdditions.addAll(additions);
- newAdditions.removeAll(removals);
-
- leafNodes.addAll(newAdditions);
- leafNodes.removeAll(newRemovals);
-
- if (!newAdditions.isEmpty() || !newRemovals.isEmpty()) {
- setStale(staleCount > 0);
- fireSetChange(Diffs.createSetDiff(newAdditions, newRemovals));
- }
- }
-
- /**
- * Sets the root of the tree to the given element.
- *
- * @param input
- * new root of the tree
- */
- public void setInput(Object input) {
- Set removals = Collections.EMPTY_SET;
- Set additions = Collections.EMPTY_SET;
- if (this.input != null) {
- removals = Collections.singleton(this.input);
- } else if (input != null) {
- additions = Collections.singleton(input);
- }
- this.input = input;
- processDiff(TreePath.EMPTY, Diffs.createSetDiff(additions, removals));
- }
-
- /**
- * Called when an element is removed from the tree. The given HashSet will
- * be filled in with all removed leaf nodes.
- *
- * @param treePath
- * @param removals
- */
- private void elementRemoved(TreePath treePath, Set removals) {
- NodeInfo newNode = (NodeInfo) mapElementsOntoNodeInfo.get(treePath);
-
- if (newNode != null) {
- newNode = new NodeInfo(treePath);
- newNode.count--;
- if (newNode.count == 0) {
- mapElementsOntoNodeInfo.remove(treePath);
- if (newNode.children != null) {
- for (Iterator iter = newNode.children.iterator(); iter
- .hasNext();) {
- Object next = iter.next();
-
- elementRemoved(treePath.createChildPath(next), removals);
- }
- newNode.children.dispose();
- } else {
- removals.add(treePath);
- }
- }
- }
- }
-
- /**
- * Called when a new element is discovered in the tree. The given HashSet
- * will be filled in with all newly discovered leaf nodes.
- *
- * @param treePath
- * @param additions
- */
- private void elementDiscovered(TreePath treePath, HashSet additions) {
- NodeInfo newNode = (NodeInfo) mapElementsOntoNodeInfo.get(treePath);
-
- if (newNode == null) {
- newNode = new NodeInfo(treePath);
- mapElementsOntoNodeInfo.put(treePath, newNode);
- if (newNode.children != null) {
- for (Iterator iter = newNode.children.iterator(); iter
- .hasNext();) {
- Object next = iter.next();
-
- elementDiscovered(treePath.createChildPath(next), additions);
- }
- } else {
- additions.add(treePath);
- }
- } else {
- // If this node was already known, increment the reference count.
- newNode.count++;
- }
- }
-
- protected Set getWrappedSet() {
- return leafNodes;
- }
-
- public Object getElementType() {
- return Object.class;
- }
-
- public void dispose() {
- for (Iterator iter = mapElementsOntoNodeInfo.values().iterator(); iter
- .hasNext();) {
- NodeInfo next = (NodeInfo) iter.next();
-
- if (next.children != null) {
- next.dispose();
- }
- }
-
- mapElementsOntoNodeInfo.clear();
- leafNodes.clear();
- super.dispose();
- }
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/OrderedTreeContentProvider.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/OrderedTreeContentProvider.java
deleted file mode 100644
index abdca3ff..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/OrderedTreeContentProvider.java
+++ /dev/null
@@ -1,433 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jface.internal.databinding.internal.viewers;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.set.AbstractObservableSet;
-import org.eclipse.core.databinding.observable.set.IObservableSet;
-import org.eclipse.core.databinding.observable.set.SetDiff;
-import org.eclipse.core.databinding.observable.tree.IOrderedTreeProvider;
-import org.eclipse.jface.viewers.ITreePathContentProvider;
-import org.eclipse.jface.viewers.ITreeViewerListener;
-import org.eclipse.jface.viewers.TreeExpansionEvent;
-import org.eclipse.jface.viewers.TreePath;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-
-/**
- * Converts an IOrderedTreeProvider into an ITreeContentProvider that is
- * suitable for use with a JFace TreeViewer.
- *
- * <p>
- * This content provider works correctly with trees containing duplicate
- * elements.
- * </p>
- *
- * @since 3.3
- */
-public class OrderedTreeContentProvider implements ITreePathContentProvider {
-
- private HashMap mapElementToTreeNode = new HashMap();
-
- private LinkedList enqueuedPrefetches = new LinkedList();
-
- class KnownElementsSet extends AbstractObservableSet {
-
- /**
- */
- protected KnownElementsSet() {
- super(provider.getRealm());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.internal.databinding.provisional.observable.set.AbstractObservableSet#getWrappedSet()
- */
- protected Set getWrappedSet() {
- return mapElementToTreeNode.keySet();
- }
-
- void doFireDiff(Set added, Set removed) {
- fireSetChange(Diffs.createSetDiff(added, removed));
- }
-
- void doFireStale(boolean isStale) {
- if (isStale) {
- fireStale();
- } else {
- fireSetChange(Diffs.createSetDiff(Collections.EMPTY_SET,
- Collections.EMPTY_SET));
- }
- }
-
- public Object getElementType() {
- return Object.class;
- }
-
- protected void fireSetChange(SetDiff diff) {
- super.fireSetChange(diff);
- }
- }
-
- KnownElementsSet elements;
-
- private ITreeViewerListener expandListener = new ITreeViewerListener() {
- public void treeCollapsed(TreeExpansionEvent event) {
- }
-
- public void treeExpanded(TreeExpansionEvent event) {
- }
- };
-
- private IPrefetchingTree prefetchingTree;
-
- private IOrderedTreeProvider provider;
-
- private Object pendingNode;
-
- private int avoidViewerUpdates;
-
- private TreeViewer treeViewer;
-
- private int staleCount = 0;
-
- private boolean useRefresh;
-
- private int maxPrefetches = -1;
-
- /**
- * Constructs a content provider that will render the given tree in a
- * TreeViewer.
- *
- * @param provider
- * IObservableTree that provides the contents of the tree. The
- * given provider may optionally implement IPrefetchingTree if it
- * wants to selectively enable or disable prefetching from
- * particular nodes.
- * @param pendingNode
- * element to insert whenever a node is being fetched in the
- * background
- */
- public OrderedTreeContentProvider(IOrderedTreeProvider provider,
- Object pendingNode) {
- this(provider, pendingNode, false);
- }
-
- /**
- * Constructs a content provider that will render the given tree in a
- * TreeViewer.
- *
- * @param provider
- * IObservableTree that provides the contents of the tree
- * @param pendingNode
- * element to insert whenever a node is being fetched in the
- * background
- * @param useRefresh
- * true = notify the viewer of changes by calling refresh(...),
- * false = notify the viewer of changes by calling add(...) and
- * remove(...). Using false is more efficient, but may not work
- * with TreeViewer subclasses.
- */
- public OrderedTreeContentProvider(IOrderedTreeProvider provider,
- Object pendingNode, boolean useRefresh) {
- this.provider = provider;
- this.prefetchingTree = PrefetchingTree.getPrefetchingTree(provider);
- this.pendingNode = pendingNode;
- this.useRefresh = useRefresh;
- elements = new KnownElementsSet();
- }
-
- /**
- * Sets the maximum number of pending prefetches.
- *
- * @param maxPrefetches
- */
- public void setMaxPrefetches(int maxPrefetches) {
- this.maxPrefetches = maxPrefetches;
- }
-
- /* package */IObservableList createChildList(TreePath treePath) {
- Object[] segments = new Object[treePath.getSegmentCount()];
- for (int i = 0; i < segments.length; i++) {
- segments[i] = treePath.getSegment(i);
- }
- return provider.createChildList(new org.eclipse.core.internal.databinding.observable.tree.TreePath(segments));
- }
-
- /* package */void remove(Object element, List removals, boolean lastElement) {
- if (avoidViewerUpdates == 0) {
- for (Iterator iter = removals.iterator(); iter.hasNext();) {
- Object next = iter.next();
-
- OrderedTreeNode nextNode = (OrderedTreeNode) mapElementToTreeNode
- .get(next);
- if (nextNode != null) {
- nextNode.removeParent(element);
- removeIfUnused(nextNode);
- }
- }
-
- if (lastElement || useRefresh) {
- treeViewer.refresh(element);
- } else {
- treeViewer.remove(element, removals.toArray());
- }
- }
- }
-
- /* package */void add(TreePath element, List additions) {
- if (avoidViewerUpdates == 0) {
- // Handle new parents
- addParent(element, additions);
- if (useRefresh) {
- treeViewer.refresh(element);
- } else {
- treeViewer.add(element, additions);
- }
- }
- }
-
- /* package */void insert(TreePath element, Object addition, int position) {
- if (avoidViewerUpdates == 0) {
- // Handle new parents
- addParent(element, Collections.singletonList(addition));
- if (useRefresh) {
- treeViewer.refresh(element);
- } else {
- treeViewer.insert(element, addition, position);
- }
- }
- }
-
- /**
- * Ensures that the given set of children have the given parent as one of
- * their parents.
- *
- * @param parentPath
- * @param children
- */
- private void addParent(TreePath parentPath, List children) {
- for (Iterator iter = children.iterator(); iter.hasNext();) {
- Object next = iter.next();
-
- OrderedTreeNode nextNode = getNode(parentPath.createChildPath(next));
- nextNode.addParent(parentPath);
- }
- }
-
- /**
- * Returns the element that should be inserted into the tree when fetching
- * the children of the node that is both stale and empty.
- *
- * @return the element that should be inserted into the tree when fetching
- * the children of a node that is stale and empty
- */
- public final Object getPendingNode() {
- return pendingNode;
- }
-
- /**
- * Returns the IObservableList representing the children of the given node.
- * Never null.
- *
- * @param parent
- * parent element. Must be a valid node from the tree.
- * @return the list of children of the given parent node
- */
- public IObservableList getChildrenList(TreePath parent) {
- IObservableList result = getNode(parent).getChildrenList();
-
- return result;
- }
-
- public void dispose() {
- if (treeViewer != null) {
- try {
- avoidViewerUpdates++;
- enqueuedPrefetches.clear();
- Object[] keys = mapElementToTreeNode.keySet().toArray();
-
- for (int i = 0; i < keys.length; i++) {
- Object key = keys[i];
-
- OrderedTreeNode result = (OrderedTreeNode) mapElementToTreeNode.get(key);
- if (result != null) {
- result.dispose();
- }
- }
- } finally {
- avoidViewerUpdates--;
- }
- }
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- // This should only ever be called for a single viewer
- setViewer(viewer);
-
- if (oldInput != null && newInput != null && oldInput.equals(newInput)) {
- return;
- }
-
- try {
- avoidViewerUpdates++;
- removeIfUnused(oldInput);
- } finally {
- avoidViewerUpdates--;
- }
- }
-
- private void removeIfUnused(Object element) {
- OrderedTreeNode result = (OrderedTreeNode) mapElementToTreeNode
- .get(element);
- if (result != null && result.getParent() == null) {
- mapElementToTreeNode.remove(element);
- elements.doFireDiff(Collections.EMPTY_SET, Collections
- .singleton(element));
- result.dispose();
- }
- }
-
- private void setViewer(Viewer viewer) {
- if (!(viewer instanceof TreeViewer)) {
- throw new IllegalArgumentException(
- "This content provider can only be used with TreeViewers"); //$NON-NLS-1$
- }
- TreeViewer newTreeViewer = (TreeViewer) viewer;
-
- if (newTreeViewer != treeViewer) {
- if (treeViewer != null) {
- treeViewer.removeTreeListener(expandListener);
- }
-
- this.treeViewer = newTreeViewer;
- if (newTreeViewer != null) {
- newTreeViewer.addTreeListener(expandListener);
- }
- }
- }
-
- public Object[] getChildren(TreePath parentElement) {
- List result = getNode(parentElement).getChildren();
-
- addParent(parentElement, result);
-
- return result.toArray();
- }
-
- private OrderedTreeNode getNode(TreePath parentElement) {
- OrderedTreeNode result = (OrderedTreeNode) mapElementToTreeNode
- .get(parentElement);
- if (result == null) {
- result = new OrderedTreeNode(parentElement, this);
- mapElementToTreeNode.put(parentElement, result);
- elements.fireSetChange(Diffs.createSetDiff(Collections
- .singleton(parentElement), Collections.EMPTY_SET));
- }
- return result;
- }
-
- /**
- * Returns the set of all elements that have been discovered in this tree so
- * far. Callers must not dispose this set. Never null.
- *
- * @return the set of all elements that have been discovered in this tree so
- * far.
- */
- public IObservableSet getKnownElements() {
- return elements;
- }
-
- /* package */void changeStale(int staleDelta) {
- staleCount += staleDelta;
- processPrefetches();
- elements.setStale(staleCount != 0);
- }
-
- /**
- * Returns the associated tree viewer.
- *
- * @return the associated tree viewer
- */
- public TreeViewer getViewer() {
- return treeViewer;
- }
-
- /**
- * Returns true iff the given element is stale.
- *
- * @param element
- * the element to query for staleness. Must exist in the tree.
- * @return true iff the given element is stale
- */
- public boolean isDirty(TreePath element) {
- return getChildrenList(element).isStale();
- }
-
- /* package */void enqueuePrefetch(OrderedTreeNode node) {
- if (prefetchingTree.shouldPrefetch(node.getElement())) {
- if (staleCount == 0) {
- // Call node.getChildren()... this will cause us to start
- // listening to the
- // node and will trigger prefetching. Don't call prefetch since
- // this method
- // is intended to be called inside getters (which will simply
- // return the
- // fetched nodes) and prefetch() is intended to be called inside
- // an asyncExec,
- // which will notify the viewer directly of the newly discovered
- // nodes.
- node.getChildren();
- } else {
- enqueuedPrefetches.add(node);
- while (maxPrefetches >= 0
- && enqueuedPrefetches.size() > maxPrefetches) {
- enqueuedPrefetches.removeFirst();
- }
- }
- }
- }
-
- private void processPrefetches() {
- while (staleCount == 0 && !enqueuedPrefetches.isEmpty()) {
- OrderedTreeNode next = (OrderedTreeNode) enqueuedPrefetches.removeLast();
-
- // Note that we don't remove nodes from the prefetch queue when they
- // are disposed,
- // so we may encounter disposed nodes at this time.
- if (!next.isDisposed()) {
- next.prefetch();
- }
- }
- }
-
- public TreePath[] getParents(Object element) {
- return new TreePath[0];
- }
-
- public boolean hasChildren(TreePath path) {
- return getNode(path).shouldShowPlus();
- }
-
- public Object[] getElements(Object inputElement) {
- return getChildren(new TreePath(new Object[]{inputElement}));
- }
-
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/OrderedTreeNode.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/OrderedTreeNode.java
deleted file mode 100644
index 6e54cefc..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/OrderedTreeNode.java
+++ /dev/null
@@ -1,306 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jface.internal.databinding.internal.viewers;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.IStaleListener;
-import org.eclipse.core.databinding.observable.Observables;
-import org.eclipse.core.databinding.observable.StaleEvent;
-import org.eclipse.core.databinding.observable.list.IListChangeListener;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.list.ListChangeEvent;
-import org.eclipse.core.databinding.observable.list.ListDiffEntry;
-import org.eclipse.jface.viewers.TreePath;
-
-/* package */class OrderedTreeNode implements IListChangeListener,
- IStaleListener {
- private OrderedTreeContentProvider contentProvider;
-
- private TreePath element;
-
- // Stores the set of parents (null if there are less than 2)
- private HashSet parents = null;
-
- // Stores one representative parent. If there is more than one parent,
- // the complete set of parents can be found in the parents set.
- Object parent;
-
- /**
- * List of child elements.
- */
- private IObservableList children;
-
- private boolean hasPendingNode = false;
-
- private boolean isStale;
-
- private boolean listeningToChildren = false;
-
- private boolean prefetchEnqueued = false;
-
- /**
- * @param treePath
- * @param cp
- */
- public OrderedTreeNode(TreePath treePath, OrderedTreeContentProvider cp) {
- this.element = treePath;
- this.contentProvider = cp;
- children = contentProvider.createChildList(treePath);
- if (children == null) {
- children = Observables.emptyObservableList(contentProvider.getKnownElements().getRealm());
- listeningToChildren = true;
- }
- hasPendingNode = children.isStale();
- }
-
- /**
- * @param parent
- */
- public void addParent(Object parent) {
- if (this.parent == null) {
- this.parent = parent;
- } else {
- if (parent.equals(this.parent)) {
- return;
- }
- if (parents == null) {
- parents = new HashSet();
- parents.add(this.parent);
- }
- parents.add(parent);
- }
- }
-
- /**
- * @param parent
- */
- public void removeParent(Object parent) {
- if (this.parents != null) {
- parents.remove(parent);
- }
-
- if (parent == this.parent) {
- if (parents == null || parents.isEmpty()) {
- this.parent = null;
- } else {
- this.parent = parents.iterator().next();
- }
- }
-
- if (this.parents != null && this.parents.size() <= 1) {
- this.parents = null;
- }
- }
-
- /**
- * Returns the list of children for this node. If new children are
- * discovered later, they will be added directly to the viewer.
- *
- * @return the list of children of this node
- */
- public List getChildren() {
- if (!listeningToChildren) {
- listeningToChildren = true;
- children.addListChangeListener(this);
- hasPendingNode = children.isEmpty() && children.isStale();
- children.addStaleListener(this);
- updateStale();
- }
-
- // If the child set is stale and empty, show the "pending" node
- if (hasPendingNode) {
- Object pendingNode = contentProvider.getPendingNode();
- return Collections.singletonList(pendingNode);
- }
- return children;
- }
-
- /**
- * @return the observable list of children for this node
- */
- public IObservableList getChildrenList() {
- return children;
- }
-
- private void updateStale() {
- boolean willBeStale = children.isStale();
- if (willBeStale != isStale) {
- isStale = willBeStale;
-
- contentProvider.changeStale(isStale ? 1 : -1);
- }
- }
-
- /**
- * @return whether this node's children will change soon
- */
- public boolean isStale() {
- return isStale;
- }
-
- /**
- * Returns true if the viewer should show a plus sign for expanding this
- * node.
- *
- * @return <code>true</code> if this node has children
- */
- public boolean shouldShowPlus() {
- if (children == null) {
- // if (!hasPendingNode) {
- // hasPendingNode = true;
- // contentProvider.add(element,
- // Collections.singleton(contentProvider.getPendingNode()));
- // }
- return true;
- }
- if (!listeningToChildren && !prefetchEnqueued) {
- prefetchEnqueued = true;
- contentProvider.enqueuePrefetch(this);
- }
- return !listeningToChildren || hasPendingNode || !children.isEmpty();
- }
-
- /**
- * Disposes this node and removes all remaining children.
- */
- public void dispose() {
- if (children != null) {
- if (listeningToChildren) {
- contentProvider.remove(element, children, true);
- children.removeListChangeListener(this);
- children.removeStaleListener(this);
- }
- children.dispose();
- children = null;
-
- if (listeningToChildren && isStale) {
- contentProvider.changeStale(-1);
- }
- }
- }
-
- /**
- * @return <code>true</code> if this node is disposed
- */
- public boolean isDisposed() {
- return children == null;
- }
-
- /**
- * Returns one representative parent, or null if this node is unparented.
- * Use getParents() to get the complete set of known parents.
- *
- * @return a parent node, or <code>null</code>
- */
- public Object getParent() {
- return parent;
- }
-
- /**
- * @return the set of known parent nodes
- */
- public Set getParents() {
- if (parents == null) {
- if (parent == null) {
- return Collections.EMPTY_SET;
- }
- return Collections.singleton(parent);
- }
- return parents;
- }
-
- /**
- * Called when the child set changes. Should not be called directly by the
- * viewer.
- */
- public void handleListChange(ListChangeEvent event) {
- boolean shouldHavePendingNode = children.isEmpty()
- && children.isStale();
-
- List removals = new ArrayList();
- ListDiffEntry[] differences = event.diff.getDifferences();
- for (int i = 0; i < differences.length; i++) {
- ListDiffEntry diffEntry = differences[i];
- if (diffEntry.isAddition()) {
- contentProvider.insert(element, diffEntry.getElement(),
- diffEntry.getPosition());
- } else {
- removals.add(diffEntry.getElement());
- }
- }
-
- // Check if we should add the pending node
- if (shouldHavePendingNode && !hasPendingNode) {
- contentProvider
- .insert(element, contentProvider.getPendingNode(), 0);
- hasPendingNode = true;
- }
-
- // Check if we should remove the pending node
- if (!shouldHavePendingNode && hasPendingNode) {
- removals.add(contentProvider.getPendingNode());
- hasPendingNode = false;
- }
- if (!removals.isEmpty()) {
- contentProvider.remove(element, removals, children.isEmpty()
- && !hasPendingNode);
- }
-
- updateStale();
- }
-
- public void handleStale(StaleEvent event) {
- boolean shouldHavePendingNode = children.isEmpty()
- && children.isStale();
-
- // Check if we should add the pending node
- if (shouldHavePendingNode && !hasPendingNode) {
- hasPendingNode = shouldHavePendingNode;
- contentProvider.insert(element, Collections
- .singletonList(contentProvider.getPendingNode()), 0);
- }
-
- // Check if we should remove the pending node
- if (!shouldHavePendingNode && hasPendingNode) {
- hasPendingNode = shouldHavePendingNode;
- contentProvider.remove(element, Collections
- .singletonList(contentProvider.getPendingNode()), true);
- }
-
- updateStale();
- }
-
- /**
- * @return the element
- */
- public Object getElement() {
- return element;
- }
-
- /**
- *
- */
- public void prefetch() {
- List children = getChildren();
- if (!children.isEmpty()) {
- contentProvider.add(element, children);
- } else {
- // We need to remove the + sign, and adding/removing elements won't
- // do the trick
- contentProvider.getViewer().refresh(element);
- }
- }
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/PrefetchingTree.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/PrefetchingTree.java
deleted file mode 100644
index f21d15dd..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/PrefetchingTree.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jface.internal.databinding.internal.viewers;
-
-
-
-/* package */ class PrefetchingTree implements IPrefetchingTree {
-
- private static IPrefetchingTree instance;
-
- private PrefetchingTree() {
- }
-
- public boolean shouldPrefetch(Object parentNode) {
- return true;
- }
-
- /**
- * @param treeProvider
- * @return a prefetching tree
- */
- public static IPrefetchingTree getPrefetchingTree(Object treeProvider) {
- if (treeProvider instanceof IPrefetchingTree) {
- return (IPrefetchingTree)treeProvider;
- }
- if (instance == null) {
- instance = new PrefetchingTree();
- }
- return instance;
- }
-
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/SelectionProviderSingleSelectionObservableValue.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/SelectionProviderSingleSelectionObservableValue.java
deleted file mode 100644
index 03f37e7e..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/SelectionProviderSingleSelectionObservableValue.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 137877
- * Brad Reynolds - bug 164653
- * Brad Reynolds - bug 147515
- *******************************************************************************/
-
-package org.eclipse.jface.internal.databinding.internal.viewers;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.value.AbstractObservableValue;
-import org.eclipse.jface.util.Util;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-
-/**
- * Observes single selection of an <code>ISelectionProvider</code>.
- *
- * @since 1.1
- */
-public class SelectionProviderSingleSelectionObservableValue extends
- AbstractObservableValue {
-
- private final ISelectionProvider selectionProvider;
-
- private boolean updating = false;
-
- private Object currentSelection;
-
- /**
- * Constructs a new instance associated with the provided
- * <code>selectionProvider</code>. In order to initialize itself properly
- * the constructor invokes {@link #doGetValue()}. This could be dangerous
- * for subclasses, see {@link #doGetValue()} for an explanation.
- * @param realm
- *
- * @param selectionProvider
- * @see #doGetValue()
- */
- public SelectionProviderSingleSelectionObservableValue(Realm realm,
- ISelectionProvider selectionProvider) {
- super(realm);
- if (selectionProvider == null) {
- throw new IllegalArgumentException(
- "The 'selectionProvider' parameter is null."); //$NON-NLS-1$
- }
-
- this.selectionProvider = selectionProvider;
- this.currentSelection = doGetValue();
-
- selectionProvider
- .addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- if (!updating) {
- Object oldSelection = currentSelection;
- currentSelection = doGetValue();
- fireValueChange(Diffs.createValueDiff(oldSelection,
- currentSelection));
- }
- }
- });
- }
-
- /**
- * Sets the selection to the provided <code>value</code>. Value change
- * events are fired after selection is set in the selection provider.
- *
- * @param value
- * object to set as selected, <code>null</code> if wanting to
- * remove selection
- */
- public void doSetValue(final Object value) {
- try {
- updating = true;
-
- Object oldSelection = currentSelection;
- selectionProvider
- .setSelection(value == null ? StructuredSelection.EMPTY
- : new StructuredSelection(value));
- currentSelection = doGetValue();
- if (!Util.equals(oldSelection, currentSelection)) {
- fireValueChange(Diffs.createValueDiff(oldSelection,
- currentSelection));
- }
- } finally {
- updating = false;
- }
- }
-
- /**
- * Retrieves the current selection.
- * <p>
- * If a subclass overrides this method it must not depend upon the subclass
- * to have been fully initialized before this method is invoked.
- * <code>doGetValue()</code> is invoked by the
- * {@link #SelectionProviderSingleSelectionObservableValue(Realm, ISelectionProvider) constructor}
- * which means the subclass's constructor will not have fully executed
- * before this method is invoked.
- * </p>
- *
- * @return selection will be an instance of
- * <code>IStructuredSelection</code> if a selection exists,
- * <code>null</code> if no selection
- * @see #SelectionProviderSingleSelectionObservableValue(Realm, ISelectionProvider)
- */
- protected Object doGetValue() {
- ISelection selection = selectionProvider.getSelection();
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection sel = (IStructuredSelection) selection;
- return sel.getFirstElement();
- }
-
- return null;
- }
-
- public Object getValueType() {
- return null;
- }
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/UnorderedTreeContentProvider.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/UnorderedTreeContentProvider.java
deleted file mode 100644
index 12af4a81..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/UnorderedTreeContentProvider.java
+++ /dev/null
@@ -1,422 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jface.internal.databinding.internal.viewers;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.set.AbstractObservableSet;
-import org.eclipse.core.databinding.observable.set.IObservableSet;
-import org.eclipse.core.databinding.observable.set.SetDiff;
-import org.eclipse.core.databinding.observable.tree.IUnorderedTreeProvider;
-import org.eclipse.jface.viewers.ITreePathContentProvider;
-import org.eclipse.jface.viewers.ITreeViewerListener;
-import org.eclipse.jface.viewers.TreeExpansionEvent;
-import org.eclipse.jface.viewers.TreePath;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-
-/**
- * Converts an ITreeProvider into an ITreeContentProvider that is suitable for
- * use with a JFace TreeViewer.
- *
- * <p>
- * This content provider works correctly with trees containing duplicate
- * elements.
- * </p>
- *
- * @since 3.3
- */
-public class UnorderedTreeContentProvider implements ITreePathContentProvider {
-
- private HashMap mapElementToTreeNode = new HashMap();
-
- private LinkedList enqueuedPrefetches = new LinkedList();
-
- class KnownElementsSet extends AbstractObservableSet {
-
- /**
- */
- protected KnownElementsSet() {
- super(provider.getRealm());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.internal.databinding.provisional.observable.set.AbstractObservableSet#getWrappedSet()
- */
- protected Set getWrappedSet() {
- return mapElementToTreeNode.keySet();
- }
-
- void doFireDiff(Set added, Set removed) {
- fireSetChange(Diffs.createSetDiff(added, removed));
- }
-
- void doFireStale(boolean isStale) {
- if (isStale) {
- fireStale();
- } else {
- fireSetChange(Diffs.createSetDiff(Collections.EMPTY_SET,
- Collections.EMPTY_SET));
- }
- }
-
- public Object getElementType() {
- return new Object();
- }
-
- protected void fireSetChange(SetDiff diff) {
- super.fireSetChange(diff);
- }
- }
-
- KnownElementsSet elements;
-
- private ITreeViewerListener expandListener = new ITreeViewerListener() {
- public void treeCollapsed(TreeExpansionEvent event) {
- }
-
- public void treeExpanded(TreeExpansionEvent event) {
- }
- };
-
- private IPrefetchingTree prefetchingTree;
-
- private IUnorderedTreeProvider provider;
-
- private Object pendingNode;
-
- private int avoidViewerUpdates;
-
- private TreeViewer treeViewer;
-
- private int staleCount = 0;
-
- private boolean useRefresh;
-
- private int maxPrefetches = -1;
-
- /**
- * Constructs a content provider that will render the given tree in a
- * TreeViewer.
- *
- * @param provider
- * IObservableTree that provides the contents of the tree. The
- * given provider map optionally implement IPrefetchingTree if it
- * wants to selectively enable or disable prefetching from
- * particular nodes.
- * @param pendingNode
- * element to insert whenever a node is being fetched in the
- * background
- */
- public UnorderedTreeContentProvider(IUnorderedTreeProvider provider,
- Object pendingNode) {
- this(provider, pendingNode, false);
- }
-
- /**
- * Constructs a content provider that will render the given tree in a
- * TreeViewer.
- *
- * @param provider
- * IObservableTree that provides the contents of the tree
- * @param pendingNode
- * element to insert whenever a node is being fetched in the
- * background
- * @param useRefresh
- * true = notify the viewer of changes by calling refresh(...),
- * false = notify the viewer of changes by calling add(...) and
- * remove(...). Using false is more efficient, but may not work
- * with TreeViewer subclasses.
- */
- public UnorderedTreeContentProvider(IUnorderedTreeProvider provider,
- Object pendingNode, boolean useRefresh) {
- this.provider = provider;
- this.prefetchingTree = PrefetchingTree.getPrefetchingTree(provider);
- this.pendingNode = pendingNode;
- this.useRefresh = useRefresh;
- elements = new KnownElementsSet();
- }
-
- /**
- * Sets the maximum number of pending prefetches.
- *
- * @param maxPrefetches
- */
- public void setMaxPrefetches(int maxPrefetches) {
- this.maxPrefetches = maxPrefetches;
- }
-
- /* package */IObservableSet createChildSet(TreePath treePath) {
- Object[] segments = new Object[treePath.getSegmentCount()];
- for (int i = 0; i < segments.length; i++) {
- segments[i] = treePath.getSegment(i);
- }
- return provider
- .createChildSet(new org.eclipse.core.internal.databinding.observable.tree.TreePath(
- segments));
- }
-
- /* package */void remove(Object element, Set removals, boolean lastElement) {
- if (avoidViewerUpdates == 0) {
- for (Iterator iter = removals.iterator(); iter.hasNext();) {
- Object next = iter.next();
-
- UnorderedTreeNode nextNode = (UnorderedTreeNode) mapElementToTreeNode
- .get(next);
- if (nextNode != null) {
- nextNode.removeParent(element);
- removeIfUnused(nextNode);
- }
- }
-
- if (lastElement || useRefresh) {
- treeViewer.refresh(element);
- } else {
- treeViewer.remove(element, removals.toArray());
- }
- }
- }
-
- /* package */void add(TreePath treePath, Set additions) {
- if (avoidViewerUpdates == 0) {
- // Handle new parents
- addParent(treePath, additions);
- if (useRefresh) {
- treeViewer.refresh(treePath);
- } else {
- treeViewer.add(treePath, additions.toArray());
- }
- }
- }
-
- /**
- * Ensures that the given set of children have the given parent as one of
- * their parents.
- *
- * @param parent
- * @param children
- */
- private void addParent(TreePath parent, Set children) {
- for (Iterator iter = children.iterator(); iter.hasNext();) {
- Object next = iter.next();
-
- UnorderedTreeNode nextNode = getNode(parent.createChildPath(next));
- nextNode.addParent(parent);
- }
- }
-
- /**
- * Returns the element that should be inserted into the tree when fetching
- * the children of the node that is both stale and empty.
- *
- * @return the element that should be inserted into the tree when fetching
- * the children of a node that is stale and empty
- */
- public final Object getPendingNode() {
- return pendingNode;
- }
-
- /**
- * Returns the IObservableSet representing the children of the given node.
- * Never null.
- *
- * @param parent
- * parent element. Must be a valid node from the tree.
- * @return the set of children of the given parent node
- */
- public IObservableSet getChildrenSet(TreePath parent) {
- IObservableSet result = getNode(parent).getChildrenSet();
-
- return result;
- }
-
- public void dispose() {
- if (treeViewer != null) {
- try {
- avoidViewerUpdates++;
- enqueuedPrefetches.clear();
- Object[] keys = mapElementToTreeNode.keySet().toArray();
-
- for (int i = 0; i < keys.length; i++) {
- Object key = keys[i];
-
- UnorderedTreeNode result = (UnorderedTreeNode) mapElementToTreeNode
- .get(key);
- if (result != null) {
- result.dispose();
- }
- }
- } finally {
- avoidViewerUpdates--;
- }
- }
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- // This should only ever be called for a single viewer
- setViewer(viewer);
-
- if (oldInput != null && newInput != null && oldInput.equals(newInput)) {
- return;
- }
-
- try {
- avoidViewerUpdates++;
- removeIfUnused(oldInput);
- } finally {
- avoidViewerUpdates--;
- }
- }
-
- private void removeIfUnused(Object element) {
- UnorderedTreeNode result = (UnorderedTreeNode) mapElementToTreeNode
- .get(element);
- if (result != null && result.getParent() == null) {
- mapElementToTreeNode.remove(element);
- elements.doFireDiff(Collections.EMPTY_SET, Collections
- .singleton(element));
- result.dispose();
- }
- }
-
- private void setViewer(Viewer viewer) {
- if (!(viewer instanceof TreeViewer)) {
- throw new IllegalArgumentException(
- "This content provider can only be used with TreeViewers"); //$NON-NLS-1$
- }
- TreeViewer newTreeViewer = (TreeViewer) viewer;
-
- if (newTreeViewer != treeViewer) {
- if (treeViewer != null) {
- treeViewer.removeTreeListener(expandListener);
- }
-
- this.treeViewer = newTreeViewer;
- if (newTreeViewer != null) {
- newTreeViewer.addTreeListener(expandListener);
- }
- }
- }
-
- public Object[] getChildren(TreePath parentPath) {
- Set result = getNode(parentPath).getChildren();
-
- addParent(parentPath, result);
-
- return result.toArray();
- }
-
- private UnorderedTreeNode getNode(TreePath parentPath) {
- UnorderedTreeNode result = (UnorderedTreeNode) mapElementToTreeNode
- .get(parentPath);
- if (result == null) {
- result = new UnorderedTreeNode(parentPath, this);
- mapElementToTreeNode.put(parentPath, result);
- elements.fireSetChange(Diffs.createSetDiff(Collections
- .singleton(parentPath), Collections.EMPTY_SET));
- }
- return result;
- }
-
- public TreePath[] getParents(Object element) {
- return new TreePath[0];
- }
-
- public boolean hasChildren(TreePath element) {
- return getNode(element).shouldShowPlus();
- }
-
- public Object[] getElements(Object inputElement) {
- return getChildren(new TreePath(new Object[]{inputElement}));
- }
-
- /**
- * Returns the set of all elements that have been discovered in this tree so
- * far. Callers must not dispose this set. Never null.
- *
- * @return the set of all elements that have been discovered in this tree so
- * far.
- */
- public IObservableSet getKnownElements() {
- return elements;
- }
-
- /* package */void changeStale(int staleDelta) {
- staleCount += staleDelta;
- processPrefetches();
- elements.setStale(staleCount != 0);
- }
-
- /**
- * Returns the associated tree viewer.
- *
- * @return the associated tree viewer
- */
- public TreeViewer getViewer() {
- return treeViewer;
- }
-
- /**
- * Returns true iff the given element is stale.
- *
- * @param element
- * the element to query for staleness. Must exist in the tree.
- * @return true iff the given element is stale
- */
- public boolean isDirty(TreePath element) {
- return getChildrenSet(element).isStale();
- }
-
- /* package */void enqueuePrefetch(UnorderedTreeNode node) {
- if (prefetchingTree.shouldPrefetch(node.getElement())) {
- if (staleCount == 0) {
- // Call node.getChildren()... this will cause us to start
- // listening to the
- // node and will trigger prefetching. Don't call prefetch since
- // this method
- // is intended to be called inside getters (which will simply
- // return the
- // fetched nodes) and prefetch() is intended to be called inside
- // an asyncExec,
- // which will notify the viewer directly of the newly discovered
- // nodes.
- node.getChildren();
- } else {
- enqueuedPrefetches.add(node);
- while (maxPrefetches >= 0
- && enqueuedPrefetches.size() > maxPrefetches) {
- enqueuedPrefetches.removeFirst();
- }
- }
- }
- }
-
- private void processPrefetches() {
- while (staleCount == 0 && !enqueuedPrefetches.isEmpty()) {
- UnorderedTreeNode next = (UnorderedTreeNode) enqueuedPrefetches
- .removeLast();
-
- // Note that we don't remove nodes from the prefetch queue when they
- // are disposed,
- // so we may encounter disposed nodes at this time.
- if (!next.isDisposed()) {
- next.prefetch();
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/UnorderedTreeNode.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/UnorderedTreeNode.java
deleted file mode 100644
index 317fecc5..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/viewers/UnorderedTreeNode.java
+++ /dev/null
@@ -1,288 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jface.internal.databinding.internal.viewers;
-
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.IStaleListener;
-import org.eclipse.core.databinding.observable.Observables;
-import org.eclipse.core.databinding.observable.StaleEvent;
-import org.eclipse.core.databinding.observable.set.IObservableSet;
-import org.eclipse.core.databinding.observable.set.ISetChangeListener;
-import org.eclipse.core.databinding.observable.set.SetChangeEvent;
-import org.eclipse.jface.viewers.TreePath;
-
-/* package */ class UnorderedTreeNode implements ISetChangeListener, IStaleListener {
- private UnorderedTreeContentProvider contentProvider;
- private TreePath treePath;
-
- // Stores the set of parents (null if there are less than 2)
- private HashSet parents = null;
-
- // Stores one representative parent. If there is more than one parent,
- // the complete set of parents can be found in the parents set.
- Object parent;
-
- /**
- * Set of child elements.
- */
- private IObservableSet children;
-
- private boolean hasPendingNode = false;
- private boolean isStale;
- private boolean listeningToChildren = false;
- private boolean prefetchEnqueued = false;
-
- /**
- * @param element
- * @param cp
- */
- public UnorderedTreeNode(TreePath element, UnorderedTreeContentProvider cp) {
- this.treePath = element;
- this.contentProvider = cp;
- children = contentProvider.createChildSet(element);
- if (children == null) {
- children = Observables.emptyObservableSet(contentProvider.getKnownElements().getRealm());
- listeningToChildren = true;
- }
- hasPendingNode = children.isStale();
- }
-
- /**
- * @param parent
- */
- public void addParent(Object parent) {
- if (this.parent == null) {
- this.parent = parent;
- } else {
- if (parent.equals(this.parent)) {
- return;
- }
- if (parents == null) {
- parents = new HashSet();
- parents.add(this.parent);
- }
- parents.add(parent);
- }
- }
-
- /**
- * @param parent
- */
- public void removeParent(Object parent) {
- if (this.parents != null) {
- parents.remove(parent);
- }
-
- if (parent == this.parent) {
- if (parents == null || parents.isEmpty()) {
- this.parent = null;
- } else {
- this.parent = parents.iterator().next();
- }
- }
-
- if (this.parents != null && this.parents.size() <= 1) {
- this.parents = null;
- }
- }
-
- /**
- * Returns the set of children for this node. If new children are discovered later, they
- * will be added directly to the viewer.
- *
- * @return the set of children
- */
- public Set getChildren() {
- if (!listeningToChildren) {
- listeningToChildren = true;
- children.addSetChangeListener(this);
- hasPendingNode = children.isEmpty() && children.isStale();
- children.addStaleListener(this);
- updateStale();
- }
-
- // If the child set is stale and empty, show the "pending" node
- if (hasPendingNode) {
- Object pendingNode = contentProvider.getPendingNode();
- return Collections.singleton(pendingNode);
- }
- return children;
- }
-
- /**
- * @return the observable set of children
- */
- public IObservableSet getChildrenSet() {
- return children;
- }
-
- private void updateStale() {
- boolean willBeStale = children.isStale();
- if (willBeStale != isStale) {
- isStale = willBeStale;
-
- contentProvider.changeStale(isStale? 1 : -1);
- }
- }
-
- /**
- * @return <code>true</code> if the children of this node will change soon
- */
- public boolean isStale() {
- return isStale;
- }
-
- /**
- * Returns true if the viewer should show a plus sign for expanding this
- * node.
- *
- * @return <code>true</code> if this node may have children
- */
- public boolean shouldShowPlus() {
- if (children == null) {
-// if (!hasPendingNode) {
-// hasPendingNode = true;
-// contentProvider.add(element, Collections.singleton(contentProvider.getPendingNode()));
-// }
- return true;
- }
- if (!listeningToChildren && !prefetchEnqueued) {
- prefetchEnqueued = true;
- contentProvider.enqueuePrefetch(this);
- }
- return !listeningToChildren || hasPendingNode || !children.isEmpty();
- }
-
- /**
- * Disposes this node and removes all remaining children.
- */
- public void dispose() {
- if (children != null) {
- if (listeningToChildren) {
- contentProvider.remove(treePath, children, true);
- children.removeSetChangeListener(this);
- children.removeStaleListener(this);
- }
- children.dispose();
- children = null;
-
- if (listeningToChildren && isStale) {
- contentProvider.changeStale(-1);
- }
- }
- }
-
- /**
- * @return <code>true</code> if this node is disposed
- */
- public boolean isDisposed() {
- return children == null;
- }
-
- /**
- * Returns one representative parent, or null if this node is unparented. Use
- * getParents() to get the complete set of known parents.
- *
- * @return a parent node, or null
- */
- public Object getParent() {
- return parent;
- }
-
- /**
- * @return the set of known parent nodes
- */
- public Set getParents() {
- if (parents == null) {
- if (parent == null) {
- return Collections.EMPTY_SET;
- }
- return Collections.singleton(parent);
- }
- return parents;
- }
-
- /**
- * Called when the child set changes. Should not be called directly by the viewer.
- */
- public void handleSetChange(SetChangeEvent event) {
- boolean shouldHavePendingNode = children.isEmpty() && children.isStale();
-
- Set additions = event.diff.getAdditions();
- // Check if we should add the pending node
- if (shouldHavePendingNode && !hasPendingNode) {
- HashSet newAdditions = new HashSet();
- newAdditions.addAll(additions);
- newAdditions.add(contentProvider.getPendingNode());
- additions = newAdditions;
- hasPendingNode = true;
- }
-
- Set removals = event.diff.getRemovals();
- // Check if we should remove the pending node
- if (!shouldHavePendingNode && hasPendingNode) {
- HashSet newRemovals = new HashSet();
- newRemovals.addAll(removals);
- newRemovals.add(contentProvider.getPendingNode());
- removals = newRemovals;
- hasPendingNode = false;
- }
- if (!additions.isEmpty()) {
- contentProvider.add(treePath, additions);
- }
- if (!removals.isEmpty()) {
- contentProvider.remove(treePath, removals, children.isEmpty() && !hasPendingNode);
- }
-
- updateStale();
- }
-
- public void handleStale(StaleEvent event) {
- boolean shouldHavePendingNode = children.isEmpty() && children.isStale();
-
- // Check if we should add the pending node
- if (shouldHavePendingNode && !hasPendingNode) {
- hasPendingNode = shouldHavePendingNode;
- contentProvider.add(treePath, Collections.singleton(contentProvider.getPendingNode()));
- }
-
- // Check if we should remove the pending node
- if (!shouldHavePendingNode && hasPendingNode) {
- hasPendingNode = shouldHavePendingNode;
- contentProvider.remove(treePath, Collections.singleton(contentProvider.getPendingNode()), true);
- }
-
- updateStale();
- }
-
- /**
- * @return the element
- */
- public Object getElement() {
- return treePath;
- }
-
- /**
- *
- */
- public void prefetch() {
- Set children = getChildren();
- if (!children.isEmpty()) {
- contentProvider.add(treePath, children);
- } else {
- // We need to remove the + sign, and adding/removing elements won't do the trick
- contentProvider.getViewer().refresh(treePath);
- }
- }
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/AbstractSWTObservableValue.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/AbstractSWTObservableValue.java
deleted file mode 100644
index f01cadf3..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/AbstractSWTObservableValue.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 The Pampered Chef, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * The Pampered Chef, Inc. - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.internal.databinding.provisional.swt;
-
-import org.eclipse.core.databinding.observable.value.AbstractObservableValue;
-import org.eclipse.jface.databinding.swt.ISWTObservableValue;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.widgets.Widget;
-
-/**
- * An abstract superclass for observable values that gurantees that the
- * observable will be disposed when the control to which it is attached is
- * disposed.
- *
- * @since 3.3
- */
-public abstract class AbstractSWTObservableValue extends AbstractObservableValue implements ISWTObservableValue {
-
- private final Widget widget;
-
- /**
- * Standard constructor for an SWT ObservableValue. Makes sure that
- * the observable gets disposed when the SWT widget is disposed.
- *
- * @param widget
- */
- protected AbstractSWTObservableValue(Widget widget) {
- super(SWTObservables.getRealm(widget.getDisplay()));
- this.widget = widget;
- widget.addDisposeListener(disposeListener);
- }
-
- private DisposeListener disposeListener = new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- AbstractSWTObservableValue.this.dispose();
- }
- };
-
- /**
- * @return Returns the widget.
- */
- public Widget getWidget() {
- return widget;
- }
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/AbstractSWTVetoableValue.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/AbstractSWTVetoableValue.java
deleted file mode 100644
index eea29feb..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/AbstractSWTVetoableValue.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 The Pampered Chef, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * The Pampered Chef, Inc. - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.internal.databinding.provisional.swt;
-
-import org.eclipse.core.databinding.observable.value.AbstractVetoableValue;
-import org.eclipse.jface.databinding.swt.ISWTObservableValue;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.widgets.Widget;
-
-/**
- * An abstract superclass for vetoable values that gurantees that the
- * observable will be disposed when the control to which it is attached is
- * disposed.
- *
- * @since 3.3
- */
-public abstract class AbstractSWTVetoableValue extends AbstractVetoableValue implements ISWTObservableValue {
-
- private final Widget widget;
-
- /**
- * Standard constructor for an SWT VetoableValue. Makes sure that
- * the observable gets disposed when the SWT widget is disposed.
- *
- * @param widget
- */
- protected AbstractSWTVetoableValue(Widget widget) {
- super(SWTObservables.getRealm(widget.getDisplay()));
- this.widget = widget;
- if (widget == null) {
- throw new IllegalArgumentException("The widget parameter is null."); //$NON-NLS-1$
- }
- widget.addDisposeListener(disposeListener);
- }
-
- private DisposeListener disposeListener = new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- AbstractSWTVetoableValue.this.dispose();
- }
- };
-
- /**
- * @return Returns the widget.
- */
- public Widget getWidget() {
- return widget;
- }
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/ControlUpdater.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/ControlUpdater.java
deleted file mode 100644
index a718c9f1..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/ControlUpdater.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jface.internal.databinding.provisional.swt;
-
-import org.eclipse.core.databinding.observable.ChangeEvent;
-import org.eclipse.core.databinding.observable.IChangeListener;
-import org.eclipse.core.databinding.observable.IObservable;
-import org.eclipse.core.databinding.observable.ObservableTracker;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * A ControlUpdater updates an SWT control in response to changes in the model.
- * By wrapping a block of code in a ControlUpdater, clients can rely on the fact
- * that the block of code will be re-executed whenever anything changes in the
- * model that might affect its behavior.
- *
- * <p>
- * ControlUpdaters only execute when their controls are visible. If something changes
- * in the model while the control is invisible, the updator is flagged as dirty and
- * the updator stops listening to the model until the next time the control repaints.
- * This saves CPU cycles by deferring UI updates to widgets that are currently invisible.
- * </p>
- *
- * <p>
- * Clients should subclass this when copying information from the model to
- * a control. Typical usage:
- * </p>
- *
- * <ul>
- * <li>Override updateControl. It should do whatever is necessary to display
- * the contents of the model in the control.</li>
- * <li>In the constructor, attach listeners to the model. The listeners should
- * call markDirty whenever anything changes in the model that affects
- * updateControl. Note: this step can be omitted when calling any method
- * tagged with "@TrackedGetter" since ControlUpdater will automatically attach
- * a listener to any object if a "@TrackedGetter" method is called in
- * updateControl.</li>
- * <li>(optional)Extend dispose() to remove any listeners attached in the constructor</li>
- * </ul>
- *
- * <p>
- * Example:
- * </p>
- *
- * <code>
- * // Displays an observable value in a label and keeps the label in synch with changes
- * // in the value.
- * IReadableValue someValue = ...
- * final Label myLabel = new Label(parent, SWT.NONE);
- * new ControlUpdater(myLabel) {
- * protected void updateControl() {
- * myLabel.setText(someValue.getValue().toString);
- * }
- * }
- * // myLabel will display the value of someValue the next time it repaints, and will automatically
- * // be updated whenever someValue changes and the label is visible
- * </code>
- *
- * @since 1.0
- */
-public abstract class ControlUpdater {
-
- private class PrivateInterface implements PaintListener,
- DisposeListener, Runnable, IChangeListener {
-
- // PaintListener implementation
- public void paintControl(PaintEvent e) {
- updateIfNecessary();
- }
-
- // DisposeListener implementation
- public void widgetDisposed(DisposeEvent e) {
- ControlUpdater.this.dispose();
- }
-
- // Runnable implementation. This method runs at most once per repaint whenever the
- // value gets marked as dirty.
- public void run() {
- if (theControl != null && !theControl.isDisposed() && theControl.isVisible()) {
- updateIfNecessary();
- }
- }
-
- // IChangeListener implementation (listening to the ComputedValue)
- public void handleChange(ChangeEvent event) {
- // Whenever this updator becomes dirty, schedule the run() method
- makeDirty();
- }
-
- }
-
- private Runnable updateRunnable = new Runnable() {
- public void run() {
- updateControl();
- }
- };
-
- private PrivateInterface privateInterface = new PrivateInterface();
- private Control theControl;
- private IObservable[] dependencies = new IObservable[0];
- private boolean dirty = false;
-
- /**
- * Creates an updator for the given control.
- *
- * @param toUpdate control to update
- */
- public ControlUpdater(Control toUpdate) {
- theControl = toUpdate;
-
- theControl.addDisposeListener(privateInterface);
- theControl.addPaintListener(privateInterface);
- makeDirty();
- }
-
- private void updateIfNecessary() {
- if (dirty) {
- dependencies = ObservableTracker.runAndMonitor(updateRunnable, privateInterface, null);
- dirty = false;
- }
- }
-
- /**
- * This is called automatically when the control is disposed. It may also
- * be called explicitly to remove this updator from the control. Subclasses
- * will normally extend this method to detach any listeners they attached
- * in their constructor.
- */
- public void dispose() {
- theControl.removeDisposeListener(privateInterface);
- theControl.removePaintListener(privateInterface);
-
- stopListening();
- }
-
- private void stopListening() {
- // Stop listening for dependency changes
- for (int i = 0; i < dependencies.length; i++) {
- IObservable observable = dependencies[i];
-
- observable.removeChangeListener(privateInterface);
- }
- }
-
- /**
- * Updates the control. This method will be invoked once after the
- * updator is created, and once before any repaint during which the
- * control is visible and dirty.
- *
- * <p>
- * Subclasses should overload this method to provide any code that
- * changes the appearance of the widget.
- * </p>
- */
- protected abstract void updateControl();
-
- /**
- * Marks this updator as dirty. Causes the updateControl method to
- * be invoked before the next time the control is repainted.
- */
- protected final void makeDirty() {
- if (!dirty) {
- dirty = true;
- stopListening();
- SWTUtil.runOnce(theControl.getDisplay(), privateInterface);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/MenuUpdater.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/MenuUpdater.java
deleted file mode 100644
index f614bae9..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/MenuUpdater.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jface.internal.databinding.provisional.swt;
-
-import org.eclipse.core.databinding.observable.ChangeEvent;
-import org.eclipse.core.databinding.observable.IChangeListener;
-import org.eclipse.core.databinding.observable.IObservable;
-import org.eclipse.core.databinding.observable.ObservableTracker;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.MenuEvent;
-import org.eclipse.swt.events.MenuListener;
-import org.eclipse.swt.widgets.Menu;
-
-/**
- * A MenuUpdater updates an SWT menu in response to changes in the model. By
- * wrapping a block of code in a MenuUpdater, clients can rely on the fact that
- * the block of code will be re-executed whenever anything changes in the model
- * that might affect its behavior.
- *
- * <p>
- * MenuUpdaters only execute once their menus are shown. If something changes in
- * the model, the updater is flagged as dirty and it stops listening to the
- * model until the next time the menu is shown. If the menu is visible while the
- * model changes, it will be updated right away.
- * </p>
- *
- * <p>
- * Clients should subclass this when copying information from the model to a
- * menu. Typical usage:
- * </p>
- *
- * <ul>
- * <li>Override updateMenu. It should do whatever is necessary to display the
- * contents of the model in the menu.</li>
- * <li>In the constructor, attach listeners to the model. The listeners should
- * call markDirty whenever anything changes in the model that affects
- * updateMenu. Note: this step can be omitted when calling any method tagged
- * with "@TrackedGetter" since MenuUpdater will automatically attach a listener
- * to any object if a "@TrackedGetter" method is called in updateMenu.</li>
- * <li>(optional)Extend dispose() to remove any listeners attached in the
- * constructor</li>
- * </ul>
- *
- * @since 1.1
- */
-public abstract class MenuUpdater {
-
- private class PrivateInterface implements MenuListener,
- DisposeListener, Runnable, IChangeListener {
-
- // DisposeListener implementation
- public void widgetDisposed(DisposeEvent e) {
- MenuUpdater.this.dispose();
- }
-
- // Runnable implementation. This method runs at most once per repaint whenever the
- // value gets marked as dirty.
- public void run() {
- if (theMenu != null && !theMenu.isDisposed() && theMenu.isVisible()) {
- updateIfNecessary();
- }
- }
-
- // IChangeListener implementation (listening to the ComputedValue)
- public void handleChange(ChangeEvent event) {
- // Whenever this updator becomes dirty, schedule the run() method
- makeDirty();
- }
-
- public void menuHidden(MenuEvent e) {
- // do nothing
- }
-
- public void menuShown(MenuEvent e) {
- updateIfNecessary();
- }
-
- }
-
- private Runnable updateRunnable = new Runnable() {
- public void run() {
- updateMenu();
- }
- };
-
- private PrivateInterface privateInterface = new PrivateInterface();
- private Menu theMenu;
- private IObservable[] dependencies = new IObservable[0];
- private boolean dirty = false;
-
- /**
- * Creates an updator for the given menu.
- *
- * @param toUpdate menu to update
- */
- public MenuUpdater(Menu toUpdate) {
- theMenu = toUpdate;
-
- theMenu.addDisposeListener(privateInterface);
- theMenu.addMenuListener(privateInterface);
- makeDirty();
- }
-
- private void updateIfNecessary() {
- if (dirty) {
- dependencies = ObservableTracker.runAndMonitor(updateRunnable, privateInterface, null);
- dirty = false;
- }
- }
-
- /**
- * This is called automatically when the menu is disposed. It may also
- * be called explicitly to remove this updator from the menu. Subclasses
- * will normally extend this method to detach any listeners they attached
- * in their constructor.
- */
- public void dispose() {
- theMenu.removeDisposeListener(privateInterface);
- theMenu.removeMenuListener(privateInterface);
-
- stopListening();
- }
-
- private void stopListening() {
- // Stop listening for dependency changes
- for (int i = 0; i < dependencies.length; i++) {
- IObservable observable = dependencies[i];
-
- observable.removeChangeListener(privateInterface);
- }
- }
-
- /**
- * Updates the menu. This method will be invoked once after the
- * updater is created, and once for any SWT.Show event if this
- * updater is marked as dirty at that time.
- *
- * <p>
- * Subclasses should overload this method to provide any code that
- * udates the menu.
- * </p>
- */
- protected abstract void updateMenu();
-
- /**
- * Marks this updator as dirty. Causes the updateControl method to
- * be invoked before the next time the control is repainted.
- */
- protected final void makeDirty() {
- if (!dirty) {
- dirty = true;
- stopListening();
- SWTUtil.runOnce(theMenu.getDisplay(), privateInterface);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/SWTUtil.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/SWTUtil.java
deleted file mode 100644
index b0c2512d..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/SWTUtil.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jface.internal.databinding.provisional.swt;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.jface.util.SafeRunnable;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * @since 1.0
- */
-public class SWTUtil {
- /**
- * Stores a work queue for each display
- */
- private static Map mapDisplayOntoWorkQueue = new HashMap();
-
- private SWTUtil() {
- }
-
- /**
- * Runs the given runnable on the given display as soon as possible. If
- * possible, the runnable will be executed before the next widget is
- * repainted, but this behavior is not guaranteed. Use this method to
- * schedule work will affect the way one or more widgets are drawn.
- *
- * <p>
- * This is threadsafe.
- * </p>
- *
- * @param d
- * display
- * @param r
- * runnable to execute in the UI thread.
- */
- public static void greedyExec(Display d, Runnable r) {
- if (d.isDisposed()) {
- return;
- }
-
- // if (Display.getCurrent() == d) {
- // r.run();
- // } else {
- WorkQueue queue = getQueueFor(d);
- queue.asyncExec(r);
- // }
- }
-
- /**
- * Runs the given runnable on the given display as soon as possible. Unlike
- * greedyExec, this has no effect if the given runnable has already been
- * scheduled for execution. Use this method to schedule work that will
- * affect the way one or more wigdets are drawn, but that should only happen
- * once.
- *
- * <p>
- * This is threadsafe.
- * </p>
- *
- * @param d
- * display
- * @param r
- * runnable to execute in the UI thread. Has no effect if the
- * given runnable has already been scheduled but has not yet run.
- */
- public static void runOnce(Display d, Runnable r) {
- if (d.isDisposed()) {
- return;
- }
- WorkQueue queue = getQueueFor(d);
- queue.runOnce(r);
- }
-
- /**
- * Cancels a greedyExec or runOnce that was previously scheduled on the
- * given display. Has no effect if the given runnable is not in the queue
- * for the given display
- *
- * @param d
- * target display
- * @param r
- * runnable to execute
- */
- public static void cancelExec(Display d, Runnable r) {
- if (d.isDisposed()) {
- return;
- }
- WorkQueue queue = getQueueFor(d);
- queue.cancelExec(r);
- }
-
- /**
- * Returns the work queue for the given display. Creates a work queue if
- * none exists yet.
- *
- * @param d
- * display to return queue for
- * @return a work queue (never null)
- */
- private static WorkQueue getQueueFor(final Display d) {
- WorkQueue result;
- synchronized (mapDisplayOntoWorkQueue) {
- // Look for existing queue
- result = (WorkQueue) mapDisplayOntoWorkQueue.get(d);
-
- if (result == null) {
- // If none, create new queue
- result = new WorkQueue(d);
- final WorkQueue q = result;
- mapDisplayOntoWorkQueue.put(d, result);
- d.asyncExec(new Runnable() {
- public void run() {
- d.disposeExec(new Runnable() {
- public void run() {
- synchronized (mapDisplayOntoWorkQueue) {
- q.cancelAll();
- mapDisplayOntoWorkQueue.remove(d);
- }
- }
- });
- }
- });
- }
- return result;
- }
- }
-
- /**
- * @param rgb1
- * @param rgb2
- * @param ratio
- * @return the RGB object
- */
- public static RGB mix(RGB rgb1, RGB rgb2, double ratio) {
- return new RGB(interp(rgb1.red, rgb2.red, ratio),
- interp(rgb1.green, rgb2.green, ratio),
- interp(rgb1.blue, rgb2.blue, ratio));
- }
-
- private static int interp(int i1, int i2, double ratio) {
- int result = (int)(i1 * ratio + i2 * (1.0d - ratio));
- if (result < 0) result = 0;
- if (result > 255) result = 255;
- return result;
- }
-
- /**
- * Logs an exception as though it was thrown by a SafeRunnable
- * being run with the default ISafeRunnableRunner. Will not
- * open modal dialogs or spin the event loop.
- *
- * @param t throwable to log
- */
- public static void logException(final Exception t) {
- SafeRunnable.run(new SafeRunnable() {
- public void run() throws Exception {
- throw t;
- }
- public void handleException(Throwable e) {
- // IMPORTANT: Do not call the super implementation, since
- // it opens a modal dialog, and may cause *syncExecs to run
- // too early.
- }
- });
- }
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/TableUpdater.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/TableUpdater.java
deleted file mode 100644
index db93d7dc..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/TableUpdater.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jface.internal.databinding.provisional.swt;
-
-import org.eclipse.core.databinding.observable.ChangeEvent;
-import org.eclipse.core.databinding.observable.IChangeListener;
-import org.eclipse.core.databinding.observable.IObservable;
-import org.eclipse.core.databinding.observable.ObservableTracker;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableItem;
-
-/**
- * @since 1.1
- *
- */
-public abstract class TableUpdater {
-
- private class UpdateRunnable implements Runnable, IChangeListener,
- DisposeListener {
- private TableItem item;
-
- private boolean dirty = false;
-
- private IObservable[] dependencies = new IObservable[0];
-
- UpdateRunnable(TableItem item) {
- this.item = item;
- item.addDisposeListener(this);
- }
-
- // Runnable implementation. This method runs at most once per repaint
- // whenever the
- // value gets marked as dirty.
- public void run() {
- if (theTable != null && !theTable.isDisposed() && item != null && !item.isDisposed()) {
- if (theTable.isVisible()) {
- int tableHeight = theTable.getClientArea().height;
- int numVisibleItems = tableHeight / theTable.getItemHeight();
- int indexOfItem = theTable.indexOf(item);
- int topIndex = theTable.getTopIndex();
- if (indexOfItem >= topIndex && indexOfItem <= topIndex+numVisibleItems) {
- updateIfNecessary();
- return;
- }
- }
- theTable.clear(theTable.indexOf(item));
- }
- }
-
- private void updateIfNecessary() {
- if (dirty) {
- dependencies = ObservableTracker.runAndMonitor(new Runnable() {
- public void run() {
- updateItem(item);
- }
- }, this, null);
- dirty = false;
- }
- }
-
- // IChangeListener implementation (listening to the ComputedValue)
- public void handleChange(ChangeEvent event) {
- // Whenever this updator becomes dirty, schedule the run() method
- makeDirty();
- }
-
- protected final void makeDirty() {
- if (!dirty) {
- dirty = true;
- stopListening();
- SWTUtil.runOnce(theTable.getDisplay(), this);
- }
- }
-
- private void stopListening() {
- // Stop listening for dependency changes
- for (int i = 0; i < dependencies.length; i++) {
- IObservable observable = dependencies[i];
-
- observable.removeChangeListener(this);
- }
- }
-
- // DisposeListener implementation
- public void widgetDisposed(DisposeEvent e) {
- stopListening();
- dependencies = null;
- item = null;
- }
- }
-
- private class PrivateInterface implements Listener, DisposeListener {
-
- // Listener implementation
- public void handleEvent(Event e) {
- if (e.type == SWT.SetData) {
- UpdateRunnable runnable = (UpdateRunnable) e.item.getData();
- if (runnable == null) {
- runnable = new UpdateRunnable((TableItem) e.item);
- e.item.setData(runnable);
- runnable.makeDirty();
- } else {
- runnable.updateIfNecessary();
- }
- }
- }
-
- // DisposeListener implementation
- public void widgetDisposed(DisposeEvent e) {
- TableUpdater.this.dispose();
- }
-
- }
-
- private PrivateInterface privateInterface = new PrivateInterface();
-
- private Table theTable;
-
- /**
- * Creates an updator for the given control.
- *
- * @param toUpdate
- * table to update
- */
- public TableUpdater(Table toUpdate) {
- Assert.isLegal((toUpdate.getStyle() & SWT.VIRTUAL) != 0, "TableUpdater requires virtual table"); //$NON-NLS-1$
- theTable = toUpdate;
-
- theTable.addDisposeListener(privateInterface);
- theTable.addListener(SWT.SetData, privateInterface);
- }
-
- /**
- * This is called automatically when the control is disposed. It may also be
- * called explicitly to remove this updator from the control. Subclasses
- * will normally extend this method to detach any listeners they attached in
- * their constructor.
- */
- public void dispose() {
- theTable.removeDisposeListener(privateInterface);
- theTable.removeListener(SWT.SetData, privateInterface);
-
- }
-
- /**
- * Updates the control. This method will be invoked once after the updator
- * is created, and once before any repaint during which the control is
- * visible and dirty.
- *
- * <p>
- * Subclasses should overload this method to provide any code that changes
- * the appearance of the widget.
- * </p>
- * @param item the item to update
- */
- protected abstract void updateItem(TableItem item);
-
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/WorkQueue.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/WorkQueue.java
deleted file mode 100644
index bb410968..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/WorkQueue.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jface.internal.databinding.provisional.swt;
-
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.Set;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-
-/**
- * @since 3.2
- *
- */
-public class WorkQueue {
-
- private boolean updateScheduled = false;
-
- private boolean paintListenerAttached = false;
-
- private LinkedList pendingWork = new LinkedList();
-
- private Display d;
-
- private Set pendingWorkSet = new HashSet();
-
- private Runnable updateJob = new Runnable() {
- public void run() {
- doUpdate();
- updateScheduled = false;
- }
- };
-
- private Listener paintListener = new Listener() {
- public void handleEvent(Event event) {
- paintListenerAttached = false;
- d.removeFilter(SWT.Paint, this);
- doUpdate();
- }
- };
-
- /**
- * @param targetDisplay
- */
- public WorkQueue(Display targetDisplay) {
- d = targetDisplay;
- }
-
- private void doUpdate() {
- for (;;) {
- Runnable next;
- synchronized (pendingWork) {
- if (pendingWork.isEmpty()) {
- break;
- }
- next = (Runnable) pendingWork.removeFirst();
- pendingWorkSet.remove(next);
- }
-
- next.run();
- }
- }
-
- /**
- * Schedules some work to happen in the UI thread as soon as possible. If
- * possible, the work will happen before the next control redraws. The given
- * runnable will only be run once. Has no effect if this runnable has
- * already been queued for execution.
- *
- * @param work
- * runnable to execute
- */
- public void runOnce(Runnable work) {
- synchronized (pendingWork) {
- if (pendingWorkSet.contains(work)) {
- return;
- }
-
- pendingWorkSet.add(work);
-
- asyncExec(work);
- }
- }
-
- /**
- * Schedules some work to happen in the UI thread as soon as possible. If
- * possible, the work will happen before the next control redraws. Unlike
- * runOnce, calling asyncExec twice with the same runnable will cause that
- * runnable to run twice.
- *
- * @param work
- * runnable to execute
- */
- public void asyncExec(Runnable work) {
- synchronized (pendingWork) {
- pendingWork.add(work);
- if (!updateScheduled) {
- updateScheduled = true;
- d.asyncExec(updateJob);
- }
-
- // If we're in the UI thread, add an event filter to ensure
- // the work happens ASAP
- if (Display.getCurrent() == d) {
- if (!paintListenerAttached) {
- paintListenerAttached = true;
- d.addFilter(SWT.Paint, paintListener);
- }
- }
- }
- }
-
- /**
- * Cancels a previously-scheduled runnable. Has no effect if the given
- * runnable was not previously scheduled or has already executed.
- *
- * @param toCancel
- * runnable to cancel
- */
- public void cancelExec(Runnable toCancel) {
- synchronized (pendingWork) {
- pendingWork.remove(toCancel);
- pendingWorkSet.remove(toCancel);
- }
- }
-
- /**
- * Cancels all pending work.
- */
- public void cancelAll() {
- synchronized (pendingWork) {
- pendingWork.clear();
- pendingWorkSet.clear();
- }
- }
-}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/viewers/ViewerLabelProvider.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/viewers/ViewerLabelProvider.java
deleted file mode 100644
index 46bbb728..00000000
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/viewers/ViewerLabelProvider.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jface.internal.databinding.provisional.viewers;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.jface.internal.databinding.provisional.swt.SWTUtil;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.IViewerLabelProvider;
-import org.eclipse.jface.viewers.LabelProviderChangedEvent;
-import org.eclipse.jface.viewers.ViewerLabel;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * @since 1.0
- *
- */
-public class ViewerLabelProvider implements IViewerLabelProvider,
- ILabelProvider {
-
- private List listeners = new ArrayList();
-
- /**
- * Subclasses should override this method. They should not call the base
- * class implementation.
- */
- public void updateLabel(ViewerLabel label, Object element) {
- label.setText(element.toString());
- }
-
- protected final void fireChangeEvent(Collection changes) {
- final LabelProviderChangedEvent event = new LabelProviderChangedEvent(
- this, changes.toArray());
- ILabelProviderListener[] listenerArray = (ILabelProviderListener[]) listeners
- .toArray(new ILabelProviderListener[listeners.size()]);
- for (int i = 0; i < listenerArray.length; i++) {
- ILabelProviderListener listener = listenerArray[i];
- try {
- listener.labelProviderChanged(event);
- } catch (Exception e) {
- SWTUtil.logException(e);
- }
- }
- }
-
- public final Image getImage(Object element) {
- ViewerLabel label = new ViewerLabel("", null); //$NON-NLS-1$
- updateLabel(label, element);
- return label.getImage();
- }
-
- public final String getText(Object element) {
- ViewerLabel label = new ViewerLabel("", null); //$NON-NLS-1$
- updateLabel(label, element);
- return label.getText();
- }
-
- public void addListener(ILabelProviderListener listener) {
- listeners.add(listener);
- }
-
- public void dispose() {
- listeners.clear();
- }
-
- public final boolean isLabelProperty(Object element, String property) {
- return true;
- }
-
- public void removeListener(ILabelProviderListener listener) {
- listeners.remove(listener);
- }
-
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/.classpath b/examples/org.eclipse.jface.examples.databinding/.classpath
deleted file mode 100644
index d512f63a..00000000
--- a/examples/org.eclipse.jface.examples.databinding/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/executionEnvironments/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/org.eclipse.jface.examples.databinding/.cvsignore b/examples/org.eclipse.jface.examples.databinding/.cvsignore
deleted file mode 100644
index ba077a40..00000000
--- a/examples/org.eclipse.jface.examples.databinding/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/examples/org.eclipse.jface.examples.databinding/.project b/examples/org.eclipse.jface.examples.databinding/.project
deleted file mode 100644
index 0ccc2284..00000000
--- a/examples/org.eclipse.jface.examples.databinding/.project
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jface.examples.databinding</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.jem.beaninfo.BeanInfoNature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/org.eclipse.jface.examples.databinding/.settings/org.eclipse.jdt.core.prefs b/examples/org.eclipse.jface.examples.databinding/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 2b83041f..00000000
--- a/examples/org.eclipse.jface.examples.databinding/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Wed Jan 17 09:10:34 EST 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/examples/org.eclipse.jface.examples.databinding/.settings/org.eclipse.jdt.ui.prefs b/examples/org.eclipse.jface.examples.databinding/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 846d8bfc..00000000
--- a/examples/org.eclipse.jface.examples.databinding/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Thu Aug 24 15:24:48 EDT 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.ui.exception.name=e
-org.eclipse.jdt.ui.gettersetter.use.is=true
-org.eclipse.jdt.ui.javadoc=true
-org.eclipse.jdt.ui.overrideannotation=true
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return Returns the ${bare_field_name}.\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} The ${bare_field_name} to set.\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*******************************************************************************\n * Copyright (c) ${year} IBM Corporation and others.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * IBM Corporation - initial API and implementation\n ******************************************************************************/\n</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @since 3.2\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template></templates>
diff --git a/examples/org.eclipse.jface.examples.databinding/.settings/org.eclipse.pde.prefs b/examples/org.eclipse.jface.examples.databinding/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index 9ad123fb..00000000
--- a/examples/org.eclipse.jface.examples.databinding/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,14 +0,0 @@
-#Tue Oct 18 13:46:33 EDT 2005
-compilers.p.deprecated=0
-compilers.p.illegal-att-value=0
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=0
-compilers.p.unknown-attribute=0
-compilers.p.unknown-class=1
-compilers.p.unknown-element=1
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.p.unused-element-or-attribute=1
-compilers.use-project=true
-eclipse.preferences.version=1
diff --git a/examples/org.eclipse.jface.examples.databinding/META-INF/MANIFEST.MF b/examples/org.eclipse.jface.examples.databinding/META-INF/MANIFEST.MF
deleted file mode 100644
index 4b016d44..00000000
--- a/examples/org.eclipse.jface.examples.databinding/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,19 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.jface.examples.databinding
-Bundle-Version: 1.0.100.qualifier
-Bundle-ClassPath: .
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.jface,
- org.eclipse.core.databinding,
- org.eclipse.core.runtime,
- org.eclipse.core.databinding.beans,
- org.eclipse.jface.databinding
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.jface.examples.databinding;x-internal:=false,
- org.eclipse.jface.examples.databinding.mask;x-internal:=false,
- org.eclipse.jface.examples.databinding.mask.internal;x-internal:=true,
- org.eclipse.jface.examples.databinding.model;x-internal:=false,
- org.eclipse.jface.examples.databinding.radioGroup;x-internal:=false
diff --git a/examples/org.eclipse.jface.examples.databinding/about.html b/examples/org.eclipse.jface.examples.databinding/about.html
deleted file mode 100644
index 46023304..00000000
--- a/examples/org.eclipse.jface.examples.databinding/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/examples/org.eclipse.jface.examples.databinding/build.properties b/examples/org.eclipse.jface.examples.databinding/build.properties
deleted file mode 100644
index eb8755f3..00000000
--- a/examples/org.eclipse.jface.examples.databinding/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are 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:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = .,\
- META-INF/,\
- plugin.properties,\
- about.html
-output.databindingexamples.jar = bin/
-src.includes = about.html
-source.. = src/
diff --git a/examples/org.eclipse.jface.examples.databinding/plugin.properties b/examples/org.eclipse.jface.examples.databinding/plugin.properties
deleted file mode 100644
index 759e715f..00000000
--- a/examples/org.eclipse.jface.examples.databinding/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are 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:
-# IBM Corporation - initial API and implementation
-###############################################################################
-pluginName = JFace Data Binding Examples
-providerName = Eclipse.org
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/ModelObject.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/ModelObject.java
deleted file mode 100644
index f5b67591..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/ModelObject.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jface.examples.databinding;
-
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyChangeSupport;
-import java.lang.reflect.Array;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-public class ModelObject {
- private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(
- this);
- private String id;
-
- public void addPropertyChangeListener(PropertyChangeListener listener) {
- propertyChangeSupport.addPropertyChangeListener(listener);
- }
-
- public void addPropertyChangeListener(String propertyName,
- PropertyChangeListener listener) {
- propertyChangeSupport.addPropertyChangeListener(propertyName, listener);
- }
-
- public void removePropertyChangeListener(PropertyChangeListener listener) {
- propertyChangeSupport.removePropertyChangeListener(listener);
- }
-
- public void removePropertyChangeListener(String propertyName,
- PropertyChangeListener listener) {
- propertyChangeSupport.removePropertyChangeListener(propertyName,
- listener);
- }
-
- protected void firePropertyChange(String propertyName, Object oldValue,
- Object newValue) {
- propertyChangeSupport.firePropertyChange(propertyName, oldValue,
- newValue);
- }
-
- protected void firePropertyChange(String propertyName, int oldValue,
- int newValue) {
- propertyChangeSupport.firePropertyChange(propertyName, oldValue,
- newValue);
- }
-
- protected void firePropertyChange(String propertyName, boolean oldValue,
- boolean newValue) {
- propertyChangeSupport.firePropertyChange(propertyName, oldValue,
- newValue);
- }
-
- public void setId(String string) {
- Object oldValue = id;
- id = string;
- firePropertyChange("id", oldValue, id);
- }
-
- protected Object[] append(Object[] array, Object object) {
- List newList = new ArrayList(Arrays.asList(array));
- newList.add(object);
- return newList.toArray((Object[]) Array.newInstance(array.getClass()
- .getComponentType(), newList.size()));
- }
-
- protected Object[] remove(Object[] array, Object object) {
- List newList = new ArrayList(Arrays.asList(array));
- newList.remove(object);
- return newList.toArray((Object[]) Array.newInstance(array.getClass()
- .getComponentType(), newList.size()));
- }
-
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/AsynchronousTestSet.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/AsynchronousTestSet.java
deleted file mode 100644
index a8384954..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/AsynchronousTestSet.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jface.examples.databinding.contentprovider.test;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Random;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.set.ObservableSet;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * Test set that simulates asynchronously computed elements. The elements of the
- * set are randomly generated Integers. Whenever the "recompute" method is
- * called, the set will spin off a job that sleeps for a period of time and then
- * randomly adds and removes elements from the set.
- *
- * <p>
- * This simulates a set that wraps a database query or network communication.
- * These would follow the same pattern (report the set as "stale", perform some
- * slow operation, then make changes to the set).
- * </p>
- *
- * @since 1.0
- */
-public class AsynchronousTestSet extends ObservableSet {
-
- private static Random randomNumberGenerator = new Random();
-
- private Display display;
-
- private boolean stale = false;
-
- /**
- * Average number of elements to add or remove
- */
- private static final int AVERAGE_DELTA = 4;
-
- /**
- * Average "computation" time -- time taken to do the simulated work (ms)
- */
- private static final int AVERAGE_BUSY_TIME = 1000;
-
- /**
- * List of all undisposed AsynchronousTestSet instances. Used for the
- * recomputeAll method.
- */
- private static List allSets = new ArrayList();
-
- public AsynchronousTestSet() {
- super(new HashSet(), Object.class);
- display = Display.getCurrent();
- if (display == null) {
- throw new IllegalStateException(
- "This object can only be created in the UI thread"); //$NON-NLS-1$
- }
- recompute();
- }
-
- protected void firstListenerAdded() {
- super.firstListenerAdded();
- allSets.add(this);
- }
-
- protected void lastListenerRemoved() {
- allSets.remove(this);
- super.lastListenerRemoved();
- }
-
- public static void recomputeAll() {
- for (Iterator iter = allSets.iterator(); iter.hasNext();) {
- AsynchronousTestSet next = (AsynchronousTestSet) iter.next();
-
- next.recompute();
- }
- }
-
- public void remove(Collection toRemove) {
- HashSet removed = new HashSet();
- removed.addAll(toRemove);
- removed.retainAll(wrappedSet);
-
- wrappedSet.removeAll(removed);
- fireSetChange(Diffs.createSetDiff(Collections.EMPTY_SET, removed));
- }
-
- public boolean isStale() {
- return stale;
- }
-
- public void recompute() {
- if (!isStale()) {
- setStale(true);
- final int sleepTime = (int) (randomNumberGenerator.nextDouble() * (AVERAGE_BUSY_TIME * 2));
- Thread newThread = new Thread(new Runnable() {
- public void run() {
-
- // Simulate work by sleeping
- try {
- Thread.sleep(sleepTime);
- } catch (InterruptedException e) {
- }
-
- // Add and remove some elements -- important: fire all
- // events in the UI thread
- display.asyncExec(new Runnable() {
- public void run() {
- final HashSet toAdd = new HashSet();
- final HashSet toRemove = new HashSet();
-
- // Compute elements to add and remove (basically
- // just fills the toAdd
- // and toRemove sets with random elements)
- int delta = (randomNumberGenerator
- .nextInt(AVERAGE_DELTA * 4) - AVERAGE_DELTA * 2);
- int extraAdds = randomNumberGenerator
- .nextInt(AVERAGE_DELTA);
- int addCount = delta + extraAdds;
- int removeCount = -delta + extraAdds;
-
- if (addCount > 0) {
- for (int i = 0; i < addCount; i++) {
- toAdd.add(new Integer(randomNumberGenerator
- .nextInt(20)));
- }
- }
-
- if (removeCount > 0) {
- Iterator oldElements = wrappedSet.iterator();
- for (int i = 0; i < removeCount
- && oldElements.hasNext(); i++) {
- toRemove.add(oldElements.next());
- }
- }
-
- toAdd.removeAll(wrappedSet);
- wrappedSet.addAll(toAdd);
- wrappedSet.removeAll(toRemove);
-
- setStale(false);
- fireSetChange(Diffs.createSetDiff(toAdd, toRemove));
- }
- });
- }
- });
-
- newThread.start();
- }
- }
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/LabelProviderTest.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/LabelProviderTest.java
deleted file mode 100644
index c90b8387..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/LabelProviderTest.java
+++ /dev/null
@@ -1,211 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920
- ******************************************************************************/
-
-package org.eclipse.jface.examples.databinding.contentprovider.test;
-
-import java.util.Collections;
-
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.set.WritableSet;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.databinding.observable.value.IValueChangeListener;
-import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.jface.databinding.viewers.ListeningLabelProvider;
-import org.eclipse.jface.databinding.viewers.ObservableSetContentProvider;
-import org.eclipse.jface.databinding.viewers.ViewersObservables;
-import org.eclipse.jface.dialogs.InputDialog;
-import org.eclipse.jface.layout.GridLayoutFactory;
-import org.eclipse.jface.layout.LayoutConstants;
-import org.eclipse.jface.viewers.ListViewer;
-import org.eclipse.jface.viewers.ViewerLabel;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Tests UpdatableTreeContentProvider and DirtyIndicationLabelProvider. Creates
- * a tree containing three randomly-generated sets of integers, and one node
- * that contains the union of the other sets.
- *
- * @since 1.0
- */
-public class LabelProviderTest {
-
- private Shell shell;
-
- private ListViewer list;
-
- private WritableSet setOfRenamables;
-
- private Button addButton;
-
- private Button removeButton;
-
- private Button renameButton;
-
- private SelectionListener buttonSelectionListener = new SelectionAdapter() {
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- */
- public void widgetSelected(SelectionEvent e) {
- Button pressed = (Button) e.widget;
- if (pressed == addButton) {
- setOfRenamables.add(new RenamableItem());
- } else if (pressed == removeButton) {
- setOfRenamables.remove(getCurrentSelection());
- } else if (pressed == renameButton) {
- rename(getCurrentSelection());
- }
-
- super.widgetSelected(e);
- }
- };
-
- private IObservableValue selectedRenamable;
-
- /**
- *
- */
- public LabelProviderTest() {
-
- // Create shell
- shell = new Shell(Display.getCurrent());
- { // Initialize shell
- setOfRenamables = new WritableSet();
-
- list = new ListViewer(shell);
- ObservableSetContentProvider contentProvider = new ObservableSetContentProvider();
- list.setContentProvider(contentProvider);
- list.setLabelProvider(new ListeningLabelProvider(contentProvider
- .getKnownElements()) {
- RenamableItem.Listener listener = new RenamableItem.Listener() {
- public void handleChanged(RenamableItem item) {
- fireChangeEvent(Collections.singleton(item));
- }
- };
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.databinding.viewers.ViewerLabelProvider#updateLabel(org.eclipse.jface.viewers.ViewerLabel,
- * java.lang.Object)
- */
- public void updateLabel(ViewerLabel label, Object element) {
- if (element instanceof RenamableItem) {
- RenamableItem item = (RenamableItem) element;
-
- label.setText(item.getName());
- }
- }
-
- protected void addListenerTo(Object next) {
- RenamableItem item = (RenamableItem) next;
-
- item.addListener(listener);
- }
-
- protected void removeListenerFrom(Object next) {
- RenamableItem item = (RenamableItem) next;
-
- item.removeListener(listener);
- }
- });
- list.setInput(setOfRenamables);
-
- selectedRenamable = ViewersObservables.observeSingleSelection(list);
-
- Composite buttonBar = new Composite(shell, SWT.NONE);
- { // Initialize buttonBar
- addButton = new Button(buttonBar, SWT.PUSH);
- addButton.setText("Add"); //$NON-NLS-1$
- addButton.addSelectionListener(buttonSelectionListener);
- removeButton = new Button(buttonBar, SWT.PUSH);
- removeButton.addSelectionListener(buttonSelectionListener);
- removeButton.setText("Remove"); //$NON-NLS-1$
- renameButton = new Button(buttonBar, SWT.PUSH);
- renameButton.addSelectionListener(buttonSelectionListener);
- renameButton.setText("Rename"); //$NON-NLS-1$
-
- selectedRenamable
- .addValueChangeListener(new IValueChangeListener() {
- public void handleValueChange(ValueChangeEvent event) {
- boolean shouldEnable = selectedRenamable
- .getValue() != null;
- removeButton.setEnabled(shouldEnable);
- renameButton.setEnabled(shouldEnable);
- }
- });
- removeButton.setEnabled(false);
- renameButton.setEnabled(false);
-
- GridLayoutFactory.fillDefaults().generateLayout(buttonBar);
- }
-
- }
- GridLayoutFactory.fillDefaults().numColumns(2).margins(
- LayoutConstants.getMargins()).generateLayout(shell);
- }
-
- /**
- * @param currentSelection
- */
- protected void rename(final RenamableItem currentSelection) {
- InputDialog inputDialog = new InputDialog(
- shell,
- "Edit name", "Enter the new item name", currentSelection.getName(), null); //$NON-NLS-1$ //$NON-NLS-2$
- if (Window.OK == inputDialog.open()) {
- currentSelection.setName(inputDialog.getValue());
- }
- }
-
- /**
- * @return
- */
- protected RenamableItem getCurrentSelection() {
- return (RenamableItem) selectedRenamable.getValue();
- }
-
- /**
- * @param args
- */
- public static void main(String[] args) {
- final Display display = Display.getDefault();
- Realm.runWithDefault(SWTObservables.getRealm(display), new Runnable() {
-
- public void run() {
- LabelProviderTest test = new LabelProviderTest();
- Shell s = test.getShell();
- s.pack();
- s.setVisible(true);
-
- while (!s.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- }
- });
- display.dispose();
- }
-
- private Shell getShell() {
- return shell;
- }
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/LabelProviderTest2.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/LabelProviderTest2.java
deleted file mode 100644
index 26f4bbc3..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/LabelProviderTest2.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920
- ******************************************************************************/
-
-package org.eclipse.jface.examples.databinding.contentprovider.test;
-
-import java.util.Collections;
-
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.list.WritableList;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.databinding.observable.value.IValueChangeListener;
-import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.jface.databinding.viewers.ListeningLabelProvider;
-import org.eclipse.jface.databinding.viewers.ObservableListContentProvider;
-import org.eclipse.jface.databinding.viewers.ViewersObservables;
-import org.eclipse.jface.dialogs.InputDialog;
-import org.eclipse.jface.layout.GridLayoutFactory;
-import org.eclipse.jface.layout.LayoutConstants;
-import org.eclipse.jface.viewers.ListViewer;
-import org.eclipse.jface.viewers.ViewerLabel;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Tests UpdatableTreeContentProvider and DirtyIndicationLabelProvider. Creates
- * a tree containing three randomly-generated sets of integers, and one node
- * that contains the union of the other sets.
- *
- * @since 1.0
- */
-public class LabelProviderTest2 {
-
- private Shell shell;
-
- private ListViewer list;
-
- private WritableList listOfRenamables;
-
- private Button addButton;
-
- private Button removeButton;
-
- private Button renameButton;
-
- private SelectionListener buttonSelectionListener = new SelectionAdapter() {
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- */
- public void widgetSelected(SelectionEvent e) {
- Button pressed = (Button) e.widget;
- if (pressed == addButton) {
- listOfRenamables.add(new RenamableItem());
- } else if (pressed == removeButton) {
- listOfRenamables.remove(getCurrentSelection());
- } else if (pressed == renameButton) {
- rename(getCurrentSelection());
- }
-
- super.widgetSelected(e);
- }
- };
-
- private IObservableValue selectedRenamable;
-
- /**
- *
- */
- public LabelProviderTest2() {
-
- // Create shell
- shell = new Shell(Display.getCurrent());
- { // Initialize shell
- listOfRenamables = new WritableList();
-
- list = new ListViewer(shell);
- ObservableListContentProvider contentProvider = new ObservableListContentProvider();
- list.setContentProvider(contentProvider);
- list.setLabelProvider(new ListeningLabelProvider(contentProvider
- .getKnownElements()) {
- RenamableItem.Listener listener = new RenamableItem.Listener() {
- public void handleChanged(RenamableItem item) {
- fireChangeEvent(Collections.singleton(item));
- }
- };
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.databinding.viewers.ViewerLabelProvider#updateLabel(org.eclipse.jface.viewers.ViewerLabel,
- * java.lang.Object)
- */
- public void updateLabel(ViewerLabel label, Object element) {
- if (element instanceof RenamableItem) {
- RenamableItem item = (RenamableItem) element;
-
- label.setText(item.getName());
- }
- }
-
- protected void addListenerTo(Object next) {
- RenamableItem item = (RenamableItem) next;
-
- item.addListener(listener);
- }
-
- protected void removeListenerFrom(Object next) {
- RenamableItem item = (RenamableItem) next;
-
- item.removeListener(listener);
- }
- });
- list.setInput(listOfRenamables);
-
- selectedRenamable = ViewersObservables.observeSingleSelection(list);
-
- Composite buttonBar = new Composite(shell, SWT.NONE);
- { // Initialize buttonBar
- addButton = new Button(buttonBar, SWT.PUSH);
- addButton.setText("Add"); //$NON-NLS-1$
- addButton.addSelectionListener(buttonSelectionListener);
- removeButton = new Button(buttonBar, SWT.PUSH);
- removeButton.addSelectionListener(buttonSelectionListener);
- removeButton.setText("Remove"); //$NON-NLS-1$
- renameButton = new Button(buttonBar, SWT.PUSH);
- renameButton.addSelectionListener(buttonSelectionListener);
- renameButton.setText("Rename"); //$NON-NLS-1$
-
- selectedRenamable
- .addValueChangeListener(new IValueChangeListener() {
- public void handleValueChange(ValueChangeEvent event) {
- boolean shouldEnable = selectedRenamable
- .getValue() != null;
- removeButton.setEnabled(shouldEnable);
- renameButton.setEnabled(shouldEnable);
- }
- });
- removeButton.setEnabled(false);
- renameButton.setEnabled(false);
-
- GridLayoutFactory.fillDefaults().generateLayout(buttonBar);
- }
-
- }
- GridLayoutFactory.fillDefaults().numColumns(2).margins(
- LayoutConstants.getMargins()).generateLayout(shell);
- }
-
- /**
- * @param currentSelection
- */
- protected void rename(final RenamableItem currentSelection) {
- InputDialog inputDialog = new InputDialog(
- shell,
- "Edit name", "Enter the new item name", currentSelection.getName(), null); //$NON-NLS-1$ //$NON-NLS-2$
- if (Window.OK == inputDialog.open()) {
- currentSelection.setName(inputDialog.getValue());
- }
- }
-
- /**
- * @return
- */
- protected RenamableItem getCurrentSelection() {
- return (RenamableItem) selectedRenamable.getValue();
- }
-
- /**
- * @param args
- */
- public static void main(String[] args) {
- final Display display = Display.getDefault();
- Realm.runWithDefault(SWTObservables.getRealm(display), new Runnable() {
- public void run() {
- LabelProviderTest2 test = new LabelProviderTest2();
- Shell s = test.getShell();
- s.pack();
- s.setVisible(true);
-
- while (!s.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- }
- });
- display.dispose();
- }
-
- private Shell getShell() {
- return shell;
- }
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/RenamableItem.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/RenamableItem.java
deleted file mode 100644
index a86e555f..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/RenamableItem.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.examples.databinding.contentprovider.test;
-
-import java.util.ArrayList;
-
-/**
- * @since 1.0
- *
- */
-public class RenamableItem {
-
- public static interface Listener {
- public void handleChanged(RenamableItem item);
- }
-
- private String name;
- private ArrayList listeners = new ArrayList();
-
- public RenamableItem() {
- name = "RenamableItem"; //$NON-NLS-1$
- }
-
- public void addListener(Listener listener) {
- listeners.add(listener);
- }
-
- public void removeListener(Listener toRemove) {
- listeners.remove(toRemove);
- }
-
- public void setName(String newName) {
- this.name = newName;
-
- Listener[] l = (Listener[]) listeners.toArray(new Listener[listeners.size()]);
- for (int i = 0; i < l.length; i++) {
- l[i].handleChanged(this);
- }
- }
-
- public String getName() {
- return name;
- }
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/SimpleNode.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/SimpleNode.java
deleted file mode 100644
index 7d34d94b..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/SimpleNode.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jface.examples.databinding.contentprovider.test;
-
-import org.eclipse.core.databinding.observable.set.IObservableSet;
-
-
-/**
- * This object will be given randomly-generated children
- *
- * @since 1.0
- */
-public class SimpleNode {
- private String nodeName;
- private IObservableSet children;
-
- public SimpleNode(String nodeName, IObservableSet children) {
- super();
- this.nodeName = nodeName;
- this.children = children;
- }
-
- public String getNodeName() {
- return nodeName;
- }
-
- public IObservableSet getChildren() {
- return children;
- }
-
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/SomeMathFunction.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/SomeMathFunction.java
deleted file mode 100644
index 88ec4540..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/SomeMathFunction.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jface.examples.databinding.contentprovider.test;
-
-import java.util.Collections;
-import java.util.Set;
-
-import org.eclipse.core.databinding.observable.map.ComputedObservableMap;
-import org.eclipse.core.databinding.observable.map.MapDiff;
-import org.eclipse.core.databinding.observable.set.IObservableSet;
-
-/**
- * Simple function that performs one of three operations on Doubles:
- * <ul>
- * <li>Multiply by two</li>
- * <li>Round to nearest integer</li>
- * <li>Do nothing</li>
- * </ul>
- *
- * @since 1.0
- */
-public class SomeMathFunction extends ComputedObservableMap {
-
- /**
- *
- */
- public static final int OP_IDENTITY = 0;
-
- /**
- *
- */
- public static final int OP_MULTIPLY = 1;
-
- /**
- *
- */
- public static final int OP_ROUND = 2;
-
- private int op = OP_ROUND;
-
- /**
- * @param domain
- */
- public SomeMathFunction(IObservableSet domain) {
- super(domain);
- init();
- }
-
- /**
- * @param operation
- */
- public void setOperation(final int operation) {
- final int oldOp = this.op;
- this.op = operation;
-
- // Fire a change event. Changing the operation is going to affect every
- // answer returned by
- // this function, so include every element in the function domain in the
- // event.
- // If this was a change that would only affect a subset of elements, we
- // would include
- // the subset of affected elements rather than using
- // domain.toCollection()
- fireMapChange(new MapDiff() {
-
- public Set getAddedKeys() {
- return Collections.EMPTY_SET;
- }
-
- public Set getChangedKeys() {
- return keySet();
- }
-
- public Object getNewValue(Object key) {
- return doComputeResult(key, operation);
- }
-
- public Object getOldValue(Object key) {
- return doComputeResult(key, oldOp);
- }
-
- public Set getRemovedKeys() {
- return Collections.EMPTY_SET;
- }
- });
- }
-
- private Object doComputeResult(Object element, int op) {
- switch (op) {
- case OP_IDENTITY:
- return element;
- case OP_MULTIPLY:
- return new Double((((Double) element).doubleValue() * 2.0));
- case OP_ROUND:
- return new Double(Math.floor((((Double) element).doubleValue())));
- }
- return element;
- }
-
- protected Object doGet(Object key) {
- return doComputeResult(key, this.op);
- }
-
- protected Object doPut(Object key, Object value) {
- throw new UnsupportedOperationException();
- }
-
- protected void hookListener(Object addedKey) {
- // ignore, no need to listen to immutable Double objects
- }
-
- protected void unhookListener(Object removedKey) {
- // ignore, no need to listen to immutable Double objects
- }
-
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/StructuredContentProviderTest.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/StructuredContentProviderTest.java
deleted file mode 100644
index c9bd2c7a..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/StructuredContentProviderTest.java
+++ /dev/null
@@ -1,396 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jface.examples.databinding.contentprovider.test;
-
-import java.util.Iterator;
-import java.util.Random;
-
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.set.MappedSet;
-import org.eclipse.core.databinding.observable.set.WritableSet;
-import org.eclipse.core.databinding.observable.value.ComputedValue;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.databinding.observable.value.IValueChangeListener;
-import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
-import org.eclipse.core.databinding.observable.value.WritableValue;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.jface.databinding.viewers.ObservableSetContentProvider;
-import org.eclipse.jface.databinding.viewers.ViewersObservables;
-import org.eclipse.jface.internal.databinding.provisional.swt.ControlUpdater;
-import org.eclipse.jface.internal.databinding.provisional.viewers.ViewerLabelProvider;
-import org.eclipse.jface.viewers.ListViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Tests UpdatableSetContentProvider, ComputableValue, ControlUpdator,
- * UpdatableFunction, and ConvertingSet.
- *
- * <p>
- * This test displays a dialog with user-editable list of Doubles. It allows the
- * user to select a math function to apply to the set, and displays the result
- * in a new list. A line of text along the bottom of the dialog displays the sum
- * of the elements from the transformed set. Although this dialog is rather
- * silly, it is a good example of a dialog where a lot of things can change from
- * many directions.
- * </p>
- *
- * <p>
- * An UpdatableSetContentProvider is used to supply the contents each
- * ListViewer. ControlUpdators
- *
- * </p>
- *
- * @since 1.0
- */
-public class StructuredContentProviderTest {
-
- private static Realm realm;
-
- /**
- * Top-level shell for the dialog
- */
- private Shell shell;
-
- /**
- * Random number stream. Used for the "add" button.
- */
- protected Random random = new Random();
-
- // Data model ////////////////////////////////////////////////////////
-
- /**
- * inputSet stores a set of Doubles. The user is allowed to add and remove
- * Doubles from this set.
- */
- private WritableSet inputSet;
-
- /**
- * currentFunction is an Integer, set to one of the SomeMathFunction.OP_*
- * constants. It identifies which function will be applied to inputSet.
- */
- private WritableValue currentFunction;
-
- /**
- * mathFunction is the transformation. It can multiply by 2, round down to
- * the nearest integer, or do nothing (identity)
- */
- private SomeMathFunction mathFunction;
-
- /**
- * Set of Doubles. Holds the result of applying mathFunction to the
- * inputSet.
- */
- private MappedSet outputSet;
-
- /**
- * A Double. Stores the sum of the Doubles in outputSet
- */
- private IObservableValue sumOfOutputSet;
-
- /**
- * Creates the test dialog as a top-level shell.
- */
- public StructuredContentProviderTest() {
-
- // Initialize the data model
- createDataModel();
-
- shell = new Shell(Display.getCurrent(), SWT.SHELL_TRIM);
- { // Initialize shell
- final Label someDoubles = new Label(shell, SWT.NONE);
- someDoubles.setText("A list of random Doubles"); //$NON-NLS-1$
- someDoubles.setLayoutData(new GridData(
- GridData.HORIZONTAL_ALIGN_FILL
- | GridData.VERTICAL_ALIGN_FILL));
-
- Control addRemoveComposite = createInputControl(shell, inputSet);
-
- GridData addRemoveData = new GridData(GridData.FILL_BOTH);
- addRemoveData.minimumHeight = 1;
- addRemoveData.minimumWidth = 1;
-
- addRemoveComposite.setLayoutData(addRemoveData);
-
- Group operation = new Group(shell, SWT.NONE);
- { // Initialize operation group
- operation.setText("Select transformation"); //$NON-NLS-1$
-
- createRadioButton(operation, currentFunction, "f(x) = x", //$NON-NLS-1$
- new Integer(SomeMathFunction.OP_IDENTITY));
- createRadioButton(operation, currentFunction, "f(x) = 2 * x", //$NON-NLS-1$
- new Integer(SomeMathFunction.OP_MULTIPLY));
- createRadioButton(operation, currentFunction,
- "f(x) = floor(x)", new Integer( //$NON-NLS-1$
- SomeMathFunction.OP_ROUND));
-
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- operation.setLayout(layout);
- }
- operation.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL
- | GridData.VERTICAL_ALIGN_FILL));
-
- Control outputControl = createOutputComposite(shell);
- GridData outputData = new GridData(GridData.FILL_BOTH);
- outputData.minimumHeight = 1;
- outputData.minimumWidth = 1;
- outputData.widthHint = 300;
- outputData.heightHint = 150;
-
- outputControl.setLayoutData(outputData);
-
- final Label sumLabel = new Label(shell, SWT.NONE);
- new ControlUpdater(sumLabel) {
- protected void updateControl() {
- double sum = ((Double) sumOfOutputSet.getValue())
- .doubleValue();
- int size = outputSet.size();
-
- sumLabel.setText("The sum of the above " + size //$NON-NLS-1$
- + " doubles is " + sum); //$NON-NLS-1$
- }
- };
- sumLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL
- | GridData.VERTICAL_ALIGN_FILL));
-
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- shell.setLayout(layout);
- }
-
- }
-
- /**
- * Create the updatables for this dialog
- */
- private void createDataModel() {
- // Initialize data model. We will create a user-editable set of Doubles.
- // The user can run
- // a transformation on this set and view the result in a list viewer.
-
- // inputSet will be a writable set of doubles. The user will add and
- // remove entries from this set
- // through the UI.
- inputSet = new WritableSet(realm);
-
- // currentFunction holds the ID currently selected function to apply to
- // elements in the inputSet.
- // We will allow the user to change the current function through a set
- // of radio buttons
- currentFunction = new WritableValue(realm, new Integer(
- SomeMathFunction.OP_MULTIPLY), null);
-
- // mathFunction implements the selected function
- mathFunction = new SomeMathFunction(inputSet);
- currentFunction.addValueChangeListener(new IValueChangeListener() {
- public void handleValueChange(ValueChangeEvent event) {
- mathFunction
- .setOperation(((Integer) currentFunction.getValue())
- .intValue());
- }
- });
- mathFunction.setOperation(((Integer) currentFunction.getValue())
- .intValue());
-
- // outputSet holds the result. It displays the result of applying the
- // currently-selected
- // function on all the elements in the input set.
- outputSet = new MappedSet(inputSet, mathFunction);
-
- // sumOfOutputSet stores the current sum of the the Doubles in the
- // output set
- sumOfOutputSet = new ComputedValue(realm) {
- protected Object calculate() {
- double sum = 0.0;
- for (Iterator iter = outputSet.iterator(); iter.hasNext();) {
- Double next = (Double) iter.next();
-
- sum += next.doubleValue();
- }
- return new Double(sum);
- }
- };
- }
-
- /**
- * Creates a radio button in the given parent composite. When selected, the
- * button will change the given SettableValue to the given value.
- *
- * @param parent
- * parent composite
- * @param model
- * SettableValue that will hold the value of the
- * currently-selected radio button
- * @param string
- * text to appear in the radio button
- * @param value
- * value of this radio button (SettableValue will hold this value
- * when the radio button is selected)
- */
- private void createRadioButton(Composite parent, final WritableValue model,
- String string, final Object value) {
- final Button button = new Button(parent, SWT.RADIO);
- button.setText(string);
- button.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- model.setValue(value);
- super.widgetSelected(e);
- }
- });
- new ControlUpdater(button) {
- protected void updateControl() {
- button.setSelection(model.getValue().equals(value));
- }
- };
- button.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL
- | GridData.VERTICAL_ALIGN_FILL));
- }
-
- private Control createOutputComposite(Composite parent) {
- ListViewer listOfInts = new ListViewer(parent, SWT.BORDER
- | SWT.V_SCROLL | SWT.H_SCROLL);
-
- listOfInts.setContentProvider(new ObservableSetContentProvider());
- listOfInts.setLabelProvider(new ViewerLabelProvider());
- listOfInts.setInput(outputSet);
- return listOfInts.getControl();
- }
-
- /**
- * Creates and returns a control that will allow the user to add and remove
- * Doubles from the given input set.
- *
- * @param parent
- * parent control
- * @param inputSet
- * input set
- * @return a newly created SWT control that displays Doubles from the input
- * set and allows the user to add and remove entries
- */
- private Control createInputControl(Composite parent,
- final WritableSet inputSet) {
- Composite addRemoveComposite = new Composite(parent, SWT.NONE);
- { // Initialize addRemoveComposite
- ListViewer listOfInts = new ListViewer(addRemoveComposite,
- SWT.BORDER);
-
- listOfInts.setContentProvider(new ObservableSetContentProvider());
- listOfInts.setLabelProvider(new ViewerLabelProvider());
- listOfInts.setInput(inputSet);
-
- final IObservableValue selectedInt = ViewersObservables.observeSingleSelection(listOfInts);
-
- GridData listData = new GridData(GridData.FILL_BOTH);
- listData.minimumHeight = 1;
- listData.minimumWidth = 1;
- listData.widthHint = 150;
- listData.heightHint = 150;
- listOfInts.getControl().setLayoutData(listData);
-
- Composite buttonBar = new Composite(addRemoveComposite, SWT.NONE);
- { // Initialize button bar
-
- Button add = new Button(buttonBar, SWT.PUSH);
- add.setText("Add"); //$NON-NLS-1$
- add.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- inputSet.add(new Double(random.nextDouble() * 100.0));
- super.widgetSelected(e);
- }
- });
- add.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL
- | GridData.VERTICAL_ALIGN_FILL));
-
- final Button remove = new Button(buttonBar, SWT.PUSH);
- remove.setText("Remove"); //$NON-NLS-1$
- // Enable the Remove button if and only if there is currently an
- // element selected.
- new ControlUpdater(remove) {
- protected void updateControl() {
- // This block demonstrates auto-listening.
- // When updateControl is running, the framework
- // remembers each
- // updatable that gets touched. Since we're calling
- // selectedInt.getValue()
- // here, this updator will be flagged as dependant on
- // selectedInt. This
- // means that whenever selectedInt changes, this block
- // of code will re-run
- // itself.
-
- // The result is that the remove button will recompute
- // its enablement
- // whenever the selection in the listbox changes, and it
- // was not necessary
- // to attach any listeners.
- remove.setEnabled(selectedInt.getValue() != null);
- }
- };
-
- remove.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- inputSet.remove(selectedInt.getValue());
- super.widgetSelected(e);
- }
- });
- remove.setLayoutData(new GridData(
- GridData.HORIZONTAL_ALIGN_FILL
- | GridData.VERTICAL_ALIGN_FILL));
-
- GridLayout buttonLayout = new GridLayout();
- buttonLayout.numColumns = 1;
- buttonBar.setLayout(buttonLayout);
-
- } // End button bar
- buttonBar.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL
- | GridData.VERTICAL_ALIGN_BEGINNING));
-
- GridLayout addRemoveLayout = new GridLayout();
- addRemoveLayout.numColumns = 2;
- addRemoveComposite.setLayout(addRemoveLayout);
- }
- return addRemoveComposite;
- }
-
- /**
- * @param args
- */
- public static void main(String[] args) {
- Display display = Display.getDefault();
- realm = SWTObservables.getRealm(display);
- StructuredContentProviderTest test = new StructuredContentProviderTest();
- Shell s = test.getShell();
- s.pack();
- s.setVisible(true);
-
- while (!s.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.dispose();
- }
-
- private Shell getShell() {
- return shell;
- }
-
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/TreeContentProviderTest.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/TreeContentProviderTest.java
deleted file mode 100644
index d72fe4c0..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/TreeContentProviderTest.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jface.examples.databinding.contentprovider.test;
-
-import org.eclipse.core.databinding.observable.Observables;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.set.IObservableSet;
-import org.eclipse.core.databinding.observable.set.UnionSet;
-import org.eclipse.core.databinding.observable.set.WritableSet;
-import org.eclipse.core.databinding.observable.tree.IUnorderedTreeProvider;
-import org.eclipse.core.internal.databinding.observable.tree.TreePath;
-import org.eclipse.jface.internal.databinding.internal.viewers.UnorderedTreeContentProvider;
-import org.eclipse.jface.internal.databinding.provisional.viewers.ViewerLabelProvider;
-import org.eclipse.jface.layout.GridLayoutFactory;
-import org.eclipse.jface.layout.LayoutConstants;
-import org.eclipse.jface.viewers.IViewerLabelProvider;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.ViewerLabel;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Tests UpdatableTreeContentProvider and DirtyIndicationLabelProvider.
- * Creates a tree containing three randomly-generated sets of integers,
- * and one node that contains the union of the other sets.
- *
- * @since 3.2
- */
-public class TreeContentProviderTest {
-
- private Shell shell;
- private TreeViewer tree;
-
- // Three randomly-generated sets of doubles
- private AsynchronousTestSet set1;
- private AsynchronousTestSet set2;
- private AsynchronousTestSet set3;
-
- // The union of the above three sets
- private UnionSet union;
- private Button randomize;
- public TreeContentProviderTest() {
-
- // Create the data model
- set1 = new AsynchronousTestSet();
- set2 = new AsynchronousTestSet();
- set3 = new AsynchronousTestSet();
-
- // A union of the above sets
- union = new UnionSet(new IObservableSet[] {set1, set2, set3});
-
- // Create shell
- shell = new Shell(Display.getCurrent());
-
- createTree();
-
- Composite buttonBar = new Composite(shell, SWT.NONE);
- {
- buttonBar.setLayout(new FillLayout(SWT.HORIZONTAL));
- randomize = new Button(buttonBar, SWT.PUSH);
- randomize.setText("Randomize");
- randomize.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- AsynchronousTestSet.recomputeAll();
- super.widgetSelected(e);
- }
- });
-
- GridLayoutFactory.fillDefaults().generateLayout(buttonBar);
- }
-
- GridLayoutFactory.fillDefaults().margins(LayoutConstants.getMargins()).generateLayout(shell);
-
- shell.addDisposeListener(new DisposeListener() {
- /* (non-Javadoc)
- * @see org.eclipse.swt.events.DisposeListener#widgetDisposed(org.eclipse.swt.events.DisposeEvent)
- */
- public void widgetDisposed(DisposeEvent e) {
- dispose();
- }
- });
- }
-
- /**
- *
- */
- protected void dispose() {
- set1.dispose();
- set2.dispose();
- set3.dispose();
- union.dispose();
- }
-
- private void createTree() {
- // Create the tree provider. This provides the structure of the tree. This tree will
- // have an instance of RootNode as the root (which is really a placeholder), several
- // SimpleNodes as top-level nodes, and sets of randomly generated Doubles below each
- // SimpleNode.
- IUnorderedTreeProvider treeProvider = new IUnorderedTreeProvider() {
- public IObservableSet createChildSet(TreePath treePath) {
- // If the parent is the root node, return the union of some randomly-generated
- // nodes and some hardcoded nodes
- if (treePath.getSegmentCount()==0 || treePath.getLastSegment() == tree.getInput()) {
- // Set of hardcoded nodes
- WritableSet topElements = new WritableSet();
- topElements.add(new SimpleNode("Random Set 1", set1));
- topElements.add(new SimpleNode("Random Set 2", set2));
- topElements.add(new SimpleNode("Random Set 3", set3));
- topElements.add(new SimpleNode("Union of the other sets", union));
- return topElements;
- }
-
- // If the parent is a RandomChildrenNode, return a randomly-generated
- // set of Doubles for its children
- Object element = treePath.getLastSegment();
- if (element instanceof SimpleNode) {
- // We return a new DelegatingObservableSet in order to prevent the
- // original from being disposed.
- return Observables.proxyObservableSet(((SimpleNode)element).getChildren());
- }
-
- // Otherwise the node is a Double, which will have no children
- return null;
- }
-
- public Realm getRealm() {
- // TODO Auto-generated method stub
- return null;
- }
- };
-
- // Label provider for the tree
- IViewerLabelProvider labelProvider = new ViewerLabelProvider() {
- public void updateLabel(ViewerLabel label, Object element) {
- if (element instanceof SimpleNode) {
- SimpleNode node = (SimpleNode) element;
-
- label.setText(node.getNodeName());
- }
-
- if (element instanceof Integer) {
- Integer node = (Integer) element;
-
- label.setText("Integer " + node);
- }
- }
- };
-
- // Create tree viewer
- tree = new TreeViewer(shell, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
-
- // UpdatableTreeContentProvider converts an ITreeProvider into a standard JFace content provider
- UnorderedTreeContentProvider contentProvider = new UnorderedTreeContentProvider(treeProvider,
- "pending...");
-
- tree.setContentProvider(contentProvider);
- tree.setLabelProvider(labelProvider);
-
- // For the ITreeProvider above, it doesn't matter what we select as the input.
- tree.setInput(new Object());
- }
-
- /**
- * @param args
- */
- public static void main(String[] args) {
- Display display = Display.getDefault();
- TreeContentProviderTest test = new TreeContentProviderTest();
- Shell s = test.getShell();
- s.pack();
- s.setVisible(true);
-
- while (!s.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.dispose();
- }
-
- private Shell getShell() {
- return shell;
- }
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/ducks/DuckType.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/ducks/DuckType.java
deleted file mode 100644
index 031ac208..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/ducks/DuckType.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright (C) 2005 db4objects Inc. http://www.db4o.com
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- */
-package org.eclipse.jface.examples.databinding.ducks;
-
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-
-/**
- * DuckType. Implements Duck Typing for Java. ("If it walks like a duck,
- * quacks like a duck, it..."). Essentially allows programs to treat
- * objects from separate hierarchies as if they were designed with common
- * interfaces as long as they adhere to common naming conventions.
- * <p>
- * This version is the strict DuckType. All methods present in
- * interfaceToImplement must be present on the target object.
- *
- * @author djo
- */
-public class DuckType implements InvocationHandler {
-
- /**
- * Interface DuckType#Wrapper. An interface for DuckType proxies that
- * allows clients to access the proxied value. The value returned by
- * calling DuckType#implement always implements this interface.
- */
- public static interface Wrapper {
- /**
- * Method duckType_GetWrappedValue. Returns the proxied value.
- *
- * @return The proxied value.
- */
- public Object duckType_GetWrappedValue();
- }
-
- /**
- * Causes object to implement the interfaceToImplement and returns
- * an instance of the object implementing interfaceToImplement even
- * if interfaceToImplement was not declared in object.getClass()'s
- * implements declaration.<p>
- *
- * This works as long as all methods declared in interfaceToImplement
- * are present on object.
- *
- * @param interfaceToImplement The Java class of the interface to implement
- * @param object The object to force to implement interfaceToImplement
- * @return object, but now implementing interfaceToImplement
- */
- public static Object implement(Class interfaceToImplement, Object object) {
- return Proxy.newProxyInstance(interfaceToImplement.getClassLoader(),
- new Class[] {interfaceToImplement, Wrapper.class}, new DuckType(object));
- }
-
- /**
- * Indicates if object is a (DuckType) instace of intrface. That is,
- * is every method in intrface present on object.
- *
- * @param intrface The interface to implement
- * @param object The object to test
- * @return true if every method in intrface is present on object. false otherwise
- */
- public static boolean instanceOf(Class intrface, Object object) {
- final Method[] methods = intrface.getMethods();
- Class candclass=object.getClass();
- for (int methodidx = 0; methodidx < methods.length; methodidx++) {
- Method method=methods[methodidx];
- try {
- candclass.getMethod(method.getName(), method.getParameterTypes());
- } catch (NoSuchMethodException e) {
- return false;
- }
- }
- return true;
- }
-
- protected DuckType(Object object) {
- this.object = object;
- this.objectClass = object.getClass();
- }
-
- protected Object object;
- protected Class objectClass;
-
- public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
- if (method.getName().equals("equals") && args != null && args.length == 1) {
- return new Boolean(equals(args[0]));
- }
- if (method.getName().equals("hashCode") && args == null) {
- return new Integer(hashCode());
- }
- if (method.getName().equals("duckType_GetWrappedValue") && args == null) {
- return object;
- }
- Method realMethod = objectClass.getMethod(method.getName(), method.getParameterTypes());
- if (!realMethod.isAccessible()) {
- realMethod.setAccessible(true);
- }
- return realMethod.invoke(object, args);
- }
-
- public boolean equals(Object obj) {
- if (obj instanceof Wrapper) {
- Wrapper proxy = (Wrapper) obj;
- Object wrappedValue = proxy.duckType_GetWrappedValue();
- return wrappedValue.equals(object);
- }
- return obj == this || super.equals(obj) || object.equals(obj);
- }
-
- public int hashCode() {
- return object.hashCode();
- }
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/ducks/ReflectedMethod.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/ducks/ReflectedMethod.java
deleted file mode 100644
index c3b78ea7..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/ducks/ReflectedMethod.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (C) 2005 db4objects Inc. http://www.db4o.com
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- */
-package org.eclipse.jface.examples.databinding.ducks;
-
-import java.lang.reflect.Method;
-
-/**
- * ReflectedMethod. Encapsulates a method that may or may not exist on
- * some receiver. Invocation policy is that if the method can be invoked,
- * it is. On failure, returns null.
- *
- * @author djo
- */
-public class ReflectedMethod {
-
- private Object subject;
- private Method method;
-
- /**
- * Constructor ReflectedMethod. Create a ReflectedMethod object.
- *
- * @param subject The object on which the method lives.
- * @param methodName The name of the method.
- * @param paramTypes The method's parameter types.
- */
- public ReflectedMethod(Object subject, String methodName, Class[] paramTypes) {
- this.subject = subject;
- method = null;
- try {
- method = subject.getClass().getMethod(methodName, paramTypes);
- } catch (Exception e) {
- System.out.println(e);
- }
- }
-
- /**
- * Method exists. Returns true if the underlying method exists, false
- * otherwise.
- *
- * @return true if the underlying method exists, false otherwise.
- */
- public boolean exists() {
- return method != null;
- }
-
- /**
- * Method invoke. If possible, invoke the encapsulated method with the
- * specified parameters.
- *
- * @param params An Object[] containing the parameters to pass.
- * @return any return value or null if there was no return value or an
- * error occured.
- */
- public Object invoke(Object[] params) {
- if (method == null)
- return null;
- try {
- if (!method.isAccessible()) {
- method.setAccessible(true);
- }
- return method.invoke(subject, params);
- } catch (Exception e) {
- return null;
- }
- }
-
- /**
- * Method getType. Returns the return type of the method.
- *
- * @return The return type or null if none.
- */
- public Class getType() {
- return method.getReturnType();
- }
-}
-
-
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/ducks/ReflectedProperty.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/ducks/ReflectedProperty.java
deleted file mode 100644
index 3ec9a58c..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/ducks/ReflectedProperty.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 The Pampered Chef and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * The Pampered Chef - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.examples.databinding.ducks;
-
-/**
- * Encapsulates a single JavaBeans-style property
- *
- * @since 3.3
- */
-public class ReflectedProperty {
- private String propertyName;
- private ReflectedMethod getter;
- private ReflectedMethod setter;
-
- /**
- * Construct a ReflectedProperty on some object, given the property name.
- *
- * @param object The object
- * @param propertyName The property name
- */
- public ReflectedProperty(Object object, String propertyName) {
- this.propertyName = propertyName;
- getter = new ReflectedMethod(object, makeGetterName(propertyName), new Class[] {});
- if (!getter.exists()) {
- getter = new ReflectedMethod(object, makeBooleanGetterName(propertyName), new Class[] {});
- if (!getter.exists()) {
- throw new IllegalArgumentException("Cannot find getter for " + propertyName);
- }
- }
- setter = new ReflectedMethod(object, makeSetterName(propertyName), new Class[] {getter.getType()});
- }
-
- private String makeBooleanGetterName(String propertyName) {
- return "is" + capitalize(propertyName);
- }
-
- private String makeSetterName(String propertyName) {
- return "set" + capitalize(propertyName);
- }
-
- private String makeGetterName(String propertyName) {
- return "get" + capitalize(propertyName);
- }
-
- private String capitalize(String string) {
- return string.substring(0, 1).toUpperCase() + string.substring(1);
- }
-
- /**
- * Return the property's type. This is the same as the type returned by
- * the getter.
- *
- * @return The property's data type.
- */
- public Class getType() {
- return getter.getType();
- }
-
- /**
- * Return the property's value.
- *
- * @return The value in the property.
- */
- public Object get() {
- return getter.invoke(new Object[] {});
- }
-
- /**
- * Set the property's value. If the property is read-only, the request
- * is ignored.
- *
- * @param newValue The value to set.
- */
- public void set(Object newValue) {
- setter.invoke(new Object[] {newValue});
- }
-
- /**
- * Returns if the property is read-only.
- *
- * @return false if the property has a setter; true otherwise.
- */
- public boolean isReadOnly() {
- return !setter.exists();
- }
-
- /**
- * Returns the property's name.
- *
- * @return The property name.
- */
- public String getPropertyName() {
- return propertyName;
- }
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/ducks/RelaxedDuckType.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/ducks/RelaxedDuckType.java
deleted file mode 100644
index fa433973..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/ducks/RelaxedDuckType.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (C) 2005 db4objects Inc. http://www.db4o.com
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * db4objects - Initial API and implementation
- */
-package org.eclipse.jface.examples.databinding.ducks;
-
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-import java.util.HashMap;
-
-/**
- * RelaxedDuckType. Implements Duck Typing for Java. ("If it walks like a duck,
- * quacks like a duck, it..."). Essentially allows programs to treat
- * objects from separate hierarchies as if they were designed with common
- * interfaces as long as they adhere to common naming conventions.
- * <p>
- * This version is the relaxed DuckType. If a method in the interface is
- * not present on the underlying object, the proxy simply returns null.
- *
- * @author djo
- */
-public class RelaxedDuckType extends DuckType implements InvocationHandler {
-
- public static Object implement(Class interfaceToImplement, Object object) {
- return Proxy.newProxyInstance(interfaceToImplement.getClassLoader(),
- new Class[] {interfaceToImplement}, new RelaxedDuckType(object));
- }
-
- public static boolean includes(Object object, String method, Class[] args) {
- try {
- object.getClass().getMethod(method, args);
- } catch (NoSuchMethodException e) {
- return false;
- }
- return true;
- }
-
- private static final HashMap NULL_VALUES = new HashMap(); {
- NULL_VALUES.put(Boolean.TYPE, Boolean.FALSE);
- NULL_VALUES.put(Integer.TYPE, new Integer(0));
- NULL_VALUES.put(Float.TYPE, new Float(0));
- NULL_VALUES.put(Long.TYPE, new Long(0));
- NULL_VALUES.put(Double.TYPE, new Double(0));
- NULL_VALUES.put(Character.TYPE, new Character(' '));
- }
-
- protected RelaxedDuckType(Object object) {
- super(object);
- }
-
- public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
- try {
- Method realMethod = objectClass.getMethod(method.getName(), method.getParameterTypes());
- return realMethod.invoke(object, args);
- } catch (NoSuchMethodException e) {
- return NULL_VALUES.get(method.getReturnType());
- } catch (Throwable t) {
- throw t;
- }
- }
-
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/EditMask.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/EditMask.java
deleted file mode 100644
index 484922e9..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/EditMask.java
+++ /dev/null
@@ -1,451 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 The Pampered Chef and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * The Pampered Chef - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.examples.databinding.mask;
-
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyChangeSupport;
-
-import org.eclipse.jface.examples.databinding.mask.internal.EditMaskParser;
-import org.eclipse.jface.examples.databinding.mask.internal.SWTUtil;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.FocusAdapter;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.FocusListener;
-import org.eclipse.swt.events.VerifyEvent;
-import org.eclipse.swt.events.VerifyListener;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * Ensures text widget has the format specified by the edit mask. Edit masks
- * are currently defined as follows:
- *
- * The following characters are reserved words that match specific kinds of
- * characters:
- *
- * # - digits 0-9
- * A - uppercase A-Z
- * a - upper or lowercase a-z, A-Z
- * n - alphanumeric 0-9, a-z, A-Z
- *
- * All other characters are literals. The above characters may be turned into
- * literals by preceeding them with a backslash. Use two backslashes to
- * denote a backslash.
- *
- * Examples:
- *
- * (###) ###-#### U.S. phone number
- * ###-##-#### U.S. Social Security number
- * \\\### A literal backslash followed by a literal pound symbol followed by two digits
- *
- * Ideas for future expansion:
- *
- * Quantifiers as postfix modifiers to a token. ie:
- *
- * #{1, 2}/#{1,2}/#### MM/DD/YYYY date format allowing 1 or 2 digit month or day
- *
- * Literals may only be quantified as {0,1} which means that they only appear
- * if placeholders on both sides of the literal have data. This will be used
- * along with:
- *
- * Right-to-left support for numeric entry. When digits are being entered and
- * a decimal point is present in the mask, digits to the left of the decimal
- * are entered right-to-left but digits to the right of the decimal left-to-right.
- * This might need to be a separate type of edit mask. (NumericMask, maybe?)
- *
- * Example:
- *
- * $#{0,3},{0,1}#{0,3}.#{0,2} ie: $123,456.12 or $12.12 or $1,234.12 or $123.12
- *
- *
- * Here's the basic idea of how the current implementation works (the actual
- * implementation is slightly more abstracted and complicated than this):
- *
- * We always let the verify event pass if the user typed a new character or selected/deleted anything.
- * During the verify event, we post an async runnable.
- * Inside that async runnable, we:
- * - Remember the selection position
- * - getText(), then
- * - Strip out all literal characters from text
- * - Truncate the resulting string to raw length of edit mask without literals
- * - Insert literal characters back in the correct positions
- * - setText() the resulting string
- * - reset the selection to the correct location
- *
- * @since 3.3
- */
-public class EditMask {
-
- public static final String FIELD_TEXT = "text";
- public static final String FIELD_RAW_TEXT = "rawText";
- public static final String FIELD_COMPLETE = "complete";
- protected Text text;
- protected EditMaskParser editMaskParser;
- private boolean fireChangeOnKeystroke = true;
- private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);
-
- protected String oldValidRawText = "";
- protected String oldValidText = "";
-
- /**
- * Creates an instance that wraps around a text widget and manages its<br>
- * formatting.
- *
- * @param text
- * @param editMask
- */
- public EditMask(Text text) {
- this.text = text;
- }
-
- /**
- * @return the underlying Text control used by EditMask
- */
- public Text getControl() {
- return this.text;
- }
-
- /**
- * Set the edit mask string on the edit mask control.
- *
- * @param editMask The edit mask string
- */
- public void setMask(String editMask) {
- editMaskParser = new EditMaskParser(editMask);
- text.addVerifyListener(verifyListener);
- text.addFocusListener(focusListener);
- text.addDisposeListener(disposeListener);
- updateTextField.run();
- oldValidText = text.getText();
- oldValidRawText = editMaskParser.getRawResult();
- }
-
- /**
- * @param string Sets the text string in the receiver
- */
- public void setText(String string) {
- String oldValue = text.getText();
- if (editMaskParser != null) {
- editMaskParser.setInput(string);
- String formattedResult = editMaskParser.getFormattedResult();
- text.setText(formattedResult);
- firePropertyChange(FIELD_TEXT, oldValue, formattedResult);
- } else {
- text.setText(string);
- firePropertyChange(FIELD_TEXT, oldValue, string);
- }
- oldValidText = text.getText();
- oldValidRawText = editMaskParser.getRawResult();
- }
-
- /**
- * @return the actual (formatted) text
- */
- public String getText() {
- if (editMaskParser != null) {
- return editMaskParser.getFormattedResult();
- }
- return text.getText();
- }
-
- /**
- * setRawText takes raw text as a parameter but formats it before
- * setting the text in the Text control.
- *
- * @param string the raw (unformatted) text
- */
- public void setRawText(String string) {
- if (string == null) {
- string = "";
- }
- if (editMaskParser != null) {
- String oldValue = editMaskParser.getRawResult();
- editMaskParser.setInput(string);
- text.setText(editMaskParser.getFormattedResult());
- firePropertyChange(FIELD_RAW_TEXT, oldValue, string);
- } else {
- String oldValue = text.getText();
- text.setText(string);
- firePropertyChange(FIELD_RAW_TEXT, oldValue, string);
- }
- oldValidText = text.getText();
- oldValidRawText = editMaskParser.getRawResult();
- }
-
- /**
- * @return The input text with literals removed
- */
- public String getRawText() {
- if (editMaskParser != null) {
- return editMaskParser.getRawResult();
- }
- return text.getText();
- }
-
- /**
- * @return true if the field is complete according to the mask; false otherwise
- */
- public boolean isComplete() {
- if (editMaskParser == null) {
- return true;
- }
- return editMaskParser.isComplete();
- }
-
- /**
- * Returns the placeholder character. The placeholder
- * character must be a different character than any character that is
- * allowed as input anywhere in the edit mask. For example, if the edit
- * mask permits spaces to be used as input anywhere, the placeholder
- * character must be something other than a space character.
- * <p>
- * The space character is the default placeholder character.
- *
- * @return the placeholder character
- */
- public char getPlaceholder() {
- if (editMaskParser == null) {
- throw new IllegalArgumentException("Have to set an edit mask first");
- }
- return editMaskParser.getPlaceholder();
- }
-
- /**
- * Sets the placeholder character for the edit mask. The placeholder
- * character must be a different character than any character that is
- * allowed as input anywhere in the edit mask. For example, if the edit
- * mask permits spaces to be used as input anywhere, the placeholder
- * character must be something other than a space character.
- * <p>
- * The space character is the default placeholder character.
- *
- * @param placeholder The character to use as a placeholder
- */
- public void setPlaceholder(char placeholder) {
- if (editMaskParser == null) {
- throw new IllegalArgumentException("Have to set an edit mask first");
- }
- editMaskParser.setPlaceholder(placeholder);
- updateTextField.run();
- oldValidText = text.getText();
- }
-
- /**
- * Indicates if change notifications will be fired after every keystroke
- * that affects the value of the rawText or only when the value is either
- * complete or empty.
- *
- * @return true if every change (including changes from one invalid state to
- * another) triggers a change event; false if only empty or valid
- * values trigger a change event. Defaults to false.
- */
- public boolean isFireChangeOnKeystroke() {
- return fireChangeOnKeystroke;
- }
-
- /**
- * Sets if change notifications will be fired after every keystroke that
- * affects the value of the rawText or only when the value is either
- * complete or empty.
- *
- * @param fireChangeOnKeystroke
- * true if every change (including changes from one invalid state
- * to another) triggers a change event; false if only empty or
- * valid values trigger a change event. Defaults to false.
- */
- public void setFireChangeOnKeystroke(boolean fireChangeOnKeystroke) {
- this.fireChangeOnKeystroke = fireChangeOnKeystroke;
- }
-
- /**
- * JavaBeans boilerplate code...
- *
- * @param listener
- */
- public void addPropertyChangeListener(PropertyChangeListener listener) {
- propertyChangeSupport.addPropertyChangeListener(listener);
- }
-
- /**
- * JavaBeans boilerplate code...
- *
- * @param propertyName
- * @param listener
- */
- public void addPropertyChangeListener(String propertyName,
- PropertyChangeListener listener) {
- propertyChangeSupport.addPropertyChangeListener(propertyName, listener);
- }
-
- /**
- * JavaBeans boilerplate code...
- *
- * @param listener
- */
- public void removePropertyChangeListener(PropertyChangeListener listener) {
- propertyChangeSupport.removePropertyChangeListener(listener);
- }
-
- /**
- * JavaBeans boilerplate code...
- *
- * @param propertyName
- * @param listener
- */
- public void removePropertyChangeListener(String propertyName,
- PropertyChangeListener listener) {
- propertyChangeSupport.removePropertyChangeListener(propertyName,
- listener);
- }
-
- private boolean isEitherValueNotNull(Object oldValue, Object newValue) {
- return oldValue != null || newValue != null;
- }
-
- private void firePropertyChange(String propertyName, Object oldValue,
- Object newValue) {
- if (isEitherValueNotNull(oldValue, newValue)) {
- propertyChangeSupport.firePropertyChange(propertyName,
- oldValue, newValue);
- }
- }
-
- protected boolean updating = false;
-
- protected int oldSelection = 0;
- protected int selection = 0;
- protected String oldRawText = "";
- protected boolean replacedSelectedText = false;
-
- private VerifyListener verifyListener = new VerifyListener() {
- public void verifyText(VerifyEvent e) {
- // If the edit mask is already full, don't let the user type
- // any new characters
- if (editMaskParser.isComplete() && // should eventually be .isFull() to account for optional characters
- e.start == e.end &&
- e.text.length() > 0)
- {
- e.doit=false;
- return;
- }
-
- oldSelection = selection;
- Point selectionRange = text.getSelection();
- selection = selectionRange.x;
-
- if (!updating) {
- replacedSelectedText = false;
- if (selectionRange.y - selectionRange.x > 0 && e.text.length() > 0) {
- replacedSelectedText = true;
- }
- // If the machine is loaded down (ie: spyware, malware), we might
- // get another keystroke before asyncExec can process, so we use
- // greedyExec instead.
- SWTUtil.greedyExec(Display.getCurrent(), updateTextField);
-// Display.getCurrent().asyncExec(updateTextField);
- }
- }
- };
-
- private Runnable updateTextField = new Runnable() {
- public void run() {
- updating = true;
- try {
- if (!text.isDisposed()) {
- Boolean oldIsComplete = new Boolean(editMaskParser.isComplete());
-
- editMaskParser.setInput(text.getText());
- text.setText(editMaskParser.getFormattedResult());
- String newRawText = editMaskParser.getRawResult();
-
- updateSelectionPosition(newRawText);
- firePropertyChangeEvents(oldIsComplete, newRawText);
- }
- } finally {
- updating = false;
- }
- }
-
- private void updateSelectionPosition(String newRawText) {
-
- // Adjust the selection
- if (isInsertingNewCharacter(newRawText) || replacedSelectedText) {
- // Find the position after where the new character was actually inserted
- int selectionDelta =
- editMaskParser.getNextInputPosition(oldSelection)
- - oldSelection;
- if (selectionDelta == 0) {
- selectionDelta = editMaskParser.getNextInputPosition(selection)
- - selection;
- }
- selection += selectionDelta;
- }
-
- // Did we just type something that was accepted by the mask?
- if (!newRawText.equals(oldRawText)) { // yep
-
- // If the user hits <end>, bounce them back to the end of their actual input
- int firstIncompletePosition = editMaskParser.getFirstIncompleteInputPosition();
- if (firstIncompletePosition > 0 && selection > firstIncompletePosition)
- selection = firstIncompletePosition;
- text.setSelection(new Point(selection, selection));
-
- } else { // nothing was accepted by the mask
-
- // Either we backspaced over a literal or we typed an illegal character
- if (selection > oldSelection) { // typed an illegal character; backup
- text.setSelection(new Point(selection-1, selection-1));
- } else { // backspaced over a literal; don't interfere with selection position
- text.setSelection(new Point(selection, selection));
- }
- }
- oldRawText = newRawText;
- }
-
- private boolean isInsertingNewCharacter(String newRawText) {
- return newRawText.length() > oldRawText.length();
- }
-
- private void firePropertyChangeEvents(Boolean oldIsComplete, String newRawText) {
- Boolean newIsComplete = new Boolean(editMaskParser.isComplete());
- if (!oldIsComplete.equals(newIsComplete)) {
- firePropertyChange(FIELD_COMPLETE, oldIsComplete, newIsComplete);
- }
- if (!newRawText.equals(oldValidRawText)) {
- if ( newIsComplete.booleanValue() || "".equals(newRawText) || fireChangeOnKeystroke) {
- firePropertyChange(FIELD_RAW_TEXT, oldValidRawText, newRawText);
- firePropertyChange(FIELD_TEXT, oldValidText, text.getText());
- oldValidText = text.getText();
- oldValidRawText = newRawText;
- }
- }
- }
- };
-
- private FocusListener focusListener = new FocusAdapter() {
- public void focusGained(FocusEvent e) {
- selection = editMaskParser.getFirstIncompleteInputPosition();
- text.setSelection(selection, selection);
- }
- };
-
- private DisposeListener disposeListener = new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- text.removeVerifyListener(verifyListener);
- text.removeFocusListener(focusListener);
- text.removeDisposeListener(disposeListener);
- }
- };
-
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/EditMaskParseException.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/EditMaskParseException.java
deleted file mode 100644
index f2b6aece..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/EditMaskParseException.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 The Pampered Chef and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * The Pampered Chef - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.examples.databinding.mask;
-
-/**
- * Indicates a parse error while parsing an edit mask.
- *
- * @since 3.3
- */
-public class EditMaskParseException extends RuntimeException {
-
- private static final long serialVersionUID = 8142999683999681500L;
-
- /**
- * Construct a MaskParseException
- */
- public EditMaskParseException() {
- super();
- }
-
- /**
- * @param message
- * @param cause
- */
- public EditMaskParseException(String message, Throwable cause) {
- super(message, cause);
- }
-
- /**
- * @param message
- */
- public EditMaskParseException(String message) {
- super(message);
- }
-
- /**
- * @param cause
- */
- public EditMaskParseException(Throwable cause) {
- super(cause);
- }
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/EditMaskTest.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/EditMaskTest.java
deleted file mode 100644
index f5d7139f..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/EditMaskTest.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.eclipse.jface.examples.databinding.mask;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.RowLayout;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-public class EditMaskTest {
-
- public static void main(String[] args) {
- Display display = new Display();
- Shell shell = new Shell(display);
-
- Text text = new Text(shell, SWT.BORDER);
- text.setText("XXXXXXXXXXXXX");// Put some X's in there to pad out the field's default size
-
- Text text2 = new Text(shell, SWT.BORDER);
- text2.setText("630XXXXXXXXXX");
-
- shell.setLayout(new RowLayout(SWT.VERTICAL));
- shell.setSize(800, 600);
-
- new EditMask(text).setMask("(###) ###-####");
- new EditMask(text2).setMask("(###) ###-####");
-
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) {
- display.sleep();
- }
- }
- }
-
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/internal/EditMaskLexerAndToken.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/internal/EditMaskLexerAndToken.java
deleted file mode 100644
index d9c61b49..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/internal/EditMaskLexerAndToken.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 The Pampered Chef and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * The Pampered Chef - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.examples.databinding.mask.internal;
-
-import java.util.ArrayList;
-
-import org.eclipse.jface.examples.databinding.mask.EditMaskParseException;
-
-/**
- * Lexical analyzer and token for an input mask. Since input masks have exactly
- * one token type, we use the same class to be the recognizer and the token
- * itself.
- *
- * @since 3.3
- */
-public class EditMaskLexerAndToken {
-
- /*
- * First the literals that represent the types of characters
- */
- private static ArrayList reservedWords = new ArrayList();{
- reservedWords.add("#");
- reservedWords.add("A");
- reservedWords.add("a");
- reservedWords.add("n");
- }
-
- /*
- * ...and their corresponding regular expressions
- */
- private static ArrayList inputRegexes = new ArrayList();{
- inputRegexes.add("^[0-9]$");
- inputRegexes.add("^[A-Z]$");
- inputRegexes.add("^[a-zA-Z]$");
- inputRegexes.add("^[0-9a-zA-Z]$");
- }
-
- private String charRegex = null; // A regex for matching input characters or null
- private String literal = null; // The literal character if charRegex is null
- private boolean readOnly;
- private String input = null; // The user's input
-
- private boolean recognizeReservedWord(String inputMask, int position) {
- String input = inputMask.substring(position, position+1);
- for (int reservedWord = 0; reservedWord < reservedWords.size(); reservedWord++) {
- if (input.equals(reservedWords.get(reservedWord))) {
- charRegex = (String) inputRegexes.get(reservedWord);
- literal = null;
- input = null;
- readOnly = false;
- return true;
- }
- }
- return false;
- }
-
- private boolean recognizeBackslashLiteral(String inputMask, int position) throws EditMaskParseException {
- String input = inputMask.substring(position, position+1);
- if (input.equals("\\")) {
- try {
- input = inputMask.substring(position+1, position+2);
- charRegex = null;
- this.input = input;
- literal = input;
- readOnly = true;
- return true;
- } catch (Throwable t) {
- throw new EditMaskParseException("Found a \\ without a character after it: " + inputMask);
- }
- }
- return false;
- }
-
- private boolean recognizeLiteral(String inputMask, int position) {
- literal = inputMask.substring(position, position+1);
- this.input = literal;
- charRegex = null;
- readOnly = true;
- return true;
- }
-
- /**
- * Initializes itself based on characters in edit mask starting at position;
- * returns number of chars consumed
- *
- * @param inputMask The entire edit mask
- * @param position The position to begin parsing
- * @return The number of characters consumed
- * @throws EditMaskParseException If it encountered a syntax error during the parse
- */
- public int initializeEditMask(String inputMask, int position) throws EditMaskParseException {
- clear();
- if (recognizeReservedWord(inputMask, position)) {
- return 1;
- }
- if (recognizeBackslashLiteral(inputMask, position)) {
- return 2;
- }
- if (!recognizeLiteral(inputMask, position)) {
- throw new EditMaskParseException("Should never see this error in this implementation!");
- }
- readOnly = true;
- return 1;
- }
-
- /**
- * ignores invalid input; stores valid input
- * @param inputCharacter
- * @return
- */
- public boolean accept(String inputCharacter) {
- if (readOnly) {
- return false;
- }
- if (literal != null) {
- return false;
- }
- if (!canAcceptMoreCharacters()) {
- return false;
- }
- if (inputCharacter.matches(charRegex)) {
- this.input = inputCharacter;
- return true;
- }
- return false;
- }
-
- /**
- * @return Returns the characters it has accepted. In the current implementation,
- * this is exactly one character. Once quantifiers are implemented, this could
- * be many characters. If no characters have been accepted, returns null.
- */
- public String getInput() {
- return input;
- }
-
- /**
- * Clear any accepted input
- */
- public void clear() {
- if (!isReadOnly())
- input = null;
- }
-
- /**
- * @return true if it's a literal; false if it's a placeholder
- */
- public boolean isReadOnly() {
- return readOnly;
- }
-
- /**
- * @return true if it is a literal or if it has accepted the minimum
- * required number of characters
- */
- public boolean isComplete() {
- if (input != null) {
- return true;
- }
- return false;
- }
-
- /**
- * @return A position may be complete and yet able to accept more characters if
- * the position includes optional characters via a quantifier of some type.
- * Not implemented right now.
- */
- public boolean canAcceptMoreCharacters() {
- return !isComplete();
- }
-
- /**
- * @return the minimum number of characters this RegexLexer must accept
- * in order to be complete. Because we don't yet support quantifiers, this
- * is currently always 1.
- */
- public int getMinimumLength() {
- return 1;
- }
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/internal/EditMaskParser.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/internal/EditMaskParser.java
deleted file mode 100644
index fc87f9e3..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/internal/EditMaskParser.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 The Pampered Chef and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * The Pampered Chef - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.examples.databinding.mask.internal;
-
-import java.util.LinkedList;
-
-import org.eclipse.jface.examples.databinding.mask.EditMaskParseException;
-
-/**
- * @since 3.3
- */
-public class EditMaskParser {
- private EditMaskLexerAndToken[] expectedTokens;
- private char placeholder = ' ';
-
- /**
- * @param editMask The complete edit mask
- * @throws EditMaskParseException
- */
- public EditMaskParser(String editMask) throws EditMaskParseException {
- LinkedList tokens = new LinkedList();
- int position = 0;
- while (position < editMask.length()) {
- EditMaskLexerAndToken token = new EditMaskLexerAndToken();
- position += token.initializeEditMask(editMask, position);
- tokens.add(token);
- }
- expectedTokens = (EditMaskLexerAndToken[]) tokens.toArray(new EditMaskLexerAndToken[tokens.size()]);
- }
-
- /**
- * @param input the user input which may or may not be in valid format
- */
- public void setInput(String input) {
- for (int i = 0; i < expectedTokens.length; i++) {
- expectedTokens[i].clear();
- }
- int tokenPosition = 0;
- int inputPosition = 0;
- while (inputPosition < input.length() && tokenPosition < expectedTokens.length) {
- while (tokenPosition < expectedTokens.length &&
- (expectedTokens[tokenPosition].isComplete() ||
- expectedTokens[tokenPosition].isReadOnly()))
- {
- ++tokenPosition;
- }
- if (tokenPosition < expectedTokens.length) {
- while (inputPosition < input.length() && !expectedTokens[tokenPosition].isComplete()) {
- String inputChar = input.substring(inputPosition, inputPosition+1);
- expectedTokens[tokenPosition].accept(inputChar);
- ++inputPosition;
- }
- }
- }
- }
-
- /**
- * @return the formatted version of the user input
- */
- public String getFormattedResult() {
- StringBuffer result = new StringBuffer();
- for (int i = 0; i < expectedTokens.length; i++) {
- String outputChar = expectedTokens[i].getInput();
- if (outputChar == null) {
- outputChar = "" + placeholder;
- }
- result.append(outputChar);
- }
- return result.toString();
- }
-
- /**
- * @return the user input with all literals removed
- */
- public String getRawResult() {
- StringBuffer result = new StringBuffer();
- for (int i = 0; i < expectedTokens.length; i++) {
- if (expectedTokens[i].isReadOnly()) {
- continue;
- }
- String outputChar = expectedTokens[i].getInput();
- if (outputChar == null) {
- outputChar = "";
- }
- result.append(outputChar);
- }
- return result.toString();
- }
-
- /**
- * @return true if the current input is a valid input
- */
- public boolean isComplete() {
- for (int i = 0; i < expectedTokens.length; i++) {
- if (!expectedTokens[i].isComplete()) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * @param startingAt The current index within the user input string
- * @return The first non-read-only index greater than or equal to startingAt
- */
- public int getNextInputPosition(int startingAt) {
- while (startingAt < expectedTokens.length-1 && expectedTokens[startingAt].isReadOnly()) {
- ++startingAt;
- }
- return startingAt;
- }
-
- /**
- * @return the first input position whose token is not marked as complete. Returns -1 if all are complete
- */
- public int getFirstIncompleteInputPosition() {
- for (int position = 0; position < expectedTokens.length; position++) {
- if (!expectedTokens[position].isComplete()) {
- return position;
- }
- }
- return -1;
- }
-
- /**
- * @return Returns the placeholder.
- */
- public char getPlaceholder() {
- return placeholder;
- }
-
- /**
- * @param placeholder The placeholder to set.
- */
- public void setPlaceholder(char placeholder) {
- this.placeholder = placeholder;
- }
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/internal/SWTUtil.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/internal/SWTUtil.java
deleted file mode 100644
index 333449cb..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/internal/SWTUtil.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jface.examples.databinding.mask.internal;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.jface.util.SafeRunnable;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * @since 1.0
- */
-public class SWTUtil {
- /**
- * Stores a work queue for each display
- */
- private static Map mapDisplayOntoWorkQueue = new HashMap();
-
- private SWTUtil() {
- }
-
- /**
- * Runs the given runnable on the given display as soon as possible. If
- * possible, the runnable will be executed before the next widget is
- * repainted, but this behavior is not guaranteed. Use this method to
- * schedule work will affect the way one or more widgets are drawn.
- *
- * <p>
- * This is threadsafe.
- * </p>
- *
- * @param d
- * display
- * @param r
- * runnable to execute in the UI thread.
- */
- public static void greedyExec(Display d, Runnable r) {
- if (d.isDisposed()) {
- return;
- }
-
- // if (Display.getCurrent() == d) {
- // r.run();
- // } else {
- WorkQueue queue = getQueueFor(d);
- queue.asyncExec(r);
- // }
- }
-
- /**
- * Runs the given runnable on the given display as soon as possible. Unlike
- * greedyExec, this has no effect if the given runnable has already been
- * scheduled for execution. Use this method to schedule work that will
- * affect the way one or more wigdets are drawn, but that should only happen
- * once.
- *
- * <p>
- * This is threadsafe.
- * </p>
- *
- * @param d
- * display
- * @param r
- * runnable to execute in the UI thread. Has no effect if the
- * given runnable has already been scheduled but has not yet run.
- */
- public static void runOnce(Display d, Runnable r) {
- if (d.isDisposed()) {
- return;
- }
- WorkQueue queue = getQueueFor(d);
- queue.runOnce(r);
- }
-
- /**
- * Cancels a greedyExec or runOnce that was previously scheduled on the
- * given display. Has no effect if the given runnable is not in the queue
- * for the given display
- *
- * @param d
- * target display
- * @param r
- * runnable to execute
- */
- public static void cancelExec(Display d, Runnable r) {
- if (d.isDisposed()) {
- return;
- }
- WorkQueue queue = getQueueFor(d);
- queue.cancelExec(r);
- }
-
- /**
- * Returns the work queue for the given display. Creates a work queue if
- * none exists yet.
- *
- * @param d
- * display to return queue for
- * @return a work queue (never null)
- */
- private static WorkQueue getQueueFor(final Display d) {
- WorkQueue result;
- synchronized (mapDisplayOntoWorkQueue) {
- // Look for existing queue
- result = (WorkQueue) mapDisplayOntoWorkQueue.get(d);
-
- if (result == null) {
- // If none, create new queue
- result = new WorkQueue(d);
- final WorkQueue q = result;
- mapDisplayOntoWorkQueue.put(d, result);
- d.asyncExec(new Runnable() {
- public void run() {
- d.disposeExec(new Runnable() {
- public void run() {
- synchronized (mapDisplayOntoWorkQueue) {
- q.cancelAll();
- mapDisplayOntoWorkQueue.remove(d);
- }
- }
- });
- }
- });
- }
- return result;
- }
- }
-
- /**
- * @param rgb1
- * @param rgb2
- * @param ratio
- * @return the RGB object
- */
- public static RGB mix(RGB rgb1, RGB rgb2, double ratio) {
- return new RGB(interp(rgb1.red, rgb2.red, ratio),
- interp(rgb1.green, rgb2.green, ratio),
- interp(rgb1.blue, rgb2.blue, ratio));
- }
-
- private static int interp(int i1, int i2, double ratio) {
- int result = (int)(i1 * ratio + i2 * (1.0d - ratio));
- if (result < 0) result = 0;
- if (result > 255) result = 255;
- return result;
- }
-
- /**
- * Logs an exception as though it was thrown by a SafeRunnable
- * being run with the default ISafeRunnableRunner. Will not
- * open modal dialogs or spin the event loop.
- *
- * @param t throwable to log
- */
- public static void logException(final Exception t) {
- SafeRunnable.run(new SafeRunnable() {
- public void run() throws Exception {
- throw t;
- }
- public void handleException(Throwable e) {
- // IMPORTANT: Do not call the super implementation, since
- // it opens a modal dialog, and may cause *syncExecs to run
- // too early.
- }
- });
- }
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/internal/WorkQueue.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/internal/WorkQueue.java
deleted file mode 100644
index e5eeaea2..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/internal/WorkQueue.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jface.examples.databinding.mask.internal;
-
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.Set;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-
-/**
- * @since 3.2
- *
- */
-public class WorkQueue {
-
- private boolean updateScheduled = false;
-
- private boolean paintListenerAttached = false;
-
- private LinkedList pendingWork = new LinkedList();
-
- private Display d;
-
- private Set pendingWorkSet = new HashSet();
-
- private Runnable updateJob = new Runnable() {
- public void run() {
- doUpdate();
- updateScheduled = false;
- }
- };
-
- private Listener paintListener = new Listener() {
- public void handleEvent(Event event) {
- paintListenerAttached = false;
- d.removeFilter(SWT.Paint, this);
- doUpdate();
- }
- };
-
- /**
- * @param targetDisplay
- */
- public WorkQueue(Display targetDisplay) {
- d = targetDisplay;
- }
-
- private void doUpdate() {
- for (;;) {
- Runnable next;
- synchronized (pendingWork) {
- if (pendingWork.isEmpty()) {
- break;
- }
- next = (Runnable) pendingWork.removeFirst();
- pendingWorkSet.remove(next);
- }
-
- next.run();
- }
-
- }
-
- /**
- * Schedules some work to happen in the UI thread as soon as possible. If
- * possible, the work will happen before the next control redraws. The given
- * runnable will only be run once. Has no effect if this runnable has
- * already been queued for execution.
- *
- * @param work
- * runnable to execute
- */
- public void runOnce(Runnable work) {
- synchronized (pendingWork) {
- if (pendingWorkSet.contains(work)) {
- return;
- }
-
- pendingWorkSet.add(work);
-
- asyncExec(work);
- }
- }
-
- /**
- * Schedules some work to happen in the UI thread as soon as possible. If
- * possible, the work will happen before the next control redraws. Unlike
- * runOnce, calling asyncExec twice with the same runnable will cause that
- * runnable to run twice.
- *
- * @param work
- * runnable to execute
- */
- public void asyncExec(Runnable work) {
- synchronized (pendingWork) {
- pendingWork.add(work);
- if (!updateScheduled) {
- updateScheduled = true;
- d.asyncExec(updateJob);
- }
-
- // If we're in the UI thread, add an event filter to ensure
- // the work happens ASAP
- if (Display.getCurrent() == d) {
- if (!paintListenerAttached) {
- paintListenerAttached = true;
- d.addFilter(SWT.Paint, paintListener);
- }
- }
- }
- }
-
- /**
- * Cancels a previously-scheduled runnable. Has no effect if the given
- * runnable was not previously scheduled or has already executed.
- *
- * @param toCancel
- * runnable to cancel
- */
- public void cancelExec(Runnable toCancel) {
- synchronized (pendingWork) {
- pendingWork.remove(toCancel);
- pendingWorkSet.remove(toCancel);
- }
- }
-
- /**
- * Cancels all pending work.
- */
- public void cancelAll() {
- synchronized (pendingWork) {
- pendingWork.clear();
- pendingWorkSet.clear();
- }
- }
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Account.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Account.java
deleted file mode 100644
index 7509d647..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Account.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jface.examples.databinding.model;
-
-import java.util.Date;
-
-import org.eclipse.jface.examples.databinding.ModelObject;
-
-public class Account extends ModelObject {
-
- private String country;
- private String firstName;
- private String lastName;
- private String state;
- private String phone;
- private Date expiryDate;
-
- public void setFirstName(String string) {
- String oldValue = firstName;
- firstName = string;
- firePropertyChange("firstName", oldValue, string);
- }
-
- public void setLastName(String string) {
- String oldValue = lastName;
- lastName = string;
- firePropertyChange("lastName", oldValue, string);
- }
-
- public void setState(String string) {
- String oldValue = state;
- state = string;
- firePropertyChange("state", oldValue, string);
- }
-
- public void setPhone(String string) {
- String oldValue = phone;
- phone = string;
- firePropertyChange("phone", oldValue, phone);
- }
-
- public void setCountry(String string) {
- Object oldValue = country;
- country = string;
- firePropertyChange("country", oldValue, string);
- }
-
- public String getCountry() {
- return country;
- }
-
- public String getFirstName() {
- return firstName;
- }
-
- public String getLastName() {
- return lastName;
- }
-
- public String getState() {
- return state;
- }
-
- public String getPhone() {
- return phone;
- }
-
- public Date getExpiryDate() {
- return expiryDate;
- }
-
- public void setExpiryDate(Date expiryDate) {
- firePropertyChange("expiryDate", this.expiryDate,
- this.expiryDate = expiryDate);
- }
-
-} \ No newline at end of file
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Adventure.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Adventure.java
deleted file mode 100644
index d78eed03..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Adventure.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jface.examples.databinding.model;
-
-import org.eclipse.core.databinding.validation.IValidator;
-import org.eclipse.core.databinding.validation.ValidationStatus;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.examples.databinding.ModelObject;
-
-public class Adventure extends ModelObject {
-
- private boolean petsAllowed;
-
- private double price;
-
- private Lodging defaultLodging;
-
- private String name;
-
- private String description;
-
- private String location;
-
- private int maxNumberOfPeople;
-
- public String getName() {
- return name;
- }
-
- public void setName(String string) {
- Object oldValue = name;
- name = string;
- firePropertyChange("name", oldValue, name);
- }
-
- public int getMaxNumberOfPeople(){
- return maxNumberOfPeople;
- }
-
- public void setMaxNumberOfPeople(int anInt) {
- int oldValue = maxNumberOfPeople;
- maxNumberOfPeople = anInt;
- firePropertyChange("maxNumberOfPeople", oldValue, maxNumberOfPeople);
- }
-
- public IValidator getMaxNumberOfPeopleDomainValidator() {
- return new IValidator() {
- public IStatus validate(Object value) {
- int intValue = ((Integer)value).intValue();
- if (intValue < 1 || intValue > 20) {
- return ValidationStatus
- .error("Max number of people must be between 1 and 20 inclusive");
- }
- return null;
- }
- };
- }
-
- public Lodging getDefaultLodging() {
- return defaultLodging;
- }
-
- public void setDefaultLodging(Lodging lodging) {
- Object oldValue = defaultLodging;
- defaultLodging = lodging;
- firePropertyChange("defaultLodging", oldValue, defaultLodging);
- }
-
- public void setPrice(double d) {
- double oldValue = price;
- price = d;
- firePropertyChange("price", new Double(oldValue), new Double(price));
- }
-
- public double getPrice() {
- return price;
- }
-
- public void setPetsAllowed(boolean b) {
- boolean oldValue = petsAllowed;
- petsAllowed = b;
- firePropertyChange("petsAllowed", new Boolean(oldValue), new Boolean(
- petsAllowed));
- }
-
- public boolean isPetsAllowed() {
- return petsAllowed;
- }
-
- public void setDescription(String string) {
- Object oldValue = description;
- description = string;
- firePropertyChange("description", oldValue, description);
- }
-
- public void setLocation(String string) {
- Object oldValue = location;
- location = string;
- firePropertyChange("location", oldValue, location);
- }
-
- public String getDescription() {
- return description;
- }
-
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/AdventureFactory.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/AdventureFactory.java
deleted file mode 100644
index 2b95e139..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/AdventureFactory.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jface.examples.databinding.model;
-
-public class AdventureFactory {
-
- public Catalog createCatalog() {
- return new Catalog();
- }
-
- public Category createCategory() {
- return new Category();
- }
-
- public Adventure createAdventure() {
- return new Adventure();
- }
-
- public Lodging createLodging() {
- return new Lodging();
- }
-
- public Transportation createTransportation() {
- return new Transportation();
- }
-
- public Account createAccount() {
- return new Account();
- }
-
- public Cart createCart() {
- return new Cart();
- }
-
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/AggregateObservableValue.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/AggregateObservableValue.java
deleted file mode 100644
index 0606d436..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/AggregateObservableValue.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164653
- *******************************************************************************/
-package org.eclipse.jface.examples.databinding.model;
-
-import java.util.StringTokenizer;
-
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.value.AbstractObservableValue;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.databinding.observable.value.IValueChangeListener;
-import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
-
-/**
- * @since 3.2
- *
- */
-public class AggregateObservableValue extends AbstractObservableValue {
-
- private IObservableValue[] observableValues;
-
- private String delimiter;
-
- private boolean updating = false;
-
- private String currentValue;
-
- private IValueChangeListener listener = new IValueChangeListener() {
- public void handleValueChange(ValueChangeEvent event) {
- if (!updating) {
- fireValueChange(Diffs.createValueDiff(currentValue,
- doGetValue()));
- }
- }
- };
-
- /**
- * @param observableValues
- * @param delimiter
- */
- public AggregateObservableValue(IObservableValue[] observableValues,
- String delimiter) {
- this.observableValues = observableValues;
- this.delimiter = delimiter;
- for (int i = 0; i < observableValues.length; i++) {
- observableValues[i].addValueChangeListener(listener);
- }
- doGetValue();
- }
-
- public void doSetValue(Object value) {
- Object oldValue = doGetValue();
- StringTokenizer tokenizer = new StringTokenizer((String) value,
- delimiter);
- try {
- updating = true;
- for (int i = 0; i < observableValues.length; i++) {
- if (tokenizer.hasMoreElements()) {
- observableValues[i].setValue(tokenizer.nextElement());
- } else {
- observableValues[i].setValue(null);
- }
- }
- } finally {
- updating = false;
- }
- doGetValue();
- fireValueChange(Diffs.createValueDiff(oldValue, value));
- }
-
- public Object doGetValue() {
- StringBuffer result = new StringBuffer();
- for (int i = 0; i < observableValues.length; i++) {
- if (i > 0 & i < observableValues.length) {
- result.append(delimiter);
- }
- result.append(observableValues[i].getValue());
- }
- currentValue = result.toString();
- return currentValue;
- }
-
- public Object getValueType() {
- return String.class;
- }
-
- public void dispose() {
- for (int i = 0; i < observableValues.length; i++) {
- observableValues[i].removeValueChangeListener(listener);
- }
- super.dispose();
- }
-
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Cart.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Cart.java
deleted file mode 100644
index b82f45eb..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Cart.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jface.examples.databinding.model;
-
-public class Cart {
-
- public void setAdventureDays(int i) {
- // TODO Auto-generated method stub
-
- }
-
- public int getLodgingDays() {
- // TODO Auto-generated method stub
- return 0;
- }
-
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Catalog.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Catalog.java
deleted file mode 100644
index 0c0aa591..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Catalog.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jface.examples.databinding.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.examples.databinding.ModelObject;
-
-public class Catalog extends ModelObject {
-
- private Category[] categories = new Category[0];
-
- private Lodging[] lodgings = new Lodging[0];
-
- private Transportation[] transportations = new Transportation[0];
-
- private Account[] accounts = new Account[0];
-
- private List signons = new ArrayList();
-
- public List getSignons(){
- return signons;
- }
-
- public void addSignon(Signon aSignon){
- signons.add(aSignon);
- firePropertyChange("signons",null,null);
- }
-
- public void removeSignon(Signon aSignon){
- signons.remove(aSignon);
- firePropertyChange("signons",null,null);
- }
-
- public Category[] getCategories() {
- return categories;
- }
-
- public void addCategory(Category category) {
- categories = (Category[]) append(categories, category);
- firePropertyChange("categories", null, null);
- }
-
- public void addLodging(Lodging lodging) {
- lodgings = (Lodging[]) append(lodgings, lodging);
- firePropertyChange("lodgings", null, null);
- }
-
- public void addTransportation(Transportation transportation) {
- transportations = (Transportation[]) append(transportations, transportation);
- firePropertyChange("transportations", null, null);
- }
-
- public void addAccount(Account account) {
- accounts = (Account[]) append(accounts, account);
- firePropertyChange("accounts", null, null);
- }
-
- public Lodging[] getLodgings() {
- return lodgings;
- }
-
- public void removeLodging(Lodging lodging) {
- lodgings = (Lodging[]) remove(lodgings, lodging);
- firePropertyChange("lodgings", null, null);
- }
-
- public void removeAccount(Account anAccount) {
- accounts = (Account[]) remove(accounts, anAccount);
- firePropertyChange("accounts", null, null);
- }
-
- public Account[] getAccounts() {
- return accounts;
- }
-
- public Transportation[] getTransporations(){
- return transportations;
- }
-
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Category.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Category.java
deleted file mode 100644
index f4a14313..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Category.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jface.examples.databinding.model;
-
-import org.eclipse.jface.examples.databinding.ModelObject;
-
-public class Category extends ModelObject {
-
- private String name;
-
- private Adventure[] adventures = new Adventure[0];
-
- public void setName(String string) {
- Object oldValue = name;
- name = string;
- firePropertyChange("name", oldValue, name);
- }
-
- public void addAdventure(Adventure adventure) {
- adventures = (Adventure[]) append(adventures, adventure);
- firePropertyChange("adventures", null, null);
- }
-
- public Adventure[] getAdventures() {
- return adventures;
- }
-
- public String getName() {
- return name;
- }
-
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Lodging.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Lodging.java
deleted file mode 100644
index 642bb1a7..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Lodging.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jface.examples.databinding.model;
-
-import org.eclipse.jface.examples.databinding.ModelObject;
-
-public class Lodging extends ModelObject {
-
- private String name;
- private String description;
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String string) {
- Object oldValue = description;
- description = string;
- firePropertyChange("description",oldValue,description);
- }
-
- public void setName(String string) {
- Object oldValue = name;
- name = string;
- firePropertyChange("name",oldValue,name);
- }
-
- public String getName() {
- return name;
- }
-
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/PriceModelObject.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/PriceModelObject.java
deleted file mode 100644
index d15f9dd3..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/PriceModelObject.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jface.examples.databinding.model;
-
-import org.eclipse.jface.examples.databinding.ModelObject;
-
-
-public class PriceModelObject extends ModelObject {
-
- private double price;
-
- public double getDouble(){
- return price;
- }
- public void setPrice(double aPrice){
- int oldDollars = getDollars();
- int oldCents = getCents();
- double oldValue = price;
- price = aPrice;
- firePropertyChange("dollars",oldDollars,getDollars());
- firePropertyChange("cents",oldCents,getCents());
- firePropertyChange("price",new Double(oldValue), new Double(price));
- }
-
- public double getPrice(){
- return price;
- }
-
- public int getCents(){
- return (int) (100*price - 100*Math.floor(price));
- }
-
- public void setCents(int cents){
- double oldPrice = getPrice();
- int oldCents = getCents();
- price = getDollars() + cents *.01;
- firePropertyChange("cents",oldCents,getCents());
- firePropertyChange("price", new Double(oldPrice), new Double(price));
- }
-
- public int getDollars(){
- return new Double(price).intValue();
- }
-
- public void setDollars(int dollars){
- double oldPrice = getPrice();
- int oldDollars = getDollars();
- price = dollars + getCents() *.01;
- firePropertyChange("dollars",oldDollars,getDollars());
- firePropertyChange("price", new Double(oldPrice), new Double(price));
- }
-
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/SampleData.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/SampleData.java
deleted file mode 100644
index f30a1592..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/SampleData.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920
- *******************************************************************************/
-package org.eclipse.jface.examples.databinding.model;
-
-
-public class SampleData {
-
- public static Category WINTER_CATEGORY;
-
- public static Category SUMMER_CATEGORY;
-
- public static Adventure BEACH_HOLIDAY;
-
- public static Adventure RAFTING_HOLIDAY;
-
- public static Adventure WINTER_HOLIDAY;
-
- public static Adventure ICE_FISHING;
-
- public static Lodging FIVE_STAR_HOTEL;
-
- public static Lodging YOUTH_HOSTEL;
-
- public static Lodging CAMP_GROUND;
-
- public static Catalog CATALOG_2005;
-
- public static Transportation GREYHOUND_BUS;
-
- public static Transportation EXECUTIVE_JET;
-
- public static Account PRESIDENT;
-
- public static Account DENTIST;
-
- public static Account SANTA_CLAUS;
-
- public static Cart CART;
-
- public static AdventureFactory FACTORY;
-
- // public static ITree CATALOG_TREE;
- //
- // public static ITree CATEGORY_TREE;
-
- public static Signon SIGNON_ADMINISTRATOR;
-
- public static Signon SIGNON_JOEBLOGGS;
-
- static {
- initializeData();
- }
-
- public static void initializeData() {
-
- FACTORY = new AdventureFactory();
-
- CATALOG_2005 = FACTORY.createCatalog();
-
- // Categories
- WINTER_CATEGORY = FACTORY.createCategory();
- WINTER_CATEGORY.setName("Freeze Adventures");
- WINTER_CATEGORY.setId("100");
- CATALOG_2005.addCategory(WINTER_CATEGORY);
-
- SUMMER_CATEGORY = FACTORY.createCategory();
- SUMMER_CATEGORY.setName("Hot Adventures");
- SUMMER_CATEGORY.setId("200");
- CATALOG_2005.addCategory(SUMMER_CATEGORY);
-
- // Adventures
- WINTER_HOLIDAY = FACTORY.createAdventure();
- WINTER_HOLIDAY.setDescription("Winter holiday in France");
- WINTER_HOLIDAY.setName("Ski Alps");
- WINTER_HOLIDAY.setLocation("Chamonix");
- WINTER_HOLIDAY.setPrice(4000.52d);
- WINTER_HOLIDAY.setId("150");
- WINTER_HOLIDAY.setMaxNumberOfPeople(3);
- WINTER_CATEGORY.addAdventure(WINTER_HOLIDAY);
-
- ICE_FISHING = FACTORY.createAdventure();
- ICE_FISHING.setDescription("Ice Fishing in Helsinki");
- ICE_FISHING.setName("Ice Fishing");
- ICE_FISHING.setLocation("Finland");
- ICE_FISHING.setPrice(375.55d);
- WINTER_CATEGORY.addAdventure(ICE_FISHING);
-
- BEACH_HOLIDAY = FACTORY.createAdventure();
- BEACH_HOLIDAY.setDescription("Beach holiday in Spain");
- BEACH_HOLIDAY.setName("Playa");
- BEACH_HOLIDAY.setLocation("Lloret de Mar");
- BEACH_HOLIDAY.setPrice(2000.52d);
- BEACH_HOLIDAY.setId("250");
- SUMMER_CATEGORY.addAdventure(BEACH_HOLIDAY);
-
- RAFTING_HOLIDAY = FACTORY.createAdventure();
- RAFTING_HOLIDAY
- .setDescription("White water rafting on the Ottawa river");
- RAFTING_HOLIDAY.setName("Whitewater");
- RAFTING_HOLIDAY.setLocation("Ottawa");
- RAFTING_HOLIDAY.setPrice(8000.52d);
- RAFTING_HOLIDAY.setId("270");
- SUMMER_CATEGORY.addAdventure(RAFTING_HOLIDAY);
-
- // Lodgings
- FIVE_STAR_HOTEL = FACTORY.createLodging();
- FIVE_STAR_HOTEL.setDescription("Deluxe palace");
- FIVE_STAR_HOTEL.setName("Flashy");
- YOUTH_HOSTEL = FACTORY.createLodging();
- YOUTH_HOSTEL.setDescription("Youth Hostel");
- YOUTH_HOSTEL.setName("Basic");
- CAMP_GROUND = FACTORY.createLodging();
- CAMP_GROUND.setDescription("Camp ground");
- CAMP_GROUND.setName("WetAndCold");
- CATALOG_2005.addLodging(FIVE_STAR_HOTEL);
- CATALOG_2005.addLodging(YOUTH_HOSTEL);
- CATALOG_2005.addLodging(CAMP_GROUND);
- WINTER_HOLIDAY.setDefaultLodging(YOUTH_HOSTEL);
-
- // Transporation
- GREYHOUND_BUS = FACTORY.createTransportation();
- GREYHOUND_BUS.setArrivalTime("14:30");
- GREYHOUND_BUS.setPrice(25.50);
- CATALOG_2005.addTransportation(GREYHOUND_BUS);
- EXECUTIVE_JET = FACTORY.createTransportation();
- EXECUTIVE_JET.setArrivalTime("11:10");
- EXECUTIVE_JET.setPrice(1500.99);
- CATALOG_2005.addTransportation(EXECUTIVE_JET);
-
- // Accounts
- PRESIDENT = FACTORY.createAccount();
- PRESIDENT.setFirstName("George");
- PRESIDENT.setLastName("Bush");
- PRESIDENT.setState("TX");
- PRESIDENT.setPhone("1112223333");
- PRESIDENT.setCountry("U.S.A");
- DENTIST = FACTORY.createAccount();
- DENTIST.setFirstName("Tooth");
- DENTIST.setLastName("Fairy");
- DENTIST.setState("CA");
- DENTIST.setPhone("4543219876");
- DENTIST.setCountry("PainLand");
- SANTA_CLAUS = FACTORY.createAccount();
- SANTA_CLAUS.setFirstName("Chris");
- SANTA_CLAUS.setLastName("Chringle");
- SANTA_CLAUS.setState("WI");
- SANTA_CLAUS.setPhone("8617429856");
- SANTA_CLAUS.setCountry("NorthPole");
- CATALOG_2005.addAccount(PRESIDENT);
- CATALOG_2005.addAccount(DENTIST);
- CATALOG_2005.addAccount(SANTA_CLAUS);
-
- // Signons
- SIGNON_ADMINISTRATOR = new Signon("Administrator", "Foo123Bar");
- SIGNON_JOEBLOGGS = new Signon("JoeBloggs", "Harry5Potter");
- CATALOG_2005.addSignon(SIGNON_ADMINISTRATOR);
- CATALOG_2005.addSignon(SIGNON_JOEBLOGGS);
-
- CART = FACTORY.createCart();
-
- // initTrees();
- }
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Signon.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Signon.java
deleted file mode 100644
index 69cd381c..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Signon.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jface.examples.databinding.model;
-
-import org.eclipse.jface.examples.databinding.ModelObject;
-
-public class Signon extends ModelObject {
-
- String userId;
- String password;
-
- public Signon(String aUserId, String aPassword) {
- userId = aUserId;
- password = aPassword;
- }
- public String getPassword() {
- return password;
- }
- public void setPassword(String aPassword) {
- String oldValue = password;
- password = aPassword;
- firePropertyChange("password",oldValue,password);
- }
- public String getUserId() {
- return userId;
- }
- public void setUserId(String aUserId) {
- String oldValue = userId;
- userId = aUserId;
- firePropertyChange("userId",oldValue,userId);
- }
-
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/SimpleModel.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/SimpleModel.java
deleted file mode 100644
index cec1927d..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/SimpleModel.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2005 David Orme <djo@coconut-palm-software.com>
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * David Orme - Initial API and implementation
- */
-package org.eclipse.jface.examples.databinding.model;
-
-import java.util.LinkedList;
-
-
-public class SimpleModel {
- public SimpleModel() {
- // Add some sample data to our personList...
- personList.add(new SimplePerson("John", "1234", "Wheaton", "IL"));
- personList.add(new SimplePerson("Jane", "1234", "Glen Ellyn", "IL"));
- personList.add(new SimplePerson("Frank", "1234", "Lombard", "IL"));
- personList.add(new SimplePerson("Joe", "1234", "Elmhurst", "IL"));
- personList.add(new SimplePerson("Chet", "1234", "Oak Lawn", "IL"));
- personList.add(new SimplePerson("Wilbur", "1234", "Austin", "IL"));
- personList.add(new SimplePerson("Elmo", "1234", "Chicago", "IL"));
- }
-
- // Now a PersonList property...
-
- LinkedList personList = new LinkedList();
-
- public LinkedList getPersonList() {
- return personList;
- }
-
-} \ No newline at end of file
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/SimpleOrder.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/SimpleOrder.java
deleted file mode 100644
index 99a68fc9..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/SimpleOrder.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * The Pampered Chef - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.examples.databinding.model;
-
-import java.util.Date;
-
-/**
- * @since 1.0
- *
- */
-public class SimpleOrder {
-
- private int orderNumber;
- private Date date;
-
- /**
- * @return Returns the date.
- */
- public Date getDate() {
- return date;
- }
-
- /**
- * @param date The date to set.
- */
- public void setDate(Date date) {
- this.date = date;
- }
-
- /**
- * @return Returns the orderNumber.
- */
- public int getOrderNumber() {
- return orderNumber;
- }
-
- /**
- * @param orderNumber The orderNumber to set.
- */
- public void setOrderNumber(int orderNumber) {
- this.orderNumber = orderNumber;
- }
-
- /**
- * @param i
- * @param date
- */
- public SimpleOrder(int i, Date date) {
- this.orderNumber = i;
- this.date = date;
- }
-
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/SimplePerson.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/SimplePerson.java
deleted file mode 100644
index 63ba02e4..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/SimplePerson.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (C) 2005 David Orme <djo@coconut-palm-software.com>
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * David Orme - Initial API and implementation
- * Brad Reynolds (bug 139407)
- */
-package org.eclipse.jface.examples.databinding.model;
-
-import java.util.Date;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.jface.examples.databinding.ModelObject;
-
-public class SimplePerson extends ModelObject {
-
- private String name = "";
- private String address = "";
- private String city = "";
- private String state = "";
-
- private List orders = new LinkedList();
-
- public SimplePerson(String name, String address, String city, String state) {
- this.name = name;
- this.address = address;
- this.city = city;
- this.state = state;
-
- int numOrders = (int) (Math.random() * 5);
- for (int i=0; i < numOrders; ++i) {
- orders.add(new SimpleOrder(i, new Date()));
- }
- }
-
- public SimplePerson() {}
-
- /**
- * @return Returns the address.
- */
- public String getAddress() {
- return address;
- }
-
- /**
- * @param address The address to set.
- */
- public void setAddress(String address) {
- String old = this.address;
- this.address = address;
- firePropertyChange("address", old, address);
- }
-
- /**
- * @return Returns the city.
- */
- public String getCity() {
- return city;
- }
-
- /**
- * @param city The city to set.
- */
- public void setCity(String city) {
- String old = this.city;
- firePropertyChange("city", old, this.city = city);
- }
-
- /**
- * @return Returns the name.
- */
- public String getName() {
- return name;
- }
-
- /**
- * @param name The name to set.
- */
- public void setName(String name) {
- firePropertyChange("name", this.name, this.name = name);
- }
-
- /**
- * @return Returns the state.
- */
- public String getState() {
- return state;
- }
-
- /**
- * @param state The state to set.
- */
- public void setState(String state) {
- firePropertyChange("state", this.state, this.state = state); //$NON-NLS-1$
- }
-
- /**
- * @return Returns the orders.
- */
- public List getOrders() {
- return orders;
- }
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Transportation.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Transportation.java
deleted file mode 100644
index d4f0b4df..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Transportation.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jface.examples.databinding.model;
-
-import org.eclipse.jface.examples.databinding.ModelObject;
-
-public class Transportation extends ModelObject {
-
- private String arrivalTime;
- private double price;
-
- public void setArrivalTime(String string) {
- String oldValue = arrivalTime;
- arrivalTime = string;
- firePropertyChange("arrivaltime",oldValue,string);
- }
-
- public String getArrivalTime(){
- return arrivalTime;
- }
-
- public double getPrice() {
- return price;
- }
-
- public void setPrice(double aPrice) {
- double oldPrice = price;
- price = aPrice;
- firePropertyChange("price",new Double(oldPrice),new Double(price));
- }
-
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/nestedselection/TestMasterDetail.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/nestedselection/TestMasterDetail.java
deleted file mode 100644
index 34af825d..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/nestedselection/TestMasterDetail.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920
- ******************************************************************************/
-
-package org.eclipse.jface.examples.databinding.nestedselection;
-
-import org.eclipse.core.databinding.DataBindingContext;
-import org.eclipse.core.databinding.beans.BeansObservables;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.list.WritableList;
-import org.eclipse.core.databinding.observable.map.IObservableMap;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.jface.databinding.viewers.ObservableListContentProvider;
-import org.eclipse.jface.databinding.viewers.ObservableMapLabelProvider;
-import org.eclipse.jface.databinding.viewers.ViewersObservables;
-import org.eclipse.jface.examples.databinding.model.SimpleModel;
-import org.eclipse.jface.examples.databinding.model.SimpleOrder;
-import org.eclipse.jface.examples.databinding.model.SimplePerson;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * @since 1.0
- *
- */
-public class TestMasterDetail {
- /**
- * @param args
- */
- public static void main(String[] args) {
- new TestMasterDetail().run();
- }
-
- private Shell shell = null; // @jve:decl-index=0:visual-constraint="10,10"
-
- private Table personsTable = null;
-
- private Label label1 = null;
-
- private Text name = null;
-
- private Label label2 = null;
-
- private Text address = null;
-
- private Label label3 = null;
-
- private Text city = null;
-
- private Label label4 = null;
-
- private Text state = null;
-
- private Table ordersTable = null;
-
- /**
- * This method initializes table
- *
- */
- private void createTable() {
- GridData gridData = new org.eclipse.swt.layout.GridData();
- gridData.grabExcessHorizontalSpace = true;
- gridData.verticalAlignment = org.eclipse.swt.layout.GridData.FILL;
- gridData.horizontalSpan = 2;
- gridData.grabExcessVerticalSpace = true;
- gridData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
- personsTable = new Table(shell, SWT.FULL_SELECTION);
- personsTable.setHeaderVisible(true);
- personsTable.setLayoutData(gridData);
- personsTable.setLinesVisible(true);
- TableColumn tableColumn = new TableColumn(personsTable, SWT.NONE);
- tableColumn.setWidth(60);
- tableColumn.setText("Name");
- TableColumn tableColumn1 = new TableColumn(personsTable, SWT.NONE);
- tableColumn1.setWidth(60);
- tableColumn1.setText("State");
- }
-
- /**
- * This method initializes table1
- *
- */
- private void createTable1() {
- GridData gridData5 = new org.eclipse.swt.layout.GridData();
- gridData5.horizontalSpan = 2;
- gridData5.verticalAlignment = org.eclipse.swt.layout.GridData.FILL;
- gridData5.grabExcessHorizontalSpace = true;
- gridData5.grabExcessVerticalSpace = true;
- gridData5.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
- ordersTable = new Table(shell, SWT.FULL_SELECTION);
- ordersTable.setHeaderVisible(true);
- ordersTable.setLayoutData(gridData5);
- ordersTable.setLinesVisible(true);
- TableColumn tableColumn2 = new TableColumn(ordersTable, SWT.NONE);
- tableColumn2.setWidth(60);
- tableColumn2.setText("Order No");
- TableColumn tableColumn3 = new TableColumn(ordersTable, SWT.NONE);
- tableColumn3.setWidth(60);
- tableColumn3.setText("Date");
- }
-
- /**
- * This method initializes sShell
- */
- private void createShell() {
- GridData gridData5 = new org.eclipse.swt.layout.GridData();
- gridData5.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
- gridData5.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
- GridData gridData4 = new org.eclipse.swt.layout.GridData();
- gridData4.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
- gridData4.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
- GridData gridData3 = new org.eclipse.swt.layout.GridData();
- gridData3.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
- gridData3.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
- GridData gridData2 = new org.eclipse.swt.layout.GridData();
- gridData2.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
- gridData2.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
- GridData gridData1 = new org.eclipse.swt.layout.GridData();
- gridData1.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
- gridData1.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
- GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 2;
- shell = new Shell();
- shell.setText("Shell");
- createTable();
- shell.setLayout(gridLayout);
- shell.setSize(new org.eclipse.swt.graphics.Point(495, 357));
- label1 = new Label(shell, SWT.NONE);
- label1.setText("Name");
- name = new Text(shell, SWT.BORDER);
- name.setLayoutData(gridData1);
- label2 = new Label(shell, SWT.NONE);
- label2.setText("Address");
- address = new Text(shell, SWT.BORDER);
- address.setLayoutData(gridData2);
- label3 = new Label(shell, SWT.NONE);
- label3.setText("City");
- city = new Text(shell, SWT.BORDER);
- city.setLayoutData(gridData4);
- label4 = new Label(shell, SWT.NONE);
- label4.setText("State");
- state = new Text(shell, SWT.BORDER);
- state.setLayoutData(gridData3);
- createTable1();
- }
-
- private void run() {
- Display display = new Display();
-
- createShell();
- bind(shell);
-
- shell.setSize(600, 600);
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.dispose();
- }
-
- SimpleModel model = new SimpleModel();
-
- private void bind(Control parent) {
- Realm realm = SWTObservables.getRealm(parent.getDisplay());
-
- TableViewer peopleViewer = new TableViewer(personsTable);
- ObservableListContentProvider peopleViewerContent = new ObservableListContentProvider();
- peopleViewer.setContentProvider(peopleViewerContent);
- IObservableMap[] attributeMaps = BeansObservables.observeMaps(
- peopleViewerContent.getKnownElements(), SimplePerson.class,
- new String[] { "name", "state" });
- peopleViewer.setLabelProvider(new ObservableMapLabelProvider(
- attributeMaps));
- peopleViewer.setInput(new WritableList(realm, model.getPersonList(),
- SimpleModel.class));
-
- IObservableValue selectedPerson = ViewersObservables
- .observeSingleSelection(peopleViewer);
-
- DataBindingContext dbc = new DataBindingContext(realm);
- dbc.bindValue(SWTObservables.observeText(name, SWT.Modify),
- BeansObservables.observeDetailValue(realm, selectedPerson,
- "name", String.class), null);
-
- dbc.bindValue(SWTObservables.observeText(address, SWT.Modify),
- BeansObservables.observeDetailValue(realm, selectedPerson,
- "address", String.class), null);
-
- dbc.bindValue(SWTObservables.observeText(city, SWT.Modify),
- BeansObservables.observeDetailValue(realm, selectedPerson,
- "city", String.class), null);
-
- dbc.bindValue(SWTObservables.observeText(state, SWT.Modify),
- BeansObservables.observeDetailValue(realm, selectedPerson,
- "state", String.class), null);
-
- TableViewer ordersViewer = new TableViewer(ordersTable);
- ObservableListContentProvider ordersViewerContent = new ObservableListContentProvider();
- ordersViewer.setContentProvider(ordersViewerContent);
- ordersViewer.setLabelProvider(new ObservableMapLabelProvider(
- BeansObservables.observeMaps(ordersViewerContent
- .getKnownElements(), SimpleOrder.class, new String[] {
- "orderNumber", "date" })));
-
- IObservableList orders = BeansObservables.observeDetailList(realm,
- selectedPerson, "orders", SimpleOrder.class);
- ordersViewer.setInput(orders);
- }
-
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/radioGroup/RadioGroup.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/radioGroup/RadioGroup.java
deleted file mode 100644
index e941d2a5..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/radioGroup/RadioGroup.java
+++ /dev/null
@@ -1,549 +0,0 @@
-package org.eclipse.jface.examples.databinding.radioGroup;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.jface.examples.databinding.ducks.DuckType;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.SWTException;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-
-/**
- * This object decorates a bunch of SWT.RADIO buttons and provides saner
- * selection semantics than you get by default with those radio buttons.
- * <p>
- * Its API is basically the same API as List, but with unnecessary methods
- * removed.
- */
-public class RadioGroup {
-
- private final IRadioButton[] buttons;
- private final Object[] values;
- IRadioButton oldSelection = null;
- IRadioButton selectedButton = null;
- IRadioButton potentialNewSelection = null;
-
- /** (Non-API)
- * Interface IRadioButton. A duck interface that is used internally by RadioGroup
- * and by RadioGroup's unit tests.
- */
- public static interface IRadioButton {
- void setData(String string, Object object);
- void addSelectionListener(SelectionListener selectionListener);
- void setSelection(boolean b);
- boolean getSelection();
- boolean isFocusControl();
- String getText();
- void setText(String string);
- void notifyListeners(int eventType, Event object);
- }
-
- /**
- * Constructs an instance of this widget given an array of Button objects to wrap.
- * The Button objects must have been created with the SWT.RADIO style bit set,
- * and they must all be in the same Composite.
- *
- * @param radioButtons Object[] an array of radio buttons to wrap.
- * @param values Object[] an array of objects corresponding to the value of each radio button.
- */
- public RadioGroup(Object[] radioButtons, Object[] values) {
- IRadioButton[] buttons = new IRadioButton[radioButtons.length];
- if (buttons.length < 1) {
- throw new IllegalArgumentException("A RadioGroup must manage at least one Button");
- }
- for (int i = 0; i < buttons.length; i++) {
- if (!DuckType.instanceOf(IRadioButton.class, radioButtons[i])) {
- throw new IllegalArgumentException("A radio button was not passed");
- }
- buttons[i] = (IRadioButton) DuckType.implement(IRadioButton.class, radioButtons[i]);
- buttons[i].setData(Integer.toString(i), new Integer(i));
- buttons[i].addSelectionListener(selectionListener);
- }
- this.buttons = buttons;
- this.values = values;
- }
-
- /**
- * Returns the object corresponding to the currently-selected radio button
- * or null if no radio button is selected.
- *
- * @return the object corresponding to the currently-selected radio button
- * or null if no radio button is selected.
- */
- public Object getSelection() {
- int selectionIndex = getSelectionIndex();
- if (selectionIndex < 0)
- return "";
- return values[selectionIndex];
- }
-
- /**
- * Sets the selected radio button to the radio button whose model object
- * equals() the object specified by newSelection. If !newSelection.equals()
- * any model object managed by this radio group, deselects all radio buttons.
- *
- * @param newSelection A model object corresponding to one of the model
- * objects associated with one of the radio buttons.
- */
- public void setSelection(Object newSelection) {
- deselectAll();
- for (int i = 0; i < values.length; i++) {
- if (values[i].equals(newSelection)) {
- setSelection(i);
- return;
- }
- }
- }
-
- private SelectionListener selectionListener = new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {
- widgetSelected(e);
- }
-
- public void widgetSelected(SelectionEvent e) {
- potentialNewSelection = getButton(e);
- if (! potentialNewSelection.getSelection()) {
- return;
- }
- if (potentialNewSelection.equals(selectedButton)) {
- return;
- }
-
- if (fireWidgetChangeSelectionEvent(e)) {
- oldSelection = selectedButton;
- selectedButton = potentialNewSelection;
- if (oldSelection == null) {
- oldSelection = selectedButton;
- }
-
- fireWidgetSelectedEvent(e);
- }
- }
-
- private IRadioButton getButton(SelectionEvent e) {
- // If the actual IRadioButton is a test fixture, then the test fixture can't
- // set e.widget, so the button object will be in e.data instead and a dummy
- // Widget will be in e.widget.
- if (e.data != null) {
- return (IRadioButton) e.data;
- }
- return (IRadioButton) DuckType.implement(IRadioButton.class, e.widget);
- }
- };
-
- private List widgetChangeListeners = new LinkedList();
-
- protected boolean fireWidgetChangeSelectionEvent(SelectionEvent e) {
- for (Iterator listenersIter = widgetChangeListeners.iterator(); listenersIter.hasNext();) {
- VetoableSelectionListener listener = (VetoableSelectionListener) listenersIter.next();
- listener.canWidgetChangeSelection(e);
- if (!e.doit) {
- rollbackSelection();
- return false;
- }
- }
- return true;
- }
-
- private void rollbackSelection() {
- Display.getCurrent().asyncExec(new Runnable() {
- public void run() {
- potentialNewSelection.setSelection(false);
- selectedButton.setSelection(true);
-// selectedButton.notifyListeners(SWT.Selection, null);
- }
- });
- }
-
-
- /**
- * Adds the listener to the collection of listeners who will
- * be notified when the receiver's selection is about to change, by sending
- * it one of the messages defined in the <code>VetoableSelectionListener</code>
- * interface.
- * <p>
- * <code>widgetSelected</code> is called when the selection changes.
- * <code>widgetDefaultSelected</code> is typically called when an item is double-clicked.
- * </p>
- *
- * @param listener the listener which should be notified
- *
- * @exception IllegalArgumentException <ul>
- * <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
- * </ul>
- * @exception SWTException <ul>
- * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
- * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
- * </ul>
- *
- * @see VetoableSelectionListener
- * @see #removeVetoableSelectionListener
- * @see SelectionEvent
- */
- public void addVetoableSelectionListener(VetoableSelectionListener listener) {
- widgetChangeListeners.add(listener);
- }
-
- /**
- * Removes the listener from the collection of listeners who will
- * be notified when the receiver's selection is about to change.
- *
- * @param listener the listener which should no longer be notified
- *
- * @exception IllegalArgumentException <ul>
- * <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
- * </ul>
- * @exception SWTException <ul>
- * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
- * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
- * </ul>
- *
- * @see VetoableSelectionListener
- * @see #addVetoableSelectionListener
- */
- public void removeVetoableSelectionListener(VetoableSelectionListener listener) {
- widgetChangeListeners.remove(listener);
- }
-
-
- private List widgetSelectedListeners = new ArrayList();
-
- protected void fireWidgetSelectedEvent(SelectionEvent e) {
- for (Iterator listenersIter = widgetSelectedListeners.iterator(); listenersIter.hasNext();) {
- SelectionListener listener = (SelectionListener) listenersIter.next();
- listener.widgetSelected(e);
- }
- }
-
- protected void fireWidgetDefaultSelectedEvent(SelectionEvent e) {
- fireWidgetSelectedEvent(e);
- }
-
- /**
- * Adds the listener to the collection of listeners who will
- * be notified when the receiver's selection changes, by sending
- * it one of the messages defined in the <code>SelectionListener</code>
- * interface.
- * <p>
- * <code>widgetSelected</code> is called when the selection changes.
- * <code>widgetDefaultSelected</code> is typically called when an item is double-clicked.
- * </p>
- *
- * @param listener the listener which should be notified
- *
- * @exception IllegalArgumentException <ul>
- * <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
- * </ul>
- * @exception SWTException <ul>
- * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
- * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
- * </ul>
- *
- * @see SelectionListener
- * @see #removeSelectionListener
- * @see SelectionEvent
- */
- public void addSelectionListener(SelectionListener listener) {
- widgetSelectedListeners.add(listener);
- }
-
- /**
- * Removes the listener from the collection of listeners who will
- * be notified when the receiver's selection changes.
- *
- * @param listener the listener which should no longer be notified
- *
- * @exception IllegalArgumentException <ul>
- * <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
- * </ul>
- * @exception SWTException <ul>
- * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
- * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
- * </ul>
- *
- * @see SelectionListener
- * @see #addSelectionListener
- */
- public void removeSelectionListener(SelectionListener listener) {
- widgetSelectedListeners.remove(listener);
- }
-
- /**
- * Deselects the item at the given zero-relative index in the receiver.
- * If the item at the index was already deselected, it remains
- * deselected. Indices that are out of range are ignored.
- *
- * @param index the index of the item to deselect
- *
- * @exception SWTException <ul>
- * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
- * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
- * </ul>
- */
- public void deselect (int index) {
- if (index < 0 || index >= buttons.length)
- return;
- buttons[index].setSelection(false);
- }
-
- /**
- * Deselects all selected items in the receiver.
- *
- * @exception SWTException <ul>
- * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
- * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
- * </ul>
- */
- public void deselectAll () {
- for (int i = 0; i < buttons.length; i++)
- buttons[i].setSelection(false);
- }
-
- /**
- * Returns the zero-relative index of the item which currently
- * has the focus in the receiver, or -1 if no item has focus.
- *
- * @return the index of the selected item
- *
- * @exception SWTException <ul>
- * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
- * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
- * </ul>
- */
- public int getFocusIndex () {
- for (int i = 0; i < buttons.length; i++) {
- if (buttons[i].isFocusControl()) {
- return i;
- }
- }
- return -1;
- }
-
- /**
- * Returns the item at the given, zero-relative index in the
- * receiver. Throws an exception if the index is out of range.
- *
- * @param index the index of the item to return
- * @return the item at the given index
- *
- * @exception IllegalArgumentException <ul>
- * <li>ERROR_INVALID_RANGE - if the index is not between 0 and the number of elements in the list minus 1 (inclusive)</li>
- * </ul>
- * @exception SWTException <ul>
- * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
- * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
- * </ul>
- *
- * FIXME: tck - this should be renamed to getItemText()
- */
- public String getItem (int index) {
- if (index < 0 || index >= buttons.length)
- SWT.error(SWT.ERROR_INVALID_RANGE, null, "getItem for a nonexistant item");
- return buttons[index].getText();
- }
-
- /**
- * Returns the number of items contained in the receiver.
- *
- * @return the number of items
- *
- * @exception SWTException <ul>
- * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
- * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
- * </ul>
- */
- public int getItemCount () {
- return buttons.length;
- }
-
- /**
- * Returns a (possibly empty) array of <code>String</code>s which
- * are the items in the receiver.
- * <p>
- * Note: This is not the actual structure used by the receiver
- * to maintain its list of items, so modifying the array will
- * not affect the receiver.
- * </p>
- *
- * @return the items in the receiver's list
- *
- * @exception SWTException <ul>
- * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
- * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
- * </ul>
- */
- public String [] getItems () {
- List itemStrings = new ArrayList();
- for (int i = 0; i < buttons.length; i++) {
- itemStrings.add(buttons[i].getText());
- }
- return (String[]) itemStrings.toArray(new String[itemStrings.size()]);
- }
-
- public Object[] getButtons() {
- return buttons;
- }
-
- /**
- * Returns the zero-relative index of the item which is currently
- * selected in the receiver, or -1 if no item is selected.
- *
- * @return the index of the selected item or -1
- *
- * @exception SWTException <ul>
- * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
- * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
- * </ul>
- */
- public int getSelectionIndex () {
- for (int i = 0; i < buttons.length; i++) {
- if (buttons[i].getSelection() == true) {
- return i;
- }
- }
- return -1;
- }
-
- /**
- * Gets the index of an item.
- * <p>
- * The list is searched starting at 0 until an
- * item is found that is equal to the search item.
- * If no item is found, -1 is returned. Indexing
- * is zero based.
- *
- * @param string the search item
- * @return the index of the item
- *
- * @exception IllegalArgumentException <ul>
- * <li>ERROR_NULL_ARGUMENT - if the string is null</li>
- * </ul>
- * @exception SWTException <ul>
- * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
- * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
- * </ul>
- */
- public int indexOf (String string) {
- for (int i = 0; i < buttons.length; i++) {
- if (buttons[i].getText().equals(string)) {
- return i;
- }
- }
- return -1;
- }
-
- /**
- * Searches the receiver's list starting at the given,
- * zero-relative index until an item is found that is equal
- * to the argument, and returns the index of that item. If
- * no item is found or the starting index is out of range,
- * returns -1.
- *
- * @param string the search item
- * @param start the zero-relative index at which to start the search
- * @return the index of the item
- *
- * @exception IllegalArgumentException <ul>
- * <li>ERROR_NULL_ARGUMENT - if the string is null</li>
- * </ul>
- * @exception SWTException <ul>
- * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
- * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
- * </ul>
- */
- public int indexOf (String string, int start) {
- for (int i = start; i < buttons.length; i++) {
- if (buttons[i].getText().equals(string)) {
- return i;
- }
- }
- return -1;
- }
-
- /**
- * Returns <code>true</code> if the item is selected,
- * and <code>false</code> otherwise. Indices out of
- * range are ignored.
- *
- * @param index the index of the item
- * @return the visibility state of the item at the index
- *
- * @exception SWTException <ul>
- * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
- * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
- * </ul>
- */
- public boolean isSelected (int index) {
- return buttons[index].getSelection();
- }
-
- /**
- * Selects the item at the given zero-relative index in the receiver's
- * list. If the item at the index was already selected, it remains
- * selected. Indices that are out of range are ignored.
- *
- * @param index the index of the item to select
- *
- * @exception SWTException <ul>
- * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
- * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
- * </ul>
- */
- public void select (int index) {
- if (index < 0 || index >= buttons.length)
- return;
- buttons[index].setSelection(true);
- }
-
- /**
- * Sets the text of the item in the receiver's list at the given
- * zero-relative index to the string argument. This is equivalent
- * to <code>remove</code>'ing the old item at the index, and then
- * <code>add</code>'ing the new item at that index.
- *
- * @param index the index for the item
- * @param string the new text for the item
- *
- * @exception IllegalArgumentException <ul>
- * <li>ERROR_INVALID_RANGE - if the index is not between 0 and the number of elements in the list minus 1 (inclusive)</li>
- * <li>ERROR_NULL_ARGUMENT - if the string is null</li>
- * </ul>
- * @exception SWTException <ul>
- * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
- * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
- * </ul>
- */
- public void setItem (int index, String string) {
- if (index < 0 || index >= buttons.length)
- SWT.error(SWT.ERROR_INVALID_RANGE, null, "setItem for a nonexistant item");
- buttons[index].setText(string);
- }
-
- /**
- * Selects the item at the given zero-relative index in the receiver.
- * If the item at the index was already selected, it remains selected.
- * The current selection is first cleared, then the new item is selected.
- * Indices that are out of range are ignored.
- *
- * @param index the index of the item to select
- *
- * @exception SWTException <ul>
- * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
- * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
- * </ul>
- * @see List#deselectAll()
- * @see List#select(int)
- */
- public void setSelection (int index) {
- if (index < 0 || index > buttons.length - 1) {
- return;
- }
- buttons[index].setSelection(true);
- }
-
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/radioGroup/VetoableSelectionListener.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/radioGroup/VetoableSelectionListener.java
deleted file mode 100644
index 949346a8..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/radioGroup/VetoableSelectionListener.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package org.eclipse.jface.examples.databinding.radioGroup;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-/**
- * Interface VetoableSelectionListener. An interface for SelectionListeners
- * that permit the new selection to be vetoed before widgetSelected or
- * widgetDefaultSelected is called.
- */
-public interface VetoableSelectionListener {
- /**
- * Method widgetCanChangeSelection. Indicates that the selection is
- * about to be changed. Setting e.doit to false will prevent the
- * selection from changing.
- *
- * @param e The SelectionEvent that is being processed.
- */
- public void canWidgetChangeSelection(SelectionEvent e);
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet000HelloWorld.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet000HelloWorld.java
deleted file mode 100644
index 02dc9030..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet000HelloWorld.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 The Pampered Chef, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * The Pampered Chef, Inc. - initial API and implementation
- * Brad Reynolds - bug 116920
- ******************************************************************************/
-
-package org.eclipse.jface.examples.databinding.snippets;
-
-import org.eclipse.core.databinding.DataBindingContext;
-import org.eclipse.core.databinding.beans.BeansObservables;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.RowLayout;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * Hello, databinding. Bind changes in a GUI to a Model object but don't worry
- * about propogating changes from the Model to the GUI.
- * <p>
- * Illustrates the basic Model-ViewModel-Binding-View architecture typically
- * used in data binding applications.
- */
-public class Snippet000HelloWorld {
- public static void main(String[] args) {
- ViewModel viewModel = new ViewModel();
- Shell shell = new View(viewModel).createShell();
-
- // The SWT event loop
- Display display = Display.getCurrent();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) {
- display.sleep();
- }
- }
-
- // Print the results
- System.out.println("person.getName() = "
- + viewModel.getPerson().getName());
- }
-
- // The data model class. This is normally a persistent class of some sort.
- //
- // In this example, we only push changes from the GUI to the model, so we
- // don't worry about implementing JavaBeans bound properties. If we need
- // our GUI to automatically reflect changes in the Person object, the
- // Person object would need to implement the JavaBeans property change
- // listener methods.
- static class Person {
- // A property...
- String name = "HelloWorld";
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
- }
-
- // The View's model--the root of our Model graph for this particular GUI.
- //
- // Typically each View class has a corresponding ViewModel class.
- // The ViewModel is responsible for getting the objects to edit from the
- // DAO. Since this snippet doesn't have any persistent objects to
- // retrieve, this ViewModel just instantiates a model object to edit.
- static class ViewModel {
- // The model to bind
- private Person person = new Person();
-
- public Person getPerson() {
- return person;
- }
- }
-
- // The GUI view
- static class View {
- private ViewModel viewModel;
- private Text name;
-
- public View(ViewModel viewModel) {
- this.viewModel = viewModel;
- }
-
- public Shell createShell() {
- // Build a UI
- Display display = Display.getDefault();
- Shell shell = new Shell(display);
- shell.setLayout(new RowLayout(SWT.VERTICAL));
- name = new Text(shell, SWT.BORDER);
-
- // Bind it
- Realm.runWithDefault(SWTObservables.getRealm(display), new Runnable() {
- public void run() {
- DataBindingContext bindingContext = new DataBindingContext();
- bindGUI(bindingContext);
- }
- });
-
- // Open and return the Shell
- shell.pack();
- shell.open();
- return shell;
- }
-
- protected void bindGUI(DataBindingContext bindingContext) {
- // Called from inside the SWT threading realm)
- Person person = viewModel.getPerson();
- bindingContext.bindValue(SWTObservables.observeText(name, SWT.Modify),
- BeansObservables.observeValue(person, "name"), null);
- }
- }
-
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet001NestedSelectionWithCombo.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet001NestedSelectionWithCombo.java
deleted file mode 100644
index d07338dc..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet001NestedSelectionWithCombo.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 The Pampered Chef, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * The Pampered Chef, Inc. - initial API and implementation
- * Brad Reynolds - bug 116920
- ******************************************************************************/
-
-package org.eclipse.jface.examples.databinding.snippets;
-
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyChangeSupport;
-import java.util.ArrayList;
-import java.util.HashSet;
-
-import org.eclipse.core.databinding.DataBindingContext;
-import org.eclipse.core.databinding.beans.BeansObservables;
-import org.eclipse.core.databinding.observable.Observables;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.map.IObservableMap;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.jface.databinding.viewers.ObservableMapLabelProvider;
-import org.eclipse.jface.databinding.viewers.ViewersObservables;
-import org.eclipse.jface.layout.GridLayoutFactory;
-import org.eclipse.jface.viewers.ArrayContentProvider;
-import org.eclipse.jface.viewers.ComboViewer;
-import org.eclipse.jface.viewers.ListViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.List;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * Demonstrates nested selection.<br>
- * At the first level, user may select a person.<br>
- * At the second level, user may select a city to associate with the selected<br>
- * person or edit the person's name.
- */
-public class Snippet001NestedSelectionWithCombo {
- public static void main(String[] args) {
- ViewModel viewModel = new ViewModel();
- Shell shell = new View(viewModel).createShell();
-
- // The SWT event loop
- Display display = Display.getCurrent();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) {
- display.sleep();
- }
- }
- }
-
- // Minimal JavaBeans support
- public static abstract class AbstractModelObject {
- private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(
- this);
-
- public void addPropertyChangeListener(PropertyChangeListener listener) {
- propertyChangeSupport.addPropertyChangeListener(listener);
- }
-
- public void addPropertyChangeListener(String propertyName,
- PropertyChangeListener listener) {
- propertyChangeSupport.addPropertyChangeListener(propertyName,
- listener);
- }
-
- public void removePropertyChangeListener(PropertyChangeListener listener) {
- propertyChangeSupport.removePropertyChangeListener(listener);
- }
-
- public void removePropertyChangeListener(String propertyName,
- PropertyChangeListener listener) {
- propertyChangeSupport.removePropertyChangeListener(propertyName,
- listener);
- }
-
- protected void firePropertyChange(String propertyName, Object oldValue,
- Object newValue) {
- propertyChangeSupport.firePropertyChange(propertyName, oldValue,
- newValue);
- }
- }
-
- // The data model class. This is normally a persistent class of some sort.
- //
- // This example implements full JavaBeans bound properties so that changes
- // to instances of this class will automatically be propogated to the UI.
- public static class Person extends AbstractModelObject {
- // Constructor
- public Person(String name, String city) {
- this.name = name;
- this.city = city;
- }
-
- // Some JavaBean bound properties...
- String name;
-
- String city;
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- String oldValue = this.name;
- this.name = name;
- firePropertyChange("name", oldValue, name);
- }
-
- public String getCity() {
- return city;
- }
-
- public void setCity(String city) {
- String oldValue = this.city;
- this.city = city;
- firePropertyChange("city", oldValue, city);
- }
- }
-
- // The View's model--the root of our GUI's Model graph
- //
- // Typically each View class has a corresponding ViewModel class.
- // The ViewModel is responsible for getting the objects to edit from the
- // DAO. Since this snippet doesn't have any persistent objects to
- // retrieve, this ViewModel just instantiates some objects to edit.
- //
- // This ViewModel also implements JavaBean bound properties.
- static class ViewModel extends AbstractModelObject {
- // The model to bind
- private ArrayList people = new ArrayList();
- {
- people.add(new Person("Wile E. Coyote", "Tucson"));
- people.add(new Person("Road Runner", "Lost Horse"));
- people.add(new Person("Bugs Bunny", "Forrest"));
- }
-
- // Choice of cities for the Combo
- private ArrayList cities = new ArrayList();
- {
- cities.add("Tucson");
- cities.add("AcmeTown");
- cities.add("Lost Horse");
- cities.add("Forrest");
- cities.add("Lost Mine");
- }
-
- public ArrayList getPeople() {
- return people;
- }
-
- public ArrayList getCities() {
- return cities;
- }
- }
-
- // The GUI view
- static class View {
- private ViewModel viewModel;
-
- public View(ViewModel viewModel) {
- this.viewModel = viewModel;
- }
-
- public Shell createShell() {
- // Build a UI
- Shell shell = new Shell(Display.getCurrent());
- Realm realm = SWTObservables.getRealm(shell.getDisplay());
-
- List peopleList = new List(shell, SWT.BORDER);
- Text name = new Text(shell, SWT.BORDER);
- Combo city = new Combo(shell, SWT.BORDER | SWT.READ_ONLY);
-
- ListViewer peopleListViewer = new ListViewer(peopleList);
- IObservableMap attributeMap = BeansObservables.observeMap(
- Observables.staticObservableSet(realm, new HashSet(
- viewModel.getPeople())), Person.class, "name");
- peopleListViewer.setLabelProvider(new ObservableMapLabelProvider(
- attributeMap));
- peopleListViewer.setContentProvider(new ArrayContentProvider());
- peopleListViewer.setInput(viewModel.getPeople());
-
- DataBindingContext dbc = new DataBindingContext(realm);
- IObservableValue selectedPerson = ViewersObservables
- .observeSingleSelection(peopleListViewer);
- dbc.bindValue(SWTObservables.observeText(name, SWT.Modify),
- BeansObservables.observeDetailValue(realm, selectedPerson,
- "name", String.class), null);
-
- ComboViewer cityViewer = new ComboViewer(city);
- cityViewer.setContentProvider(new ArrayContentProvider());
- cityViewer.setInput(viewModel.getCities());
-
- IObservableValue citySelection = ViewersObservables
- .observeSingleSelection(cityViewer);
- dbc.bindValue(citySelection, BeansObservables.observeDetailValue(
- realm, selectedPerson, "city", String.class), null);
-
- GridLayoutFactory.swtDefaults().applyTo(shell);
- // Open and return the Shell
- shell.pack();
- shell.open();
- return shell;
- }
- }
-
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet002UpdateComboRetainSelection.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet002UpdateComboRetainSelection.java
deleted file mode 100644
index fdec3981..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet002UpdateComboRetainSelection.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 The Pampered Chef, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * The Pampered Chef, Inc. - initial API and implementation
- * Brad Reynolds - bug 116920
- ******************************************************************************/
-
-package org.eclipse.jface.examples.databinding.snippets;
-
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyChangeSupport;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.core.databinding.DataBindingContext;
-import org.eclipse.core.databinding.beans.BeansObservables;
-import org.eclipse.core.databinding.observable.IObservable;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.list.WritableList;
-import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
-import org.eclipse.core.databinding.observable.masterdetail.MasterDetailObservables;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.RowLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Shows how to bind a Combo so that when update its items, the selection is
- * retained if at all possible.
- *
- * @since 3.2
- */
-public class Snippet002UpdateComboRetainSelection {
- public static void main(String[] args) {
- final Display display = new Display();
- Realm.runWithDefault(SWTObservables.getRealm(display), new Runnable() {
- public void run() {
- ViewModel viewModel = new ViewModel();
- Shell shell = new View(viewModel).createShell();
-
- // The SWT event loop
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) {
- display.sleep();
- }
- }
-
- // Print the results
- System.out.println(viewModel.getText());
- }
- });
- display.dispose();
- }
-
- // Minimal JavaBeans support
- public static abstract class AbstractModelObject {
- private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);
-
- public void addPropertyChangeListener(PropertyChangeListener listener) {
- propertyChangeSupport.addPropertyChangeListener(listener);
- }
-
- public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
- propertyChangeSupport.addPropertyChangeListener(propertyName, listener);
- }
-
- public void removePropertyChangeListener(PropertyChangeListener listener) {
- propertyChangeSupport.removePropertyChangeListener(listener);
- }
-
- public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) {
- propertyChangeSupport.removePropertyChangeListener(propertyName, listener);
- }
-
- protected void firePropertyChange(String propertyName, Object oldValue, Object newValue) {
- propertyChangeSupport.firePropertyChange(propertyName, oldValue, newValue);
- }
- }
-
- // The View's model--the root of our Model graph for this particular GUI.
- public static class ViewModel extends AbstractModelObject {
- private String text = "beef";
-
- private List choices = new ArrayList();
- {
- choices.add("pork");
- choices.add("beef");
- choices.add("poultry");
- choices.add("vegatables");
- }
-
- public List getChoices() {
- return choices;
- }
-
- public void setChoices(List choices) {
- List old = this.choices;
- this.choices = choices;
- firePropertyChange("choices", old, choices);
- }
-
- public String getText() {
- return text;
- }
-
- public void setText(String text) {
- String oldValue = this.text;
- this.text = text;
- firePropertyChange("test", oldValue, text);
- }
- }
-
- // The GUI view
- static class View {
- private ViewModel viewModel;
- /**
- * used to make a new choices array unique
- */
- static int count;
-
- public View(ViewModel viewModel) {
- this.viewModel = viewModel;
- }
-
- public Shell createShell() {
- // Build a UI
- Shell shell = new Shell(Display.getCurrent());
- shell.setLayout(new RowLayout(SWT.VERTICAL));
-
- Combo combo = new Combo(shell, SWT.BORDER | SWT.READ_ONLY);
- Button reset = new Button(shell, SWT.NULL);
- reset.setText("reset collection");
- reset.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- List newList = new ArrayList();
- newList.add("Chocolate");
- newList.add("Vanilla");
- newList.add("Mango Parfait");
- newList.add("beef");
- newList.add("Cheesecake");
- newList.add(Integer.toString(++count));
- viewModel.setChoices(newList);
- }
- });
-
- // Print value out first
- System.out.println(viewModel.getText());
-
- DataBindingContext dbc = new DataBindingContext();
-
- IObservableList list = MasterDetailObservables.detailList(BeansObservables.observeValue(viewModel, "choices"),
- getListDetailFactory(),
- String.class);
- dbc.bindList(SWTObservables.observeItems(combo), list, null);
- dbc.bindValue(SWTObservables.observeText(combo), BeansObservables.observeValue(viewModel, "text"), null);
-
- // Open and return the Shell
- shell.pack();
- shell.open();
- return shell;
- }
- }
-
- private static IObservableFactory getListDetailFactory() {
- return new IObservableFactory() {
- public IObservable createObservable(Object target) {
- WritableList list = WritableList.withElementType(String.class);
- list.addAll((Collection) target);
- return list;
- }
- };
- }
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet003UpdateComboBindUsingViewer.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet003UpdateComboBindUsingViewer.java
deleted file mode 100644
index 62adacbd..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet003UpdateComboBindUsingViewer.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 The Pampered Chef, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * The Pampered Chef, Inc. - initial API and implementation
- * Brad Reynolds - bug 116920
- ******************************************************************************/
-
-package org.eclipse.jface.examples.databinding.snippets;
-
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyChangeSupport;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.core.databinding.DataBindingContext;
-import org.eclipse.core.databinding.beans.BeansObservables;
-import org.eclipse.core.databinding.observable.IObservable;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.list.WritableList;
-import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
-import org.eclipse.core.databinding.observable.masterdetail.MasterDetailObservables;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.jface.databinding.viewers.ObservableListContentProvider;
-import org.eclipse.jface.databinding.viewers.ViewersObservables;
-import org.eclipse.jface.viewers.ComboViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.RowLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Shows how to bind a Combo so that when update its items, the selection is
- * retained if at all possible.
- *
- * @since 3.2
- */
-public class Snippet003UpdateComboBindUsingViewer {
- public static void main(String[] args) {
- final Display display = new Display();
- Realm.runWithDefault(SWTObservables.getRealm(display), new Runnable() {
- public void run() {
- ViewModel viewModel = new ViewModel();
- Shell shell = new View(viewModel).createShell();
-
- // The SWT event loop
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) {
- display.sleep();
- }
- }
- // Print the results
- System.out.println(viewModel.getText());
- }
- });
- display.dispose();
- }
-
- // Minimal JavaBeans support
- public static abstract class AbstractModelObject {
- private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(
- this);
-
- public void addPropertyChangeListener(PropertyChangeListener listener) {
- propertyChangeSupport.addPropertyChangeListener(listener);
- }
-
- public void addPropertyChangeListener(String propertyName,
- PropertyChangeListener listener) {
- propertyChangeSupport.addPropertyChangeListener(propertyName,
- listener);
- }
-
- public void removePropertyChangeListener(PropertyChangeListener listener) {
- propertyChangeSupport.removePropertyChangeListener(listener);
- }
-
- public void removePropertyChangeListener(String propertyName,
- PropertyChangeListener listener) {
- propertyChangeSupport.removePropertyChangeListener(propertyName,
- listener);
- }
-
- protected void firePropertyChange(String propertyName, Object oldValue,
- Object newValue) {
- propertyChangeSupport.firePropertyChange(propertyName, oldValue,
- newValue);
- }
- }
-
- // The View's model--the root of our Model graph for this particular GUI.
- public static class ViewModel extends AbstractModelObject {
- private String text = "beef";
-
- private List choices = new ArrayList();
- {
- choices.add("pork");
- choices.add("beef");
- choices.add("poultry");
- choices.add("vegatables");
- }
-
- public List getChoices() {
- return choices;
- }
-
- public void setChoices(List choices) {
- this.choices = choices;
- firePropertyChange("choices", null, null);
- }
-
- public String getText() {
- return text;
- }
-
- public void setText(String text) {
- String oldValue = this.text;
- this.text = text;
- firePropertyChange("test", oldValue, text);
- }
- }
-
- // The GUI view
- static class View {
- private ViewModel viewModel;
-
- public View(ViewModel viewModel) {
- this.viewModel = viewModel;
- }
-
- public Shell createShell() {
- // Build a UI
- Shell shell = new Shell(Display.getCurrent());
- shell.setLayout(new RowLayout(SWT.VERTICAL));
-
- Combo combo = new Combo(shell, SWT.BORDER | SWT.READ_ONLY);
- ComboViewer viewer = new ComboViewer(combo);
- Button reset = new Button(shell, SWT.NULL);
- reset.setText("reset collection");
- reset.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- List newList = new ArrayList();
- newList.add("Chocolate");
- newList.add("Vanilla");
- newList.add("Mango Parfait");
- newList.add("beef");
- newList.add("Cheesecake");
- viewModel.setChoices(newList);
- }
- });
-
- // Print value out first
- System.out.println(viewModel.getText());
-
- DataBindingContext dbc = new DataBindingContext();
- IObservableList list = MasterDetailObservables.detailList(
- BeansObservables.observeValue(viewModel, "choices"),
- getListDetailFactory(), String.class);
- viewer.setContentProvider(new ObservableListContentProvider());
- viewer.setInput(list);
-
- dbc.bindValue(ViewersObservables.observeSingleSelection(viewer),
- BeansObservables.observeValue(viewModel, "text"), null);
-
- // Open and return the Shell
- shell.pack();
- shell.open();
- return shell;
- }
- }
-
- private static IObservableFactory getListDetailFactory() {
- return new IObservableFactory() {
- public IObservable createObservable(Object target) {
- WritableList list = WritableList.withElementType(String.class);
- list.addAll((Collection) target);
- return list;
- }
- };
- }
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet004DataBindingContextErrorLabel.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet004DataBindingContextErrorLabel.java
deleted file mode 100644
index 2ec268fd..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet004DataBindingContextErrorLabel.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- * Brad Reynolds - bug 116920, 159768
- ******************************************************************************/
-
-package org.eclipse.jface.examples.databinding.snippets;
-
-import org.eclipse.core.databinding.AggregateValidationStatus;
-import org.eclipse.core.databinding.BindingEvent;
-import org.eclipse.core.databinding.DataBindingContext;
-import org.eclipse.core.databinding.DefaultBindSpec;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.value.WritableValue;
-import org.eclipse.core.databinding.validation.IValidator;
-import org.eclipse.core.databinding.validation.ValidationStatus;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * Snippet that displays how to bind the validation error of the
- * {@link DataBindingContext} to a label.
- *
- * @since 3.2
- */
-public class Snippet004DataBindingContextErrorLabel {
- public static void main(String[] args) {
- final Display display = new Display();
- Realm.runWithDefault(SWTObservables.getRealm(display), new Runnable() {
- public void run() {
- Shell shell = new Shell(display);
- shell.setLayout(new GridLayout(2, false));
-
- new Label(shell, SWT.NONE).setText("Enter '5' to be valid:");
-
- Text text = new Text(shell, SWT.BORDER);
- WritableValue value = WritableValue.withValueType(String.class);
- new Label(shell, SWT.NONE).setText("Error:");
-
- Label errorLabel = new Label(shell, SWT.BORDER);
- errorLabel.setForeground(display.getSystemColor(SWT.COLOR_RED));
- GridDataFactory.swtDefaults().hint(200, SWT.DEFAULT).applyTo(
- errorLabel);
-
- DataBindingContext dbc = new DataBindingContext();
-
- // Bind the text to the value.
- dbc.bindValue(SWTObservables.observeText(text, SWT.Modify),
- value, new DefaultBindSpec().addTargetValidator(
- BindingEvent.PIPELINE_AFTER_CONVERT,
- new FiveValidator()).addModelValidator(
- BindingEvent.PIPELINE_AFTER_CONVERT,
- new FiveValidator()));
-
- // Bind the error label to the validation error on the dbc.
- dbc.bindValue(SWTObservables.observeText(errorLabel),
- new AggregateValidationStatus(dbc.getBindings(),
- AggregateValidationStatus.MAX_SEVERITY), null);
-
- shell.pack();
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- }
- });
- display.dispose();
- }
-
- /**
- * Validator that returns validation errors for any value other than 5.
- *
- * @since 3.2
- */
- private static class FiveValidator implements IValidator {
- public IStatus validate(Object value) {
- return ("5".equals(value)) ? Status.OK_STATUS : ValidationStatus
- .error("the value was '" + value + "', not '5'");
- }
- }
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet005MenuUpdater.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet005MenuUpdater.java
deleted file mode 100644
index 80264574..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet005MenuUpdater.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920
- *******************************************************************************/
-package org.eclipse.jface.examples.databinding.snippets;
-
-import java.util.Date;
-import java.util.Iterator;
-
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.list.WritableList;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.jface.internal.databinding.provisional.swt.MenuUpdater;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.MenuItem;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- */
-public class Snippet005MenuUpdater {
- public static void main(String[] args) {
- final Display display = new Display();
- Realm.runWithDefault(SWTObservables.getRealm(display), new Runnable() {
- public void run() {
- Shell shell = new Shell(display);
-
- final WritableList menuItemStrings = new WritableList();
- display.asyncExec(new Runnable() {
- public void run() {
- System.out.println("adding item");
- menuItemStrings.add(new Date().toString());
- display.timerExec(5000, this);
- }
- });
-
- Menu bar = new Menu(shell, SWT.BAR);
- shell.setMenuBar(bar);
- MenuItem fileItem = new MenuItem(bar, SWT.CASCADE);
- fileItem.setText("&Test Menu");
- final Menu submenu = new Menu(shell, SWT.DROP_DOWN);
- fileItem.setMenu(submenu);
- new MenuUpdater(submenu) {
- protected void updateMenu() {
- System.out.println("updating menu");
- MenuItem[] items = submenu.getItems();
- int itemIndex = 0;
- for (Iterator it = menuItemStrings.iterator(); it
- .hasNext();) {
- MenuItem item;
- if (itemIndex < items.length) {
- item = items[itemIndex++];
- } else {
- item = new MenuItem(submenu, SWT.NONE);
- }
- String string = (String) it.next();
- item.setText(string);
- }
- while (itemIndex < items.length) {
- items[itemIndex++].dispose();
- }
- }
- };
-
- shell.open();
-
- // The SWT event loop
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) {
- display.sleep();
- }
- }
- }
- });
- display.dispose();
- }
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet006Spreadsheet.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet006Spreadsheet.java
deleted file mode 100644
index 48939cb7..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet006Spreadsheet.java
+++ /dev/null
@@ -1,313 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920
- ******************************************************************************/
-
-package org.eclipse.jface.examples.databinding.snippets;
-
-import java.text.NumberFormat;
-import java.text.ParseException;
-
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.value.ComputedValue;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.databinding.observable.value.WritableValue;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.jface.internal.databinding.provisional.swt.TableUpdater;
-import org.eclipse.jface.layout.GridLayoutFactory;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.ControlEditor;
-import org.eclipse.swt.custom.TableCursor;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * @since 1.1
- *
- */
-public class Snippet006Spreadsheet {
-
- private static final int COUNTER_UPDATE_DELAY = 1000;
-
- private static final int NUM_COLUMNS = 16;
-
- private static final int NUM_ROWS = 100;
-
- /**
- * 0 for no output, 1 for some, 2 for more
- */
- private static int DEBUG_LEVEL = 0;
-
- /**
- * If true, there will be a automatic counter at B1.
- */
- private static boolean FUNKY_COUNTER = true;
-
- /**
- * // * If true, all formulas (except for row 1 and column A) will be the
- * sum of the values of their left and top neighbouring cells.
- */
- private static boolean FUNKY_FORMULAS = true;
-
- static WritableValue[][] cellFormulas = new WritableValue[NUM_ROWS][NUM_COLUMNS];
-
- static ComputedValue[][] cellValues = new ComputedValue[NUM_ROWS][NUM_COLUMNS];
-
- static class ComputedCellValue extends ComputedValue {
- private final IObservableValue cellFormula;
-
- private boolean calculating;
-
- ComputedCellValue(IObservableValue cellFormula) {
- this.cellFormula = cellFormula;
- }
-
- protected Object calculate() {
- if (calculating) {
- return "#cycle";
- }
- try {
- calculating = true;
- return evaluate(cellFormula.getValue());
- } finally {
- calculating = false;
- }
- }
-
- private Object evaluate(Object value) {
- if (DEBUG_LEVEL >= 2) {
- System.out.println("evaluating " + this + " ...");
- }
- if (value == null) {
- return "";
- }
- try {
- String s = (String) value;
- if (!s.startsWith("=")) {
- return s;
- }
- String addition = s.substring(1);
- int indexOfPlus = addition.indexOf('+');
- String operand1 = addition.substring(0, indexOfPlus);
- double value1 = eval(operand1);
- String operand2 = addition.substring(indexOfPlus + 1);
- double value2 = eval(operand2);
- return NumberFormat.getNumberInstance().format(value1 + value2);
- } catch (Exception ex) {
- return ex.getMessage();
- }
- }
-
- /**
- * @param s
- * @return
- * @throws ParseException
- */
- private double eval(String s) throws ParseException {
- if (s.length() == 0) {
- return 0;
- }
- char character = s.charAt(0);
- if (Character.isLetter(character)) {
- character = Character.toLowerCase(character);
- // reference to other cell
- int columnIndex = character - 'a';
- int rowIndex = 0;
- rowIndex = NumberFormat.getNumberInstance().parse(
- s.substring(1)).intValue() - 1;
- String value = (String) cellValues[rowIndex][columnIndex]
- .getValue();
- return value.length() == 0 ? 0 : NumberFormat
- .getNumberInstance().parse(value).doubleValue();
- }
- return NumberFormat.getNumberInstance().parse(s).doubleValue();
- }
- }
-
- protected static int counter;
-
- public static void main(String[] args) {
-
- final Display display = new Display();
- Realm.runWithDefault(SWTObservables.getRealm(display), new Runnable() {
- public void run() {
- Shell shell = new Shell(display);
-
- final Table table = new Table(shell, SWT.BORDER | SWT.MULTI
- | SWT.FULL_SELECTION | SWT.VIRTUAL);
- table.setLinesVisible(true);
- table.setHeaderVisible(true);
-
- for (int i = 0; i < NUM_COLUMNS; i++) {
- TableColumn tableColumn = new TableColumn(table, SWT.NONE);
- tableColumn.setText(Character.toString((char) ('A' + i)));
- tableColumn.setWidth(40);
- }
- for (int i = 0; i < NUM_ROWS; i++) {
- new TableItem(table, SWT.NONE);
- for (int j = 0; j < NUM_COLUMNS; j++) {
- cellFormulas[i][j] = new WritableValue();
- cellValues[i][j] = new ComputedCellValue(
- cellFormulas[i][j]);
- if (!FUNKY_FORMULAS || i == 0 || j == 0) {
- cellFormulas[i][j].setValue("");
- } else {
- cellFormulas[i][j].setValue("="
- + cellReference(i - 1, j) + "+"
- + cellReference(i, j - 1));
- }
- }
- }
-
- new TableUpdater(table) {
- protected void updateItem(TableItem item) {
- int rowIndex = item.getParent().indexOf(item);
- if (DEBUG_LEVEL >= 1) {
- System.out.println("updating row " + rowIndex);
- }
- for (int j = 0; j < NUM_COLUMNS; j++) {
- item.setText(j, (String) cellValues[rowIndex][j]
- .getValue());
- }
- }
- };
-
- if (FUNKY_COUNTER) {
- // counter in A1
- display.asyncExec(new Runnable() {
- public void run() {
- cellFormulas[0][1].setValue("" + counter++);
- display.timerExec(COUNTER_UPDATE_DELAY, this);
- }
- });
- }
-
- // create a TableCursor to navigate around the table
- final TableCursor cursor = new TableCursor(table, SWT.NONE);
- // create an editor to edit the cell when the user hits "ENTER"
- // while over a cell in the table
- final ControlEditor editor = new ControlEditor(cursor);
- editor.grabHorizontal = true;
- editor.grabVertical = true;
-
- cursor.addSelectionListener(new SelectionAdapter() {
- // when the TableEditor is over a cell, select the
- // corresponding row
- // in
- // the table
- public void widgetSelected(SelectionEvent e) {
- table.setSelection(new TableItem[] { cursor.getRow() });
- }
-
- // when the user hits "ENTER" in the TableCursor, pop up a
- // text
- // editor so that
- // they can change the text of the cell
- public void widgetDefaultSelected(SelectionEvent e) {
- final Text text = new Text(cursor, SWT.NONE);
- TableItem row = cursor.getRow();
- int rowIndex = table.indexOf(row);
- int columnIndex = cursor.getColumn();
- text
- .setText((String) cellFormulas[rowIndex][columnIndex]
- .getValue());
- text.addKeyListener(new KeyAdapter() {
- public void keyPressed(KeyEvent e) {
- // close the text editor and copy the data over
- // when the user hits "ENTER"
- if (e.character == SWT.CR) {
- TableItem row = cursor.getRow();
- int rowIndex = table.indexOf(row);
- int columnIndex = cursor.getColumn();
- cellFormulas[rowIndex][columnIndex]
- .setValue(text.getText());
- text.dispose();
- }
- // close the text editor when the user hits
- // "ESC"
- if (e.character == SWT.ESC) {
- text.dispose();
- }
- }
- });
- editor.setEditor(text);
- text.setFocus();
- }
- });
- // Hide the TableCursor when the user hits the "MOD1" or "MOD2"
- // key.
- // This alows the user to select multiple items in the table.
- cursor.addKeyListener(new KeyAdapter() {
- public void keyPressed(KeyEvent e) {
- if (e.keyCode == SWT.MOD1 || e.keyCode == SWT.MOD2
- || (e.stateMask & SWT.MOD1) != 0
- || (e.stateMask & SWT.MOD2) != 0) {
- cursor.setVisible(false);
- }
- }
- });
- // Show the TableCursor when the user releases the "MOD2" or
- // "MOD1" key.
- // This signals the end of the multiple selection task.
- table.addKeyListener(new KeyAdapter() {
- public void keyReleased(KeyEvent e) {
- if (e.keyCode == SWT.MOD1
- && (e.stateMask & SWT.MOD2) != 0)
- return;
- if (e.keyCode == SWT.MOD2
- && (e.stateMask & SWT.MOD1) != 0)
- return;
- if (e.keyCode != SWT.MOD1
- && (e.stateMask & SWT.MOD1) != 0)
- return;
- if (e.keyCode != SWT.MOD2
- && (e.stateMask & SWT.MOD2) != 0)
- return;
-
- TableItem[] selection = table.getSelection();
- TableItem row = (selection.length == 0) ? table
- .getItem(table.getTopIndex()) : selection[0];
- table.showItem(row);
- cursor.setSelection(row, 0);
- cursor.setVisible(true);
- cursor.setFocus();
- }
- });
-
- GridLayoutFactory.fillDefaults().generateLayout(shell);
- shell.setSize(400, 300);
- shell.open();
-
- // The SWT event loop
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) {
- display.sleep();
- }
- }
- }
- });
- display.dispose();
- }
-
- private static String cellReference(int rowIndex, int columnIndex) {
- String cellReference = "" + ((char) ('A' + columnIndex))
- + (rowIndex + 1);
- return cellReference;
- }
-
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet007ColorLabelProvider.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet007ColorLabelProvider.java
deleted file mode 100644
index c22d43af..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet007ColorLabelProvider.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- * IBM Corporation - see bug 137934
- ******************************************************************************/
-
-package org.eclipse.jface.examples.databinding.snippets;
-
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyChangeSupport;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.databinding.beans.BeansObservables;
-import org.eclipse.core.databinding.observable.Observables;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.map.IObservableMap;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.jface.databinding.viewers.ObservableListContentProvider;
-import org.eclipse.jface.databinding.viewers.ObservableMapLabelProvider;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ITableColorProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-
-/**
- * An example showing how to create a {@link ILabelProvider label provider} that
- * to provide colors.
- *
- * @since 3.2
- */
-public class Snippet007ColorLabelProvider {
- /**
- * @param args
- */
- public static void main(String[] args) {
- final List persons = new ArrayList();
- persons.add(new Person("Fiona Apple", Person.FEMALE));
- persons.add(new Person("Elliot Smith", Person.MALE));
- persons.add(new Person("Diana Krall", Person.FEMALE));
- persons.add(new Person("David Gilmour", Person.MALE));
-
- final Display display = new Display();
- Realm.runWithDefault(SWTObservables.getRealm(display), new Runnable() {
- public void run() {
- Shell shell = new Shell(display);
- shell.setText("Gender Bender");
- shell.setLayout(new GridLayout());
-
- Table table = new Table(shell, SWT.SINGLE | SWT.H_SCROLL
- | SWT.V_SCROLL | SWT.BORDER);
- GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
- table.setLayoutData(gridData);
- table.setHeaderVisible(true);
- table.setLinesVisible(true);
- TableColumn column = new TableColumn(table, SWT.NONE);
- column.setText("No");
- column.setWidth(20);
- column = new TableColumn(table, SWT.NONE);
- column.setText("Name");
- column.setWidth(100);
- final TableViewer viewer = new TableViewer(table);
-
- IObservableList observableList = Observables
- .staticObservableList(persons);
- ObservableListContentProvider contentProvider = new ObservableListContentProvider();
-
- viewer.setContentProvider(contentProvider);
-
- // this does not have to correspond to the columns in the table,
- // we just list all attributes that affect the table content.
- IObservableMap[] attributes = BeansObservables.observeMaps(
- contentProvider.getKnownElements(), Person.class,
- new String[] { "name", "gender" });
-
- class ColorLabelProvider extends ObservableMapLabelProvider
- implements ITableColorProvider {
- Color male = display.getSystemColor(SWT.COLOR_BLUE);
-
- Color female = new Color(display, 255, 192, 203);
-
- ColorLabelProvider(IObservableMap[] attributes) {
- super(attributes);
- }
-
- // to drive home the point that attributes does not have to
- // match
- // the columns
- // in the table, we change the column text as follows:
- public String getColumnText(Object element, int index) {
- if (index == 0) {
- return Integer
- .toString(persons.indexOf(element) + 1);
- }
- return ((Person) element).getName();
- }
-
- public Color getBackground(Object element, int index) {
- return null;
- }
-
- public Color getForeground(Object element, int index) {
- if (index == 0)
- return null;
- Person person = (Person) element;
- return (person.getGender() == Person.MALE) ? male
- : female;
- }
-
- public void dispose() {
- super.dispose();
- female.dispose();
- }
- }
- viewer.setLabelProvider(new ColorLabelProvider(attributes));
-
- viewer.setInput(observableList);
-
- table.getColumn(0).pack();
-
- Button button = new Button(shell, SWT.PUSH);
- button.setText("Toggle Gender");
- button.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent arg0) {
- StructuredSelection selection = (StructuredSelection) viewer
- .getSelection();
- if (selection != null && !selection.isEmpty()) {
- Person person = (Person) selection
- .getFirstElement();
- person
- .setGender((person.getGender() == Person.MALE) ? Person.FEMALE
- : Person.MALE);
- }
- }
- });
-
- shell.setSize(300, 400);
- shell.open();
-
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- }
- });
- display.dispose();
- }
-
- private static class Person {
- static final int MALE = 0;
-
- static final int FEMALE = 1;
-
- private String name;
-
- private int gender;
-
- private PropertyChangeSupport changeSupport = new PropertyChangeSupport(
- this);
-
- Person(String name, int gender) {
- this.name = name;
- this.gender = gender;
- }
-
- /**
- * Returns the name. Method declared public to satisfy Java bean
- * conventions
- *
- * @return the name
- */
- public String getName() {
- return name;
- }
-
- /**
- * @param listener
- */
- public void addPropertyChangeListener(PropertyChangeListener listener) {
- changeSupport.addPropertyChangeListener(listener);
- }
-
- /**
- * Returns the gender. Method declared public to satisfy Java bean
- * conventions
- *
- * @return the gender
- */
- public int getGender() {
- return gender;
- }
-
- void setGender(int gender) {
- changeSupport.firePropertyChange("gender", this.gender,
- this.gender = gender);
- }
- }
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet008ComputedValue.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet008ComputedValue.java
deleted file mode 100644
index b296b809..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet008ComputedValue.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.examples.databinding.snippets;
-
-import org.eclipse.core.databinding.DataBindingContext;
-import org.eclipse.core.databinding.DefaultBindSpec;
-import org.eclipse.core.databinding.observable.ObservableTracker;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.value.ComputedValue;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.databinding.observable.value.WritableValue;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.layout.GridLayoutFactory;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * Snippet that demostrates a simple use case using ComputedValue to format a
- * name as the user enters first and last name.
- *
- * @since 3.2
- */
-public class Snippet008ComputedValue {
- /**
- * @param args
- */
- public static void main(String[] args) {
- final Display display = new Display();
- Realm.runWithDefault(SWTObservables.getRealm(display), new Runnable() {
- public void run() {
- Shell shell = new Shell(display);
- shell.setLayout(new FillLayout());
-
- final UI ui = new UI(shell);
- final Data data = new Data();
-
- // Bind the UI to the Data.
- DataBindingContext dbc = new DataBindingContext();
- dbc.bindValue(SWTObservables.observeText(ui.firstName,
- SWT.Modify), data.firstName, null);
- dbc.bindValue(SWTObservables.observeText(ui.lastName,
- SWT.Modify), data.lastName, null);
-
- // Construct the formatted name observable.
- FormattedName formattedName = new FormattedName(data.firstName,
- data.lastName);
-
- // Bind the formatted name Text to the formatted name
- // observable.
- dbc.bindValue(SWTObservables.observeText(ui.formattedName,
- SWT.None), formattedName, new DefaultBindSpec()
- .setUpdateModel(false));
-
- shell.pack();
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- }
- });
- display.dispose();
- }
-
- /**
- * Creates the formatted name on change of the first or last name
- * observables.
- * <p>
- * The key to understanding ComputedValue is understanding that it knows of
- * the observables that are queried without being told. This is done with
- * {@link ObservableTracker} voodoo. When calculate() is invoked
- * <code>ObservableTracker</code> records the observables that are
- * queried. It then exposes those observables and <code>ComputedValue</code>
- * can listen to changes in those objects and react accordingly.
- * </p>
- *
- * @since 3.2
- */
- static class FormattedName extends ComputedValue {
- private IObservableValue firstName;
-
- private IObservableValue lastName;
-
- FormattedName(IObservableValue firstName, IObservableValue lastName) {
- this.firstName = firstName;
- this.lastName = lastName;
- }
-
- protected Object calculate() {
- String lastName = (String) this.lastName.getValue();
- String firstName = (String) this.firstName.getValue();
- lastName = (lastName != null && lastName.length() > 0) ? lastName
- : "[Last Name]";
- firstName = (firstName != null && firstName.length() > 0) ? firstName
- : "[First Name]";
-
- StringBuffer buffer = new StringBuffer();
- buffer.append(lastName).append(", ").append(firstName);
-
- return buffer.toString();
- }
- }
-
- static class Data {
- final WritableValue firstName;
-
- final WritableValue lastName;
-
- Data() {
- firstName = new WritableValue("", String.class);
- lastName = new WritableValue("", String.class);
- }
- }
-
- /**
- * Composite that creates the UI.
- *
- * @since 3.2
- */
- static class UI extends Composite {
- final Text firstName;
-
- final Text lastName;
-
- final Text formattedName;
-
- UI(Composite parent) {
- super(parent, SWT.NONE);
-
- GridLayoutFactory.swtDefaults().numColumns(2).applyTo(this);
-
- new Label(this, SWT.NONE).setText("First Name:");
- new Label(this, SWT.NONE).setText("Last Name");
-
- GridDataFactory gdf = GridDataFactory.swtDefaults().align(SWT.FILL,
- SWT.FILL).grab(true, false);
- firstName = new Text(this, SWT.BORDER);
- gdf.applyTo(firstName);
-
- lastName = new Text(this, SWT.BORDER);
- gdf.applyTo(lastName);
-
- gdf = GridDataFactory.swtDefaults().span(2, 1).grab(true, false)
- .align(SWT.FILL, SWT.NONE);
- Label label = new Label(this, SWT.NONE);
- label.setText("Formatted Name:");
- gdf.applyTo(label);
-
- formattedName = new Text(this, SWT.BORDER);
- formattedName.setEditable(false);
- gdf.applyTo(formattedName);
- }
- }
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet009TableViewer.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet009TableViewer.java
deleted file mode 100644
index a96d5ec5..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet009TableViewer.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 The Pampered Chef, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Coconut Palm Software, Inc. - Initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.examples.databinding.snippets;
-
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyChangeSupport;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.core.databinding.DataBindingContext;
-import org.eclipse.core.databinding.beans.BeansObservables;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.list.WritableList;
-import org.eclipse.core.databinding.observable.map.IObservableMap;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.jface.databinding.viewers.ObservableListContentProvider;
-import org.eclipse.jface.databinding.viewers.ObservableMapLabelProvider;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-
-/**
- * Demonstrates binding a TableViewer to a collection.
- */
-public class Snippet009TableViewer {
- public static void main(String[] args) {
- ViewModel viewModel = new ViewModel();
- Shell shell = new View(viewModel).createShell();
-
- // The SWT event loop
- Display display = Display.getCurrent();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) {
- display.sleep();
- }
- }
- }
-
- // Minimal JavaBeans support
- public static abstract class AbstractModelObject {
- private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(
- this);
-
- public void addPropertyChangeListener(PropertyChangeListener listener) {
- propertyChangeSupport.addPropertyChangeListener(listener);
- }
-
- public void addPropertyChangeListener(String propertyName,
- PropertyChangeListener listener) {
- propertyChangeSupport.addPropertyChangeListener(propertyName,
- listener);
- }
-
- public void removePropertyChangeListener(PropertyChangeListener listener) {
- propertyChangeSupport.removePropertyChangeListener(listener);
- }
-
- public void removePropertyChangeListener(String propertyName,
- PropertyChangeListener listener) {
- propertyChangeSupport.removePropertyChangeListener(propertyName,
- listener);
- }
-
- protected void firePropertyChange(String propertyName, Object oldValue,
- Object newValue) {
- propertyChangeSupport.firePropertyChange(propertyName, oldValue,
- newValue);
- }
- }
-
- // The data model class. This is normally a persistent class of some sort.
- static class Person extends AbstractModelObject {
- // A property...
- String name = "John Smith";
-
- public Person(String name) {
- this.name = name;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- String oldValue = this.name;
- this.name = name;
- firePropertyChange("name", oldValue, name);
- }
- }
-
- // The View's model--the root of our Model graph for this particular GUI.
- //
- // Typically each View class has a corresponding ViewModel class.
- // The ViewModel is responsible for getting the objects to edit from the
- // data access tier. Since this snippet doesn't have any persistent objects
- // ro retrieve, this ViewModel just instantiates a model object to edit.
- static class ViewModel {
- // The model to bind
- private List people = new LinkedList(); {
- people.add(new Person("Steve Northover"));
- people.add(new Person("Grant Gayed"));
- people.add(new Person("Veronika Irvine"));
- people.add(new Person("Mike Wilson"));
- people.add(new Person("Christophe Cornu"));
- people.add(new Person("Lynne Kues"));
- people.add(new Person("Silenio Quarti"));
- }
-
- public List getPeople() {
- return people;
- }
- }
-
- // The GUI view
- static class View {
- private ViewModel viewModel;
- private Table committers;
-
- public View(ViewModel viewModel) {
- this.viewModel = viewModel;
- }
-
- public Shell createShell() {
- // Build a UI
- Display display = Display.getDefault();
- Shell shell = new Shell(display);
- shell.setLayout(new FillLayout());
- committers = new Table(shell, SWT.BORDER | SWT.FULL_SELECTION);
- committers.setLinesVisible(true);
-
- // Set up data binding. In an RCP application, the threading Realm
- // will be set for you automatically by the Workbench. In an SWT
- // application, you can do this once, wrpping your binding
- // method call.
- Realm.runWithDefault(SWTObservables.getRealm(display), new Runnable() {
- public void run() {
- DataBindingContext bindingContext = new DataBindingContext();
- bindGUI(bindingContext);
- }
- });
-
- // Open and return the Shell
- shell.setSize(100, 300);
- shell.open();
- return shell;
- }
-
- protected void bindGUI(DataBindingContext bindingContext) {
- // Since we're using a JFace Viewer, we do first wrap our Table...
- TableViewer peopleViewer = new TableViewer(committers);
-
- // Create a standard content provider
- ObservableListContentProvider peopleViewerContentProvider =
- new ObservableListContentProvider();
- peopleViewer.setContentProvider(peopleViewerContentProvider);
-
- // And a standard label provider that maps columns
- IObservableMap[] attributeMaps = BeansObservables.observeMaps(
- peopleViewerContentProvider.getKnownElements(), Person.class,
- new String[] { "name" });
- peopleViewer.setLabelProvider(new ObservableMapLabelProvider(attributeMaps));
-
- // Now set the Viewer's input
- peopleViewer.setInput(new WritableList(viewModel.getPeople(), Person.class));
- }
- }
-
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet010MasterDetail.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet010MasterDetail.java
deleted file mode 100644
index 042407b0..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet010MasterDetail.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.examples.databinding.snippets;
-
-import org.eclipse.core.databinding.BindSpec;
-import org.eclipse.core.databinding.DataBindingContext;
-import org.eclipse.core.databinding.beans.BeansObservables;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.jface.databinding.viewers.ViewersObservables;
-import org.eclipse.jface.viewers.ArrayContentProvider;
-import org.eclipse.jface.viewers.ListViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * Snippet that displays a simple master detail use case. A list of persons is
- * displayed in a list and upon selection the name of the selected person will
- * be displayed in a Text widget.
- */
-public class Snippet010MasterDetail {
- public static void main(String[] args) {
- final Display display = new Display();
- Realm.runWithDefault(SWTObservables.getRealm(display), new Runnable() {
- public void run() {
- Shell shell = new Shell(display);
- shell.setLayout(new GridLayout());
-
- Person[] persons = new Person[] { new Person("Me"),
- new Person("Myself"), new Person("I") };
-
- ListViewer viewer = new ListViewer(shell);
- viewer.setContentProvider(new ArrayContentProvider());
- viewer.setInput(persons);
-
- Text name = new Text(shell, SWT.BORDER | SWT.READ_ONLY);
-
- // 1. Observe changes in selection.
- IObservableValue selection = ViewersObservables
- .observeSingleSelection(viewer);
-
- // 2. Observe the name property of the current selection.
- IObservableValue detailObservable = BeansObservables
- .observeDetailValue(Realm.getDefault(), selection,
- "name", String.class);
-
- // 3. Bind the Text widget to the name detail (selection's
- // name).
- new DataBindingContext().bindValue(SWTObservables.observeText(
- name, SWT.None), detailObservable, new BindSpec()
- .setUpdateModel(false));
-
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- }
- });
- display.dispose();
- }
-
- public static class Person {
- private String name;
-
- Person(String name) {
- this.name = name;
- }
-
- /**
- * @return Returns the name.
- */
- public String getName() {
- return name;
- }
-
- public String toString() {
- return name;
- }
- }
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet011ValidateMultipleBindingsSnippet.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet011ValidateMultipleBindingsSnippet.java
deleted file mode 100644
index 81cb3958..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet011ValidateMultipleBindingsSnippet.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.examples.databinding.snippets;
-
-import org.eclipse.core.databinding.Binding;
-import org.eclipse.core.databinding.BindingEvent;
-import org.eclipse.core.databinding.DataBindingContext;
-import org.eclipse.core.databinding.IBindingListener;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.value.IValueChangeListener;
-import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
-import org.eclipse.core.databinding.observable.value.WritableValue;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * Snippet that validates values across multiple bindings on change of each
- * observable. If the values of the target observables are not equal the model
- * is not updated. When the values are equal they will be written to sysout.
- *
- * @author Brad Reynolds
- */
-public class Snippet011ValidateMultipleBindingsSnippet {
- public static void main(String[] args) {
- Realm.runWithDefault(SWTObservables.getRealm(Display.getDefault()),
- new Runnable() {
- public void run() {
- Snippet011ValidateMultipleBindingsSnippet.run();
- }
- });
- }
-
- private static void run() {
- Shell shell = new Shell();
-
- View view = new View(shell);
- final Model model = new Model();
-
- DataBindingContext dbc = new DataBindingContext();
- final Binding binding1 = dbc.bindValue(SWTObservables.observeText(
- view.text1, SWT.Modify), model.value1, null);
- final Binding binding2 = dbc.bindValue(SWTObservables.observeText(
- view.text2, SWT.Modify), model.value2, null);
-
- /**
- * Listener that will validate multiple bindings each time a change
- * occurs in either target.
- */
- IBindingListener listener = new IBindingListener() {
- /**
- * Value of the binding that is changing.
- */
- Object changingValue;
- /**
- * Status to return for both bindings.
- */
- IStatus validationStatus;
-
- public IStatus handleBindingEvent(BindingEvent e) {
- if (!(e.copyType == BindingEvent.EVENT_COPY_TO_MODEL && e.pipelinePosition == BindingEvent.PIPELINE_AFTER_CONVERT)) {
- return Status.OK_STATUS;
- }
-
- Binding other = (e.binding == binding1) ? binding2 : binding1;
-
- if (changingValue == null) {
- changingValue = e.convertedValue;
- validationStatus = Status.OK_STATUS;
-
- // force validation to run for the other
- // binding
- other.updateModelFromTarget();
-
- // reset stored state
- changingValue = null;
- } else if (!changingValue.equals(e.convertedValue)) {
- validationStatus = Status.CANCEL_STATUS;
- }
-
- return validationStatus;
- }
- };
-
- binding1.addBindingEventListener(listener);
- binding2.addBindingEventListener(listener);
-
- // DEBUG - print to show value change
- model.value1.addValueChangeListener(new IValueChangeListener() {
- public void handleValueChange(ValueChangeEvent event) {
- System.out.println("Value 1: " + model.value1.getValue());
- }
- });
-
- // DEBUG - print to show value change
- model.value2.addValueChangeListener(new IValueChangeListener() {
- public void handleValueChange(ValueChangeEvent event) {
- System.out.println("Value 2: " + model.value2.getValue());
- }
- });
-
- shell.pack();
- shell.open();
- Display display = shell.getDisplay();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.dispose();
- }
-
- static class Model {
- WritableValue value1 = new WritableValue();
- WritableValue value2 = new WritableValue();
- }
-
- static class View {
- Text text1;
- Text text2;
-
- View(Composite composite) {
- composite.setLayout(new GridLayout(2, true));
- text1 = new Text(composite, SWT.BORDER);
- text2 = new Text(composite, SWT.BORDER);
- }
- }
-}
diff --git a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet0xffffffff.java b/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet0xffffffff.java
deleted file mode 100644
index 7bd83508..00000000
--- a/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet0xffffffff.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 The Pampered Chef, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * The Pampered Chef, Inc. - initial API and implementation
- * Brad Reynolds - bug 116920
- ******************************************************************************/
-
-package org.eclipse.jface.examples.databinding.snippets;
-
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyChangeSupport;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.layout.RowLayout;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * Snippet -1.
- *
- * Hello, no databinding. Bind changes in a GUI to a Model object but don't worry
- * about propogating changes from the Model to the GUI -- using *manual* code.
- * (0xffffffff is -1 in 32-bit two's complement binary arithmatic)
- */
-public class Snippet0xffffffff {
- public static void main(String[] args) {
- ViewModel viewModel = new ViewModel();
- Shell shell = new View(viewModel).createShell();
-
- // The SWT event loop
- Display display = Display.getCurrent();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) {
- display.sleep();
- }
- }
-
- // Print the results
- System.out.println("person.getName() = "
- + viewModel.getPerson().getName());
- }
-
- // Minimal JavaBeans support
- public static abstract class AbstractModelObject {
- private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(
- this);
-
- public void addPropertyChangeListener(PropertyChangeListener listener) {
- propertyChangeSupport.addPropertyChangeListener(listener);
- }
-
- public void addPropertyChangeListener(String propertyName,
- PropertyChangeListener listener) {
- propertyChangeSupport.addPropertyChangeListener(propertyName,
- listener);
- }
-
- public void removePropertyChangeListener(PropertyChangeListener listener) {
- propertyChangeSupport.removePropertyChangeListener(listener);
- }
-
- public void removePropertyChangeListener(String propertyName,
- PropertyChangeListener listener) {
- propertyChangeSupport.removePropertyChangeListener(propertyName,
- listener);
- }
-
- protected void firePropertyChange(String propertyName, Object oldValue,
- Object newValue) {
- propertyChangeSupport.firePropertyChange(propertyName, oldValue,
- newValue);
- }
- }
-
- // The data model class. This is normally a persistent class of some sort.
- //
- // In this example, we only push changes from the GUI to the model, so we
- // don't worry about implementing JavaBeans bound properties. If we need
- // our GUI to automatically reflect changes in the Person object, the
- // Person object would need to implement the JavaBeans property change
- // listener methods.
- static class Person extends AbstractModelObject {
- // A property...
- String name = "John Smith";
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
-
- }
-
- // The View's model--the root of our Model graph for this particular GUI.
- //
- // Typically each View class has a corresponding ViewModel class.
- //
- // The ViewModel is responsible for getting the objects to edit from the
- // data access tier. Since this snippet doesn't have any persistent objects to
- // retrieve, this ViewModel just instantiates a model object to edit.
- static class ViewModel {
- // The model to bind
- private Person person = new Person();
-
- public Person getPerson() {
- return person;
- }
- }
-
- // The GUI view
- static class View {
- private ViewModel viewModel;
-
- public View(ViewModel viewModel) {
- this.viewModel = viewModel;
- }
-
- public Shell createShell() {
- // Build a UI
- Display display = Display.getCurrent();
- Shell shell = new Shell(display);
- shell.setLayout(new RowLayout(SWT.VERTICAL));
-
- final Text name = new Text(shell, SWT.BORDER);
-
- // Bind it (manually)
- name.setText(viewModel.getPerson().getName());
- name.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- viewModel.getPerson().setName(name.getText());
- }
- });
-
- // Open and return the Shell
- shell.pack();
- shell.open();
- return shell;
- }
- }
-
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/.classpath b/tests/org.eclipse.jface.tests.databinding/.classpath
deleted file mode 100644
index d512f63a..00000000
--- a/tests/org.eclipse.jface.tests.databinding/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/executionEnvironments/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/tests/org.eclipse.jface.tests.databinding/.cvsignore b/tests/org.eclipse.jface.tests.databinding/.cvsignore
deleted file mode 100644
index ba077a40..00000000
--- a/tests/org.eclipse.jface.tests.databinding/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/tests/org.eclipse.jface.tests.databinding/.project b/tests/org.eclipse.jface.tests.databinding/.project
deleted file mode 100644
index 815de410..00000000
--- a/tests/org.eclipse.jface.tests.databinding/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jface.tests.databinding</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/tests/org.eclipse.jface.tests.databinding/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.jface.tests.databinding/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 3268699f..00000000
--- a/tests/org.eclipse.jface.tests.databinding/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Mon Aug 28 10:09:27 EDT 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/tests/org.eclipse.jface.tests.databinding/.settings/org.eclipse.jdt.ui.prefs b/tests/org.eclipse.jface.tests.databinding/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 846d8bfc..00000000
--- a/tests/org.eclipse.jface.tests.databinding/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Thu Aug 24 15:24:48 EDT 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.ui.exception.name=e
-org.eclipse.jdt.ui.gettersetter.use.is=true
-org.eclipse.jdt.ui.javadoc=true
-org.eclipse.jdt.ui.overrideannotation=true
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return Returns the ${bare_field_name}.\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} The ${bare_field_name} to set.\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*******************************************************************************\n * Copyright (c) ${year} IBM Corporation and others.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * IBM Corporation - initial API and implementation\n ******************************************************************************/\n</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @since 3.2\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template></templates>
diff --git a/tests/org.eclipse.jface.tests.databinding/.settings/org.eclipse.pde.prefs b/tests/org.eclipse.jface.tests.databinding/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index 630927bb..00000000
--- a/tests/org.eclipse.jface.tests.databinding/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,14 +0,0 @@
-#Tue Oct 18 11:35:02 EDT 2005
-compilers.p.deprecated=0
-compilers.p.illegal-att-value=0
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=0
-compilers.p.unknown-attribute=0
-compilers.p.unknown-class=1
-compilers.p.unknown-element=1
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.p.unused-element-or-attribute=1
-compilers.use-project=true
-eclipse.preferences.version=1
diff --git a/tests/org.eclipse.jface.tests.databinding/JFace-Data Binding Test Suite.launch b/tests/org.eclipse.jface.tests.databinding/JFace-Data Binding Test Suite.launch
deleted file mode 100644
index b11e2d75..00000000
--- a/tests/org.eclipse.jface.tests.databinding/JFace-Data Binding Test Suite.launch
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.jface.tests.databinding.BindingTestSuite"/>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.jface.tests.databinding"/>
-<booleanAttribute key="automaticAdd" value="true"/>
-<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
-<booleanAttribute key="askclear" value="false"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="4"/>
-</listAttribute>
-<booleanAttribute key="clearConfig" value="true"/>
-<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<booleanAttribute key="clearws" value="true"/>
-<booleanAttribute key="useProduct" value="false"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="checked" value="[NONE]"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.jface.tests.databinding"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<stringAttribute key="templateConfig" value=""/>
-<stringAttribute key="pde.version" value="3.3"/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
-<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
-<booleanAttribute key="useDefaultConfigArea" value="false"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<booleanAttribute key="default" value="true"/>
-</launchConfiguration>
diff --git a/tests/org.eclipse.jface.tests.databinding/META-INF/MANIFEST.MF b/tests/org.eclipse.jface.tests.databinding/META-INF/MANIFEST.MF
deleted file mode 100644
index fcaddf10..00000000
--- a/tests/org.eclipse.jface.tests.databinding/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,18 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.jface.tests.databinding
-Bundle-Version: 1.0.100.qualifier
-Bundle-ClassPath: jfacebindingtests.jar
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Eclipse-LazyStart: true
-Require-Bundle: org.eclipse.core.databinding,
- org.junit,
- org.eclipse.swt,
- org.eclipse.jface,
- org.eclipse.core.runtime,
- org.eclipse.jface.examples.databinding,
- org.eclipse.core.databinding.beans,
- org.eclipse.jface.databinding
-
diff --git a/tests/org.eclipse.jface.tests.databinding/about.html b/tests/org.eclipse.jface.tests.databinding/about.html
deleted file mode 100644
index 46023304..00000000
--- a/tests/org.eclipse.jface.tests.databinding/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/tests/org.eclipse.jface.tests.databinding/build.properties b/tests/org.eclipse.jface.tests.databinding/build.properties
deleted file mode 100644
index e671f5a5..00000000
--- a/tests/org.eclipse.jface.tests.databinding/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are 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:
-# IBM Corporation - initial API and implementation
-###############################################################################
-source.jfacebindingtests.jar = src/
-
-src.includes = about.html
-output.jfacebindingtests.jar = bin/
-bin.includes = META-INF/,\
- about.html,\
- test.xml,\
- *.html,\
- jfacebindingtests.jar,\
- plugin.properties
diff --git a/tests/org.eclipse.jface.tests.databinding/plugin.properties b/tests/org.eclipse.jface.tests.databinding/plugin.properties
deleted file mode 100644
index 6f8acfcf..00000000
--- a/tests/org.eclipse.jface.tests.databinding/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are 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:
-# IBM Corporation - initial API and implementation
-###############################################################################
-pluginName = JFace Data Binding Tests
-providerName = Eclipse.org
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/beans/BeansObservablesTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/beans/BeansObservablesTest.java
deleted file mode 100644
index c9fee29f..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/beans/BeansObservablesTest.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164268, 171616
- ******************************************************************************/
-
-package org.eclipse.core.tests.databinding.beans;
-
-import java.util.Arrays;
-
-import org.eclipse.core.databinding.beans.BeansObservables;
-import org.eclipse.core.databinding.beans.IBeanObservable;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
-import org.eclipse.core.databinding.observable.set.IObservableSet;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.databinding.observable.value.WritableValue;
-import org.eclipse.core.internal.databinding.internal.beans.BeanObservableListDecorator;
-import org.eclipse.core.internal.databinding.internal.beans.BeanObservableSetDecorator;
-import org.eclipse.core.internal.databinding.internal.beans.BeanObservableValueDecorator;
-import org.eclipse.jface.tests.databinding.AbstractDefaultRealmTestCase;
-import org.eclipse.jface.tests.internal.databinding.internal.beans.Bean;
-
-/**
- * @since 3.2
- */
-public class BeansObservablesTest extends AbstractDefaultRealmTestCase {
- Bean[] elements = null;
- Bean model = null;
- Class elementType = null;
-
- protected void setUp() throws Exception {
- super.setUp();
-
- elements = new Bean[] { new Bean("1"), new Bean("2"), new Bean("3") };
- model = new Bean(Arrays.asList(elements));
- elementType = Bean.class;
- }
-
- public void testObserveListArrayInferredElementType() throws Exception {
- IObservableList list = BeansObservables.observeList(Realm.getDefault(),
- model, "listArray", null);
- assertEquals("element type", elementType, list.getElementType());
- }
-
- public void testObserveListNonInferredElementType() throws Exception {
- elementType = Object.class;
- IObservableList list = BeansObservables.observeList(Realm.getDefault(),
- model, "list", null);
- assertEquals("element type", elementType, list.getElementType());
- }
-
- public void testListFactory() throws Exception {
- IObservableFactory factory = BeansObservables.listFactory(Realm
- .getDefault(), "list", elementType);
- IObservableList list = (IObservableList) factory
- .createObservable(model);
-
- assertTrue("elements of the list", Arrays.equals(elements, list
- .toArray(new Bean[list.size()])));
- assertEquals("element type", elementType, list.getElementType());
- }
-
- public void testObserveDetailListElementType() throws Exception {
- WritableValue parent = WritableValue.withValueType(Bean.class);
- parent.setValue(model);
- IObservableList list = BeansObservables.observeDetailList(Realm
- .getDefault(), parent, "list", elementType);
-
- assertEquals("element type", elementType, list.getElementType());
- assertTrue("elements of list", Arrays.equals(elements, list
- .toArray(new Bean[list.size()])));
- }
-
- public void testObserveDetailValueIBeanObservable() throws Exception {
- WritableValue parent = WritableValue.withValueType(Bean.class);
- parent.setValue(new Bean());
-
- IObservableValue detailValue = BeansObservables.observeDetailValue(
- Realm.getDefault(), parent, "value", String.class);
- assertTrue(detailValue instanceof IBeanObservable);
-
- BeanObservableValueDecorator beanObservable = (BeanObservableValueDecorator) detailValue;
- assertEquals("property descriptor", Bean.class.getMethod("getValue",
- null), beanObservable.getPropertyDescriptor().getReadMethod());
- assertEquals("observed", parent, beanObservable.getObserved());
- assertTrue("delegate", beanObservable.getDelegate().getClass()
- .getName().endsWith("DetailObservableValue"));
- }
-
- public void testObserveDetailValueNullOuterElementType() throws Exception {
- WritableValue parent = new WritableValue(new Bean(), null);
-
- IObservableValue detailValue = BeansObservables.observeDetailValue(
- Realm.getDefault(), parent, "value", String.class);
-
- assertNull("property descriptor", ((IBeanObservable) detailValue)
- .getPropertyDescriptor());
- }
-
- public void testObservableDetailListIBeanObservable() throws Exception {
- WritableValue parent = WritableValue.withValueType(Bean.class);
- parent.setValue(new Bean());
-
- IObservableList detailList = BeansObservables.observeDetailList(Realm
- .getDefault(), parent, "list", Bean.class);
- assertTrue("detail is not an IBeanObservable",
- detailList instanceof IBeanObservable);
-
- BeanObservableListDecorator beanObservable = (BeanObservableListDecorator) detailList;
- assertEquals("property descriptor", Bean.class.getMethod("getList",
- null), beanObservable.getPropertyDescriptor().getReadMethod());
- assertEquals("observed", parent, beanObservable.getObserved());
-
- // DetailObservableList is package level we can do a straight instanceof
- // check
- assertTrue("delegate is the observed", beanObservable.getDelegate()
- .equals(detailList));
- }
-
- public void testObservableDetailListNullOuterElementType() throws Exception {
- WritableValue parent = new WritableValue(new Bean(), null);
-
- IObservableList detailList = BeansObservables.observeDetailList(Realm
- .getDefault(), parent, "list", Bean.class);
-
- assertNull("property descriptor", ((IBeanObservable) detailList)
- .getPropertyDescriptor());
- }
-
- public void testObservableDetailSetIBeanObservable() throws Exception {
- WritableValue parent = WritableValue.withValueType(Bean.class);
- parent.setValue(new Bean());
-
- IObservableSet detailSet = BeansObservables.observeDetailSet(Realm
- .getDefault(), parent, "set", Bean.class);
- assertTrue("detail is not an IBeanObservable",
- detailSet instanceof IBeanObservable);
-
- BeanObservableSetDecorator beanObservable = (BeanObservableSetDecorator) detailSet;
- assertEquals("property descriptor", Bean.class
- .getMethod("getSet", null), beanObservable
- .getPropertyDescriptor().getReadMethod());
- assertEquals("observed", parent, beanObservable.getObserved());
-
- // DetailObservableSet is package level we can't do a straight
- // instanceof check
- assertTrue("delegate is the observed", beanObservable.getDelegate()
- .equals(detailSet));
- }
-
- public void testObservableDetailSetNullOuterElementType() throws Exception {
- WritableValue parent = new WritableValue(new Bean(), null);
-
- IObservableSet detailSet = BeansObservables.observeDetailSet(Realm
- .getDefault(), parent, "set", Bean.class);
-
- assertNull("property descriptor", ((IBeanObservable) detailSet)
- .getPropertyDescriptor());
- }
-
- public void testObserveSetElementType() throws Exception {
- Bean bean = new Bean();
- IObservableSet observableSet = BeansObservables.observeSet(Realm
- .getDefault(), bean, "set", Bean.class);
- assertEquals(Bean.class, observableSet.getElementType());
- }
-
- public void testObserveSetNonInferredElementType() throws Exception {
- Bean bean = new Bean();
- IObservableSet observableSet = BeansObservables.observeSet(Realm
- .getDefault(), bean, "set");
- assertEquals(Object.class, observableSet.getElementType());
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/observable/RealmTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/observable/RealmTest.java
deleted file mode 100644
index aac78b3b..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/observable/RealmTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.tests.databinding.observable;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.jface.tests.databinding.util.RealmTester;
-import org.eclipse.jface.tests.databinding.util.RealmTester.CurrentRealm;
-
-/**
- * @since 3.2
- */
-public class RealmTest extends TestCase {
- public void testSetDefaultWithRunnable() throws Exception {
- Realm oldRealm = new CurrentRealm(true);
- final Realm newRealm = new CurrentRealm(true);
-
- RealmTester.setDefault(oldRealm);
- Realm.runWithDefault(newRealm, new Runnable() {
- public void run() {
- assertEquals("new realm should be default", newRealm, Realm.getDefault());
- }
- });
-
- assertEquals("old realm should have been restored", oldRealm, Realm.getDefault());
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/observable/map/AbstractObservableMapTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/observable/map/AbstractObservableMapTest.java
deleted file mode 100644
index 9e3d4040..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/observable/map/AbstractObservableMapTest.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.tests.databinding.observable.map;
-
-import java.util.Set;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.databinding.observable.map.AbstractObservableMap;
-import org.eclipse.core.databinding.observable.map.MapDiff;
-import org.eclipse.jface.tests.databinding.util.RealmTester;
-import org.eclipse.jface.tests.databinding.util.RealmTester.CurrentRealm;
-
-/**
- * @since 3.2
- */
-public class AbstractObservableMapTest extends TestCase {
- private AbstractObservableMapStub map;
-
- protected void setUp() throws Exception {
- RealmTester.setDefault(new CurrentRealm(true));
- map = new AbstractObservableMapStub();
- }
-
- protected void tearDown() throws Exception {
- RealmTester.setDefault(null);
- }
-
- public void testIsStaleRealmChecks() throws Exception {
- RealmTester.exerciseCurrent(new Runnable() {
- public void run() {
- map.isStale();
- }
- });
- }
-
- public void testSetStaleRealmChecks() throws Exception {
- RealmTester.exerciseCurrent(new Runnable() {
- public void run() {
- map.setStale(true);
- }
- });
- }
-
- public void testFireStaleRealmChecks() throws Exception {
- RealmTester.exerciseCurrent(new Runnable() {
- public void run() {
- map.fireStale();
- }
- });
- }
-
- public void testFireChangeRealmChecks() throws Exception {
- RealmTester.exerciseCurrent(new Runnable() {
- public void run() {
- map.fireChange();
- }
- });
- }
-
- public void testFireMapChangeRealmChecks() throws Exception {
- RealmTester.exerciseCurrent(new Runnable() {
- public void run() {
- map.fireMapChange(null);
- }
- });
- }
-
- static class AbstractObservableMapStub extends AbstractObservableMap {
- public Set entrySet() {
- return null;
- }
-
- protected void fireChange() {
- super.fireChange();
- }
-
- protected void fireMapChange(MapDiff diff) {
- super.fireMapChange(diff);
- }
-
- protected void fireStale() {
- super.fireStale();
- }
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/observable/map/ObservableMapTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/observable/map/ObservableMapTest.java
deleted file mode 100644
index cc89be45..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/observable/map/ObservableMapTest.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.tests.databinding.observable.map;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.databinding.observable.map.IMapChangeListener;
-import org.eclipse.core.databinding.observable.map.MapChangeEvent;
-import org.eclipse.core.databinding.observable.map.MapDiff;
-import org.eclipse.core.databinding.observable.map.ObservableMap;
-import org.eclipse.jface.tests.databinding.util.RealmTester;
-import org.eclipse.jface.tests.databinding.util.RealmTester.CurrentRealm;
-
-/**
- * @since 3.2
- *
- */
-public class ObservableMapTest extends TestCase {
- ObservableMapStub map;
-
- protected void setUp() throws Exception {
- RealmTester.setDefault(new CurrentRealm(true));
- map = new ObservableMapStub(new HashMap());
- }
-
- protected void tearDown() throws Exception {
- RealmTester.setDefault(null);
- }
-
- public void testDisposeMapChangeListeners() throws Exception {
- class MapChangeListener implements IMapChangeListener {
- int count;
-
- public void handleMapChange(MapChangeEvent event) {
- count++;
- }
- }
-
- MapChangeListener listener = new MapChangeListener();
- map.addMapChangeListener(listener);
-
- assertEquals(0, listener.count);
- map.fireMapChange(null);
- assertEquals(1, listener.count);
-
- map.dispose();
- try {
- map.fireMapChange(null);
- } catch (Exception e) {
- // do nothing
- }
-
- assertEquals("listener should not have been notified", 1,
- listener.count);
- }
-
- public void testIsStaleRealmChecks() throws Exception {
- RealmTester.exerciseCurrent(new Runnable() {
- public void run() {
- map.isStale();
- }
- });
- }
-
- public void testSetStaleRealmChecks() throws Exception {
- RealmTester.exerciseCurrent(new Runnable() {
- public void run() {
- map.setStale(true);
- }
- });
- }
-
- public void testFireMapChangeRealmChecks() throws Exception {
- RealmTester.exerciseCurrent(new Runnable() {
- public void run() {
- map.fireMapChange(null);
- }
- });
- }
-
- static class ObservableMapStub extends ObservableMap {
- /**
- * @param wrappedMap
- */
- public ObservableMapStub(Map wrappedMap) {
- super(wrappedMap);
- }
-
- protected void fireMapChange(MapDiff diff) {
- super.fireMapChange(diff);
- }
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/observable/map/WritableMapTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/observable/map/WritableMapTest.java
deleted file mode 100644
index d7d22aa7..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/observable/map/WritableMapTest.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.tests.databinding.observable.map;
-
-import java.util.Collections;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.map.WritableMap;
-import org.eclipse.jface.tests.databinding.util.RealmTester;
-import org.eclipse.jface.tests.databinding.util.RealmTester.CurrentRealm;
-
-/**
- * @since 3.2
- *
- */
-public class WritableMapTest extends TestCase {
- protected void setUp() throws Exception {
- RealmTester.setDefault(new CurrentRealm(true));
- }
-
- protected void tearDown() throws Exception {
- RealmTester.setDefault(null);
- }
-
- public void testPutRealmChecks() throws Exception {
- RealmTester.exerciseCurrent(new Runnable() {
- public void run() {
- WritableMap map = new WritableMap();
- map.put("", "");
- }
- });
- }
-
- public void testRemoveRealmChecks() throws Exception {
- RealmTester.exerciseCurrent(new Runnable() {
- public void run() {
- WritableMap map = new WritableMap();
- CurrentRealm realm = (CurrentRealm) Realm.getDefault();
- boolean current = realm.isCurrent();
- realm.setCurrent(true);
- map.put("", "");
- realm.setCurrent(current);
-
- map.remove("");
- }
- });
- }
-
- public void testClearRealmChecks() throws Exception {
- RealmTester.exerciseCurrent(new Runnable() {
- public void run() {
- WritableMap map = new WritableMap();
- map.clear();
- }
- });
- }
-
- public void testPutAllRealmChecks() throws Exception {
- RealmTester.exerciseCurrent(new Runnable() {
- public void run() {
- WritableMap map = new WritableMap();
- map.putAll(Collections.EMPTY_MAP);
- }
- });
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/internal/databinding/observable/masterdetail/DetailObservableListTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/internal/databinding/observable/masterdetail/DetailObservableListTest.java
deleted file mode 100644
index 20c41028..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/internal/databinding/observable/masterdetail/DetailObservableListTest.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.tests.internal.databinding.observable.masterdetail;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-
-import org.eclipse.core.databinding.observable.IObservable;
-import org.eclipse.core.databinding.observable.list.WritableList;
-import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
-import org.eclipse.core.databinding.observable.value.WritableValue;
-import org.eclipse.core.internal.databinding.observable.masterdetail.DetailObservableList;
-import org.eclipse.core.runtime.AssertionFailedException;
-import org.eclipse.jface.tests.databinding.AbstractDefaultRealmTestCase;
-
-/**
- * @since 3.2
- */
-public class DetailObservableListTest extends AbstractDefaultRealmTestCase {
- /**
- * Asserts the use case of specifying null on construction for the detail
- * type of the detail list.
- *
- * @throws Exception
- */
- public void testElementTypeNull() throws Exception {
- WritableValue observableValue = new WritableValue(new WritableList(new ArrayList(), Object.class), null);
-
- class Factory implements IObservableFactory {
- Object type = Object.class;
-
- public IObservable createObservable(Object target) {
- return new WritableList(new ArrayList(), type);
- }
- }
-
- Factory factory = new Factory();
- DetailObservableList detailObservable = new DetailObservableList(
- factory, observableValue, null);
- assertNull(detailObservable.getElementType());
-
- //change the type returned from the factory
- factory.type = String.class;
- observableValue.setValue(new WritableList(new ArrayList(), String.class));
- assertNull("element type not null", detailObservable.getElementType());
- }
-
- /**
- * Asserts that you can't change the type across multiple inner observables.
- *
- * @throws Exception
- */
- public void testElementTypeNotNull() throws Exception {
- WritableValue observableValue = new WritableValue(new WritableList(new ArrayList(), Object.class),
- null);
-
- class Factory implements IObservableFactory {
- Object type = Object.class;
-
- public IObservable createObservable(Object target) {
- return new WritableList(new ArrayList(), type);
- }
- }
-
- Factory factory = new Factory();
- DetailObservableList detailObservable = new DetailObservableList(factory,
- observableValue, Object.class);
- assertEquals(factory.type, detailObservable.getElementType());
-
- try {
- factory.type = String.class;
- observableValue.setValue(new WritableList(Arrays
- .asList(new Object[] { new Object() }), String.class));
- fail("if an element type is set this cannot be changed");
- } catch (AssertionFailedException e) {
- }
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/internal/databinding/observable/masterdetail/DetailObservableSetTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/internal/databinding/observable/masterdetail/DetailObservableSetTest.java
deleted file mode 100644
index 0ed49887..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/internal/databinding/observable/masterdetail/DetailObservableSetTest.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.core.tests.internal.databinding.observable.masterdetail;
-
-import java.util.Arrays;
-import java.util.HashSet;
-
-import org.eclipse.core.databinding.observable.IObservable;
-import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
-import org.eclipse.core.databinding.observable.set.WritableSet;
-import org.eclipse.core.databinding.observable.value.WritableValue;
-import org.eclipse.core.internal.databinding.observable.masterdetail.DetailObservableSet;
-import org.eclipse.core.runtime.AssertionFailedException;
-import org.eclipse.jface.tests.databinding.AbstractDefaultRealmTestCase;
-
-/**
- * @since 3.2
- *
- */
-public class DetailObservableSetTest extends AbstractDefaultRealmTestCase {
- /**
- * Asserts the use case of specifying null on construction for the detail
- * type of the detail list.
- *
- * @throws Exception
- */
- public void testElementTypeNull() throws Exception {
- WritableValue observableValue = new WritableValue(new WritableSet(new HashSet(), Object.class),
- null);
-
- class Factory implements IObservableFactory {
- Object type;
-
- public IObservable createObservable(Object target) {
- return new WritableSet(new HashSet(), type);
- }
- }
-
- Factory factory = new Factory();
- DetailObservableSet detailObservable = new DetailObservableSet(factory,
- observableValue, null);
- assertNull(detailObservable.getElementType());
-
- factory.type = Object.class;
- observableValue.setValue(new WritableSet(Arrays
- .asList(new Object[] { new Object() }), String.class));
- assertNull("element type not null", detailObservable.getElementType());
-
- factory.type = String.class;
- // set the value again to ensure that the observable doesn't update the
- // element type with that of the new element type
- observableValue.setValue(new WritableSet(Arrays
- .asList(new String[] { "1" }), Object.class));
- assertNull("element type not null", detailObservable.getElementType());
- }
-
- /**
- * Asserts that you can't change the type across multiple inner observables.
- *
- * @throws Exception
- */
- public void testElementTypeNotNull() throws Exception {
- WritableValue observableValue = new WritableValue(new WritableSet(new HashSet(), Object.class),
- null);
-
- class Factory implements IObservableFactory {
- Object type = Object.class;
-
- public IObservable createObservable(Object target) {
- return new WritableSet(new HashSet(), type);
- }
- }
-
- Factory factory = new Factory();
- DetailObservableSet detailObservable = new DetailObservableSet(factory,
- observableValue, Object.class);
- assertEquals(factory.type, detailObservable.getElementType());
-
- try {
- factory.type = String.class;
- observableValue.setValue(new WritableSet(Arrays
- .asList(new Object[] { new Object() }), String.class));
- fail("if an element type is set this cannot be changed");
- } catch (AssertionFailedException e) {
- }
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/internal/databinding/observable/masterdetail/DetailObservableValueTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/internal/databinding/observable/masterdetail/DetailObservableValueTest.java
deleted file mode 100755
index 471666b4..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/internal/databinding/observable/masterdetail/DetailObservableValueTest.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- * Brad Reynolds - bug 147515
- ******************************************************************************/
-
-package org.eclipse.core.tests.internal.databinding.observable.masterdetail;
-
-import org.eclipse.core.databinding.observable.IObservable;
-import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
-import org.eclipse.core.databinding.observable.masterdetail.MasterDetailObservables;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.databinding.observable.value.WritableValue;
-import org.eclipse.core.internal.databinding.observable.masterdetail.DetailObservableValue;
-import org.eclipse.jface.tests.databinding.AbstractDefaultRealmTestCase;
-
-/**
- * @since 3.2
- */
-public class DetailObservableValueTest extends AbstractDefaultRealmTestCase {
- private WritableValue outerObservable;
-
- protected void setUp() throws Exception {
- super.setUp();
- outerObservable = new WritableValue();
- }
-
- public void testSetValue() throws Exception {
- WritableValueFactory factory = new WritableValueFactory();
- outerObservable.setValue("");
-
- IObservableValue detailObservable = MasterDetailObservables
- .detailValue(outerObservable, factory, null);
- WritableValue innerObservable = factory.innerObservable;
- Object value = new Object();
-
- assertFalse(value.equals(innerObservable.getValue()));
- detailObservable.setValue(value);
- assertEquals("inner value", value, innerObservable.getValue());
- }
-
- public void testGetValueType() throws Exception {
- DetailObservableValue detailObservable = new DetailObservableValue(outerObservable, null, String.class);
- assertEquals(String.class, detailObservable.getValueType());
- }
-
- /**
- * Asserts that when a null value type is set for the detail observable no
- * type checking is performed and the value type is always <code>null</code>.
- */
- public void testGetValueTypeNullValueType() throws Exception {
- WritableValueFactory factory = new WritableValueFactory();
- DetailObservableValue detailObservable = new DetailObservableValue(
- outerObservable, factory, null);
- assertNull(detailObservable.getValueType());
- factory.type = String.class;
-
- // force the inner observable to be recreated
- outerObservable.setValue("1");
- assertNull("value type should be ignored", detailObservable.getValueType());
-
- factory.type = Object.class;
-
- // force the inner observable to be recreated
- outerObservable.setValue("2");
- assertNull("value type should be ignored", detailObservable.getValueType());
- }
-
- /**
- * Factory that creates WritableValues with the target as the value.
- */
- static class WritableValueFactory implements IObservableFactory {
- WritableValue innerObservable;
- Object type;
-
- public IObservable createObservable(Object target) {
- return innerObservable = new WritableValue(target, type);
- }
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/conversion/IdentityConverterTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/conversion/IdentityConverterTest.java
deleted file mode 100644
index 02925e6e..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/conversion/IdentityConverterTest.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920
- ******************************************************************************/
-
-package org.eclipse.jface.internal.databinding.provisional.conversion;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.databinding.BindingException;
-import org.eclipse.core.databinding.conversion.IdentityConverter;
-
-/**
- * @since 3.2
- *
- */
-public class IdentityConverterTest extends TestCase {
-
- private IdentityConverter c;
-
- /* (non-Javadoc)
- * @see junit.framework.TestCase#setUp()
- */
- protected void setUp() throws Exception {
- c = new IdentityConverter(Integer.TYPE, Integer.TYPE);
- }
-
- public void testIsPrimitiveTypeMatchedWithBoxed() throws Exception {
- assertTrue(c.isPrimitiveTypeMatchedWithBoxed(Integer.class, Integer.TYPE));
- assertTrue(c.isPrimitiveTypeMatchedWithBoxed(Integer.TYPE, Integer.class));
-
- assertTrue(c.isPrimitiveTypeMatchedWithBoxed(Byte.class, Byte.TYPE));
- assertTrue(c.isPrimitiveTypeMatchedWithBoxed(Byte.TYPE, Byte.class));
-
- assertTrue(c.isPrimitiveTypeMatchedWithBoxed(Short.class, Short.TYPE));
- assertTrue(c.isPrimitiveTypeMatchedWithBoxed(Short.TYPE, Short.class));
-
- assertTrue(c.isPrimitiveTypeMatchedWithBoxed(Long.class, Long.TYPE));
- assertTrue(c.isPrimitiveTypeMatchedWithBoxed(Long.TYPE, Long.class));
-
- assertTrue(c.isPrimitiveTypeMatchedWithBoxed(Float.class, Float.TYPE));
- assertTrue(c.isPrimitiveTypeMatchedWithBoxed(Float.TYPE, Float.class));
-
- assertTrue(c.isPrimitiveTypeMatchedWithBoxed(Double.class, Double.TYPE));
- assertTrue(c.isPrimitiveTypeMatchedWithBoxed(Double.TYPE, Double.class));
-
- assertTrue(c.isPrimitiveTypeMatchedWithBoxed(Boolean.class, Boolean.TYPE));
- assertTrue(c.isPrimitiveTypeMatchedWithBoxed(Boolean.TYPE, Boolean.class));
-
- assertFalse(c.isPrimitiveTypeMatchedWithBoxed(Boolean.class, Integer.TYPE));
- }
-
- public void testConvert_NullToPrimitive() {
- IdentityConverter p2b = new IdentityConverter(Float.TYPE, Float.TYPE);
- try {
- p2b.convert(null);
- fail("Should have thrown an exception");
- } catch (BindingException b) {
- // success
- }
- }
-
- public void testConvert_PrimitiveToBoxed() throws Exception {
- IdentityConverter p2b = new IdentityConverter(Float.class, Float.TYPE);
- assertEquals("4.2", new Float(4.2), p2b.convert(new Float(4.2)));
- }
-
- public void testConvert_BoxedToPrimitive() throws Exception {
- IdentityConverter p2b = new IdentityConverter(Float.TYPE, Float.class);
- assertEquals("4.2", new Float(4.2), p2b.convert(new Float(4.2)));
- }
-
- public void testConvert_PrimitiveToPrimitive() throws Exception {
- IdentityConverter p2b = new IdentityConverter(Float.TYPE, Float.TYPE);
- assertEquals("4.2", new Float(4.2), p2b.convert(new Float(4.2)));
- }
-
- public void testConvert_BoxedToBoxed() throws Exception {
- IdentityConverter p2b = new IdentityConverter(Float.class, Float.class);
- assertEquals("4.2", new Float(4.2), p2b.convert(new Float(4.2)));
- }
-
- public static class Person {
- public String foo = "blah";
- }
-
- public static class Animal {
- public String name="fido";
- }
-
- public void test_Convert_ValidAssignment() throws Exception {
- IdentityConverter pc = new IdentityConverter(Object.class, Person.class);
- Person orig = new Person();
- Object person = pc.convert(orig);
- assertTrue("Person class", person.getClass().equals(Person.class));
- assertTrue("Need correct Person", person.equals(orig));
- }
-
- public void test_Convert_ValidAssignment2() throws Exception {
- IdentityConverter pc = new IdentityConverter(Person.class, Object.class);
- Person orig = new Person();
- Object person = pc.convert(orig);
- assertTrue("Person class", person.getClass().equals(Person.class));
- assertTrue("Need correct Person", person.equals(orig));
- }
-
- public void testConvert_InvalidAssignment() throws Exception {
- IdentityConverter pc = new IdentityConverter(Object.class, Person.class);
- try {
- pc.convert(new Animal());
- fail("Should have gotten an exception");
- } catch (Exception e) {
- // success
- }
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/AbstractBindSupportFactoryTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/AbstractBindSupportFactoryTest.java
deleted file mode 100644
index 596080e9..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/AbstractBindSupportFactoryTest.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.internal.databinding.provisional.factories;
-
-import org.eclipse.core.databinding.AggregateValidationStatus;
-import org.eclipse.core.databinding.DataBindingContext;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.tests.databinding.AbstractDefaultRealmTestCase;
-
-/**
- * @since 3.2
- *
- */
-public class AbstractBindSupportFactoryTest extends AbstractDefaultRealmTestCase {
-
- protected DataBindingContext ctx;
-
- protected void setUp() throws Exception {
- super.setUp();
-
- ctx = new DataBindingContext();
- }
-
- protected void assertNoErrorsFound() {
- IStatus status = AggregateValidationStatus.getStatusMaxSeverity(ctx.getBindings());
- assertTrue("No errors should be found, but found " + status , status.isOK());
- }
-
- protected void assertErrorsFound() {
- IStatus status = AggregateValidationStatus.getStatusMaxSeverity(ctx.getBindings());
- assertFalse("Errors should be found, but found none.", status.isOK());
- }
-
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryBooleanPrimitiveTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryBooleanPrimitiveTest.java
deleted file mode 100644
index 5593a0d4..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryBooleanPrimitiveTest.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920
- ******************************************************************************/
-
-package org.eclipse.jface.internal.databinding.provisional.factories;
-
-import org.eclipse.core.databinding.beans.BeansObservables;
-import org.eclipse.jface.examples.databinding.ModelObject;
-
-public class DefaultBindSupportFactoryBooleanPrimitiveTest extends AbstractBindSupportFactoryTest {
- private TestDataObject dataObject;
-
- public void setUp() throws Exception {
- super.setUp();
-
- dataObject = new TestDataObject();
- dataObject.setStringVal("0");
- dataObject.setBooleanPrimitiveVal(false);
- dataObject.setBooleanVal(new Boolean(false));
- }
-
- public void testStringToBooleanPrimitiveConverter() {
- ctx.bindValue(BeansObservables.observeValue(dataObject, "stringVal"), BeansObservables.observeValue(dataObject,
- "booleanPrimitiveVal"), null);
-
- dataObject.setBooleanPrimitiveVal(true);
- assertEquals("boolean value does not match", true, dataObject.getBooleanPrimitiveVal());
- assertEquals("String value does not match", "true", dataObject.getStringVal());
- assertNoErrorsFound();
-
- dataObject.setStringVal("false");
- assertEquals("boolean value does not match", false, dataObject.getBooleanPrimitiveVal());
- assertEquals("String value does not match", "false", dataObject.getStringVal());
- assertNoErrorsFound();
-
- dataObject.setStringVal("");
- assertEquals("boolean value does not match", false, dataObject.getBooleanPrimitiveVal());
- assertEquals("String value does not match", "", dataObject.getStringVal());
- assertErrorsFound();
-
- dataObject.setStringVal(null);
- assertEquals("boolean value does not match", false, dataObject.getBooleanPrimitiveVal());
- assertNull("String value does not match", dataObject.getStringVal());
- assertErrorsFound();
- }
-
- public void testBooleanToBooleanPrimitiveConverter() {
- ctx.bindValue(BeansObservables.observeValue(dataObject, "booleanVal"),
- BeansObservables.observeValue(dataObject, "booleanPrimitiveVal"),
- null);
-
- dataObject.setBooleanPrimitiveVal(true);
- assertEquals("boolean value does not match", true, dataObject.getBooleanPrimitiveVal());
- assertEquals("Boolean value does not match", new Boolean(true), dataObject.getBooleanVal());
- assertNoErrorsFound();
-
- dataObject.setBooleanVal(new Boolean(false));
- assertEquals("boolean value does not match", false, dataObject.getBooleanPrimitiveVal());
- assertEquals("Boolean value does not match", new Boolean(false), dataObject.getBooleanVal());
- assertNoErrorsFound();
-
- dataObject.setBooleanVal(null);
- assertEquals("boolean value does not match", false, dataObject.getBooleanPrimitiveVal());
- assertNull("Boolean value does not match", dataObject.getBooleanVal());
- assertErrorsFound();
- }
-
- public void testObjectToBooleanPrimitiveConverter() {
- ctx.bindValue(BeansObservables.observeValue(dataObject, "objectVal"), BeansObservables.observeValue(dataObject,
- "booleanPrimitiveVal"), null);
-
- dataObject.setBooleanPrimitiveVal(true);
- assertEquals("boolean value does not match", true, dataObject.getBooleanPrimitiveVal());
- assertEquals("Object value does not match", new Boolean(true), dataObject.getObjectVal());
- assertNoErrorsFound();
-
- dataObject.setObjectVal(new Boolean(false));
- assertEquals("boolean value does not match", false, dataObject.getBooleanPrimitiveVal());
- assertEquals("Object value does not match", new Boolean(false), dataObject.getObjectVal());
- assertNoErrorsFound();
-
- dataObject.setObjectVal(null);
- assertEquals("boolean value does not match", false, dataObject.getBooleanPrimitiveVal());
- assertNull("Object value does not match", dataObject.getObjectVal());
- assertErrorsFound();
-
- Object object = new Object();
- dataObject.setObjectVal(object);
- assertEquals("boolean value does not match", false, dataObject.getBooleanPrimitiveVal());
- assertSame("Object value does not match", object, dataObject.getObjectVal());
- assertErrorsFound();
- }
-
- public class TestDataObject extends ModelObject {
- private boolean booleanPrimitiveValue;
-
- private String stringVal;
-
- private Boolean booleanVal;
-
- private Object objectVal;
-
- public Boolean getBooleanVal() {
- return booleanVal;
- }
-
- public void setBooleanVal(Boolean booleanVal) {
- Object oldVal = this.booleanVal;
- this.booleanVal = booleanVal;
- firePropertyChange("booleanVal", oldVal, this.booleanVal);
- }
-
- public boolean getBooleanPrimitiveVal() {
- return booleanPrimitiveValue;
- }
-
- public void setBooleanPrimitiveVal(boolean booleanPrimitiveValue) {
- boolean oldVal = this.booleanPrimitiveValue;
- this.booleanPrimitiveValue = booleanPrimitiveValue;
- firePropertyChange("booleanPrimitiveVal", new Boolean(oldVal), new Boolean(this.booleanPrimitiveValue));
- }
-
- public String getStringVal() {
- return stringVal;
- }
-
- public void setStringVal(String stringVal) {
- Object oldVal = this.stringVal;
- this.stringVal = stringVal;
- firePropertyChange("stringVal", oldVal, this.stringVal);
- }
-
- public Object getObjectVal() {
- return objectVal;
- }
-
- public void setObjectVal(Object objectVal) {
- Object oldVal = this.objectVal;
- this.objectVal = objectVal;
- firePropertyChange("objectVal", oldVal, this.objectVal);
- }
- }
-} \ No newline at end of file
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryBytePrimitiveTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryBytePrimitiveTest.java
deleted file mode 100644
index 1c8054c6..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryBytePrimitiveTest.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920
- ******************************************************************************/
-
-package org.eclipse.jface.internal.databinding.provisional.factories;
-
-import org.eclipse.core.databinding.beans.BeansObservables;
-import org.eclipse.jface.examples.databinding.ModelObject;
-
-public class DefaultBindSupportFactoryBytePrimitiveTest extends AbstractBindSupportFactoryTest {
- private TestDataObject dataObject;
-
- public void setUp() throws Exception {
- super.setUp();
- dataObject = new TestDataObject();
- dataObject.setStringVal("0");
- dataObject.setBytePrimitiveVal((byte) 0);
- dataObject.setByteVal(new Byte((byte) 0));
- }
-
- public void testStringToBytePrimitiveConverter() {
- ctx.bindValue(BeansObservables.observeValue(dataObject, "stringVal"), BeansObservables.observeValue(dataObject,
- "bytePrimitiveVal"), null);
-
- dataObject.setBytePrimitiveVal((byte) 110);
- assertEquals("byte value does not match", 110, dataObject.getBytePrimitiveVal(), .001);
- assertEquals("String value does not match", "110", dataObject.getStringVal());
- assertNoErrorsFound();
-
- dataObject.setStringVal("70");
- assertEquals("byte value does not match", 70, dataObject.getBytePrimitiveVal(), .001);
- assertEquals("String value does not match", "70", dataObject.getStringVal());
- assertNoErrorsFound();
-
- dataObject.setStringVal("");
- assertEquals("byte value does not match", 70, dataObject.getBytePrimitiveVal(), .001);
- assertEquals("String value does not match", "", dataObject.getStringVal());
- assertErrorsFound();
-
- dataObject.setStringVal(null);
- assertEquals("byte value does not match", 70, dataObject.getBytePrimitiveVal(), .001);
- assertNull("String value does not match", dataObject.getStringVal());
- assertErrorsFound();
- }
-
- public void testByteToBytePrimitiveConverter() {
- ctx.bindValue(BeansObservables.observeValue(dataObject, "byteVal"), BeansObservables.observeValue(dataObject,
- "bytePrimitiveVal"), null);
-
- dataObject.setBytePrimitiveVal((byte) 110);
- assertEquals("byte value does not match", 110, dataObject.getBytePrimitiveVal(), .001);
- assertEquals("Byte value does not match", new Byte((byte) 110), dataObject.getByteVal());
- assertNoErrorsFound();
-
- dataObject.setByteVal(new Byte((byte) 70));
- assertEquals("byte value does not match", 70, dataObject.getBytePrimitiveVal(), .001);
- assertEquals("Byte value does not match", new Byte((byte) 70), dataObject.getByteVal());
- assertNoErrorsFound();
-
- dataObject.setByteVal(null);
- assertEquals("byte value does not match", 70, dataObject.getBytePrimitiveVal(), .001);
- assertNull("Byte value does not match", dataObject.getByteVal());
- assertErrorsFound();
- }
-
- public void testObjectToBytePrimitiveConverter() {
- ctx.bindValue(BeansObservables.observeValue(dataObject, "objectVal"), BeansObservables.observeValue(dataObject,
- "bytePrimitiveVal"), null);
-
- dataObject.setBytePrimitiveVal((byte) 110);
- assertEquals("byte value does not match", 110, dataObject.getBytePrimitiveVal(), .001);
- assertEquals("Object value does not match", new Byte((byte) 110), dataObject.getObjectVal());
- assertNoErrorsFound();
-
- dataObject.setObjectVal(new Byte((byte) 70));
- assertEquals("byte value does not match", 70, dataObject.getBytePrimitiveVal(), .001);
- assertEquals("Object value does not match", new Byte((byte) 70), dataObject.getObjectVal());
- assertNoErrorsFound();
-
- dataObject.setObjectVal(null);
- assertEquals("byte value does not match", 70, dataObject.getBytePrimitiveVal());
- assertNull("Object value does not match", dataObject.getObjectVal());
- assertErrorsFound();
-
- Object object = new Object();
- dataObject.setObjectVal(object);
- assertEquals("byte value does not match", 70, dataObject.getBytePrimitiveVal());
- assertSame("Object value does not match", object, dataObject.getObjectVal());
- assertErrorsFound();
- }
-
- public class TestDataObject extends ModelObject {
- private byte bytePrimitiveValue;
-
- private String stringVal;
-
- private Byte byteVal;
-
- private Object objectVal;
-
- public Byte getByteVal() {
- return byteVal;
- }
-
- public void setByteVal(Byte byteVal) {
- Object oldVal = this.byteVal;
- this.byteVal = byteVal;
- firePropertyChange("byteVal", oldVal, this.byteVal);
- }
-
- public byte getBytePrimitiveVal() {
- return bytePrimitiveValue;
- }
-
- public void setBytePrimitiveVal(byte bytePrimitiveValue) {
- byte oldVal = this.bytePrimitiveValue;
- this.bytePrimitiveValue = bytePrimitiveValue;
- firePropertyChange("bytePrimitiveVal", new Byte(oldVal), new Byte(this.bytePrimitiveValue));
- }
-
- public String getStringVal() {
- return stringVal;
- }
-
- public void setStringVal(String stringVal) {
- Object oldVal = this.stringVal;
- this.stringVal = stringVal;
- firePropertyChange("stringVal", oldVal, this.stringVal);
- }
-
- public Object getObjectVal() {
- return objectVal;
- }
-
- public void setObjectVal(Object objectVal) {
- Object oldVal = this.objectVal;
- this.objectVal = objectVal;
- firePropertyChange("objectVal", oldVal, this.objectVal);
- }
- }
-} \ No newline at end of file
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryDoublePrimitiveTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryDoublePrimitiveTest.java
deleted file mode 100644
index c0786054..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryDoublePrimitiveTest.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920
- ******************************************************************************/
-
-package org.eclipse.jface.internal.databinding.provisional.factories;
-
-import org.eclipse.core.databinding.beans.BeansObservables;
-import org.eclipse.jface.examples.databinding.ModelObject;
-
-public class DefaultBindSupportFactoryDoublePrimitiveTest extends AbstractBindSupportFactoryTest {
-
- private TestDataObject dataObject;
-
- public void setUp() throws Exception {
- super.setUp();
- dataObject = new TestDataObject();
- dataObject.setStringVal("0");
- dataObject.setDoublePrimitiveVal(0);
- dataObject.setDoubleVal(new Double(0));
- }
-
- public void testStringToDoublePrimitiveConverter() {
- ctx.bindValue(BeansObservables.observeValue(dataObject, "stringVal"), BeansObservables.observeValue(dataObject,
- "doublePrimitiveVal"), null);
-
- dataObject.setDoublePrimitiveVal(789.5);
- assertEquals("double value does not match", 789.5, dataObject.getDoublePrimitiveVal(), .001);
- assertEquals("String value does not match", "789.5", dataObject.getStringVal());
- assertNoErrorsFound();
-
- dataObject.setStringVal("910.5");
- assertEquals("double value does not match", 910.5, dataObject.getDoublePrimitiveVal(), .001);
- assertEquals("String value does not match", "910.5", dataObject.getStringVal());
- assertNoErrorsFound();
-
- dataObject.setStringVal("");
- assertEquals("double value does not match", 910.5, dataObject.getDoublePrimitiveVal(), .001);
- assertEquals("String value does not match", "", dataObject.getStringVal());
- assertErrorsFound();
-
- dataObject.setStringVal(null);
- assertEquals("double value does not match", 910.5, dataObject.getDoublePrimitiveVal(), .001);
- assertNull("String value does not match", dataObject.getStringVal());
- assertErrorsFound();
- }
-
- public void testDoubleToDoublePrimitiveConverter() {
- ctx.bindValue(BeansObservables.observeValue(dataObject, "doubleVal"), BeansObservables.observeValue(dataObject,
- "doublePrimitiveVal"), null);
- // ctx.bind(new Property(dataObject, "doubleVal"), new
- // Property(dataObject, "doublePrimitiveVal"), null);
-
- dataObject.setDoublePrimitiveVal(789.5);
- assertEquals("double value does not match", 789.5, dataObject.getDoublePrimitiveVal(), .001);
- assertEquals("Double value does not match", new Double(789.5), dataObject.getDoubleVal());
- assertNoErrorsFound();
-
- dataObject.setDoubleVal(new Double(910.5));
- assertEquals("double value does not match", 910.5, dataObject.getDoublePrimitiveVal(), .001);
- assertEquals("Double value does not match", new Double(910.5), dataObject.getDoubleVal());
- assertNoErrorsFound();
-
- dataObject.setDoubleVal(null);
- assertEquals("double value does not match", 910.5, dataObject.getDoublePrimitiveVal(), .001);
- assertNull("Double value does not match", dataObject.getDoubleVal());
- assertErrorsFound();
- }
-
- public void testObjectToDoublePrimitiveConverter() {
- ctx.bindValue(BeansObservables.observeValue(dataObject, "objectVal"), BeansObservables.observeValue(dataObject,
- "doublePrimitiveVal"), null);
-
- dataObject.setDoublePrimitiveVal(789.5);
- assertEquals("double value does not match", 789.5, dataObject.getDoublePrimitiveVal(), .001);
- assertEquals("Object value does not match", new Double(789.5), dataObject.getObjectVal());
- assertNoErrorsFound();
-
- dataObject.setObjectVal(new Double(910.5));
- assertEquals("double value does not match", 910.5, dataObject.getDoublePrimitiveVal(), .001);
- assertEquals("Object value does not match", new Double(910.5), dataObject.getObjectVal());
- assertNoErrorsFound();
-
- dataObject.setObjectVal(null);
- assertEquals("double value does not match", 910.5, dataObject.getDoublePrimitiveVal(), .001);
- assertNull("Object value does not match", dataObject.getObjectVal());
- assertErrorsFound();
-
- Object object = new Object();
- dataObject.setObjectVal(object);
- assertEquals("double value does not match", 910.5, dataObject.getDoublePrimitiveVal(), .001);
- assertSame("Object value does not match", object, dataObject.getObjectVal());
- assertErrorsFound();
- }
-
- public class TestDataObject extends ModelObject {
- private double doublePrimitiveValue;
-
- private String stringVal;
-
- private Double doubleVal;
-
- private Object objectVal;
-
- public Double getDoubleVal() {
- return doubleVal;
- }
-
- public void setDoubleVal(Double doubleVal) {
- Object oldVal = this.doubleVal;
- this.doubleVal = doubleVal;
- firePropertyChange("doubleVal", oldVal, this.doubleVal);
- }
-
- public double getDoublePrimitiveVal() {
- return doublePrimitiveValue;
- }
-
- public void setDoublePrimitiveVal(double doublePrimitiveValue) {
- double oldVal = this.doublePrimitiveValue;
- this.doublePrimitiveValue = doublePrimitiveValue;
- firePropertyChange("doublePrimitiveVal", new Double(oldVal), new Double(this.doublePrimitiveValue));
- }
-
- public String getStringVal() {
- return stringVal;
- }
-
- public void setStringVal(String stringVal) {
- Object oldVal = this.stringVal;
- this.stringVal = stringVal;
- firePropertyChange("stringVal", oldVal, this.stringVal);
- }
-
- public Object getObjectVal() {
- return objectVal;
- }
-
- public void setObjectVal(Object objectVal) {
- Object oldVal = this.objectVal;
- this.objectVal = objectVal;
- firePropertyChange("objectVal", oldVal, this.objectVal);
- }
- }
-} \ No newline at end of file
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryFloatPrimitiveTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryFloatPrimitiveTest.java
deleted file mode 100644
index 5eae378a..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryFloatPrimitiveTest.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920
- ******************************************************************************/
-
-package org.eclipse.jface.internal.databinding.provisional.factories;
-
-import org.eclipse.core.databinding.beans.BeansObservables;
-import org.eclipse.jface.examples.databinding.ModelObject;
-
-public class DefaultBindSupportFactoryFloatPrimitiveTest extends AbstractBindSupportFactoryTest {
-
- private TestDataObject dataObject;
-
- public void setUp() throws Exception {
- super.setUp();
- dataObject = new TestDataObject();
- dataObject.setStringVal("0");
- dataObject.setFloatPrimitiveVal(0);
- dataObject.setFloatVal(new Float(0));
- }
-
- public void testStringToFloatPrimitiveConverter() {
- ctx.bindValue(BeansObservables.observeValue(dataObject, "stringVal"), BeansObservables.observeValue(dataObject,
- "floatPrimitiveVal"), null);
-
- dataObject.setFloatPrimitiveVal((float) 789.5);
- assertEquals("float value does not match", 789.5, dataObject.getFloatPrimitiveVal(), .001);
- assertEquals("String value does not match", "789.5", dataObject.getStringVal());
- assertNoErrorsFound();
-
- dataObject.setStringVal("910.5");
- assertEquals("float value does not match", 910.5, dataObject.getFloatPrimitiveVal(), .001);
- assertEquals("String value does not match", "910.5", dataObject.getStringVal());
- assertNoErrorsFound();
-
- dataObject.setStringVal("");
- assertEquals("float value does not match", 910.5, dataObject.getFloatPrimitiveVal(), .001);
- assertEquals("String value does not match", "", dataObject.getStringVal());
- assertErrorsFound();
-
- dataObject.setStringVal(null);
- assertEquals("float value does not match", 910.5, dataObject.getFloatPrimitiveVal(), .001);
- assertNull("String value does not match", dataObject.getStringVal());
- assertErrorsFound();
- }
-
- public void testFloatToFloatPrimitiveConverter() {
- ctx.bindValue(BeansObservables.observeValue(dataObject, "floatVal"), BeansObservables.observeValue(dataObject,
- "floatPrimitiveVal"), null);
-
- dataObject.setFloatPrimitiveVal((float) 789.5);
- assertEquals("float value does not match", 789.5, dataObject.getFloatPrimitiveVal(), .001);
- assertEquals("Float value does not match", new Float(789.5), dataObject.getFloatVal());
- assertNoErrorsFound();
-
- dataObject.setFloatVal(new Float(910.5));
- assertEquals("float value does not match", 910.5, dataObject.getFloatPrimitiveVal(), .001);
- assertEquals("Float value does not match", new Float(910.5), dataObject.getFloatVal());
- assertNoErrorsFound();
-
- dataObject.setFloatVal(null);
- assertEquals("float value does not match", 910.5, dataObject.getFloatPrimitiveVal(), .001);
- assertNull("Float value does not match", dataObject.getFloatVal());
- assertErrorsFound();
- }
-
- public void testObjectToFloatPrimitiveConverter() {
- ctx.bindValue(BeansObservables.observeValue(dataObject, "objectVal"), BeansObservables.observeValue(dataObject,
- "floatPrimitiveVal"), null);
-
- dataObject.setFloatPrimitiveVal((float) 789.5);
- assertEquals("float value does not match", 789.5, dataObject.getFloatPrimitiveVal(), .001);
- assertEquals("Object value does not match", new Float(789.5), dataObject.getObjectVal());
- assertNoErrorsFound();
-
- dataObject.setObjectVal(new Float(910.5));
- assertEquals("float value does not match", 910.5, dataObject.getFloatPrimitiveVal(), .001);
- assertEquals("Object value does not match", new Float(910.5), dataObject.getObjectVal());
- assertNoErrorsFound();
-
- dataObject.setObjectVal(null);
- assertEquals("float value does not match", 910.5, dataObject.getFloatPrimitiveVal(), .001);
- assertNull("Object value does not match", dataObject.getObjectVal());
- assertErrorsFound();
-
- Object object = new Object();
- dataObject.setObjectVal(object);
- assertEquals("float value does not match", 910.5, dataObject.getFloatPrimitiveVal(), .001);
- assertSame("Object value does not match", object, dataObject.getObjectVal());
- assertErrorsFound();
- }
-
- public class TestDataObject extends ModelObject {
- private float floatPrimitiveValue;
-
- private String stringVal;
-
- private Float floatVal;
-
- private Object objectVal;
-
- public Float getFloatVal() {
- return floatVal;
- }
-
- public void setFloatVal(Float floatVal) {
- Object oldVal = this.floatVal;
- this.floatVal = floatVal;
- firePropertyChange("floatVal", oldVal, this.floatVal);
- }
-
- public float getFloatPrimitiveVal() {
- return floatPrimitiveValue;
- }
-
- public void setFloatPrimitiveVal(float floatPrimitiveValue) {
- float oldVal = this.floatPrimitiveValue;
- this.floatPrimitiveValue = floatPrimitiveValue;
- firePropertyChange("floatPrimitiveVal", new Float(oldVal), new Float(this.floatPrimitiveValue));
- }
-
- public String getStringVal() {
- return stringVal;
- }
-
- public void setStringVal(String stringVal) {
- Object oldVal = this.stringVal;
- this.stringVal = stringVal;
- firePropertyChange("stringVal", oldVal, this.stringVal);
- }
-
- public Object getObjectVal() {
- return objectVal;
- }
-
- public void setObjectVal(Object objectVal) {
- Object oldVal = this.objectVal;
- this.objectVal = objectVal;
- firePropertyChange("objectVal", oldVal, this.objectVal);
- }
- }
-} \ No newline at end of file
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryIntTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryIntTest.java
deleted file mode 100644
index 5209113f..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryIntTest.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920
- ******************************************************************************/
-
-package org.eclipse.jface.internal.databinding.provisional.factories;
-
-import org.eclipse.core.databinding.beans.BeansObservables;
-import org.eclipse.jface.examples.databinding.ModelObject;
-
-public class DefaultBindSupportFactoryIntTest extends AbstractBindSupportFactoryTest {
- private TestDataObject dataObject;
-
- public void setUp() throws Exception {
- super.setUp();
- dataObject = new TestDataObject();
- dataObject.setStringVal("0");
- dataObject.setIntVal(0);
- dataObject.setIntegerVal(new Integer(0));
- }
-
- public void testStringToIntConverter() {
- ctx.bindValue(BeansObservables.observeValue(dataObject, "stringVal"), BeansObservables.observeValue(dataObject, "intVal"), null);
-
- dataObject.setIntVal(789);
- assertEquals("Int value does not match", 789, dataObject.getIntVal());
- assertEquals("String value does not match", "789", dataObject.getStringVal());
- assertNoErrorsFound();
-
- dataObject.setStringVal("910");
- assertEquals("Int value does not match", 910, dataObject.getIntVal());
- assertEquals("String value does not match", "910", dataObject.getStringVal());
- assertNoErrorsFound();
-
- dataObject.setStringVal("");
- assertEquals("Int value does not match", 910, dataObject.getIntVal());
- assertEquals("String value does not match", "", dataObject.getStringVal());
- assertErrorsFound();
-
- dataObject.setStringVal(null);
- assertEquals("Int value does not match", 910, dataObject.getIntVal());
- assertNull("String value does not match", dataObject.getStringVal());
- assertErrorsFound();
- }
-
- public void testIntegerToIntConverter() {
- ctx.bindValue(BeansObservables.observeValue(dataObject, "integerVal"), BeansObservables.observeValue(dataObject, "intVal"), null);
-
- dataObject.setIntVal(789);
- assertEquals("Int value does not match", 789, dataObject.getIntVal());
- assertEquals("Integer value does not match", new Integer(789), dataObject.getIntegerVal());
- assertNoErrorsFound();
-
- dataObject.setIntegerVal(new Integer(910));
- assertEquals("Int value does not match", 910, dataObject.getIntVal());
- assertEquals("Integer value does not match", new Integer(910), dataObject.getIntegerVal());
- assertNoErrorsFound();
-
- dataObject.setIntegerVal(null);
- assertEquals("Int value does not match", 910, dataObject.getIntVal());
- assertNull("Integer value does not match", dataObject.getIntegerVal());
- assertErrorsFound();
- }
-
- public void testObjectToIntegerConverter() {
- ctx.bindValue(BeansObservables.observeValue(dataObject, "objectVal"), BeansObservables.observeValue(dataObject, "intVal"), null);
-
- dataObject.setIntVal(789);
- assertEquals("Int value does not match", 789, dataObject.getIntVal());
- assertEquals("Object value does not match", new Integer(789), dataObject.getObjectVal());
- assertNoErrorsFound();
-
- dataObject.setObjectVal(new Integer(910));
- assertEquals("Int value does not match", 910, dataObject.getIntVal());
- assertEquals("Object value does not match", new Integer(910), dataObject.getObjectVal());
- assertNoErrorsFound();
-
- dataObject.setObjectVal(null);
- assertEquals("Int value does not match", 910, dataObject.getIntVal());
- assertNull("Object value does not match", dataObject.getObjectVal());
- assertErrorsFound();
-
- Object object = new Object();
- dataObject.setObjectVal(object);
- assertEquals("Int value does not match", 910, dataObject.getIntVal());
- assertSame("Object value does not match", object, dataObject.getObjectVal());
- assertErrorsFound();
- }
-
- public class TestDataObject extends ModelObject {
- private int intVal;
- private String stringVal;
- private Integer integerVal;
- private Object objectVal;
-
- public Integer getIntegerVal() {
- return integerVal;
- }
- public void setIntegerVal(Integer integerVal) {
- Object oldVal = this.integerVal;
- this.integerVal = integerVal;
- firePropertyChange("integerVal", oldVal, this.integerVal);
- }
-
- public int getIntVal() {
- return intVal;
- }
- public void setIntVal(int intVal) {
- int oldVal = this.intVal;
- this.intVal = intVal;
- firePropertyChange("intVal", oldVal, this.intVal);
- }
-
- public String getStringVal() {
- return stringVal;
- }
- public void setStringVal(String stringVal) {
- Object oldVal = this.stringVal;
- this.stringVal = stringVal;
- firePropertyChange("stringVal", oldVal, this.stringVal);
- }
-
- public Object getObjectVal() {
- return objectVal;
- }
- public void setObjectVal(Object objectVal) {
- Object oldVal = this.objectVal;
- this.objectVal = objectVal;
- firePropertyChange("objectVal", oldVal, this.objectVal);
- }
- }
-}
- \ No newline at end of file
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryLongPrimitiveTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryLongPrimitiveTest.java
deleted file mode 100644
index d2ec34b6..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryLongPrimitiveTest.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920
- ******************************************************************************/
-
-package org.eclipse.jface.internal.databinding.provisional.factories;
-
-import org.eclipse.core.databinding.beans.BeansObservables;
-import org.eclipse.jface.examples.databinding.ModelObject;
-
-public class DefaultBindSupportFactoryLongPrimitiveTest extends AbstractBindSupportFactoryTest {
-
- private TestDataObject dataObject;
-
- public void setUp() throws Exception {
- super.setUp();
- dataObject = new TestDataObject();
- dataObject.setStringVal("0");
- dataObject.setLongPrimitiveVal(0);
- dataObject.setLongVal(new Long(0));
- }
-
- public void testStringToLongPrimitiveConverter() {
- ctx.bindValue(BeansObservables.observeValue(dataObject, "stringVal"), BeansObservables.observeValue(dataObject,
- "longPrimitiveVal"), null);
-
- dataObject.setLongPrimitiveVal(110);
- assertEquals("long value does not match", 110, dataObject.getLongPrimitiveVal(), .001);
- assertEquals("String value does not match", "110", dataObject.getStringVal());
- assertNoErrorsFound();
-
- dataObject.setStringVal("70");
- assertEquals("long value does not match", 70, dataObject.getLongPrimitiveVal(), .001);
- assertEquals("String value does not match", "70", dataObject.getStringVal());
- assertNoErrorsFound();
-
- dataObject.setStringVal("");
- assertEquals("long value does not match", 70, dataObject.getLongPrimitiveVal(), .001);
- assertEquals("String value does not match", "", dataObject.getStringVal());
- assertErrorsFound();
-
- dataObject.setStringVal(null);
- assertEquals("long value does not match", 70, dataObject.getLongPrimitiveVal(), .001);
- assertNull("String value does not match", dataObject.getStringVal());
- assertErrorsFound();
- }
-
- public void testLongToLongPrimitiveConverter() {
- ctx.bindValue(BeansObservables.observeValue(dataObject, "longVal"), BeansObservables.observeValue(dataObject,
- "longPrimitiveVal"), null);
-
- dataObject.setLongPrimitiveVal(110);
- assertEquals("long value does not match", 110, dataObject.getLongPrimitiveVal(), .001);
- assertEquals("Long value does not match", new Long(110), dataObject.getLongVal());
- assertNoErrorsFound();
-
- dataObject.setLongVal(new Long(70));
- assertEquals("long value does not match", 70, dataObject.getLongPrimitiveVal(), .001);
- assertEquals("Long value does not match", new Long(70), dataObject.getLongVal());
- assertNoErrorsFound();
-
- dataObject.setLongVal(null);
- assertEquals("long value does not match", 70, dataObject.getLongPrimitiveVal(), .001);
- assertNull("Long value does not match", dataObject.getLongVal());
- assertErrorsFound();
- }
-
- public void testObjectToLongPrimitiveConverter() {
- ctx.bindValue(BeansObservables.observeValue(dataObject, "objectVal"), BeansObservables.observeValue(dataObject,
- "longPrimitiveVal"), null);
-
- dataObject.setLongPrimitiveVal(110);
- assertEquals("long value does not match", 110, dataObject.getLongPrimitiveVal(), .001);
- assertEquals("Object value does not match", new Long(110), dataObject.getObjectVal());
- assertNoErrorsFound();
-
- dataObject.setObjectVal(new Long(70));
- assertEquals("long value does not match", 70, dataObject.getLongPrimitiveVal(), .001);
- assertEquals("Object value does not match", new Long(70), dataObject.getObjectVal());
- assertNoErrorsFound();
-
- dataObject.setObjectVal(null);
- assertEquals("long value does not match", 70, dataObject.getLongPrimitiveVal(), .001);
- assertNull("Object value does not match", dataObject.getObjectVal());
- assertErrorsFound();
-
- Object object = new Object();
- dataObject.setObjectVal(object);
- assertEquals("long value does not match", 70, dataObject.getLongPrimitiveVal(), .001);
- assertSame("Object value does not match", object, dataObject.getObjectVal());
- assertErrorsFound();
- }
-
- public class TestDataObject extends ModelObject {
- private long longPrimitiveValue;
-
- private String stringVal;
-
- private Long longVal;
-
- private Object objectVal;
-
- public Long getLongVal() {
- return longVal;
- }
-
- public void setLongVal(Long longVal) {
- Object oldVal = this.longVal;
- this.longVal = longVal;
- firePropertyChange("longVal", oldVal, this.longVal);
- }
-
- public long getLongPrimitiveVal() {
- return longPrimitiveValue;
- }
-
- public void setLongPrimitiveVal(long longPrimitiveValue) {
- long oldVal = this.longPrimitiveValue;
- this.longPrimitiveValue = longPrimitiveValue;
- firePropertyChange("longPrimitiveVal", new Long(oldVal), new Long(this.longPrimitiveValue));
- }
-
- public String getStringVal() {
- return stringVal;
- }
-
- public void setStringVal(String stringVal) {
- Object oldVal = this.stringVal;
- this.stringVal = stringVal;
- firePropertyChange("stringVal", oldVal, this.stringVal);
- }
-
- public Object getObjectVal() {
- return objectVal;
- }
-
- public void setObjectVal(Object objectVal) {
- Object oldVal = this.objectVal;
- this.objectVal = objectVal;
- firePropertyChange("objectVal", oldVal, this.objectVal);
- }
- }
-} \ No newline at end of file
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryShortPrimitiveTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryShortPrimitiveTest.java
deleted file mode 100644
index 6d1af10d..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryShortPrimitiveTest.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920
- ******************************************************************************/
-
-package org.eclipse.jface.internal.databinding.provisional.factories;
-
-import org.eclipse.core.databinding.beans.BeansObservables;
-import org.eclipse.jface.examples.databinding.ModelObject;
-
-public class DefaultBindSupportFactoryShortPrimitiveTest extends AbstractBindSupportFactoryTest {
-
- private TestDataObject dataObject;
-
- public void setUp() throws Exception {
- super.setUp();
- dataObject = new TestDataObject();
- dataObject.setStringVal("0");
- dataObject.setShortPrimitiveVal((short) 0);
- dataObject.setShortVal(new Short((short) 0));
- }
-
- public void testStringToShortPrimitiveConverter() {
- ctx.bindValue(BeansObservables.observeValue(dataObject, "stringVal"), BeansObservables.observeValue(dataObject,
- "shortPrimitiveVal"), null);
-
- dataObject.setShortPrimitiveVal((short) 110);
- assertEquals("short value does not match", 110, dataObject.getShortPrimitiveVal());
- assertEquals("String value does not match", "110", dataObject.getStringVal());
- assertNoErrorsFound();
-
- dataObject.setStringVal("70");
- assertEquals("short value does not match", 70, dataObject.getShortPrimitiveVal());
- assertEquals("String value does not match", "70", dataObject.getStringVal());
- assertNoErrorsFound();
-
- dataObject.setStringVal("");
- assertEquals("short value does not match", 70, dataObject.getShortPrimitiveVal());
- assertEquals("String value does not match", "", dataObject.getStringVal());
- assertErrorsFound();
-
- dataObject.setStringVal(null);
- assertEquals("short value does not match", 70, dataObject.getShortPrimitiveVal());
- assertNull("String value does not match", dataObject.getStringVal());
- assertErrorsFound();
- }
-
- public void testShortToShortPrimitiveConverter() {
- ctx.bindValue(BeansObservables.observeValue(dataObject, "shortVal"), BeansObservables.observeValue(dataObject,
- "shortPrimitiveVal"), null);
-
- dataObject.setShortPrimitiveVal((short) 110);
- assertEquals("short value does not match", 110, dataObject.getShortPrimitiveVal());
- assertEquals("Short value does not match", new Short((short) 110), dataObject.getShortVal());
- assertNoErrorsFound();
-
- dataObject.setShortVal(new Short((short) 70));
- assertEquals("short value does not match", 70, dataObject.getShortPrimitiveVal());
- assertEquals("Short value does not match", new Short((short) 70), dataObject.getShortVal());
- assertNoErrorsFound();
-
- dataObject.setShortVal(null);
- assertEquals("short value does not match", 70, dataObject.getShortPrimitiveVal());
- assertNull("Short value does not match", dataObject.getShortVal());
- assertErrorsFound();
- }
-
- public void testObjectToShortPrimitiveConverter() {
- ctx.bindValue(BeansObservables.observeValue(dataObject, "objectVal"), BeansObservables.observeValue(dataObject,
- "shortPrimitiveVal"), null);
-
- dataObject.setShortPrimitiveVal((short) 110);
- assertEquals("short value does not match", 110, dataObject.getShortPrimitiveVal());
- assertEquals("Object value does not match", new Short((short) 110), dataObject.getObjectVal());
- assertNoErrorsFound();
-
- dataObject.setObjectVal(new Short((short) 70));
- assertEquals("short value does not match", 70, dataObject.getShortPrimitiveVal());
- assertEquals("Object value does not match", new Short((short) 70), dataObject.getObjectVal());
- assertNoErrorsFound();
-
- dataObject.setObjectVal(null);
- assertEquals("short value does not match", 70, dataObject.getShortPrimitiveVal());
- assertNull("Object value does not match", dataObject.getObjectVal());
- assertErrorsFound();
-
- Object object = new Object();
- dataObject.setObjectVal(object);
- assertEquals("short value does not match", 70, dataObject.getShortPrimitiveVal());
- assertSame("Object value does not match", object, dataObject.getObjectVal());
- assertErrorsFound();
- }
-
- public class TestDataObject extends ModelObject {
- private short shortPrimitiveValue;
-
- private String stringVal;
-
- private Short shortVal;
-
- private Object objectVal;
-
- public Short getShortVal() {
- return shortVal;
- }
-
- public void setShortVal(Short shortVal) {
- Object oldVal = this.shortVal;
- this.shortVal = shortVal;
- firePropertyChange("shortVal", oldVal, this.shortVal);
- }
-
- public short getShortPrimitiveVal() {
- return shortPrimitiveValue;
- }
-
- public void setShortPrimitiveVal(short shortPrimitiveValue) {
- short oldVal = this.shortPrimitiveValue;
- this.shortPrimitiveValue = shortPrimitiveValue;
- firePropertyChange("shortPrimitiveVal", new Short(oldVal), new Short(this.shortPrimitiveValue));
- }
-
- public String getStringVal() {
- return stringVal;
- }
-
- public void setStringVal(String stringVal) {
- Object oldVal = this.stringVal;
- this.stringVal = stringVal;
- firePropertyChange("stringVal", oldVal, this.stringVal);
- }
-
- public Object getObjectVal() {
- return objectVal;
- }
-
- public void setObjectVal(Object objectVal) {
- Object oldVal = this.objectVal;
- this.objectVal = objectVal;
- firePropertyChange("objectVal", oldVal, this.objectVal);
- }
- }
-} \ No newline at end of file
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryTest.java
deleted file mode 100644
index 1d98ba09..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryTest.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920
- ******************************************************************************/
-
-package org.eclipse.jface.internal.databinding.provisional.factories;
-
-import org.eclipse.core.databinding.beans.BeansObservables;
-import org.eclipse.jface.examples.databinding.ModelObject;
-
-/**
- * @since 3.2
- *
- */
-public class DefaultBindSupportFactoryTest extends AbstractBindSupportFactoryTest {
-
- public void testStringToIntegerConverter() {
- TestDataObject dataObject = new TestDataObject();
- dataObject.setIntegerStringVal("123");
- dataObject.setIntStringVal("456");
- ctx.bindValue(BeansObservables.observeValue(dataObject, "intStringVal"),
- BeansObservables.observeValue(dataObject, "intVal"),
- null);
-
- ctx.bindValue(BeansObservables.observeValue(dataObject, "integerStringVal"),
- BeansObservables.observeValue(dataObject, "integerVal"),
- null);
-
- dataObject.setIntegerStringVal("789");
- assertEquals("Integer value does not match", new Integer(789), dataObject.getIntegerVal());
-
- dataObject.setIntStringVal("789");
- assertEquals("Int value does not match", 789, dataObject.getIntVal());
- assertNoErrorsFound();
-
- dataObject.setIntegerStringVal("");
- assertNull("Integer value not null", dataObject.getIntegerVal());
-
- dataObject.setIntStringVal("");
- assertErrorsFound();
- assertEquals("Int value should not have changed.", 789, dataObject.getIntVal());
- }
-
- public class TestDataObject extends ModelObject {
- private int intVal;
-
- private Integer integerVal;
-
- private String intStringVal;
-
- private String integerStringVal;
-
- public Integer getIntegerVal() {
- return integerVal;
- }
-
- public void setIntegerVal(Integer integerVal) {
- this.integerVal = integerVal;
- }
-
- public int getIntVal() {
- return intVal;
- }
-
- public void setIntVal(int intVal) {
- this.intVal = intVal;
- }
-
- public String getIntegerStringVal() {
- return integerStringVal;
- }
-
- public void setIntegerStringVal(String integerStringVal) {
- Object oldVal = this.integerStringVal;
- this.integerStringVal = integerStringVal;
- firePropertyChange("integerStringVal", oldVal, this.integerStringVal);
- }
-
- public String getIntStringVal() {
- return intStringVal;
- }
-
- public void setIntStringVal(String intStringVal) {
- Object oldVal = this.intStringVal;
- this.intStringVal = intStringVal;
- firePropertyChange("intStringVal", oldVal, this.intStringVal);
- }
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/validation/ObjectToPrimitiveValidatorTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/validation/ObjectToPrimitiveValidatorTest.java
deleted file mode 100644
index 12d724ed..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/validation/ObjectToPrimitiveValidatorTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.internal.databinding.provisional.validation;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.databinding.validation.ObjectToPrimitiveValidator;
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * @since 3.2
- *
- */
-public class ObjectToPrimitiveValidatorTest extends TestCase {
-
- private ObjectToPrimitiveValidator objectToPrimitiveValidator;
-
- protected void setUp() throws Exception {
- this.objectToPrimitiveValidator = new ObjectToPrimitiveValidator(
- Integer.TYPE);
- }
-
- /**
- * Test method for
- * {@link org.eclipse.jface.internal.databinding.provisional.validation.ObjectToPrimitiveValidator#isValid(java.lang.Object)}.
- */
- public void testIsValid() {
- IStatus result = this.objectToPrimitiveValidator.validate(null);
- assertEquals("The wrong validation error was found.", result
- .getMessage(), this.objectToPrimitiveValidator.getNullHint());
-
- result = this.objectToPrimitiveValidator.validate(new Integer(1));
- assertTrue("No validation error should be found.", result.isOK());
-
- result = this.objectToPrimitiveValidator.validate(new Object());
- assertEquals("The wrong validation error was found.", result
- .getMessage(), this.objectToPrimitiveValidator.getClassHint());
- }
-
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/AbstractDefaultRealmTestCase.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/AbstractDefaultRealmTestCase.java
deleted file mode 100644
index 620ea406..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/AbstractDefaultRealmTestCase.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.databinding;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.jface.tests.databinding.util.RealmTester;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * Base class that sets the default realm to be the SWT realm.
- *
- * @since 3.3
- */
-public class AbstractDefaultRealmTestCase extends TestCase {
- private Realm previousRealm;
-
- /**
- * Sets the default realm to be the realm for the default display.
- *
- * @see junit.framework.TestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
-
- previousRealm = Realm.getDefault();
-
- Display display = Display.getCurrent() != null
- && !Display.getCurrent().isDisposed() ? Display.getCurrent()
- : Display.getDefault();
- RealmTester.setDefault(SWTObservables.getRealm(display));
- }
-
- /**
- * Removes the default realm.
- */
- protected void tearDown() throws Exception {
- super.tearDown();
-
- RealmTester.setDefault(previousRealm);
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/BindSpecTests.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/BindSpecTests.java
deleted file mode 100644
index e63c6a30..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/BindSpecTests.java
+++ /dev/null
@@ -1,257 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Brad Reynolds.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- * Brad Reynolds - bug 116920, 159768
- ******************************************************************************/
-
-package org.eclipse.jface.tests.databinding;
-
-import java.util.Arrays;
-import java.util.Iterator;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.databinding.BindSpec;
-import org.eclipse.core.databinding.BindingEvent;
-import org.eclipse.core.databinding.DefaultBindSpec;
-import org.eclipse.core.databinding.conversion.IConverter;
-import org.eclipse.core.databinding.observable.IObservable;
-import org.eclipse.core.databinding.validation.IValidator;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-/**
- * Unit tests for the BindSpec class.
- *
- * @since 3.2
- */
-public class BindSpecTests extends TestCase {
- /**
- * Asserts the BindSpec state when using the default constructor.
- */
- public void testDefaultConstructor() {
- DefaultBindSpec spec = new DefaultBindSpec();
- assertNull(spec.getModelToTargetConverter());
- assertNull(spec.getModelUpdatePolicy());
- assertNull(spec.getTargetToModelConverter());
- assertNull(spec.getTargetUpdatePolicy());
-
- assertTrue(spec.isUpdateModel());
- assertTrue(spec.isUpdateTarget());
- assertNull(spec.getTargetValidatePolicy());
- }
-
- /**
- * Asserts that when a model to target converter is set it will always be
- * the sole converter and will remove any existing converters.
- */
- public void testSetModelToTargetConverter() {
- DefaultBindSpec spec = new DefaultBindSpec();
-
- IConverter c3 = new Converter();
- spec.setModelToTargetConverter(c3);
- assertSame(c3, spec.getModelToTargetConverter());
- }
-
- /**
- * Asserts that when <code>null</code> getModelToTargetConverter() will
- * return <code>null</code> and getModelToTargetConverters() returns an
- * empty array.
- */
- public void testGetNullModelToTargetConverter() {
- DefaultBindSpec spec = new DefaultBindSpec();
-
- spec.setModelToTargetConverter(null);
- assertNull(spec.getModelToTargetConverter());
- }
-
- /**
- * Asserts that when a target to model converter is set it will always be
- * the sole converter and will remove any existing converters.
- */
- public void testSetTargetToModelConverter() {
- DefaultBindSpec spec = new DefaultBindSpec();
-
- IConverter c3 = new Converter();
- spec.setTargetToModelConverter(c3);
- assertSame(c3, spec.getTargetToModelConverter());
- }
-
- /**
- * Asserts that when <code>null</code> getTargetToModelConverter() will
- * return <code>null</code> and getTargetToModelConverters() returns an
- * empty array.
- *
- */
- public void testGetNullTargetToModelConverter() {
- DefaultBindSpec spec = new DefaultBindSpec();
- spec.setTargetToModelConverter(null);
- assertNull(spec.getTargetToModelConverter());
- }
-
- public void testAddTargetValidator() throws Exception {
- BindSpec bindSpec = new BindSpec();
-
- IValidator validator = new ValidatorStub();
- bindSpec.addTargetValidator(BindingEvent.PIPELINE_AFTER_GET, validator);
-
- IValidator[] validators = bindSpec
- .getTargetValidators(BindingEvent.PIPELINE_AFTER_GET);
- assertNotNull("validators are null", validators);
- assertEquals("validator count", 1, validators.length);
- assertEquals("after get validator", validator, validators[0]);
- }
-
- public void testAddTargetValidatorMultiplesOfSameType() throws Exception {
- BindSpec bindSpec = new BindSpec();
-
- IValidator validator = new ValidatorStub();
- bindSpec.addTargetValidator(BindingEvent.PIPELINE_AFTER_GET, validator);
- bindSpec.addTargetValidator(BindingEvent.PIPELINE_AFTER_GET, validator);
-
- IValidator[] validators = bindSpec
- .getTargetValidators(BindingEvent.PIPELINE_AFTER_GET);
- assertEquals(2, validators.length);
- assertTrue("validators", Arrays.equals(new IValidator[] { validator,
- validator }, validators));
- }
-
- public void testAddTargetValidatorMultiplesOfVaryingTypes()
- throws Exception {
- BindSpec bindSpec = new BindSpec();
- IValidator validator1 = new ValidatorStub();
- bindSpec
- .addTargetValidator(BindingEvent.PIPELINE_AFTER_GET, validator1);
-
- IValidator validator2 = new ValidatorStub();
- bindSpec.addTargetValidator(BindingEvent.PIPELINE_AFTER_CONVERT,
- validator2);
-
- IValidator[] validators = bindSpec
- .getTargetValidators(BindingEvent.PIPELINE_AFTER_GET);
- assertEquals(1, validators.length);
- assertTrue("validators", Arrays.equals(new IValidator[] { validator1 },
- validators));
-
- validators = bindSpec
- .getTargetValidators(BindingEvent.PIPELINE_AFTER_CONVERT);
- assertEquals(1, validators.length);
- assertTrue("validators", Arrays.equals(new IValidator[] { validator2 },
- validators));
- }
-
- public void testGetTargetValidatorsNoneRegistered() throws Exception {
- BindSpec bindSpec = new BindSpec();
- IValidator[] validators = bindSpec
- .getTargetValidators(BindingEvent.PIPELINE_AFTER_GET);
- assertNotNull("null should never be returned", validators);
- assertEquals("empty array should be returned", 0, validators.length);
- }
-
- public void testAddModelValidator() throws Exception {
- BindSpec bindSpec = new BindSpec();
-
- IValidator validator = new ValidatorStub();
- bindSpec.addModelValidator(BindingEvent.PIPELINE_AFTER_GET, validator);
-
- IValidator[] validators = bindSpec
- .getModelValidators(BindingEvent.PIPELINE_AFTER_GET);
- assertNotNull("validators are null", validators);
- assertEquals("validator count", 1, validators.length);
- assertEquals("after get validator", validator, validators[0]);
- }
-
- public void testAddModelValidatorMultiplesOfSameType() throws Exception {
- BindSpec bindSpec = new BindSpec();
-
- IValidator validator = new ValidatorStub();
- bindSpec.addModelValidator(BindingEvent.PIPELINE_AFTER_GET, validator);
- bindSpec.addModelValidator(BindingEvent.PIPELINE_AFTER_GET, validator);
-
- IValidator[] validators = bindSpec
- .getModelValidators(BindingEvent.PIPELINE_AFTER_GET);
- assertEquals(2, validators.length);
- assertTrue("validators", Arrays.equals(new IValidator[] { validator,
- validator }, validators));
- }
-
- public void testAddModelValidatorMultiplesOfVaryingTypes() throws Exception {
- BindSpec bindSpec = new BindSpec();
- IValidator validator1 = new ValidatorStub();
- bindSpec.addModelValidator(BindingEvent.PIPELINE_AFTER_GET, validator1);
-
- IValidator validator2 = new ValidatorStub();
- bindSpec.addModelValidator(BindingEvent.PIPELINE_AFTER_CONVERT,
- validator2);
-
- IValidator[] validators = bindSpec
- .getModelValidators(BindingEvent.PIPELINE_AFTER_GET);
- assertEquals(1, validators.length);
- assertTrue("validators", Arrays.equals(new IValidator[] { validator1 },
- validators));
-
- validators = bindSpec
- .getModelValidators(BindingEvent.PIPELINE_AFTER_CONVERT);
- assertEquals(1, validators.length);
- assertTrue("validators", Arrays.equals(new IValidator[] { validator2 },
- validators));
- }
-
- public void testFillBindSpecDefaults() throws Exception {
- class Spec extends BindSpec {
- protected void fillBindSpecDefaults(IObservable target,
- IObservable model) {
- super.fillBindSpecDefaults(target, model);
- }
- }
-
- Spec bindSpec = new Spec();
- bindSpec.fillBindSpecDefaults(null, null);
-
- for (Iterator it = BindingEvent.PIPELINE_CONSTANTS.keySet().iterator(); it
- .hasNext();) {
- Integer integer = (Integer) it.next();
- int position = integer.intValue();
- IValidator[] targetValidators = bindSpec
- .getTargetValidators(position);
-
- String display = (String) BindingEvent.PIPELINE_CONSTANTS.get(integer);
- assertEquals("target position " + display + " should have 1 validator",
- 1, targetValidators.length);
- assertTrue("target position " + display + " should return OK status",
- targetValidators[0].validate(null).isOK());
-
- IValidator[] modelValidators = bindSpec.getModelValidators(position);
- assertEquals("model position " + display + " should have 1 validator",
- 1, modelValidators.length);
- assertTrue("model position " + display + " should return OK status",
- modelValidators[0].validate(null).isOK());
- }
- }
-
- private class Converter implements IConverter {
- public Object convert(Object fromObject) {
- return null;
- }
-
- public Object getFromType() {
- return null;
- }
-
- public Object getToType() {
- return null;
- }
- }
-
- private class ValidatorStub implements IValidator {
- public IStatus validate(Object value) {
- return Status.OK_STATUS;
- }
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/BindingTestSuite.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/BindingTestSuite.java
deleted file mode 100644
index c7f5f818..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/BindingTestSuite.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bugs 137877, 152543, 152540
- * Brad Reynolds - bug 116920
- * Brad Reynolds - bug 164247
- * Brad Reynolds - bug 164653, 159768, 170848, 147515
- *******************************************************************************/
-package org.eclipse.jface.tests.databinding;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.tests.databinding.beans.BeansObservablesTest;
-import org.eclipse.core.tests.databinding.observable.RealmTest;
-import org.eclipse.core.tests.databinding.observable.map.AbstractObservableMapTest;
-import org.eclipse.core.tests.databinding.observable.map.ObservableMapTest;
-import org.eclipse.core.tests.databinding.observable.map.WritableMapTest;
-import org.eclipse.core.tests.internal.databinding.observable.masterdetail.DetailObservableListTest;
-import org.eclipse.core.tests.internal.databinding.observable.masterdetail.DetailObservableSetTest;
-import org.eclipse.core.tests.internal.databinding.observable.masterdetail.DetailObservableValueTest;
-import org.eclipse.jface.internal.databinding.provisional.conversion.IdentityConverterTest;
-import org.eclipse.jface.internal.databinding.provisional.factories.DefaultBindSupportFactoryBooleanPrimitiveTest;
-import org.eclipse.jface.internal.databinding.provisional.factories.DefaultBindSupportFactoryBytePrimitiveTest;
-import org.eclipse.jface.internal.databinding.provisional.factories.DefaultBindSupportFactoryDoublePrimitiveTest;
-import org.eclipse.jface.internal.databinding.provisional.factories.DefaultBindSupportFactoryFloatPrimitiveTest;
-import org.eclipse.jface.internal.databinding.provisional.factories.DefaultBindSupportFactoryIntTest;
-import org.eclipse.jface.internal.databinding.provisional.factories.DefaultBindSupportFactoryLongPrimitiveTest;
-import org.eclipse.jface.internal.databinding.provisional.factories.DefaultBindSupportFactoryShortPrimitiveTest;
-import org.eclipse.jface.internal.databinding.provisional.factories.DefaultBindSupportFactoryTest;
-import org.eclipse.jface.internal.databinding.provisional.validation.ObjectToPrimitiveValidatorTest;
-import org.eclipse.jface.tests.databinding.mask.EditMaskLexerAndTokenTest;
-import org.eclipse.jface.tests.databinding.mask.EditMaskParserTest;
-import org.eclipse.jface.tests.databinding.observable.list.AbstractObservableListTest;
-import org.eclipse.jface.tests.databinding.observable.list.ObservableListTest;
-import org.eclipse.jface.tests.databinding.observable.list.WritableListTest;
-import org.eclipse.jface.tests.databinding.observable.set.WritableSetTest;
-import org.eclipse.jface.tests.databinding.observable.value.AbstractObservableValueTest;
-import org.eclipse.jface.tests.databinding.observable.value.AbstractVetoableValueTest;
-import org.eclipse.jface.tests.databinding.observable.value.WritableValueTest;
-import org.eclipse.jface.tests.databinding.scenarios.BindingScenariosTestSuite;
-import org.eclipse.jface.tests.databinding.swt.SWTObservablesTest;
-import org.eclipse.jface.tests.databinding.swt.TextObservableValueTests;
-import org.eclipse.jface.tests.databinding.viewers.ObservableMapLabelProviderTest;
-import org.eclipse.jface.tests.databinding.viewers.ObservableSetContentProviderTest;
-import org.eclipse.jface.tests.examples.model.PersonTests;
-import org.eclipse.jface.tests.internal.databinding.internal.ListBindingTest;
-import org.eclipse.jface.tests.internal.databinding.internal.ListBindingTest_Pipeline;
-import org.eclipse.jface.tests.internal.databinding.internal.ListBindingTest_Policies;
-import org.eclipse.jface.tests.internal.databinding.internal.ValueBindingTest;
-import org.eclipse.jface.tests.internal.databinding.internal.ValueBindingTest_Pipeline;
-import org.eclipse.jface.tests.internal.databinding.internal.ValueBindingTest_Policies;
-import org.eclipse.jface.tests.internal.databinding.internal.beans.BeanObservableListDecoratorTest;
-import org.eclipse.jface.tests.internal.databinding.internal.beans.BeanObservableSetDecoratorTest;
-import org.eclipse.jface.tests.internal.databinding.internal.beans.BeanObservableValueDecoratorTest;
-import org.eclipse.jface.tests.internal.databinding.internal.beans.JavaBeanObservableMapTest;
-import org.eclipse.jface.tests.internal.databinding.internal.beans.JavaBeanObservableSetTest;
-import org.eclipse.jface.tests.internal.databinding.internal.beans.JavaBeanObservableValueTest;
-import org.eclipse.jface.tests.internal.databinding.internal.observable.UnmodifiableObservableListTest;
-import org.eclipse.jface.tests.internal.databinding.internal.swt.ButtonObservableValueTest;
-import org.eclipse.jface.tests.internal.databinding.internal.swt.CComboObservableValueTest;
-import org.eclipse.jface.tests.internal.databinding.internal.swt.CLabelObservableValueTest;
-import org.eclipse.jface.tests.internal.databinding.internal.swt.ComboObservableValueTest;
-import org.eclipse.jface.tests.internal.databinding.internal.swt.ControlObservableValueTest;
-import org.eclipse.jface.tests.internal.databinding.internal.swt.LabelObservableValueTest;
-import org.eclipse.jface.tests.internal.databinding.internal.swt.SpinnerObservableValueTest;
-import org.eclipse.jface.tests.internal.databinding.internal.swt.TableObservableValueTest;
-import org.eclipse.jface.tests.internal.databinding.internal.viewers.SelectionProviderSingleSelectionObservableValueTest;
-import org.eclipse.jface.tests.internal.databinding.provisional.observable.AbstractObservableTest;
-import org.eclipse.jface.tests.internal.databinding.provisional.observable.ObservablesTest;
-import org.eclipse.jface.tests.internal.databinding.provisional.viewers.SelectionObservableValueTest;
-
-public class BindingTestSuite extends TestSuite {
-
- public static void main(String[] args) {
- junit.textui.TestRunner.run(suite());
- }
-
- public static Test suite() {
- return new BindingTestSuite();
- }
-
- public BindingTestSuite() {
- // org.eclipse.core.tests.databinding.observable.map
- addTestSuite(AbstractObservableMapTest.class);
- addTestSuite(ObservableMapTest.class);
- addTestSuite(WritableMapTest.class);
-
- //org.eclipse.core.tests.internal.databinding.observable.masterdetail
- addTestSuite(DetailObservableListTest.class);
- addTestSuite(DetailObservableSetTest.class);
- addTestSuite(DetailObservableValueTest.class);
-
- // org.eclipse.core.internal.databinding.internal.beans
- addTestSuite(JavaBeanObservableValueTest.class);
-
- // org.eclipse.core.tests.databinding.beans
- addTestSuite(BeansObservablesTest.class);
-
- //org.eclipse.core.tests.databinding.observable
- addTestSuite(RealmTest.class);
-
- // org.eclipse.jface.internal.databinding.provisional.conversion
- addTestSuite(IdentityConverterTest.class);
-
- // org.eclipse.jface.internal.databinding.provisional.factories
- addTestSuite(DefaultBindSupportFactoryBooleanPrimitiveTest.class);
- addTestSuite(DefaultBindSupportFactoryBytePrimitiveTest.class);
- addTestSuite(DefaultBindSupportFactoryDoublePrimitiveTest.class);
- addTestSuite(DefaultBindSupportFactoryFloatPrimitiveTest.class);
- addTestSuite(DefaultBindSupportFactoryIntTest.class);
- addTestSuite(DefaultBindSupportFactoryLongPrimitiveTest.class);
- addTestSuite(DefaultBindSupportFactoryShortPrimitiveTest.class);
- addTestSuite(DefaultBindSupportFactoryTest.class);
-
- // org.eclipse.jface.internal.databinding.provisional.validation
- addTestSuite(ObjectToPrimitiveValidatorTest.class);
-
- // org.eclipse.jface.tests.databinding
- addTestSuite(BindSpecTests.class);
- addTestSuite(ComputedValueTest.class);
- addTestSuite(DatabindingContextTest.class);
- addTestSuite(IDiffsTest.class);
- addTestSuite(ObservableTest.class);
- addTestSuite(RandomAccessListIteratorTest.class);
-
- // org.eclipse.jface.tests.databinding.mask
- addTestSuite(EditMaskLexerAndTokenTest.class);
- addTestSuite(EditMaskParserTest.class);
-
- // org.eclipse.jface.tests.databinding.observable.list
- addTestSuite(AbstractObservableListTest.class);
- addTestSuite(ObservableListTest.class);
- addTestSuite(WritableListTest.class);
-
- //org.eclipse.jface.tests.databinding.observable.set
- addTestSuite(WritableSetTest.class);
-
- // org.eclipse.jface.tests.databinding.observable.value
- addTestSuite(AbstractObservableValueTest.class);
- addTestSuite(AbstractVetoableValueTest.class);
- addTestSuite(WritableValueTest.class);
-
- // org.eclipse.jface.tests.databinding.scenarios
- addTest(BindingScenariosTestSuite.suite());
- // The files in this package are in the above test suite
-
- // org.eclipse.jface.tests.databinding.swt
- // FIXME
- // addTestSuite(AbstractGetAndSetSelectionObservableCollectionTest.class);
- // FIXME
- // addTestSuite(AutoSelectTableViewerCollectionExtendedTest.class);
- // FIXME addTestSuite(AutoSelectTableViewerCollectionTest.class);
- // FIXME addTestSuite(CComboObservableCollectionTest.class);
- // FIXME addTestSuite(ComboObservableCollectionTest.class);
- // FIXME
- // addTestSuite(CopyOfAutoSelectTableViewerCollectionExtendedTest.class);
- // FIXME addTestSuite(ListObservableCollectionTest.class);
- // FIXME addTestSuite(ObservableCollectionViewerTest.class);
- // FIXME addTestSuite(TableViewerObservableCollectionTest.class);
- addTestSuite(SWTObservablesTest.class);
- addTestSuite(TextObservableValueTests.class);
-
- // org.eclipse.jface.tests.databinding.views
- addTestSuite(ObservableMapLabelProviderTest.class);
- addTestSuite(ObservableSetContentProviderTest.class);
-
- // org.eclipse.jface.tests.examples.model
- addTestSuite(PersonTests.class);
-
- // org.eclipse.jface.tests.internal.databinding.internal
- addTestSuite(ListBindingTest.class);
- addTestSuite(ListBindingTest_Policies.class);
- addTestSuite(ListBindingTest_Pipeline.class);
-
- addTestSuite(ValueBindingTest.class);
- addTestSuite(ValueBindingTest_Pipeline.class);
- addTestSuite(ValueBindingTest_Policies.class);
-
- //org.eclipse.jface.tests.internal.databinding.internal.beans
- addTestSuite(BeanObservableListDecoratorTest.class);
- addTestSuite(BeanObservableSetDecoratorTest.class);
- addTestSuite(BeanObservableValueDecoratorTest.class);
- addTestSuite(BeanObservableListDecoratorTest.class);
- addTestSuite(JavaBeanObservableMapTest.class);
- addTestSuite(JavaBeanObservableSetTest.class);
- addTestSuite(JavaBeanObservableValueTest.class);
-
- // org.eclipse.jface.tests.internal.databinding.internal.observable
- addTestSuite(UnmodifiableObservableListTest.class);
-
- // org.eclipse.jface.tests.internal.databinding.internal.swt
- addTestSuite(ButtonObservableValueTest.class);
- addTestSuite(CComboObservableValueTest.class);
- addTestSuite(CLabelObservableValueTest.class);
- addTestSuite(ComboObservableValueTest.class);
- addTestSuite(ControlObservableValueTest.class);
- addTestSuite(LabelObservableValueTest.class);
- addTestSuite(SpinnerObservableValueTest.class);
- addTestSuite(TableObservableValueTest.class);
-
- // org.eclipse.jface.tests.internal.databinding.internal.viewers
- addTestSuite(SelectionProviderSingleSelectionObservableValueTest.class);
- // FIXME addTestSuite(SVOCWLTest.class);
-
- // org.eclipse.jface.tests.internal.databinding.provisional.observable
- addTestSuite(AbstractObservableTest.class);
- addTestSuite(ObservablesTest.class);
-
- // org.eclipse.jface.tests.internal.databinding.provisional.viewers
- addTestSuite(SelectionObservableValueTest.class);
- }
-
- /**
- * @param testCase
- * TODO
- * @return true if the given test is temporarily disabled
- */
- public static boolean failingTestsDisabled(TestCase testCase) {
- System.out.println("Ignoring disabled test: " + testCase.getClass().getName() + "." + testCase.getName());
- return true;
- }
-
- /**
- * @param testSuite
- * TODO
- * @return true if the given test is temporarily disabled
- */
- public static boolean failingTestsDisabled(TestSuite testSuite) {
- System.out.println("Ignoring disabled test: " + testSuite.getClass().getName() + "." + testSuite.getName());
- return true;
- }
-} \ No newline at end of file
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/ComputedValueTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/ComputedValueTest.java
deleted file mode 100644
index 1686e5af..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/ComputedValueTest.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920
- * Brad Reynolds - bug 164653
- ******************************************************************************/
-
-package org.eclipse.jface.tests.databinding;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.databinding.observable.value.ComputedValue;
-import org.eclipse.core.databinding.observable.value.WritableValue;
-
-/**
- * @since 1.0
- *
- */
-public class ComputedValueTest extends AbstractDefaultRealmTestCase {
- public void testValueType() throws Exception {
- ComputedValue cv = new ComputedValue(Integer.TYPE) {
- protected Object calculate() {
- return new Integer(42);
- }
- };
- assertEquals("value type should be the type that was set", Integer.TYPE, cv.getValueType());
-
- cv = new ComputedValue() {
- protected Object calculate() {
- // TODO Auto-generated method stub
- return null;
- }
- };
-
- assertNull(cv.getValueType());
- }
-
- public void test_getValue() throws Exception {
- ComputedValue cv = new ComputedValue() {
- protected Object calculate() {
- return new Integer(42);
- }
- };
- assertEquals("Calculated value should be 42", new Integer(42), cv.getValue());
- }
-
- public void testDependencyValueChange() throws Exception {
- final WritableValue value = new WritableValue(new Integer(42), Integer.TYPE);
-
- ComputedValue cv = new ComputedValue() {
- protected Object calculate() {
- return value.getValue();
- }
- };
-
- assertEquals("calculated value should have been that of the writable value", value.getValue(), cv.getValue());
-
- value.setValue(new Integer(44));
-
- assertEquals("calculated value should have been that of the writable value", value.getValue(), cv.getValue());
- }
-
- private static class WritableValueExt extends WritableValue {
- public WritableValueExt(Object valueType, Object initialValue) {
- super(initialValue, valueType);
- }
-
- public boolean hasListeners() {
- return super.hasListeners();
- }
- }
-
- public void testHookAndUnhookDependantObservables() throws Exception {
- final List values = new ArrayList();
-
- ComputedValue cv = new ComputedValue() {
- protected Object calculate() {
- int sum = 0;
- for (Iterator it = values.iterator(); it.hasNext();) {
- WritableValue value = (WritableValue) it.next();
- sum += ((Integer) value.getValue()).intValue();
-
- }
-
- return new Integer(sum);
- }
- };
-
- WritableValueExt value1 = new WritableValueExt(Integer.TYPE, new Integer(1));
- WritableValueExt value2 = new WritableValueExt(Integer.TYPE, new Integer(1));
- values.add(value1);
- values.add(value2);
-
- assertFalse(value1.hasListeners());
- assertFalse(value2.hasListeners());
- cv.getValue();
- assertTrue(value1.hasListeners());
- assertTrue(value2.hasListeners());
-
- //force the computed value to be stale
- value2.setValue(new Integer(2));
- //remove value2 from the values that are used to compute the value
- values.remove(value2);
-
- //force the value to be computed
- cv.getValue();
- assertEquals(new Integer(1), cv.getValue());
- assertTrue(value1.hasListeners());
- assertFalse("because value2 is not a part of the calculation the listeners should have been removed", value2.hasListeners());
- }
-
- public void testSetValueUnsupportedOperationException() throws Exception {
- ComputedValue cv = new ComputedValue() {
- protected Object calculate() {
- return null;
- }
- };
-
- try {
- cv.setValue(new Object());
- fail("exception should have been thrown");
- } catch (UnsupportedOperationException e) {
- }
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/DatabindingContextTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/DatabindingContextTest.java
deleted file mode 100644
index b2b57bfb..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/DatabindingContextTest.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 159539
- * Brad Reynolds - bug 140644
- * Brad Reynolds - bug 159940
- * Brad Reynolds - bug 116920, 159768
- *******************************************************************************/
-package org.eclipse.jface.tests.databinding;
-
-import java.util.ArrayList;
-
-import org.eclipse.core.databinding.AggregateValidationStatus;
-import org.eclipse.core.databinding.Binding;
-import org.eclipse.core.databinding.BindingEvent;
-import org.eclipse.core.databinding.DataBindingContext;
-import org.eclipse.core.databinding.DefaultBindSpec;
-import org.eclipse.core.databinding.observable.ChangeEvent;
-import org.eclipse.core.databinding.observable.IChangeListener;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.list.WritableList;
-import org.eclipse.core.databinding.observable.map.IObservableMap;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.databinding.observable.value.IValueChangeListener;
-import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
-import org.eclipse.core.databinding.observable.value.WritableValue;
-import org.eclipse.core.databinding.validation.IValidator;
-import org.eclipse.core.databinding.validation.ValidationStatus;
-import org.eclipse.core.internal.databinding.ListBinding;
-import org.eclipse.core.internal.databinding.ValueBinding;
-import org.eclipse.core.runtime.IStatus;
-
-public class DatabindingContextTest extends AbstractDefaultRealmTestCase {
- public void testDisposeBindings() throws Exception {
- DataBindingContext dbc = new DataBindingContext();
-
- Binding binding = new BindingStub();
- binding.init(dbc);
-
- assertFalse(binding.isDisposed());
- dbc.dispose();
- assertTrue("binding should be diposed when dbc is disposed", binding
- .isDisposed());
- }
-
- public void testBindValue() throws Exception {
- DataBindingContext dbc = new DataBindingContext();
- IObservableValue target = WritableValue.withValueType(String.class);
- IObservableValue model = WritableValue.withValueType(String.class);
-
- Binding binding = dbc.bindValue(target, model, null);
- assertTrue("binding is of the incorrect type",
- binding instanceof ValueBinding);
- }
-
- public void testBindList() throws Exception {
- DataBindingContext dbc = new DataBindingContext();
- IObservableList target = WritableList.withElementType(Object.class);
- IObservableList model = WritableList.withElementType(Object.class);
-
- Binding binding = dbc.bindList(target, model, null);
- assertTrue("binding is of the incorrect type",
- binding instanceof ListBinding);
- }
-
- /**
- * Asserts that IStatus is populated and change events are fired when a
- * Binding that is associated with a context is in error.
- *
- * @throws Exception
- */
- public void testValidationError() throws Exception {
- WritableValue targetObservable = WritableValue.withValueType(String.class);
- WritableValue modelObservable = WritableValue.withValueType(String.class);
-
- final String errorMessage = "error";
- DataBindingContext dbc = new DataBindingContext();
- ValueChangeCounter errorCounter = new ValueChangeCounter();
- ChangeCounter errorsCounter = new ChangeCounter();
-
- IObservableValue error = new AggregateValidationStatus(dbc
- .getBindings(), AggregateValidationStatus.MAX_SEVERITY);
- error.addValueChangeListener(errorCounter);
- assertTrue(((IStatus) error.getValue()).isOK());
-
- IObservableMap errors = dbc.getValidationStatusMap();
- errors.addChangeListener(errorsCounter);
- assertEquals(0, errors.size());
-
- IValidator validator = new IValidator() {
- public IStatus validate(Object value) {
- return ValidationStatus.error(errorMessage);
- }
- };
-
- dbc
- .bindValue(targetObservable, modelObservable,
- new DefaultBindSpec().addTargetValidator(
- BindingEvent.PIPELINE_AFTER_GET, validator));
-
- targetObservable.setValue("");
- assertFalse(((IStatus) error.getValue()).isOK());
- assertEquals(errorMessage, ((IStatus) error.getValue()).getMessage());
- assertEquals(1, errors.size());
- assertEquals(1, errorsCounter.count);
- assertEquals(1, errorCounter.count);
- error.dispose();
- }
-
- /**
- * Asserts that then
- * {@link DataBindingContext#bindValue(IObservableValue, IObservableValue, org.eclipse.jface.databinding.DefaultBindSpec)}
- * if invoked the created binding is added to the internal list of bindings.
- *
- * @throws Exception
- */
- public void testBindValueAddBinding() throws Exception {
- WritableValue targetValue = WritableValue.withValueType(String.class);
- WritableValue modelValue = WritableValue.withValueType(String.class);
-
- DataBindingContext dbc = new DataBindingContext();
- assertNotNull(dbc.getBindings());
- assertEquals(0, dbc.getBindings().size());
-
- Binding binding = dbc.bindValue(targetValue, modelValue, null);
- assertNotNull(binding);
- assertNotNull(dbc.getBindings());
- assertEquals(1, dbc.getBindings().size());
- assertEquals(binding, dbc.getBindings().get(0));
- }
-
- /**
- * Asserts that when
- * {@link DataBindingContext#bindList(IObservableList, IObservableList, org.eclipse.jface.databinding.DefaultBindSpec)}
- * is invoked the created binding is added to the intenal list of bindings.
- *
- * @throws Exception
- */
- public void testBindListAddBinding() throws Exception {
- WritableList targetList = new WritableList(new ArrayList(),
- Object.class);
- WritableList modelList = new WritableList(new ArrayList(), Object.class);
-
- DataBindingContext dbc = new DataBindingContext();
- assertNotNull(dbc.getBindings());
- assertEquals(0, dbc.getBindings().size());
-
- Binding binding = dbc.bindList(targetList, modelList, null);
- assertNotNull(binding);
- assertNotNull(dbc.getBindings());
- assertEquals(1, dbc.getBindings().size());
- assertEquals(binding, dbc.getBindings().get(0));
- }
-
- public void testGetBindingsImmutability() throws Exception {
- DataBindingContext dbc = new DataBindingContext();
- BindingStub binding = new BindingStub();
- binding.init(dbc);
-
- try {
- dbc.getBindings().remove(0);
- fail("exception should have been thrown");
- } catch (UnsupportedOperationException e) {
- }
- }
-
- public void testRemoveBinding() throws Exception {
- BindingStub binding = new BindingStub();
- DataBindingContext dbc = new DataBindingContext();
- binding.init(dbc);
-
- assertTrue("context should contain the binding", dbc.getBindings()
- .contains(binding));
- binding.dispose();
- assertFalse("binding should have been removed", dbc.getBindings()
- .contains(binding));
- }
-
- /**
- * {@link IValueChangeListener} implementation that counts the times
- * handleValueChange(...) is invoked.
- *
- * @since 3.2
- */
- private static class ValueChangeCounter implements IValueChangeListener {
- int count;
-
- public void handleValueChange(ValueChangeEvent event) {
- count++;
- }
- }
-
- /**
- * {@link IChangeListener} implementation that counts the times
- * handleChange(...) is invoked.
- *
- */
- private static class ChangeCounter implements IChangeListener {
- int count;
-
- public void handleChange(ChangeEvent event) {
- count++;
- }
- }
-
- private static class BindingStub extends Binding {
- DataBindingContext context;
-
- public BindingStub() {
- super(new WritableValue(), new WritableValue());
- }
-
- public IObservableValue getPartialValidationStatus() {
- return null;
- }
-
- public IObservableValue getValidationStatus() {
- return null;
- }
-
- public void updateModelFromTarget() {
- }
-
- public void updateTargetFromModel() {
- }
-
- public void updateTargetFromModel(int phase) {
- }
-
- public void updateModelFromTarget(int phase) {
- }
-
- protected void postInit() {
- }
-
- protected void preInit() {
- }
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/IDiffsTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/IDiffsTest.java
deleted file mode 100644
index 97c2ed8f..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/IDiffsTest.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.databinding;
-
-import java.util.Set;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.databinding.observable.list.ListDiff;
-import org.eclipse.core.databinding.observable.list.ListDiffEntry;
-import org.eclipse.core.databinding.observable.set.SetDiff;
-import org.eclipse.core.databinding.observable.value.ValueDiff;
-
-/**
- * @since 3.2
- *
- */
-public class IDiffsTest extends TestCase {
- /**
- * Asserts that the {@link SetDiff#toString()} implementation doesn't throw a NPE if any of its properties are <code>null</code>.
- */
- public void test_SetDiff() {
- SetDiff diff = new SetDiff() {
- public Set getAdditions() {
- return null;
- }
-
- public Set getRemovals() {
- return null;
- }
- };
-
- try {
- diff.toString();
- assertTrue(true);
- } catch (NullPointerException e) {
- fail("NPE was thrown.");
- }
- }
-
- /**
- * Asserts that the {@link LinkDiffEntry#toString()} implementation doesn't throw a NPE if any of its properties are <code>null</code>.
- */
- public void test_ListDiffEntry() {
- ListDiffEntry entry = new ListDiffEntry() {
- public Object getElement() {
- return null;
- }
-
- public int getPosition() {
- return 0;
- }
-
- public boolean isAddition() {
- return false;
- }
- };
-
- try {
- entry.toString();
- assertTrue(true);
- } catch (NullPointerException e) {
- fail("NPE was thrown.");
- }
- }
-
- /**
- * Asserts that the {@link ListDiff#toString()} implementation doesn't throw a NPE if any of its properties are <code>null</code>.
- *
- */
- public void test_ListDiff() {
- ListDiff diff = new ListDiff() {
- public ListDiffEntry[] getDifferences() {
- return null;
- }
- };
-
- try {
- diff.toString();
- assertTrue(true);
- } catch (NullPointerException e) {
- fail("NPE was thrown.");
- }
- }
-
- /**
- * Asserts that if the {@link ListDiff#toString()} implementation doesn't throw a NEP if the differences contains a <code>null</code> item.
- */
- public void test_ListDiff2() {
- ListDiff diff = new ListDiff() {
- public ListDiffEntry[] getDifferences() {
- return new ListDiffEntry[1];
- }
- };
-
- try {
- diff.toString();
- assertTrue(true);
- } catch (NullPointerException e) {
- fail("NPE was thrown.");
- }
- }
-
- /**
- * Asserts that if the {@link ValueDiff#toString()} implementation doesn't throw a NPE if any of its properties are <code>null</code>.
- *
- */
- public void test_ValueDiff() {
- ValueDiff diff = new ValueDiff() {
- public Object getNewValue() {
- return null;
- }
-
- public Object getOldValue() {
- return null;
- }
- };
-
- try {
- diff.toString();
- assertTrue(true);
- } catch (NullPointerException e) {
- fail("NPE was thrown.");
- }
- }
-
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/ObservableTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/ObservableTest.java
deleted file mode 100644
index bf296d4c..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/ObservableTest.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920
- *******************************************************************************/
-package org.eclipse.jface.tests.databinding;
-
-import org.eclipse.core.databinding.observable.ChangeEvent;
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.IChangeListener;
-import org.eclipse.core.databinding.observable.IObservable;
-import org.eclipse.core.databinding.observable.value.WritableValue;
-
-public class ObservableTest extends AbstractDefaultRealmTestCase {
-
- private static class MyObservable extends WritableValue {
- /**
- * @param initialValue
- */
- public MyObservable(Object initialValue) {
- super(initialValue, null);
- }
-
- public void fireChange(Object oldValue, Object newValue) {
- fireValueChange(Diffs.createValueDiff(oldValue, newValue));
- }
- }
-
- private MyObservable observable;
-
- protected void setUp() throws Exception {
- super.setUp();
-
- observable = new MyObservable(null);
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- if (observable != null) {
- try {
- observable.dispose();
- } catch (Exception ex) {
- // ignore
- }
- }
- observable = null;
- }
-
- private static class ChangeListener implements IChangeListener {
- int count;
- IObservable source;
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.databinding.observable.IChangeListener#handleChange(org.eclipse.jface.databinding.observable.IObservable)
- */
- public void handleChange(ChangeEvent event) {
- count++;
- this.source = event.getObservable();
- }
- }
-
- /*
- * Test method for
- * 'org.eclipse.jface.databinding.Observable.addChangeListener(IChangeListener)'
- */
- public void testFireChangeListener() {
- ChangeListener listener = new ChangeListener();
- observable.addChangeListener(listener);
- assertEquals("listener should not have been invoked", 0, listener.count);
-
- observable.fireChange(null, null);
- assertEquals("listener should have been invoked", 1, listener.count);
- }
-
- /*
- * Test method for
- * 'org.eclipse.jface.databinding.Observable.removeChangeListener(IChangeListener)'
- */
- public void testRemoveChangeListener() {
- ChangeListener listener = new ChangeListener();
- observable.addChangeListener(listener);
-
- observable.removeChangeListener(listener);
- observable.fireChange(null, null);
- assertEquals("the listener should have been removed", 0, listener.count);
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/RandomAccessListIteratorTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/RandomAccessListIteratorTest.java
deleted file mode 100644
index b1cddb9c..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/RandomAccessListIteratorTest.java
+++ /dev/null
@@ -1,87 +0,0 @@
-package org.eclipse.jface.tests.databinding;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.internal.databinding.RandomAccessListIterator;
-
-public class RandomAccessListIteratorTest extends TestCase {
-
- private List emptyList = new LinkedList();
- private RandomAccessListIterator rali0 = new RandomAccessListIterator(emptyList);
- private List listWithOne;
- private RandomAccessListIterator rali1;
- private List list;
- private RandomAccessListIterator raliN;
-
- protected void setUp() throws Exception {
- listWithOne = new LinkedList();
- listWithOne.add("Uno");
- rali1 = new RandomAccessListIterator(listWithOne);
- list = new LinkedList();
- list.add("One");
- list.add("Two");
- list.add("three");
- list.add("four");
- raliN = new RandomAccessListIterator(list);
- }
-
- public void testGet_emptyList() {
- try {
- rali0.get(0);
- fail("Should have thrown exception");
- } catch (IndexOutOfBoundsException e) {
- // success
- }
- }
-
- public void testGet_withOne() {
- try {
- assertEquals("Uno", "Uno", rali1.get(0));
-
- rali1.get(1);
- fail("Should have thrown IndexOutOfBoundsException");
- } catch (Exception e) {
- // success
- }
- }
-
- public void testGet_alreadyAtItem() {
- assertEquals("one", "One", raliN.get(0));
- }
-
- public void testGet_moveForward() throws Exception {
- assertEquals("three", "three", raliN.get(2));
- }
-
- public void testGet_moveBackward() throws Exception {
- raliN.next();
- raliN.next();
- assertEquals("one", "One", raliN.get(0));
- }
-
- public void testGet_getLast() throws Exception {
- assertEquals("four", "four", raliN.get(3));
- }
-
- public void testGet_indexTooHigh() throws Exception {
- try {
- raliN.get(4);
- fail("Should have thrown exception");
- } catch (IndexOutOfBoundsException e) {
- // success
- }
- }
-
- public void testGet_indexTooLow() throws Exception {
- try {
- raliN.get(-100);
- fail("Should have thrown exception");
- } catch (IndexOutOfBoundsException e) {
- // success
- }
- }
-
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/SelectionAwareObservableCollectionTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/SelectionAwareObservableCollectionTest.java
deleted file mode 100644
index a6b8247a..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/SelectionAwareObservableCollectionTest.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jface.tests.databinding;
-
-import junit.framework.TestCase;
-
-public class SelectionAwareObservableCollectionTest extends TestCase {
-
- /*
- * FIXME: Rewrite to the new java.util.List API
- */
- public void testGetElementsAndSetElements() {
-// TestSelectionObservableCollection collection = new TestSelectionObservableCollection();
-// String string1 = "string1";
-// String string2 = "string2";
-// String string3 = "string3";
-// String string4 = "string4";
-// String string5 = "string5";
-//
-// collection.addElement(string1, 0);
-// collection.addElement(string2, 1);
-// collection.setSelectedObject(string1);
-//
-// List elementsToUpdate = new ArrayList();
-// elementsToUpdate.add(string3);
-// elementsToUpdate.add(string4);
-// elementsToUpdate.add(string5);
-//
-// collection.setElements(elementsToUpdate);
-//
-// assertEquals("The collection was not updated to the right size.", 3, collection.getSize());
-// assertEquals("The wrong element was found in position 0", string3, collection.getElement(0));
-// assertEquals("The wrong element was found in position 1", string4, collection.getElement(1));
-// assertEquals("The wrong element was found in position 2", string5, collection.getElement(2));
-// assertNull("The selected object was not reset as expected", collection.getSelectedObject());
-//
-// assertNotSame("The all elements list instance should not be the one provided in the set.", elementsToUpdate, collection.getElements());
-//
-// List returnedList = collection.getElements();
-// assertEquals("The wrong element was found in position 0 of the returned list", string3, returnedList.get(0));
-// assertEquals("The wrong element was found in position 1 of the returned list", string4, returnedList.get(1));
-// assertEquals("The wrong element was found in position 2 of the returned list", string5, returnedList.get(2));
-//
-// collection.setSelectedObject(string3);
-//
-// elementsToUpdate = new ArrayList();
-// elementsToUpdate.add(string1);
-// elementsToUpdate.add(string2);
-// elementsToUpdate.add(string3);
-//
-// collection.setElements(elementsToUpdate);
-//
-// assertSame("The selected element was not retained.", string3, collection.getSelectedObject());
- }
-
-// private class TestSelectionObservableCollection extends SelectionAwareObservableCollection {
-// private List elements = new ArrayList();
-// private Object selected;
-//
-// public int addElement(Object value, int index) {
-// elements.add(index, value);
-// return index;
-// }
-//
-// public Object computeElement(int index) {
-// return elements.get(index);
-// }
-//
-// public Class getElementType() {
-// return Object.class;
-// }
-//
-// public int computeSize() {
-// return elements.size();
-// }
-//
-// public void removeElement(int index) {
-// elements.remove(index);
-// }
-//
-// public void setElement(int index, Object value) {
-// elements.set(index, value);
-// }
-//
-// public Object getSelectedObject() {
-// return selected;
-// }
-//
-// public void setSelectedObject(Object object) {
-// this.selected = object;
-// }
-//
-//
-// }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/mask/EditMaskLexerAndTokenTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/mask/EditMaskLexerAndTokenTest.java
deleted file mode 100644
index af12f2b4..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/mask/EditMaskLexerAndTokenTest.java
+++ /dev/null
@@ -1,98 +0,0 @@
-package org.eclipse.jface.tests.databinding.mask;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jface.examples.databinding.mask.internal.EditMaskLexerAndToken;
-
-public class EditMaskLexerAndTokenTest extends TestCase {
-
- private EditMaskLexerAndToken token;
-
- protected void setUp() throws Exception {
- token = new EditMaskLexerAndToken();
- }
-
- public void testInitWithNumeric() throws Exception {
- token.initializeEditMask("#", 0);
- assertTrue("Should accept a digit", token.accept("0"));
- token.clear();
- assertTrue("Should accept a digit", token.accept("1"));
- token.clear();
- assertTrue("Should accept a digit", token.accept("2"));
- token.clear();
- assertTrue("Should accept a digit", token.accept("3"));
- token.clear();
- assertTrue("Should accept a digit", token.accept("4"));
- token.clear();
- assertTrue("Should accept a digit", token.accept("5"));
- token.clear();
- assertTrue("Should accept a digit", token.accept("6"));
- token.clear();
- assertTrue("Should accept a digit", token.accept("7"));
- token.clear();
- assertTrue("Should accept a digit", token.accept("8"));
- token.clear();
- assertTrue("Should accept a digit", token.accept("9"));
- token.clear();
- assertFalse("Should not accept an alpha", token.accept("A"));
- token.clear();
- assertFalse("Should not accept an alpha", token.accept("z"));
- assertFalse("Placeholders are not read-only", token.isReadOnly());
- }
-
- public void testInitWithLiteral() throws Exception {
- token.initializeEditMask("(", 0);
- assertEquals("Literals automatically set their input", "(", token.getInput());
- assertFalse("Literals don't accept anything", token.accept("("));
- assertTrue("literals are read-only", token.isReadOnly());
- assertTrue("Literals are complete", token.isComplete());
- assertFalse("Literals cannot accept characters", token.canAcceptMoreCharacters());
- }
-
- public void testInitWithBackslashLiteral() throws Exception {
- token.initializeEditMask("\\#", 0);
- assertEquals("Should get backslash literal", "#", token.getInput());
- }
-
- public void testAcceptWithValidInputAndEmpty() throws Exception {
- token.initializeEditMask("#", 0);
- assertTrue("Should accept a 0", token.accept("0"));
- }
-
- public void testAcceptWhenParserCannotAcceptMoreCharacters() throws Exception {
- token.initializeEditMask("#", 0);
- assertTrue("Should accept a 0", token.accept("0"));
- assertFalse("Should not accept a 0 -- input full", token.accept("0"));
- }
-
- public void testGetInput() throws Exception {
- token.initializeEditMask("#", 0);
- assertTrue("Should accept a #", token.accept("0"));
- assertEquals(token.getInput(), "0");
- }
-
- public void testClear_withNonLiteral() throws Exception {
- token.initializeEditMask("#", 0);
- assertTrue("Should accept a 0", token.accept("0"));
- assertNotNull("Input should not be null", token.getInput());
- token.clear();
- assertNull("Input should be null after clear", token.getInput());
- }
-
- public void testClear_withLiteral() throws Exception {
- token.initializeEditMask("(", 0);
- assertNotNull("Input should not be null", token.getInput());
- token.clear();
- assertNotNull("Input should still not be null after clear of read-only literal", token.getInput());
- }
-
- public void testIsComplete_withNonLiteral() throws Exception {
- token.initializeEditMask("#", 0);
- assertFalse("should not be complete", token.isComplete());
- token.accept("1");
- assertTrue("should be complete", token.isComplete());
- token.clear();
- assertFalse("should not be complete", token.isComplete());
- }
-
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/mask/EditMaskParserTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/mask/EditMaskParserTest.java
deleted file mode 100644
index a7f8abe3..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/mask/EditMaskParserTest.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.databinding.mask;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jface.examples.databinding.mask.EditMaskParseException;
-import org.eclipse.jface.examples.databinding.mask.internal.EditMaskParser;
-
-/**
- * @since 3.2
- *
- */
-public class EditMaskParserTest extends TestCase {
-
- private EditMaskParser parser;
-
- /* (non-Javadoc)
- * @see junit.framework.TestCase#setUp()
- */
- protected void setUp() throws Exception {
- parser = new EditMaskParser("(###) ###-####");
- }
-
- /**
- * Test method for {@link org.eclipse.jface.examples.databinding.mask.internal.EditMaskParser#EditMaskParser(java.lang.String)}.
- */
- public void testEditMaskParser_validMask() {
- new EditMaskParser("(###) ###-####");
- }
-
- /**
- * Test method for {@link org.eclipse.jface.examples.databinding.mask.internal.EditMaskParser#EditMaskParser(java.lang.String)}.
- */
- public void testEditMaskParser_invalidMask() {
- try {
- new EditMaskParser("(###) ###-####\\");
- fail("Should have thrown exception");
- } catch (EditMaskParseException e) {
- // success
- }
- }
-
- /**
- * Test method for {@link org.eclipse.jface.examples.databinding.mask.internal.EditMaskParser#setInput(java.lang.String)}.
- */
- public void testSetInput() {
- parser.setInput("63a0) 5*55-1\\212abc9");
- assertEquals("Unformatted input", "6305551212", parser.getRawResult());
- assertEquals("Formatted input", "(630) 555-1212", parser.getFormattedResult());
- }
-
- /**
- * Test method for {@link org.eclipse.jface.examples.databinding.mask.internal.EditMaskParser#setInput(java.lang.String)}.
- */
- public void testSetInput_incomplete() {
- parser.setInput("6a0) 5*5-1\\12");
- assertEquals("Unformatted input", "6055112", parser.getRawResult());
- assertEquals("Formatted input", "(605) 511-2 ", parser.getFormattedResult());
- }
-
- /**
- * Test method for {@link org.eclipse.jface.examples.databinding.mask.internal.EditMaskParser#isComplete()}.
- */
- public void testIsComplete() {
- parser.setInput("63a0) 5*55-1\\212");
- assertTrue("complete", parser.isComplete());
- parser.setInput("6a0) 5*5-1\\12");
- assertFalse("incomplete", parser.isComplete());
- }
-
- public void testSetPlaceholder() throws Exception {
- parser.setInput("6a0) 5*5-1\\12");
- assertEquals("Formatted input", "(605) 511-2 ", parser.getFormattedResult());
- parser.setPlaceholder('_');
- assertEquals("Formatted input", "(605) 511-2___", parser.getFormattedResult());
- }
-
- /**
- * Test method for {@link org.eclipse.jface.examples.databinding.mask.internal.EditMaskParser#getNextInputPosition(int)}.
- */
- public void testGetNextInputPosition() {
- assertEquals("Skip leading (", 1, parser.getNextInputPosition(0));
- assertEquals("Position 1 is good", 1, parser.getNextInputPosition(1));
- assertEquals("Skip )<space>", 6, parser.getNextInputPosition(4));
- }
-
- public void testGetFirstIncompleteInputPosition() throws Exception {
- assertEquals("1st position incomplete", 1, parser.getFirstIncompleteInputPosition());
- parser.setInput("6a0) 5*5-1\\12");
- assertEquals("11th position incomplete", 11, parser.getFirstIncompleteInputPosition());
- parser.setInput("63a0) 5*55-1\\212");
- assertEquals("all complete", -1, parser.getFirstIncompleteInputPosition());
- }
-}
-
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/LockRealm.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/LockRealm.java
deleted file mode 100644
index 0eb276ee..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/LockRealm.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.databinding.observable;
-
-import java.util.LinkedList;
-
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.ILock;
-import org.eclipse.core.runtime.jobs.Job;
-
-/**
- * @since 3.2
- *
- */
-public class LockRealm extends Realm {
-
- private LinkedList queue;
- private ILock lock;
- private Job job;
- private boolean lockAcquired;
-
- public LockRealm() {
- queue = new LinkedList();
- lock = Job.getJobManager().newLock();
- job = new Job("Lock Realm Job") {
- protected IStatus run(IProgressMonitor monitor) {
- for (Runnable runnable; (runnable = dequeue()) != null;) {
- acquireLock();
- try {
- safeRun(runnable);
- } finally {
- releaseLock();
- }
- }
- return Status.OK_STATUS;
- }
- };
- job.setSystem(true);
- }
-
- protected void syncExec(Runnable runnable) {
- acquireLock();
- try {
- safeRun(runnable);
- } finally {
- releaseLock();
- }
- }
-
- public void asyncExec(Runnable runnable) {
- enqueue(runnable);
- job.schedule();
- }
-
- /**
- * @param runnable
- */
- private void enqueue(Runnable runnable) {
- synchronized (queue) {
- queue.addLast(runnable);
- }
- }
-
- private Runnable dequeue() {
- synchronized (queue) {
- if (queue.isEmpty()) {
- return null;
- }
- return (Runnable) queue.getFirst();
- }
- }
-
- public boolean isCurrent() {
- return lockAcquired;
- }
-
- private void acquireLock() {
- lock.acquire();
- lockAcquired = true;
- }
-
- private void releaseLock() {
- lockAcquired = false;
- lock.release();
- }
-
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/ThreadRealm.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/ThreadRealm.java
deleted file mode 100644
index ada9344a..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/ThreadRealm.java
+++ /dev/null
@@ -1,118 +0,0 @@
-package org.eclipse.jface.tests.databinding.observable;
-
-import java.util.LinkedList;
-
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.jface.util.Assert;
-
-/**
- * {@link Realm} that enforces execution to be within a specific
- * {@link Thread}.
- *
- * @since 3.2
- */
-public class ThreadRealm extends Realm {
- private Thread thread;
-
- private final LinkedList queue = new LinkedList();
-
- private volatile boolean block;
-
- /**
- * Initializes the realm.
- *
- * @param thread
- */
- public synchronized void init(Thread thread) {
- if (thread == null) {
- throw new IllegalArgumentException("Parameter thread was null."); //$NON-NLS-1$
- }
- Assert.isTrue(this.thread == null, "Realm can only be initialized once.");
-
- this.thread = thread;
- }
-
- /**
- * @return <code>true</code> if the current thread is the thread for
- * the realm
- */
- public boolean isCurrent() {
- return Thread.currentThread() == thread;
- }
-
- /**
- * @return thread, <code>null</code> if not
- * {@link #init(Thread) initialized}
- */
- public Thread getThread() {
- return thread;
- }
-
- /**
- * Queues the provided <code>runnable</code>.
- *
- * @param runnable
- */
- public void asyncExec(Runnable runnable) {
- synchronized (queue) {
- queue.add(runnable);
- queue.notifyAll();
- }
- }
-
- public boolean isBlocking() {
- return block;
- }
-
- /**
- * Blocks the current thread invoking runnables.
- */
- public void block() {
- if (block) {
- throw new IllegalStateException("Realm is already blocking.");
- }
-
- if (Thread.currentThread() != thread) {
- throw new IllegalStateException("The current thread is not the correct thread.");
- }
-
- try {
- block = true;
- while (block) {
- Runnable runnable = null;
- synchronized (queue) {
- while (queue.isEmpty()) {
- queue.wait();
- }
-
- // Check the size in case the thread is being awoken by
- // unblock().
- if (!queue.isEmpty()) {
- runnable = (Runnable) queue.removeFirst();
- }
- }
-
- if (runnable != null) {
- safeRun(runnable);
- runnable = null;
- }
- }
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- } finally {
- block = false;
- }
- }
-
- /**
- * Unblocks the thread.
- */
- public void unblock() {
- block = false;
-
- // Awaken the thread if waiting.
- synchronized (queue) {
- queue.notifyAll();
- }
- }
-} \ No newline at end of file
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/list/AbstractObservableListTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/list/AbstractObservableListTest.java
deleted file mode 100644
index 1ed6e664..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/list/AbstractObservableListTest.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- * Brad Reynolds - bug 167204
- ******************************************************************************/
-
-package org.eclipse.jface.tests.databinding.observable.list;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.databinding.observable.IObservable;
-import org.eclipse.core.databinding.observable.ObservableTracker;
-import org.eclipse.core.databinding.observable.list.AbstractObservableList;
-import org.eclipse.core.databinding.observable.list.ListDiff;
-import org.eclipse.jface.tests.databinding.util.RealmTester;
-import org.eclipse.jface.tests.databinding.util.RealmTester.CurrentRealm;
-
-/**
- * @since 3.2
- */
-public class AbstractObservableListTest extends TestCase {
- private AbstractObservableListStub list;
-
- protected void setUp() throws Exception {
- RealmTester.setDefault(new CurrentRealm(true));
- list = new AbstractObservableListStub();
- }
-
- protected void tearDown() throws Exception {
- RealmTester.setDefault(null);
- }
-
- public void testFireChangeRealmChecks() throws Exception {
- RealmTester.exerciseCurrent(new Runnable() {
- public void run() {
- list.fireChange();
- }
- });
- }
-
- public void testFireStaleRealmChecks() throws Exception {
- RealmTester.exerciseCurrent(new Runnable() {
- public void run() {
- list.fireStale();
- }
- });
- }
-
- public void testFireListChangeRealmChecks() throws Exception {
- RealmTester.exerciseCurrent(new Runnable() {
- public void run() {
- list.fireListChange(null);
- }
- });
- }
-
- public void testIteratorGetterCalled() throws Exception {
- final AbstractObservableListStub list = new AbstractObservableListStub();
-
- IObservable[] observables = ObservableTracker.runAndMonitor(
- new Runnable() {
- public void run() {
- list.iterator();
- }
- }, null, null);
-
- assertEquals("length", 1, observables.length);
- assertEquals("observable", list, observables[0]);
- }
-
- public void testListIteratorGetterCalled() throws Exception {
- final AbstractObservableListStub list = new AbstractObservableListStub();
-
- IObservable[] observables = ObservableTracker.runAndMonitor(
- new Runnable() {
- public void run() {
- list.listIterator();
- }
- }, null, null);
-
- assertEquals("length", 1, observables.length);
- assertEquals("observable", list, observables[0]);
- }
-
- static class AbstractObservableListStub extends AbstractObservableList {
- protected int doGetSize() {
- return 0;
- }
-
- public Object get(int arg0) {
- return null;
- }
-
- public Object getElementType() {
- return null;
- }
-
- protected void fireChange() {
- super.fireChange();
- }
-
- protected void fireStale() {
- super.fireStale();
- }
-
- protected void fireListChange(ListDiff diff) {
- super.fireListChange(diff);
- }
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/list/ObservableListTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/list/ObservableListTest.java
deleted file mode 100644
index 55c69cfa..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/list/ObservableListTest.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 167204
- ******************************************************************************/
-
-package org.eclipse.jface.tests.databinding.observable.list;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.databinding.observable.IObservable;
-import org.eclipse.core.databinding.observable.ObservableTracker;
-import org.eclipse.core.databinding.observable.list.ObservableList;
-import org.eclipse.jface.tests.databinding.util.RealmTester;
-import org.eclipse.jface.tests.databinding.util.RealmTester.CurrentRealm;
-
-/**
- * @since 3.2
- */
-public class ObservableListTest extends TestCase {
- private ObservableListStub list;
-
- protected void setUp() throws Exception {
- RealmTester.setDefault(new CurrentRealm(true));
-
- list = new ObservableListStub(new ArrayList(0), Object.class);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see junit.framework.TestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- RealmTester.setDefault(null);
- }
-
- public void testIsStaleRealmChecks() throws Exception {
- RealmTester.exerciseCurrent(new Runnable() {
- public void run() {
- list.isStale();
- }
- });
- }
-
- public void testSetStaleRealmChecks() throws Exception {
- RealmTester.exerciseCurrent(new Runnable() {
- public void run() {
- list.setStale(false);
- }
- });
- }
-
- public void testIteratorGetterCalled() throws Exception {
- final ObservableListStub list = new ObservableListStub(
- new ArrayList(0), Object.class);
-
- IObservable[] observables = ObservableTracker.runAndMonitor(
- new Runnable() {
- public void run() {
- list.iterator();
- }
- }, null, null);
-
- assertEquals("length", 1, observables.length);
- assertEquals("observable", list, observables[0]);
- }
-
- public void testListIteratorGetterCalled() throws Exception {
- ArrayList arrayList = new ArrayList();
- arrayList.add("");
- final ObservableListStub list = new ObservableListStub(arrayList,
- Object.class);
-
- IObservable[] observables = ObservableTracker.runAndMonitor(
- new Runnable() {
- public void run() {
- list.listIterator();
- }
- }, null, null);
-
- assertEquals("length", 1, observables.length);
- assertEquals("observable", list, observables[0]);
- }
-
- public void testListIteratorByIndexGetterCalled() throws Exception {
- ArrayList arrayList = new ArrayList();
- arrayList.add("");
- final ObservableListStub list = new ObservableListStub(arrayList,
- Object.class);
-
- IObservable[] observables = ObservableTracker.runAndMonitor(
- new Runnable() {
- public void run() {
- list.listIterator(1);
- }
- }, null, null);
-
- assertEquals("length", 1, observables.length);
- assertEquals("observable", list, observables[0]);
- }
-
- static class ObservableListStub extends ObservableList {
- protected ObservableListStub(List wrappedList, Object elementType) {
- super(wrappedList, elementType);
- }
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/list/WritableListTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/list/WritableListTest.java
deleted file mode 100644
index a2a8a18d..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/list/WritableListTest.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164653, 147515
- ******************************************************************************/
-
-package org.eclipse.jface.tests.databinding.observable.list;
-
-import java.util.Collections;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.list.WritableList;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.jface.tests.databinding.observable.ThreadRealm;
-import org.eclipse.jface.tests.databinding.util.RealmTester;
-import org.eclipse.jface.tests.databinding.util.RealmTester.CurrentRealm;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * @since 3.2
- */
-public class WritableListTest extends TestCase {
- protected void tearDown() throws Exception {
- RealmTester.setDefault(null);
- }
-
- public void testClear() {
- ThreadRealm realm = new ThreadRealm();
- realm.init(Thread.currentThread());
-
- WritableList writableList = new WritableList(realm);
- writableList.add("hello");
- writableList.add("world");
- assertEquals(2, writableList.size());
- writableList.clear();
- assertEquals(0, writableList.size());
- }
-
- public void testSetRealmChecks() throws Exception {
- RealmTester.exerciseCurrent(new Runnable() {
- public void run() {
- WritableList list = new WritableList();
- list.add("");
- list.set(0, "");
- }
- });
- }
-
- public void testAddRealmChecks() throws Exception {
- RealmTester.exerciseCurrent(new Runnable() {
- public void run() {
- WritableList list = new WritableList();
- list.add("");
- }
- });
- }
-
- public void testAddByIndexRealmChecks() throws Exception {
- RealmTester.exerciseCurrent(new Runnable() {
- public void run() {
- WritableList list = new WritableList();
- list.add(0, "");
- }
- });
- }
-
- public void testAddAllRealmChecks() throws Exception {
- RealmTester.exerciseCurrent(new Runnable() {
- public void run() {
- WritableList list = new WritableList();
- list.addAll(Collections.EMPTY_LIST);
- }
- });
- }
-
- public void testAddAllByIndexRealmChecks() throws Exception {
- RealmTester.exerciseCurrent(new Runnable() {
- public void run() {
- WritableList list = new WritableList();
- list.addAll(0, Collections.EMPTY_LIST);
- }
- });
- }
-
- public void testRemoveRealmChecks() throws Exception {
- RealmTester.setDefault(new CurrentRealm(true));
- final WritableList list = new WritableList();
- list.add("");
- list.add("");
-
- RealmTester.exerciseCurrent(new Runnable() {
- public void run() {
- list.remove("");
- }
- });
- RealmTester.setDefault(null);
- }
-
- public void testRemoveByIndexRealmChecks() throws Exception {
- RealmTester.setDefault(new CurrentRealm(true));
- final WritableList list = new WritableList();
- list.add("");
- list.add("");
-
- RealmTester.exerciseCurrent(new Runnable() {
- public void run() {
- list.remove(list.size() - 1);
- }
- });
-
- RealmTester.setDefault(null);
- }
-
- public void testRemoveAllRealmChecks() throws Exception {
- RealmTester.exerciseCurrent(new Runnable() {
- public void run() {
- WritableList list = new WritableList();
- list.removeAll(Collections.EMPTY_LIST);
- }
- });
- }
-
- public void testRetainAllRealmChecks() throws Exception {
- RealmTester.exerciseCurrent(new Runnable() {
- public void run() {
- WritableList list = new WritableList();
- list.retainAll(Collections.EMPTY_LIST);
- }
- });
- }
-
- public void testClearRealmChecks() throws Exception {
- RealmTester.exerciseCurrent(new Runnable() {
- public void run() {
- WritableList list = new WritableList();
- list.clear();
- }
- });
- }
-
- public void testNullElementType() throws Exception {
- RealmTester.setDefault(SWTObservables.getRealm(Display.getDefault()));
- WritableList writableList = new WritableList();
- assertNull(writableList.getElementType());
-
- writableList = new WritableList(Realm.getDefault());
- assertNull(writableList.getElementType());
- }
-
- public void testWithElementType() throws Exception {
- RealmTester.setDefault(SWTObservables.getRealm(Display.getDefault()));
-
- Object elementType = String.class;
- WritableList list = WritableList.withElementType(elementType);
- assertNotNull(list);
- assertEquals(Realm.getDefault(), list.getRealm());
- assertEquals(elementType, list.getElementType());
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/set/WritableSetTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/set/WritableSetTest.java
deleted file mode 100644
index 1d80c436..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/set/WritableSetTest.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jface.tests.databinding.observable.set;
-
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.set.WritableSet;
-import org.eclipse.jface.tests.databinding.AbstractDefaultRealmTestCase;
-
-/**
- * @since 3.3
- */
-public class WritableSetTest extends AbstractDefaultRealmTestCase {
- public void testWithElementType() throws Exception {
- Object elementType = String.class;
- WritableSet set = WritableSet.withElementType(elementType);
- assertNotNull(set);
- assertEquals(Realm.getDefault(), set.getRealm());
- assertEquals(elementType, set.getElementType());
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/value/AbstractObservableValueTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/value/AbstractObservableValueTest.java
deleted file mode 100644
index 811ff85f..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/value/AbstractObservableValueTest.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.databinding.observable.value;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.value.AbstractObservableValue;
-import org.eclipse.core.databinding.observable.value.ValueDiff;
-import org.eclipse.jface.tests.databinding.util.RealmTester;
-import org.eclipse.jface.tests.databinding.util.RealmTester.CurrentRealm;
-
-/**
- * @since 3.2
- */
-public class AbstractObservableValueTest extends TestCase {
- public void testSetValueRealmChecks() throws Exception {
- RealmTester.exerciseCurrent(new Runnable() {
- public void run() {
- ObservableValueStub observable = new ObservableValueStub();
- try {
- observable.setValue(null);
- } catch (UnsupportedOperationException e) {
- // do nothing
- }
- }
- });
- }
-
- public void testSetValueInvokesDoSetValue() throws Exception {
- class ValueStub extends ObservableValueStub {
- int doSetValue;
-
- ValueStub(Realm realm) {
- super(realm);
- }
-
- protected void doSetValue(Object value) {
- doSetValue++;
- }
- }
-
- Realm realm = new CurrentRealm(true);
- ValueStub stub = new ValueStub(realm);
- assertEquals(0, stub.doSetValue);
- stub.setValue(new Object());
- assertEquals("doSetValue should have been invoked", 1, stub.doSetValue);
- }
-
- public void testFireValueChangeRealmChecks() throws Exception {
- RealmTester.exerciseCurrent(new Runnable() {
- public void run() {
- ObservableValueStub observable = new ObservableValueStub();
- observable.fireValueChange(null);
- }
- });
- }
-
- private static class ObservableValueStub extends AbstractObservableValue {
- ObservableValueStub() {
- super(Realm.getDefault());
- }
-
- private ObservableValueStub(Realm realm) {
- super(realm);
- }
-
- protected Object doGetValue() {
- return null;
- }
-
- public Object getValueType() {
- return null;
- }
-
- protected void fireValueChange(ValueDiff diff) {
- super.fireValueChange(diff);
- }
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/value/AbstractVetoableValueTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/value/AbstractVetoableValueTest.java
deleted file mode 100644
index ce85bcbe..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/value/AbstractVetoableValueTest.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.databinding.observable.value;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.value.AbstractVetoableValue;
-import org.eclipse.core.databinding.observable.value.ValueDiff;
-import org.eclipse.jface.tests.databinding.util.RealmTester;
-import org.eclipse.jface.tests.databinding.util.RealmTester.CurrentRealm;
-
-/**
- * @since 3.2
- */
-public class AbstractVetoableValueTest extends TestCase {
- public void testSetValueInvokesDoSetApprovedValue() throws Exception {
- class VetoableValue extends VetoableValueStub {
- int count;
- Object value;
-
- VetoableValue(Realm realm) {
- super(realm);
- }
-
- protected void doSetApprovedValue(Object value) {
- count++;
- this.value = value;
- }
- }
-
- Realm realm = new CurrentRealm(true);
- VetoableValue vetoableValue = new VetoableValue(realm);
- assertEquals(0, vetoableValue.count);
- assertEquals(null, vetoableValue.value);
-
- Object value = new Object();
- vetoableValue.setValue(value);
- assertEquals(1, vetoableValue.count);
- assertEquals(value, vetoableValue.value);
- }
-
- public void testFireValueChangeRealmChecks() throws Exception {
- RealmTester.exerciseCurrent(new Runnable() {
- public void run() {
- VetoableValueStub observable = new VetoableValueStub();
- observable.fireValueChanging(null);
- }
- });
- }
-
- private static class VetoableValueStub extends AbstractVetoableValue {
- VetoableValueStub() {
- this(Realm.getDefault());
- }
-
- VetoableValueStub(Realm realm) {
- super(realm);
- }
-
- protected void doSetApprovedValue(Object value) {
- }
-
- protected Object doGetValue() {
- return null;
- }
-
-
- public Object getValueType() {
- return null;
- }
-
- protected boolean fireValueChanging(ValueDiff diff) {
- return super.fireValueChanging(diff);
- }
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/value/WritableValueTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/value/WritableValueTest.java
deleted file mode 100644
index ea7e4fb7..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/value/WritableValueTest.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Brad Reynolds
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - bug 158687
- * Brad Reynolds - bug 164653
- ******************************************************************************/
-
-package org.eclipse.jface.tests.databinding.observable.value;
-
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.value.IValueChangeListener;
-import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
-import org.eclipse.core.databinding.observable.value.WritableValue;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.jface.tests.databinding.AbstractDefaultRealmTestCase;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * @since 3.2
- */
-public class WritableValueTest extends AbstractDefaultRealmTestCase {
- /**
- * Asserts that ValueChange events are only fired when the value changes.
- *
- * @throws Exception
- */
- public void testValueChangeOnlyFiresOnChange() throws Exception {
- WritableValue writableValue = new WritableValue();
- ValueChangeCounter counter = new ValueChangeCounter();
- writableValue.addValueChangeListener(counter);
-
- assertEquals(0, counter.count);
- // set same
- writableValue.setValue(null);
- assertEquals(0, counter.count);
-
- // set different
- writableValue.setValue("value");
- assertEquals(1, counter.count);
-
- // set same
- writableValue.setValue("value");
- assertEquals(1, counter.count);
-
- // set different
- writableValue.setValue(null);
- assertEquals(2, counter.count);
- }
-
- public void testDoSetValue() throws Exception {
- WritableValue writableValue = new WritableValue(SWTObservables
- .getRealm(Display.getDefault()));
- Object value = new Object();
- writableValue.setValue(value);
- assertEquals(value, writableValue.getValue());
- }
-
- /**
- * All constructors delegate to the 3 arg constructor.
- *
- * @throws Exception
- */
- public void testConstructor() throws Exception {
- WritableValue value = new WritableValue(SWTObservables.getRealm(Display
- .getDefault()));
- assertNull(value.getValue());
- assertNull(value.getValueType());
- }
-
- public void testWithValueType() throws Exception {
- Object elementType = String.class;
- WritableValue value = WritableValue.withValueType(elementType);
- assertNotNull(value);
- assertEquals(Realm.getDefault(), value.getRealm());
- assertEquals(elementType, value.getValueType());
- }
-
- private static class ValueChangeCounter implements IValueChangeListener {
- int count;
-
- public void handleValueChange(ValueChangeEvent event) {
- count++;
- }
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/AutomationUtil.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/AutomationUtil.java
deleted file mode 100644
index 9e881ae6..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/AutomationUtil.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jface.tests.databinding.scenarios;
-
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-
-/**
- * COPIED FROM org.eclipse.ui.tests
- * <code>AutomationUtil</code> contains utility methods to mimic key events.
- * Mouse event methods can be added if needed to complete this class.
- */
-
-public class AutomationUtil {
-
- /**
- * Method to mimic a key code event on a display.
- *
- * @param display
- * The display.
- * @param eventType
- * The event type.
- * @param keyCode
- * The key code.
- */
- public static void performKeyCodeEvent(Display display, int eventType,
- int keyCode) {
- Event event = new Event();
- event.type = eventType;
- event.keyCode = keyCode;
- display.post(event);
- }
-
- /**
- * Method to mimic a character event on a display.
- *
- * @param display
- * The display.
- * @param eventType
- * The event type.
- * @param character
- * The character to mimic.
- */
- public static void performCharacterEvent(Display display, int eventType,
- char character) {
- Event event = new Event();
- event.type = eventType;
- event.character = character;
- display.post(event);
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/BindingScenariosTestSuite.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/BindingScenariosTestSuite.java
deleted file mode 100644
index 93fb3cb7..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/BindingScenariosTestSuite.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920
- *******************************************************************************/
-package org.eclipse.jface.tests.databinding.scenarios;
-
-import junit.extensions.TestSetup;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * To run this test suite, right-click and select "Run As JUnit Plug-in Test".
- * This will also start an Eclipse instance. To clean up the launch
- * configuration, open up its "Main" tab and select "[No Application] - Headless
- * Mode" as the application to run. You can also run this class as an SWT
- * application.
- */
-public class BindingScenariosTestSuite extends TestSuite {
-
- public static void main(String[] args) {
- junit.textui.TestRunner.run(suite());
- }
-
- private static Display display;
-
- private static Shell shell;
-
- public static Test suite() {
- return new TestSetup(new BindingScenariosTestSuite()) {
- protected void setUp() throws Exception {
- Display d = Display.getDefault();
- shell = new Shell(d, SWT.SHELL_TRIM);
- shell.setLayout(new FillLayout());
- }
-
- protected void tearDown() throws Exception {
- shell.close();
- shell.dispose();
- if (display != null) {
- display.dispose();
- }
- }
- };
- }
-
- public BindingScenariosTestSuite() {
- addTestSuite(ButtonControlScenario.class);
- addTestSuite(ComboScenarios.class);
- addTestSuite(ComboUpdatingTest.class);
- addTestSuite(ComboViewerScenario.class);
- addTestSuite(CustomConverterScenarios.class);
- addTestSuite(CustomScenarios.class);
- addTestSuite(ListViewerScenario.class);
- addTestSuite(MasterDetailScenarios.class);
- addTestSuite(NewTableScenarios.class);
- addTestSuite(NPETestScenario.class);
- addTestSuite(PropertyScenarios.class);
- addTestSuite(SpinnerControlScenario.class);
- addTestSuite(TableScenarios.class);
- addTestSuite(TextControlScenario.class);
- }
-
- public static Shell getShell() {
- return shell;
- }
-
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ButtonControlScenario.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ButtonControlScenario.java
deleted file mode 100644
index 372a64db..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ButtonControlScenario.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920
- *******************************************************************************/
-package org.eclipse.jface.tests.databinding.scenarios;
-
-import org.eclipse.core.databinding.beans.BeansObservables;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.jface.examples.databinding.model.Adventure;
-import org.eclipse.jface.examples.databinding.model.SampleData;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Button;
-
-/**
- * To run the tests in this class, right-click and select "Run As JUnit Plug-in
- * Test". This will also start an Eclipse instance. To clean up the launch
- * configuration, open up its "Main" tab and select "[No Application] - Headless
- * Mode" as the application to run.
- */
-
-public class ButtonControlScenario extends ScenariosTestCase {
-
- private Adventure adventure;
-
- private Button button;
-
- protected void setUp() throws Exception {
- super.setUp();
- // do any setup work here
- button = new Button(getComposite(), SWT.CHECK);
- adventure = SampleData.WINTER_HOLIDAY;
- }
-
- protected void tearDown() throws Exception {
- button.dispose();
- super.tearDown();
- }
-
- public void testScenario01() {
- // Bind the button's selection to the adventure "isPetsAllowed"
- getDbc().bindValue(SWTObservables.observeSelection(button),
- BeansObservables.observeValue(adventure, "petsAllowed"),
- null);
-
- // Check the model and GUI are in the same state
- assertEquals(button.getSelection(), adventure.isPetsAllowed());
- // Change the model and check the GUI is updated
- boolean newBoolean = !adventure.isPetsAllowed();
- adventure.setPetsAllowed(newBoolean);
- assertEquals(newBoolean, adventure.isPetsAllowed());
- assertEquals(button.getSelection(), newBoolean);
- // Change the GUI and check the model
- newBoolean = !newBoolean;
- button.setSelection(newBoolean);
- button.notifyListeners(SWT.Selection, null);
- assertEquals(newBoolean, adventure.isPetsAllowed());
- newBoolean = !newBoolean;
- final boolean finalNewBoolean = newBoolean;
- adventure.setPetsAllowed(finalNewBoolean);
- spinEventLoop(0);
- assertEquals(newBoolean, button.getSelection());
-
- }
-
- public void testScenario02() {
- // Test with an SWT.Toggle button
- button.dispose();
- button = new Button(getComposite(), SWT.TOGGLE);
- // Bind the button's selection to the adventure "isPetsAllowed"
- getDbc().bindValue(SWTObservables.observeSelection(button),
- BeansObservables.observeValue(adventure, "petsAllowed"),
- null);
-
- // Check the model and GUI are in the same state
- assertEquals(button.getSelection(), adventure.isPetsAllowed());
- // Change the model and check the GUI is updated
- boolean newBoolean = !adventure.isPetsAllowed();
- adventure.setPetsAllowed(newBoolean);
- assertEquals(newBoolean, adventure.isPetsAllowed());
- assertEquals(button.getSelection(), newBoolean);
- // Change the GUI and check the model
- newBoolean = !newBoolean;
- button.setSelection(newBoolean);
- button.notifyListeners(SWT.Selection, null);
- assertEquals(newBoolean, adventure.isPetsAllowed());
- }
-
- public void testScenario03() {
- // Test with an SWT.Radio button
- button.dispose();
- button = new Button(getComposite(), SWT.RADIO);
-
- // Bind the button's selection to the adventure "isPetsAllowed"
- getDbc().bindValue(SWTObservables.observeSelection(button),
- BeansObservables.observeValue(adventure, "petsAllowed"),
- null);
-
- // Check the model and GUI are in the same state
- assertEquals(button.getSelection(), adventure.isPetsAllowed());
- // Change the model and check the GUI is updated
- boolean newBoolean = !adventure.isPetsAllowed();
- adventure.setPetsAllowed(newBoolean);
- assertEquals(newBoolean, adventure.isPetsAllowed());
- assertEquals(button.getSelection(), newBoolean);
- // Change the GUI and check the model
- newBoolean = !newBoolean;
- button.setSelection(newBoolean);
- button.notifyListeners(SWT.Selection, null);
- assertEquals(newBoolean, adventure.isPetsAllowed());
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ComboScenarios.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ComboScenarios.java
deleted file mode 100644
index ef3dedca..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ComboScenarios.java
+++ /dev/null
@@ -1,563 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920
- * Brad Reynolds - bug 160000
- *******************************************************************************/
-package org.eclipse.jface.tests.databinding.scenarios;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Locale;
-
-import org.eclipse.core.databinding.beans.BeansObservables;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.list.WritableList;
-import org.eclipse.core.databinding.observable.map.IObservableMap;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.jface.databinding.viewers.ObservableListContentProvider;
-import org.eclipse.jface.databinding.viewers.ObservableMapLabelProvider;
-import org.eclipse.jface.databinding.viewers.ViewersObservables;
-import org.eclipse.jface.examples.databinding.model.Account;
-import org.eclipse.jface.examples.databinding.model.Adventure;
-import org.eclipse.jface.examples.databinding.model.Catalog;
-import org.eclipse.jface.examples.databinding.model.Lodging;
-import org.eclipse.jface.examples.databinding.model.SampleData;
-import org.eclipse.jface.viewers.ComboViewer;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CCombo;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Combo;
-
-public class ComboScenarios extends ScenariosTestCase {
-
- protected ComboViewer cviewer = null;
-
- protected Combo combo = null;
-
- protected Catalog catalog = null;
-
- ILabelProvider lodgingLabelProvider = new LabelProvider() {
- public String getText(Object element) {
- return ((Lodging) element).getName();
- }
- };
-
- ILabelProvider accountLabelProvider = new LabelProvider() {
- public String getText(Object element) {
- return ((Account) element).getCountry();
- }
- };
-
- protected void setUp() throws Exception {
- super.setUp();
- getComposite().setLayout(new FillLayout());
-
- combo = new Combo(getComposite(), SWT.READ_ONLY | SWT.DROP_DOWN);
- cviewer = new ComboViewer(combo);
-
- catalog = SampleData.CATALOG_2005; // Lodging source
- }
-
- protected void tearDown() throws Exception {
- combo.dispose();
- combo = null;
- cviewer = null;
- super.tearDown();
- }
-
- protected Object getViewerSelection() {
- return ((IStructuredSelection) cviewer.getSelection())
- .getFirstElement();
- }
-
- /**
- * @return the ComboViewer's domain object list
- */
- protected List getViewerContent(ComboViewer cviewer) {
- Object[] elements = ((IStructuredContentProvider) cviewer
- .getContentProvider()).getElements(null);
- if (elements != null)
- return Arrays.asList(elements);
- return null;
- }
-
- /**
- *
- * @return the combo's items (String[]), which is the same thing as the
- * Viewer's labels
- *
- */
- protected List getComboContent() {
- String[] elements = combo.getItems();
- if (elements != null)
- return Arrays.asList(elements);
- return null;
- }
-
- protected List getColumn(Object[] list, String feature) {
- List result = new ArrayList();
- if (list == null || list.length == 0)
- return result;
- String getterName = "get"
- + feature.substring(0, 1).toUpperCase(Locale.ENGLISH)
- + feature.substring(1);
- try {
- Method getter = list[0].getClass().getMethod(getterName,
- new Class[0]);
- try {
- for (int i = 0; i < list.length; i++) {
- result.add(getter.invoke(list[i], new Object[0]));
- }
- } catch (IllegalArgumentException e) {
- } catch (IllegalAccessException e) {
- } catch (InvocationTargetException e) {
- }
- } catch (SecurityException e) {
- } catch (NoSuchMethodException e) {
- }
- return result;
- }
-
- /**
- * This test case deal with the 3rd scenario, using vanilla bindings: Ensure
- * a valid content and selection are bounded correctly Bind a collection of
- * Lodgings to a ComboViewer Bind the ComboViewer's selection to the
- * defaultLodging of an Adventure
- *
- * This test does not deal with null values, empty content, changed content,
- * property change of content elements, etc.
- *
- */
- public void test_ROCombo_Scenario03_vanilla() {
- IObservableList lodgings = BeansObservables.observeList(Realm
- .getDefault(), catalog, "lodgings");
- ObservableListContentProvider contentProvider = new ObservableListContentProvider();
-
- IObservableMap[] attributeMaps = BeansObservables.observeMaps(
- contentProvider.getKnownElements(), Lodging.class,
- new String[] { "name" });
-
- // Bind the ComboViewer's content to the available lodging
- cviewer.setContentProvider(contentProvider);
- cviewer.setLabelProvider(new ObservableMapLabelProvider(attributeMaps));
- cviewer.setInput(lodgings);
-
- Adventure skiAdventure = SampleData.WINTER_HOLIDAY; // selection will
-
- // Ensure that cv's content now has the catalog's lodgings
- assertArrayEquals(catalog.getLodgings(), getViewerContent(cviewer)
- .toArray());
-
- // Ensure that the cv's labels are the same as the lodging descriptions
- assertEquals(getColumn(catalog.getLodgings(), "name"),
- getComboContent());
-
- getDbc().bindValue(ViewersObservables.observeSingleSelection(cviewer),
- BeansObservables.observeValue(skiAdventure, "defaultLodging"),
- null);
-
- // Check to see that the initial selection is the currentDefault Lodging
- assertEquals(getViewerSelection(), skiAdventure.getDefaultLodging());
-
- // Change the selection of the ComboViewer to all possible lodgings, and
- // verify that skiAdventure's default lodging was changed accordingly
- for (int i = 0; i < catalog.getLodgings().length; i++) {
- Object selection = catalog.getLodgings()[i];
- cviewer.setSelection(new StructuredSelection(selection));
- assertEquals(selection, skiAdventure.getDefaultLodging());
- assertEquals(getViewerSelection(), skiAdventure.getDefaultLodging());
- }
-
- }
-
- /**
- * This test case deal with the 3rd scenario, and focuses on the collection
- * binding to the combo. It will bind a collection, add/remove/change
- * elements in the collection, and change element's properties to ensure
- * that the combo's labels were updated appropriatly.
- *
- * it also induce null values in properties, and elments.
- *
- * This test does not deal with the combo's selection.
- */
- public void test_ROCombo_Scenario03_collectionBindings() {
- // column binding
- // Bind the ComboViewer's content to the available lodging
- IObservableList lodgings = BeansObservables.observeList(Realm
- .getDefault(), catalog, "lodgings");
- ObservableListContentProvider contentProvider = new ObservableListContentProvider();
-
- IObservableMap[] attributeMaps = BeansObservables.observeMaps(
- contentProvider.getKnownElements(), Lodging.class,
- new String[] { "name" });
-
- cviewer.setContentProvider(contentProvider);
- cviewer.setLabelProvider(new ObservableMapLabelProvider(attributeMaps));
- cviewer.setInput(lodgings);
-
- // Ensure that cv's content now has the catalog's lodgings
- assertArrayEquals(catalog.getLodgings(), getViewerContent(cviewer)
- .toArray());
-
- // Ensure that the cv's labels are the same as the lodging descriptions
- assertEquals(getColumn(catalog.getLodgings(), "name"),
- getComboContent());
-
- // Add a lodging in the middle (not supported by the model right now)
- // Lodging lodging = SampleData.FACTORY.createLodging();
- // lodging.setName("Middle Lodging");
- // catalog.addLodging(lodging);
- // assertEquals(getViewerContent(cviewer).get(2), lodging);
-
- // Add a lodging at the end
- Lodging lodging = SampleData.FACTORY.createLodging();
- lodging.setName("End Lodging");
- catalog.addLodging(lodging);
- int index = getComboContent().size() - 1;
- assertEquals(getViewerContent(cviewer).get(index), lodging);
-
- // Delete the first Lodging
- catalog.removeLodging(catalog.getLodgings()[0]);
- // Ensure that the cv's labels are the same as the lodging descriptions
- assertEquals(getColumn(catalog.getLodgings(), "name"),
- getComboContent());
-
- // Delete middle Lodging
- catalog.removeLodging(catalog.getLodgings()[2]);
- // Ensure that the cv's labels are the same as the lodging descriptions
- assertEquals(getColumn(catalog.getLodgings(), "name"),
- getComboContent());
-
- // Change the names of all Lodging
- for (int i = 0; i < catalog.getLodgings().length; i++) {
- Lodging l = catalog.getLodgings()[i];
- l.setName("Changed: " + l.getName());
- }
- spinEventLoop(0); // force Async. efforts
- assertEquals(getColumn(catalog.getLodgings(), "name"),
- getComboContent());
-
- // Set to null value
- Lodging l = catalog.getLodgings()[0];
- assertEquals(combo.getItem(0), l.getName());
- l.setName(null);
- assertEquals("", combo.getItem(0));
-
- // set to empty list
- while (catalog.getLodgings().length > 0) {
- catalog.removeLodging(catalog.getLodgings()[0]);
- assertEquals(getColumn(catalog.getLodgings(), "name"),
- getComboContent());
- }
- }
-
- /**
- * This scenario tests a simple SWT combo with a set item list where the
- * selection is bouded to a String property
- */
- // public void test_ROCombo_Scenario01() {
- //
- // // Read-Only Combo will not change its text property on a call to
- // // setText()
- //
- // String[] items = new String[] { "FairyLand", "TuneLand", "NoWereLand",
- // "TinkerLand", "DreamLand" };
- // combo.setItems(items);
- // Account account = catalog.getAccounts()[0];
- //
- // // simple Combo's selection bound to the Account's country property
- // getDbc().bind(new Property(combo, SWTProperties.SELECTION),
- // new Property(account, "country"), null);
- //
- // // Drive the combo selection
- // int index = 3;
- // combo.setText(items[index]); // this should drive the selection
- // assertEquals(account.getCountry(), items[index]);
- //
- // // Set the country, and ensure selection is set property
- // index = 1;
- // account.setCountry(items[index]);
- // assertEquals(index, combo.getSelectionIndex());
- // assertEquals(combo.getText(), items[index]);
- //
- // index = combo.getSelectionIndex();
- // String txt = combo.getText();
- // // Set the country to something that is not in the Combo's list
- // account.setCountry("FooBar");
- // // Combo's selection will not Change
- // assertEquals(combo.getSelectionIndex(), index);
- // assertEquals(combo.getText(), txt);
- //
- // }
- /**
- * This scenario tests a simple SWT combo that is bound to a list of Country
- * objects. The Country object's name property is listed in the Combo.
- *
- * The Combo's selection is bounded to the Country property of an Account.
- */
- // public void test_ROCombo_Scenario02_SWTCombo() {
- //
- // // Create a list of Strings for the countries
- // IObservableList list = new WritableList();
- // for (int i = 0; i < catalog.getAccounts().length; i++)
- // list.add(catalog.getAccounts()[i].getCountry());
- //
- // // Bind the combo's content to that of the String based list
- // getDbc().bind(combo, list, null);
- // assertEquals(Arrays.asList(combo.getItems()), list);
- //
- // Account account = catalog.getAccounts()[0];
- //
- // // simple Combo's selection bound to the Account's country property
- // getDbc().bind(new Property(combo, SWTProperties.SELECTION),
- // new Property(account, "country"), null);
- //
- // // Drive the combo selection
- // String selection = (String) list.get(2);
- // combo.setText(selection); // this should drive the selection
- // assertEquals(account.getCountry(), selection);
- //
- // }
- /**
- * This scenario tests a simple SWT combo that is bound to a list of Country
- * objects. The Country object's name property is listed in the Combo.
- *
- * The Combo's selection is bounded to the Country property of an Account.
- */
- // public void test_ROCombo_Scenario02_ComboViewer() {
- //
- // // Account label provider will fill the combo with the country
- // cviewer.setLabelProvider(accountLabelProvider);
- // // Bind the ComboViewer's content to the available accounts
- // getDbc().bind(
- // cviewer,
- // new ListModelDescription(new Property(catalog, "accounts"),
- // "country"), null);
- //
- // // Ensure that cv's content now has the catalog's accounts
- // assertArrayEquals(catalog.getAccounts(), getViewerContent(cviewer)
- // .toArray());
- // // Ensure that the cv's labels are the same as the account countries
- // assertEquals(getColumn(catalog.getAccounts(), "country"),
- // getComboContent());
- //
- // Account account = SampleData.FACTORY.createAccount();
- //
- // // Use the Viewers visual Combo (Strings) to set the account's country
- // getDbc().bind(new Property(combo, SWTProperties.SELECTION),
- // new Property(account, "country"), null);
- //
- // // Change the selection of the ComboViewer to all possible accounts, and
- // // verify that the account's Country is being changed correctly.
- // for (int i = 0; i < catalog.getAccounts().length; i++) {
- // Account selection = catalog.getAccounts()[i];
- // cviewer.setSelection(new StructuredSelection(selection));
- // assertEquals(selection.getCountry(), account.getCountry());
- // }
- //
- // }
- /**
- * This test ensure that multiple combos can be bound to the same deomain
- * model
- */
- public void test_ROCombo_multipleBindings() {
- Adventure skiAdventure = SampleData.WINTER_HOLIDAY; // for selection
-
- // Bind the ComboViewer's content to the available lodging
- IObservableList lodgings = BeansObservables.observeList(Realm
- .getDefault(), catalog, "lodgings");
- ObservableListContentProvider contentProvider = new ObservableListContentProvider();
-
- IObservableMap[] attributeMaps = BeansObservables.observeMaps(
- contentProvider.getKnownElements(), Lodging.class,
- new String[] { "name" });
-
- cviewer.setContentProvider(contentProvider);
- cviewer.setLabelProvider(new ObservableMapLabelProvider(attributeMaps));
- cviewer.setInput(lodgings);
-
- // Ensure that cv's content now has the catalog's lodgings
- assertArrayEquals(catalog.getLodgings(), getViewerContent(cviewer)
- .toArray());
-
- // Ensure that the cv's labels are the same as the lodging descriptions
- assertEquals(getColumn(catalog.getLodgings(), "name"),
- getComboContent());
-
- ComboViewer otherViewer = new ComboViewer(getComposite(), SWT.NONE);
- lodgings = BeansObservables.observeList(Realm.getDefault(), catalog,
- "lodgings");
- contentProvider = new ObservableListContentProvider();
-
- attributeMaps = BeansObservables.observeMaps(contentProvider
- .getKnownElements(), Lodging.class, new String[] { "name" });
-
- otherViewer.setContentProvider(contentProvider);
- otherViewer.setLabelProvider(new ObservableMapLabelProvider(
- attributeMaps));
- otherViewer.setInput(lodgings);
-
- // Ensure that cv's content now has the catalog's lodgings
- assertArrayEquals(catalog.getLodgings(), getViewerContent(otherViewer)
- .toArray());
-
- // Bind both selections to the same thing
- IObservableValue selection = ViewersObservables
- .observeSingleSelection(cviewer);
- getDbc().bindValue(selection,
- BeansObservables.observeValue(skiAdventure, "defaultLodging"),
- null);
-
- IObservableValue otherSelection = ViewersObservables
- .observeSingleSelection(otherViewer);
- getDbc().bindValue(otherSelection,
- BeansObservables.observeValue(skiAdventure, "defaultLodging"),
- null);
-
- Lodging lodging = catalog.getLodgings()[0];
-
- // Ensure that setting the selection is driven forward to the other
- // combo
- cviewer.setSelection(new StructuredSelection(lodging));
- assertEquals(((IStructuredSelection) cviewer.getSelection())
- .getFirstElement(), ((IStructuredSelection) otherViewer
- .getSelection()).getFirstElement());
-
- // Change the list of one combo, and ensure it updates the other combo
- catalog.removeLodging(lodging);
- assertEquals(getViewerContent(cviewer), getViewerContent(otherViewer));
-
- }
-
- /**
- * This scenario tests a simple SWT CCombo that is bound to a list of
- * Country objects. The Country object's name property is listed in the
- * Combo.
- *
- * The Combo's selection is bounded to the Country property of an Account.
- */
- public void test_ROCombo_SWTCCombo() {
-
- // Create a list of Strings for the countries
- IObservableList list = new WritableList();
- for (int i = 0; i < catalog.getAccounts().length; i++)
- list.add(catalog.getAccounts()[i].getCountry());
-
- CCombo ccombo = new CCombo(getComposite(), SWT.READ_ONLY
- | SWT.DROP_DOWN);
-
- // Bind the combo's content to that of the String based list
- getDbc().bindList(SWTObservables.observeItems(ccombo), list, null);
- assertEquals(Arrays.asList(ccombo.getItems()), list);
-
- Account account = catalog.getAccounts()[0];
-
- // simple Combo's selection bound to the Account's country property
- IObservableValue comboSelection = SWTObservables.observeSelection(ccombo);
- getDbc().bindValue(comboSelection,
- BeansObservables.observeValue(account, "country"), null);
-
- // Drive the combo selection
- String selection = (String) list.get(2);
- ccombo.setText(selection); // this should drive the selection
- assertEquals(account.getCountry(), selection);
-
- }
-
- /**
- * This scenario tests a simple SWT CCombo that is bound to a list of
- * Country objects. The Country object's name property is listed in the
- * Combo.
- *
- * The Combo's selection is bounded to the Country property of an Account.
- */
- public void test_WCombo_SWTCCombo() {
-
- // Create a list of Strings for the countries
- IObservableList list = new WritableList();
- for (int i = 0; i < catalog.getAccounts().length; i++)
- list.add(catalog.getAccounts()[i].getCountry());
-
- CCombo ccombo = new CCombo(getComposite(), SWT.READ_ONLY
- | SWT.DROP_DOWN);
-
- // Bind the combo's content to that of the String based list
- getDbc().bindList(SWTObservables.observeItems(ccombo), list, null);
- assertEquals(Arrays.asList(ccombo.getItems()), list);
-
- Account account = catalog.getAccounts()[0];
-
- // simple Combo's selection bound to the Account's country property
- IObservableValue comboSelection = SWTObservables.observeSelection(ccombo);
- getDbc().bindValue(comboSelection,
- BeansObservables.observeValue(account, "country"), null);
-
- // Drive the combo selection
- String selection = (String) list.get(2);
- ccombo.setText(selection); // this should drive the selection
- assertEquals(account.getCountry(), selection);
-
- selection = (String) list.get(1);
- account.setCountry(selection);
- assertEquals(selection, ccombo.getItem(ccombo.getSelectionIndex()));
- assertEquals(selection, ccombo.getText());
-
- selection = "country not in list";
- account.setCountry(selection);
- assertEquals(-1, ccombo.getSelectionIndex());
- assertEquals(selection, ccombo.getText());
- }
-
- /**
- * This scenario tests a simple SWT CCombo that is bound to a list of
- * Country objects. The Country object's name property is listed in the
- * Combo.
- *
- * The Combo's selection is bounded to the Country property of an Account.
- */
- public void test_ROCombo_SWTList() {
-
- // Create a list of Strings for the countries
- IObservableList list = new WritableList();
- for (int i = 0; i < catalog.getAccounts().length; i++)
- list.add(catalog.getAccounts()[i].getCountry());
-
- org.eclipse.swt.widgets.List swtlist = new org.eclipse.swt.widgets.List(
- getComposite(), SWT.READ_ONLY | SWT.SINGLE);
-
- // Bind the combo's content to that of the String based list
- getDbc().bindList(SWTObservables.observeItems(swtlist), list, null);
- assertEquals(Arrays.asList(swtlist.getItems()), list);
-
- Account account = catalog.getAccounts()[0];
-
- // simple Combo's selection bound to the Account's country property
- IObservableValue listSelection = SWTObservables.observeSelection(swtlist);
- getDbc().bindValue(listSelection,
- BeansObservables.observeValue(account, "country"), null);
-
- String selection = (String) list.get(2);
- swtlist.select(2); // this should drive the selection
- swtlist.notifyListeners(SWT.Selection, null); // Force notification
- assertEquals(account.getCountry(), selection);
-
- }
-
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ComboUpdatingTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ComboUpdatingTest.java
deleted file mode 100644
index 577bff8f..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ComboUpdatingTest.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920
- ******************************************************************************/
-
-package org.eclipse.jface.tests.databinding.scenarios;
-
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyChangeSupport;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.databinding.beans.BeansObservables;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.list.WritableList;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.jface.tests.databinding.BindingTestSuite;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Combo;
-
-/**
- * @since 3.2
- */
-public class ComboUpdatingTest extends ScenariosTestCase {
-
- private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(
- this);
-
- public void addPropertyChangeListener(PropertyChangeListener listener) {
- propertyChangeSupport.addPropertyChangeListener(listener);
- }
-
- public void addPropertyChangeListener(String propertyName,
- PropertyChangeListener listener) {
- propertyChangeSupport.addPropertyChangeListener(propertyName, listener);
- }
-
- public void removePropertyChangeListener(PropertyChangeListener listener) {
- propertyChangeSupport.removePropertyChangeListener(listener);
- }
-
- public void removePropertyChangeListener(String propertyName,
- PropertyChangeListener listener) {
- propertyChangeSupport.removePropertyChangeListener(propertyName,
- listener);
- }
-
- protected void firePropertyChange(String propertyName, Object oldValue,
- Object newValue) {
- propertyChangeSupport.firePropertyChange(propertyName, oldValue,
- newValue);
- }
-
-
- private Combo comboEditable;
- //private Combo comboReadOnly;
-
- private static final String PROP_TEXT = "text";
- private String text = "Hello, world";
-
- public String getText() {
- return text;
- }
-
- public void setText(String text) {
- this.text = text;
- }
-
- private static final String PROP_CHOICES = "choices";
- private List choices = new ArrayList();
- {
- choices.add("Banana");
- choices.add("Apple");
- choices.add("Mango");
- }
-
- public List getChoices() {
- return choices;
- }
-
- public void setChoices(List choices) {
- this.choices = choices;
- firePropertyChange(PROP_CHOICES, null, null);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- getComposite().setLayout(new FillLayout());
- comboEditable = new Combo(getComposite(), SWT.DROP_DOWN);
-// comboReadOnly = new Combo(getComposite(), SWT.DROP_DOWN | SWT.READ_ONLY);
- }
-
- //-------------------------------------------------------------------------
-
- private static final String NEXT = "Next";
- public void testBindText() throws Exception {
- getDbc().bindValue(SWTObservables.observeText(comboEditable), BeansObservables.observeValue(this, "text"), null);
- spinEventLoop(0);
- assertEquals("Should find value of text", text, comboEditable.getText());
- comboEditable.setText(NEXT);
- spinEventLoop(0);
- assertEquals("Should find new value in text", NEXT, text);
- }
-
- public void testBindItems_listHasSameItems_editable() throws Exception {
- if (BindingTestSuite.failingTestsDisabled(this)) {
- return;
- }
- text = "Apple";
-
- getDbc().bindValue(SWTObservables.observeText(comboEditable), BeansObservables.observeValue(this, PROP_TEXT), null);
-
- spinEventLoop(0);
- assertEquals("Should find value of text", text, comboEditable.getText());
-
- IObservableList list = new WritableList(getChoices(), null);
- getDbc().bindList(SWTObservables.observeItems(comboEditable), list, null);
-
- spinEventLoop(0);
- int position = 0;
- for (Iterator choicesIter = choices.iterator(); choicesIter.hasNext();) {
- String element = (String) choicesIter.next();
- assertEquals(element, comboEditable.getItem(position));
- ++position;
- }
-// assertEquals("Should find value of text", "Apple", text);
- assertEquals("Should find value of combo.getText()", "", comboEditable.getText());
- comboEditable.setText("Banana");
- spinEventLoop(0);
- assertEquals("Should find value of text", "Banana", text);
- }
-
-// public void testBindItems_listHasSameItems_readOnly() throws Exception {
-// text = "Apple";
-// ComboObservableValue value = (ComboObservableValue) getDbc().createObservable(new Property(comboReadOnly, PROP_TEXT));
-// getDbc().bind(value.getItems(), new Property(this, PROP_CHOICES), null);
-//// getDbc().bind(combo, new Property(this, PROP_CHOICES, String.class, Boolean.TRUE), null);
-// spinEventLoop(0);
-// assertEquals("Should find value of text", "Apple", text);
-// getDbc().bind(value, new Property(this, PROP_TEXT), null);
-// spinEventLoop(0);
-// assertEquals("Should find value of text", "Apple", text);
-// assertEquals("Should find value of combo.getText()", "Apple", comboReadOnly.getText());
-// int position = 0;
-// for (Iterator choicesIter = choices.iterator(); choicesIter.hasNext();) {
-// String element = (String) choicesIter.next();
-// assertEquals(element, comboReadOnly.getItem(position));
-// ++position;
-// }
-// assertEquals("Should find value of text", "Apple", text);
-// assertEquals("Should find value of combo.getText()", "Apple", comboReadOnly.getText());
-// comboReadOnly.setText("Banana");
-// spinEventLoop(0);
-// assertEquals("Should find value of text", "Banana", text);
-// }
-
- public void testBindItems_listHasDifferentItems_editable() throws Exception {
- if (BindingTestSuite.failingTestsDisabled(this)) {
- return;
- }
-
- getDbc().bindValue(SWTObservables.observeText(comboEditable), BeansObservables.observeValue(this, PROP_TEXT), null);
-
- spinEventLoop(0);
- assertEquals("Should find value of text", text, comboEditable.getText());
-
- IObservableList list = new WritableList(new ArrayList(), String.class);
- list.addAll(getChoices());
- getDbc().bindList(SWTObservables.observeItems(comboEditable), list, null);
-
- spinEventLoop(0);
- int position = 0;
- for (Iterator choicesIter = choices.iterator(); choicesIter.hasNext();) {
- String element = (String) choicesIter.next();
- assertEquals(element, comboEditable.getItem(position));
- ++position;
- }
-// assertEquals("Should find value of text", "Hello, world", text);
- assertEquals("Should find value of combo.getText()", "", comboEditable.getText());
- comboEditable.setText("Banana");
- spinEventLoop(0);
- assertEquals("Should find value of text", "Banana", text);
- }
-
-// public void testBindItems_listHasDifferentItems_readOnly() throws Exception {
-// ComboObservableValue value = (ComboObservableValue) getDbc().createObservable(new Property(comboReadOnly, PROP_TEXT));
-// getDbc().bind(value, new Property(this, PROP_TEXT), null);
-// spinEventLoop(0);
-// getDbc().bind(value.getItems(), new Property(this, PROP_CHOICES), null);
-//// getDbc().bind(combo, new Property(this, PROP_CHOICES, String.class, Boolean.TRUE), null);
-// spinEventLoop(0);
-// int position = 0;
-// for (Iterator choicesIter = choices.iterator(); choicesIter.hasNext();) {
-// String element = (String) choicesIter.next();
-// assertEquals(element, comboReadOnly.getItem(position));
-// ++position;
-// }
-//// assertEquals("Should find value of text", "Hello, world", text);
-// assertEquals("Should find value of combo.getText()", "", comboReadOnly.getText());
-// comboReadOnly.setText("Banana");
-// spinEventLoop(0);
-// assertEquals("Should find value of text", "Banana", text);
-// }
-
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ComboViewerScenario.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ComboViewerScenario.java
deleted file mode 100644
index daa5ca0c..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ComboViewerScenario.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920
- * Brad Reynolds - bug 160000
- *******************************************************************************/
-package org.eclipse.jface.tests.databinding.scenarios;
-
-import org.eclipse.core.databinding.beans.BeansObservables;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.map.IObservableMap;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.jface.databinding.viewers.ObservableListContentProvider;
-import org.eclipse.jface.databinding.viewers.ObservableMapLabelProvider;
-import org.eclipse.jface.databinding.viewers.ViewersObservables;
-import org.eclipse.jface.examples.databinding.model.Adventure;
-import org.eclipse.jface.examples.databinding.model.Catalog;
-import org.eclipse.jface.examples.databinding.model.Lodging;
-import org.eclipse.jface.examples.databinding.model.SampleData;
-import org.eclipse.jface.viewers.ComboViewer;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Combo;
-
-/**
- * To run the tests in this class, right-click and select "Run As JUnit Plug-in
- * Test". This will also start an Eclipse instance. To clean up the launch
- * configuration, open up its "Main" tab and select "[No Application] - Headless
- * Mode" as the application to run.
- */
-
-public class ComboViewerScenario extends ScenariosTestCase {
-
- private Catalog catalog;
-
- private Combo combo;
-
- private ComboViewer comboViewer;
-
- protected void setUp() throws Exception {
- super.setUp();
- // do any setup work here
- combo = new Combo(getComposite(), SWT.READ_ONLY | SWT.DROP_DOWN);
- comboViewer = new ComboViewer(combo);
- catalog = SampleData.CATALOG_2005; // Lodging source
- }
-
- protected void tearDown() throws Exception {
- combo.dispose();
- combo = null;
- comboViewer = null;
- super.tearDown();
- }
-
- public void testScenario01() {
- // Bind the catalog's lodgings to the combo
- IObservableList lodgings = BeansObservables.observeList(realm, catalog,
- "lodgings");
- ObservableListContentProvider contentProvider = new ObservableListContentProvider();
-
- IObservableMap attributeMap = BeansObservables.observeMap(
- contentProvider.getKnownElements(), Lodging.class, "name");
- comboViewer.setLabelProvider(new ObservableMapLabelProvider(
- attributeMap));
- comboViewer.setContentProvider(contentProvider);
- comboViewer.setInput(lodgings);
-
- // Verify that the combo's items are the lodgings
- for (int i = 0; i < catalog.getLodgings().length; i++) {
- assertEquals(catalog.getLodgings()[i], comboViewer.getElementAt(i));
- }
- // Verify that the String being shown in the combo viewer is the
- // "toString" of the combo viewer
- String[] lodgingStrings = new String[catalog.getLodgings().length];
- for (int i = 0; i < catalog.getLodgings().length; i++) {
- lodgingStrings[i] = catalog.getLodgings()[i].getName();
- }
- assertArrayEquals(lodgingStrings, combo.getItems());
-
- // Verify that the combo has no selected item
- assertEquals(null, ((IStructuredSelection) comboViewer.getSelection())
- .getFirstElement());
-
- // Now bind the selection of the combo to the "defaultLodging" property
- // of an adventure
- final Adventure adventure = SampleData.WINTER_HOLIDAY;
- IObservableValue selection = ViewersObservables
- .observeSingleSelection(comboViewer);
- getDbc().bindValue(selection,
- BeansObservables.observeValue(adventure, "defaultLodging"),
- null);
-
- // Verify that the combo selection is the default lodging
- assertEquals(((IStructuredSelection) comboViewer.getSelection())
- .getFirstElement(), adventure.getDefaultLodging());
-
- // Change the model and verify that the combo selection changes
- adventure.setDefaultLodging(SampleData.CAMP_GROUND);
- assertEquals(adventure.getDefaultLodging(), SampleData.CAMP_GROUND);
- assertEquals(((IStructuredSelection) comboViewer.getSelection())
- .getFirstElement(), adventure.getDefaultLodging());
-
- // Change the combo selection and verify that the model changes
- comboViewer.getCombo().select(3);
- assertEquals(((IStructuredSelection) comboViewer.getSelection())
- .getFirstElement(), adventure.getDefaultLodging());
-
- adventure.setDefaultLodging(SampleData.YOUTH_HOSTEL);
- spinEventLoop(0);
- assertEquals(((IStructuredSelection) comboViewer.getSelection())
- .getFirstElement(), adventure.getDefaultLodging());
- }
-
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/CustomBeanBindSpec.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/CustomBeanBindSpec.java
deleted file mode 100644
index a4ab92d1..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/CustomBeanBindSpec.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920, 159768
- *******************************************************************************/
-// TODO djo: copyright
-package org.eclipse.jface.tests.databinding.scenarios;
-
-import java.lang.reflect.Method;
-
-import org.eclipse.core.databinding.BindingEvent;
-import org.eclipse.core.databinding.DefaultBindSpec;
-import org.eclipse.core.databinding.conversion.IConverter;
-import org.eclipse.core.databinding.validation.IValidator;
-
-/**
- * A BindSpec that will automatically grab validators from an object's
- * properties, if a get&lt;PropertyName>Validator method is defined. Makes it
- * easy to associate validators with the properties that they are responsible
- * for validating.
- *
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
- * part of a work in progress. There is no guarantee that this API will remain
- * unchanged during the 3.2 release cycle. Please do not use this API without
- * consulting with the Platform/UI team.
- *
- * @since 3.2
- */
-public class CustomBeanBindSpec extends DefaultBindSpec {
-
- public IConverter createConverter(Object fromType, Object toType) {
- if (fromType instanceof CustomBeanModelType) {
- CustomBeanModelType customBeanModelType = (CustomBeanModelType) fromType;
- fromType = customBeanModelType.getType();
- }
- if (toType instanceof CustomBeanModelType) {
- CustomBeanModelType customBeanModelType = (CustomBeanModelType) toType;
- toType = customBeanModelType.getType();
- }
- return super.createConverter(fromType, toType);
- }
-
- protected IValidator createValidator(int pipelinePosition, Object modelType) {
- if (modelType instanceof CustomBeanModelType && pipelinePosition == BindingEvent.PIPELINE_BEFORE_CHANGE) {
- CustomBeanModelType property = (CustomBeanModelType) modelType;
- String propertyName = property.getPropertyName();
- String getValidatorMethodName = "get" + upperCaseFirstLetter(propertyName) + "Validator"; //$NON-NLS-1$ //$NON-NLS-2$
-
- Class objectClass = property.getObject().getClass();
-
- Method getValidator;
- try {
- getValidator = objectClass.getMethod(getValidatorMethodName,
- new Class[] { Class.class });
- } catch (Exception e) {
- return null;
- }
-
- try {
- IValidator result = (IValidator) getValidator.invoke(property
- .getObject(), new Object[0]);
- return result;
- } catch (Exception e) {
- return null;
- }
- }
- return super.createValidator(pipelinePosition, modelType);
- }
-
- private String upperCaseFirstLetter(String name) {
- String result = name.substring(0, 1).toUpperCase() + name.substring(1);
- return result;
- }
-
- public Boolean isAssignableFromTo(Object fromType, Object toType) {
- if (fromType instanceof CustomBeanModelType) {
- fromType = ((CustomBeanModelType) fromType).getType();
- }
- if (toType instanceof CustomBeanModelType) {
- toType = ((CustomBeanModelType) toType).getType();
- }
- return super.isAssignableFromTo(fromType, toType);
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/CustomBeanModelType.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/CustomBeanModelType.java
deleted file mode 100644
index f8af8534..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/CustomBeanModelType.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.databinding.scenarios;
-
-/**
- * @since 3.2
- *
- */
-public class CustomBeanModelType {
-
- private String propertyName;
-
- private Object object;
-
- private Class type;
-
- /**
- * @param object
- * @param propertyName
- * @param type
- */
- public CustomBeanModelType(Object object, String propertyName, Class type) {
- this.object = object;
- this.propertyName = propertyName;
- this.type = type;
- }
-
- /**
- * @return
- */
- public String getPropertyName() {
- return propertyName;
- }
-
- /**
- * @return
- */
- public Object getObject() {
- return object;
- }
-
- /**
- * @return
- */
- public Class getType() {
- return type;
- }
-
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/CustomConverterScenarios.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/CustomConverterScenarios.java
deleted file mode 100644
index f64fef22..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/CustomConverterScenarios.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920
- *******************************************************************************/
-package org.eclipse.jface.tests.databinding.scenarios;
-
-import org.eclipse.core.databinding.DataBindingContext;
-import org.eclipse.core.databinding.beans.BeansObservables;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.jface.examples.databinding.model.Adventure;
-import org.eclipse.jface.examples.databinding.model.PriceModelObject;
-import org.eclipse.jface.examples.databinding.model.SampleData;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Spinner;
-
-/**
- * To run the tests in this class, right-click and select "Run As JUnit Plug-in
- * Test". This will also start an Eclipse instance. To clean up the launch
- * configuration, open up its "Main" tab and select "[No Application] - Headless
- * Mode" as the application to run.
- */
-
-public class CustomConverterScenarios extends ScenariosTestCase {
-
- private Adventure skiTrip;
-
- protected void setUp() throws Exception {
- super.setUp();
- skiTrip = SampleData.WINTER_HOLIDAY;
- }
-
- protected void tearDown() throws Exception {
- // do any teardown work here
- super.tearDown();
- }
-
- public void testScenario01() {
- DataBindingContext dbc = getDbc();
- Spinner spinner_dollars = new Spinner(getComposite(), SWT.NONE);
- spinner_dollars.setMaximum(10000);
- Spinner spinner_cents = new Spinner(getComposite(), SWT.NONE);
-
- // The price object is a double which contains both the dollars and
- // cents
- // To allow this to be worked on with two separate spinner controls
- // (which get and set int values)
- // an intermediate object is used
- PriceModelObject priceModel = new PriceModelObject();
-
- dbc.bindValue(BeansObservables.observeValue(priceModel, "price"), BeansObservables.observeValue(skiTrip,
- "price"), null);
-
- dbc.bindValue(SWTObservables.observeSelection(spinner_dollars),
- BeansObservables.observeValue(priceModel, "dollars"),
- null);
-
- dbc.bindValue(SWTObservables.observeSelection(spinner_cents),
- BeansObservables.observeValue(priceModel, "cents"),
- null);
-
- // spinEventLoop(1);
- // Make sure that the selection on the spinner_dollars matches the
- // dollars of the price
- assertEquals(spinner_dollars.getSelection(), new Double(skiTrip.getPrice()).intValue());
- // Make sure that the selection on the spinner_cents matches the dollars
- // of the price
- Double doublePrice = new Double(skiTrip.getPrice());
- double cents = 100 * doublePrice.doubleValue() - 100 * doublePrice.intValue();
- assertEquals(spinner_cents.getSelection(), (int) cents);
-
- // Change the selection on the spinner_dollars to be $50 and make sure
- // the model is updated with the cents included
- spinner_dollars.setSelection(50);
- double expectedPrice = 50 + cents / 100;
- assertEquals(expectedPrice, skiTrip.getPrice(), 0.01);
-
- // Change the selection on the spinner_cents to be 27 and make sure the
- // model is updated with the dollars included
- spinner_cents.setSelection(27);
- assertEquals(50.27, skiTrip.getPrice(), 0.01);
-
- // Change the model to be $60.99 dollars and make sure the
- // spinner_dollars is 60 and spinner_cents is 99
- skiTrip.setPrice(60.99);
- assertEquals(60, spinner_dollars.getSelection());
- assertEquals(99, spinner_cents.getSelection());
-
- }
-
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/CustomScenarios.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/CustomScenarios.java
deleted file mode 100644
index e0960c92..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/CustomScenarios.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920
- *******************************************************************************/
-package org.eclipse.jface.tests.databinding.scenarios;
-
-import org.eclipse.core.databinding.beans.BeansObservables;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.jface.examples.databinding.model.Adventure;
-import org.eclipse.jface.examples.databinding.model.AggregateObservableValue;
-import org.eclipse.jface.examples.databinding.model.SampleData;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * To run the tests in this class, right-click and select "Run As JUnit Plug-in
- * Test". This will also start an Eclipse instance. To clean up the launch
- * configuration, open up its "Main" tab and select "[No Application] - Headless
- * Mode" as the application to run.
- */
-
-public class CustomScenarios extends ScenariosTestCase {
-
- protected void setUp() throws Exception {
- super.setUp();
- // do any setup work here
- }
-
- protected void tearDown() throws Exception {
- // do any teardown work here
- super.tearDown();
- }
-
- public void testScenario01() {
-
- // Binding the name property of an Adventure object to the contents of
- // Text controls, no conversion, no validation.
-
- Adventure adventure = SampleData.WINTER_HOLIDAY;
- Text text = new Text(getComposite(), SWT.BORDER);
-
- IObservableValue descriptionObservable = BeansObservables.observeValue(adventure, "description");
- IObservableValue nameObservable = BeansObservables.observeValue(adventure, "name");
- AggregateObservableValue customObservable_comma = new AggregateObservableValue(new IObservableValue[] {
- descriptionObservable, nameObservable }, ",");
-
- getDbc().bindValue(SWTObservables.observeText(text, SWT.Modify), customObservable_comma, null);
- // spinEventLoop(1);
- // Make sure that the description on the model match the widget
- assertEquals(adventure.getDescription() + "," + adventure.getName(), text.getText());
-
- // Change the widget to newDescription,newName and ensure the model is
- // updated
- text.setText("newDescription,newName");
- assertEquals("newDescription", adventure.getDescription());
- assertEquals("newName", adventure.getName());
-
- // Change the model to newDescription_0 and newName_0 and ensure the GUI
- // is updated
- adventure.setDescription("newDescription_0");
- adventure.setName("newName_0");
- assertEquals("newDescription_0,newName_0", text.getText());
-
- // Change text to newDescription_1 with no comma and ensure the model is
- // updated correctly with no name
- text.setText("newDescription_1");
- assertEquals("newDescription_1", adventure.getDescription());
- assertEquals(null, adventure.getName());
-
- // Change text to newName with a preceeding comma and ensure the model
- // is updated correctly with no description
- // TODO - Get this test working + Add the one where we have two
- // aggregates and update one and
- // check that the other is updated - currently this fails on the GUI -
- // JRW
- // text.setText(",newName_1");
- // assertEquals(null, adventure.getDescription());
- // assertEquals("newName_1", adventure.getName());
-
- }
-
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/LabelControlScenario.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/LabelControlScenario.java
deleted file mode 100644
index 3300076f..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/LabelControlScenario.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920
- *******************************************************************************/
-package org.eclipse.jface.tests.databinding.scenarios;
-
-import org.eclipse.core.databinding.beans.BeansObservables;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.jface.examples.databinding.model.Adventure;
-import org.eclipse.jface.examples.databinding.model.SampleData;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Label;
-
-/**
- * To run the tests in this class, right-click and select "Run As JUnit Plug-in
- * Test". This will also start an Eclipse instance. To clean up the launch
- * configuration, open up its "Main" tab and select "[No Application] - Headless
- * Mode" as the application to run.
- */
-
-public class LabelControlScenario extends ScenariosTestCase {
-
- private Adventure adventure;
-
- private Label label;
-
- protected void setUp() throws Exception {
- super.setUp();
- // do any setup work here
- label = new Label(getComposite(), SWT.NONE);
- adventure = SampleData.WINTER_HOLIDAY;
- }
-
- protected void tearDown() throws Exception {
- // do any teardown work here
- super.tearDown();
- label.dispose();
- label = null;
- }
-
- public void testScenario01() {
- // Bind the adventure "name" property to a label control
- // Change the UI and verify the model and UI are the same value
- // Change the model and verify the UI changes
- getDbc().bindValue(SWTObservables.observeText(label), BeansObservables.observeValue(adventure, "name"), null);
-
- assertEquals(adventure.getName(), label.getText());
- adventure.setName("France");
- assertEquals("France", label.getText());
- adventure.setName("Climb Everest");
- spinEventLoop(0);
- assertEquals("Climb Everest", label.getText());
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ListViewerScenario.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ListViewerScenario.java
deleted file mode 100644
index 06fbc335..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ListViewerScenario.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920
- * Brad Reynolds - bug 160000
- *******************************************************************************/
-package org.eclipse.jface.tests.databinding.scenarios;
-
-import org.eclipse.core.databinding.beans.BeansObservables;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.map.IObservableMap;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.jface.databinding.viewers.ObservableListContentProvider;
-import org.eclipse.jface.databinding.viewers.ObservableMapLabelProvider;
-import org.eclipse.jface.databinding.viewers.ViewersObservables;
-import org.eclipse.jface.examples.databinding.model.Adventure;
-import org.eclipse.jface.examples.databinding.model.Catalog;
-import org.eclipse.jface.examples.databinding.model.Lodging;
-import org.eclipse.jface.examples.databinding.model.SampleData;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ListViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.List;
-
-/**
- * To run the tests in this class, right-click and select "Run As JUnit Plug-in
- * Test". This will also start an Eclipse instance. To clean up the launch
- * configuration, open up its "Main" tab and select "[No Application] - Headless
- * Mode" as the application to run.
- */
-
-public class ListViewerScenario extends ScenariosTestCase {
-
- private Catalog catalog;
-
- private List list;
-
- private ListViewer listViewer;
-
- protected void setUp() throws Exception {
- super.setUp();
- // do any setup work here
- list = new List(getComposite(), SWT.READ_ONLY | SWT.SINGLE);
- listViewer = new ListViewer(list);
- catalog = SampleData.CATALOG_2005; // Lodging source
- }
-
- protected void tearDown() throws Exception {
- list.dispose();
- list = null;
- listViewer = null;
- super.tearDown();
- }
-
- public void testScenario01() {
- // Bind the catalog's lodgings to the combo
- IObservableList lodgings = BeansObservables.observeList(Realm
- .getDefault(), catalog, "lodgings");
- ObservableListContentProvider contentProvider = new ObservableListContentProvider();
-
- IObservableMap[] attributeMaps = BeansObservables.observeMaps(
- contentProvider.getKnownElements(), Lodging.class,
- new String[] { "name" });
- listViewer.setContentProvider(contentProvider);
- listViewer.setLabelProvider(new ObservableMapLabelProvider(
- attributeMaps));
- listViewer.setInput(lodgings);
-
- // Verify that the combo's items are the lodgings
- for (int i = 0; i < catalog.getLodgings().length; i++) {
- assertEquals(catalog.getLodgings()[i], listViewer.getElementAt(i));
- }
- // Verify that the String being shown in the list viewer is the
- // "toString" of the combo viewer
- String[] lodgingStrings = new String[catalog.getLodgings().length];
- for (int i = 0; i < catalog.getLodgings().length; i++) {
- lodgingStrings[i] = catalog.getLodgings()[i].getName();
- }
- assertArrayEquals(lodgingStrings, list.getItems());
-
- // Verify that the list has no selected item
- assertEquals(null, ((IStructuredSelection) listViewer.getSelection())
- .getFirstElement());
-
- // Now bind the selection of the combo to the "defaultLodging" property
- // of an adventure
- final Adventure adventure = SampleData.WINTER_HOLIDAY;
-
- IObservableValue selection = ViewersObservables
- .observeSingleSelection(listViewer);
- getDbc().bindValue(selection,
- BeansObservables.observeValue(adventure, "defaultLodging"),
- null);
-
- // Verify that the list selection is the default lodging
- assertEquals(((IStructuredSelection) listViewer.getSelection())
- .getFirstElement(), adventure.getDefaultLodging());
-
- // Change the model and verify that the list selection changes
- adventure.setDefaultLodging(SampleData.CAMP_GROUND);
- assertEquals(adventure.getDefaultLodging(), SampleData.CAMP_GROUND);
- assertEquals(((IStructuredSelection) listViewer.getSelection())
- .getFirstElement(), adventure.getDefaultLodging());
-
- // Change the list selection and verify that the model changes
- listViewer.getList().select(3);
- assertEquals(((IStructuredSelection) listViewer.getSelection())
- .getFirstElement(), adventure.getDefaultLodging());
-
- adventure.setDefaultLodging(SampleData.YOUTH_HOSTEL);
- spinEventLoop(0);
- assertEquals(((IStructuredSelection) listViewer.getSelection())
- .getFirstElement(), adventure.getDefaultLodging());
-
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/MasterDetailScenarios.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/MasterDetailScenarios.java
deleted file mode 100644
index e0809245..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/MasterDetailScenarios.java
+++ /dev/null
@@ -1,371 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 160000
- *******************************************************************************/
-package org.eclipse.jface.tests.databinding.scenarios;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.databinding.beans.BeansObservables;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.map.IObservableMap;
-import org.eclipse.core.databinding.observable.masterdetail.MasterDetailObservables;
-import org.eclipse.core.databinding.observable.value.ComputedValue;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.jface.databinding.viewers.ObservableListContentProvider;
-import org.eclipse.jface.databinding.viewers.ObservableMapLabelProvider;
-import org.eclipse.jface.databinding.viewers.ViewersObservables;
-import org.eclipse.jface.examples.databinding.model.Adventure;
-import org.eclipse.jface.examples.databinding.model.Catalog;
-import org.eclipse.jface.examples.databinding.model.Category;
-import org.eclipse.jface.examples.databinding.model.Lodging;
-import org.eclipse.jface.examples.databinding.model.SampleData;
-import org.eclipse.jface.viewers.ContentViewer;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ListViewer;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * To run the tests in this class, right-click and select "Run As JUnit Plug-in
- * Test". This will also start an Eclipse instance. To clean up the launch
- * configuration, open up its "Main" tab and select "[No Application] - Headless
- * Mode" as the application to run.
- */
-
-public class MasterDetailScenarios extends ScenariosTestCase {
-
- protected Object getViewerSelection(ContentViewer contentViewer) {
- return ((IStructuredSelection) contentViewer.getSelection())
- .getFirstElement();
- }
-
- /**
- * @return the ComboViewer's domain object list
- */
- protected List getViewerContent(ContentViewer contentViewer) {
- Object[] elements = ((IStructuredContentProvider) contentViewer
- .getContentProvider()).getElements(null);
- if (elements != null)
- return Arrays.asList(elements);
- return null;
- }
-
- public void testScenario01() {
- // Displaying the catalog's list of Lodging objects in a list viewer,
- // using their names. The name of the currently selected Lodging can
- // be edited in a text widget. There is always a selected Lodging
- // object.
- ListViewer listViewer = new ListViewer(getComposite(), SWT.BORDER);
- Realm realm = SWTObservables.getRealm(listViewer.getControl()
- .getDisplay());
- listViewer.getList().setLayoutData(
- new GridData(SWT.FILL, SWT.FILL, false, false));
- Catalog catalog = SampleData.CATALOG_2005;
-
- IObservableList lodgings = BeansObservables.observeList(realm, catalog,
- "lodgings");
- ObservableListContentProvider contentProvider = new ObservableListContentProvider();
- IObservableMap[] attributeMaps = BeansObservables.observeMaps(
- contentProvider.getKnownElements(), Lodging.class,
- new String[] { "name" });
- listViewer.setContentProvider(contentProvider);
- listViewer.setLabelProvider(new ObservableMapLabelProvider(
- attributeMaps));
- listViewer.setInput(lodgings);
-
- assertArrayEquals(catalog.getLodgings(), getViewerContent(listViewer)
- .toArray());
-
- IObservableValue selectedLodging = ViewersObservables
- .observeSingleSelection(listViewer);
-
- selectedLodging.setValue(SampleData.CAMP_GROUND);
-
- assertEquals(SampleData.CAMP_GROUND, getViewerSelection(listViewer));
- Text txtName = new Text(getComposite(), SWT.BORDER);
-
- getDbc().bindValue(
- SWTObservables.observeText(txtName, SWT.Modify),
- BeansObservables.observeDetailValue(realm, selectedLodging,
- "name", String.class), null);
-
- assertEquals(txtName.getText(), SampleData.CAMP_GROUND.getName());
- enterText(txtName, "foobar");
- assertEquals("foobar", SampleData.CAMP_GROUND.getName());
- listViewer.setSelection(new StructuredSelection(
- SampleData.FIVE_STAR_HOTEL));
- assertEquals(SampleData.FIVE_STAR_HOTEL, selectedLodging.getValue());
- assertEquals(SampleData.FIVE_STAR_HOTEL.getName(), txtName.getText());
- SampleData.FIVE_STAR_HOTEL.setName("barfoo");
- assertEquals("barfoo", txtName.getText());
-
- // Now make sure that the event listeners get removed on dispose()
- // Values should no longer be updated
- selectedLodging.dispose();
-
- // selectedLodging.setValue(SampleData.CAMP_GROUND);
- // assertNotSame(SampleData.CAMP_GROUND,
- // getViewerSelection(listViewer));
- // assertNotSame(txtName.getText(), SampleData.CAMP_GROUND.getName());
- // enterText(txtName, "foobar");
- // assertNotSame("foobar", SampleData.CAMP_GROUND.getName());
- // listViewer.setSelection(new StructuredSelection(
- // SampleData.FIVE_STAR_HOTEL));
- // assertNotSame(SampleData.FIVE_STAR_HOTEL,
- // selectedLodging.getValue());
- // assertNotSame(SampleData.FIVE_STAR_HOTEL.getName(),
- // txtName.getText());
- // SampleData.FIVE_STAR_HOTEL.setName("barfoo");
- // assertNotSame("barfoo", txtName.getText());
- }
-
- public void testScenario02() {
- // Selecting from the list of lodgings for an adventure and editing the
- // properties of the selected lodging in text widgets. If no lodging is
- // selected the input controls for name and adventure are disabled.
- // There are two buttons "Add" and "Remove"; clicking on "Add" creates a
- // new lodging and selects it so it can be edited, clicking on "Remove"
- // removes the currently selected lodging from the list.
- final ListViewer listViewer = new ListViewer(getComposite(), SWT.BORDER);
- listViewer.getList().setLayoutData(
- new GridData(SWT.FILL, SWT.FILL, false, false));
- final Catalog catalog = SampleData.CATALOG_2005;
-
- IObservableList lodgings = BeansObservables.observeList(realm, catalog,
- "lodgings");
- ObservableListContentProvider contentProvider = new ObservableListContentProvider();
- IObservableMap[] attributeMaps = BeansObservables.observeMaps(
- contentProvider.getKnownElements(), Lodging.class,
- new String[] { "name" });
- listViewer.setContentProvider(contentProvider);
- listViewer.setLabelProvider(new ObservableMapLabelProvider(
- attributeMaps));
- listViewer.setInput(lodgings);
-
- assertArrayEquals(catalog.getLodgings(), getViewerContent(listViewer)
- .toArray());
-
- final IObservableValue selectedLodgingObservable = ViewersObservables
- .observeSingleSelection(listViewer);
-
- selectedLodgingObservable.setValue(null);
- assertTrue(listViewer.getSelection().isEmpty());
-
- ComputedValue selectionExistsObservable = new ComputedValue(
- boolean.class) {
- protected Object calculate() {
- return new Boolean(selectedLodgingObservable.getValue() != null);
- }
- };
-
- assertFalse(((Boolean) selectionExistsObservable.getValue())
- .booleanValue());
-
- final Text txtName = new Text(getComposite(), SWT.BORDER);
-
- getDbc().bindValue(SWTObservables.observeEnabled(txtName),
- selectionExistsObservable, null);
- getDbc().bindValue(
- SWTObservables.observeText(txtName, SWT.Modify),
- BeansObservables.observeDetailValue(realm,
- selectedLodgingObservable, "name", String.class), null);
-
- assertEquals(txtName.getText(), "");
- assertFalse(txtName.getEnabled());
-
- final Text txtDescription = new Text(getComposite(), SWT.BORDER);
-
- getDbc().bindValue(SWTObservables.observeEnabled(txtDescription),
- selectionExistsObservable, null);
- getDbc().bindValue(
- SWTObservables.observeText(txtDescription, SWT.Modify),
- MasterDetailObservables.detailValue(
- selectedLodgingObservable, BeansObservables
- .valueFactory(realm, "description"),
- String.class), null);
-
- assertEquals(txtDescription.getText(), "");
- assertFalse(txtDescription.getEnabled());
-
- Button addButton = new Button(getComposite(), SWT.PUSH);
- addButton.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- Lodging selectedLodging = (Lodging) selectedLodgingObservable
- .getValue();
- int insertionIndex = 0;
- if (selectedLodging != null) {
- insertionIndex = Arrays.asList(catalog.getLodgings())
- .indexOf(selectedLodging);
- assertTrue(insertionIndex >= 0);
- }
- Lodging newLodging = SampleData.FACTORY.createLodging();
- int itemCount = listViewer.getList().getItemCount();
- newLodging.setName("new lodging name " + itemCount);
- newLodging.setDescription("new lodging description "
- + itemCount);
- catalog.addLodging(newLodging);
- assertEquals(itemCount + 1, listViewer.getList().getItemCount());
- listViewer.setSelection(new StructuredSelection(newLodging));
- assertSame(newLodging, selectedLodgingObservable.getValue());
- assertTrue(txtName.getEnabled());
- assertTrue(txtDescription.getEnabled());
- assertEquals(newLodging.getName(), txtName.getText());
- assertEquals(newLodging.getDescription(), txtDescription
- .getText());
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- widgetSelected(e);
- }
- });
-
- Button removeButton = new Button(getComposite(), SWT.PUSH);
- removeButton.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- Lodging selectedLodging = (Lodging) selectedLodgingObservable
- .getValue();
- assertNotNull(selectedLodging);
- int deletionIndex = Arrays.asList(catalog.getLodgings())
- .indexOf(selectedLodging);
- assertTrue(deletionIndex >= 0);
- int itemCount = listViewer.getList().getItemCount();
- catalog.removeLodging(selectedLodging);
- assertEquals(itemCount - 1, listViewer.getList().getItemCount());
- assertNull(selectedLodgingObservable.getValue());
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- widgetSelected(e);
- }
- });
-
- pushButtonWithEvents(addButton);
- pushButtonWithEvents(removeButton);
- pushButtonWithEvents(addButton);
- pushButtonWithEvents(addButton);
- pushButtonWithEvents(removeButton);
- }
-
- public void testScenario03() {
- // List adventures and for the selected adventure allow its default
- // lodging�s name and description to be changed in text controls. If
- // there is no selected adventure or the default lodging is null the
- // text controls are disabled. This is a nested property. The default
- // lodging can be changed elsewhere, and the list
- final Catalog catalog = SampleData.CATALOG_2005;
-
- final ListViewer categoryListViewer = new ListViewer(getComposite(),
- SWT.BORDER);
- categoryListViewer.getList().setLayoutData(
- new GridData(SWT.FILL, SWT.FILL, false, false));
-
- IObservableList categories = BeansObservables.observeList(realm,
- catalog, "categories");
- ObservableListContentProvider contentProvider = new ObservableListContentProvider();
- IObservableMap[] attributeMaps = BeansObservables.observeMaps(
- contentProvider.getKnownElements(), Category.class,
- new String[] { "name" });
- categoryListViewer.setContentProvider(contentProvider);
- categoryListViewer.setLabelProvider(new ObservableMapLabelProvider(
- attributeMaps));
- categoryListViewer.setInput(categories);
-
- assertArrayEquals(catalog.getCategories(), getViewerContent(
- categoryListViewer).toArray());
-
- final IObservableValue selectedCategoryObservable = ViewersObservables
- .observeSingleSelection(categoryListViewer);
-
- final ListViewer adventureListViewer = new ListViewer(getComposite(),
- SWT.BORDER);
- adventureListViewer.getList().setLayoutData(
- new GridData(SWT.FILL, SWT.FILL, false, false));
-
- IObservableList adventures = BeansObservables.observeDetailList(realm,
- selectedCategoryObservable, "adventures", Adventure.class);
- contentProvider = new ObservableListContentProvider();
- attributeMaps = BeansObservables.observeMaps(contentProvider
- .getKnownElements(), Adventure.class, new String[] { "name" });
- adventureListViewer.setContentProvider(contentProvider);
- adventureListViewer.setLabelProvider(new ObservableMapLabelProvider(
- attributeMaps));
- adventureListViewer.setInput(adventures);
-
- ComputedValue categorySelectionExistsObservable = new ComputedValue() {
- protected Object calculate() {
- return new Boolean(
- selectedCategoryObservable.getValue() != null);
- }
- };
-
- getDbc().bindValue(
- SWTObservables.observeEnabled(adventureListViewer.getList()),
- categorySelectionExistsObservable, null);
-
- final IObservableValue selectedAdventureObservable = ViewersObservables
- .observeSingleSelection(adventureListViewer);
-
- ComputedValue adventureSelectionExistsObservable = new ComputedValue() {
- protected Object calculate() {
- return new Boolean(
- selectedAdventureObservable.getValue() != null);
- }
- };
-
- final Text txtName = new Text(getComposite(), SWT.BORDER);
-
- getDbc().bindValue(SWTObservables.observeEnabled(txtName),
- adventureSelectionExistsObservable, null);
- getDbc().bindValue(
- SWTObservables.observeText(txtName, SWT.Modify),
- BeansObservables.observeDetailValue(realm,
- selectedAdventureObservable, "name", String.class),
- null);
-
- assertEquals(txtName.getText(), "");
- assertFalse(txtName.getEnabled());
-
- final Text txtDescription = new Text(getComposite(), SWT.BORDER);
-
- getDbc().bindValue(SWTObservables.observeEnabled(txtDescription),
- adventureSelectionExistsObservable, null);
- getDbc().bindValue(
- SWTObservables.observeText(txtDescription, SWT.Modify),
- BeansObservables.observeDetailValue(realm,
- selectedAdventureObservable, "description",
- String.class), null);
-
- assertFalse(adventureListViewer.getList().isEnabled());
- categoryListViewer.setSelection(new StructuredSelection(
- SampleData.SUMMER_CATEGORY));
- assertTrue(adventureListViewer.getList().isEnabled());
- assertFalse(txtName.getEnabled());
- adventureListViewer.setSelection(new StructuredSelection(
- SampleData.RAFTING_HOLIDAY));
- assertEquals(Boolean.TRUE, adventureSelectionExistsObservable
- .getValue());
- assertTrue(txtName.getEnabled());
- assertEquals(SampleData.RAFTING_HOLIDAY.getName(), txtName.getText());
- categoryListViewer.setSelection(new StructuredSelection(
- SampleData.WINTER_CATEGORY));
- assertTrue(adventureListViewer.getList().isEnabled());
- assertFalse(txtName.getEnabled());
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/NPETestScenario.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/NPETestScenario.java
deleted file mode 100644
index 44add229..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/NPETestScenario.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920
- ******************************************************************************/
-
-package org.eclipse.jface.tests.databinding.scenarios;
-
-import org.eclipse.core.databinding.beans.BeansObservables;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * @since 3.2
- *
- */
-public class NPETestScenario extends ScenariosTestCase {
- private Text text;
-
- Person person;
-
- protected void setUp() throws Exception {
- super.setUp();
- person = new Person();
- text = new Text(getComposite(), SWT.BORDER);
- }
-
- /**
- * Asserts the ability to have an initial value of <code>null</code> on
- * the model and to update the value by changing the value of the view.
- */
- public void test_InitialNullValue() {
- Person person = new Person();
- assertNull(person.getName());
-
- getDbc().bindValue(SWTObservables.observeText(text, SWT.Modify),
- BeansObservables.observeValue(person, "name"),
- null);
-
- text.setText("Brad");
- text.notifyListeners(SWT.FocusOut, null);
- assertEquals("Brad", person.getName());
- }
-
- private static class Person {
- private String name;
-
- /**
- * @return Returns the name.
- */
- public String getName() {
- return name;
- }
-
- /**
- * @param name
- * The name to set.
- */
- public void setName(String name) {
- this.name = name;
- }
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/NewTableScenarios.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/NewTableScenarios.java
deleted file mode 100644
index 6a323258..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/NewTableScenarios.java
+++ /dev/null
@@ -1,443 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jface.tests.databinding.scenarios;
-
-import org.eclipse.jface.examples.databinding.model.Catalog;
-import org.eclipse.jface.examples.databinding.model.Category;
-import org.eclipse.jface.examples.databinding.model.SampleData;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.TableColumn;
-
-/**
- * To run the tests in this class, right-click and select "Run As JUnit Plug-in
- * Test". This will also start an Eclipse instance. To clean up the launch
- * configuration, open up its "Main" tab and select "[No Application] - Headless
- * Mode" as the application to run.
- */
-
-public class NewTableScenarios extends ScenariosTestCase {
-
- private TableViewer tableViewer;
-
- Catalog catalog;
-
- Category category;
-
- private TableColumn firstNameColumn;
-
- private TableColumn lastNameColumn;
-
- private TableColumn stateColumn;
-
- Image[] images;
-
- private TableColumn fancyColumn;
-
- protected void setUp() throws Exception {
- super.setUp();
- getComposite().setLayout(new FillLayout());
- tableViewer = new TableViewer(getComposite());
- tableViewer.getTable().setLinesVisible(true);
- tableViewer.getTable().setHeaderVisible(true);
- firstNameColumn = new TableColumn(tableViewer.getTable(), SWT.NONE);
- firstNameColumn.setWidth(50);
- lastNameColumn = new TableColumn(tableViewer.getTable(), SWT.NONE);
- lastNameColumn.setWidth(50);
- stateColumn = new TableColumn(tableViewer.getTable(), SWT.NONE);
- stateColumn.setWidth(50);
- fancyColumn = new TableColumn(tableViewer.getTable(), SWT.NONE);
- fancyColumn.setWidth(250);
-
- catalog = SampleData.CATALOG_2005; // Lodging source
- category = SampleData.WINTER_CATEGORY;
-
- images = new Image[] {
- getShell().getDisplay().getSystemImage(SWT.ICON_ERROR),
- getShell().getDisplay().getSystemImage(SWT.ICON_WARNING),
- getShell().getDisplay().getSystemImage(SWT.ICON_INFORMATION), };
- }
-
- protected void tearDown() throws Exception {
- // do any teardown work here
- super.tearDown();
- tableViewer.getTable().dispose();
- tableViewer = null;
- firstNameColumn = null;
- lastNameColumn = null;
- stateColumn = null;
- }
-
- String getValue(String text) {
- if (text == null)
- return "";
- return text;
- }
-
- public void testScenario01() {
-// // Factory for directly creating IObservables for beans
-// JavaBeans javaBeans = new JavaBeans();
-//
-// // Wrap the TableViewer in an IObservableCollectionWithLabels
-// IObservableCollectionWithLabels accountTable = new TableViewerObservableTable(
-// tableViewer);
-//
-// // Create a readable set to track the catalog's accounts
-// IReadableSet accountSet = javaBeans.createReadableSet(catalog,
-// new PropertyDescriptor("accounts", Catalog.class, "getAccounts", null),
-// Account.class);
-//
-// // Create an observable cell provider to track the given accounts' properties.
-// IObservableCellProvider accountCellProvider = javaBeans.createObservableCellProvider(
-// accountSet, new String[] { "firstName", "lastName", "state" });
-//
-// // bind
-// getDbc().bind(accountTable, accountCellProvider, null);
-//
-// // uncomment next line to see result interactively
-// // interact();
-//
-// // Verify the data in the table columns matches the accounts
-// Account[] accounts = catalog.getAccounts();
-// for (int i = 0; i < accounts.length; i++) {
-// Account account = accounts[i];
-// String col_0 = ((ITableLabelProvider) tableViewer
-// .getLabelProvider()).getColumnText(account, 0);
-// assertEquals(getValue(account.getFirstName()), col_0);
-// String col_1 = ((ITableLabelProvider) tableViewer
-// .getLabelProvider()).getColumnText(account, 1);
-// assertEquals(getValue(account.getLastName()), col_1);
-// String col_2 = ((ITableLabelProvider) tableViewer
-// .getLabelProvider()).getColumnText(account, 2);
-// assertEquals(getValue(account.getState()), col_2);
-//
-// }
- }
-
- public void testScenario02() throws SecurityException,
- IllegalArgumentException {
-// // Show that a TableViewer with three columns can be used to update
-// // columns
-// Account[] accounts = catalog.getAccounts();
-//
-// TableViewerDescription tableViewerDescription = new TableViewerDescription(
-// tableViewer);
-// tableViewerDescription.addEditableColumn("firstName");
-// tableViewerDescription.addEditableColumn("lastName", null, null,
-// new PhoneConverter());
-// tableViewerDescription.addEditableColumn("state", null, null,
-// new StateConverter());
-// getDbc().bind(tableViewerDescription,
-// new Property(catalog, "accounts"), null);
-//
-// Account account = accounts[0];
-// // Select the first item in the table
-// tableViewer.editElement(account, 0);
-// // Set the text property of the cell editor which is now active over the
-// // "firstName" column
-// CellEditor[] cellEditors = tableViewer.getCellEditors();
-// TextCellEditor firstNameEditor = (TextCellEditor) cellEditors[0];
-// // Change the firstName and test it goes to the model
-// enterText((Text) firstNameEditor.getControl(), "Bill");
-// // Check whether the model has changed
-// assertEquals("Bill", account.getFirstName());
- }
-
- public void testScenario04() {
-// // Show that when an item is added to a collection the table gets an
-// // extra item
-// Account[] accounts = catalog.getAccounts();
-//
-// TableViewerDescription tableViewerDescription = new TableViewerDescription(
-// tableViewer);
-// tableViewerDescription.addColumn("firstName");
-// tableViewerDescription.addColumn("lastName");
-// tableViewerDescription.addColumn("state");
-// tableViewerDescription.addColumn(null, new IConverter() {
-//
-// public Class getModelType() {
-// return Account.class;
-// }
-//
-// public Class getTargetType() {
-// return ViewerLabel.class;
-// }
-//
-// public Object convertTargetToModel(Object targetObject) {
-// return null;
-// }
-//
-// public Object convertModelToTarget(Object modelObject) {
-// Account account = (Account) modelObject;
-// return new ViewerLabel(account.toString(), images[new Random()
-// .nextInt(images.length)]);
-// }
-// });
-// getDbc().bind(tableViewerDescription,
-// new Property(catalog, "accounts"), null);
-//
-// // interact();
-//
-// // Verify the number of accounts matches the number of items in the
-// // table
-// assertEquals(tableViewer.getTable().getItemCount(), accounts.length);
-// // Add a new account and verify that the number of items in the table
-// // increases
-// Account newAccount = new Account();
-// newAccount.setFirstName("Finbar");
-// newAccount.setLastName("McGoo");
-// newAccount.setLastName("NC");
-// catalog.addAccount(newAccount);
-// // The number of items should have gone up by one
-// assertEquals(tableViewer.getTable().getItemCount(), accounts.length + 1);
-// // The number of items should still match the number of accounts (i.e.
-// // test the model)
-// assertEquals(tableViewer.getTable().getItemCount(), catalog
-// .getAccounts().length);
-// // Remove the account that was just added
-// catalog.removeAccount(newAccount);
-// // The number of items should match the original
-// assertEquals(tableViewer.getTable().getItemCount(), accounts.length);
-// // The number of items should still match the number of accounts (i.e.
-// // test the model is reset)
-// assertEquals(tableViewer.getTable().getItemCount(), catalog
-// .getAccounts().length);
-//
-// // Test adding and removing to the model on a non UI thread
-// int numberOfAccounts = catalog.getAccounts().length;
-// final Account barney = new Account();
-// barney.setFirstName("Barney");
-// barney.setLastName("Smith");
-// barney.setLastName("CA");
-// invokeNonUI(new Runnable() {
-// public void run() {
-// catalog.addAccount(barney);
-// }
-// });
-// spinEventLoop(0);
-// // The number of items should have gone up by one
-// assertEquals(tableViewer.getTable().getItemCount(),
-// numberOfAccounts + 1);
-//
-// invokeNonUI(new Runnable() {
-// public void run() {
-// catalog.removeAccount(barney);
-// }
-// });
-// spinEventLoop(0);
-// // The number of items should have reverted to the original number
-// // before barney was added and removed
-// assertEquals(tableViewer.getTable().getItemCount(), numberOfAccounts);
-//
- }
-
- public void testScenario03() {
-// // Show that converters work for table columns
-// Account[] accounts = catalog.getAccounts();
-//
-// TableViewerDescription tableViewerDescription = new TableViewerDescription(
-// tableViewer);
-// tableViewerDescription.addEditableColumn("lastName");
-// tableViewerDescription.addEditableColumn("phone", null, null,
-// new PhoneConverter());
-// tableViewerDescription.addEditableColumn("state", null, null,
-// new StateConverter());
-// getDbc().bind(tableViewerDescription,
-// new Property(catalog, "accounts"), null);
-//
-// // Verify that the data in the the table columns matches the expected
-// // What we are looking for is that the phone numbers are converterted to
-// // nnn-nnn-nnnn and that
-// // the state letters are converted to state names
-// // Verify the data in the table columns matches the accounts
-// PhoneConverter phoneConverter = new PhoneConverter();
-// StateConverter stateConverter = new StateConverter();
-// for (int i = 0; i < accounts.length; i++) {
-// Account account = catalog.getAccounts()[i];
-// // Check the phone number
-// String col_phone = ((ITableLabelProvider) tableViewer
-// .getLabelProvider()).getColumnText(account, 1);
-// assertEquals(getValue((String) phoneConverter
-// .convertModelToTarget(account.getPhone())), col_phone);
-// String col_state = ((ITableLabelProvider) tableViewer
-// .getLabelProvider()).getColumnText(account, 2);
-// assertEquals(getValue((String) stateConverter
-// .convertModelToTarget(account.getState())), col_state);
-// }
- }
-
- public void testScenario05() {
-// // Show that when the model changes then the UI refreshes to reflect
-// // this
-//
-// TableViewerDescription tableViewerDescription = new TableViewerDescription(
-// tableViewer);
-// tableViewerDescription.addColumn("lastName");
-// tableViewerDescription.addColumn("phone", new PhoneConverter());
-// tableViewerDescription.addColumn("state", new StateConverter());
-// getDbc().bind(tableViewerDescription,
-// new Property(catalog, "accounts"), null);
-//
-// final Account account = catalog.getAccounts()[0];
-// String lastName = tableViewer.getTable().getItem(0).getText(0);
-// // Check the firstName in the TableItem is the same as the model
-// assertEquals(lastName, account.getLastName());
-// // Now change the model and check again
-// account.setLastName("Gershwin");
-// lastName = tableViewer.getTable().getItem(0).getText(0);
-// assertEquals(lastName, account.getLastName());
-//
-// // Test the model update on a non UI thread
-// invokeNonUI(new Runnable() {
-// public void run() {
-// account.setLastName("Mozart");
-// }
-// });
-// spinEventLoop(0);
-// lastName = tableViewer.getTable().getItem(0).getText(0);
-// assertEquals(lastName, account.getLastName());
-//
- }
-
- public void testScenario06() {
-// // Check that explicit type means that defaulting of converters works
-// TableViewerDescription tableViewerDescription = new TableViewerDescription(
-// tableViewer);
-// tableViewerDescription.addEditableColumn("price");
-// tableViewerDescription.getColumn(0).setPropertyType(Double.TYPE);
-// getDbc().bind(tableViewerDescription,
-// new Property(catalog, "transporations"), null);
-// Transportation transporation = catalog.getTransporations()[0];
-// tableViewer.editElement(transporation, 0);
-// // Set the text property of the cell editor which is now active over the
-// // "firstName" column
-// CellEditor[] cellEditors = tableViewer.getCellEditors();
-// TextCellEditor priceEditor = (TextCellEditor) cellEditors[0];
-// // Change the firstName and test it goes to the model
-// enterText((Text) priceEditor.getControl(), "123.45");
-// // Verify the model is updated
-// assertEquals(transporation.getPrice(), 123.45, 0);
-
- }
-
- public void testScenario07() {
-// // Verify that even when a column's property type is not set, that it is
-// // worked out lazily from the target type
-// TableViewerDescription tableViewerDescription = new TableViewerDescription(
-// tableViewer);
-// tableViewerDescription.addEditableColumn("price");
-// // The column's type is not set to be Double.TYPE. This will be inferred
-// // once the first Transportation object is set
-// // into the ObservableCollection
-// getDbc().bind(tableViewerDescription,
-// new Property(catalog, "transporations"), null);
-// Transportation transporation = catalog.getTransporations()[0];
-// tableViewer.editElement(transporation, 0);
-// // Set the text property of the cell editor which is now active over the
-// // "firstName" column
-// CellEditor[] cellEditors = tableViewer.getCellEditors();
-// TextCellEditor priceEditor = (TextCellEditor) cellEditors[0];
-// // Change the firstName and test it goes to the model
-// enterText((Text) priceEditor.getControl(), "123.45");
-// // Verify the model is updated
-// assertEquals(transporation.getPrice(), 123.45, 0);
-//
- }
-
- public void testScenario08_00() {
-// // Verify that binding to a Collection property (rather than an array)
-// // works when specifying data type
-// TableViewerDescription tableViewerDescription = new TableViewerDescription(
-// tableViewer);
-// tableViewerDescription.addEditableColumn("userId");
-// tableViewerDescription.addEditableColumn("password");
-// getDbc().bind(tableViewerDescription,
-// new Property(catalog, "signons", Signon.class, null), null);
-// Signon firstSignon = (Signon) catalog.getSignons().get(0);
-// // Verify the UI matches the model
-// TableItem firstTableItem = tableViewer.getTable().getItem(0);
-// assertEquals(firstTableItem.getText(1), firstSignon.getPassword());
-// // Change the model and ensure the UI refreshes
-// firstSignon.setPassword("Eclipse123Rocks");
-// assertEquals("Eclipse123Rocks", firstSignon.getPassword());
-// assertEquals(firstTableItem.getText(1), firstSignon.getPassword());
-// // Change the GUI and ensure the model refreshes
-// tableViewer.editElement(firstSignon, 1);
-// CellEditor[] cellEditors = tableViewer.getCellEditors();
-// TextCellEditor passwordEditor = (TextCellEditor) cellEditors[1];
-// enterText((Text) passwordEditor.getControl(), "Cricket11Players");
-// assertEquals("Cricket11Players", firstSignon.getPassword());
-//
- }
-
- public void testScenario08_01() {
-// // Verify that binding to a Collection property (rather than an array)
-// // works without specifying data type
-// TableViewerDescription tableViewerDescription = new TableViewerDescription(
-// tableViewer);
-// tableViewerDescription.addEditableColumn("userId");
-// tableViewerDescription.addEditableColumn("password");
-// getDbc().bind(tableViewerDescription, new Property(catalog, "signons"),
-// null);
-// Signon firstSignon = (Signon) catalog.getSignons().get(0);
-// // Verify the UI matches the model
-// TableItem firstTableItem = tableViewer.getTable().getItem(0);
-// assertEquals(firstTableItem.getText(1), firstSignon.getPassword());
-// // Change the model and ensure the UI refreshes
-// firstSignon.setPassword("Eclipse123Rocks");
-// assertEquals("Eclipse123Rocks", firstSignon.getPassword());
-// assertEquals(firstTableItem.getText(1), firstSignon.getPassword());
-// // Change the GUI and ensure the model refreshes
-// tableViewer.editElement(firstSignon, 1);
-// CellEditor[] cellEditors = tableViewer.getCellEditors();
-// TextCellEditor passwordEditor = (TextCellEditor) cellEditors[1];
-// enterText((Text) passwordEditor.getControl(), "Cricket11Players");
-// assertEquals("Cricket11Players", firstSignon.getPassword());
-//
- }
-
- public void testScenario09() {
-// // Verify that nested properties work. Catalog has adventures. Adventure
-// // has defaultLodging. Loding has name.
-// TableViewerDescription tableViewerDescription = new TableViewerDescription(
-// tableViewer);
-// tableViewerDescription.addColumn("name");
-// tableViewerDescription.addColumn("defaultLodging.name");
-// getDbc().bind(tableViewerDescription,
-// new Property(category, "adventures"), null);
- }
- /**
- * public void testScenario10(){ // Verify that for TIME_EARLY updating
- * occurs on a per key basic for a TextCellEditor // Show that converters
- * work for table columns Account[] accounts = catalog.getAccounts();
- * Account firstAccount = accounts[0];
- * SampleData.getSWTObservableFactory().setUpdateTime(DataBindingContext.TIME_EARLY);
- * TableViewerDescription tableViewerDescription = new
- * TableViewerDescription(tableViewer);
- * tableViewerDescription.addEditableColumn("lastName");
- * tableViewerDescription.addColumn("lastName");
- * getDbc().bind(tableViewerDescription,new Property(catalog, "accounts"),
- * null); // Verify that the first account is shown in the first row with
- * the last name correctly
- * assertEquals(tableViewer.getTable().getItem(0).getData(),firstAccount);
- * assertEquals(tableViewer.getTable().getItem(0).getText(0),firstAccount.getLastName());
- * assertEquals(tableViewer.getTable().getItem(0).getText(1),firstAccount.getLastName()); //
- * Create a cell editor over the first column
- * tableViewer.editElement(firstAccount, 0); // Set the text property of the
- * cell editor which is now active over the "firstName" column CellEditor[]
- * cellEditors = tableViewer.getCellEditors(); TextCellEditor
- * lastNameCellEditor = (TextCellEditor) cellEditors[0];
- * ((Text)lastNameCellEditor.getControl()).setText("E"); // Verify that the
- * key press goes to the model assertEquals(firstAccount.getLastName(),"E"); }
- */
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/PropertyScenarios.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/PropertyScenarios.java
deleted file mode 100644
index ecd92326..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/PropertyScenarios.java
+++ /dev/null
@@ -1,549 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920, 159768
- *******************************************************************************/
-package org.eclipse.jface.tests.databinding.scenarios;
-
-import java.text.NumberFormat;
-import java.text.ParseException;
-import java.util.Date;
-import java.util.Locale;
-
-import org.eclipse.core.databinding.AggregateValidationStatus;
-import org.eclipse.core.databinding.BindSpec;
-import org.eclipse.core.databinding.Binding;
-import org.eclipse.core.databinding.BindingEvent;
-import org.eclipse.core.databinding.DefaultBindSpec;
-import org.eclipse.core.databinding.beans.BeansObservables;
-import org.eclipse.core.databinding.conversion.Converter;
-import org.eclipse.core.databinding.conversion.IConverter;
-import org.eclipse.core.databinding.conversion.IdentityConverter;
-import org.eclipse.core.databinding.observable.ChangeEvent;
-import org.eclipse.core.databinding.observable.IChangeListener;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.databinding.validation.IValidator;
-import org.eclipse.core.databinding.validation.ValidationStatus;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.jface.examples.databinding.model.Account;
-import org.eclipse.jface.examples.databinding.model.Adventure;
-import org.eclipse.jface.examples.databinding.model.Cart;
-import org.eclipse.jface.examples.databinding.model.SampleData;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.FocusListener;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Spinner;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * To run the tests in this class, right-click and select "Run As JUnit Plug-in
- * Test". This will also start an Eclipse instance. To clean up the launch
- * configuration, open up its "Main" tab and select "[No Application] - Headless
- * Mode" as the application to run.
- */
-
-public class PropertyScenarios extends ScenariosTestCase {
-
- private Adventure adventure;
-
- protected void setUp() throws Exception {
- super.setUp();
- // do any setup work here
- adventure = SampleData.WINTER_HOLIDAY;
- }
-
- protected void tearDown() throws Exception {
- // do any teardown work here
- super.tearDown();
- }
-
- public void testEnterText() {
- // just to make sure enterText() generates a FocusOut event.
- Text text = new Text(getComposite(), SWT.BORDER);
- final boolean[] focusLostHolder = { false };
- text.addFocusListener(new FocusListener() {
-
- public void focusGained(FocusEvent e) {
- // only interested in focus lost events
- }
-
- public void focusLost(FocusEvent e) {
- focusLostHolder[0] = true;
- }
- });
- enterText(text, "hallo");
- assertTrue(focusLostHolder[0]);
- }
-
- public void testScenario01() {
- Text text = new Text(getComposite(), SWT.BORDER);
- getDbc().bindValue(SWTObservables.observeText(text, SWT.Modify),
- BeansObservables.observeValue(adventure, "name"),
- null);
-
- // getDbc().bind(text, new Property(adventure, "name"), null);
- // uncomment the following line to see what's happening
- // spinEventLoop(1);
- assertEquals(adventure.getName(), text.getText());
- enterText(text, "foobar");
- // uncomment the following line to see what's happening
- // spinEventLoop(1);
- assertEquals("foobar", adventure.getName());
- adventure.setName("barfoo");
- // uncomment the following line to see what's happening
- // spinEventLoop(1);
- assertEquals("barfoo", text.getText());
- }
-
- public void testScenario02() {
- // Binding the name property of an Adventure object to the contents of
- // Text controls, no conversion, no validation. The Text widget editable
- // is set to false.by the developer (can not change the name)
- Text text = new Text(getComposite(), SWT.READ_ONLY);
-
- getDbc().bindValue(SWTObservables.observeText(text, SWT.None),
- BeansObservables.observeValue(adventure, "name"),
- null);
- assertEquals(adventure.getName(), text.getText());
- }
-
- public void testScenario03() {
- // Binding of a read-only property of an Adventure object to the
- // contents of Text controls, no conversion, no validation. Text control
- // is not editable as a side effect of binding to a read-only property..
- Cart cart = SampleData.CART;
- cart.setAdventureDays(42);
- // bind to the lodgingDays feature, which is read-only and always one
- // less than the number of adventure days.
- Text text = new Text(getComposite(), SWT.BORDER);
-
- getDbc().bindValue(SWTObservables.observeText(text, SWT.Modify),
- BeansObservables.observeValue(cart, "lodgingDays"),
- null);
-
- assertEquals(new Integer(cart.getLodgingDays()).toString(), text.getText());
- }
-
- public void testScenario04() {
- // Binding a nested property of an Adventure object to the content of a
- // Text control, no conversion, no validation.
- Text text = new Text(getComposite(), SWT.BORDER);
- // TODO Scenario needs to be more specific - I'm binding to the default
- // lodging's description of an adventure. What do we expect to happen
- // when the default lodging changes? If we expect no change, then this
- // scenario does not introduce anything new. If we expect the binding to
- // be to the new default lodging's description, shouldn't we move this
- // scenario to the master/detail section? I'm assuming the latter for
- // now.
-
- IObservableValue defaultLodging =BeansObservables.observeDetailValue(realm, BeansObservables.observeValue(adventure,
- "defaultLodging"), "description", String.class);
-
- getDbc().bindValue(SWTObservables.observeText(text, SWT.Modify), defaultLodging, null);
-
- // test changing the description
- assertEquals(adventure.getDefaultLodging().getDescription(), text.getText());
- enterText(text, "foobar");
- assertEquals("foobar", adventure.getDefaultLodging().getDescription());
- adventure.getDefaultLodging().setDescription("barfoo");
- assertEquals(adventure.getDefaultLodging().getDescription(), text.getText());
-
- // test changing the default lodging
- adventure.setDefaultLodging(SampleData.CAMP_GROUND);
- assertEquals(adventure.getDefaultLodging().getDescription(), text.getText());
- adventure.getDefaultLodging().setDescription("barfo");
- assertEquals(adventure.getDefaultLodging().getDescription(), text.getText());
-
- adventure.setDefaultLodging(null);
- assertEquals("", text.getText());
-
- adventure.setDefaultLodging(SampleData.FIVE_STAR_HOTEL);
- assertEquals(adventure.getDefaultLodging().getDescription(), text.getText());
- adventure.getDefaultLodging().setDescription("barf");
- assertEquals(adventure.getDefaultLodging().getDescription(), text.getText());
-
- }
-
- public void testScenario05() {
- // Binding the name property of an Adventure object to the contents of
- // Text controls where conversion occurs � the model data is held all
- // in
- // uppercase and displayed in lowercase with the first letter
- // capitalized.
- Text text = new Text(getComposite(), SWT.BORDER);
- adventure.setName("UPPERCASE");
-
- IConverter converter1 = new IConverter() {
- public Object getFromType() {
- return String.class;
- }
-
- public Object getToType() {
- return String.class;
- }
-
- public Object convert(Object toObject) {
- String modelValue = (String) toObject;
- if (modelValue == null || modelValue.equals("")) {
- return modelValue;
- }
- String firstChar = modelValue.substring(0, 1);
- String remainingChars = modelValue.substring(1);
- return firstChar.toUpperCase() + remainingChars.toLowerCase();
- }
- };
- IConverter converter2 = new IConverter() {
- public Object getFromType() {
- return String.class;
- }
-
- public Object getToType() {
- return String.class;
- }
-
- public Object convert(Object fromObject) {
- return ((String) fromObject).toUpperCase();
- }
- };
-
- BindSpec bindSpec = new DefaultBindSpec().setModelToTargetConverter(converter1).setTargetToModelConverter(converter2);
- getDbc().bindValue(SWTObservables.observeText(text, SWT.Modify),
- BeansObservables.observeValue(adventure, "name"),
- bindSpec);
-
- // spinEventLoop(1);
- assertEquals("Uppercase", text.getText());
- enterText(text, "lowercase");
- // spinEventLoop(1);
- // TODO If we wanted to "canonicalize" the value in the text field, how
- // could we do that?
- assertEquals("LOWERCASE", adventure.getName());
- }
-
- public void testScenario06() {
- // Binding the name property of an Adventure object to the contents of
- // Text controls where validation occurs and the name cannot be longer
- // than 15 characters and cannot contain spaces
- Text text = new Text(getComposite(), SWT.BORDER);
- final String noSpacesMessage = "Name must not contain spaces.";
- final String max15CharactersMessage = "Maximum length for name is 15 characters.";
- adventure.setName("ValidValue");
-
- IValidator validator = new IValidator() {
- public IStatus validate(Object value) {
- String stringValue = (String) value;
- if (stringValue.length() > 15) {
- return ValidationStatus.error(max15CharactersMessage);
- } else if (stringValue.indexOf(' ') != -1) {
- return ValidationStatus.error(noSpacesMessage);
- } else {
- return Status.OK_STATUS;
- }
- }
- };
-
- BindSpec bindSpec = new DefaultBindSpec().setModelToTargetConverter(new IdentityConverter(String.class))
- .setTargetToModelConverter(new IdentityConverter(String.class))
- .addTargetValidator(BindingEvent.PIPELINE_VALUE_CHANGING, validator);
-
- Binding binding = getDbc().bindValue(SWTObservables.observeText(text, SWT.Modify),
- BeansObservables.observeValue(adventure, "name"),
- bindSpec);
-
- // no validation message
- assertTrue(((IStatus)binding.getPartialValidationStatus().getValue()).isOK());
- enterText(text, "Invalid Value");
- assertEquals(noSpacesMessage, ((IStatus) binding.getPartialValidationStatus().getValue()).getMessage());
- assertEquals("ValidValue", text.getText());
- text.setText("InvalidValueBecauseTooLong");
- assertEquals(max15CharactersMessage,
- ((IStatus) binding.getPartialValidationStatus().getValue()).getMessage());
- assertEquals("ValidValue", text.getText());
- enterText(text, "anothervalid");
- assertTrue(((IStatus)binding.getPartialValidationStatus().getValue()).isOK());
- assertEquals("anothervalid", text.getText());
- assertEquals("anothervalid", adventure.getName());
- }
-
- public void testScenario07() {
- // Binding the price property of an Adventure to a Text control. Price
- // is a double and Text accepts String so conversion will have to occur.
- // Validation ensure that the value is positive
- Text text = new Text(getComposite(), SWT.BORDER);
- adventure.setPrice(5.0);
- final String cannotBeNegativeMessage = "Price cannot be negative.";
- final String mustBeCurrencyMessage = "Price must be a currency.";
-
- IValidator validator = new IValidator() {
- public IStatus validate(Object value) {
- String stringValue = (String) value;
- try {
- double doubleValue = new Double(stringValue).doubleValue();
- if (doubleValue < 0.0) {
- return ValidationStatus.error(cannotBeNegativeMessage);
- }
- return Status.OK_STATUS;
- } catch (NumberFormatException ex) {
- return ValidationStatus.error(mustBeCurrencyMessage);
- }
- }
- };
-
- getDbc().bindValue(SWTObservables.observeText(text, SWT.Modify),
- BeansObservables.observeValue(adventure, "price"),
- new DefaultBindSpec().addTargetValidator(BindingEvent.PIPELINE_AFTER_GET, validator));
-
- assertEquals("5.0", text.getText());
- assertTrue(AggregateValidationStatus.getStatusMaxSeverity(getDbc().getBindings()).isOK());
- enterText(text, "0.65");
- assertTrue(AggregateValidationStatus.getStatusMaxSeverity(getDbc().getBindings()).isOK());
- assertEquals(0.65, adventure.getPrice(), 0.0001);
- adventure.setPrice(42.24);
- assertEquals("42.24", text.getText());
- assertTrue(AggregateValidationStatus.getStatusMaxSeverity(getDbc().getBindings()).isOK());
- enterText(text, "jygt");
- assertEquals(mustBeCurrencyMessage, AggregateValidationStatus.getStatusMaxSeverity(getDbc().getBindings()).getMessage());
- enterText(text, "-23.9");
- assertEquals(cannotBeNegativeMessage, AggregateValidationStatus.getStatusMaxSeverity(getDbc().getBindings()).getMessage());
- assertEquals(42.24, adventure.getPrice(), 0.0001);
- adventure.setPrice(0.0);
- assertTrue(AggregateValidationStatus.getStatusMaxSeverity(getDbc().getBindings()).isOK());
- }
-
- public void testScenario08() {
- // Binding the price property of an Adventure to a Text control but with
- // custom conversion � the double will be validated to only have two
- // decimal places and displayed with a leading currency symbol, and can
- // be entered with or without the currency symbol.
- Text text = new Text(getComposite(), SWT.BORDER);
- adventure.setPrice(5.0);
- final String cannotBeNegativeMessage = "Price cannot be negative.";
- final String mustBeCurrencyMessage = "Price must be a currency.";
- final NumberFormat currencyFormat = NumberFormat.getCurrencyInstance(Locale.CANADA);
-
- IConverter toCurrency = new Converter(double.class, String.class) {
- public Object convert(Object toObject) {
- return currencyFormat.format(((Double) toObject).doubleValue());
- }
- };
-
- IConverter toDouble = new Converter(String.class, double.class) {
- public Object convert(Object fromObject) {
- try {
- return currencyFormat.parse((String) fromObject);
- } catch (ParseException e) {
- // TODO throw something like
- // IllegalConversionException?
- return new Double(0);
- }
- }
- };
-
- IValidator validator = new IValidator() {
- public IStatus validate(Object value) {
- String stringValue = (String) value;
- try {
- double doubleValue = currencyFormat.parse(stringValue).doubleValue();
- if (doubleValue < 0.0) {
- return ValidationStatus.error(cannotBeNegativeMessage);
- }
- return Status.OK_STATUS;
- } catch (ParseException e) {
- return ValidationStatus.error(mustBeCurrencyMessage);
- }
- }
- };
-
- BindSpec bindSpec = new DefaultBindSpec().setModelToTargetConverter(toCurrency)
- .setTargetToModelConverter(toDouble)
- .addTargetValidator(BindingEvent.PIPELINE_AFTER_GET, validator);
- getDbc().bindValue(SWTObservables.observeText(text, SWT.Modify),
- BeansObservables.observeValue(adventure, "price"),
- bindSpec);
-
- assertEquals("$5.00", text.getText());
- assertTrue(AggregateValidationStatus.getStatusMaxSeverity(getDbc().getBindings()).isOK());
- enterText(text, "$0.65");
- assertTrue(AggregateValidationStatus.getStatusMaxSeverity(getDbc().getBindings()).isOK());
- assertEquals(0.65, adventure.getPrice(), 0.0001);
- adventure.setPrice(42.24);
- assertEquals("$42.24", text.getText());
- assertTrue(AggregateValidationStatus.getStatusMaxSeverity(getDbc().getBindings()).isOK());
- enterText(text, "jygt");
- assertEquals(mustBeCurrencyMessage, AggregateValidationStatus.getStatusMaxSeverity(getDbc().getBindings()).getMessage());
- enterText(text, "-$23.9");
- assertEquals(cannotBeNegativeMessage, AggregateValidationStatus.getStatusMaxSeverity(getDbc().getBindings()).getMessage());
- assertEquals(42.24, adventure.getPrice(), 0.0001);
- adventure.setPrice(0.0);
- assertTrue(AggregateValidationStatus.getStatusMaxSeverity(getDbc().getBindings()).isOK());
- }
-
- public void testScenario09() {
- // Binding a boolean property to a CheckBox. Adventure will have a
- // Boolean property �petsAllowed�
- Button checkbox = new Button(getComposite(), SWT.CHECK);
- // checkbox.setText("Pets allowed");
- // checkbox.setLayoutData(new GridData(SWT.LEFT,SWT.TOP, false,false));
- adventure.setPetsAllowed(true);
-
- getDbc().bindValue(SWTObservables.observeSelection(checkbox),
- BeansObservables.observeValue(adventure, "petsAllowed"),
- null);
-
- assertEquals(true, checkbox.getSelection());
- setButtonSelectionWithEvents(checkbox, false);
- assertEquals(false, adventure.isPetsAllowed());
- adventure.setPetsAllowed(true);
- assertEquals(true, checkbox.getSelection());
- }
-
- public void testScenario10() {
- // Binding a Transportation departure time to a Text control that
- // formats and validates the time to and from a String. There are
- // property bindings that bind elements of the GUI to elements to GUI
- // and also elements of the domain to elements of the domain
- // TODO fail("not implemented");
- }
-
- public void testScenario11() {
- // Binding the max value of a spinner to another spinner.
- Spinner spinner1 = new Spinner(getComposite(), SWT.NONE);
- spinner1.setSelection(10);
- spinner1.setMinimum(1);
- spinner1.setMaximum(100);
- Spinner spinner2 = new Spinner(getComposite(), SWT.NONE);
- spinner2.setMaximum(1);
-
- getDbc().bindValue(SWTObservables.observeSelection(spinner1), SWTObservables.observeMax(spinner2), null);
-
- assertEquals(1, spinner1.getSelection());
- spinner1.setSelection(10);
- spinner1.notifyListeners(SWT.Modify, new Event());
- assertEquals(10, spinner2.getMaximum());
- }
-
- public void testScenario12() {
- // Binding the enabled state of several Text controls to a check box.
- // There will be two check boxes, so as each is enabled/disabled the
- // other one follows as do the states of the Text controls.
- Button checkbox1 = new Button(getComposite(), SWT.CHECK);
- checkbox1.setSelection(false);
- Button checkbox2 = new Button(getComposite(), SWT.CHECK);
- checkbox2.setSelection(false);
- Text text1 = new Text(getComposite(), SWT.NONE);
- Text text2 = new Text(getComposite(), SWT.NONE);
-
- IObservableValue checkbox1Selected = SWTObservables.observeSelection(checkbox1);
- IObservableValue checkbox2Selected = SWTObservables.observeSelection(checkbox2);
-
- // bind the two checkboxes so that if one is checked, the other is not
- // and vice versa.
- Converter negatingConverter = new Converter(boolean.class, boolean.class) {
- private Boolean negated(Boolean booleanObject) {
- return new Boolean(!booleanObject.booleanValue());
- }
-
- public Object convert(Object targetObject) {
- return negated((Boolean) targetObject);
- }
- };
-
- getDbc().bindValue(checkbox1Selected,
- checkbox2Selected,
- new DefaultBindSpec().setModelToTargetConverter(negatingConverter)
- .setTargetToModelConverter(negatingConverter));
-
- // bind the enabled state of the two text widgets to one of the
- // checkboxes each.
-
- getDbc().bindValue(SWTObservables.observeEnabled(text1), checkbox1Selected, null);
- getDbc().bindValue(SWTObservables.observeEnabled(text2), checkbox2Selected, null);
-
- assertEquals(true, text1.getEnabled());
- assertEquals(false, text2.getEnabled());
- assertEquals(true, checkbox1.getSelection());
- setButtonSelectionWithEvents(checkbox1, false);
- assertEquals(false, text1.getEnabled());
- assertEquals(true, text2.getEnabled());
- assertEquals(true, checkbox2.getSelection());
- setButtonSelectionWithEvents(checkbox2, false);
- assertEquals(true, text1.getEnabled());
- assertEquals(false, text2.getEnabled());
- assertEquals(true, checkbox1.getSelection());
- }
-
- public void testScenario13() {
- Text text = new Text(getComposite(), SWT.BORDER);
-
- getDbc().bindValue(SWTObservables.observeText(text, SWT.FocusOut), BeansObservables.observeValue(adventure, "name"), null);
-
- // uncomment the following line to see what's happening
- // happening
- // spinEventLoop(1);
- String adventureName = adventure.getName();
- assertEquals(adventureName, text.getText());
- enterText(text, "foobar");
- // uncomment the following line to see what's happening
- // spinEventLoop(1);
- assertEquals("foobar", adventure.getName());
- adventure.setName("barfoo");
- // uncomment the following line to see what's happening
- // spinEventLoop(1);
- assertEquals("barfoo", text.getText());
- }
-
- public void testScenario14() {
- Text t1 = new Text(getComposite(), SWT.BORDER);
- Text t2 = new Text(getComposite(), SWT.BORDER);
-
- getDbc().bindValue(SWTObservables.observeText(t1, SWT.Modify), BeansObservables.observeValue(adventure, "name"), null);
- getDbc().bindValue(SWTObservables.observeText(t2, SWT.Modify), BeansObservables.observeValue(adventure, "name"), null);
-
- final int[] counter = { 0 };
-
- IObservableValue uv = BeansObservables.observeValue(adventure, "name");
-
- uv.addChangeListener(new IChangeListener() {
- public void handleChange(ChangeEvent event) {
- // Count how many times adventure has changed
- counter[0]++;
- }
- });
-
- String name = adventure.getName() + "Foo";
- enterText(t1, name);
- assertEquals(name, adventure.getName());
- assertEquals(name, t2.getText());
- assertTrue(counter[0] == 1);
-
- name = name + "Bar";
- uv.setValue(name);
- assertEquals(t1.getText(), adventure.getName());
- assertEquals(2, counter[0]);
-
- }
-
- public void testScenario15() {
- Text text = new Text(getComposite(), SWT.NONE);
- Account account = new Account();
- account.setExpiryDate(new Date());
-
- Binding b = getDbc().bindValue(SWTObservables.observeText(text, SWT.Modify), BeansObservables.observeValue(account, "expiryDate"), null);
- Text errorText = new Text(getComposite(), SWT.NONE);
-
- getDbc().bindValue(SWTObservables.observeText(errorText, SWT.Modify), b.getValidationStatus(), new DefaultBindSpec().setUpdateModel(false));
- assertTrue(((IStatus)b.getValidationStatus().getValue()).isOK());
- enterText(text, "foo");
- assertFalse(((IStatus)b.getValidationStatus().getValue()).isOK());
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ScenariosTestCase.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ScenariosTestCase.java
deleted file mode 100644
index 7da1df9b..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ScenariosTestCase.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920
- *******************************************************************************/
-package org.eclipse.jface.tests.databinding.scenarios;
-
-import java.util.Arrays;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.databinding.DataBindingContext;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.jface.examples.databinding.model.SampleData;
-import org.eclipse.jface.tests.databinding.util.RealmTester;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * Abstract base class of the JFace binding scenario test classes.
- */
-abstract public class ScenariosTestCase extends TestCase {
-
- private Composite composite;
- private DataBindingContext dbc;
- protected Display display;
- private boolean disposeDisplay = false;
- protected Shell shell;
- protected Text dummyText;
- protected Realm realm;
-
- protected Composite getComposite() {
- return composite;
- }
-
- protected DataBindingContext getDbc() {
- return dbc;
- }
-
- public Shell getShell() {
- if (shell != null) {
- return shell;
- }
- Shell result = BindingScenariosTestSuite.getShell();
- if (result == null) {
- display = Display.getDefault();
- if (Display.getDefault() == null) {
- display = new Display();
- disposeDisplay = true;
- }
- shell = new Shell(display, SWT.SHELL_TRIM);
- shell.setLayout(new FillLayout());
- result = shell;
- }
- result.setText(getName()); // In the case that the shell() becomes
- // visible.
- return result;
- }
-
- protected void spinEventLoop(int secondsToWaitWithNoEvents) {
- if (!composite.isVisible() && secondsToWaitWithNoEvents > 0) {
- composite.getShell().open();
- }
- while (composite.getDisplay().readAndDispatch()) {
- // do nothing, just process events
- }
- try {
- Thread.sleep(secondsToWaitWithNoEvents * 1000);
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- }
- }
-
- protected void interact() {
- if (!getShell().isVisible()) {
- getShell().open();
- }
- while (!getShell().isDisposed()) {
- if (!getShell().getDisplay().readAndDispatch()) {
- getShell().getDisplay().sleep();
- }
- }
- }
-
- protected void setButtonSelectionWithEvents(Button button, boolean value) {
- if (button.getSelection() == value) {
- return;
- }
- button.setSelection(value);
- pushButtonWithEvents(button);
- }
-
- protected void pushButtonWithEvents(Button button) {
- button.notifyListeners(SWT.Selection, null);
- }
-
- protected void setUp() throws Exception {
- realm = SWTObservables.getRealm(Display.getDefault());
- RealmTester.setDefault(realm);
-
- composite = new Composite(getShell(), SWT.NONE);
- composite.setLayout(new FillLayout());
- SampleData.initializeData(); // test may manipulate the data... let
- // all start from fresh
- dbc = new DataBindingContext();
- dummyText = new Text(getComposite(), SWT.NONE);
- dummyText.setText("dummy");
- }
-
- protected void tearDown() throws Exception {
- realm = null;
- getShell().setVisible(false); // same Shell may be reUsed across tests
- composite.dispose();
- composite = null;
- if (shell != null) {
- shell.close();
- shell.dispose();
- } else
- dbc.dispose();
- if (display != null && disposeDisplay) {
- display.dispose();
- }
- }
-
- protected void enterText(Text text, String string) {
- text.notifyListeners(SWT.FocusIn, null);
- text.setText(string);
- text.notifyListeners(SWT.FocusOut, null);
- }
-
- protected void assertArrayEquals(Object[] expected, Object[] actual) {
- assertEquals(Arrays.asList(expected), Arrays.asList(actual));
- }
-
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/SpinnerControlScenario.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/SpinnerControlScenario.java
deleted file mode 100644
index 57c87feb..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/SpinnerControlScenario.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920
- *******************************************************************************/
-package org.eclipse.jface.tests.databinding.scenarios;
-
-import org.eclipse.core.databinding.beans.BeansObservables;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.jface.examples.databinding.model.Adventure;
-import org.eclipse.jface.examples.databinding.model.SampleData;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Spinner;
-
-/**
- * To run the tests in this class, right-click and select "Run As JUnit Plug-in
- * Test". This will also start an Eclipse instance. To clean up the launch
- * configuration, open up its "Main" tab and select "[No Application] - Headless
- * Mode" as the application to run.
- */
-
-public class SpinnerControlScenario extends ScenariosTestCase {
-
- private Adventure adventure;
-
- protected void setUp() throws Exception {
- super.setUp();
- // do any setup work here
- adventure = SampleData.WINTER_HOLIDAY;
- }
-
- protected void tearDown() throws Exception {
- // do any teardown work here
- super.tearDown();
- }
-
- public void testScenario01() {
- // Bind the adventure "maxNumberOfPeople" property to a spinner
- // Change the UI and verify the model changes
- // Change the model and verify the UI changes
- Spinner spinner = new Spinner(getComposite(), SWT.BORDER);
- getDbc().bindValue(SWTObservables.observeSelection(spinner),
- BeansObservables.observeValue(adventure, "maxNumberOfPeople"),
- null);
-
- assertEquals(adventure.getMaxNumberOfPeople(), spinner.getSelection());
- // Verify the model is updated when the GUI is changed
- spinner.setSelection(5);
- assertEquals(5, adventure.getMaxNumberOfPeople());
- // Verify the GUI is updated when the model changes
- adventure.setMaxNumberOfPeople(7);
- assertEquals(7, spinner.getSelection());
- adventure.setMaxNumberOfPeople(11);
- spinEventLoop(0);
- assertEquals(11, spinner.getSelection());
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/TableScenarios.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/TableScenarios.java
deleted file mode 100644
index 4ce6a68a..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/TableScenarios.java
+++ /dev/null
@@ -1,451 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920
- * Brad Reynolds - bug 160000
- *******************************************************************************/
-package org.eclipse.jface.tests.databinding.scenarios;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-
-import org.eclipse.core.databinding.beans.BeansObservables;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.list.WritableList;
-import org.eclipse.core.databinding.observable.map.IObservableMap;
-import org.eclipse.jface.databinding.viewers.ObservableListContentProvider;
-import org.eclipse.jface.databinding.viewers.ObservableMapLabelProvider;
-import org.eclipse.jface.examples.databinding.model.Account;
-import org.eclipse.jface.examples.databinding.model.Catalog;
-import org.eclipse.jface.examples.databinding.model.Category;
-import org.eclipse.jface.examples.databinding.model.SampleData;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.TableItem;
-
-/**
- * To run the tests in this class, right-click and select "Run As JUnit Plug-in
- * Test". This will also start an Eclipse instance. To clean up the launch
- * configuration, open up its "Main" tab and select "[No Application] - Headless
- * Mode" as the application to run.
- */
-
-public class TableScenarios extends ScenariosTestCase {
-
- private TableViewer tableViewer;
-
- private Catalog catalog;
-
- Category category;
-
- private TableColumn firstNameColumn;
-
- private TableColumn lastNameColumn;
-
- private TableColumn stateColumn;
-
- Image[] images;
-
- private TableColumn fancyColumn;
-
- protected void setUp() throws Exception {
- super.setUp();
- getComposite().setLayout(new FillLayout());
- tableViewer = new TableViewer(getComposite());
- tableViewer.getTable().setLinesVisible(true);
- tableViewer.getTable().setHeaderVisible(true);
- firstNameColumn = new TableColumn(tableViewer.getTable(), SWT.NONE);
- firstNameColumn.setWidth(50);
- lastNameColumn = new TableColumn(tableViewer.getTable(), SWT.NONE);
- lastNameColumn.setWidth(50);
- stateColumn = new TableColumn(tableViewer.getTable(), SWT.NONE);
- stateColumn.setWidth(50);
- fancyColumn = new TableColumn(tableViewer.getTable(), SWT.NONE);
- fancyColumn.setWidth(250);
-
- catalog = SampleData.CATALOG_2005; // Lodging source
- category = SampleData.WINTER_CATEGORY;
-
- images = new Image[] {
- getShell().getDisplay().getSystemImage(SWT.ICON_ERROR),
- getShell().getDisplay().getSystemImage(SWT.ICON_WARNING),
- getShell().getDisplay().getSystemImage(SWT.ICON_INFORMATION), };
- }
-
- protected void tearDown() throws Exception {
- // do any teardown work here
- super.tearDown();
- tableViewer.getTable().dispose();
- tableViewer = null;
- firstNameColumn = null;
- lastNameColumn = null;
- stateColumn = null;
- }
-
- public void testScenario01() {
- // Show that a TableViewer with three columns renders the accounts
- Account[] accounts = catalog.getAccounts();
-
- IObservableList list = new WritableList(new ArrayList(), Account.class);
- list.addAll(Arrays.asList(accounts));
-
- ObservableListContentProvider contentProvider = new ObservableListContentProvider();
- IObservableMap[] attributeMaps = BeansObservables.observeMaps(
- contentProvider.getKnownElements(), Account.class,
- new String[] { "firstName", "lastName", "state" });
-
- tableViewer.setContentProvider(contentProvider);
- tableViewer.setLabelProvider(new ObservableMapLabelProvider(
- attributeMaps));
- tableViewer.setInput(list);
-
- Table table = tableViewer.getTable();
-
- // Verify the data in the table columns matches the accounts
- for (int i = 0; i < accounts.length; i++) {
- Account account = catalog.getAccounts()[i];
- TableItem item = table.getItem(i);
-
- assertEquals(account.getFirstName(), item.getText(0));
- assertEquals(account.getLastName(), item.getText(1));
- assertEquals(account.getState(), item.getText(2));
- }
- }
-
- public void testScenario02() throws SecurityException,
- IllegalArgumentException {
- // Show that a TableViewer with three columns can be used to update
- // columns
- // Account[] accounts = catalog.getAccounts();
- //
- // TableModelDescription tableModelDescription = new
- // TableModelDescription(new Property(catalog, "accounts"), new
- // String[]{"firstName","lastName","state"});
- // // tableViewerDescription.addEditableColumn("firstName");
- // // tableViewerDescription.addEditableColumn("lastName", null, null,
- // new PhoneConverter());
- // // tableViewerDescription.addEditableColumn("state", null, null, new
- // StateConverter());
- // getDbc().bind(tableViewer,
- // tableModelDescription, null);
- //
- // Account account = accounts[0];
- // // Select the first item in the table
- // tableViewer.editElement(account, 0);
- // // Set the text property of the cell editor which is now active over
- // the "firstName" column
- // CellEditor[] cellEditors = tableViewer.getCellEditors();
- // TextCellEditor firstNameEditor = (TextCellEditor) cellEditors[0];
- // // Change the firstName and test it goes to the model
- // enterText((Text) firstNameEditor.getControl(), "Bill");
- // // Check whether the model has changed
- // assertEquals("Bill",account.getFirstName());
- }
-
- public void testScenario04() {
- // // Show that when an item is added to a collection the table gets an
- // extra item
- // Account[] accounts = catalog.getAccounts();
- //
- // TableViewerDescription tableViewerDescription = new
- // TableViewerDescription(
- // tableViewer);
- // tableViewerDescription.addColumn("firstName");
- // tableViewerDescription.addColumn("lastName");
- // tableViewerDescription.addColumn("state");
- // tableViewerDescription.addColumn(null,new IConverter(){
- //
- // public Class getModelType() {
- // return Account.class;
- // }
- //
- // public Class getTargetType() {
- // return ViewerLabel.class;
- // }
- //
- // public Object convertTargetToModel(Object targetObject) {
- // return null;
- // }
- //
- // public Object convertModelToTarget(Object modelObject) {
- // Account account = (Account) modelObject;
- // return new ViewerLabel(account.toString(), images[new
- // Random().nextInt(images.length)]);
- // }});
- // getDbc().bind(tableViewerDescription,
- // new Property(catalog, "accounts"), null);
- //
- // //interact();
- //
- // // Verify the number of accounts matches the number of items in the
- // table
- // assertEquals(tableViewer.getTable().getItemCount(),accounts.length);
- // // Add a new account and verify that the number of items in the table
- // increases
- // Account newAccount = new Account();
- // newAccount.setFirstName("Finbar");
- // newAccount.setLastName("McGoo");
- // newAccount.setLastName("NC");
- // catalog.addAccount(newAccount);
- // // The number of items should have gone up by one
- // assertEquals(tableViewer.getTable().getItemCount(),accounts.length +
- // 1);
- // // The number of items should still match the number of accounts
- // (i.e. test the model)
- // assertEquals(tableViewer.getTable().getItemCount(),catalog.getAccounts().length);
- // // Remove the account that was just added
- // catalog.removeAccount(newAccount);
- // // The number of items should match the original
- // assertEquals(tableViewer.getTable().getItemCount(),accounts.length);
- // // The number of items should still match the number of accounts
- // (i.e. test the model is reset)
- // assertEquals(tableViewer.getTable().getItemCount(),catalog.getAccounts().length);
- //
- // // Test adding and removing to the model on a non UI thread
- // int numberOfAccounts = catalog.getAccounts().length;
- // final Account barney = new Account();
- // barney.setFirstName("Barney");
- // barney.setLastName("Smith");
- // barney.setLastName("CA");
- // invokeNonUI(new Runnable(){
- // public void run(){
- // catalog.addAccount(barney);
- // }
- // });
- // spinEventLoop(0);
- // // The number of items should have gone up by one
- // assertEquals(tableViewer.getTable().getItemCount(),numberOfAccounts +
- // 1);
- //
- // invokeNonUI(new Runnable(){
- // public void run(){
- // catalog.removeAccount(barney);
- // }
- // });
- // spinEventLoop(0);
- // // The number of items should have reverted to the original number
- // before barney was added and removed
- // assertEquals(tableViewer.getTable().getItemCount(),numberOfAccounts);
- //
- }
-
- public void testScenario03() {
- // // Show that converters work for table columns
- // Account[] accounts = catalog.getAccounts();
- //
- // TableViewerDescription tableViewerDescription = new
- // TableViewerDescription(
- // tableViewer);
- // tableViewerDescription.addEditableColumn("lastName");
- // tableViewerDescription.addEditableColumn("phone", null, null ,
- // new PhoneConverter());
- // tableViewerDescription.addEditableColumn("state", null, null ,
- // new StateConverter());
- // getDbc().bind(tableViewerDescription,
- // new Property(catalog, "accounts"), null);
- //
- // // Verify that the data in the the table columns matches the expected
- // // What we are looking for is that the phone numbers are converterted
- // to
- // // nnn-nnn-nnnn and that
- // // the state letters are converted to state names
- // // Verify the data in the table columns matches the accounts
- // PhoneConverter phoneConverter = new PhoneConverter();
- // StateConverter stateConverter = new StateConverter();
- // for (int i = 0; i < accounts.length; i++) {
- // Account account = catalog.getAccounts()[i];
- // // Check the phone number
- // String col_phone = ((ITableLabelProvider) tableViewer
- // .getLabelProvider()).getColumnText(account, 1);
- // assertEquals(getValue((String)phoneConverter
- // .convertModelToTarget(account.getPhone())), col_phone);
- // String col_state = ((ITableLabelProvider) tableViewer
- // .getLabelProvider()).getColumnText(account, 2);
- // assertEquals(getValue((String)stateConverter
- // .convertModelToTarget(account.getState())), col_state);
- // }
- }
-
- public void testScenario05() {
- // // Show that when the model changes then the UI refreshes to reflect
- // this
- //
- // TableViewerDescription tableViewerDescription = new
- // TableViewerDescription(
- // tableViewer);
- // tableViewerDescription.addColumn("lastName");
- // tableViewerDescription.addColumn("phone",
- // new PhoneConverter());
- // tableViewerDescription.addColumn("state",
- // new StateConverter());
- // getDbc().bind(tableViewerDescription,
- // new Property(catalog, "accounts"), null);
- //
- // final Account account = catalog.getAccounts()[0];
- // String lastName = tableViewer.getTable().getItem(0).getText(0);
- // // Check the firstName in the TableItem is the same as the model
- // assertEquals(lastName,account.getLastName());
- // // Now change the model and check again
- // account.setLastName("Gershwin");
- // lastName = tableViewer.getTable().getItem(0).getText(0);
- // assertEquals(lastName,account.getLastName());
- //
- // // Test the model update on a non UI thread
- // invokeNonUI(new Runnable(){
- // public void run(){
- // account.setLastName("Mozart");
- // }
- // });
- // spinEventLoop(0);
- // lastName = tableViewer.getTable().getItem(0).getText(0);
- // assertEquals(lastName,account.getLastName());
- //
- }
-
- public void testScenario06() {
- // // Check that explicit type means that defaulting of converters works
- // TableViewerDescription tableViewerDescription = new
- // TableViewerDescription(
- // tableViewer);
- // tableViewerDescription.addEditableColumn("price");
- // tableViewerDescription.getColumn(0).setPropertyType(Double.TYPE);
- // getDbc().bind(tableViewerDescription,
- // new Property(catalog, "transporations"), null);
- // Transportation transporation = catalog.getTransporations()[0];
- // tableViewer.editElement(transporation, 0);
- // // Set the text property of the cell editor which is now active over
- // the "firstName" column
- // CellEditor[] cellEditors = tableViewer.getCellEditors();
- // TextCellEditor priceEditor = (TextCellEditor) cellEditors[0];
- // // Change the firstName and test it goes to the model
- // enterText((Text) priceEditor.getControl(), "123.45");
- // // Verify the model is updated
- // assertEquals(transporation.getPrice(),123.45,0);
-
- }
-
- public void testScenario07() {
- // // Verify that even when a column's property type is not set, that it
- // is worked out lazily from the target type
- // TableViewerDescription tableViewerDescription = new
- // TableViewerDescription(
- // tableViewer);
- // tableViewerDescription.addEditableColumn("price");
- // // The column's type is not set to be Double.TYPE. This will be
- // inferred once the first Transportation object is set
- // // into the ObservableCollection
- // getDbc().bind(tableViewerDescription,
- // new Property(catalog, "transporations"), null);
- // Transportation transporation = catalog.getTransporations()[0];
- // tableViewer.editElement(transporation, 0);
- // // Set the text property of the cell editor which is now active over
- // the "firstName" column
- // CellEditor[] cellEditors = tableViewer.getCellEditors();
- // TextCellEditor priceEditor = (TextCellEditor) cellEditors[0];
- // // Change the firstName and test it goes to the model
- // enterText((Text) priceEditor.getControl(), "123.45");
- // // Verify the model is updated
- // assertEquals(transporation.getPrice(),123.45,0);
- //
- }
-
- public void testScenario08_00() {
- // // Verify that binding to a Collection property (rather than an
- // array) works when specifying data type
- // TableViewerDescription tableViewerDescription = new
- // TableViewerDescription(
- // tableViewer);
- // tableViewerDescription.addEditableColumn("userId");
- // tableViewerDescription.addEditableColumn("password");
- // getDbc().bind(tableViewerDescription,
- // new Property(catalog, "signons", Signon.class, null), null);
- // Signon firstSignon = (Signon) catalog.getSignons().get(0);
- // // Verify the UI matches the model
- // TableItem firstTableItem = tableViewer.getTable().getItem(0);
- // assertEquals(firstTableItem.getText(1),firstSignon.getPassword());
- // // Change the model and ensure the UI refreshes
- // firstSignon.setPassword("Eclipse123Rocks");
- // assertEquals("Eclipse123Rocks",firstSignon.getPassword());
- // assertEquals(firstTableItem.getText(1),firstSignon.getPassword());
- // // Change the GUI and ensure the model refreshes
- // tableViewer.editElement(firstSignon, 1);
- // CellEditor[] cellEditors = tableViewer.getCellEditors();
- // TextCellEditor passwordEditor = (TextCellEditor) cellEditors[1];
- // enterText((Text) passwordEditor.getControl(), "Cricket11Players");
- // assertEquals("Cricket11Players",firstSignon.getPassword());
- //
- }
-
- public void testScenario08_01() {
- // // Verify that binding to a Collection property (rather than an
- // array) works without specifying data type
- // TableViewerDescription tableViewerDescription = new
- // TableViewerDescription(
- // tableViewer);
- // tableViewerDescription.addEditableColumn("userId");
- // tableViewerDescription.addEditableColumn("password");
- // getDbc().bind(tableViewerDescription,
- // new Property(catalog, "signons"), null);
- // Signon firstSignon = (Signon) catalog.getSignons().get(0);
- // // Verify the UI matches the model
- // TableItem firstTableItem = tableViewer.getTable().getItem(0);
- // assertEquals(firstTableItem.getText(1),firstSignon.getPassword());
- // // Change the model and ensure the UI refreshes
- // firstSignon.setPassword("Eclipse123Rocks");
- // assertEquals("Eclipse123Rocks",firstSignon.getPassword());
- // assertEquals(firstTableItem.getText(1),firstSignon.getPassword());
- // // Change the GUI and ensure the model refreshes
- // tableViewer.editElement(firstSignon, 1);
- // CellEditor[] cellEditors = tableViewer.getCellEditors();
- // TextCellEditor passwordEditor = (TextCellEditor) cellEditors[1];
- // enterText((Text) passwordEditor.getControl(), "Cricket11Players");
- // assertEquals("Cricket11Players",firstSignon.getPassword());
- //
- }
-
- public void testScenario09() {
- // // Verify that nested properties work. Catalog has adventures.
- // Adventure has defaultLodging. Loding has name.
- // TableViewerDescription tableViewerDescription = new
- // TableViewerDescription(tableViewer);
- // tableViewerDescription.addColumn("name");
- // tableViewerDescription.addColumn("defaultLodging.name");
- // getDbc().bind(tableViewerDescription,new Property(category,
- // "adventures"),null);
- //
- }
- /**
- * public void testScenario10(){ // Verify that for TIME_EARLY updating
- * occurs on a per key basic for a TextCellEditor // Show that converters
- * work for table columns Account[] accounts = catalog.getAccounts();
- * Account firstAccount = accounts[0];
- * SampleData.getSWTObservableFactory().setUpdateTime(DataBindingContext.TIME_EARLY);
- * TableViewerDescription tableViewerDescription = new
- * TableViewerDescription(tableViewer);
- * tableViewerDescription.addEditableColumn("lastName");
- * tableViewerDescription.addColumn("lastName");
- * getDbc().bind(tableViewerDescription,new Property(catalog, "accounts"),
- * null); // Verify that the first account is shown in the first row with
- * the last name correctly
- * assertEquals(tableViewer.getTable().getItem(0).getData(),firstAccount);
- * assertEquals(tableViewer.getTable().getItem(0).getText(0),firstAccount.getLastName());
- * assertEquals(tableViewer.getTable().getItem(0).getText(1),firstAccount.getLastName()); //
- * Create a cell editor over the first column
- * tableViewer.editElement(firstAccount, 0); // Set the text property of the
- * cell editor which is now active over the "firstName" column CellEditor[]
- * cellEditors = tableViewer.getCellEditors(); TextCellEditor
- * lastNameCellEditor = (TextCellEditor) cellEditors[0];
- * ((Text)lastNameCellEditor.getControl()).setText("E"); // Verify that the
- * key press goes to the model assertEquals(firstAccount.getLastName(),"E"); }
- */
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/TextControlScenario.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/TextControlScenario.java
deleted file mode 100644
index 37f4f1d7..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/TextControlScenario.java
+++ /dev/null
@@ -1,302 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920
- *******************************************************************************/
-package org.eclipse.jface.tests.databinding.scenarios;
-
-import org.eclipse.core.databinding.DataBindingContext;
-import org.eclipse.core.databinding.beans.BeansObservables;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.jface.examples.databinding.model.Account;
-import org.eclipse.jface.examples.databinding.model.Adventure;
-import org.eclipse.jface.examples.databinding.model.SampleData;
-import org.eclipse.jface.examples.databinding.model.Transportation;
-import org.eclipse.jface.tests.databinding.BindingTestSuite;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * To run the tests in this class, right-click and select "Run As JUnit Plug-in
- * Test". This will also start an Eclipse instance. To clean up the launch
- * configuration, open up its "Main" tab and select "[No Application] - Headless
- * Mode" as the application to run.
- */
-
-public class TextControlScenario extends ScenariosTestCase {
-
- private Text text;
-
- private Adventure adventure;
-
- private Transportation transportation;
-
- Account account;
-
- protected void setUp() throws Exception {
- super.setUp();
- // do any setup work here
- adventure = SampleData.WINTER_HOLIDAY;
- transportation = SampleData.EXECUTIVE_JET;
- account = SampleData.PRESIDENT;
- text = new Text(getComposite(), SWT.BORDER);
- }
-
- protected void tearDown() throws Exception {
- text.dispose();
- text = null;
- super.tearDown();
- }
-
- public void testScenario01() {
- // Bind the adventure "name" property to a text field
- // Change the UI and verify the model changes
- // Change the model and verify the UI changes
- getDbc().bindValue(SWTObservables.observeText(text, SWT.Modify),
- BeansObservables.observeValue(adventure, "name"),
- null);
-
- assertEquals(adventure.getName(), text.getText());
- text.setText("England");
- text.notifyListeners(SWT.FocusOut, null);
- assertEquals("England", adventure.getName());
- adventure.setName("France");
- assertEquals("France", text.getText());
- adventure.setName("Germany");
- spinEventLoop(0);
- assertEquals("Germany", text.getText());
- }
-
- public void testScenario02() {
-
- // Bind the transportation "price" property to a text field
- // This is a Double.TYPE so we check that conversion and validation
- // occurs
- // Change the UI and verify the model changes
- // Change the model and verify the UI changes
- getDbc().bindValue(SWTObservables.observeText(text, SWT.Modify),
- BeansObservables.observeValue(transportation, "price"),
- null);
-
- assertEquals(Double.toString(transportation.getPrice()), text.getText());
- text.setText("9876.54");
- text.notifyListeners(SWT.FocusOut, null);
- assertEquals(9876.54, transportation.getPrice(), 0);
- transportation.setPrice(1234.56);
- assertEquals("1234.56", text.getText());
- }
-
- public void testScenario03() {
- // Show that the Escape key can be pressed in the middle of editing and
- // the value will revert
- // the updatePolicy for this test is TIME_LATE so it occurs when focus
- // is lost from the Text control
- getDbc().bindValue(SWTObservables.observeText(text, SWT.FocusOut),
- BeansObservables.observeValue(adventure, "name"),
- null);
-
- String currentText = text.getText();
- text.setText("Switzerland");
- // We do not notify FocusOut
- // Verify that the model hasn't changed
- assertEquals(currentText, adventure.getName());
- Event event = new Event();
- event.character = SWT.ESC;
- event.keyCode = 27;
- text.notifyListeners(SWT.KeyDown, event);
- // Verify that the text has reverted
- assertEquals(currentText, text.getText());
- // And that the model didn't change
- assertEquals(adventure.getName(), currentText);
- // Now change the GUI and commit this change
- currentText = "Austria";
- text.setText(currentText);
- text.notifyListeners(SWT.FocusOut, null);
- assertEquals(text.getText(), adventure.getName());
- // Now change the text again and press escape a second time
- text.setText("Turkey");
- // Send escape
- text.notifyListeners(SWT.KeyDown, event);
- // Verify it has reverted to "Austria" and not any other value, i.e. the
- // last value it displayed
- assertEquals(currentText, text.getText());
-
- }
-
- public void testScenario04() {
- // Show that the Escape key can be pressed in the middle of editing and
- // the value will revert
- // the updatePolicy for this test is TIME_EARLY so it occurs when each
- // keystroke occurs
- getDbc().bindValue(SWTObservables.observeText(text, SWT.Modify),
- BeansObservables.observeValue(adventure, "name"),
- null);
-
- String originalName = adventure.getName();
- // Change the text field character by character and ensure that the
- // model changes
- String newName = "Switzerland";
- for (int i = 0; i < newName.length(); i++) {
- text.setText(newName.substring(0, i + 1));
- // Verify the model has changed
- assertEquals(newName.substring(0, i + 1), adventure.getName());
- }
- // Now send an escape key and verify that the model reverts
- Event event = new Event();
- event.character = SWT.ESC;
- event.keyCode = 27;
- text.notifyListeners(SWT.KeyDown, event);
- assertEquals(adventure.getName(), originalName);
- // Now send "Austria" key by key
- newName = "Austria";
- for (int i = 0; i < newName.length(); i++) {
- text.setText(newName.substring(0, i + 1));
- // Verify the model has changed
- assertEquals(newName.substring(0, i + 1), adventure.getName());
- }
- // Send a focus lost event to commit the change
- text.notifyListeners(SWT.FocusOut, null);
- // Send an escape key
- text.notifyListeners(SWT.KeyDown, event);
- // Verify that the model has changed and has not reverted
- assertEquals(newName, adventure.getName());
- }
-
- /**
- * public void testScenario05(){ // Show that nesting of properties works.
- * Adventure has defaultLodging and Lodging has name getDbc().bind(text,new
- * Property(adventure,"defaultLodging.name"),null); // Verify the GUI is
- * showing the model value
- * assertEquals(text.getText(),adventure.getDefaultLodging().getName()); }
- */
- public void testScenario06() {
- // // Show that partial validation works for TIME_EARLY
- // // We are using TIME_EARLY to verify that invalid states are not sent
- // to the model
- // getSWTObservableFactory().setUpdateTime(DataBindingContext.TIME_EARLY);
- // getDbc().bind(text, new Property(account, "phone"), new BindSpec(new
- // PhoneConverter(),new PhoneValidator()));
- // // Verify we have no error message for partial validation or full
- // validation yet
- // assertTrue(((String)getDbc().getPartialValidationMessage().getValue()).length()
- // == 0);
- // assertTrue(((String)getDbc().getValidationMessage().getValue()).length()
- // == 0);
- // // Update some of the phone number
- // String originalPhoneNumber = account.getPhone();
- // text.setText("999");
- // // Verify that the phone number is partially invalid and there is no
- // validation message
- // assertTrue(((String)getDbc().getPartialValidationMessage().getValue()).length()
- // > 0);
- // assertTrue(((String)getDbc().getValidationMessage().getValue()).length()
- // == 0);
- // // And that the model has not changed
- // assertEquals(account.getPhone(),originalPhoneNumber);
- // // Verify that fixing the phone removes the error and the model is
- // updated too
- // text.setText("999-888-7777");
- // assertTrue(((String)getDbc().getPartialValidationMessage().getValue()).length()
- // == 0);
- // assertEquals(account.getPhone(),"9998887777");
- }
-
- public void testScenario07() {
- // // Show that partial validation works for TIME_LATE
- // getSWTObservableFactory().setUpdateTime(DataBindingContext.TIME_LATE);
- // getDbc().bind(text, new Property(account, "phone"), new BindSpec(new
- // PhoneConverter(),new PhoneValidator()));
- // // Update some of the phone number
- // String originalPhoneNumber = account.getPhone();
- // text.setText("222");
- // // Verify that we have no completion validation message and a partial
- // one
- // assertTrue(((String)getDbc().getPartialValidationMessage().getValue()).length()
- // > 0);
- // assertTrue(((String)getDbc().getValidationMessage().getValue()).length()
- // == 0);
- // // Fix the error
- // text.setText("222-333-4444");
- // // Verify that the errors are both fixed
- // assertTrue(((String)getDbc().getPartialValidationMessage().getValue()).length()
- // == 0);
- // assertTrue(((String)getDbc().getValidationMessage().getValue()).length()
- // == 0);
- // // The model should not be changed
- // assertEquals(originalPhoneNumber,account.getPhone());
- // // Lose focus and verify that the complete validation message is
- // fixed
- // text.notifyListeners(SWT.FocusOut,null);
- // assertTrue(((String)getDbc().getValidationMessage().getValue()).length()
- // == 0);
- // // The model should be changed
- // assertEquals("2223334444",account.getPhone());
- }
-
- public void testScenario08() {
-
- if (BindingTestSuite.failingTestsDisabled(this)) {
- return;
- }
-
- // Show that the CustomBeanBindSupportFactory will automatically pick up
- // the
- // validator on the MaxNumberOfPeople property
-
- DataBindingContext dbc = getDbc();
-
- dbc.bindValue(SWTObservables.observeText(text, SWT.Modify), BeansObservables.observeValue(adventure, "maxNumberOfPeople"), new CustomBeanBindSpec());
-
- // make sure we can set a value inside the validator's range
- text.setText("4");
- assertEquals(4, adventure.getMaxNumberOfPeople());
- // Now try to set a value outside the validator's range
- text.setText("999");
- assertEquals(4, adventure.getMaxNumberOfPeople());
- dbc.dispose();
- }
-
- public void testScenario09() {
- // Verify direct binding between a Text and Label following bugzilla
- // 118696
- Label label = new Label(getComposite(), SWT.NONE);
- getDbc().bindValue(SWTObservables.observeText(text, SWT.FocusOut), SWTObservables.observeText(label), null);
-
- // Change the text
- text.setText("Frog");
- // Verify the label does not change
- assertTrue(label.getText().length() == 0);
- // Lose focus from the text field
- text.notifyListeners(SWT.FocusOut, null);
- assertEquals(label.getText(), "Frog");
-
- }
-
- public void testScenario10() {
- // Verify direct binding between a Text and Label following bugzilla
- // 118696 with TIME_EARLY
- Label label = new Label(getComposite(), SWT.NONE);
- getDbc().bindValue(SWTObservables.observeText(text, SWT.Modify), SWTObservables.observeText(label), null);
-
- // Change the text
- String newTextValue = "Frog";
- for (int i = 0; i < newTextValue.length(); i++) {
- text.setText(newTextValue.substring(0, i + 1));
- // Verify the label has changed key by key
- assertEquals(text.getText(), label.getText());
- }
- // Lose focus
- text.notifyListeners(SWT.FocusOut, null);
- // Verify the text and label are the same following a lose focus
- assertEquals(text.getText(), label.getText());
- }
-
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/smoketest/swt.xswt b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/smoketest/swt.xswt
deleted file mode 100644
index 0097d63e..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/smoketest/swt.xswt
+++ /dev/null
@@ -1,301 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xswt xmlns:x="http://sweet_swt.sf.net/xswt">
- <import xmlns="http://sweet_swt.sf.net/xswt">
- <package name="java.lang"/>
- <package name="org.eclipse.swt.widgets"/>
- <package name="org.eclipse.swt.custom"/>
- <package name="org.eclipse.swt.layout"/>
- </import>
-
- <!-- An XSWT example that uses nearly every SWT control and uses the new
- syntax wherever possible.
-
- Get XSWT at:
-
- http://xswt.sourceforge.net/updates
-
- then choose Window | Show View | Other... | XSWT Views | XSWT Preview -->
-
- <layout x:class="gridLayout"/>
-
- <label text="SWT Controls:"/>
- <tabFolder>
- <layoutData x:class="gridData" grabExcessHorizontalSpace="true" grabExcessVerticalSpace="true" horizontalAlignment="GridData.FILL" verticalAlignment="GridData.FILL"/>
-
- <composite x:id="Text">
- <layoutData x:class="gridData" grabExcessHorizontalSpace="true" horizontalAlignment="GridData.FILL"/>
- <layout x:class="gridLayout" numColumns="2"/>
-
- <composite x:style="BORDER">
- <layoutData x:class="gridData" grabExcessHorizontalSpace="true" verticalAlignment="GridData.FILL" horizontalAlignment="GridData.FILL"/>
- <layout x:class="gridLayout" numColumns="2"/>
-
- <label text="Integer:"/><text x:style="BORDER" x:id="intText" text="1"/>
- <label text="Float:"/><text x:style="BORDER" x:id="floatText" text="1.0"/>
- <label text="String:"/><text x:style="BORDER" x:id="stringText" text="The quick brown fox jumped over the lazy dog."/>
- <label text="RegexValidated String:"/><text x:style="BORDER" x:id="regexStringText" text="The quick brown fox jumped over the lazy dog."/>
- <label text="Masked String:"/><text x:style="BORDER" x:id="maskedStringText" background="208 128 128"/>
- </composite>
- <slider x:style="VERTICAL" x:id="buttonScroller">
- <layoutData x:class="gridData" verticalAlignment="GridData.FILL"/>
- </slider>
- </composite>
- <tabItem text="Text" control="Text"/>
-
- <composite x:id="Labels">
- <layoutData x:class="gridData" grabExcessHorizontalSpace="true" horizontalAlignment="GridData.FILL"/>
- <layout x:class="gridLayout" numColumns="2"/>
-
- <composite x:style="BORDER">
- <layoutData x:class="gridData" grabExcessHorizontalSpace="true" verticalAlignment="GridData.FILL" horizontalAlignment="GridData.FILL"/>
- <layout x:class="gridLayout" numColumns="1"/>
-
- <label text="Label with text"/>
- <label text="Label with image"/>
- <label text="Label with text and image"/>
- <label x:style="SEPARATOR | HORIZONTAL"><layoutData x:class="gridData" grabExcessHorizontalSpace="true" horizontalAlignment="GridData.FILL"/></label>
- <cLabel text="CLabel with text"/>
- <cLabel text="CLabel with image"/>
- <cLabel text="CLabel with text and image"/>
- </composite>
- <slider x:style="VERTICAL" x:id="textScroller"/>
- </composite>
- <tabItem text="Label / CLabel" control="Labels"/>
-
- <composite x:id="Button">
- <layoutData x:class="gridData" grabExcessHorizontalSpace="true" horizontalAlignment="GridData.FILL"/>
- <layout x:class="gridLayout" numColumns="2"/>
-
- <composite x:style="BORDER">
- <layoutData x:class="gridData" grabExcessHorizontalSpace="true" verticalAlignment="GridData.FILL" horizontalAlignment="GridData.FILL"/>
- <layout x:class="gridLayout" numColumns="2"/>
-
- <label text="Push:"/><button x:id="pushButton" text="PushButton"/>
- <label text="Arrow:"/><button x:id="arrowButton" x:style="ARROW" text="ArrowButton"/>
- <label text="Toggle:"/><button x:id="toggleButton" x:style="TOGGLE" text="ToggleButton"/>
- <label text="Check:"/><button x:style="CHECK" x:id="checkButton" text="CheckBox"/>
- <label text="Radio Group 1:"/>
- <composite x:style="BORDER" x:id="radioGroup1">
- <layoutData x:class="gridData" horizontalAlignment="GridData.FILL"/>
- <layout x:class="gridLayout" numColumns="1"/>
-
- <button x:style="RADIO" x:id="radioButton0.1" text="Radio"/>
- <button x:style="RADIO" x:id="radioButton0.2" text="Radio2" selection="true"/>
- <button x:style="RADIO" x:id="radioButton0.3" text="Radio3"/>
- </composite>
- <label text="Radio Group 2:"/>
- <composite x:style="BORDER" x:id="radioGroup2">
- <layoutData x:class="gridData" horizontalAlignment="GridData.FILL"/>
- <layout x:class="gridLayout" numColumns="1"/>
-
- <button x:style="RADIO" x:id="radioButton1.1" text="Radio"/>
- <button x:style="RADIO" x:id="radioButton1.2" text="Radio2"/>
- <button x:style="RADIO" x:id="radioButton1.3" text="Radio3"/>
- </composite>
- </composite>
- <slider x:style="VERTICAL" x:id="1buttonScroller">
- <layoutData x:class="gridData" verticalAlignment="GridData.FILL"/>
- </slider>
- </composite>
- <tabItem text="Button" control="Button"/>
-
- <composite x:id="List">
- <layoutData x:class="gridData" grabExcessHorizontalSpace="true" horizontalAlignment="GridData.FILL"/>
- <layout x:class="gridLayout" numColumns="1"/>
-
- <composite>
- <layoutData x:class="gridData" grabExcessHorizontalSpace="true" horizontalAlignment="GridData.FILL" grabExcessVerticalSpace="true" verticalAlignment="GridData.FILL"/>
- <layout x:class="fillLayout" type="VERTICAL"/>
-
- <list x:style="BORDER | V_SCROLL | MULTI"/>
- <list x:style="BORDER | V_SCROLL"/>
- </composite>
- </composite>
- <tabItem text="List" control="List"/>
-
- <composite x:id="Combos">
- <layoutData x:class="gridData" grabExcessHorizontalSpace="true" horizontalAlignment="GridData.FILL"/>
- <layout x:class="gridLayout" numColumns="2"/>
-
- <composite x:style="BORDER">
- <layoutData x:class="gridData" grabExcessHorizontalSpace="true" verticalAlignment="GridData.FILL" horizontalAlignment="GridData.FILL"/>
- <layout x:class="gridLayout" numColumns="1"/>
-
- <combo>
- <add x:p0="item1"/>
- <add x:p0="item2"/>
- <add x:p0="item3"/>
- </combo>
- <combo x:style="SIMPLE">
- <add x:p0="item1"/>
- <add x:p0="item2"/>
- <add x:p0="item3"/>
- </combo>
- <combo x:style="READ_ONLY">
- <add x:p0="item1"/>
- <add x:p0="item2"/>
- <add x:p0="item3"/>
- </combo>
- <label x:style="SEPARATOR | HORIZONTAL"><layoutData x:class="gridData" grabExcessHorizontalSpace="true" horizontalAlignment="GridData.FILL"/></label>
- <cCombo>
- <add x:p0="item1"/>
- <add x:p0="item2"/>
- <add x:p0="item3"/>
- </cCombo>
- <cCombo x:style="READ_ONLY" background="255 255 255">
- <add x:p0="item1"/>
- <add x:p0="item2"/>
- <add x:p0="item3"/>
- </cCombo>
- </composite>
- <slider x:style="VERTICAL" x:id="2buttonScroller">
- <layoutData x:class="gridData" verticalAlignment="GridData.FILL"/>
- </slider>
- </composite>
- <tabItem text="Combo / CCombo" control="Combos"/>
-
- <composite x:id="Table">
- <layoutData x:class="gridData" grabExcessHorizontalSpace="true" horizontalAlignment="GridData.FILL"/>
- <layout x:class="gridLayout" numColumns="1"/>
-
- <composite x:style="BORDER">
- <layoutData x:class="gridData" grabExcessHorizontalSpace="true" grabExcessVerticalSpace="true" horizontalAlignment="GridData.FILL" verticalAlignment="GridData.FILL"/>
- <layout x:class="gridLayout" numColumns="2"/>
-
- <table x:style="BORDER" linesVisible="true" headerVisible="true">
- <layoutData x:class="gridData" grabExcessHorizontalSpace="true" grabExcessVerticalSpace="true" horizontalAlignment="GridData.FILL" verticalAlignment="GridData.FILL"/>
-
- <tableColumn width="50" text="Done"/>
- <tableColumn width="200" text="Description"/>
- <tableColumn width="60" text="Planned"/>
- <tableColumn width="60" text="Revised"/>
- <tableColumn width="60" text="Actual"/>
- <!--<tableItem/>-->
- </table>
- </composite>
- </composite>
- <tabItem text="Table" control="Table"/>
-
- <composite x:id="Tree">
- <layoutData x:class="gridData" grabExcessHorizontalSpace="true" horizontalAlignment="GridData.FILL"/>
- <layout x:class="gridLayout" numColumns="1"/>
-
- <composite x:style="BORDER">
- <layoutData x:class="gridData" grabExcessHorizontalSpace="true" grabExcessVerticalSpace="true" horizontalAlignment="GridData.FILL" verticalAlignment="GridData.FILL"/>
- <layout x:class="gridLayout" numColumns="2"/>
-
- <tree x:style="BORDER">
- <layoutData x:class="gridData" grabExcessHorizontalSpace="true" grabExcessVerticalSpace="true" horizontalAlignment="GridData.FILL" verticalAlignment="GridData.FILL"/>
-
- <treeItem text="item">
- <x:children>
- <treeItem text="item"/>
- <treeItem text="item"/>
- <treeItem text="item">
- <x:children>
- <treeItem text="item"/>
- <treeItem text="item"/>
- <treeItem text="item"/>
- <treeItem text="item"/>
- <treeItem text="item"/>
- </x:children>
- </treeItem>
- <treeItem text="item"/>
- </x:children>
- </treeItem>
- <treeItem text="item with Image (or at least needs one)">
- <x:children>
- <treeItem text="item"/>
- <treeItem text="item"/>
- </x:children>
- </treeItem>
- <treeItem text="Another item">
- <x:children>
- <treeItem text="item"/>
- <treeItem text="item"/>
- <treeItem text="item"/>
- <treeItem text="item"/>
- <treeItem text="item"/>
- </x:children>
- </treeItem>
- </tree>
- </composite>
- </composite>
- <tabItem text="Tree" control="Tree"/>
-
- <composite x:id="TableTree">
- <layoutData x:class="gridData" grabExcessHorizontalSpace="true" horizontalAlignment="GridData.FILL"/>
- <layout x:class="gridLayout" numColumns="1"/>
-
- <composite x:style="BORDER">
- <layoutData x:class="gridData" grabExcessHorizontalSpace="true" grabExcessVerticalSpace="true" horizontalAlignment="GridData.FILL" verticalAlignment="GridData.FILL"/>
- <layout x:class="gridLayout" numColumns="2"/>
-
- <tableTree x:style="BORDER">
- <layoutData x:class="gridData" grabExcessHorizontalSpace="true" grabExcessVerticalSpace="true" horizontalAlignment="GridData.FILL" verticalAlignment="GridData.FILL"/>
-
- <tableTreeItem text="item">
- <x:children>
- <tableTreeItem text="subitem"/>
- <tableTreeItem text="subitem"/>
- </x:children>
- </tableTreeItem>
- <tableTreeItem text="item">
- <x:children>
- <tableTreeItem text="subitem"/>
- <tableTreeItem text="subitem"/>
- <tableTreeItem text="subitem"/>
- <tableTreeItem text="subitem"/>
- <tableTreeItem text="subitem"/>
- </x:children>
- </tableTreeItem>
- <tableTreeItem text="item">
- <x:children>
- <tableTreeItem text="item">
- <x:children>
- <tableTreeItem text="subitem"/>
- </x:children>
- </tableTreeItem>
- <tableTreeItem text="item">
- <x:children>
- <tableTreeItem text="subitem"/>
- <tableTreeItem text="subitem"/>
- <tableTreeItem text="subitem"/>
- <tableTreeItem text="subitem"/>
- <tableTreeItem text="subitem"/>
- </x:children>
- </tableTreeItem>
- <tableTreeItem text="item">
- <x:children>
- <tableTreeItem text="subitem"/>
- <tableTreeItem text="subitem"/>
- <tableTreeItem text="subitem"/>
- </x:children>
- </tableTreeItem>
- </x:children>
- </tableTreeItem>
- </tableTree>
- </composite>
- </composite>
- <tabItem text="TableTree" control="TableTree"/>
-
- <composite x:id="Progress">
- <layoutData x:class="gridData" grabExcessHorizontalSpace="true" horizontalAlignment="GridData.FILL"/>
- <layout x:class="gridLayout" numColumns="2"/>
-
- <composite x:style="BORDER">
- <layoutData x:class="gridData" grabExcessHorizontalSpace="true" verticalAlignment="GridData.FILL" horizontalAlignment="GridData.FILL"/>
- <layout x:class="gridLayout" numColumns="1"/>
-
- <progressBar x:style="INDETERMINATE"/>
- <progressBar x:style="INDETERMINATE | SMOOTH"/>
- <progressBar x:style="SMOOTH" minimum="0" maximum="100" selection="40"/>
- <progressBar minimum="0" maximum="100" selection="60"/>
- </composite>
- <slider x:style="VERTICAL" x:id="3textScroller"/>
- </composite>
- <tabItem text="ProgressBar" control="Progress"/>
-
- </tabFolder>
-</xswt>
-
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/AbstractGetAndSetSelectionObservableCollectionTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/AbstractGetAndSetSelectionObservableCollectionTest.java
deleted file mode 100644
index acac2de6..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/AbstractGetAndSetSelectionObservableCollectionTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.databinding.swt;
-
-import junit.framework.TestCase;
-
-/**
- * @since 1.0
- *
- */
-public abstract class AbstractGetAndSetSelectionObservableCollectionTest extends TestCase {
-//
-// public void testGetSelectedObject() {
-// SelectionAwareObservableCollection observable = getSelectionAwareObservable(new String[] {"foo", "bar"});
-// assertEquals("No initial selection should be found.", null, observable.getSelectedObject());
-// setSelectedValueOfControl("bar");
-// assertEquals("bar", observable.getSelectedObject());
-// }
-//
-// /*
-// * Test method for 'org.eclipse.jface.internal.databinding.swt.CComboObservableCollection.setSelectedObject(Object)'
-// */
-// public void testSetSelectedObject() {
-// SelectionAwareObservableCollection observable = getSelectionAwareObservable(new String[] {"foo", "bar"});
-// observable.setSelectedObject("bar");
-// assertEquals("bar", getSelectedObjectOfControl());
-// observable.setSelectedObject("bar1");
-// assertEquals("bar", getSelectedObjectOfControl());
-// observable.setSelectedObject("foo");
-// assertEquals("foo", getSelectedObjectOfControl());
-// observable.setSelectedObject(null);
-// assertEquals(null, getSelectedObjectOfControl());
-// }
-//
-// protected abstract SelectionAwareObservableCollection getSelectionAwareObservable(String[] values);
-//
-// protected abstract Object getSelectedObjectOfControl();
-//
-// protected abstract void setSelectedValueOfControl(String value);
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/AutoSelectTableViewerCollectionExtendedTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/AutoSelectTableViewerCollectionExtendedTest.java
deleted file mode 100644
index 7ae318b6..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/AutoSelectTableViewerCollectionExtendedTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.databinding.swt;
-
-import junit.framework.TestCase;
-
-/**
- * @since 1.0
- *
- */
-public class AutoSelectTableViewerCollectionExtendedTest extends TestCase {
-//
-// /*
-// * Test method for 'org.eclipse.jface.internal.databinding.swt.CComboObservableCollection.getSelectedObject()'
-// */
-// private TableViewer viewer;
-//
-// protected SelectionAwareObservableCollection getSelectionAwareObservable(String[] values) {
-// Shell shell = BindingScenariosTestSuite.getShell();
-// this.viewer = new TableViewer(shell, SWT.NONE);
-// TableViewerDescription description = new TableViewerDescription(viewer);
-// DataBindingContext ctx = DataBinding.createContext(new IObservableFactory[] {new AutoSelectTableViewerFactory()});
-// SelectionAwareObservableCollection observableCollection = (SelectionAwareObservableCollection) ctx.createObservable(description);
-// observableCollection.setElements(Arrays.asList(values));
-// return observableCollection;
-// }
-//
-// protected Object getSelectedObjectOfControl() {
-// StructuredSelection selection = (StructuredSelection) this.viewer.getSelection();
-// if (selection.isEmpty()) {
-// return null;
-// }
-// return selection.getFirstElement();
-// }
-//
-// protected void setSelectedValueOfControl(String value) {
-// this.viewer.setSelection(new StructuredSelection(new String[]{value}));
-// }
-//
-// /*
-// * Test method for 'org.eclipse.jface.internal.databinding.swt.CComboObservableCollection.setSelectedObject(Object)'
-// */
-// public void testAutoSelect() {
-// SelectionAwareObservableCollection observable = getSelectionAwareObservable(new String[] {"foo", "bar"});
-// assertEquals("foo", getSelectedObjectOfControl());
-// }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/AutoSelectTableViewerCollectionTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/AutoSelectTableViewerCollectionTest.java
deleted file mode 100644
index 923b7f2d..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/AutoSelectTableViewerCollectionTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.databinding.swt;
-
-import junit.framework.TestCase;
-
-/**
- * @since 1.0
- *
- */
-public class AutoSelectTableViewerCollectionTest extends TestCase {
-//
-// /*
-// * Test method for 'org.eclipse.jface.internal.databinding.swt.CComboObservableCollection.getSelectedObject()'
-// */
-// private TableViewer viewer;
-//
-// protected SelectionAwareObservableCollection getSelectionAwareObservable(String[] values) {
-// Shell shell = BindingScenariosTestSuite.getShell();
-// this.viewer = new TableViewer(shell, SWT.NONE);
-// DataBindingContext ctx = DataBinding.createContext(new IObservableFactory[] {new AutoSelectTableViewerFactory()});
-// SelectionAwareObservableCollection observableCollection = (SelectionAwareObservableCollection) ctx.createObservable(new Property(viewer, ViewersProperties.CONTENT, String.class, new Boolean(true)));
-// observableCollection.setElements(Arrays.asList(values));
-// return observableCollection;
-// }
-//
-// protected Object getSelectedObjectOfControl() {
-// StructuredSelection selection = (StructuredSelection) this.viewer.getSelection();
-// if (selection.isEmpty()) {
-// return null;
-// }
-// return selection.getFirstElement();
-// }
-//
-// protected void setSelectedValueOfControl(String value) {
-// this.viewer.setSelection(new StructuredSelection(new String[]{value}));
-// }
-//
-// /*
-// * Test method for 'org.eclipse.jface.internal.databinding.swt.CComboObservableCollection.setSelectedObject(Object)'
-// */
-// public void testAutoSelect() {
-// SelectionAwareObservableCollection observable = getSelectionAwareObservable(new String[] {"foo", "bar"});
-// assertEquals("foo", getSelectedObjectOfControl());
-// }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/CComboObservableCollectionTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/CComboObservableCollectionTest.java
deleted file mode 100644
index 9e0f583e..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/CComboObservableCollectionTest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.databinding.swt;
-
-
-/**
- * @since 1.0
- *
- */
-public class CComboObservableCollectionTest extends AbstractGetAndSetSelectionObservableCollectionTest {
-
-// /*
-// * Test method for 'org.eclipse.jface.internal.databinding.swt.CComboObservableCollection.getSelectedObject()'
-// */
-// private CCombo ccombo;
-//
-// protected SelectionAwareObservableCollection getSelectionAwareObservable(String[] values) {
-// Shell shell = BindingScenariosTestSuite.getShell();
-// this.ccombo = new CCombo(shell, SWT.NONE);
-// for (int i = 0; i < values.length; i++) {
-// this.ccombo.add(values[i]);
-// }
-// DataBindingContext ctx = DataBinding.createContext(new IObservableFactory[] {new SWTObservableFactory()});
-// return (SelectionAwareObservableCollection) ctx.createObservable(new Property(ccombo, SWTProperties.ITEMS, String.class, new Boolean(true)));
-// }
-//
-// protected Object getSelectedObjectOfControl() {
-// int selectionIndex = this.ccombo.getSelectionIndex();
-// if (selectionIndex != -1) {
-// return this.ccombo.getItem(selectionIndex);
-// }
-// return null;
-// }
-//
-// protected void setSelectedValueOfControl(String value) {
-// this.ccombo.setText(value);
-// }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/ComboObservableCollectionTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/ComboObservableCollectionTest.java
deleted file mode 100644
index 0bf4f77b..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/ComboObservableCollectionTest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.databinding.swt;
-
-
-/**
- * @since 1.0
- *
- */
-public class ComboObservableCollectionTest extends AbstractGetAndSetSelectionObservableCollectionTest {
-//
-// /*
-// * Test method for 'org.eclipse.jface.internal.databinding.swt.CComboObservableCollection.getSelectedObject()'
-// */
-// private Combo combo;
-//
-// protected SelectionAwareObservableCollection getSelectionAwareObservable(String[] values) {
-// Shell shell = BindingScenariosTestSuite.getShell();
-// this.combo = new Combo(shell, SWT.NONE);
-// for (int i = 0; i < values.length; i++) {
-// this.combo.add(values[i]);
-// }
-// DataBindingContext ctx = DataBinding.createContext(new IObservableFactory[] {new SWTObservableFactory()});
-// return (SelectionAwareObservableCollection) ctx.createObservable(new Property(combo, SWTProperties.ITEMS, String.class, new Boolean(true)));
-// }
-//
-// protected Object getSelectedObjectOfControl() {
-// int selectionIndex = this.combo.getSelectionIndex();
-// if (selectionIndex != -1) {
-// return this.combo.getItem(selectionIndex);
-// }
-// return null;
-// }
-//
-// protected void setSelectedValueOfControl(String value) {
-// this.combo.select(this.combo.indexOf(value));
-// }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/CopyOfAutoSelectTableViewerCollectionExtendedTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/CopyOfAutoSelectTableViewerCollectionExtendedTest.java
deleted file mode 100644
index bc36fa7c..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/CopyOfAutoSelectTableViewerCollectionExtendedTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.databinding.swt;
-
-import junit.framework.TestCase;
-
-/**
- * @since 1.0
- *
- */
-public class CopyOfAutoSelectTableViewerCollectionExtendedTest extends TestCase {
-//
-// /*
-// * Test method for 'org.eclipse.jface.internal.databinding.swt.CComboObservableCollection.getSelectedObject()'
-// */
-// private TableViewer viewer;
-//
-// protected SelectionAwareObservableCollection getSelectionAwareObservable(String[] values) {
-// Shell shell = BindingScenariosTestSuite.getShell();
-// this.viewer = new TableViewer(shell, SWT.NONE);
-// DataBindingContext ctx = DataBinding.createContext(new IObservableFactory[] {new AutoSelectTableViewerFactory()});
-// SelectionAwareObservableCollection observableCollection = (SelectionAwareObservableCollection) ctx.createObservable(new Property(viewer, ViewersProperties.CONTENT, String.class, new Boolean(true)));
-// observableCollection.setElements(Arrays.asList(values));
-// return observableCollection;
-// }
-//
-// protected Object getSelectedObjectOfControl() {
-// StructuredSelection selection = (StructuredSelection) this.viewer.getSelection();
-// if (selection.isEmpty()) {
-// return null;
-// }
-// return selection.getFirstElement();
-// }
-//
-// protected void setSelectedValueOfControl(String value) {
-// this.viewer.setSelection(new StructuredSelection(new String[]{value}));
-// }
-//
-// /*
-// * Test method for 'org.eclipse.jface.internal.databinding.swt.CComboObservableCollection.setSelectedObject(Object)'
-// */
-// public void testAutoSelect() {
-// SelectionAwareObservableCollection observable = getSelectionAwareObservable(new String[] {"foo", "bar"});
-// assertEquals("foo", getSelectedObjectOfControl());
-// }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/ListObservableCollectionTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/ListObservableCollectionTest.java
deleted file mode 100644
index ba034734..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/ListObservableCollectionTest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.databinding.swt;
-
-
-/**
- * @since 1.0
- *
- */
-public class ListObservableCollectionTest extends AbstractGetAndSetSelectionObservableCollectionTest {
-//
-// /*
-// * Test method for 'org.eclipse.jface.internal.databinding.swt.CComboObservableCollection.getSelectedObject()'
-// */
-// private List listControl;
-//
-// protected SelectionAwareObservableCollection getSelectionAwareObservable(String[] values) {
-// Shell shell = BindingScenariosTestSuite.getShell();
-// this.listControl = new List(shell, SWT.NONE);
-// for (int i = 0; i < values.length; i++) {
-// this.listControl.add(values[i]);
-// }
-// DataBindingContext ctx = DataBinding.createContext(new IObservableFactory[] {new SWTObservableFactory()});
-// return (SelectionAwareObservableCollection) ctx.createObservable(new Property(listControl, SWTProperties.ITEMS, String.class, new Boolean(true)));
-// }
-//
-// protected Object getSelectedObjectOfControl() {
-// int selectionIndex = this.listControl.getSelectionIndex();
-// if (selectionIndex != -1) {
-// return this.listControl.getItem(selectionIndex);
-// }
-// return null;
-// }
-//
-// protected void setSelectedValueOfControl(String value) {
-// this.listControl.setSelection(new String[] {value});
-// }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/ObservableCollectionViewerTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/ObservableCollectionViewerTest.java
deleted file mode 100644
index 8d1a584a..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/ObservableCollectionViewerTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.databinding.swt;
-
-
-/**
- * @since 1.0
- *
- */
-public class ObservableCollectionViewerTest extends AbstractGetAndSetSelectionObservableCollectionTest {
-//
-// /*
-// * Test method for 'org.eclipse.jface.internal.databinding.swt.CComboObservableCollection.getSelectedObject()'
-// */
-// private AbstractListViewer viewer;
-//
-// protected SelectionAwareObservableCollection getSelectionAwareObservable(String[] values) {
-// Shell shell = BindingScenariosTestSuite.getShell();
-// this.viewer = new ListViewer(shell, SWT.NONE);
-// DataBindingContext ctx = DataBinding.createContext(new IObservableFactory[] {new SWTObservableFactory()});
-// SelectionAwareObservableCollection observableCollection = (SelectionAwareObservableCollection) ctx.createObservable(new Property(viewer, ViewersProperties.CONTENT, String.class, new Boolean(true)));
-// observableCollection.setElements(Arrays.asList(values));
-// return observableCollection;
-// }
-//
-// protected Object getSelectedObjectOfControl() {
-// StructuredSelection selection = (StructuredSelection) this.viewer.getSelection();
-// if (selection.isEmpty()) {
-// return null;
-// }
-// return selection.getFirstElement();
-// }
-//
-// protected void setSelectedValueOfControl(String value) {
-// this.viewer.setSelection(new StructuredSelection(new String[]{value}));
-// }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/SWTObservablesTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/SWTObservablesTest.java
deleted file mode 100644
index ec509149..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/SWTObservablesTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.databinding.swt;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jface.databinding.swt.ISWTObservableValue;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.jface.tests.databinding.util.RealmTester;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @since 3.2
- */
-public class SWTObservablesTest extends TestCase {
- private Shell shell;
-
- protected void setUp() {
- shell = new Shell();
- RealmTester.setDefault(SWTObservables.getRealm(shell.getDisplay()));
- }
-
- protected void tearDown() throws Exception {
- if (shell != null && !shell.isDisposed()) {
- shell.dispose();
- }
-
- RealmTester.setDefault(null);
- }
-
- public void testObserveForeground() throws Exception {
- ISWTObservableValue value = SWTObservables.observeForeground(shell);
- assertNotNull(value);
- assertEquals(Color.class, value.getValueType());
- }
-
- public void testObserveBackground() throws Exception {
- ISWTObservableValue value = SWTObservables.observeBackground(shell);
- assertNotNull(value);
- assertEquals(Color.class, value.getValueType());
- }
-
- public void testObserveFont() throws Exception {
- ISWTObservableValue value = SWTObservables.observeFont(shell);
- assertNotNull(value);
- assertEquals(Font.class, value.getValueType());
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/TableViewerObservableCollectionTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/TableViewerObservableCollectionTest.java
deleted file mode 100644
index 309bd6ee..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/TableViewerObservableCollectionTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.databinding.swt;
-
-
-/**
- * @since 1.0
- *
- */
-public class TableViewerObservableCollectionTest extends AbstractGetAndSetSelectionObservableCollectionTest {
-//
-// /*
-// * Test method for 'org.eclipse.jface.internal.databinding.swt.CComboObservableCollection.getSelectedObject()'
-// */
-// private TableViewer viewer;
-//
-// protected SelectionAwareObservableCollection getSelectionAwareObservable(String[] values) {
-// Shell shell = BindingScenariosTestSuite.getShell();
-// this.viewer = new TableViewer(shell, SWT.NONE);
-// DataBindingContext ctx = DataBinding.createContext(new IObservableFactory[] {new SWTObservableFactory()});
-// SelectionAwareObservableCollection observableCollection = (SelectionAwareObservableCollection) ctx.createObservable(new Property(viewer, ViewersProperties.CONTENT, String.class, new Boolean(true)));
-// observableCollection.setElements(Arrays.asList(values));
-// return observableCollection;
-// }
-//
-// protected Object getSelectedObjectOfControl() {
-// StructuredSelection selection = (StructuredSelection) this.viewer.getSelection();
-// if (selection.isEmpty()) {
-// return null;
-// }
-// return selection.getFirstElement();
-// }
-//
-// protected void setSelectedValueOfControl(String value) {
-// this.viewer.setSelection(new StructuredSelection(new String[]{value}));
-// }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/TextObservableValueTests.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/TextObservableValueTests.java
deleted file mode 100644
index 9a27eceb..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/TextObservableValueTests.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920
- * Brad Reynolds - bug 164653
- ******************************************************************************/
-
-package org.eclipse.jface.tests.databinding.swt;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.jface.internal.databinding.internal.swt.TextObservableValue;
-import org.eclipse.jface.tests.databinding.util.RealmTester;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * Tests to assert the inputs of the TextObservableValue constructor.
- *
- * @since 3.2
- */
-public class TextObservableValueTests extends TestCase {
- private Text text;
-
- protected void setUp() throws Exception {
- super.setUp();
-
- RealmTester.setDefault(SWTObservables.getRealm(Display.getDefault()));
- Shell shell = new Shell();
- text = new Text(shell, SWT.NONE);
- }
-
- /**
- * Asserts that only valid SWT event types are accepted on construction of
- * TextObservableValue.
- */
- public void testConstructorUpdateEventTypes() {
- try {
- new TextObservableValue(text, SWT.NONE);
- new TextObservableValue(text, SWT.FocusOut);
- new TextObservableValue(text, SWT.Modify);
- assertTrue(true);
- } catch (IllegalArgumentException e) {
- fail();
- }
-
- try {
- new TextObservableValue(text, SWT.Verify);
- fail();
- } catch (IllegalArgumentException e) {
- assertTrue(true);
- }
- }
-
- public void testSetValue() throws Exception {
- TextObservableValue observableValue = new TextObservableValue(text,
- SWT.NONE);
-
- assertEquals("", observableValue.getValue());
- String value = "value";
- observableValue.setValue(value);
- assertEquals("observable value", value, observableValue.getValue());
- }
-} \ No newline at end of file
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/util/RealmTester.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/util/RealmTester.java
deleted file mode 100644
index 53ec9aaf..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/util/RealmTester.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.databinding.util;
-
-import junit.framework.Assert;
-
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.runtime.AssertionFailedException;
-
-/**
- * Aids in the testing of Realms.
- *
- * @since 3.2
- */
-public class RealmTester {
-
- /**
- * Sets the default realm without using Realm.runWithDefault() for testing
- * purposes.
- *
- * @param realm
- */
- public static void setDefault(Realm realm) {
- CurrentRealm.setDefault(realm);
- }
-
- /**
- * Runs the provided <code>runnable</code> when the realm is both current
- * and not current. It checks for AssertionFailedExceptions and if an
- * exception occurs or doesn't occur as expected the test fails. The realm
- * of an observable created before the method was invoked must be of type
- * {@link CurrentRealm}. The default realm during the runnable invocation
- * is set to an instance of {@link CurrentRealm} when the runnable is
- * invoked.
- *
- * @param runnable
- */
- public static void exerciseCurrent(Runnable runnable) {
- CurrentRealm previousRealm = (CurrentRealm) Realm.getDefault();
- CurrentRealm realm = new CurrentRealm();
- setDefault(realm);
-
- try {
- realm.setCurrent(true);
- if (previousRealm != null) {
- previousRealm.setCurrent(true);
- }
-
- try {
- runnable.run();
- } catch (AssertionFailedException e) {
- Assert
- .fail("Correct realm, exception should not have been thrown");
- }
-
- realm.setCurrent(false);
- if (previousRealm != null) {
- previousRealm.setCurrent(false);
- }
-
- try {
- runnable.run();
- Assert
- .fail("Incorrect realm, exception should have been thrown");
- } catch (AssertionFailedException e) {
- }
- } finally {
- setDefault(previousRealm);
- }
- }
-
- /**
- * Allows for the toggling of the current status of the realm. The
- * syncExec(...) and asyncExec(...) implementations do nothing.
- *
- * @since 3.2
- */
- public static class CurrentRealm extends Realm {
- private boolean current;
-
- public CurrentRealm() {
- this(false);
- }
-
- public CurrentRealm(boolean current) {
- this.current = current;
- }
-
- public boolean isCurrent() {
- return current;
- }
-
- public void setCurrent(boolean current) {
- this.current = current;
- }
-
- protected void syncExec(Runnable runnable) {
- // do nothing
- }
-
- public void asyncExec(Runnable runnable) {
- // do nothing
- }
-
- protected static Realm setDefault(Realm realm) {
- return Realm.setDefault(realm);
- }
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/viewers/ObservableMapLabelProviderTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/viewers/ObservableMapLabelProviderTest.java
deleted file mode 100644
index cffed54f..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/viewers/ObservableMapLabelProviderTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- * Brad Reynolds - bug 164247
- ******************************************************************************/
-
-package org.eclipse.jface.tests.databinding.viewers;
-
-import java.util.HashSet;
-
-import org.eclipse.core.databinding.beans.BeansObservables;
-import org.eclipse.core.databinding.observable.set.WritableSet;
-import org.eclipse.jface.databinding.viewers.ObservableMapLabelProvider;
-import org.eclipse.jface.examples.databinding.ModelObject;
-import org.eclipse.jface.tests.databinding.AbstractDefaultRealmTestCase;
-
-/**
- * @since 1.1
- */
-public class ObservableMapLabelProviderTest extends AbstractDefaultRealmTestCase {
-
- public void testGetColumnText() throws Exception {
- WritableSet set = new WritableSet(new HashSet(), Item.class);
- Item item = new Item();
- String value = "value";
- item.setValue(value);
- set.add(item);
-
- ObservableMapLabelProvider labelProvider = new ObservableMapLabelProvider(BeansObservables.observeMap(set, Item.class, "value"));
- assertEquals(item.getValue(), labelProvider.getColumnText(item, 0));
- }
-
- public void testGetColumnTextNullValue() throws Exception {
- WritableSet set = new WritableSet(new HashSet(), Item.class);
- Item item = new Item();
- set.add(item);
-
- ObservableMapLabelProvider labelProvider = new ObservableMapLabelProvider(BeansObservables.observeMap(set, Item.class, "value"));
- assertNull(item.getValue());
- assertEquals("", labelProvider.getColumnText(item, 0));
- }
-
- private static class Item extends ModelObject {
- private String value;
-
- public String getValue() {
- return value;
- }
-
- public void setValue(String value) {
- String old = this.value;
-
- firePropertyChange("value", old, this.value = value);
- }
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/viewers/ObservableSetContentProviderTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/viewers/ObservableSetContentProviderTest.java
deleted file mode 100644
index dbf95fbb..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/viewers/ObservableSetContentProviderTest.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.databinding.viewers;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.jface.databinding.viewers.ObservableSetContentProvider;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * @since 3.3
- *
- */
-public class ObservableSetContentProviderTest extends TestCase {
- public void testKnownElementsRealm() throws Exception {
- ObservableSetContentProvider contentProvider = new ObservableSetContentProvider();
- assertSame("realm for the known elements should be the SWT realm",
- SWTObservables.getRealm(Display.getDefault()), contentProvider
- .getKnownElements().getRealm());
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/examples/model/PersonTests.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/examples/model/PersonTests.java
deleted file mode 100644
index 1c9b9c1a..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/examples/model/PersonTests.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Brad Reynolds.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.jface.tests.examples.model;
-
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jface.examples.databinding.model.SimplePerson;
-
-/**
- * @since 3.2
- *
- */
-public class PersonTests extends TestCase {
- public void testSetName() {
- SimplePerson person = new SimplePerson();
- Listener listener = new Listener();
-
- person.addPropertyChangeListener(listener);
- assertEquals(0, listener.count);
- assertNull(listener.lastEvent);
- person.setState("new state"); //$NON-NLS-1$
-
- assertEquals(1, listener.count);
- assertNotNull(listener.lastEvent);
- assertEquals("state", listener.lastEvent.getPropertyName()); //$NON-NLS-1$
- assertEquals("", listener.lastEvent.getOldValue());
- assertEquals("new state", listener.lastEvent.getNewValue()); //$NON-NLS-1$
- assertEquals("new state", person.getState());
- }
-
- private class Listener implements PropertyChangeListener {
- private int count;
- private PropertyChangeEvent lastEvent;
-
- public void propertyChange(PropertyChangeEvent evt) {
- count++;
- this.lastEvent = evt;
- }
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ListBindingTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ListBindingTest.java
deleted file mode 100644
index 14f6fb77..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ListBindingTest.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 116920, 159768
- ******************************************************************************/
-
-package org.eclipse.jface.tests.internal.databinding.internal;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.databinding.BindSpec;
-import org.eclipse.core.databinding.DataBindingContext;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.list.WritableList;
-import org.eclipse.core.internal.databinding.ListBinding;
-import org.eclipse.jface.tests.databinding.AbstractDefaultRealmTestCase;
-
-/**
- * @since 3.2
- *
- */
-public class ListBindingTest extends AbstractDefaultRealmTestCase {
- private IObservableList target;
- private IObservableList model;
- private DataBindingContext dbc;
-
- /*
- * (non-Javadoc)
- *
- * @see junit.framework.TestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
-
- target = new WritableList(new ArrayList(), String.class);
- model = new WritableList(new ArrayList(), String.class);
- dbc = new DataBindingContext();
- }
-
- public void testUpdateModelFromTarget() throws Exception {
- ListBinding binding = new ListBinding(target, model,
- new BindSpec().setModelUpdatePolicy(BindSpec.POLICY_EXPLICIT)
- .setTargetUpdatePolicy(BindSpec.POLICY_EXPLICIT));
- binding.init(dbc);
-
- target.add("1");
- List targetCopy = new ArrayList(target.size());
- targetCopy.addAll(target);
-
- model.add("2");
-
- assertFalse("target should not equal model", target.equals(model));
- binding.updateModelFromTarget();
- assertEquals("target should not have changed", targetCopy, target);
- assertEquals("target != model", target, model);
- }
-
- public void testUpdateTargetFromModel() throws Exception {
- ListBinding binding = new ListBinding(target, model,
- new BindSpec().setModelUpdatePolicy(BindSpec.POLICY_EXPLICIT)
- .setTargetUpdatePolicy(BindSpec.POLICY_EXPLICIT));
- binding.init(dbc);
-
- target.add("1");
- model.add("2");
-
- List modelCopy = new ArrayList(model.size());
- modelCopy.addAll(model);
-
- assertFalse("model should not equal target", model.equals(target));
- binding.updateTargetFromModel();
-
- assertEquals("model should not have changed", modelCopy, model);
- assertEquals("model != target", model, target);
- }
-
- public void testGetTarget() throws Exception {
- ListBinding binding = new ListBinding(target, model,
- new BindSpec());
- assertEquals(target, binding.getTarget());
- }
-
- public void testGetModel() throws Exception {
- ListBinding binding = new ListBinding(target, model, new BindSpec());
- assertEquals(model, binding.getModel());
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ListBindingTest_Pipeline.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ListBindingTest_Pipeline.java
deleted file mode 100644
index 0381a7e7..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ListBindingTest_Pipeline.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.internal.databinding.internal;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-
-import org.eclipse.core.databinding.BindSpec;
-import org.eclipse.core.databinding.BindingEvent;
-import org.eclipse.core.databinding.DataBindingContext;
-import org.eclipse.core.databinding.IBindingListener;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.list.WritableList;
-import org.eclipse.core.databinding.validation.IValidator;
-import org.eclipse.core.internal.databinding.ListBinding;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.tests.databinding.AbstractDefaultRealmTestCase;
-import org.eclipse.jface.tests.internal.databinding.internal.Pipeline.TrackLastListener;
-import org.eclipse.jface.tests.internal.databinding.internal.Pipeline.TrackPositionListener;
-import org.eclipse.jface.tests.internal.databinding.internal.Pipeline.TrackedValidator;
-
-/**
- * Asserts pipeline behavior of ListBinding.
- *
- * @since 3.2
- */
-public class ListBindingTest_Pipeline extends AbstractDefaultRealmTestCase {
- private DataBindingContext dbc;
- private IObservableList target;
- private IObservableList model;
-
- protected void setUp() throws Exception {
- super.setUp();
-
- dbc = new DataBindingContext();
- target = new WritableList(new ArrayList(), String.class);
- model = new WritableList(new ArrayList(), String.class);
- }
-
- public void testTargetToModelPipelinePhaseOrder() throws Exception {
- int[] positions = new int[] { BindingEvent.PIPELINE_AFTER_GET,
- BindingEvent.PIPELINE_BEFORE_CHANGE,
- BindingEvent.PIPELINE_AFTER_CHANGE };
-
- int[] copyTypes = new int[positions.length];
- Arrays.fill(copyTypes, BindingEvent.EVENT_COPY_TO_MODEL);
-
- TrackPositionListener listener = new TrackPositionListener(
- positions.length);
-
- ListBinding binding = new ListBinding(target, model,
- new BindSpec());
- binding.init(dbc);
- binding.addBindingEventListener(listener);
-
- target.add("1");
- assertTrue("positions", Arrays.equals(positions, listener.positions));
- assertTrue("copy types", Arrays.equals(copyTypes, listener.copyTypes));
- }
-
- public void testModelToTargetPipelinePhaseOrder() throws Exception {
- int[] positions = new int[] { BindingEvent.PIPELINE_AFTER_GET,
- BindingEvent.PIPELINE_BEFORE_CHANGE,
- BindingEvent.PIPELINE_AFTER_CHANGE };
- int[] types = new int[positions.length];
- Arrays.fill(types, BindingEvent.EVENT_COPY_TO_TARGET);
-
- TrackPositionListener listener = new TrackPositionListener(
- positions.length);
- ListBinding binding = new ListBinding(target, model,
- new BindSpec());
- binding.init(dbc);
-
- binding.addBindingEventListener(listener);
-
- model.add("1");
- assertTrue("positions", Arrays.equals(positions, listener.positions));
- assertTrue("copy types", Arrays.equals(types, listener.copyTypes));
- }
-
- public void testTargetToModelValidationAfterGet() throws Exception {
- assertValidation(BindingEvent.PIPELINE_AFTER_GET, -1,
- BindingEvent.EVENT_COPY_TO_MODEL);
- }
-
- public void testTargetToModelValidationBeforeChange() throws Exception {
- assertValidation(BindingEvent.PIPELINE_BEFORE_CHANGE,
- BindingEvent.PIPELINE_AFTER_GET,
- BindingEvent.EVENT_COPY_TO_MODEL);
- }
-
- public void testModelToTargetValidationAfterGet() throws Exception {
- assertValidation(BindingEvent.PIPELINE_AFTER_GET, -1,
- BindingEvent.EVENT_COPY_TO_TARGET);
- }
-
- public void testModelToTargetValidationBeforeChange() throws Exception {
- assertValidation(BindingEvent.PIPELINE_BEFORE_CHANGE,
- BindingEvent.PIPELINE_AFTER_GET,
- BindingEvent.EVENT_COPY_TO_TARGET);
- }
-
- private void assertValidation(int position, int previousPosition,
- int copyType) throws Exception {
- TrackLastListener listener = new TrackLastListener();
- listener.active = false;
- TrackedValidator validator = new TrackedValidator(listener);
-
- IObservableList value = null;
- BindSpec bindSpec = new BindSpec();
- switch (copyType) {
- case BindingEvent.EVENT_COPY_TO_TARGET:
- bindSpec.addModelValidator(position, validator);
- value = model;
- break;
- case BindingEvent.EVENT_COPY_TO_MODEL:
- bindSpec.addTargetValidator(position, validator);
- value = target;
- break;
- }
-
- ListBinding binding = new ListBinding(target, model, bindSpec);
- binding.init(dbc);
-
- binding.addBindingEventListener(listener);
- listener.active = true;
- value.add("value");
-
- assertEquals("validator", validator, listener.lastValidator);
- assertEquals("validator invocation count", 1, validator.count);
- assertEquals("last binding event position", previousPosition,
- listener.lastPosition);
- }
-
- public void testUpdateModelFromTargetAfterGet() throws Exception {
- assertLastPhase(BindingEvent.PIPELINE_AFTER_GET, true);
- }
-
- public void testUpdateModelFromTargetBeforeChange() throws Exception {
- assertLastPhase(BindingEvent.PIPELINE_BEFORE_CHANGE, true);
- }
-
- public void testUpdateModelFromTargetAfterChange() throws Exception {
- assertLastPhase(BindingEvent.PIPELINE_AFTER_CHANGE, true);
- }
-
- public void testUpdateTargetFromModelAfterGet() throws Exception {
- assertLastPhase(BindingEvent.PIPELINE_AFTER_GET, false);
- }
-
- public void testUpdateTargetFromModelBeforeChange() throws Exception {
- assertLastPhase(BindingEvent.PIPELINE_BEFORE_CHANGE, false);
- }
-
- public void testUpdateTargetFromModelAfterChange() throws Exception {
- assertLastPhase(BindingEvent.PIPELINE_AFTER_CHANGE, false);
- }
-
- private void assertLastPhase(int phase, boolean performTarget) {
- TrackLastListener listener = new TrackLastListener();
- ListBinding binding = new ListBinding(target, model,
- new BindSpec());
- binding.init(dbc);
-
- binding.addBindingEventListener(listener);
-
- if (performTarget) {
- binding.updateModelFromTarget(phase);
- } else {
- binding.updateTargetFromModel(phase);
- }
-
- if (performTarget) {
- assertEquals(BindingEvent.EVENT_COPY_TO_MODEL,
- listener.lastCopyType);
- } else {
- assertEquals(BindingEvent.EVENT_COPY_TO_TARGET,
- listener.lastCopyType);
- }
- assertEquals(phase, listener.lastPosition);
- }
-
- public void testValidationErrorStatusValidatorFailure() throws Exception {
- class Validator implements IValidator {
- public IStatus validate(Object value) {
- return Status.CANCEL_STATUS;
- }
- }
-
- Validator validator = new Validator();
- ListBinding binding = new ListBinding(target, model,
- new BindSpec().addTargetValidator(
- BindingEvent.PIPELINE_AFTER_GET, validator));
- binding.init(dbc);
-
- assertTrue(((IStatus) binding.getValidationStatus().getValue()).isOK());
- target.add("value");
- assertFalse("status should be in error", ((IStatus) binding
- .getValidationStatus().getValue()).isOK());
- }
-
- public void testValidationErrorStatusListenerFailure() throws Exception {
- class Listener implements IBindingListener {
- public IStatus handleBindingEvent(BindingEvent e) {
- return Status.CANCEL_STATUS;
- }
- }
-
- ListBinding binding = new ListBinding(target, model,
- new BindSpec());
- binding.init(dbc);
-
- binding.addBindingEventListener(new Listener());
-
- assertTrue(((IStatus) binding.getValidationStatus().getValue()).isOK());
- target.add("value");
- assertFalse("status should be in error", ((IStatus) binding
- .getValidationStatus().getValue()).isOK());
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ListBindingTest_Policies.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ListBindingTest_Policies.java
deleted file mode 100644
index b77a8df5..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ListBindingTest_Policies.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.internal.databinding.internal;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-
-import org.eclipse.core.databinding.BindSpec;
-import org.eclipse.core.databinding.BindingEvent;
-import org.eclipse.core.databinding.DataBindingContext;
-import org.eclipse.core.databinding.observable.list.WritableList;
-import org.eclipse.core.internal.databinding.ListBinding;
-import org.eclipse.jface.tests.databinding.AbstractDefaultRealmTestCase;
-import org.eclipse.jface.tests.internal.databinding.internal.Pipeline.TrackLastListener;
-
-/**
- * Asserts policies of ListBinding.
- *
- * @since 3.2
- */
-public class ListBindingTest_Policies extends AbstractDefaultRealmTestCase {
- private WritableList target;
- private WritableList model;
- private DataBindingContext dbc;
-
- /*
- * (non-Javadoc)
- *
- * @see junit.framework.TestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
-
- target = new WritableList(new ArrayList(), String.class);
- model = new WritableList(new ArrayList(), String.class);
- dbc = new DataBindingContext();
- }
-
- public void testModelUpdatePolicyNull() throws Exception {
- new ListBinding(target, model, new BindSpec()
- .setModelUpdatePolicy(null)).init(dbc);
-
- target.add("1");
- assertTrue("should be automatic", Arrays.equals(target.toArray(), model
- .toArray()));
- }
-
- public void testModelUpdatePolicyAutomatic() throws Exception {
- new ListBinding(target, model, new BindSpec()
- .setModelUpdatePolicy(BindSpec.POLICY_AUTOMATIC)).init(dbc);
-
- target.add("1");
- assertTrue("should be automatic", Arrays.equals(target.toArray(), model
- .toArray()));
- }
-
- public void testModelUpdatePolicyExplicit() throws Exception {
- ListBinding binding = new ListBinding(target, model, new BindSpec()
- .setModelUpdatePolicy(BindSpec.POLICY_EXPLICIT));
- binding.init(dbc);
-
- target.add("1");
-
- assertFalse("should not be updated", Arrays.equals(target.toArray(),
- model.toArray()));
-
- binding.updateModelFromTarget();
- assertTrue("should be updated", Arrays.equals(target.toArray(), model
- .toArray()));
- }
-
- public void testTargetUpdatePolicyNull() throws Exception {
- new ListBinding(target, model, new BindSpec()
- .setTargetUpdatePolicy(null)).init(dbc);
-
- model.add("1");
- assertTrue("should be automatic", Arrays.equals(model.toArray(), target
- .toArray()));
- }
-
- public void testTargetUpdatePolicyAutomatic() throws Exception {
- new ListBinding(target, model, new BindSpec()
- .setTargetUpdatePolicy(BindSpec.POLICY_AUTOMATIC)).init(dbc);
-
- model.add("1");
- assertTrue("should be automatic", Arrays.equals(model.toArray(), target
- .toArray()));
- }
-
- public void testTargetUpdatePolicyExplicit() throws Exception {
- ListBinding binding = new ListBinding(target, model, new BindSpec()
- .setTargetUpdatePolicy(BindSpec.POLICY_EXPLICIT));
- binding.init(dbc);
-
- model.add("1");
-
- assertFalse("should not be updated", Arrays.equals(model.toArray(),
- target.toArray()));
-
- binding.updateTargetFromModel();
- assertTrue("should be updated", Arrays.equals(model.toArray(), target
- .toArray()));
- }
-
- public void testTargetValidatePosition() throws Exception {
- TrackLastListener listener = new TrackLastListener();
- int position = BindingEvent.PIPELINE_BEFORE_CHANGE;
-
- final ListBinding listBinding = new ListBinding(target, model,
- new BindSpec().setModelUpdatePolicy(BindSpec.POLICY_EXPLICIT)
- .setTargetValidatePolicy(new Integer(position)));
- listBinding.init(dbc);
- listBinding
- .addBindingEventListener(listener);
-
- String value = "value";
- target.add(value);
-
- assertFalse("target should not equal model", target.equals(model));
- assertEquals(position, listener.lastPosition);
- }
-
- public void testTargetValidatePolicyDefault() throws Exception {
- TrackLastListener listener = new TrackLastListener();
-
- final ListBinding listBinding = new ListBinding(target, model,
- new BindSpec().setModelUpdatePolicy(BindSpec.POLICY_EXPLICIT));
- listBinding.init(dbc);
- listBinding.addBindingEventListener(listener);
-
- listener.lastPosition = -1;
- String value = "value";
- target.add(value);
- assertFalse("target should not equal model", target.equals(model));
- assertEquals(BindingEvent.PIPELINE_AFTER_GET, listener.lastPosition);
- }
-
- public void testModelValidatePolicyDefault() throws Exception {
- TrackLastListener listener = new TrackLastListener();
-
- final ListBinding listBinding = new ListBinding(target, model,
- new BindSpec().setTargetUpdatePolicy(BindSpec.POLICY_EXPLICIT));
- listBinding.init(dbc);
- listBinding.addBindingEventListener(listener);
-
- listener.lastPosition = -1;
- String value = "value";
- model.add(value);
- assertFalse("model should not equal target", model.equals(target));
- assertEquals(BindingEvent.PIPELINE_AFTER_GET, listener.lastPosition);
- }
-
- public void testIsUpdateTargetFalse() throws Exception {
- final ListBinding listBinding = new ListBinding(target, model,
- new BindSpec().setUpdateModel(false));
- listBinding.init(dbc);
-
- assertEquals(target, model);
- target.add("value");
- assertFalse(target.equals(model));
- }
-
- public void testIsUpdateModelFalse() throws Exception {
- final ListBinding listBinding = new ListBinding(target, model,
- new BindSpec().setUpdateTarget(false));
- listBinding.init(dbc);
-
- assertEquals(target, model);
- model.add("value");
- assertFalse(model.equals(target));
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/Pipeline.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/Pipeline.java
deleted file mode 100644
index 749ed6d3..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/Pipeline.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.internal.databinding.internal;
-
-import org.eclipse.core.databinding.BindingEvent;
-import org.eclipse.core.databinding.IBindingListener;
-import org.eclipse.core.databinding.validation.IValidator;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-/**
- * Implementations for tracking the flow of the pipeline.
- *
- * @since 3.2
- */
-class Pipeline {
- /**
- * Validator that when invoked registers with a listener for tracking
- * purposes.
- *
- * @since 3.2
- */
- public static class TrackedValidator implements IValidator {
- int count;
- TrackLastListener listener;
-
- public TrackedValidator(TrackLastListener listener) {
- this.listener = listener;
- }
-
- public IStatus validate(Object value) {
- if (listener.validatorInvoked(this)) {
- count++;
- }
- return Status.CANCEL_STATUS;
- }
- }
-
- /**
- * Tracks the last position the listener received.
- *
- * @since 3.2
- */
- public static class TrackLastListener implements IBindingListener {
- boolean active = true;
- IValidator lastValidator;
- int lastPosition = -1;
- int lastCopyType = -1;
-
- public IStatus handleBindingEvent(BindingEvent e) {
- if (active) {
- lastPosition = e.pipelinePosition;
- lastCopyType = e.copyType;
- }
-
- return Status.OK_STATUS;
- }
-
- /**
- * @param validator
- * @result <code>true</code> if should proceed
- */
- public boolean validatorInvoked(IValidator validator) {
- if (!active) {
- return false;
- }
- this.lastValidator = validator;
-
- return true;
- }
- }
-
- /**
- * Tracks the positions the listener was invoked and values from those
- * invocations.
- *
- * @since 3.2
- */
- public static class TrackPositionListener implements IBindingListener {
- int[] positions;
- int[] copyTypes;
- int index = -1;
- int count;
- final int expectedCount;
-
- public TrackPositionListener(int expectedCount) {
- positions = new int[this.expectedCount = expectedCount];
- copyTypes = new int[expectedCount];
- }
-
- public IStatus handleBindingEvent(BindingEvent e) {
- positions[++index] = e.pipelinePosition;
- copyTypes[index] = e.copyType;
- count++;
-
- return Status.OK_STATUS;
- }
-
- public void reset() {
- index = -1;
- count = 0;
- positions = new int[expectedCount];
- copyTypes = new int[expectedCount];
- }
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ValueBindingTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ValueBindingTest.java
deleted file mode 100644
index 688df3eb..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ValueBindingTest.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- * Brad Reynolds - bug 116920
- * Brad Reynolds - bug 164653, 159768
- ******************************************************************************/
-
-package org.eclipse.jface.tests.internal.databinding.internal;
-
-import org.eclipse.core.databinding.BindSpec;
-import org.eclipse.core.databinding.DataBindingContext;
-import org.eclipse.core.databinding.DefaultBindSpec;
-import org.eclipse.core.databinding.observable.value.AbstractObservableValue;
-import org.eclipse.core.databinding.observable.value.WritableValue;
-import org.eclipse.core.internal.databinding.ValueBinding;
-import org.eclipse.jface.tests.databinding.AbstractDefaultRealmTestCase;
-
-/**
- * @since 3.2
- *
- */
-public class ValueBindingTest extends AbstractDefaultRealmTestCase {
- /**
- * Bug 152543.
- *
- * @throws Exception
- */
- public void testNoUpdateTargetFromModel() throws Exception {
- DefaultBindSpec spec = new DefaultBindSpec();
- spec.setUpdateModel(false);
- spec.setUpdateTarget(false);
-
- try {
- new ValueBinding(
- new ObservableValueStub(), new ObservableValueStub(), spec).init(new DataBindingContext());
- } catch (Exception e) {
- fail(e.getMessage());
- }
- }
-
- public void testValuePropagation() throws Exception {
- DefaultBindSpec spec = new DefaultBindSpec();
- String initialValue = "value";
-
- WritableValue target = new WritableValue(null, String.class);
- WritableValue model = new WritableValue(initialValue, String.class);
-
- DataBindingContext dbc = new DataBindingContext();
-
- assertFalse(model.getValue().equals(target.getValue()));
- new ValueBinding(target, model, spec).init(dbc);
-
- assertEquals(target.getValue(), model.getValue());
- }
-
- public void testGetTarget() throws Exception {
- WritableValue target = new WritableValue();
- WritableValue model = new WritableValue();
- ValueBinding valueBinding = new ValueBinding(target, model, new BindSpec());
-
- assertEquals(target, valueBinding.getTarget());
- }
-
- public void testGetModel() throws Exception {
- WritableValue target = new WritableValue();
- WritableValue model = new WritableValue();
- ValueBinding valueBinding = new ValueBinding(target, model, new BindSpec());
-
- assertEquals(model, valueBinding.getModel());
- }
-
- private static class ObservableValueStub extends AbstractObservableValue {
- protected Object doGetValue() {
- // do nothing
- return null;
- }
-
- public Object getValueType() {
- // do nothing
- return null;
- }
-
- protected void doSetValue(Object value) {
-
- }
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ValueBindingTest_Pipeline.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ValueBindingTest_Pipeline.java
deleted file mode 100644
index 00ddaa0d..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ValueBindingTest_Pipeline.java
+++ /dev/null
@@ -1,315 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.internal.databinding.internal;
-
-import java.util.Arrays;
-
-import org.eclipse.core.databinding.BindSpec;
-import org.eclipse.core.databinding.Binding;
-import org.eclipse.core.databinding.BindingEvent;
-import org.eclipse.core.databinding.DataBindingContext;
-import org.eclipse.core.databinding.IBindingListener;
-import org.eclipse.core.databinding.observable.value.AbstractVetoableValue;
-import org.eclipse.core.databinding.observable.value.ChangeVetoException;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.databinding.observable.value.WritableValue;
-import org.eclipse.core.databinding.validation.IValidator;
-import org.eclipse.core.internal.databinding.ValueBinding;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.tests.databinding.AbstractDefaultRealmTestCase;
-import org.eclipse.jface.tests.internal.databinding.internal.Pipeline.TrackLastListener;
-import org.eclipse.jface.tests.internal.databinding.internal.Pipeline.TrackPositionListener;
-import org.eclipse.jface.tests.internal.databinding.internal.Pipeline.TrackedValidator;
-
-/**
- * Asserts the pipeline behavior of ValueBinding.
- *
- * @since 3.2
- */
-public class ValueBindingTest_Pipeline extends AbstractDefaultRealmTestCase {
- private IObservableValue target;
- private IObservableValue model;
- private DataBindingContext dbc;
-
- protected void setUp() throws Exception {
- super.setUp();
-
- target = WritableValue.withValueType(String.class);
- model = WritableValue.withValueType(String.class);
- dbc = new DataBindingContext();
- }
-
- public void testTargetToModelPipelinePositionOrder() throws Exception {
- int[] positions = new int[] { BindingEvent.PIPELINE_AFTER_GET,
- BindingEvent.PIPELINE_AFTER_CONVERT,
- BindingEvent.PIPELINE_BEFORE_CHANGE,
- BindingEvent.PIPELINE_AFTER_CHANGE };
- int[] copyTypes = new int[positions.length];
- Arrays.fill(copyTypes, BindingEvent.EVENT_COPY_TO_MODEL);
-
- TrackPositionListener listener = new TrackPositionListener(
- positions.length);
-
- Binding binding = new ValueBinding(target, model, new BindSpec());
- binding.init(dbc);
-
- binding.addBindingEventListener(listener);
-
- listener.reset(); // reset, runs on bind
-
- target.setValue("1");
- assertEquals(positions.length, listener.count);
- assertTrue("positions", Arrays.equals(positions, listener.positions));
- assertTrue("copy types", Arrays.equals(copyTypes, listener.copyTypes));
- }
-
- public void testTargetToModelValidationAfterGet() throws Exception {
- assertNull(assertValidation(BindingEvent.PIPELINE_AFTER_GET, -1,
- BindingEvent.EVENT_COPY_TO_MODEL));
- }
-
- public void testTargetToModelValidationAfterConvert() throws Exception {
- assertNull(assertValidation(BindingEvent.PIPELINE_AFTER_CONVERT,
- BindingEvent.PIPELINE_AFTER_GET,
- BindingEvent.EVENT_COPY_TO_MODEL));
- }
-
- public void testTargetToModelValidationBeforeGet() throws Exception {
- assertNull(assertValidation(BindingEvent.PIPELINE_BEFORE_CHANGE,
- BindingEvent.PIPELINE_AFTER_CONVERT,
- BindingEvent.EVENT_COPY_TO_MODEL));
- }
-
- private Exception assertValidation(int position, int previousPosition,
- int copyType) throws Exception {
- TrackLastListener listener = new TrackLastListener();
- listener.active = false;
- TrackedValidator validator = new TrackedValidator(listener);
-
- IObservableValue value = null;
- BindSpec bindSpec = new BindSpec();
- switch (copyType) {
- case BindingEvent.EVENT_COPY_TO_TARGET:
- bindSpec.addModelValidator(position, validator);
- value = model;
- break;
- case BindingEvent.EVENT_COPY_TO_MODEL:
- bindSpec.addTargetValidator(position, validator);
- value = target;
- break;
- }
-
- ValueBinding binding = new ValueBinding(target, model, bindSpec);
- binding.init(dbc);
-
- binding.addBindingEventListener(listener);
- listener.active = true;
-
- Exception exception = null;
- try {
- value.setValue("1");
- } catch (Exception e) {
- exception = e;
- }
-
- assertEquals("validator", validator, listener.lastValidator);
- assertEquals("validator invocation count", 1, validator.count);
- assertEquals("last binding event position", previousPosition,
- listener.lastPosition);
- return exception;
- }
-
- public void testModelToTargetPipelinePositionOrder() throws Exception {
- int[] positions = new int[] { BindingEvent.PIPELINE_AFTER_GET,
- BindingEvent.PIPELINE_AFTER_CONVERT,
- BindingEvent.PIPELINE_BEFORE_CHANGE };
- int[] copyTypes = new int[positions.length];
- Arrays.fill(copyTypes, BindingEvent.EVENT_COPY_TO_TARGET);
-
- TrackPositionListener listener = new TrackPositionListener(
- positions.length);
-
- ValueBinding binding = new ValueBinding(target, model,
- new BindSpec());
- binding.init(dbc);
-
- binding.addBindingEventListener(listener);
-
- model.setValue("1");
- assertEquals(3, listener.count);
- assertTrue("positions", Arrays.equals(positions, listener.positions));
- assertTrue("copy types", Arrays.equals(copyTypes, listener.copyTypes));
- }
-
- public void testModelToTargetValidationAfterGet() throws Exception {
- assertNull(assertValidation(BindingEvent.PIPELINE_AFTER_GET, -1,
- BindingEvent.EVENT_COPY_TO_TARGET));
- }
-
- public void testModelToTargetValidationAfterConvert() throws Exception {
- assertNull(assertValidation(BindingEvent.PIPELINE_AFTER_CONVERT,
- BindingEvent.PIPELINE_AFTER_GET,
- BindingEvent.EVENT_COPY_TO_TARGET));
- }
-
- public void testModelToTargetValidationBeforeChange() throws Exception {
- assertNull(assertValidation(BindingEvent.PIPELINE_BEFORE_CHANGE,
- BindingEvent.PIPELINE_AFTER_CONVERT,
- BindingEvent.EVENT_COPY_TO_TARGET));
- }
-
- public void testUpdateModelFromTargetAfterGet() throws Exception {
- assertLastPosition(BindingEvent.PIPELINE_AFTER_GET,
- BindingEvent.EVENT_COPY_TO_MODEL);
- }
-
- public void testUpdateModelFromTargetAfterConvert() throws Exception {
- assertLastPosition(BindingEvent.PIPELINE_AFTER_CONVERT,
- BindingEvent.EVENT_COPY_TO_MODEL);
- }
-
- public void testUpdateModelFromTargetBeforeChange() throws Exception {
- assertLastPosition(BindingEvent.PIPELINE_BEFORE_CHANGE,
- BindingEvent.EVENT_COPY_TO_MODEL);
- }
-
- public void testUpdateModelFromTargetAfterChange() throws Exception {
- assertLastPosition(BindingEvent.PIPELINE_AFTER_CHANGE,
- BindingEvent.EVENT_COPY_TO_MODEL);
- }
-
- public void testUpdateTargetFromModelAfterGet() throws Exception {
- assertLastPosition(BindingEvent.PIPELINE_AFTER_GET,
- BindingEvent.EVENT_COPY_TO_TARGET);
- }
-
- public void testUpdateTargetFromModelAfterConvert() throws Exception {
- assertLastPosition(BindingEvent.PIPELINE_AFTER_CONVERT,
- BindingEvent.EVENT_COPY_TO_TARGET);
- }
-
- public void testUpdateTargetFromModelAfterChange() throws Exception {
- assertLastPosition(BindingEvent.PIPELINE_AFTER_CHANGE,
- BindingEvent.EVENT_COPY_TO_TARGET);
- }
-
- private void assertLastPosition(int position, int copyType) {
- TrackLastListener listener = new TrackLastListener();
-
- ValueBinding binding = new ValueBinding(target, model,
- new BindSpec());
- binding.init(dbc);
-
- binding.addBindingEventListener(listener);
- listener.active = true;
-
- switch (copyType) {
- case BindingEvent.EVENT_COPY_TO_MODEL:
- binding.updateModelFromTarget(position);
- break;
- case BindingEvent.EVENT_COPY_TO_TARGET:
- binding.updateTargetFromModel(position);
- break;
- }
-
- assertEquals("copyType", copyType, listener.lastCopyType);
- assertEquals("last position", position, listener.lastPosition);
- }
-
- public void testValidationErrorStatusValidatorFailure() throws Exception {
- class Validator implements IValidator {
- public IStatus validate(Object value) {
- return Status.CANCEL_STATUS;
- }
- }
-
- Validator validator = new Validator();
- ValueBinding binding = new ValueBinding(target, model,
- new BindSpec().addTargetValidator(
- BindingEvent.PIPELINE_AFTER_GET, validator));
- binding.init(dbc);
-
- assertTrue(((IStatus) binding.getValidationStatus().getValue()).isOK());
- target.setValue("value");
- assertFalse("status should be in error", ((IStatus) binding
- .getValidationStatus().getValue()).isOK());
- }
-
- public void testValidationErrorStatusListenerFailure() throws Exception {
- class Listener implements IBindingListener {
- public IStatus handleBindingEvent(BindingEvent e) {
- return Status.CANCEL_STATUS;
- }
- }
-
- ValueBinding binding = new ValueBinding(target, model,
- new BindSpec());
- binding.init(dbc);
-
- binding.addBindingEventListener(new Listener());
-
- assertTrue(((IStatus) binding.getValidationStatus().getValue()).isOK());
- target.setValue("value");
- assertFalse("status should be in error", ((IStatus) binding
- .getValidationStatus().getValue()).isOK());
- }
-
- public void testTargetToModelPartialValidation() throws Exception {
- target = new VetoableValueStub();
- Exception e = assertValidation(BindingEvent.PIPELINE_VALUE_CHANGING,
- -1, BindingEvent.EVENT_COPY_TO_MODEL);
- assertNotNull("exception should have been thrown", e);
- assertTrue("ChangeVetoException", e instanceof ChangeVetoException);
- }
-
- public void testPartialValidationErrorStatusValidatorFailure()
- throws Exception {
- target = new VetoableValueStub();
-
- class Listener implements IBindingListener {
- public IStatus handleBindingEvent(BindingEvent e) {
- return Status.CANCEL_STATUS;
- }
- }
-
- ValueBinding binding = new ValueBinding(target, model, new BindSpec());
- binding.init(dbc);
- binding.addBindingEventListener(new Listener());
- assertTrue(((IStatus) binding.getPartialValidationStatus().getValue())
- .isOK());
-
- try {
- target.setValue("1");
- } catch (ChangeVetoException e) {
- }
-
- assertFalse("status should be in error", ((IStatus) binding
- .getPartialValidationStatus().getValue()).isOK());
- }
-
- static class VetoableValueStub extends AbstractVetoableValue {
- Object value;
-
- protected void doSetApprovedValue(Object value) {
- this.value = value;
- }
-
- protected Object doGetValue() {
- return value;
- }
-
- public Object getValueType() {
- return null;
- }
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ValueBindingTest_Policies.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ValueBindingTest_Policies.java
deleted file mode 100644
index f76e6abe..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ValueBindingTest_Policies.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.internal.databinding.internal;
-
-import org.eclipse.core.databinding.BindSpec;
-import org.eclipse.core.databinding.BindingEvent;
-import org.eclipse.core.databinding.DataBindingContext;
-import org.eclipse.core.databinding.observable.value.WritableValue;
-import org.eclipse.core.internal.databinding.ValueBinding;
-import org.eclipse.jface.tests.databinding.AbstractDefaultRealmTestCase;
-import org.eclipse.jface.tests.internal.databinding.internal.Pipeline.TrackLastListener;
-
-/**
- * Asserts the policies of ValueBinding.
- *
- * @since 3.2
- */
-public class ValueBindingTest_Policies extends AbstractDefaultRealmTestCase {
- private WritableValue target;
- private WritableValue model;
- private DataBindingContext dbc;
-
- /*
- * (non-Javadoc)
- *
- * @see junit.framework.TestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
-
- target = WritableValue.withValueType(String.class);
- model = WritableValue.withValueType(String.class);
- dbc = new DataBindingContext();
- }
-
- public void testModelUpdatePolicyNull() throws Exception {
- new ValueBinding(target, model, new BindSpec()
- .setModelUpdatePolicy(null)).init(dbc);
- target.setValue("1");
- assertEquals("should be automatic", target.getValue(), model.getValue());
- }
-
- public void testModelUpdatePolicyAutomatic() throws Exception {
- new ValueBinding(target, model, new BindSpec()
- .setModelUpdatePolicy(BindSpec.POLICY_AUTOMATIC)).init(dbc);
- target.setValue("1");
- assertEquals("should be automatic", target.getValue(), model.getValue());
- }
-
- public void testModelUpdatePolicyExplicit() throws Exception {
- ValueBinding binding = new ValueBinding(target, model, new BindSpec()
- .setTargetUpdatePolicy(BindSpec.POLICY_EXPLICIT));
- binding.init(dbc);
-
- model.setValue("1");
- assertFalse(model.getValue().equals(target.getValue()));
-
- binding.updateTargetFromModel();
- assertEquals(model.getValue(), target.getValue());
- }
-
- public void testTargetUpdatePolicyNull() throws Exception {
- new ValueBinding(target, model, new BindSpec()
- .setTargetUpdatePolicy(null)).init(dbc);
- model.setValue("1");
- assertEquals("should be automatic", model.getValue(), target.getValue());
- }
-
- public void testTargetUpdatePolicyAutomatic() throws Exception {
- new ValueBinding(target, model, new BindSpec()
- .setTargetUpdatePolicy(BindSpec.POLICY_AUTOMATIC)).init(dbc);
- model.setValue("1");
- assertEquals("should be automatic", model.getValue(), target.getValue());
- }
-
- public void testTargetUpdatePolicyDefault() throws Exception {
- TrackLastListener listener = new TrackLastListener();
- listener.lastPosition = -1;
-
- ValueBinding binding = new ValueBinding(target, model,
- new BindSpec().setTargetUpdatePolicy(BindSpec.POLICY_EXPLICIT));
- binding.init(dbc);
- binding.addBindingEventListener(listener);
-
- model.setValue("1");
- assertFalse(model.getValue().equals(target.getValue()));
- assertEquals("last position should be PIPELINE_AFTER_CONVERT",
- BindingEvent.PIPELINE_AFTER_CONVERT, listener.lastPosition);
-
- binding.updateModelFromTarget();
- assertEquals(target.getValue(), model.getValue());
- }
-
- public void testTargetValidatePolicy() throws Exception {
- int position = BindingEvent.PIPELINE_AFTER_GET;
- TrackLastListener listener = new TrackLastListener();
-
- ValueBinding binding = new ValueBinding(target, model, new BindSpec()
- .setModelUpdatePolicy(BindSpec.POLICY_EXPLICIT)
- .setTargetValidatePolicy(new Integer(position)));
- binding.init(dbc);
- binding.addBindingEventListener(listener);
-
- String value = "1";
- target.setValue(value);
-
- assertFalse(target.getValue().equals(model.getValue()));
- assertEquals("last position", position, listener.lastPosition);
- }
-
- public void testModelUpdatePolicyExplicitValidationDefault()
- throws Exception {
- TrackLastListener listener = new TrackLastListener();
-
- ValueBinding binding = new ValueBinding(target, model, new BindSpec()
- .setModelUpdatePolicy(BindSpec.POLICY_EXPLICIT));
- binding.init(dbc);
-
- binding.addBindingEventListener(listener);
- target.setValue("");
-
- assertEquals("default validation position",
- BindingEvent.PIPELINE_AFTER_CONVERT, listener.lastPosition);
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/Bean.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/Bean.java
deleted file mode 100644
index f324d36c..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/Bean.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.internal.databinding.internal.beans;
-
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyChangeSupport;
-import java.util.List;
-import java.util.Set;
-
-/**
- * Simple Java Bean for testing.
- *
- * @since 3.3
- */
-public class Bean {
- private PropertyChangeSupport support = new PropertyChangeSupport(this);
- private String value;
- private List list;
- private Set set;
-
- public Bean() {
- }
-
- public Bean(String value) {
- this.value = value;
- }
-
- public Bean(List list) {
- this.list = list;
- }
-
- public Bean(Set set) {
- this.set = set;
- }
-
- public void addPropertyChangeListener(PropertyChangeListener listener) {
- support.addPropertyChangeListener(listener);
- }
-
- public void removePropertyChangeListener(PropertyChangeListener listener) {
- support.removePropertyChangeListener(listener);
- }
-
- public String getValue() {
- return value;
- }
-
- public void setValue(String value) {
- support.firePropertyChange("value", this.value, this.value = value);
- }
-
- public List getList() {
- return list;
- }
-
- public void setList(List list) {
- support.firePropertyChange("list", this.list, this.list = list);
- }
-
- public Bean[] getListArray() {
- return (Bean[]) list.toArray(new Bean[list.size()]);
- }
-
- public Set getSet() {
- return set;
- }
-
- public void setSet(Set set) {
- support.firePropertyChange("set", this.set, this.set = set);
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/BeanObservableListDecoratorTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/BeanObservableListDecoratorTest.java
deleted file mode 100644
index c02f5340..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/BeanObservableListDecoratorTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.internal.databinding.internal.beans;
-
-import java.beans.PropertyDescriptor;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.internal.databinding.internal.beans.BeanObservableListDecorator;
-import org.eclipse.core.internal.databinding.internal.beans.JavaBeanObservableList;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * @since 3.3
- */
-public class BeanObservableListDecoratorTest extends TestCase {
- private PropertyDescriptor propertyDescriptor;
- private JavaBeanObservableList observableList;
- private BeanObservableListDecorator decorator;
-
- /*
- * (non-Javadoc)
- *
- * @see junit.framework.TestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
-
- Bean bean = new Bean();
- propertyDescriptor = new PropertyDescriptor(
- "list", Bean.class);
- observableList = new JavaBeanObservableList(
- SWTObservables.getRealm(Display.getDefault()), bean,
- propertyDescriptor, Bean.class);
- decorator = new BeanObservableListDecorator(observableList, observableList, propertyDescriptor);
- }
-
- public void testGetDelegate() throws Exception {
- assertEquals(observableList, decorator.getDelegate());
- }
-
- public void testGetObserved() throws Exception {
- assertEquals(observableList, decorator.getObserved());
- }
-
- public void testGetPropertyDescriptor() throws Exception {
- assertEquals(propertyDescriptor, decorator.getPropertyDescriptor());
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/BeanObservableSetDecoratorTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/BeanObservableSetDecoratorTest.java
deleted file mode 100644
index 0033e3b0..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/BeanObservableSetDecoratorTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.internal.databinding.internal.beans;
-
-import java.beans.PropertyDescriptor;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.internal.databinding.internal.beans.BeanObservableSetDecorator;
-import org.eclipse.core.internal.databinding.internal.beans.JavaBeanObservableSet;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * @since 3.3
- */
-public class BeanObservableSetDecoratorTest extends TestCase {
- private PropertyDescriptor propertyDescriptor;
- private JavaBeanObservableSet observableSet;
- private BeanObservableSetDecorator decorator;
-
- /*
- * (non-Javadoc)
- *
- * @see junit.framework.TestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
-
- Bean bean = new Bean();
- propertyDescriptor = new PropertyDescriptor("set",
- Bean.class);
- observableSet = new JavaBeanObservableSet(
- SWTObservables.getRealm(Display.getDefault()), bean,
- propertyDescriptor, String.class);
- decorator = new BeanObservableSetDecorator(
- observableSet, observableSet, propertyDescriptor);
- }
-
- public void testGetDelegate() throws Exception {
- assertEquals(observableSet, decorator.getDelegate());
- }
-
- public void testGetObserved() throws Exception {
- assertEquals(observableSet, decorator.getObserved());
- }
-
- public void testGetPropertyDescriptor() throws Exception {
- assertEquals(propertyDescriptor, decorator.getPropertyDescriptor());
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/BeanObservableValueDecoratorTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/BeanObservableValueDecoratorTest.java
deleted file mode 100644
index 430df308..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/BeanObservableValueDecoratorTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.internal.databinding.internal.beans;
-
-import java.beans.PropertyDescriptor;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.internal.databinding.internal.beans.BeanObservableValueDecorator;
-import org.eclipse.core.internal.databinding.internal.beans.JavaBeanObservableValue;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * @since 3.3
- */
-public class BeanObservableValueDecoratorTest extends TestCase {
- private Bean bean;
- private JavaBeanObservableValue observableValue;
- private BeanObservableValueDecorator decorator;
- private PropertyDescriptor propertyDescriptor;
-
- /*
- * (non-Javadoc)
- *
- * @see junit.framework.TestCase#setUp()
- */
- protected void setUp() throws Exception {
- bean = new Bean();
- propertyDescriptor = new PropertyDescriptor("value",
- Bean.class);
- observableValue = new JavaBeanObservableValue(
- SWTObservables.getRealm(Display.getDefault()), bean,
- propertyDescriptor, String.class);
- decorator = new BeanObservableValueDecorator(
- observableValue, bean, observableValue
- .getPropertyDescriptor());
- }
-
- public void testGetDelegate() throws Exception {
- assertEquals(observableValue, decorator.getDelegate());
- }
-
- public void testGetObserved() throws Exception {
- assertEquals(bean, decorator.getObserved());
- }
-
- public void testGetPropertyDescriptor() throws Exception {
- assertEquals(propertyDescriptor, decorator.getPropertyDescriptor());
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/JavaBeanObservableListTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/JavaBeanObservableListTest.java
deleted file mode 100644
index 65cd9ca5..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/JavaBeanObservableListTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.internal.databinding.internal.beans;
-
-import java.beans.PropertyDescriptor;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.internal.databinding.internal.beans.JavaBeanObservableList;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * @since 3.3
- */
-public class JavaBeanObservableListTest extends TestCase {
- private JavaBeanObservableList observableList;
- private PropertyDescriptor propertyDescriptor;
- private Bean bean;
-
- /*
- * (non-Javadoc)
- *
- * @see junit.framework.TestCase#setUp()
- */
- protected void setUp() throws Exception {
- propertyDescriptor = new PropertyDescriptor("list", Bean.class);
- bean = new Bean();
-
- observableList = new JavaBeanObservableList(SWTObservables
- .getRealm(Display.getDefault()), bean, propertyDescriptor,
- Bean.class);
- }
-
- public void testGetObserved() throws Exception {
- assertEquals(bean, observableList.getObserved());
- }
-
- public void testGetPropertyDescriptor() throws Exception {
- assertEquals(propertyDescriptor, observableList.getPropertyDescriptor());
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/JavaBeanObservableMapTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/JavaBeanObservableMapTest.java
deleted file mode 100644
index 3e3c4d82..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/JavaBeanObservableMapTest.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.internal.databinding.internal.beans;
-
-import java.beans.PropertyDescriptor;
-import java.util.HashSet;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.databinding.observable.map.IMapChangeListener;
-import org.eclipse.core.databinding.observable.map.MapChangeEvent;
-import org.eclipse.core.databinding.observable.map.MapDiff;
-import org.eclipse.core.databinding.observable.set.WritableSet;
-import org.eclipse.core.internal.databinding.internal.beans.JavaBeanObservableMap;
-import org.eclipse.jface.tests.databinding.observable.ThreadRealm;
-
-/**
- * @since 3.2
- *
- */
-public class JavaBeanObservableMapTest extends TestCase {
- private Bean model1;
-
- private Bean model2;
-
- private WritableSet set;
-
- private PropertyDescriptor propertyDescriptor;
-
- private JavaBeanObservableMap map;
-
- protected void setUp() throws Exception {
- ThreadRealm realm = new ThreadRealm();
- realm.init(Thread.currentThread());
- model1 = new Bean("1");
- model2 = new Bean("2");
-
- set = new WritableSet(realm, new HashSet(), Bean.class);
- set.add(model1);
- set.add(model2);
-
- propertyDescriptor = new PropertyDescriptor("value", Bean.class);
- map = new JavaBeanObservableMap(set, propertyDescriptor);
- }
-
- public void testGetValue() throws Exception {
- assertEquals(
- "The 'value' from the map should be the value of the property of the model.",
- model1.getValue(), map.get(model1));
- }
-
- public void testSetValueNotifications() throws Exception {
- String oldValue = model1.getValue();
- String newValue = model1.getValue() + model1.getValue();
- MapChangeListener listener = new MapChangeListener();
-
- map.addMapChangeListener(listener);
- assertEquals(0, listener.count);
- model1.setValue(newValue);
- assertEquals(1, listener.count);
- assertTrue(listener.diff.getChangedKeys().contains(model1));
- assertEquals(newValue, listener.diff.getNewValue(model1));
- assertEquals(oldValue, listener.diff.getOldValue(model1));
- assertFalse(listener.diff.getAddedKeys().contains(model1));
- assertFalse(listener.diff.getRemovedKeys().contains(model1));
- }
-
- public void testPutValue() throws Exception {
- String oldValue = model1.getValue();
- String newValue = model1.getValue() + model1.getValue();
- MapChangeListener listener = new MapChangeListener();
- map.addMapChangeListener(listener);
-
- assertEquals(0, listener.count);
- map.put(model1, newValue);
- assertEquals(1, listener.count);
- assertEquals(newValue, model1.getValue());
- assertEquals(oldValue, listener.diff.getOldValue(model1));
- assertEquals(newValue, listener.diff.getNewValue(model1));
- assertFalse(listener.diff.getAddedKeys().contains(model1));
- assertTrue(listener.diff.getChangedKeys().contains(model1));
- assertFalse(listener.diff.getRemovedKeys().contains(model1));
- }
-
- public void testAddKey() throws Exception {
- MapChangeListener listener = new MapChangeListener();
- map.addMapChangeListener(listener);
-
- Bean model3 = new Bean("3");
-
- assertEquals(0, listener.count);
- set.add(model3);
- assertEquals(1, listener.count);
- assertTrue(listener.diff.getAddedKeys().contains(model3));
- assertEquals(model3.getValue(), map.get(model3));
-
- String newValue = model3.getValue() + model3.getValue();
- model3.setValue(newValue);
- assertEquals(2, listener.count);
- assertEquals(3, map.size());
- }
-
- public void testRemoveKey() throws Exception {
- MapChangeListener listener = new MapChangeListener();
- map.addMapChangeListener(listener);
-
- assertEquals(0, listener.count);
- set.remove(model1);
- assertEquals(1, listener.count);
- assertFalse(listener.diff.getAddedKeys().contains(model1));
- assertFalse(listener.diff.getChangedKeys().contains(model1));
- assertTrue(listener.diff.getRemovedKeys().contains(model1));
- assertEquals(1, map.size());
- }
-
- public void testGetObserved() throws Exception {
- assertEquals(set, map.getObserved());
- }
-
- public void testGetPropertyDescriptor() throws Exception {
- assertEquals(propertyDescriptor, map.getPropertyDescriptor());
- }
-
- private static class MapChangeListener implements IMapChangeListener {
- int count;
-
- MapDiff diff;
-
- public void handleMapChange(MapChangeEvent event) {
- count++;
- this.diff = event.diff;
- }
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/JavaBeanObservableSetTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/JavaBeanObservableSetTest.java
deleted file mode 100644
index cf6d49e3..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/JavaBeanObservableSetTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.internal.databinding.internal.beans;
-
-import java.beans.PropertyDescriptor;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.internal.databinding.internal.beans.JavaBeanObservableSet;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * @since 3.3
- */
-public class JavaBeanObservableSetTest extends TestCase {
- private JavaBeanObservableSet observableSet;
- private Bean model;
- private PropertyDescriptor propertyDescriptor;
-
- /*
- * (non-Javadoc)
- *
- * @see junit.framework.TestCase#setUp()
- */
- protected void setUp() throws Exception {
- model = new Bean();
- propertyDescriptor = new PropertyDescriptor("set", Bean.class);
-
- observableSet = new JavaBeanObservableSet(SWTObservables
- .getRealm(Display.getDefault()), model, propertyDescriptor,
- Bean.class);
- }
-
- public void testGetObserved() throws Exception {
- assertEquals(model, observableSet.getObserved());
- }
-
- public void testGetPropertyDescriptor() throws Exception {
- assertEquals(propertyDescriptor, observableSet.getPropertyDescriptor());
- }
-
- public void testGetElementType() throws Exception {
- assertEquals(Bean.class, observableSet.getElementType());
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/JavaBeanObservableValueTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/JavaBeanObservableValueTest.java
deleted file mode 100644
index 34d4f1a6..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/JavaBeanObservableValueTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- * Brad Reynolds - bug 171616
- ******************************************************************************/
-
-package org.eclipse.jface.tests.internal.databinding.internal.beans;
-
-import java.beans.PropertyDescriptor;
-
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.internal.databinding.internal.beans.JavaBeanObservableValue;
-import org.eclipse.jface.tests.databinding.AbstractDefaultRealmTestCase;
-
-/**
- * @since 3.2
- */
-public class JavaBeanObservableValueTest extends AbstractDefaultRealmTestCase {
- private Bean bean;
- private JavaBeanObservableValue observableValue;
- private PropertyDescriptor propertyDescriptor;
-
- /* (non-Javadoc)
- * @see junit.framework.TestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
-
- bean = new Bean();
- propertyDescriptor = new PropertyDescriptor("value", Bean.class);
- observableValue = new JavaBeanObservableValue(Realm.getDefault(), bean, propertyDescriptor, String.class);
- }
-
- public void testSetValue() throws Exception {
- String value = "value";
- assertNull(observableValue.getValue());
- observableValue.setValue(value);
- assertEquals("value", value, observableValue.getValue());
- }
-
- public void testGetObserved() throws Exception {
- assertEquals(bean, observableValue.getObserved());
- }
-
- public void testGetPropertyDescriptor() throws Exception {
- assertEquals(propertyDescriptor, observableValue.getPropertyDescriptor());
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/observable/UnmodifiableObservableListTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/observable/UnmodifiableObservableListTest.java
deleted file mode 100644
index d2011225..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/observable/UnmodifiableObservableListTest.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Cerner Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.internal.databinding.internal.observable;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.databinding.observable.ChangeEvent;
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.IChangeListener;
-import org.eclipse.core.databinding.observable.IObservable;
-import org.eclipse.core.databinding.observable.IStaleListener;
-import org.eclipse.core.databinding.observable.Observables;
-import org.eclipse.core.databinding.observable.StaleEvent;
-import org.eclipse.core.databinding.observable.list.IListChangeListener;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.list.ListChangeEvent;
-import org.eclipse.core.databinding.observable.list.ListDiff;
-import org.eclipse.core.databinding.observable.list.ListDiffEntry;
-import org.eclipse.core.databinding.observable.list.ObservableList;
-import org.eclipse.jface.tests.databinding.AbstractDefaultRealmTestCase;
-
-public class UnmodifiableObservableListTest extends AbstractDefaultRealmTestCase {
- ObservableList unmodifiable;
- ObservableList mutable;
-
- protected void setUp() throws Exception {
- super.setUp();
-
- List list = new ArrayList();
- list.add("1");
- list.add("2");
-
- mutable = new MutableObservableList(list, String.class);
- unmodifiable = (ObservableList) Observables.unmodifiableObservableList(mutable);
- }
-
- public void testFiresChangeEvents() throws Exception {
- ChangeCounter mutableListener = new ChangeCounter();
- ChangeCounter unmodifiableListener = new ChangeCounter();
-
- mutable.addChangeListener(mutableListener);
- unmodifiable.addChangeListener(unmodifiableListener);
-
- assertEquals(0, mutableListener.count);
- assertEquals(0, unmodifiableListener.count);
- mutable.add("3");
- assertEquals(1, mutableListener.count);
- assertEquals(1, unmodifiableListener.count);
- }
-
- public void testFiresListChangeEvents() throws Exception {
- ListChangeCounter mutableListener = new ListChangeCounter();
- ListChangeCounter unmodifiableListener = new ListChangeCounter();
-
- mutable.addListChangeListener(mutableListener);
- unmodifiable.addListChangeListener(unmodifiableListener);
-
- assertEquals(0, mutableListener.count);
- assertEquals(0, unmodifiableListener.count);
-
- String element = "3";
- mutable.add(element);
- assertEquals(1, mutableListener.count);
- assertEquals(mutable, mutableListener.source);
- assertEquals(1, mutableListener.diff.getDifferences().length);
-
- ListDiffEntry difference = mutableListener.diff.getDifferences()[0];
- assertEquals(element, difference.getElement());
- assertTrue(difference.isAddition());
- assertEquals(3, mutable.size());
-
- assertEquals(1, unmodifiableListener.count);
- assertEquals(unmodifiable, unmodifiableListener.source);
- assertEquals(1, unmodifiableListener.diff.getDifferences().length);
-
- difference = unmodifiableListener.diff.getDifferences()[0];
- assertEquals(element, difference.getElement());
- assertTrue(difference.isAddition());
- assertEquals(3, unmodifiable.size());
- }
-
- public void testFiresStaleEvents() throws Exception {
- StaleCounter mutableListener = new StaleCounter();
- StaleCounter unmodifiableListener = new StaleCounter();
-
- mutable.addStaleListener(mutableListener);
- unmodifiable.addStaleListener(unmodifiableListener);
-
- assertEquals(0, mutableListener.count);
- assertEquals(0, unmodifiableListener.count);
- mutable.setStale(true);
- assertEquals(1, mutableListener.count);
- assertEquals(mutable, mutableListener.source);
- assertTrue(mutable.isStale());
- assertEquals(1, unmodifiableListener.count);
- assertEquals(unmodifiable, unmodifiableListener.source);
- assertTrue(unmodifiable.isStale());
- }
-
- public void testIsStale() throws Exception {
- assertFalse(mutable.isStale());
- assertFalse(unmodifiable.isStale());
- mutable.setStale(true);
- assertTrue(mutable.isStale());
- assertTrue(unmodifiable.isStale());
- }
-
- public void testSetStaleOnUnmodifiableList() throws Exception {
- try {
- unmodifiable.setStale(true);
- fail("UnsupportedOperationException should have been thrown");
- } catch (UnsupportedOperationException e) {
- }
- }
-
- private static class StaleCounter implements IStaleListener {
- int count;
- IObservable source;
-
- public void handleStale(StaleEvent event) {
- count++;
- this.source = event.getObservable();
- }
- }
-
- private static class ChangeCounter implements IChangeListener {
- int count;
- IObservable source;
- public void handleChange(ChangeEvent event) {
- count++;
- this.source = event.getObservable();
- }
- }
-
- private static class ListChangeCounter implements IListChangeListener {
- int count;
- IObservableList source;
- ListDiff diff;
-
- public void handleListChange(ListChangeEvent event) {
- count++;
- this.source = event.getObservableList();
- this.diff = event.diff;
- }
- }
-
- private static class MutableObservableList extends ObservableList {
- /**
- * @param wrappedList
- * @param elementType
- */
- public MutableObservableList(List wrappedList, Object elementType) {
- super(wrappedList, elementType);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.internal.databinding.provisional.observable.list.ObservableList#add(java.lang.Object)
- */
- public boolean add(Object o) {
- boolean result = wrappedList.add(o);
- fireListChange(Diffs.createListDiff(Diffs.createListDiffEntry(wrappedList.size() - 1, true, o)));
-
- return result;
- }
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/ButtonObservableValueTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/ButtonObservableValueTest.java
deleted file mode 100644
index 7ddbd91c..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/ButtonObservableValueTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.internal.databinding.internal.swt;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jface.internal.databinding.internal.swt.ButtonObservableValue;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @since 3.2
- *
- */
-public class ButtonObservableValueTest extends TestCase {
- public void testSetValue() throws Exception {
- Shell shell = new Shell();
- Button button = new Button(shell, SWT.CHECK);
- ButtonObservableValue observableValue = new ButtonObservableValue(button);
- assertEquals(Boolean.FALSE, observableValue.getValue());
- assertFalse(button.getSelection());
-
- Boolean value = Boolean.TRUE;
- observableValue.setValue(value);
- assertTrue("button value", button.getSelection());
- assertEquals("observable value", value, observableValue.getValue());
- shell.dispose();
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/CComboObservableValueTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/CComboObservableValueTest.java
deleted file mode 100644
index 5f8d800b..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/CComboObservableValueTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.internal.databinding.internal.swt;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jface.internal.databinding.internal.swt.CComboObservableValue;
-import org.eclipse.jface.internal.databinding.internal.swt.SWTProperties;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CCombo;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @since 3.2
- */
-public class CComboObservableValueTest extends TestCase {
- public void testSetValueText() throws Exception {
- Shell shell = new Shell();
- CCombo combo = new CCombo(shell, SWT.NONE);
- CComboObservableValue observableValue = new CComboObservableValue(combo, SWTProperties.TEXT);
- assertEquals("", combo.getText());
- assertEquals("", observableValue.getValue());
-
- String value = "value";
- observableValue.setValue(value);
- assertEquals("combo value", value, combo.getText());
- assertEquals("observable value value is incorrect", value, observableValue.getValue());
- shell.dispose();
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/CLabelObservableValueTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/CLabelObservableValueTest.java
deleted file mode 100644
index 4d138230..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/CLabelObservableValueTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.internal.databinding.internal.swt;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jface.internal.databinding.internal.swt.CLabelObservableValue;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @since 3.2
- *
- */
-public class CLabelObservableValueTest extends TestCase {
- public void testSetValue() throws Exception {
- Shell shell = new Shell();
- CLabel label = new CLabel(shell, SWT.NONE);
- CLabelObservableValue observableValue = new CLabelObservableValue(label);
-
- assertEquals(null, label.getText());
- assertEquals(null, observableValue.getValue());
-
- String value = "value";
- observableValue.setValue(value);
- assertEquals("label value", value, label.getText());
- assertEquals("observable value was incorrect", value, observableValue.getValue());
- shell.dispose();
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/ComboObservableValueTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/ComboObservableValueTest.java
deleted file mode 100644
index ccd29f28..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/ComboObservableValueTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.internal.databinding.internal.swt;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jface.internal.databinding.internal.swt.ComboObservableValue;
-import org.eclipse.jface.internal.databinding.internal.swt.SWTProperties;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @since 3.2
- *
- */
-public class ComboObservableValueTest extends TestCase {
- public void testSetValueText() throws Exception {
- Shell shell = new Shell();
- Combo combo = new Combo(shell, SWT.NONE);
- ComboObservableValue observableValue = new ComboObservableValue(combo, SWTProperties.TEXT);
- assertEquals("", combo.getText());
- assertEquals("", observableValue.getValue());
-
- String value = "value";
- observableValue.setValue(value);
- assertEquals("combo text", value, combo.getText());
- assertEquals("observable value", value, observableValue.getValue());
- shell.dispose();
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/ControlObservableValueTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/ControlObservableValueTest.java
deleted file mode 100644
index 031e8c0c..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/ControlObservableValueTest.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- * Brad Reynolds - bug 170848
- ******************************************************************************/
-
-package org.eclipse.jface.tests.internal.databinding.internal.swt;
-
-import org.eclipse.jface.internal.databinding.internal.swt.ControlObservableValue;
-import org.eclipse.jface.internal.databinding.internal.swt.SWTProperties;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.tests.databinding.AbstractDefaultRealmTestCase;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @since 3.2
- *
- */
-public class ControlObservableValueTest extends AbstractDefaultRealmTestCase {
- private Shell shell;
-
- protected void setUp() throws Exception {
- super.setUp();
-
- shell = new Shell();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see junit.framework.TestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- if (shell != null && !shell.isDisposed()) {
- shell.dispose();
- shell = null;
- }
- }
-
- public void testSetValueEnabled() throws Exception {
- ControlObservableValue observableValue = new ControlObservableValue(
- shell, SWTProperties.ENABLED);
- Boolean value = Boolean.FALSE;
- observableValue.setValue(value);
- assertFalse(shell.isEnabled());
- }
-
- public void testGetValueEnabled() throws Exception {
- ControlObservableValue value = new ControlObservableValue(shell,
- SWTProperties.ENABLED);
- shell.setEnabled(false);
- assertEquals(Boolean.FALSE, value.getValue());
- }
-
- public void testGetValueTypeEnabled() throws Exception {
- ControlObservableValue value = new ControlObservableValue(shell,
- SWTProperties.ENABLED);
- assertEquals(boolean.class, value.getValueType());
- }
-
- public void testSetValueVisible() throws Exception {
- ControlObservableValue value = new ControlObservableValue(shell,
- SWTProperties.VISIBLE);
- value.setValue(Boolean.FALSE);
- assertFalse(shell.isVisible());
- }
-
- public void testGetValueVisible() throws Exception {
- ControlObservableValue value = new ControlObservableValue(shell,
- SWTProperties.VISIBLE);
- shell.setVisible(false);
- assertEquals(Boolean.FALSE, value.getValue());
- }
-
- public void testGetValueTypeVisible() throws Exception {
- ControlObservableValue value = new ControlObservableValue(shell,
- SWTProperties.VISIBLE);
- assertEquals(Boolean.TYPE, value.getValueType());
- }
-
- public void testSetValueForeground() throws Exception {
- ControlObservableValue value = new ControlObservableValue(shell,
- SWTProperties.FOREGROUND);
-
- Color color = shell.getDisplay().getSystemColor(SWT.COLOR_BLACK);
-
- value.setValue(color);
- assertEquals(color, shell.getForeground());
- }
-
- public void testGetValueForeground() throws Exception {
- ControlObservableValue value = new ControlObservableValue(shell,
- SWTProperties.FOREGROUND);
-
- Color color = shell.getDisplay().getSystemColor(SWT.COLOR_BLACK);
- shell.setForeground(color);
- assertEquals(color, value.getValue());
- }
-
- public void testGetValueTypeForgroundColor() throws Exception {
- ControlObservableValue value = new ControlObservableValue(shell,
- SWTProperties.FOREGROUND);
- assertEquals(Color.class, value.getValueType());
- }
-
- public void testGetValueBackground() throws Exception {
- ControlObservableValue value = new ControlObservableValue(shell,
- SWTProperties.BACKGROUND);
-
- Color color = shell.getDisplay().getSystemColor(SWT.COLOR_BLACK);
- shell.setBackground(color);
- assertEquals(color, value.getValue());
- }
-
- public void testSetValueBackground() throws Exception {
- ControlObservableValue value = new ControlObservableValue(shell,
- SWTProperties.BACKGROUND);
-
- Color color = shell.getDisplay().getSystemColor(SWT.COLOR_BLACK);
-
- value.setValue(color);
- assertEquals(color, shell.getBackground());
- }
-
- public void testGetValueTypeBackgroundColor() throws Exception {
- ControlObservableValue value = new ControlObservableValue(shell,
- SWTProperties.BACKGROUND);
- assertEquals(Color.class, value.getValueType());
- }
-
- public void testGetValueTypeTooltip() throws Exception {
- ControlObservableValue value = new ControlObservableValue(shell,
- SWTProperties.TOOLTIP_TEXT);
- assertEquals(String.class, value.getValueType());
- }
-
- public void testSetValueFont() throws Exception {
- ControlObservableValue value = new ControlObservableValue(shell,
- SWTProperties.FONT);
-
- Font font = JFaceResources.getDialogFont();
-
- value.setValue(font);
- assertEquals(font, shell.getFont());
- }
-
- public void testGetValueFont() throws Exception {
- ControlObservableValue value = new ControlObservableValue(shell,
- SWTProperties.FONT);
-
- Font font = JFaceResources.getDialogFont();
- shell.setFont(font);
- assertEquals(font, value.getValue());
- }
-
- public void testGetValueTypeFont() throws Exception {
- ControlObservableValue value = new ControlObservableValue(shell,
- SWTProperties.FONT);
- assertEquals(Font.class, value.getValueType());
- }
-
- public void testSetValueTooltipText() throws Exception {
- ControlObservableValue value = new ControlObservableValue(shell,
- SWTProperties.TOOLTIP_TEXT);
- String text = "text";
- value.setValue(text);
- assertEquals(text, shell.getToolTipText());
- }
-
- public void testGetValueTooltipText() throws Exception {
- ControlObservableValue value = new ControlObservableValue(shell,
- SWTProperties.TOOLTIP_TEXT);
- String text = "text";
- shell.setToolTipText(text);
- assertEquals(text, value.getValue());
- }
-
- public void testGetValueTypeTooltipText() throws Exception {
- ControlObservableValue value = new ControlObservableValue(shell,
- SWTProperties.TOOLTIP_TEXT);
- assertEquals(String.class, value.getValueType());
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/LabelObservableValueTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/LabelObservableValueTest.java
deleted file mode 100644
index e0366970..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/LabelObservableValueTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.internal.databinding.internal.swt;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jface.internal.databinding.internal.swt.LabelObservableValue;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @since 3.2
- */
-public class LabelObservableValueTest extends TestCase {
- public void testSetValue() throws Exception {
- Shell shell = new Shell();
- Label label = new Label(shell, SWT.NONE);
- LabelObservableValue observableValue = new LabelObservableValue(label);
-
- assertEquals("", label.getText());
- assertEquals("", observableValue.getValue());
-
- String value = "value";
- observableValue.setValue(value);
- assertEquals("label text", value, label.getText());
- assertEquals("observable value", value, observableValue.getValue());
- shell.dispose();
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/SpinnerObservableValueTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/SpinnerObservableValueTest.java
deleted file mode 100644
index 56000649..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/SpinnerObservableValueTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.internal.databinding.internal.swt;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jface.internal.databinding.internal.swt.SWTProperties;
-import org.eclipse.jface.internal.databinding.internal.swt.SpinnerObservableValue;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Spinner;
-
-/**
- * @since 3.2
- *
- */
-public class SpinnerObservableValueTest extends TestCase {
- public void testSetValueSelection() throws Exception {
- Shell shell = new Shell();
- Spinner spinner = new Spinner(shell, SWT.NONE);
- SpinnerObservableValue observableValue = new SpinnerObservableValue(spinner, SWTProperties.SELECTION);
-
- assertEquals(0, spinner.getSelection());
- assertEquals(0, ((Integer) observableValue.getValue()).intValue());
-
- Integer value = new Integer(1);
- observableValue.setValue(value);
- assertEquals("spinner selection", value.intValue(), spinner.getSelection());
- assertEquals("observable value", value, observableValue.getValue());
- shell.dispose();
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/TableObservableValueTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/TableObservableValueTest.java
deleted file mode 100644
index 56c53fc5..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/TableObservableValueTest.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.internal.databinding.internal.swt;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jface.internal.databinding.internal.swt.SWTProperties;
-import org.eclipse.jface.internal.databinding.internal.swt.TableObservableValue;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableItem;
-
-/**
- * @since 3.2
- */
-public class TableObservableValueTest extends TestCase {
- public void testSetValue() throws Exception {
- Shell shell = new Shell();
- Table table = new Table(shell, SWT.NONE);
- TableObservableValue observableValue = new TableObservableValue(table, SWTProperties.SELECTION);
- new TableItem(table, SWT.NONE);
-
- assertEquals(-1, table.getSelectionIndex());
- assertEquals(-1, ((Integer) observableValue.getValue()).intValue());
-
- Integer value = new Integer(0);
- observableValue.setValue(value);
- assertEquals("table selection index", value.intValue(), table.getSelectionIndex());
- assertEquals("observable value", value, observableValue.getValue());
- shell.dispose();
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/viewers/SelectionProviderSingleSelectionObservableValueTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/viewers/SelectionProviderSingleSelectionObservableValueTest.java
deleted file mode 100644
index b9e6b20b..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/viewers/SelectionProviderSingleSelectionObservableValueTest.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Brad Reynolds.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- * Brad Reynolds - bug 116920
- *******************************************************************************/
-package org.eclipse.jface.tests.internal.databinding.internal.viewers;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.databinding.observable.IObservable;
-import org.eclipse.core.databinding.observable.value.IValueChangeListener;
-import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
-import org.eclipse.core.databinding.observable.value.ValueDiff;
-import org.eclipse.jface.databinding.swt.SWTObservables;
-import org.eclipse.jface.internal.databinding.internal.viewers.SelectionProviderSingleSelectionObservableValue;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Tests for SelectionProviderSingleSelectionObservableValue.
- *
- * @since 1.1
- */
-public class SelectionProviderSingleSelectionObservableValueTest extends TestCase {
- private ISelectionProvider selectionProvider;
-
- private TableViewer viewer;
-
- private static String[] model = new String[] { "0", "1" };
-
- /*
- * (non-Javadoc)
- *
- * @see junit.framework.TestCase#setUp()
- */
- protected void setUp() throws Exception {
- Shell shell = new Shell();
- viewer = new TableViewer(shell, SWT.NONE);
- viewer.setContentProvider(new ContentProvider());
- viewer.setInput(model);
- selectionProvider = viewer;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see junit.framework.TestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- Shell shell = viewer.getTable().getShell();
- if (!shell.isDisposed())
- shell.dispose();
- }
-
- public void testConstructorIllegalArgumentException() {
- try {
- new SelectionProviderSingleSelectionObservableValue(SWTObservables.getRealm(Display.getDefault()), null);
- fail();
- } catch (IllegalArgumentException e) {
- }
- }
-
- /**
- * Asserts that when a selection is set on the viewer:
- * <ul>
- * <li>the selection is available in the observable</li>
- * <li>Value change events are fired with appropriate diff values</li>
- * </ul>
- */
- public void testGetSetValue() {
- SelectionProviderSingleSelectionObservableValue observable = new SelectionProviderSingleSelectionObservableValue(
- SWTObservables.getRealm(Display.getDefault()),
- selectionProvider);
- ChangeListener listener = new ChangeListener();
- observable.addValueChangeListener(listener);
- assertNull(observable.getValue());
-
- selectionProvider.setSelection(new StructuredSelection(model[0]));
- assertEquals(1, listener.count);
- assertNull(listener.diff.getOldValue());
- assertEquals(model[0], listener.diff.getNewValue());
- assertEquals(observable, listener.source);
- assertEquals(model[0], observable.getValue());
-
- selectionProvider.setSelection(new StructuredSelection(model[1]));
- assertEquals(2, listener.count);
- assertEquals(model[0], listener.diff.getOldValue());
- assertEquals(model[1], listener.diff.getNewValue());
- assertEquals(observable, listener.source);
- assertEquals(model[1], observable.getValue());
-
- selectionProvider.setSelection(StructuredSelection.EMPTY);
- assertEquals(3, listener.count);
- assertEquals(model[1], listener.diff.getOldValue());
- assertNull(listener.diff.getNewValue());
- assertEquals(observable, listener.source);
- assertEquals(null, observable.getValue());
- }
-
- private class ChangeListener implements IValueChangeListener {
- int count = 0;
-
- IObservable source;
-
- ValueDiff diff;
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.databinding.observable.value.IValueChangeListener#handleValueChange(org.eclipse.jface.databinding.observable.value.IObservableValue,
- * org.eclipse.jface.databinding.observable.value.ValueDiff)
- */
- public void handleValueChange(ValueChangeEvent event) {
- count++;
- this.source = event.getObservableValue();
- this.diff = event.diff;
- }
- }
-
- private class ContentProvider implements IStructuredContentProvider {
- public void dispose() {
- // TODO Auto-generated method stub
-
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- // TODO Auto-generated method stub
-
- }
-
- public Object[] getElements(Object inputElement) {
- return (String[]) inputElement;
- }
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/provisional/observable/AbstractObservableTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/provisional/observable/AbstractObservableTest.java
deleted file mode 100644
index 6fcca32f..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/provisional/observable/AbstractObservableTest.java
+++ /dev/null
@@ -1,255 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Brad Reynolds.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- * Brad Reynolds - bug 116920
- ******************************************************************************/
-
-package org.eclipse.jface.tests.internal.databinding.provisional.observable;
-
-import org.eclipse.core.databinding.observable.AbstractObservable;
-import org.eclipse.core.databinding.observable.ChangeEvent;
-import org.eclipse.core.databinding.observable.IChangeListener;
-import org.eclipse.core.databinding.observable.IObservable;
-import org.eclipse.core.databinding.observable.IStaleListener;
-import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.StaleEvent;
-import org.eclipse.jface.tests.databinding.AbstractDefaultRealmTestCase;
-import org.eclipse.jface.tests.databinding.util.RealmTester;
-import org.eclipse.jface.tests.databinding.util.RealmTester.CurrentRealm;
-
-/**
- * Tests for AbstractObservable.
- *
- * @since 1.1
- */
-public class AbstractObservableTest extends AbstractDefaultRealmTestCase {
- private ObservableStub observable;
-
- protected void setUp() throws Exception {
- super.setUp();
- observable = new ObservableStub(Realm.getDefault());
- }
-
- public void testStaleListener() throws Exception {
- assertFalse(observable.hasListeners());
-
- StaleListener listener1 = new StaleListener();
-
- assertFalse(observable.firstListenerAdded);
- observable.addStaleListener(listener1);
- assertTrue(observable.firstListenerAdded);
- observable.firstListenerAdded = false; // reset
-
- assertTrue(observable.hasListeners());
- assertEquals(0, listener1.count);
-
- observable.fireStale();
-
- assertEquals(1, listener1.count);
- assertSame(observable, listener1.source);
-
- // Add a second stale listener as 1 vs. 2 listener code is different.
- StaleListener listener2 = new StaleListener();
- assertEquals(0, listener2.count);
- observable.addStaleListener(listener2);
- observable.fireStale();
-
- assertEquals(2, listener1.count);
- assertEquals(1, listener2.count);
-
- // Add a third stale listener as 2 vs. 3 or greater code is different.
- StaleListener listener3 = new StaleListener();
- observable.addStaleListener(listener3);
- assertEquals(0, listener3.count);
-
- observable.fireStale();
-
- assertEquals(3, listener1.count);
- assertEquals(2, listener2.count);
- assertEquals(1, listener3.count);
-
- assertFalse(observable.lastListenerRemoved);
- observable.removeStaleListener(listener1);
- observable.removeStaleListener(listener2);
- observable.removeStaleListener(listener3);
- assertTrue(observable.lastListenerRemoved);
-
- assertFalse(observable.hasListeners());
- }
-
- public void testChangeListener() throws Exception {
- assertFalse(observable.hasListeners());
-
- ChangeListener listener1 = new ChangeListener();
-
- assertFalse(observable.firstListenerAdded);
- observable.addChangeListener(listener1);
- assertTrue(observable.firstListenerAdded);
- observable.firstListenerAdded = false;
-
- assertTrue(observable.hasListeners());
- assertEquals(0, listener1.count);
-
- observable.fireChange();
-
- assertEquals(1, listener1.count);
- assertSame(observable, listener1.source);
-
- // Add a second listener as the 1 vs. 2 listener code is different.
- ChangeListener listener2 = new ChangeListener();
- observable.addChangeListener(listener2);
- assertEquals(0, listener2.count);
-
- observable.fireChange();
- assertEquals(2, listener1.count);
- assertEquals(1, listener2.count);
-
- // Add a third listener as the 2 vs. 3 or greater code is different.
- ChangeListener listener3 = new ChangeListener();
- observable.addChangeListener(listener3);
- assertEquals(0, listener3.count);
-
- observable.fireChange();
-
- assertEquals(3, listener1.count);
- assertEquals(2, listener2.count);
- assertEquals(1, listener3.count);
-
- assertFalse(observable.lastListenerRemoved);
- observable.removeChangeListener(listener1);
- observable.removeChangeListener(listener2);
- observable.removeChangeListener(listener3);
- assertTrue(observable.lastListenerRemoved);
-
- assertFalse(observable.hasListeners());
- }
-
- public void testHasListenersWithChangeAndStaleListeners() throws Exception {
- ChangeListener changeListener = new ChangeListener();
- StaleListener staleListener = new StaleListener();
-
- assertFalse(observable.hasListeners());
- assertFalse(observable.firstListenerAdded);
- assertFalse(observable.lastListenerRemoved);
-
- observable.addChangeListener(changeListener);
- assertTrue(observable.hasListeners());
- assertTrue(observable.firstListenerAdded);
- assertFalse(observable.lastListenerRemoved);
-
- // reset
- observable.firstListenerAdded = false;
- observable.lastListenerRemoved = false;
-
- observable.addStaleListener(staleListener);
- assertTrue(observable.hasListeners());
- assertFalse(observable.firstListenerAdded);
- assertFalse(observable.lastListenerRemoved);
-
- observable.removeChangeListener(changeListener);
- assertTrue(observable.hasListeners());
- assertFalse(observable.firstListenerAdded);
- assertFalse(observable.lastListenerRemoved);
-
- observable.removeStaleListener(staleListener);
- assertFalse(observable.hasListeners());
- assertFalse(observable.firstListenerAdded);
- assertTrue(observable.lastListenerRemoved);
- }
-
- public void testFireStaleRealmChecks() throws Exception {
- RealmTester.setDefault(new CurrentRealm(true));
-
- RealmTester.exerciseCurrent(new Runnable() {
- public void run() {
- observable = new ObservableStub();
- observable.fireStale();
- }
- });
- }
-
- public void testFireChangeRealmChecks() throws Exception {
- RealmTester.setDefault(new CurrentRealm(true));
-
- RealmTester.exerciseCurrent(new Runnable() {
- public void run() {
- observable = new ObservableStub();
- observable.fireChange();
- }
- });
- }
-
- private class ChangeListener implements IChangeListener {
- int count;
- IObservable source;
-
- public void handleChange(ChangeEvent event) {
- count++;
- this.source = event.getObservable();
- }
- }
-
- private class StaleListener implements IStaleListener {
- int count;
- IObservable source;
-
- public void handleStale(StaleEvent event) {
- count++;
- this.source = event.getObservable();
- }
- }
-
- private static class ObservableStub extends AbstractObservable {
- public ObservableStub() {
- this(Realm.getDefault());
- }
-
- /**
- * @param realm
- */
- public ObservableStub(Realm realm) {
- super(realm);
- }
-
- private boolean firstListenerAdded;
- private boolean lastListenerRemoved;
-
- protected Object doGetValue() {
- return null;
- }
-
- public Object getValueType() {
- return null;
- }
-
- protected void fireStale() {
- super.fireStale();
- }
-
- protected void fireChange() {
- super.fireChange();
- }
-
- public boolean isStale() {
- return false;
- }
-
- protected boolean hasListeners() {
- return super.hasListeners();
- }
-
- protected void firstListenerAdded() {
- firstListenerAdded = true;
- }
-
- protected void lastListenerRemoved() {
- lastListenerRemoved = true;
- }
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/provisional/observable/ObservablesTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/provisional/observable/ObservablesTest.java
deleted file mode 100644
index b97183ca..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/provisional/observable/ObservablesTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Cerner Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.internal.databinding.provisional.observable;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.databinding.observable.Observables;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.list.ObservableList;
-import org.eclipse.core.internal.databinding.observable.UnmodifiableObservableList;
-import org.eclipse.jface.tests.databinding.AbstractDefaultRealmTestCase;
-
-public class ObservablesTest extends AbstractDefaultRealmTestCase {
- public void testUnmodifableObservableListExceptions() throws Exception {
- try {
- Observables.unmodifiableObservableList(null);
- fail("IllegalArgumentException should have been thrown.");
- } catch (IllegalArgumentException e) {
- }
- }
-
- public void testUnmodifiableObservableList() throws Exception {
- IObservableList unmodifiable = Observables.unmodifiableObservableList(new ObservableListStub(new ArrayList(0), String.class));
- assertTrue(unmodifiable instanceof UnmodifiableObservableList);
- }
-
- private static class ObservableListStub extends ObservableList {
- /**
- * @param wrappedList
- * @param elementType
- */
- protected ObservableListStub(List wrappedList, Object elementType) {
- super(wrappedList, elementType);
- }
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/provisional/viewers/SelectionObservableValueTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/provisional/viewers/SelectionObservableValueTest.java
deleted file mode 100644
index 73549284..00000000
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/provisional/viewers/SelectionObservableValueTest.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Brad Reynolds and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Brad Reynolds - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jface.tests.internal.databinding.provisional.viewers;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.databinding.observable.value.IValueChangeListener;
-import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
-import org.eclipse.jface.databinding.viewers.ViewersObservables;
-import org.eclipse.jface.viewers.ArrayContentProvider;
-import org.eclipse.jface.viewers.ListViewer;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @since 3.3
- */
-public class SelectionObservableValueTest extends TestCase {
- public void testSetValue() throws Exception {
- Shell shell = new Shell();
- ListViewer viewer = new ListViewer(shell);
- String[] items = new String[] {"1", "2", "3"};
- viewer.setContentProvider(new ArrayContentProvider());
- viewer.setInput(items);
-
- IObservableValue observable = ViewersObservables.observeSingleSelection(viewer);
- ValueChangeListener listener = new ValueChangeListener();
- observable.addValueChangeListener(listener);
-
- assertNull(observable.getValue());
- assertEquals(StructuredSelection.EMPTY, viewer.getSelection());
- assertEquals(0, listener.count);
-
- observable.setValue(items[0]);
- assertEquals("observable value", items[0], observable.getValue());
- assertEquals("viewer selection", items[0], ((StructuredSelection) viewer.getSelection()).getFirstElement());
- assertEquals("value change event", 1, listener.count);
-
- observable.setValue(items[0]);
- assertEquals("value did not change, event should not have fired", 1, listener.count);
-
- observable.setValue(null);
- assertNull(observable.getValue());
- assertEquals("viewer selection should be empty", StructuredSelection.EMPTY, viewer.getSelection());
- assertEquals("value change event did not fire", 2, listener.count);
- }
-
- private static class ValueChangeListener implements IValueChangeListener {
- int count;
-
- public void handleValueChange(ValueChangeEvent event) {
- count++;
- }
- }
-}
diff --git a/tests/org.eclipse.jface.tests.databinding/test.xml b/tests/org.eclipse.jface.tests.databinding/test.xml
deleted file mode 100644
index 73284d59..00000000
--- a/tests/org.eclipse.jface.tests.databinding/test.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="testsuite" default="run" basedir=".">
- <!-- The property ${eclipse-home} should be passed into this script -->
- <!-- Set a meaningful default value for when it is not. -->
- <property name="eclipse-home" value="${basedir}\..\.."/>
-
- <!-- sets the properties eclipse-home, and library-file -->
- <property name="plugin-name" value="org.eclipse.jface.tests.databinding"/>
- <property name="library-file"
- value="${eclipse-home}/plugins/org.eclipse.test/library.xml"/>
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp/>
- <delete>
- <fileset dir="${eclipse-home}" includes="org*.xml"/>
- </delete>
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
- <property name="sniff-folder"
- value="${eclipse-home}/databinding_sniff_folder"/>
- <delete dir="${sniff-folder}" quiet="true"/>
- <ant target="core-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${sniff-folder}"/>
- <property name="plugin-name" value="${plugin-name}"/>
- <property name="classname"
- value="org.eclipse.jface.tests.databinding.BindingTestSuite"/>
- </ant>
- </target>
-
- <!-- This target holds code to cleanup the testing environment after -->
- <!-- after all of the tests have been run. You can use this target to -->
- <!-- delete temporary files that have been created. -->
- <target name="cleanup">
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen -->
- <!-- after all the tests have been run should go here. -->
- <target name="run" depends="init,suite,cleanup">
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org*.xml"/>
- <property name="output-file" value="${plugin-name}.xml"/>
- </ant>
- </target>
-</project>

Back to the top