本文整理汇总了Java中com.intellij.util.containers.ContainerUtil.append方法的典型用法代码示例。如果您正苦于以下问题:Java ContainerUtil.append方法的具体用法?Java ContainerUtil.append怎么用?Java ContainerUtil.append使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.util.containers.ContainerUtil
的用法示例。
在下文中一共展示了ContainerUtil.append方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getIssues
import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
public Task[] getIssues(@Nullable String query, int max, long since) throws Exception {
ensureApiVersionDiscovered();
String resultQuery = StringUtil.notNullize(query);
if (isJqlSupported()) {
if (StringUtil.isNotEmpty(mySearchQuery) && StringUtil.isNotEmpty(query)) {
resultQuery = String.format("summary ~ '%s' and ", query) + mySearchQuery;
}
else if (StringUtil.isNotEmpty(query)) {
resultQuery = String.format("summary ~ '%s'", query);
}
else {
resultQuery = mySearchQuery;
}
}
List<Task> tasksFound = myApiVersion.findTasks(resultQuery, max);
// JQL matching doesn't allow to do something like "summary ~ query or key = query"
// and it will return error immediately. So we have to search in two steps to provide
// behavior consistent with e.g. YouTrack.
// looks like issue ID
if (query != null && JIRA_ID_PATTERN.matcher(query.trim()).matches()) {
Task task = findTask(query);
if (task != null) {
tasksFound = ContainerUtil.append(tasksFound, task);
}
}
return ArrayUtil.toObjectArray(tasksFound, Task.class);
}
示例2: getAvailableForks
import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
@Nullable
private List<GithubFullPath> getAvailableForks(@NotNull ProgressIndicator indicator) {
try {
List<GithubFullPath> forks = ContainerUtil.map(
GithubUtil.runTask(myProject, myAuthHolder, indicator,
new ThrowableConvertor<GithubConnection, List<GithubRepo>, IOException>() {
@NotNull
@Override
public List<GithubRepo> convert(@NotNull GithubConnection connection)
throws IOException {
return GithubApiUtil.getForks(connection, mySource.getUser(), mySource.getRepository());
}
}
),
new Function<GithubRepo, GithubFullPath>() {
@Override
public GithubFullPath fun(GithubRepo repo) {
return repo.getFullPath();
}
}
);
if (!forks.contains(mySource)) return ContainerUtil.append(forks, mySource);
return forks;
}
catch (IOException e) {
GithubNotifications.showWarning(myProject, "Can't load available forks", e);
return null;
}
}
示例3: getSingleLineShortcuts
import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
@NotNull
@Override
protected List<Shortcut> getSingleLineShortcuts() {
return ContainerUtil.append(Utils.shortcutsOf(IdeActions.ACTION_EDITOR_MOVE_CARET_UP),
new KeyboardShortcut(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, InputEvent.SHIFT_DOWN_MASK), null));
}
示例4: getSingleLineShortcuts
import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
@NotNull
@Override
protected List<Shortcut> getSingleLineShortcuts() {
return ContainerUtil.append(Utils.shortcutsOf(IdeActions.ACTION_EDITOR_MOVE_CARET_DOWN), CommonShortcuts.ENTER.getShortcuts());
}
示例5: concat
import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
public static <T> List<T> concat(List<? extends T> list, T... values) {
return ContainerUtil.append(list, values);
}