public abstract class RunAnythingGroup
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
RunAnythingGroup.SearchResult
Represents collection of the group items with
myNeedMore flag is set to true when limit is exceeded |
| Modifier and Type | Field and Description |
|---|---|
static Function<java.lang.String,NameUtil.MatcherBuilder> |
RUN_ANYTHING_MATCHER_BUILDER |
| Constructor and Description |
|---|
RunAnythingGroup() |
| Modifier and Type | Method and Description |
|---|---|
static void |
clearIndexes(java.util.Collection<? extends RunAnythingGroup> groups)
Clears
myMoreIndex and myTitleIndex of all groups. |
static void |
clearMoreIndex(java.util.Collection<? extends RunAnythingGroup> groups)
Clears
myMoreIndex of all groups. |
void |
collectItems(DataContext dataContext,
java.util.List<RunAnythingItem> model,
java.lang.String pattern)
Adds current group matched items into the list.
|
static RunAnythingGroup |
findGroup(java.util.Collection<? extends RunAnythingGroup> groups,
int titleIndex)
Finds group by
titleIndex. |
static RunAnythingGroup |
findGroupByMoreIndex(java.util.Collection<? extends RunAnythingGroup> groups,
int moreIndex)
Finds matched by
myMoreIndex group. |
static RunAnythingGroup |
findGroupByTitleIndex(java.util.Collection<? extends RunAnythingGroup> groups,
int titleIndex)
Finds group matched by
myTitleIndex. |
static RunAnythingGroup |
findItemGroup(java.util.List<? extends RunAnythingGroup> groups,
int itemIndex)
Finds group
itemIndex belongs to. |
static int[] |
getAllIndexes(java.util.Collection<? extends RunAnythingGroup> groups)
Joins
myTitleIndex and myMoreIndex of all groups; using for navigating by 'TAB' between groups. |
abstract RunAnythingGroup.SearchResult |
getItems(DataContext dataContext,
java.util.List<RunAnythingItem> model,
java.lang.String pattern,
int itemsToInsert)
Gets current group items to add into the main list.
|
protected int |
getMaxInitialItems() |
int |
getMaxItemsToInsert() |
abstract java.lang.String |
getTitle() |
static java.lang.String |
getTitle(java.util.Collection<? extends RunAnythingGroup> groups,
int titleIndex)
Finds group title by
titleIndex. |
static boolean |
isMoreIndex(java.util.Collection<? extends RunAnythingGroup> groups,
int index)
|
void |
resetMoreIndex()
Resets current group 'load more..'
myMoreIndex index. |
static void |
shiftIndexes(java.util.Collection<? extends RunAnythingGroup> groups,
int baseIndex,
int shift)
|
public static final Function<java.lang.String,NameUtil.MatcherBuilder> RUN_ANYTHING_MATCHER_BUILDER
public abstract java.lang.String getTitle()
protected int getMaxInitialItems()
public int getMaxItemsToInsert()
public abstract RunAnythingGroup.SearchResult getItems(DataContext dataContext, java.util.List<RunAnythingItem> model, java.lang.String pattern, int itemsToInsert)
dataContext - needed to fetch project/modulemodel - needed to avoid adding duplicates into the listpattern - input search stringitemsToInsert - number of items to insertpublic void resetMoreIndex()
myMoreIndex index.public static java.lang.String getTitle(java.util.Collection<? extends RunAnythingGroup> groups, int titleIndex)
titleIndex.titleIndex is equals to group myTitleIndex and null if nothing foundpublic static RunAnythingGroup findGroup(java.util.Collection<? extends RunAnythingGroup> groups, int titleIndex)
titleIndex.titleIndex is equals to group myTitleIndex and null if nothing foundpublic static RunAnythingGroup findItemGroup(java.util.List<? extends RunAnythingGroup> groups, int itemIndex)
itemIndex belongs to.public static void clearMoreIndex(java.util.Collection<? extends RunAnythingGroup> groups)
myMoreIndex of all groups.public static int[] getAllIndexes(java.util.Collection<? extends RunAnythingGroup> groups)
myTitleIndex and myMoreIndex of all groups; using for navigating by 'TAB' between groups.public static RunAnythingGroup findGroupByMoreIndex(java.util.Collection<? extends RunAnythingGroup> groups, int moreIndex)
myMoreIndex group.public static RunAnythingGroup findGroupByTitleIndex(java.util.Collection<? extends RunAnythingGroup> groups, int titleIndex)
myTitleIndex.public static boolean isMoreIndex(java.util.Collection<? extends RunAnythingGroup> groups, int index)
public static void shiftIndexes(java.util.Collection<? extends RunAnythingGroup> groups, int baseIndex, int shift)
public static void clearIndexes(java.util.Collection<? extends RunAnythingGroup> groups)
myMoreIndex and myTitleIndex of all groups.public final void collectItems(DataContext dataContext, java.util.List<RunAnythingItem> model, java.lang.String pattern)
dataContext - needed to fetch project/modulemodel - needed to avoid adding duplicates into the listpattern - input search string