summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibing Wang <libingw@ca.ibm.com>2016-05-17 14:58:33 -0400
committerLibing Wang <libingw@ca.ibm.com>2016-05-17 14:58:33 -0400
commitb0bcedf82d18e8216260408875e58528ee6b8b83 (patch)
treeee972d4d537524ffdd06afd4dd37f8249c656dec
parent1fae355dabaac95ddfe14ad9bf4caa76f5e8764c (diff)
downloadorg.eclipse.orion.client-origin/stable_20160517.zip
org.eclipse.orion.client-origin/stable_20160517.tar.gz
org.eclipse.orion.client-origin/stable_20160517.tar.bz2
Bug 493461 - codeEdit: Need to hook up project metadata to the in memory file system. -- rename the project URL.origin/stable_20160517
-rw-r--r--bundles/org.eclipse.orion.client.ui/web/embeddedEditor/helper/embeddedFileImpl.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/bundles/org.eclipse.orion.client.ui/web/embeddedEditor/helper/embeddedFileImpl.js b/bundles/org.eclipse.orion.client.ui/web/embeddedEditor/helper/embeddedFileImpl.js
index 22c50c8..aaa3641 100644
--- a/bundles/org.eclipse.orion.client.ui/web/embeddedEditor/helper/embeddedFileImpl.js
+++ b/bundles/org.eclipse.orion.client.ui/web/embeddedEditor/helper/embeddedFileImpl.js
@@ -12,11 +12,11 @@
/*eslint-env browser, amd*/
/*global URL*/
define(["orion/Deferred", "orion/encoding-shim", "orion/URL-shim"], function(Deferred) {
-
+ var PROJECT_LOC = "project/";
function EmbeddedFileImpl(fileBase) {
this.fileBase = fileBase;
this.fileRoot = {};
- this.projectMetaLocation = this.fileBase + "project_root_location/";
+ this.projectMetaLocation = this.fileBase + PROJECT_LOC;
this.fileRoot[this.projectMetaLocation] = {Location: this.projectMetaLocation, Directory: true};
}
@@ -84,6 +84,7 @@ define(["orion/Deferred", "orion/encoding-shim", "orion/URL-shim"], function(Def
var file = this._getFile(fLocation);
if (file === undefined) return new Deferred().reject();
if(isMetadata){
+ var parents = fLocation === this.projectMetaLocation ? [] : [this.fileRoot[this.projectMetaLocation]];
var meta = {
Length: file.length,
Directory: !!file.Directory,
@@ -91,7 +92,7 @@ define(["orion/Deferred", "orion/encoding-shim", "orion/URL-shim"], function(Def
ETag: file.ETag,
Location: file.Location,
Name: file.Name,
- Parents: [this.fileRoot[this.projectMetaLocation]]
+ Parents: parents
};
return new Deferred().resolve(meta);
}