Commit Graph
139 Commits
Author SHA1 Message Date
Glenn Ruehle d77cf167b7 More cleanup 2013-11-07 12:24:50 -08:00
Ian Wehrman 004ff6931b Merge branch 'brackets' into glenn/file-system
Conflicts:
	src/project/ProjectManager.js
2013-11-01 17:22:32 -07:00
Jason San Jose fce09d4c85 Merge pull request #5400 from adobe/dangoor/4922-document-methods-missing
Consider 2,000 lines to be a large file for hints.
2013-11-01 11:25:37 -07:00
Peter Flynn 84c0e1c205 - Change ScopeManager to use getDocumentText() for efficiency
- Add FileSystem.isAbsolutePath() utility function
- Update FileSystem docs to reflect latest at
https://github.com/adobe/brackets/wiki/File-System
2013-10-28 18:50:37 -07:00
Glenn Ruehle 70c9453260 Merge with origin/master 2013-10-28 16:25:54 -07: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 f8c86db7fd move FileSystemEntry.isFile() and isDirectory() to FileSystemEntry.isFile and isDirectory; create new FileSystemStats class and update FileSystemEntry.stat to callback with a FileSystemStats object 2013-10-24 16:45:07 -07:00
Ian Wehrman 2ab57c068b Merge branch 'brackets' into glenn/file-system
Conflicts:
	src/document/DocumentCommandHandlers.js
	src/document/DocumentManager.js
	src/editor/CSSInlineEditor.js
	src/file/FileUtils.js
	src/project/ProjectManager.js
	test/spec/DocumentCommandHandlers-test.js
2013-10-24 12:16:14 -07:00
Kevin Dangoor f64e900a50 Merge branch 'dangoor/update-tern-acorn' into dangoor/4922-document-methods-missing 2013-10-23 15:59:17 -04:00
Jeff Booher 8ca47a58a7 Merge pull request #5527 from adobe/pflynn/trailing-slash-cleanup
Better compartmentalize code that assumes no trailing "/"
2013-10-22 10:17:33 -07:00
Ian Wehrman bfb113d5a9 Merge branch 'brackets' into glenn/file-system
Conflicts:
	src/document/DocumentManager.js
	src/language/JSUtils.js
	src/project/ProjectManager.js
	src/search/FindInFiles.js
2013-10-21 12:20:33 -07:00
Kevin Dangoor a076860a85 Merge branch 'master' into dangoor/4922-document-methods-missing 2013-10-21 12:12:24 -04:00
Glenn Ruehle 290da888da Make FileSystem a singleton. 2013-10-17 15:39:35 -07:00
Ian Wehrman a8e657fa5d Replace CollectionUtils.indexOf, some, forEach and hasProperty with _.findIndex, some, foreach and has, respectively 2013-10-16 19:56:18 -07:00
Peter Flynn a9ab07c38e Incremental clean up of paths without trailing "/":
- Rename FileUtils.canonicalizeFolderPath() to stripTrailingSlash() since
it actually makes paths NOT canonical. Old API left in place with
deprecation warning for now.
- Add warning to docs for a few other APIs that return non-canonical paths:
FileUtils.getNativeBracketsDirectoryPath(), FileUtils.getNativeModuleDirectoryPath(),
ProjectManager.getInitialProjectPath(), ProjectManager.updateWelcomeProjectPath()
ProjectManager._getWelcomeProjectPath()
- Indicate explicitly which ProjectManager APIs support receiving
non-canonical paths
- Centralize code that touches welcomeProjects storage pref for clarity

