Commit Graph
125 Commits
Author SHA1 Message Date
Randy Edmunds 71a6dfc069 remember files that timed out in tern 2014-06-27 10:50:21 -07:00
Kevin Dangoor dd7c53ad82 Adds jscodehints.inferenceTimeout preference 2014-06-19 13:42:30 -04:00
Kevin Dangoor 45a9b6fc07 Switch to glob for defaultExclusions, per review feedback. 2014-05-05 08:26:51 -04:00
Kevin Dangoor d8f4bbf465 Implement jscodehints.defaultExclusions preference.
We've had a number of people report problems with Ionic in their projects.
Tern appears to have an issue with the minified Ionic files. I had planned
to add default exclusions so that we could quickly solve pain like this
and this problem appeared to be a good candidate. The repro steps
[reported here](https://github.com/adobe/brackets/issues/7262#issuecomment-41851396)
are fixed with this change.
2014-05-02 22:49:45 -04:00
Peter Flynn 7b32bb1d54 Fix several problems with the Jump to Definition extensibility API:
- JS impl would always crash on non-JS code, blocking any other provider
from responding
- Provider was not called with the args the docs described
- Other errors in docs
2014-03-17 23:37:24 -07:00
Narciso Jaramillo 87d7bb9e9f Change Document 'change' event to send an array of change records rather than a linked list, matching v4 'changes' event 2014-02-21 12:59:56 -08:00
Kevin Dangoor 3f2ad065a0 Minor fixes in code hint test/debug code to address review comments. 2013-11-11 15:44:04 -05:00
Kevin Dangoor f80c0c9d98 Fixes code hint tests by controlling worker resets.
Previously, the web worker would be restarted at somewhat random
times during test runs (after a specific number of hints was requested).
This change forces the worker to start afresh with each test and switches
the worker so that it doesn't reset during any of the tests.
2013-11-08 09:33:56 -05:00
Narciso Jaramillo 010bc625b8 Rename lodash.custom.min.js to lodash.js so our JS code hinting finds it. Remove the special path for it so it's more consistent with other require paths that have to be relative to src. 2013-10-28 14:15:03 -07:00
Ian Wehrman ab96f8c372 Remove superfluous StringUtils requires 2013-10-16 19:56:18 -07:00
Ian Wehrman d622884ab1 Deprecate StringUtils.htmlEscape in favor of _.escape 2013-10-16 19:56:17 -07:00
Randy Edmunds 90a2b3f8a7 restore handleWideResults property 2013-09-27 17:50:11 -07:00
Randy Edmunds 6850ed73e3 Merge remote-tracking branch 'origin/master' into randy/issue-5003 2013-09-27 17:20:56 -07:00
Randy Edmunds 11d73cef17 simplify fix by assuming intent is to type (not insert hint) 2013-09-26 16:44:58 -07:00
Randy Edmunds 3230fd4fa7 changes for code review 2013-09-17 15:18:57 -07:00
Randy Edmunds 903b9716bc detect pending text insertion that's not reflected in hint list 2013-09-16 12:41:15 -07:00
Randy Edmunds 364d8872c7 when deferred hints resolve, verify still in same session 2013-09-12 16:35:38 -07:00
Randy Edmunds 0b4499c819 better explanation of how session can be null 2013-09-12 15:50:01 -07:00
Randy Edmunds 3ea830d5ba fix exceptions during unit tests 2013-09-10 16:03:29 -07:00
RaymondLim fbf246a6a1 Stop appending parentheses when inserting a function. Instead, show param hints only after the open parenthesis is entered. 2013-09-04 10:03:56 -07:00
dloverin d95544d504 remove half-done feature to pop up parameter hints on '(' key 2013-08-12 11:38:25 -04:00
dloverin dd6b19d984 Add feature to hint on '(' key and fix typos 2013-08-12 10:55:24 -04:00
dloverin c994eafc36 Fix issue where "<no parameters>" would be hinted when Tern could not parse the jsdoc.
Fix issue where Session.getFunctionInfo could return 'inFunctionCall' as true but
'functionCallPos' would be undefined.
Fix many jsdoc problems.
2013-08-05 10:22:53 -04:00
dloverin 3492796714 Fix exception after picking hint from code hints combo.
Clean up unittests.js and change string from "<no arguments>"
to "<no parameters>"
2013-08-01 21:05:08 -04:00
dloverin 5205cba81c refactor 2013-08-01 21:05:07 -04:00
dloverin a9c916726f parameter hint fixes 2013-08-01 21:05:07 -04:00
dloverin 9e15de2eb7 Function Hints 2013-08-01 21:05:06 -04:00
Ian Wehrman 4485ae8e22 Remove default extension from untitled documents and new files 2013-07-16 14:19:40 -07:00
Ian Wehrman 0caa95c6a6 Untitled document support using InaccessibleFileEntry objects. 2013-07-12 13:32:00 -07:00
Erik Tierney 35821e69db Fix problem with finding next token on next line.
Don't set the selection until we have done the final jump-to-def
should address comments in issue #3863
2013-06-20 10:36:40 -04:00
Erik Tierney 6490214cb5 code review cleanup 2013-06-17 16:25:13 -04:00
Erik Tierney b975e6a50d Only go to the original def when dealing with a Function. 2013-06-17 15:18:13 -04:00
Erik Tierney 269c3b77c9 Fix Issue #3863 - jump-to-def goes to exports line.
When the result of jump-to-def looks like:
exports.foo = foo;

we now will try and jump-to-def on the rhs, as that's what the user most likely really wants.  Jumping to the exports line is rarely useful.

When we get the response for a jump-to-def, if it looks like we're jumping to a member expression like the example above, then we will grab the RHS, and trigger another jump-to-def on that, which should take us to the correct place.
2013-06-17 13:46:54 -04:00
dloverin 8efc57439b needsNewHints() was not returning true for different function type hints on the same line 2013-06-07 16:40:26 -04:00
Erik Tierney c353fe4b4b Merge pull request #4150 from dloverin/insert-hint-wo-replace
insert hint without replacing text to the right of the caret
2013-06-07 10:28:35 -07:00
dloverin 69410b1ac1 insert hint without replacing text to the right of the caret 2013-06-07 13:12:18 -04:00
dloverin d65fbdcacf Allow preferences to be overridden by a configuration file.
src/extensions/default/JavaScriptCodeHints/Preferences.js
    New class to parse JSON preferences object and store preferences.
src/extensions/default/JavaScriptCodeHints/ScopeManager.js
    Look for preference file, .jscodehints, in the project root directory.
    Remove obsolete "shouldPrimePump" parameter.
src/extensions/default/JavaScriptCodeHints/main.js
    Remove obsolete "shouldPrimePump" parameter.
src/extensions/default/JavaScriptCodeHints/unittests.js
    Add new preference tests.

Add new preference tests under unittest-files/preference-test-files
2013-06-07 08:51:05 -04:00
dloverin d372690e1e handle the case where the CodeHintManager rejects a deferred hint 2013-05-31 14:52:03 -04:00
Erik Tierney 76eaefeb56 Merge pull request #4044 from dloverin/fix-ctrl-space
only record document changes for non-null keys
2013-05-31 10:18:58 -07:00
dloverin 264fc311e4 only record document changes for non-null keys 2013-05-31 12:51:35 -04:00
jeffkenton 476bc5d41c Merge branch 'master' of https://github.com/adobe/brackets into jumptodef
Conflicts:
	src/extensions/default/JavaScriptCodeHints/main.js
2013-05-31 10:03:36 -04:00
jeffkenton 13a8fd0f68 Fix code review issues:
- Make handleJumpToDefinition return a proper promise.
 - Minor cleanups.
2013-05-31 09:48:09 -04:00
dloverin cb8a0e9746 Implement requests with partial file text to reduce memory usage for large files.
Add large comment to file1.js test file so it will be considered a large file and partial text updates can be tested.
For now, move two failing tests apart so they pass. Partial text updates are notas good a full text updates but save memory.
2013-05-30 14:47:58 -04:00
jeffkenton 43b5b735be Changed Jump-To-Definition, as requested -- modeled on QuickEdit:
- Now can register multiple jump-to-definition providers (only one, so far).
  - Moved jump-to-definition menu setup to top level.
  - Added jump-to-definition to floating right-click menu. [ Note: we may not want
    this unless there is a provider registered for the current mode, but that's how
    QuickEdit does it.  We can fix both at the same time if we decide to. Also note
    that if we want to change the right-click menu for this, one could argue that we
    should also change the top level menu for the same reason. ]
2013-05-29 09:34:51 -04:00
Erik Tierney f6fdc43434 Clean up tern web workers whenever we re-init the tern server, or close a project.
If we don't call terminate on the worker, it appears that the worker, and all the memory it's using will never get collected.  So when we were switching projects, we were leaving behind orphaned workers, resulting in a large memory leak.

To enable re-initing the web worker I had to change around the logic - now the worker sends a message when it is done being init'ed and the main thread waits for that message before it starts sending messages to the workers.
2013-05-23 21:10:57 -04:00
Kevin Dangoor 93561f0290 Merge pull request #3916 from adobe/dangoor/3610-long-sig
Implements word wrap for function signatures (merging after fixing "minor comment" from @redmunds).
2013-05-21 08:50:30 -07:00
Kevin Dangoor c40b60b94a Makes reformatting code hints explicit.
Adds a handleWideResults to hint responses (only active for function signature hints right now).
The CodeHintList changes the styling and behavior a bit to suit.
2013-05-21 09:08:40 -04:00
Narciso Jaramillo 2245e01960 Merge pull request #3847 from jeffkenton/master
Use Tern jump-to-definition search for quickeditt
2013-05-20 09:15:58 -07:00
jeffkenton 8fbbeed10b Change how QuickEdit helper function is passed from CodeHints to QuickEdit:
It now gets set directly as brackets._jsCodeHintsHelper = quickEditHelpe;.

as suggested.
2013-05-17 15:20:09 -04:00
dloverin 4d4d87dd85 fix jsdoc 2013-05-16 16:40:08 -04:00