Mercurial > projects > dwt2
diff org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet020TreeViewerWithSetFactory.d @ 100:e884642ad36e
more work on examples
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Thu, 23 Apr 2009 00:02:38 +0200 |
parents | 5d5bd660917f |
children |
line wrap: on
line diff
--- a/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet020TreeViewerWithSetFactory.d Wed Apr 22 18:59:26 2009 +0200 +++ b/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet020TreeViewerWithSetFactory.d Thu Apr 23 00:02:38 2009 +0200 @@ -157,7 +157,7 @@ Bean bean = (Bean) selectedItem.getData(); TreeItem parentItem = selectedItem.getParentItem(); Bean parent; - if (parentItem == null) + if (parentItem is null) parent = input; else parent = (Bean) parentItem.getData(); @@ -181,10 +181,10 @@ pasteButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(final SelectionEvent e) { Bean copy = (Bean) clipboard.getValue(); - if (copy == null) + if (copy is null) return; Bean parent = getSelectedBean(); - if (parent == null) + if (parent is null) parent = input; Set set = new HashSet(parent.getSet()); @@ -259,7 +259,7 @@ .observeSingleSelection(beanViewer); IObservableValue beanSelected = new ComputedValue(bool.TYPE) { protected Object calculate() { - return bool.valueOf(beanViewerSelection.getValue() != null); + return bool.valueOf(beanViewerSelection.getValue() !is null); } }; dbc.bindValue(SWTObservables.observeEnabled(addChildBeanButton), @@ -272,7 +272,7 @@ dbc.bindValue(SWTObservables.observeEnabled(pasteButton), new ComputedValue(bool.TYPE) { protected Object calculate() { - return bool.valueOf(clipboard.getValue() != null); + return bool.valueOf(clipboard.getValue() !is null); } }); @@ -309,13 +309,13 @@ } public Set getSet() { - if (set == null) + if (set is null) return null; return new HashSet(set); } public void setSet(Set set) { - if (set != null) + if (set !is null) set = new HashSet(set); changeSupport.firePropertyChange("set", this.set, this.set = set); }