merge-update from trunk
authorPatric Plitzner <p.plitzner@bgbm.org>
Tue, 3 Sep 2013 13:08:40 +0000 (13:08 +0000)
committerPatric Plitzner <p.plitzner@bgbm.org>
Tue, 3 Sep 2013 13:08:40 +0000 (13:08 +0000)
1  2 
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AbstractFilteredCdmResourceSelectionDialog.java

index 23f97cd193226cf12c2d49a691fcf417065ca14e,95a87cf5211b2cac8862c27141dcf26204e0d64c..d9727902a7c5f96df5b847f9231a47a4d9ae4fbe
@@@ -61,14 -61,14 +61,14 @@@ import eu.etaxonomy.taxeditor.store.int
  public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmBase> extends
                FilteredItemsSelectionDialog implements IConversationEnabled {
  
-       private ConversationHolder conversation;
+       private final ConversationHolder conversation;
  
        protected List<UuidAndTitleCache<T>> model;
-       private Set<T> transientCdmObjects = new HashSet<T>();
-       private String settings;        
+       private final Set<T> transientCdmObjects = new HashSet<T>();
+       private final String settings;
 -
 +      
        protected T cdmBaseToBeFiltered;
 -
 +      
        /**
         * <p>Constructor for AbstractFilteredCdmResourceSelectionDialog.</p>
         *
                        lastCompletedFilter.setAccessible(true);
                        lastCompletedFilter.set(this, null);
                } catch (SecurityException e) {
-                       StoreUtil.error(getClass(), e);
+                       AbstractUtility.error(getClass(), e);
                } catch (NoSuchFieldException e) {
-                       StoreUtil.error(getClass(), e);
+                       AbstractUtility.error(getClass(), e);
                } catch (IllegalArgumentException e) {
-                       StoreUtil.error(getClass(), e);
+                       AbstractUtility.error(getClass(), e);
                } catch (IllegalAccessException e) {
-                       StoreUtil.error(getClass(), e);
+                       AbstractUtility.error(getClass(), e);
                }
 -
 -              // this also is not the nicest way to do it.
 +              
 +              // this also is not the nicest way to do it. 
                // I am still amazed, that FilteredSelectionDialog does not offer any methods to change its data
                // once it was opened. Am I doing it wrong?
                String pattern = getTitle(cdmObject);
        @Override
        protected Comparator getItemsComparator() {
                return new Comparator<UuidAndTitleCache>() {
 -            public int compare(UuidAndTitleCache entity1,
+                       @Override
 +                      public int compare(UuidAndTitleCache entity1,
                                        UuidAndTitleCache entity2) {
                                Collator collator = Collator.getInstance();
                                return collator.compare(entity1.getTitleCache(), entity2.getTitleCache());
            /*
            * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.SelectionHistory#restoreItemFromMemento(org.eclipse.ui.IMemento)
                */
 -        protected Object restoreItemFromMemento(IMemento element) {
+               @Override
 +              protected Object restoreItemFromMemento(IMemento element) {
                        return element.getString("resource"); //$NON-NLS-1$
                }
                /*
                 * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.SelectionHistory#storeItemToMemento(java.lang.Object,
                 *      org.eclipse.ui.IMemento)
                 */
 -        protected void storeItemToMemento(Object item, IMemento element) {
+               @Override
 +              protected void storeItemToMemento(Object item, IMemento element) {
                        element.putString("resource", item.toString()); //$NON-NLS-1$
                }
        }
         * @return a {@link eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard} object.
         */
        protected abstract AbstractNewEntityWizard getNewEntityWizard(String parameter);
 -
 +      
        public class FilteredCdmResourceLabelProvider extends LabelProvider {
 -        public String getText(Object element) {
+               @Override
 +              public String getText(Object element) {
                        if (element == null) {
                                return null;
                        }
         *
         * @return a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
         */
 -    public ConversationHolder getConversationHolder() {
+       @Override
 +      public ConversationHolder getConversationHolder() {
                return conversation;
        }
 -
 +      
        /** {@inheritDoc} */
 -    public void update(CdmDataChangeMap changeEvents) {}
+       @Override
 +      public void update(CdmDataChangeMap changeEvents) {}
  
        /**
 -       * Don't want to add for example a taxon or synonym to itself
 -       * so filter the list to remove the taxon in question
 +       * Don't want to add for example a taxon or synonym to itself 
 +       * so filter the list to remove the taxon in question 
         * (<code>cdmBaseToBeFiltered</code>)
         * so it is not available in the filtered list.
         */