ystrot/glance — Issue #14: Keyboard shortcut doesn't fill search box with selected text 
Author: EugenyLoy
Created: 2012-01-31 07:53:12+00:00
State: open

It seems that shortcut provided by Glance doesn't work well. This bug is pretty critical if for people who use keyboard shortcuts extensively.
It is expected that when You press "Glance Search" shortcut Glance will appear and text selected in editor will be typed into search box.

Steps to reproduce:

Tested on vanilla Eclipse 3.7.1 ("Eclipse IDE for Java Developers"(JDT), Version: Indigo Service Release 1, Build id: 20110916-0149) with Glance 0.7.6.200910031747

1. Create new untitled file for testing (File->New->Other->Untitled Text File)
2. Type in "qwe", new line(Enter), "asd" (2 lines total)
3. Select text "qwe" (double click in text in editor sould be ok)
4 Press Ctrl+Alt+F - Glance will appear, and selected text is typed in search box (expected)
5. Select text "asd"
6 Press Ctrl+Alt+F - Glance will appear, but selected text is not filled into search box (unexpected, "asd" should be in search box in this case)

At first I thought that the reason of such behavior is that "qwe" is already typed into search box before doing step 6, but it doesn't work even if search box is cleared.
Also, it seems that this bug is not 100% reproducible, on my STS it behaves slightly different (same with 0.7.6 and latest 0.9.1). Here is my observations:

1. Create new untitled file for testing
2. Type in "qwe", new line, "asd" (2 lines total)
3. Select text "qwe"
4 Press Ctrl+Alt+F - Glance will appear, but selected text is not filled into search box (unexpected, "qwe" should be in search box in this case)
5. Select text "asd"
6 Press Ctrl+Alt+F - Glance will appear, but selected text is not filled into search box (unexpected, "asd" should be in search box in this case)
7. Select text "qwe"
8 Press Ctrl+Alt+F - Glance will appear, and selected text is typed in search box (expected, finally "qwe" is in search box)