当前位置: 首页>>代码示例>>Java>>正文


Java ArrayUtil.EMPTY_STRING_ARRAY属性代码示例

本文整理汇总了Java中com.intellij.util.ArrayUtil.EMPTY_STRING_ARRAY属性的典型用法代码示例。如果您正苦于以下问题:Java ArrayUtil.EMPTY_STRING_ARRAY属性的具体用法?Java ArrayUtil.EMPTY_STRING_ARRAY怎么用?Java ArrayUtil.EMPTY_STRING_ARRAY使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.intellij.util.ArrayUtil的用法示例。


在下文中一共展示了ArrayUtil.EMPTY_STRING_ARRAY属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: fetchNatively

@NotNull
private static GitFetchResult fetchNatively(@NotNull GitRepository repository, @NotNull GitRemote remote, @Nullable String branch) {
  Git git = ServiceManager.getService(Git.class);
  String[] additionalParams = branch != null ?
                              new String[]{ getFetchSpecForBranch(branch, remote.getName()) } :
                              ArrayUtil.EMPTY_STRING_ARRAY;

  GitFetchPruneDetector pruneDetector = new GitFetchPruneDetector();
  GitCommandResult result = git.fetch(repository, remote,
                                      Collections.<GitLineHandlerListener>singletonList(pruneDetector), additionalParams);

  GitFetchResult fetchResult;
  if (result.success()) {
    fetchResult = GitFetchResult.success();
  }
  else if (result.cancelled()) {
    fetchResult = GitFetchResult.cancel();
  }
  else {
    fetchResult = GitFetchResult.error(result.getErrorOutputAsJoinedString());
  }
  fetchResult.addPruneInfo(pruneDetector.getPrunedRefs());
  return fetchResult;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:GitFetcher.java

示例2: parseAndCheckProguardCfgPaths

@NotNull
private static String[] parseAndCheckProguardCfgPaths(@NotNull String pathsStr) {
  if (pathsStr.length() == 0) {
    return ArrayUtil.EMPTY_STRING_ARRAY;
  }
  final String[] paths = pathsStr.split(File.pathSeparator);

  if (paths.length == 0) {
    return ArrayUtil.EMPTY_STRING_ARRAY;
  }
  for (String path : paths) {
    if (LocalFileSystem.getInstance().refreshAndFindFileByPath(path) == null) {
      return ArrayUtil.EMPTY_STRING_ARRAY;
    }
  }
  return paths;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:ApkStep.java

示例3: getActionIds

@Override
public String[] getActionIds(final Shortcut shortcut) {
  if (shortcut instanceof KeyboardShortcut) {
    final KeyboardShortcut kb = (KeyboardShortcut)shortcut;
    final KeyStroke first = kb.getFirstKeyStroke();
    final KeyStroke second = kb.getSecondKeyStroke();
    return second != null ? getActionIds(first, second) : getActionIds(first);
  }
  else if (shortcut instanceof MouseShortcut) {
    return getActionIds((MouseShortcut)shortcut);
  }
  else if (shortcut instanceof KeyboardModifierGestureShortcut) {
    return getActionIds((KeyboardModifierGestureShortcut)shortcut);
  }
  else {
    return ArrayUtil.EMPTY_STRING_ARRAY;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:KeymapImpl.java

示例4: createModuleItems

@NotNull
private static Collection<? extends PackagingSourceItem> createModuleItems(@NotNull ArtifactEditorContext editorContext, @NotNull String[] groupPath) {
  final Module[] modules = editorContext.getModulesProvider().getModules();
  final List<PackagingSourceItem> items = new ArrayList<PackagingSourceItem>();
  Set<String> groups = new HashSet<String>();
  for (Module module : modules) {
    String[] path = ModuleManager.getInstance(editorContext.getProject()).getModuleGroupPath(module);
    if (path == null) {
      path = ArrayUtil.EMPTY_STRING_ARRAY;
    }

    if (Comparing.equal(path, groupPath)) {
      items.add(new ModuleSourceItemGroup(module));
    }
    else if (ArrayUtil.startsWith(path, groupPath)) {
      groups.add(path[groupPath.length]);
    }
  }
  for (String group : groups) {
    items.add(0, new ModuleGroupItem(ArrayUtil.append(groupPath, group)));
  }
  return items;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:ModulesAndLibrariesSourceItemsProvider.java

示例5: getCompilationClasses

private static String[] getCompilationClasses(final Module module,
                                              final GenerationOptionsImpl options,
                                              final boolean forRuntime,
                                              final boolean forTest,
                                              final boolean firstLevel) {
  final CompilerModuleExtension extension = CompilerModuleExtension.getInstance(module);
  if (extension == null) return ArrayUtil.EMPTY_STRING_ARRAY;

  if (!forRuntime) {
    if (forTest) {
      return extension.getOutputRootUrls(!firstLevel);
    }
    else {
      return firstLevel ? ArrayUtil.EMPTY_STRING_ARRAY : extension.getOutputRootUrls(false);
    }
  }
  final Set<String> jdkUrls = options.getAllJdkUrls();

  final OrderedSet<String> urls = new OrderedSet<String>();
  ContainerUtil.addAll(urls, extension.getOutputRootUrls(forTest));
  urls.removeAll(jdkUrls);
  return ArrayUtil.toStringArray(urls);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:ModuleChunkClasspath.java

示例6: getFilteredClassNames

@NotNull
public String[] getFilteredClassNames() {
  if (myFilters == null) return ArrayUtil.EMPTY_STRING_ARRAY;
  List<String> result = new ArrayList<String>();
  for (String filter : myFilters) {
    if (!filter.equals("*") && !filter.endsWith(".*")) result.add(filter);
  }
  return ArrayUtil.toStringArray(result);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:JavaCoverageSuite.java

示例7: readStringArray

public String[] readStringArray() {
  final int count = readInt();
  if (count == 0) return ArrayUtil.EMPTY_STRING_ARRAY;
  final ArrayList<String> strings = new ArrayList<String>(count);
  for (int i = 0; i < count; i++) {
    strings.add(readLimitedString());
  }
  return strings.toArray(new String[count]);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:SegmentReader.java

示例8: doFilter

private synchronized void doFilter() {
  if (myDisposed) {
    return;
  }
  final ConsoleView console = getConsoleNotNull();
  console.clear();
  myModel.processingStarted();

  final String[] lines = myOriginalDocument != null ? myOriginalDocument.toString().split("\n") : ArrayUtil.EMPTY_STRING_ARRAY;;
  int offset = 0;
  boolean caretPositioned = false;

  for (String line : lines) {
    final int printed = printMessageToConsole(line);
    if (printed > 0) {
      if (!caretPositioned) {
        if (Comparing.strEqual(myLineUnderSelection, line)) {
          caretPositioned = true;
          offset += myLineOffset != -1 ? myLineOffset : 0;
        }
        else {
          offset += printed;
        }
      }
    }
  }

  // we need this, because, document can change before actual scrolling, so offset may be already not at the end
  if (caretPositioned) {
    console.scrollTo(offset);
  }
  else {
    ((ConsoleViewImpl)console).requestScrollingToEnd();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:35,代码来源:LogConsoleBase.java

示例9: getAllClassNames

@NotNull
@Override
public String[] getAllClassNames() {
  if (!myComponent.hasAnyDataBindingEnabledFacet()) {
    return ArrayUtil.EMPTY_STRING_ARRAY;
  }
  return BR_CLASS_NAME_LIST;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:BrShortNamesCache.java

示例10: list

@NotNull
@Override
public String[] list(@NotNull final VirtualFile file) {
  return ArrayUtil.EMPTY_STRING_ARRAY;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:MockLocalFileSystem.java

示例11: getJavadocUrls

@NotNull
@Override
public String[] getJavadocUrls() {
  final VirtualFilePointerContainer container = myOrderRootPointerContainers.get(JavadocOrderRootType.getInstance());
  return container != null ? container.getUrls() : ArrayUtil.EMPTY_STRING_ARRAY;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:JavaModuleExternalPathsImpl.java

示例12: getSeparators

@Override
@NotNull
public String[] getSeparators() {
  return ArrayUtil.EMPTY_STRING_ARRAY;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:GotoActionModel.java

示例13: getErrors

@NotNull
public static synchronized String[] getErrors() {
  return ourAdbErrorList != null ? ArrayUtil.toStringArray(ourAdbErrorList) : ArrayUtil.EMPTY_STRING_ARRAY;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:AdbErrors.java

示例14: notNull

@NotNull
private static String[] notNull(@Nullable String[] s) {
  return s == null ? ArrayUtil.EMPTY_STRING_ARRAY : s;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:GitConfig.java

示例15: getAbbreviations

@Override
public String[] getAbbreviations() {
  return ArrayUtil.EMPTY_STRING_ARRAY;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:KeymapImpl.java


注:本文中的com.intellij.util.ArrayUtil.EMPTY_STRING_ARRAY属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。