Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 265956 Details for
Bug 509476
When the opened folder is the project in the Electron app, .tern-project problems cannot be fixed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Proposed fix
tern-project-at-root.patch (text/plain), 5.43 KB, created by
Michael Rennie
on 2016-12-19 14:59:52 EST
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Michael Rennie
Created:
2016-12-19 14:59:52 EST
Size:
5.43 KB
patch
obsolete
>diff --git a/bundles/org.eclipse.orion.client.javascript/web/javascript/javascriptProject.js b/bundles/org.eclipse.orion.client.javascript/web/javascript/javascriptProject.js >index c06da77..13c4000 100644 >--- a/bundles/org.eclipse.orion.client.javascript/web/javascript/javascriptProject.js >+++ b/bundles/org.eclipse.orion.client.javascript/web/javascript/javascriptProject.js >@@ -21,7 +21,7 @@ > || fileName === project.ESLINTRC_JS > || fileName === project.ESLINTRC_JSON > || fileName === project.PACKAGE_JSON >- || fileName === project.ESLINTRC_YAML >+ || fileName === project.ESLINTRC_YAML > || fileName === project.ESLINTRC_YML) { > delete project.map.eslint; > } >@@ -145,7 +145,7 @@ > */ > JavaScriptProject.prototype.getProjectPath = function getProjectPath() { > if(this.projectMeta) { >- return this.projectMeta.Location; >+ return this.projectMeta.Location || "/file/"; > } > return null; > }; >@@ -174,7 +174,7 @@ > return this.ecma; > }.bind(this)); > }; >- >+ > /** > * @description Fetch the named child of the current project context > * @function >@@ -185,12 +185,13 @@ > if(!this.projectMeta) { > return new Deferred().resolve(null); > } >- var filePath = this.projectMeta.Location+childName; >+ >+ var filePath = this.getProjectPath()+childName; > if(this.map[filePath]) { > return new Deferred().resolve(this.map[filePath]); > } > return this.getFileClient().read(filePath, false, false, {readIfExists: true}).then(function(child) { >- this.map[filePath] = {name: filePath, contents: child, project: this.projectMeta.Location}; >+ this.map[filePath] = {name: filePath, contents: child, project: this.getProjectPath()}; > return this.map[filePath]; > }.bind(this), > function() { >@@ -232,9 +233,9 @@ > } else { > json = values; > } >- return this.getFileClient().write(this.projectMeta.Location+childName, JSON.stringify(json, null, '\t')); >+ return this.getFileClient().write(this.getProjectPath()+childName, JSON.stringify(json, null, '\t')); > } else if(create) { >- return this.getFileClient().createFile(this.projectMeta.Location, childName).then(function(file) { >+ return this.getFileClient().createFile(this.getProjectPath(), childName).then(function(file) { > json = _defaultsFor(childName); > if(json) { > _merge(json, values); >@@ -247,13 +248,13 @@ > } > }; > >- /** >- * @description Get the defaults used when creating a new tracked file >- * @private >- * @param {String} filename The name of tracked file to create >+ /** >+ * @description Get the defaults used when creating a new tracked file >+ * @private >+ * @param {String} filename The name of tracked file to create > * @returns {{}|null} An object of default values or null >- * @since 13.0 >- */ >+ * @since 13.0 >+ */ > function _defaultsFor(filename) { > switch(filename) { > case JavaScriptProject.prototype.TERN_PROJECT: { >@@ -412,14 +413,14 @@ > } > } > if (project) { >- if(!this.projectMeta || project.Location !== this.projectMeta.Location) { >+ if(!this.projectMeta || (project.Location !== this.projectMeta.Location && typeof this.projectMeta.Location === "string")) { > this.projectMeta = project; > delete this.ecma; > delete this.map[this.TERN_PROJECT]; >- _handle.call(this, "onProjectChanged", this, evnt, project.Location); >+ _handle.call(this, "onProjectChanged", this, evnt, project.Location || "/file/"); > return; > } >- _handle.call(this, "onInputChanged", this, evnt, project.Location); >+ _handle.call(this, "onInputChanged", this, evnt, project.Location || "/file/"); > } else { > delete this.ecma; > _handle.call(this, "onProjectChanged", this, evnt, null); >diff --git a/modules/orionode/.vscode/launch.json b/modules/orionode/.vscode/launch.json >new file mode 100644 >index 0000000..839fe09 >--- /dev/null >+++ b/modules/orionode/.vscode/launch.json >@@ -0,0 +1,55 @@ >+{ >+ "version": "0.2.0", >+ "configurations": [ >+ { >+ "name": "Launch", >+ "type": "node", >+ "request": "launch", >+ "program": "${workspaceRoot}/server.js", >+ "stopOnEntry": false, >+ "args": [], >+ "cwd": "${workspaceRoot}", >+ "preLaunchTask": null, >+ "runtimeExecutable": null, >+ "runtimeArgs": [ >+ "--nolazy" >+ ], >+ "env": { >+ "NODE_ENV": "development" >+ }, >+ "externalConsole": false, >+ "sourceMaps": false, >+ "outDir": null >+ }, >+ { >+ "name": "Attach", >+ "type": "node", >+ "request": "attach", >+ "port": 5858, >+ "address": "localhost", >+ "restart": false, >+ "sourceMaps": false, >+ "outDir": null, >+ "localRoot": "${workspaceRoot}", >+ "remoteRoot": null >+ }, >+ { >+ "name": "DebugInElectron", >+ "type": "node", >+ "request": "launch", >+ "program": "${workspaceRoot}/server.js", >+ "stopOnEntry": false, >+ "args": [], >+ "cwd": "${workspaceRoot}", >+ "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd", >+ "runtimeArgs": [ >+ ".", >+ "--enable-logging" >+ ], >+ "env": {}, >+ "externalConsole": false, >+ "sourceMaps": false, >+ "outDir": null >+ } >+ ] >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 509476
: 265956