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.
- 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
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.
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.
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
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.
- 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. ]
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.
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.