Add 'parentproject' operator that includes changes of child projects

With the 'parentproject' operator one can find all changes of a
project and its child projects. This is e.g. useful to watch a project
tree.

Change-Id: Id45e6fc391137a1830a1782fea0b1326c661afa9
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
Edwin Kempin
2013-06-28 02:05:14 +02:00
parent 93d6838485
commit 7c0eb41351
7 changed files with 97 additions and 10 deletions

View File

@@ -22,13 +22,13 @@ import com.google.gwtexpui.safehtml.client.HighlightSuggestOracle;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.TreeSet;
public class SearchSuggestOracle extends HighlightSuggestOracle {
private static final List<ParamSuggester> paramSuggester = Arrays.asList(
new ParamSuggester("project:", new ProjectNameSuggestOracle()),
new ParamSuggester(Arrays.asList("project:", "parentproject:"),
new ProjectNameSuggestOracle()),
new ParamSuggester(Arrays.asList("owner:", "reviewer:"),
new AccountSuggestOracle() {
@Override
@@ -81,6 +81,7 @@ public class SearchSuggestOracle extends HighlightSuggestOracle {
suggestions.add("commit:");
suggestions.add("comment:");
suggestions.add("project:");
suggestions.add("parentproject:");
suggestions.add("branch:");
suggestions.add("topic:");
suggestions.add("ref:");
@@ -207,11 +208,6 @@ public class SearchSuggestOracle extends HighlightSuggestOracle {
private final List<String> operators;
private final SuggestOracle parameterSuggestionOracle;
ParamSuggester(final String operator,
final SuggestOracle parameterSuggestionOracle) {
this(Collections.singletonList(operator), parameterSuggestionOracle);
}
ParamSuggester(final List<String> operators,
final SuggestOracle parameterSuggestionOracle) {
this.operators = operators;