Fixes #2416
authorn.hoffmann <n.hoffmann@localhost>
Wed, 22 Jun 2011 14:34:35 +0000 (14:34 +0000)
committern.hoffmann <n.hoffmann@localhost>
Wed, 22 Jun 2011 14:34:35 +0000 (14:34 +0000)
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditor.java

index 77869dfcdd4a451a305f15dc395cbeaf98e379a9..b0b3b157e8ac8de5de8c26991a8bf8a74035bf0f 100644 (file)
 
 package eu.etaxonomy.taxeditor.bulkeditor;
 
+import java.util.Iterator;
+
 import org.eclipse.jface.action.IMenuManager;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.dialogs.MessageDialogWithToggle;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.text.TextSelection;
 import org.eclipse.jface.text.source.Annotation;
 import org.eclipse.jface.text.source.AnnotationModel;
+import org.eclipse.jface.text.source.IAnnotationModel;
 import org.eclipse.jface.text.source.ISourceViewer;
 import org.eclipse.jface.text.source.IVerticalRuler;
 import org.eclipse.jface.util.IPropertyChangeListener;
@@ -273,9 +278,16 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe
                        getEditorInput().performSearch(query);
                        
                        refresh();
+                       
+                       selectFirstItem();
                }
        }
        
+       private void selectFirstItem() {
+               ITextSelection selection = new TextSelection(0, 0);     
+               getSelectionProvider().setSelection(selection);
+       }
+
        /**
         * 
         */