diff options
author | Olivier Thomann <Olivier_Thomann@ca.ibm.com> | 2016-11-28 11:12:30 -0500 |
---|---|---|
committer | Olivier Thomann <Olivier_Thomann@ca.ibm.com> | 2016-11-28 11:12:30 -0500 |
commit | 98d184ba22e4a00edd3cba8fee5939d4cc796dee (patch) | |
tree | c5370ad35dc66cb1d140857f8d52623f101d49b3 | |
parent | f5742f269791f678a36e85779f415145a4015c2a (diff) | |
parent | 98c58bf26653e9c1a9d25b6b260a9cb039c928b3 (diff) | |
download | org.eclipse.orion.client-origin/mrennie/languageServer.zip org.eclipse.orion.client-origin/mrennie/languageServer.tar.gz org.eclipse.orion.client-origin/mrennie/languageServer.tar.bz2 |
Merge remote-tracking branch 'origin/master' into mrennie/languageServerorigin/mrennie/languageServer
4 files changed, 9 insertions, 27 deletions
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer-table.js b/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer-table.js index e2a5c68..5e79a15 100644 --- a/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer-table.js +++ b/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer-table.js @@ -21,9 +21,7 @@ define([ 'orion/objects', 'orion/util' ], function(messages, Deferred, lib, i18nUtil, mFileUtils, mExplorer, EventTarget, objects, util){ -/* - * - */ + /** * Tree model used by the FileExplorer */ @@ -251,7 +249,7 @@ define([ return null; } var elementNode; - if(loc === "/file" && (util.isElectron || localStorage.getItem("darklaunch.createAtRoot"))){ + if(loc === "/file" && util.isElectron){ // Special case in electron, need to find the workspace element to create file at workspace level. elementNode = this.model.root; }else{ diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/fileCommands.js b/bundles/org.eclipse.orion.client.ui/web/orion/fileCommands.js index 04f0875..2b79972 100644 --- a/bundles/org.eclipse.orion.client.ui/web/orion/fileCommands.js +++ b/bundles/org.eclipse.orion.client.ui/web/orion/fileCommands.js @@ -18,13 +18,6 @@ define(['i18n!orion/navigate/nls/messages', 'orion/webui/littlelib', 'orion/i18n 'orion/EventTarget', 'orion/form', 'orion/xsrfUtils', 'orion/bidiUtils', 'orion/util'], function(messages, lib, i18nUtil, mUIUtils, mFileUtils, mCommands, mFileDownloader, mCommandRegistry, mContentTypes, mCompareUtils, Deferred, DirPrompter, SFTPDialog, EventTarget, form, xsrfUtils, bidiUtils, util){ - function initialize_darklaunch() { - localStorage.setItem("darklaunch.createFileAtRoot", "true"); - localStorage.setItem("darklaunch.createFolderAtRoot", "true"); - localStorage.setItem("darklaunch.enableNewProject", "false"); - localStorage.setItem("darklaunch.enableLinkProject", "false"); - } - /** * Utility methods * @class This class contains static utility methods for creating and managing commands @@ -384,9 +377,6 @@ define(['i18n!orion/navigate/nls/messages', 'orion/webui/littlelib', 'orion/i18n progressService = serviceRegistry.getService("orion.page.progress"); //$NON-NLS-0$ var dispatchModelEvent = dispatchModelEventOn.bind(null); - //Enable experimental features. - initialize_darklaunch(); - function contains(arr, item) { return arr.indexOf(item) !== -1; } @@ -926,8 +916,7 @@ define(['i18n!orion/navigate/nls/messages', 'orion/webui/littlelib', 'orion/i18n var createFunction = function(name) { if (name) { var location = parentItem.Location; - if(location === "/workspace/orionode" && (util.isElectron && !isDirectory) || - localStorage.getItem("darklaunch.createFileAtRoot") || localStorage.getItem("darklaunch.createFolderAtRoot")){ + if(location === "/workspace/orionode" && util.isElectron && !isDirectory ){ // Special case for electron only to create files at workspace level. location = "/file"; } @@ -981,7 +970,7 @@ define(['i18n!orion/navigate/nls/messages', 'orion/webui/littlelib', 'orion/i18n createNewArtifact(messages["New File"], item, false); }, visibleWhen: function(item) { - return checkFolderSelection(item) || util.isElectron || localStorage.getItem("darklaunch.createFileAtRoot") === 'true'; + return checkFolderSelection(item) || util.isElectron; } }); commandService.addCommand(newFileCommand); @@ -996,7 +985,7 @@ define(['i18n!orion/navigate/nls/messages', 'orion/webui/littlelib', 'orion/i18n createNewArtifact(messages["New Folder"], item, true); }, visibleWhen: function(item) { - return localStorage.getItem("darklaunch.createFolderAtRoot") === 'true' || checkFolderSelection(item) && !mFileUtils.isAtRoot(item.Location); + return checkFolderSelection(item) && !mFileUtils.isAtRoot(item.Location); } }); commandService.addCommand(newFolderCommand); @@ -1046,9 +1035,7 @@ define(['i18n!orion/navigate/nls/messages', 'orion/webui/littlelib', 'orion/i18n }); } }, - visibleWhen: function(item) { - return canCreateProject && localStorage.getItem("darklaunch.enableNewProject") !== "false"; - } + visibleWhen: canCreateProject }); commandService.addCommand(newProjectCommand); @@ -1073,10 +1060,7 @@ define(['i18n!orion/navigate/nls/messages', 'orion/webui/littlelib', 'orion/i18n errorHandler(messages["NameLocationNotClear"]); } }, - visibleWhen: function (item) { - canCreateProject && localStorage.getItem("darklaunch.enableLinkProject") !== 'false'; - } - + visibleWhen: canCreateProject }); commandService.addCommand(linkProjectCommand); diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/projectCommands.js b/bundles/org.eclipse.orion.client.ui/web/orion/projectCommands.js index 48f4585..a25f647 100644 --- a/bundles/org.eclipse.orion.client.ui/web/orion/projectCommands.js +++ b/bundles/org.eclipse.orion.client.ui/web/orion/projectCommands.js @@ -512,7 +512,7 @@ define(['require', 'i18n!orion/navigate/nls/messages', 'orion/webui/littlelib', if(!data.parameters){ messageService.setProgressResult({ Message: errorMessage, - Severity: "Info" //$NON-NLS-0$ + Severity: "Warning" //$NON-NLS-0$ }); var options = objects.mixin({}, commonRetryOptions, { diff --git a/modules/orionode/lib/git/clone.js b/modules/orionode/lib/git/clone.js index 2c08b91..82634b8 100755 --- a/modules/orionode/lib/git/clone.js +++ b/modules/orionode/lib/git/clone.js @@ -88,7 +88,7 @@ function getRepoByPath(filePath,workspaceDir) { filePath = path.dirname(filePath); if (filePath.length <= workspaceDir) return Promise.reject(new Error("Forbidden")); } - var ceiling = options.options.configParams.isElectron ? "" : workspaceDir ; + var ceiling = path.dirname(workspaceDir); return git.Repository.discover(filePath, 0, ceiling).then(function(buf) { return git.Repository.open(buf.toString()); }); |