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


Java ProjectUtilCore类代码示例

本文整理汇总了Java中com.intellij.openapi.project.ProjectUtilCore的典型用法代码示例。如果您正苦于以下问题:Java ProjectUtilCore类的具体用法?Java ProjectUtilCore怎么用?Java ProjectUtilCore使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: getFileTitle

import com.intellij.openapi.project.ProjectUtilCore; //导入依赖的package包/类
@Override
public String getFileTitle(@NotNull final Project project, @NotNull final VirtualFile file) {
  String fileTitle = EditorTabbedContainer.calcTabTitle(project, file);
  if (SystemInfo.isMac) return fileTitle;

  VirtualFile parent = file.getParent();
  if (parent == null || !fileTitle.endsWith(file.getPresentableName())) return fileTitle;

  String url = FileUtil.getLocationRelativeToUserHome(parent.getPresentableUrl() + File.separator + file.getName());
  return ProjectUtilCore.displayUrlRelativeToProject(file, url, project, !SystemInfo.isMac, false);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:IdeaFrameTitleBuilder.java

示例2: appendElementReference

import com.intellij.openapi.project.ProjectUtilCore; //导入依赖的package包/类
@Override
public void appendElementReference(final StringBuffer buf, RefElement refElement, boolean isPackageIncluded) {
  final HTMLComposerExtension extension = getLanguageExtension(refElement);

  if (extension != null) {
    extension.appendReferencePresentation(refElement, buf, isPackageIncluded);
  } else if (refElement instanceof RefFile) {
    buf.append(A_HREF_OPENING);

    if (myExporter == null) {
      buf.append(((RefElementImpl)refElement).getURL());
    }
    else {
      buf.append(myExporter.getURL(refElement));
    }

    buf.append("\">");
    String refElementName = refElement.getName();
    final PsiElement element = refElement.getElement();
    if (element != null) {
      final VirtualFile virtualFile = PsiUtilCore.getVirtualFile(element);
      if (virtualFile != null) {
        refElementName = ProjectUtilCore.displayUrlRelativeToProject(virtualFile, virtualFile.getPresentableUrl(), element.getProject(),
                                                                     true, false);
      }
    }
    buf.append(refElementName);
    buf.append(A_CLOSING);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:31,代码来源:HTMLComposerImpl.java

示例3: visitFile

import com.intellij.openapi.project.ProjectUtilCore; //导入依赖的package包/类
@Override
public void visitFile(PsiFile file) {
  final VirtualFile virtualFile = file.getVirtualFile();
  if (virtualFile != null) {
    String relative = ProjectUtilCore.displayUrlRelativeToProject(virtualFile, virtualFile.getPresentableUrl(), myProject, true, false);
    myContext.incrementJobDoneAmount(myContext.getStdJobDescriptors().BUILD_GRAPH, relative);
  }
  final FileViewProvider viewProvider = file.getViewProvider();
  final Set<Language> relevantLanguages = viewProvider.getLanguages();
  for (Language language : relevantLanguages) {
    visitElement(viewProvider.getPsi(language));
  }
  myPsiManager.dropResolveCaches();
  InjectedLanguageManager.getInstance(myProject).dropFileCaches(file);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:RefManagerImpl.java

示例4: getCompilerSystemDirectoryName

import com.intellij.openapi.project.ProjectUtilCore; //导入依赖的package包/类
public static String getCompilerSystemDirectoryName(Project project) {
  return ProjectUtilCore.getPresentableName(project) + "." + project.getLocationHash();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:CompilerPaths.java

示例5: displayProjectRelativePath

import com.intellij.openapi.project.ProjectUtilCore; //导入依赖的package包/类
private static String displayProjectRelativePath(@NotNull VirtualFile virtualFile, @NotNull Project project) {
  return ProjectUtilCore.displayUrlRelativeToProject(virtualFile, virtualFile.getPresentableUrl(), project, false, false);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:AnalysisScope.java

示例6: getRelativeToProjectPath

import com.intellij.openapi.project.ProjectUtilCore; //导入依赖的package包/类
public String getRelativeToProjectPath(@NotNull VirtualFile virtualFile) {
  return ProjectUtilCore.displayUrlRelativeToProject(virtualFile, virtualFile.getPresentableUrl(), getProject(), true, false);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:DependenciesBuilder.java

示例7: displayProjectRelativePath

import com.intellij.openapi.project.ProjectUtilCore; //导入依赖的package包/类
private static String displayProjectRelativePath(@Nonnull VirtualFile virtualFile, @Nonnull Project project) {
  return ProjectUtilCore.displayUrlRelativeToProject(virtualFile, virtualFile.getPresentableUrl(), project, false, false);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:4,代码来源:AnalysisScope.java


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