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


Java Trinity.getThird方法代码示例

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


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

示例1: selectMethod

import com.intellij.openapi.util.Trinity; //导入方法依赖的package包/类
@Nullable
private static List<PsiMethod> selectMethod(final PsiMethod[] methods, final Trinity<PsiClass, PsiFile, String> previousLineResult) {
  if (previousLineResult == null || previousLineResult.getThird() == null) return null;

  final List<PsiMethod> result = new SmartList<PsiMethod>();
  for (final PsiMethod method : methods) {
    method.accept(new JavaRecursiveElementVisitor() {
      @Override
      public void visitCallExpression(PsiCallExpression callExpression) {
        final PsiMethod resolved = callExpression.resolveMethod();
        if (resolved != null) {
          if (resolved.getName().equals(previousLineResult.getThird())) {
            result.add(method);
          }
        }
      }
    });
  }

  return result;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:VcsContentAnnotationExceptionFilter.java

示例2: packageFile

import com.intellij.openapi.util.Trinity; //导入方法依赖的package包/类
public static void packageFile(@NotNull VirtualFile file, @NotNull Project project, final Artifact[] artifacts,
                               final boolean packIntoArchives) throws IOException {
  LOG.debug("Start packaging file: " + file.getPath());
  final Collection<Trinity<Artifact, PackagingElementPath, String>> items = ArtifactUtil.findContainingArtifactsWithOutputPaths(file, project, artifacts);
  File ioFile = VfsUtilCore.virtualToIoFile(file);
  for (Trinity<Artifact, PackagingElementPath, String> item : items) {
    final Artifact artifact = item.getFirst();
    final String outputPath = artifact.getOutputPath();
    if (!StringUtil.isEmpty(outputPath)) {
      PackageFileWorker worker = new PackageFileWorker(ioFile, item.getThird(), packIntoArchives);
      LOG.debug(" package to " + outputPath);
      worker.packageFile(outputPath, item.getSecond().getParents());
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:PackageFileWorker.java

示例3: buildModel

import com.intellij.openapi.util.Trinity; //导入方法依赖的package包/类
public DefaultTreeModel buildModel(final List<? extends ChangeList> changeLists,
                                   final Trinity<List<VirtualFile>, Integer, Integer> unversionedFiles,
                                   final List<LocallyDeletedChange> locallyDeletedFiles,
                                   final List<VirtualFile> modifiedWithoutEditing,
                                   final MultiMap<String, VirtualFile> switchedFiles,
                                   @Nullable Map<VirtualFile, String> switchedRoots,
                                   @Nullable final List<VirtualFile> ignoredFiles,
                                   @Nullable final List<VirtualFile> lockedFolders,
                                   @Nullable final Map<VirtualFile, LogicalLock> logicallyLockedFiles) {
  resetGrouping();
  buildModel(changeLists);

  if (!modifiedWithoutEditing.isEmpty()) {
    resetGrouping();
    buildVirtualFiles(modifiedWithoutEditing, ChangesBrowserNode.MODIFIED_WITHOUT_EDITING_TAG);
  }
  final boolean manyUnversioned = unversionedFiles.getSecond() > unversionedFiles.getFirst().size();
  if (manyUnversioned || ! unversionedFiles.getFirst().isEmpty()) {
    resetGrouping();

    if (manyUnversioned) {
      final ChangesBrowserNode baseNode = new ChangesBrowserManyUnversionedFilesNode(myProject, unversionedFiles.getSecond(), unversionedFiles.getThird());
      model.insertNodeInto(baseNode, root, root.getChildCount());
    } else {
      buildVirtualFiles(unversionedFiles.getFirst(), ChangesBrowserNode.UNVERSIONED_FILES_TAG);
    }
  }
  if (switchedRoots != null && ! switchedRoots.isEmpty()) {
    resetGrouping();
    buildSwitchedRoots(switchedRoots);
  }
  if (!switchedFiles.isEmpty()) {
    resetGrouping();
    buildSwitchedFiles(switchedFiles);
  }
  if (ignoredFiles != null && !ignoredFiles.isEmpty()) {
    resetGrouping();
    buildVirtualFiles(ignoredFiles, ChangesBrowserNode.IGNORED_FILES_TAG);
  }
  if (lockedFolders != null && !lockedFolders.isEmpty()) {
    resetGrouping();
    buildVirtualFiles(lockedFolders, ChangesBrowserNode.LOCKED_FOLDERS_TAG);
  }
  if (logicallyLockedFiles != null && ! logicallyLockedFiles.isEmpty()) {
    resetGrouping();
    buildLogicallyLockedFiles(logicallyLockedFiles);
  }

  if (!locallyDeletedFiles.isEmpty()) {
    resetGrouping();
    ChangesBrowserNode locallyDeletedNode = ChangesBrowserNode.create(myProject, LOCALLY_DELETED_NODE);
    model.insertNodeInto(locallyDeletedNode, root, root.getChildCount());
    buildLocallyDeletedPaths(locallyDeletedFiles, locallyDeletedNode);
  }

  collapseDirectories(model, root);
  sortNodes();

  return model;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:61,代码来源:TreeModelBuilder.java


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