Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2012-03-09 10:16:50 +0000
committerSteffen Pingel2012-03-09 10:16:50 +0000
commit8366e7cfff01d39d7ac7e3e4f5ddd9bfe284b17d (patch)
tree413f7f9321c2ddbc0e4fc891261d63d4810068b2 /org.eclipse.mylyn.tasks.index.ui
parentc634e483d49a17f9642c3a1ab6941283d6da9bed (diff)
downloadorg.eclipse.mylyn.tasks-8366e7cfff01d39d7ac7e3e4f5ddd9bfe284b17d.tar.gz
org.eclipse.mylyn.tasks-8366e7cfff01d39d7ac7e3e4f5ddd9bfe284b17d.tar.xz
org.eclipse.mylyn.tasks-8366e7cfff01d39d7ac7e3e4f5ddd9bfe284b17d.zip
ASSIGNED - bug 373275: show "Content Assist Available" decoration in
task list find box https://bugs.eclipse.org/bugs/show_bug.cgi?id=373275 Change-Id: I29df0e820a0359bba01dc4d38623173c882de5b5
Diffstat (limited to 'org.eclipse.mylyn.tasks.index.ui')
-rw-r--r--org.eclipse.mylyn.tasks.index.ui/src/org/eclipse/mylyn/internal/tasks/index/ui/IndexSearchHandler.java13
1 files changed, 5 insertions, 8 deletions
diff --git a/org.eclipse.mylyn.tasks.index.ui/src/org/eclipse/mylyn/internal/tasks/index/ui/IndexSearchHandler.java b/org.eclipse.mylyn.tasks.index.ui/src/org/eclipse/mylyn/internal/tasks/index/ui/IndexSearchHandler.java
index 01ef81b97..fd502584d 100644
--- a/org.eclipse.mylyn.tasks.index.ui/src/org/eclipse/mylyn/internal/tasks/index/ui/IndexSearchHandler.java
+++ b/org.eclipse.mylyn.tasks.index.ui/src/org/eclipse/mylyn/internal/tasks/index/ui/IndexSearchHandler.java
@@ -36,6 +36,7 @@ import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Event;
@@ -231,16 +232,12 @@ public class IndexSearchHandler extends AbstractSearchHandler {
public void adaptTextSearchControl(Text textControl) {
IContentProposalProvider proposalProvider = new ContentProposalProvider();
final ContentAssistCommandAdapter adapter = new ContentAssistCommandAdapter(textControl,
- new TextContentAdapter(), proposalProvider, null, new char[0]);
+ new TextContentAdapter(), proposalProvider, null, new char[0], true);
adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
- // if we decorate the control it lets the user know that they can use content assist...
- // BUT it looks pretty bad.
-// ControlDecoration controlDecoration = new ControlDecoration(textControl, (SWT.TOP | SWT.LEFT));
-// controlDecoration.setShowOnlyOnFocus(true);
-// FieldDecoration contentProposalImage = FieldDecorationRegistry.getDefault().getFieldDecoration(
-// FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);
-// controlDecoration.setImage(contentProposalImage.getImage());
+ if (textControl.getParent().getLayout() instanceof GridLayout) {
+ ((GridLayout) textControl.getParent().getLayout()).marginLeft = 4;
+ }
// FilteredTree registers a traverse listener that focuses the tree when ENTER is pressed. This
// causes focus to be lost when a content proposal is selected. To avoid transfer of focus the

Back to the top