Exemplo n.º 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;
 }
Exemplo n.º 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;
   }
 }
Exemplo n.º 3
0
 private IFile findFile(String path) {
   return ResourceUtil.getFileForLocation(repository, path);
 }