git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[EGIT PATCH 4/5] Update Quickdiff tracing statements

From
Robin Rosenberg <robin.rosenberg@dewire.com>
Date
Apr 2, 2009, 18:46 UTC
Message-ID
<1238697991-12990-5-git-send-email-robin.rosenberg@dewire.com>
In-Reply-To
<1238697991-12990-4-git-send-email-robin.rosenberg@dewire.com>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
---
 .../egit/ui/internal/decorators/GitDocument.java   |    9 ++++++---
 .../internal/decorators/GitQuickDiffProvider.java  |    2 ++
 2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/decorators/GitDocument.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/decorators/GitDocument.java
index 8c82a55..347e6fc 100644
--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/decorators/GitDocument.java
+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/decorators/GitDocument.java
@@ -34,6 +34,7 @@
 	static Map<GitDocument,Repository> doc2repo = new WeakHashMap<GitDocument, Repository>();
 
 	static GitDocument create(final IResource resource) throws IOException {
+		Activator.trace("(GitDocument) create: " + resource);
 		GitDocument ret = null;
 		if (RepositoryProvider.getProvider(resource.getProject()) instanceof GitProvider) {
 			ret = new GitDocument(resource);
@@ -51,6 +52,7 @@ private GitDocument(IResource resource) {
 	}
 
 	void populate() throws IOException {
+		Activator.trace("(GitDocument) populate: " + resource);
 		set("");
 		final IProject project = resource.getProject();
 		RepositoryMapping mapping = RepositoryMapping.getMapping(project);
@@ -70,7 +72,7 @@ void populate() throws IOException {
 		}
 		TreeEntry blobEnry = baselineTree.findBlobMember(gitPath);
 		if (blobEnry != null) {
-			Activator.trace("(GitQuickDiffProvider) compareTo: " + baseline);
+			Activator.trace("(GitDocument) compareTo: " + baseline);
 			ObjectLoader loader = repository.openBlob(blobEnry.getId());
 			byte[] bytes = loader.getBytes();
 			String charset;
@@ -91,13 +93,14 @@ void populate() throws IOException {
 			// to the content. We don't do that here.
 			String s = new String(bytes, charset);
 			set(s);
-			Activator.trace("(GitQuickDiffProvider) has reference doc, size=" + s.length() + " bytes");
+			Activator.trace("(GitDocument) has reference doc, size=" + s.length() + " bytes");
 		} else {
-			Activator.trace("(GitQuickDiffProvider) no revision.");
+			Activator.trace("(GitDocument) no revision.");
 		}
 	}
 
 	void dispose() {
+		Activator.trace("(GitDocument) dispose: " + resource);
 		doc2repo.remove(this);
 		Repository repository = getRepository();
 		if (repository != null)
diff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/decorators/GitQuickDiffProvider.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/decorators/GitQuickDiffProvider.java
index 6c71f3c..91efb56 100644
--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/decorators/GitQuickDiffProvider.java
+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/decorators/GitQuickDiffProvider.java
@@ -42,6 +42,7 @@
 	 * Create the GitQuickDiffProvider instance
 	 */
 	public GitQuickDiffProvider() {
+		Activator.trace("(GitQuickDiffProvider) constructor");
 		// Empty
 	}
 
@@ -77,6 +78,7 @@ public boolean isEnabled() {
 	}
 
 	public void setActiveEditor(ITextEditor editor) {
+		Activator.trace("(GitQuickDiffProvider) setActiveEditor: " + editor.getTitle());
 		IEditorInput editorInput = editor.getEditorInput();
 		resource = ResourceUtil.getResource(editorInput);
 	}
-- 
1.6.2.1.345.g89fb
Previous: Robin RosenbergNext: Robin Rosenberg
Message 5 of 11 in “Quickdiff improvements”
  1. 0/5 Quickdiff improvementsRobin Rosenberg, Apr 2, 2009
  2. 1/5 Make the equals method work for AnyObjectId, not just ObjectIdRobin Rosenberg, Apr 2, 2009
  3. 2/5 quickdiff - Don't add GitDocument as repository listener more than onceRobin Rosenberg, Apr 2, 2009
  4. 3/5 Move dcocument to repository mapping to GitDocumentRobin Rosenberg, Apr 2, 2009
  5. 4/5 Update Quickdiff tracing statementsRobin Rosenberg, Apr 2, 2009
  6. 5/5 Cache resolved ids in quickdiff document for faster updateRobin Rosenberg, Apr 2, 2009
  7. Shawn O. PearceApr 5, 2009
  8. Robin RosenbergApr 5, 2009
  9. Shawn O. PearceApr 5, 2009
  10. Shawn O. PearceApr 5, 2009
  11. Robin RosenbergApr 5, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.