コード例 #1
0
ファイル: CommitDialog.java プロジェクト: blizzy78/egit
 private static int getProblemSeverity(Repository repository, String path) {
   IFile file = ResourceUtil.getFileForLocation(repository, path);
   if (file != null) {
     try {
       int severity = file.findMaxProblemSeverity(IMarker.PROBLEM, true, IResource.DEPTH_ONE);
       return severity;
     } catch (CoreException e) {
       // Fall back to below
     }
   }
   return IProblemDecoratable.SEVERITY_NONE;
 }
コード例 #2
0
 /**
  * @param p
  * @return {@link GitProjectData} for the specified project, or null if the Git provider is not
  *     associated with the project or an exception occurred
  */
 @Nullable
 public static synchronized GitProjectData get(final @NonNull IProject p) {
   try {
     GitProjectData d = lookup(p);
     if (d == null && ResourceUtil.isSharedWithGit(p)) {
       d = new GitProjectData(p).load();
       cache(p, d);
     }
     return d;
   } catch (IOException err) {
     Activator.logError(CoreText.GitProjectData_missing, err);
     return null;
   }
 }
コード例 #3
0
ファイル: CommitDialog.java プロジェクト: blizzy78/egit
 private IFile findFile(String path) {
   return ResourceUtil.getFileForLocation(repository, path);
 }