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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user