Skip to content

Commit

Permalink
chore: Improve various search help
Browse files Browse the repository at this point in the history
  • Loading branch information
robinshine committed Oct 22, 2024
1 parent 9b34c43 commit 4b363ce
Show file tree
Hide file tree
Showing 16 changed files with 16 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
@SuppressWarnings("serial")
public class AgentQueryBehavior extends ANTLRAssistBehavior {

private static final String FUZZY_SUGGESTION_DESCRIPTION_PREFIX = "surround with ~";
private static final String FUZZY_SUGGESTION_DESCRIPTION_PREFIX = "enclose with ~";

private final boolean forExecutor;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
@SuppressWarnings("serial")
public class BuildQueryBehavior extends ANTLRAssistBehavior {

private static final String FUZZY_SUGGESTION_DESCRIPTION_PREFIX = "surround with ~";
private static final String FUZZY_SUGGESTION_DESCRIPTION_PREFIX = "enclose with ~";

private final IModel<Project> projectModel;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
@SuppressWarnings("serial")
public class CodeCommentQueryBehavior extends ANTLRAssistBehavior {

private static final String FUZZY_SUGGESTION_DESCRIPTION_PREFIX = "surround with ~";
private static final String FUZZY_SUGGESTION_DESCRIPTION_PREFIX = "enclose with ~";

private final IModel<Project> projectModel;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
@SuppressWarnings("serial")
public class CommitQueryBehavior extends ANTLRAssistBehavior {

private static final String FUZZY_SUGGESTION_DESCRIPTION_PREFIX = "surround with ~";
private static final String FUZZY_SUGGESTION_DESCRIPTION_PREFIX = "enclose with ~";

private final IModel<Project> projectModel;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
@SuppressWarnings("serial")
public class IssueQueryBehavior extends ANTLRAssistBehavior {

private static final String FUZZY_SUGGESTION_DESCRIPTION_PREFIX = "surround with ~";
private static final String FUZZY_SUGGESTION_DESCRIPTION_PREFIX = "enclose with ~";

private final IModel<Project> projectModel;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
@SuppressWarnings("serial")
public class PackQueryBehavior extends ANTLRAssistBehavior {

private static final String FUZZY_SUGGESTION_DESCRIPTION_PREFIX = "surround with ~";
private static final String FUZZY_SUGGESTION_DESCRIPTION_PREFIX = "enclose with ~";

private final IModel<Project> projectModel;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
@SuppressWarnings("serial")
public class ProjectQueryBehavior extends ANTLRAssistBehavior {

private static final String FUZZY_SUGGESTION_DESCRIPTION_PREFIX = "surround with ~";
private static final String FUZZY_SUGGESTION_DESCRIPTION_PREFIX = "enclose with ~";

private final boolean childQuery;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
@SuppressWarnings("serial")
public class PullRequestQueryBehavior extends ANTLRAssistBehavior {

private static final String FUZZY_SUGGESTION_DESCRIPTION_PREFIX = "surround with ~";
private static final String FUZZY_SUGGESTION_DESCRIPTION_PREFIX = "enclose with ~";

private final IModel<Project> projectModel;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ private BuildQuery parse(@Nullable String queryString, BuildQuery baseQuery) {
error(e.getMessage());
return null;
} else {
info("Performing fuzzy query. Enclosing search text with '~' to add more conditions, for instance: ~text to search~ and successful");
parsedQuery = new BuildQuery(new FuzzyCriteria(queryString));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ protected CodeCommentQuery load() {
error(e.getMessage());
return null;
} else {
info("Performing fuzzy query. Enclosing search text with '~' to add more conditions, for instance: ~text to search~ and unresolved");
return new CodeCommentQuery(new FuzzyCriteria(queryString));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ protected CommitQuery load() {
error(e.getMessage());
return null;
} else {
info("Performing fuzzy query. Enclosing search text with '~' to add more conditions, for instance: ~text to search~ and author(robin)");
parsedQuery = new CommitQuery(Lists.newArrayList(new FuzzyCriteria(Lists.newArrayList(queryString))));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ private IssueQuery parse(@Nullable String queryString, IssueQuery baseQuery) {
error(e.getMessage());
return null;
} else {
info("Performing fuzzy query. Enclosing search text with '~' to add more conditions, for instance: ~text to search~ and \"State\" is \"Open\"");
parsedQuery = new IssueQuery(new FuzzyCriteria(queryString));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ private PackQuery parse(@Nullable String queryString, PackQuery baseQuery, @Null
error(e.getMessage());
return null;
} else {
info("Performing fuzzy query. Enclosing search text with '~' to add more conditions, for instance: ~text to search~ and \"Type\" is \"NPM\"");
parsedQuery = new PackQuery(new FuzzyCriteria(queryString));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1258,6 +1258,7 @@ private ProjectQuery parse(@Nullable String queryString, ProjectQuery baseQuery)
error(e.getMessage());
return null;
} else {
info("Performing fuzzy query. Enclosing search text with '~' to add more conditions, for instance: ~text to search~ and owned by me");
parsedQuery = new ProjectQuery(new FuzzyCriteria(queryString));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ private PullRequestQuery parse(@Nullable String queryString, PullRequestQuery ba
error(e.getMessage());
return null;
} else {
info("Performing fuzzy query. Enclosing search text with '~' to add more conditions, for instance: ~text to search~ and open");
parsedQuery = new PullRequestQuery(new FuzzyCriteria(queryString));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ protected AgentQuery load() {
error(e.getMessage());
return null;
} else {
info("Performing fuzzy query. Enclosing search text with '~' to add more conditions, for instance: ~text to search~ and online");
return new AgentQuery(new FuzzyCriteria(queryString));
}
}
Expand Down

0 comments on commit 4b363ce

Please sign in to comment.