Commit Graph
79 Commits
Author SHA1 Message Date
gmeluski be80ae2cca changing not.toBeNull to toBeTruthy
:
2013-10-11 15:21:54 -04:00
dloverin 0c892a988f Work around issue https://github.com/marijnh/tern/issues/207 by calling Tern.findQueryExpr() and Infer.expressionType() as suggested by marijn. The problem with this fix is it requires a "full" text update with the parameter hint request. Suggested a possible solution in the issue.
The quality of the hints has been much improved and record type annotations can be hinted correctly.
2013-08-15 22:52:31 -04:00
dloverin 794c5d1ad8 improve error handling 2013-08-01 21:05:09 -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 d837cd19e2 rename ScopeManager.requestFunctionHint to ScopeManager.requestParameterHint.
add unittests for HintUtils.formatParameterHint
2013-08-01 21:05:08 -04:00
dloverin 8ae1abe419 Add HintUtil2.formatParameterHint and fix bugs 2013-08-01 21:05:08 -04:00
dloverin adb56c0b58 fix unit tests and move function hint type parsing into the tern worker. 2013-08-01 21:05:07 -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
Erik Tierney 9afd44282b Update expected results, as Tern now gives us better results than what the test was expecting. 2013-07-12 10:46:39 -04:00
Jason San Jose b9d69228bc Merge pull request #4205 from dloverin/jody-test3
Jody added some new code hint tests
2013-06-17 13:46:03 -07:00
dloverin 893b3bd29d Merge pull request #4254 from eztierney/iss-3863
Fix Issue #3863 - jump-to-def goes to exports line.
2013-06-17 13:26:40 -07:00
Erik Tierney 0f73f04bcc Added unit test for jumping to a function in exports.
Modified _waitForJump to wait until the jump promise is done, rather than checking that the cursor had changed.
Updated 1 other test which was looking at everything that was exported from the test module.
2013-06-17 14:50:16 -04:00
dloverin c784efb4c7 Ignore empty lines when finding a fragment for partial updates.
Change hintsPrsentExact to verify number of entries match.
2013-06-14 11:03:56 -04:00
Erik Tierney 5435d4092e Merge pull request #4177 from dloverin/pref-regexp-fix
do not wrap regular expresssions in '^' and '$', only strings.
2013-06-14 06:32:54 -07:00
dloverin e06e5e4f6f fix unittests and add FIXMEs 2013-06-13 17:03:08 -04:00
Erik Tierney 34601065ce Update tern & acorn
tern is now 0.2
acorn is now 0.3
remove exclusion for ember.js, as it seems to be fixed with the latest tern
2013-06-13 09:46:03 -04:00
dloverin 49e25e4f6b remove quick edit tests. Put those tests in quick edit module. 2013-06-12 16:59:01 -04:00
dloverin 8df8808553 Merge branch 'test3' of https://github.com/jodyzhang/brackets into jody-test3
Conflicts:
	src/extensions/default/JavaScriptCodeHints/unittests.js
2013-06-10 11:25:44 -04:00
dloverin fccdb12b02 do not wrap regular expresssions in '^' and '$', only strings. 2013-06-10 09:03:06 -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
Erik Tierney 241b2322ef Merge pull request #4147 from dloverin/pref-file
Allow preferences to be overridden by a configuration file.
2013-06-07 10:26:51 -07:00
dloverin 69410b1ac1 insert hint without replacing text to the right of the caret 2013-06-07 13:12:18 -04:00
dloverin 759c3cd088 preferences for 'excluded-directories' and 'excluded-files' always append to the builtin defaults 2013-06-07 11:37:58 -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
Erik Tierney ba49afb6a1 Don't provide hints in string literals
fixes issue #4050
2013-06-05 14:09:10 -04:00
dloverin bcba5e3779 modified: src/extensions/default/JavaScriptCodeHints/ScopeManager.js
Don't update the modified range when 'null' keys (ctrl-space) are hinted.

