當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。