blob: 0b3dbcf4c1f5951e8c64fab919787ecadb4689a5 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2011." >
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="/orion/plugin.js"></script>
<script type="text/javascript" src="/org.dojotoolkit/dojo/dojo.js.uncompressed.js"></script>
<script>
window.onload = function() {
var temp = document.createElement('a');
var provider = new eclipse.PluginProvider();
temp.href = "../git-status.html";
var gitStatusURL = temp.href;
provider.registerServiceProvider("orion.navigate.command", {
run: function(item) {
return gitStatusURL + "#" + item.Git.StatusLocation;
}
}, {
name: "Git Status",
id: "eclipse.git.status",
tooltip: "Go to Git Status",
validationProperties: {"Git":"*", "Directory":"true"},
href: true,
forceSingleItem: true
});
temp.href = "../git-log.html";
var gitLogURL = temp.href;
provider.registerServiceProvider("orion.navigate.command", {
run: function(item) {
return gitLogURL + "#" + item.Git.CommitLocation + "?page=1";
}
}, {
name: "Git Log",
id: "eclipse.git.log",
tooltip: "Go to Git Log",
validationProperties: {"Git":"*"},
href: true,
forceSingleItem: true
});
provider.registerServiceProvider("orion.navigate.command", {
run : function(item) {
return gitLogURL + "#" + item.Git.DefaultRemoteBranchLocation + "?page=1";
}
}, {
name: "Git Remote",
id: "eclipse.git.remote",
validationProperties: {"Git:DefaultRemoteBranchLocation":"*"},
forceSingleItem: true,
href: true,
tooltip: "Go to Git Remote"
});
temp.href = "../../gitapi/diff/";
var base = temp.href;
provider.registerServiceProvider("orion.core.diff", {
getDiffContent: function(diffURI){
return dojo.xhrGet({
url: diffURI ,
headers: {
"Orion-Version": "1"
},
content: { "parts": "diff" },
handleAs: "text",
timeout: 15000
});
},
getDiffFileURI: function(diffURI){
return dojo.xhrGet({
url: diffURI ,
headers: {
"Orion-Version": "1"
},
content: { "parts": "uris" },
handleAs: "json",
timeout: 15000
});
}
}, {
pattern: base
});
provider.connect();
};
</script>
</head>
<body>
</body>
</html>