What this does NOT do:
- Fix the other APIs listed above that still return non-canonical paths
- Fix non-canonical first-launch project path given to _loadProject()
- Fix non-canonical paths used in RecentProjects prefs
- Fix non-canonical paths used in welcomeProjects pref
- Fix ScopeManager, which in some places requires canonical paths and
in other places requires non-canonical paths
2013-10-14 20:40:41 -07:00
Glenn Ruehle 89945f808d Add ProjectManager.getAllFiles(), replacing FileSystem.getFileList(). Purge the _allFiles handling from FileIndex. 2013-10-13 09:45:32 -07:00
Glenn Ruehle 5d8394d253 Merge branch 'glenn/file-system' of https://github.com/adobe/brackets into glenn/file-system 2013-10-11 07:08:33 -07:00
Glenn Ruehle 9dc6a18ab2 First pass at adding rename functionality. Still some loose ends to clean up. 2013-10-11 07:08:28 -07:00
Peter Flynn 087a4519a5 Cleaner fix for race condition bugs in JS code hints unit tests. 2013-10-10 18:45:42 -07:00
Ian Wehrman 8269ff1604 Move FileSystem.getDirectoryContents to Directory.getContents 2013-10-09 16:16:07 -07:00
Glenn Ruehle 996ea0d724 Remove FileSystem.pathExists(). Fix a bunch of unit test failures. 2013-10-08 16:31:26 -07:00
Glenn Ruehle b1ad00c09b Convert file system to use callbacks instead of promises. 2013-10-05 07:31:33 -07:00
Kevin Dangoor a73b7c6fe7 Consider 2,000 lines to be a large file for hints.
This is a fix for #4922... only part of Document.js was being processed
because it was considered a "large file" at 250 lines. 250 lines seems
a bit too conservative. We'll want to see if there are complaints about
memory usage and I think we'll also want to experiment a bit with how
we manage Tern.

But, it seems to me that a file the size of Document.js should not be
getting truncated hints.
2013-10-02 15:54:15 -04:00
Glenn Ruehle 490ce527a9 Fix a bunch of unit test failures. 2013-09-11 15:20:09 -07:00
Glenn Ruehle ada68e2b1f Merge with master 2013-09-11 12:35:44 -07:00
RaymondLim af87e0d774 Fix the unit test failure in JS Quick Edit and some typos in JSDoc. 2013-08-18 09:13:42 -07:00
dloverin 72d7b2bcec allow 'empty' updates for parameter hints 2013-08-16 06:17:20 -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
Glenn Ruehle 65f69aad42 Merge with master 2013-08-14 11:04:47 -07:00
dloverin 82dd6574ed jsdoc fixes 2013-08-05 15:29:16 -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 794c5d1ad8 improve error handling 2013-08-01 21:05:09 -04:00
dloverin d837cd19e2 rename ScopeManager.requestFunctionHint to ScopeManager.requestParameterHint.
add unittests for HintUtils.formatParameterHint
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 9e15de2eb7 Function Hints 2013-08-01 21:05:06 -04:00
Glenn Ruehle 819a20882d Use fullPath and name getters instead of getPath() and getName(). 2013-07-23 11:38:53 -07:00
Glenn Ruehle 848e0b67f4 Make FileSystem a class, and support multiple instances. 2013-07-21 12:25:39 -07:00
Ian Wehrman 0caa95c6a6 Untitled document support using InaccessibleFileEntry objects. 2013-07-12 13:32:00 -07:00
Glenn Ruehle 045f34654b Initial integration into core. 2013-07-08 10:10:41 -07:00
dloverin fc4c9eeef3 write SyntaxError.message to console to provide some help for preference file errors. 2013-06-17 17:06:40 -04:00
dloverin b53cf8a853 move message to correct location and fix jsLint errors 2013-06-14 11:31:30 -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
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 d01ce6b670 Merge pull request #3927 from dloverin/handle-rejected-hints
handle the case where the CodeHintManager rejects a deferred hint
2013-06-04 08:34:41 -07:00
Erik Tierney c46beee12f Merge pull request #4080 from dloverin/fix-ctrl-space2
Don't mark document as modified when ctrl-space is pressed
2013-06-04 08:31:26 -07: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
Erik Tierney a595614c5c Make sure jump-to-def respects size limit 2013-06-03 17:00:56 -04:00
Erik Tierney 75e2b71973 Temporarily exclude ember, implement max file size limit.
We are currently experiencing problems analyzing ember.js, so excluding it until we can get those worked out.  Also adding a max file size limit of 500k.
2013-06-03 16:14:03 -04:00
dloverin d372690e1e handle the case where the CodeHintManager rejects a deferred hint 2013-05-31 14:52:03 -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