fix selection dialog
authorKatja Luther <k.luther@bgbm.org>
Sun, 12 Jun 2016 05:28:43 +0000 (07:28 +0200)
committerKatja Luther <k.luther@bgbm.org>
Sun, 12 Jun 2016 05:38:35 +0000 (07:38 +0200)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AbstractFilteredCdmResourceSelectionDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/CdmFilteredItemsSelectionDialog.java

index 8f8fa314492772f61204aad36c0085ef7fb94600..230cb98372f180a9c4603d0a9769f02aab031755 100644 (file)
@@ -223,15 +223,12 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
        /** {@inheritDoc} */
        @Override
        public void refresh() {
-               initModel();
+               //initModel();
                filterExcludedObjects();
                super.refresh();
        }
 
-       /**
-        * <p>initModel</p>
-        */
-       abstract protected void initModel();
+
 
        /* (non-Javadoc)
         * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#createFilter()
index 975673b48d4ce017851059fc02c68ed6f9aba272..45a5810430cc3b7bac7259f6646bb8691ed3a191 100644 (file)
@@ -1190,7 +1190,7 @@ public abstract class CdmFilteredItemsSelectionDialog extends SelectionStatusDia
          * refiltering.
          */
         protected void applyFilter() {
-
+            initModel();
             ItemsFilter newFilter = createFilter();
 
             // don't apply filtering for patterns which mean the same, for example:
@@ -2938,11 +2938,13 @@ public abstract class CdmFilteredItemsSelectionDialog extends SelectionStatusDia
              */
             @Override
             public Object[] getElements(Object inputElement) {
+                //return items.toArray();
                 return lastFilteredItems.toArray();
             }
 
             public int getNumberOfElements() {
-                return lastFilteredItems.size();
+
+               return lastFilteredItems.size();
             }
 
             /*
@@ -3401,6 +3403,11 @@ public abstract class CdmFilteredItemsSelectionDialog extends SelectionStatusDia
             return pattern;
         }
 
+        /**
+         * <p>initModel</p>
+         */
+        abstract protected void initModel();
+
     }