Randy Edmunds
f4508c2fa7
revert submodule changes
2013-05-05 10:50:04 -07:00
Randy Edmunds
53bf87ed22
Revert "Merge pull request #3697 from jeffslofish/Issue-3676"
...
This reverts commit 9e99101057 , reversing
changes made to a9e27717f4 .
2013-05-05 10:46:07 -07:00
Jeffrey Fisher
0904c5de19
Changed one instance of the depreciated ".className" to ".type" that were being used on objects returned from the getTokenAt() method that was missed during a merge.
2013-05-04 22:31:12 -07:00
Jeffrey Fisher
b624d60f5f
Merge branch 'master' of https://github.com/adobe/brackets into Issue-3676
...
Conflicts:
src/extensions/default/JavaScriptCodeHints/Session.js
2013-05-04 11:28:47 -07:00
dloverin
3ec230c473
Merge pull request #3623 from eztierney/update-tern
...
[JS Code Hints] Update tern - fixes #3606 , #3605
2013-05-03 12:04:57 -07:00
Erik Tierney
84c239cf39
Merge branch 'master' into html-script-hinting
...
Fixup branch so it will merge cleanly again.
Conflicts:
src/extensions/default/JavaScriptCodeHints/unittests.js
2013-05-03 14:50:57 -04:00
Narciso Jaramillo
984ed97ddd
Hack yet another place where we need to use _codeMirror.replaceRange() in code hints to make them work in inline editors because of #1688 .
2013-05-03 10:30:35 -07:00
Erik Tierney
a5b7100bd8
Merge pull request #3692 from dloverin/first-hint-perf
...
prime pump to improve first hint performance
2013-05-03 10:16:06 -07:00
Erik Tierney
8ebdaaec8d
Update acorn and tern.
...
Acorn is now version 0.2 and tern is 0.1
2013-05-03 11:45:17 -04:00
Erik Tierney
5d7dc76dfb
refactor HTMLUtils.findStyleBlocks to find arbitrary blocks.
...
The js code hinting code needed to find script blocks, so refactor the style block code to find any kind of block, and call that instead of having another copy of the code. findStyleBlocks now just calls the generic method, looking for "css" blocks.
Also fixed up the block finding code to handle empty blocks, which I ran into when looking for "javascript" blocks.
2013-05-03 11:29:43 -04:00
dloverin
d8b960d12f
Merge pull request #3598 from eztierney/iss-3511
...
[JS Code Hints] Fix Issue #3511
2013-05-03 08:19:29 -07:00
Erik Tierney
046cb6bb63
Forgot to add new test file
2013-05-03 10:00:06 -04:00
Erik Tierney
9416e75828
Add tests for jscodehints in an html file.
...
Also fix some bugs with jump-to-def and function type hints uncovered by the tests.
2013-05-02 16:28:40 -04:00
Erik Tierney
0755c30d58
Basic support for code hinting in html files.
...
For HTML files, we replace the HTML sections with whitespace, leaving only the text of the script tags for Tern to see.
This way the offset/cursor positions don't need to be translated, which would be necessary to get jump-to-def to work.
2013-05-02 16:28:39 -04:00
Jeffrey Fisher
c81d79ad4a
Changed all usages of the depreciated ".className" to ".type" that were being used on objects returned from the getTokenAt() method. There are many ".className" references that refer to the name of the CSS class, and all these were left alone. Also, any uses of ".className" in the third party code was left alone as well.
2013-05-01 19:09:25 -07:00
dloverin
520ab57716
bypass pump when unittesting
2013-05-01 14:04:52 -04:00
dloverin
51805f0f8f
prime pump to improve first hint performance
2013-05-01 08:24:26 -04:00
dloverin
3a22861211
small changes for code review
2013-04-26 16:57:15 -04:00
dloverin
8fed6323fd
fix backspace key
2013-04-26 12:11:08 -04:00
dloverin
52d98980f0
Close hints when the cursor moves to a new hinting context
2013-04-26 09:57:08 -04:00
Erik Tierney
b2a59d9358
Update tern - fixes #3606 , #3605
...
Also update acorn, as latest tern needs the latest version of acorn.
Codehinting tests all pass, and performance does not seem to have degraded.
2013-04-25 12:45:34 -04:00
Erik Tierney
806768816b
Merge pull request #3591 from dloverin/expand-word-forward
...
Fix expandWordForward should be false - need to fix a bug when updating to latest tern
2013-04-25 09:41:06 -07:00
Peter Flynn
f6b244d298
Rename classic "Go to Definition" to be more distinct from the new Tern-
...
driven "Jump to Definition". Reorder menu so the ones that use QuickOpen
search bar are all contiguous, while keeping the two "Definition" ones
also contiguous.
In consultation with NJ & Adam.
2013-04-24 19:27:29 -07:00
Erik Tierney
a4c87a6bba
Fix Issue #3511
...
when inserting a hint which is not a valid property name, such as 'my-key', insert the hint as ["my-key"] instead of .my-key.
insertHint now runs the hint through the acorn tokenizer to see if it looks like a valid property name. If it's invalid, it replaces the '.' with brackets.
Refactored some code in Session.getType() - pulled out a method to find the leading '.' in a property lookup, and use that method from the insertHint logic as well.
Added 3 new unittests to test this new behavior.
2013-04-24 15:40:05 -04:00
Kevin Dangoor
d496a0c2e2
Merge pull request #3554 from dloverin/builtins-color
...
Do not add depth color for JS builtins
2013-04-24 12:03:12 -07:00
dloverin
8d7468b3dc
Fix expandWordForward should be false.
2013-04-24 13:33:33 -04:00
Kevin Dangoor
232ee9bb0e
Turn on preferPrefixMatches for JS code hints.
...
Adding this option to string matching provides a fix for #3534 by putting
the matches at the same score and using the scope as a tie breaker.
2013-04-24 10:16:19 -04:00
dloverin
e1f43e4271
do not add depth color for builtins
2013-04-23 13:22:03 -04:00
Erik Tierney
6c0a350176
JSCodeHinting - Find requirejs modules even when project root doesn't match the requirejs root.
...
Looks for any files that end with the name of the module we're looking for. Does not do any tie breaking yet, but this gets the requirejs support working when you open the 'brackets' dir for instance, instead of the 'brackets/src' dir.
2013-04-23 13:14:16 -04:00
Kevin Dangoor
bb7b3c4ce4
Merge branch 'master' of https://github.com/adobe/brackets
2013-04-22 10:16:23 -04:00
Kevin Dangoor
83e5c2de59
Merge branch 'master' into adobe-iwehrman/js-hinter-cruft-removal
...
Conflicts:
src/extensions/default/JavaScriptCodeHints/main.js
2013-04-22 10:14:17 -04:00
Kevin Dangoor
5544fd6f38
Merge pull request #3477 from eztierney/codereview-cleanup
...
Cleanup for comments from pull request #3439 , switch to tern hinting
2013-04-22 06:47:48 -07:00
Jason San Jose
10b3aeb7c1
Merge pull request #3491 from dloverin/fix-monospace-font
...
Fix regressions (from Sprint 23) in the display of literals and keywords in code hints.
2013-04-19 17:13:19 -07:00
dloverin
cb96db453c
Fix regressions in the display of literals and keywords in code hints.
...
1. keywords should be monospace.
2. literals should be dark grey.
2013-04-19 09:40:47 -04:00
dloverin
5bd169120c
add new identifier colors from Lawrence Hsu.
2013-04-19 08:49:30 -04:00
Erik Tierney
10f8896d46
cleanup based on codereview comments:
...
Update jsdoc
use ExtensionUtils.getModulePath instead of manually slicing up path
use FileUtils.readAsText instead of DocumentManager when we only need the text on disk
Call CollectionUtils.hasProperty instead of Object.prototype.hasOwnProperty...
Add comment explaining logic around finding location of called function for function type hinting
remove unnecessary calls to setCursorPos
remove stale comments in unittests
pull out hint invalidation check into a function and remove check for query.length === 0, not necessary anymore
2013-04-18 16:38:40 -04:00
dloverin
7b31da7705
fix problem where jQuery was not recognized as a builtin
2013-04-18 11:26:45 -04:00
dloverin
5a2efdf1db
add jquery api to hints
2013-04-17 18:04:56 -04:00
dloverin
f6a073ca3d
When typing, only automatically show hints for the "." character and JS identifier characters.
2013-04-17 17:29:48 -04:00
dloverin
725a1e8553
remove Collections.forEach loop
2013-04-17 09:12:42 -04:00
Erik Tierney
c5052f8e33
Add a couple of unit tests for jump to definition
...
Only tests in file, inter file needs more work - have to figure out how to make CommandManager work from the unittester.
2013-04-16 18:49:09 -04:00
dloverin
0f43f548d1
remove CollectionsUtils.hasProperty inside of CollectionUtils.forEach
2013-04-16 16:14:15 -04:00
Erik Tierney
ebc6b647c6
Add some more unit tests
...
covers require support, jsdoc, function types
2013-04-16 11:51:41 -04:00
Erik Tierney
daa64a3f3a
cleanup from code review
...
fixed type, delimeter -> delimiter
don't need to escape single quote in double quoted string
2013-04-16 08:48:12 -04:00
dloverin
33a016da6d
Change for-in loop to Collections.forEach to satify JSLint (looks like a bug in JSLint though)
2013-04-15 17:55:01 -04:00
dloverin
20423c94b9
fix grunt warning
2013-04-15 16:05:46 -04:00
dloverin
e5e028e535
remove pending requests and send message from tern-worker on Tern errors
2013-04-15 16:05:46 -04:00
Erik Tierney
77a1b7f2a2
Grunt cleanup, and deleted more unused code
2013-04-15 11:11:32 -04:00
dloverin
e0c551d624
remove unused hinting for globals
2013-04-15 10:38:59 -04:00
Erik Tierney
d96d73d895
cleanup jslint warnings
2013-04-15 09:43:37 -04:00