added ASSIGN_BLAME to control whether blameInfo is retrieved (which is quite slow)
git-svn-id: svn://10.0.0.236/trunk@52906 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -39,6 +39,7 @@ import java.util.*;
|
||||
|
||||
public class FileLocator {
|
||||
static boolean USE_BLAME = false;
|
||||
static boolean ASSIGN_BLAME = false;
|
||||
|
||||
static final String MOZILLA_BASE = "mozilla/";
|
||||
static final String LXR_BASE = "http://lxr.mozilla.org/seamonkey/source/";
|
||||
@@ -80,14 +81,17 @@ public class FileLocator {
|
||||
if (mozillaIndex > -1) {
|
||||
// if using blame, hilite the line number of the call, and include the revision.
|
||||
String mozillaPath = fullPath.substring(mozillaIndex);
|
||||
String revision = revisionTable.getRevision(fullPath);
|
||||
String bonsaiPath = mozillaPath + "&rev=" + revision;
|
||||
if (USE_BLAME) {
|
||||
locationURL = BONSAI_BASE + mozillaPath + "&rev=" + revisionTable.getRevision(fullPath) + "&mark=" + lineNumber;
|
||||
locationURL = BONSAI_BASE + bonsaiPath + "&mark=" + lineNumber;
|
||||
if (lineAnchor > 10)
|
||||
lineAnchor -= 10;
|
||||
} else {
|
||||
locationURL = LXR_BASE + mozillaPath.substring(MOZILLA_BASE.length());
|
||||
}
|
||||
blameInfo = " (" + blameTable.getBlame(mozillaPath, lineNumber) + ")";
|
||||
if (ASSIGN_BLAME)
|
||||
blameInfo = " (" + blameTable.getBlame(bonsaiPath, lineNumber) + ")";
|
||||
} else {
|
||||
locationURL = "file://" + fullPath;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user