Exemple #1
0
 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;
 }
 /**
  * @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;
   }
 }
Exemple #3
0
 private IFile findFile(String path) {
   return ResourceUtil.getFileForLocation(repository, path);
 }