示例#1
0
 public void setActiveEditor(ITextEditor editor) {
   if (GitTraceLocation.QUICKDIFF.isActive())
     GitTraceLocation.getTrace()
         .traceEntry(GitTraceLocation.QUICKDIFF.getLocation(), editor.getTitle());
   IEditorInput editorInput = editor.getEditorInput();
   resource = ResourceUtil.getResource(editorInput);
 }
示例#2
0
  public IDocument getReference(IProgressMonitor monitor) throws CoreException {
    if (GitTraceLocation.QUICKDIFF.isActive())
      GitTraceLocation.getTrace()
          .trace(
              GitTraceLocation.QUICKDIFF.getLocation(),
              "(GitQuickDiffProvider) file: " + resource); // $NON-NLS-1$
    if (resource == null) return null;

    // Document must only be created once
    if (document == null) document = createDocument(resource);
    return document;
  }
示例#3
0
 public void dispose() {
   if (GitTraceLocation.QUICKDIFF.isActive())
     GitTraceLocation.getTrace().traceEntry(GitTraceLocation.QUICKDIFF.getLocation());
   if (document != null) document.dispose();
 }
示例#4
0
 /** Create the GitQuickDiffProvider instance */
 public GitQuickDiffProvider() {
   if (GitTraceLocation.QUICKDIFF.isActive())
     GitTraceLocation.getTrace().traceEntry(GitTraceLocation.QUICKDIFF.getLocation());
 }