Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2015-03-23 12:12:45 -0400
committerMatthias Sohn2015-05-15 15:54:08 -0400
commit12a6299909b1bda6a3a4957aa0d6e2c89869c18f (patch)
tree3e849b8f546b07f7b8b629ea3c210bfc4ca1325f
parent9a239f95e8095886a67eaa9b9236b101d1e11b30 (diff)
downloadegit-12a6299909b1bda6a3a4957aa0d6e2c89869c18f.tar.gz
egit-12a6299909b1bda6a3a4957aa0d6e2c89869c18f.tar.xz
egit-12a6299909b1bda6a3a4957aa0d6e2c89869c18f.zip
Automatic wildcard matching "Add Git repositories" dialog
Bug: 462866 Change-Id: I20f9805b783a0d2639901435cc75a5ac80075022 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/components/FilteredCheckboxTree.java17
1 files changed, 15 insertions, 2 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/components/FilteredCheckboxTree.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/components/FilteredCheckboxTree.java
index 4b4c560b3..a7b0b949d 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/components/FilteredCheckboxTree.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/components/FilteredCheckboxTree.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
+ * Copyright (c) 2010, 2015 Red Hat, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* Chris Aniszczyk <caniszczyk@gmail.com> - initial implementation
+ * Lars Vogel <Lars.Vogel@vogella.com> - Bug 462866
*******************************************************************************/
package org.eclipse.egit.ui.internal.components;
@@ -120,6 +121,18 @@ public class FilteredCheckboxTree extends FilteredTree {
return parentText;
}
+ @Override
+ protected String getFilterString() {
+ String filterString = super.getFilterString();
+ if (!filterText.getText().equals(initialText)
+ && filterString.indexOf("*") != 0 //$NON-NLS-1$
+ && filterString.indexOf("?") != 0 //$NON-NLS-1$
+ && filterString.indexOf(".") != 0) {//$NON-NLS-1$
+ filterString = "*" + filterString; //$NON-NLS-1$
+ }
+ return filterString;
+ }
+
/**
* Clears the filter
*/
@@ -140,4 +153,4 @@ public class FilteredCheckboxTree extends FilteredTree {
protected long getRefreshJobDelay() {
return FILTER_DELAY;
}
-} \ No newline at end of file
+}

Back to the top