Bug 184818 [DataBinding] Typo in example 3
In the ViewModel.setText(String) method of the it's firing a change event for "test" and not "text". public void setText(String text) { String oldValue = this.text; this.text = text; firePropertyChange("test", oldValue, text); } This needs to be changed to "text".
examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet002UpdateComboRetainSelection.java
private ViewModel viewModel;
        /**
         * used to make a new choices array unique
         */
        static int count;
        public View(ViewModel viewModel) {
            this.viewModel = viewModel;
        }
        public Shell createShell() {
            
            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));