Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Porting tern analysis of JS code to Node. #11948

Merged
merged 31 commits into from
Jul 13, 2017
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
b3ed2b5
Porting tern analysis of JS code to Node.
swmitra Nov 23, 2015
c8a7df3
Removing old tern submodule config
swmitra Nov 24, 2015
76bbb48
JS text cache in HTML Mixed Mode.
swmitra Nov 26, 2015
39088df
Submodules fix
swmitra Nov 26, 2015
d35be04
Fixing more submodule issues
swmitra Nov 26, 2015
64f4d75
Tern default defs path fix
swmitra Nov 26, 2015
b9d73c1
First draft for content extraction in node [UNIT TESTING IN PROGRESS]
swmitra Dec 7, 2015
02420b5
Update dirty doc content in tern cache.
swmitra Dec 7, 2015
873431e
Stability fix.
swmitra Dec 9, 2015
ca7d68d
Update submodule repo link.
swmitra Dec 14, 2015
d959165
Merge branch 'master' into swmitra/TernNode
swmitra Dec 14, 2015
f726a28
Submodule fix
swmitra Dec 14, 2015
b1a8d46
Merge branch 'master' of https://github.com/adobe/brackets into swmit…
swmitra Jan 11, 2017
41037fd
build error fix
swmitra Jan 11, 2017
87a1d95
Usage of global use strict
swmitra Jan 11, 2017
cb86b4d
Node dependencies
swmitra Jan 17, 2017
9a179b0
Remove redundant module defs
swmitra Feb 2, 2017
e6b2592
Remove redundant script
swmitra Feb 2, 2017
eba850e
src/extensions/default/JavaScriptCodeHints/node/node_modules/acorn
swmitra Feb 2, 2017
1001cc6
Update module defs
swmitra Feb 2, 2017
205c8da
Update .gitmodules
swmitra Feb 15, 2017
28105ef
Merge master to swmitra/TernNode
saurabh95 Mar 7, 2017
e166034
Addressed review comments
saurabh95 Mar 7, 2017
4c4514e
removed redundant for loop(Already added map function for the same)
saurabh95 Mar 8, 2017
bb1199b
Merge branch 'master' into swmitra/TernNode
swmitra May 26, 2017
93bbe48
Fix for analysis data reset on project change
swmitra May 28, 2017
a5930aa
Bug fixes for Untitled document mode change to 'javascript'
swmitra May 29, 2017
80b762c
Merge branch 'master' of https://github.com/adobe/brackets into swmit…
swmitra Jul 10, 2017
34c99ee
Remove tern web worker
swmitra Jul 11, 2017
2a3cfcd
Update Acorn and Tern to latest available version
swmitra Jul 12, 2017
0278ae6
Bug fixes - Handle require plugin, untitled doc, doc comment plugin
swmitra Jul 13, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix for analysis data reset on project change
swmitra committed May 28, 2017
commit 93bbe48e5e4d719cf4d877c3c8f302546b25dc99
Original file line number Diff line number Diff line change
@@ -137,12 +137,13 @@ function initTernServer(env, files) {
plugins: {requirejs: {}, doc_comment: true, angular: true}
};

// If a server is already created just reset the analysis data
// If a server is already created just reset the analysis data before marking it for GC
if (ternServer) {
ternServer.reset();
} else {
ternServer = new Tern.Server(ternOptions);
}
Infer.resetGuessing();
}

ternServer = new Tern.Server(ternOptions);

files.forEach(function (file) {
ternServer.addFile(file);
@@ -157,7 +158,6 @@ function resetTernServer() {
// If a server is already created just reset the analysis data
if (ternServer) {
ternServer.reset();
ternServer.flush();
Infer.resetGuessing();
// tell the main thread we're ready to start processing again
self.postMessage({type: MessageIds.TERN_WORKER_READY});
@@ -325,8 +325,8 @@ function getTernHints(fileInfo, offset, isProperty) {
if (error) {
_log("Error returned from Tern 'completions' request: " + error);
} else {
//_log("found " + data.completions.length + " for " + file + "@" + offset);
completions = data.completion.map(function (completion) {
//_log("found " + data.completions + " for " + file + "@" + offset);
completions = data.completions.map(function (completion) {
return {value: completion.name, type: completion.type, depth: completion.depth,
guess: completion.guess, origin: completion.origin, doc: completion.doc, url: completion.url};
});