modified:   src/extensions/default/JavaScriptCodeHints/main.js
When changing files, reset documentChanges to null.

modified:   src/extensions/default/JavaScriptCodeHints/unittests.js
Restore that content of a file after each test.
Update a test to wait for hints after it asks for hints. If the hints are not waited for the editor will be torn down before the hint completes, causing a null pointer exception.
2013-06-04 10:04:50 -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
jzhang 3dfead4e05 add new test cases 2013-05-24 16:18:10 -04:00
Peter Flynn 427914df4b Hoist out a util for creating a mock Editor given an already-created
document, so JS code hints unit tests can share SpecRunnerUtils' mock-Editor
creation code instead of duplicating it.
2013-05-21 17:18:20 -07:00
dloverin 8642920d8c fix hinting on non-ascii characters 2013-05-17 07:43:08 -04:00
dloverin 18dd7a144b update the current file in tern when a new file is opened
exclude less*.min.js files
2013-05-16 16:13:45 -04:00
jzhang bd4feb5611 add more code hint tests for html file and module file 2013-05-16 14:45:36 -04:00
dloverin 8142ccdeb6 Fix a bug where the hinter was not failing over to gueses. Added code to Session.getHints to detect when guesses are needed so the caller can get the guesses from tern and call getHints again. 2013-05-15 12:37:43 -04:00
Narciso Jaramillo 9b2e9c4611 Merge pull request #3822 from adobe/dangoor/3589-underscore-names
Fix 3589 sort _ names to the bottom.
2013-05-14 15:50:09 -07:00
Erik Tierney dfb35c30f5 Update tern and acorn to latest - fixes a number of bugs.
Modified some of the expected output for unittests as tern was updated to produce arguably better results, particularly for jump-to-def.

Changed the jump to def logic so that it doesn't stomp on all the pending requests, and instead plays nicely with the other request types.
2013-05-14 14:34:06 -04:00
Kevin Dangoor 9672c7e19d Fix for #3589. In code hints, sort leading _ names to bottom.
This also alters StringMatch.multiFieldSort to use an array to define the sort order,
though I stopped short of deprecating the old { key: priority } format.
2013-05-14 12:42:16 -04:00
Erik Tierney e30c71f969 Don't need to call initializeSession from unittests anymore 2013-05-14 12:37:13 -04:00
dloverin 432ae558b9 Merge branch 'jump-to-def-tests' of https://github.com/eztierney/brackets into eztierney-jump-to-def-tests 2013-05-13 17:05:16 -04:00
Erik Tierney 6e5bce81b4 Make unittests for jump-to-def work when jumping to a new file.
Register a fake FILE_OPEN command with the command manager, since that's what the jump-to-def code will call to switch files.
2013-05-13 10:08:31 -04:00
dloverin 67e615c866 fixup for moved index.hmtl file 2013-05-13 09:02:27 -04:00
dloverin 47de2cb19c Merge branch 'master' into load-subdirs 2013-05-13 08:29:31 -04:00
dloverin 3f4314ba55 cleanup 2013-05-13 08:22:09 -04:00
Erik Tierney dfdff356a6 Fix Issue #3614
Don't hint on function, parameter, or variable declarations.
no hints for
var fo// we used to pop up hints here
2013-05-10 16:00:16 -04:00
dloverin 0558c97cf7 Merge pull request #3740 from jodyzhang/mywork4
add new test cases
2013-05-10 10:19:46 -07:00
dloverin dc9aba5fca Merge branch 'master' into load-subdirs 2013-05-10 12:43:28 -04:00
dloverin f2ba60c17f load additional files if the loaded files are not using modules.
refactored unittest files.
2013-05-10 12:34:17 -04:00
Erik Tierney 678ae5aed0 Code review cleanup - mostly in the unittests 2013-05-09 14:54:40 -04:00
jzhang fbf2437740 add new test cases 2013-05-07 14:50:46 -04: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