Commit Graph

442 Commits

Author SHA1 Message Date
Akash Yadav ed52590ae3 fix(lsp/java): do not create SourceFileManager for root project (fixes #1396) 2023-11-12 00:05:34 +05:30
Akash Yadav 5373698e84 fix(lsp): make signature help requests cancellable (fixes #1393) 2023-11-11 15:33:03 +05:30
Akash Yadav d4626b2a71 fix(lsp): provide cancel checker with params 2023-11-11 00:47:38 +05:30
Akash Yadav 7e64533302 fix(actions): make ActionItem visible and enabled by default 2023-11-07 23:46:37 +05:30
Akash Yadav 2d30c40825 refactor: consistent ActionItem IDs 2023-11-07 19:54:38 +05:30
Akash Yadav faea3b253a fix(lsp/java): gracefully handle non-existing methods while looking for method signatures 2023-11-07 19:09:12 +05:30
Akash Yadav 2e36388cfb fix(lsp/java): migrate SynchronizedTask to Kotlin 2023-11-07 18:04:12 +05:30
Akash Yadav 50f059c2f6 fix(lsp/java): NPE while cancelling analyzing thread (fixes #1373) 2023-10-28 15:43:50 +05:30
Akash Yadav 31285710f5 fix(editor/treesitter): parse syntax tree in same coroutine 2023-10-27 22:10:05 +05:30
Akash Yadav 7923243b3b fix(editor/treesitter): reimplement TsAnalyzeManager for better thread safety and error handling 2023-10-23 21:27:30 +05:30
Akash Yadav fae1aecb46 fix: replace usage of guava-jre with guava-android 2023-10-20 19:48:55 +05:30
Akash Yadav 971fc605ff fix: include language-treesitter from sora-editor locally 2023-10-13 23:03:57 +05:30
Akash Yadav 52844b201e fix: migrate Actions API to Kotlin Coroutines 2023-10-09 00:25:57 +05:30
Akash Yadav cc0a6391f6 fix: add tests for MainFragment and refactor testing modules 2023-10-07 23:37:34 +05:30
Akash Yadav fc2afcf093 tests(lsp/java): run Java LSP tests with Robolectric 2023-10-05 21:16:48 +05:30
Akash Yadav d73a9c88f7 fix(lsp/java): UninitializedPropertyAccessException when accessing analyze result 2023-10-02 18:59:22 +05:30
Akash Yadav 1d54a3ff4d tests: fix compilation issues 2023-10-02 12:27:56 +05:30
Akash Yadav 230ccfa536 fix(editor): rewrite IDEEditor in Kotlin with Coroutines 2023-09-30 15:08:28 +05:30
Akash Yadav 3c1a4ebedc fix: remove usage of deprecated 'newInstance' method in TS Languages 2023-09-18 19:41:59 +05:30
Akash Yadav d66e3b384c fix(projects): remove IProjectManager.app 2023-09-05 17:36:49 +05:30
Akash Yadav f5143625ef refactor: migrate ProjectManager to interface based API 2023-09-05 17:36:39 +05:30
Akash Yadav e725d1cacf feat(projects): implement project deserialization and transformation (2/2) 2023-09-05 17:36:30 +05:30
Akash Yadav eb9ee61118 fix(lsp/java): 'Organize imports' resets the editor's text, clearing the undo/redo history (closes #1210) 2023-08-24 12:51:29 +05:30
Akash Yadav 6cdb6bd374 fix(lsp/java): add null checks before performing code actions (closes #1156) 2023-08-01 10:01:12 +05:30
Akash Yadav 1e07da7a98 fix(javac): add Java compiler flag to override -XDkeepComments flag
When the 'keepComments' flag is set, the compiler uses JavadocTokenizer for tokenizing the source code. While creating the LineMap instance, the JavadocTokenizer sets the 'expandTabs' flag to true which expands '\t' characters to spaces. This is needed while generating HTML pages for the Javadoc. However, if the tabs are expanded to spaces, then getPosition(...) and getColumnNumber(...) methods in the LineMap class return indices which cannot be directly used to insert text in the source code. This results in StringIndexOutOfBoundsException when trying to insert text in the editor (#1127, and probably #916 as well).

This commit adds the 'keepCommentsOverride' option to the compiler which is used by NBParserFactory to override the 'keepComments' flag. The CompileBatch class sets this option to 'ignore' which ignores the 'keepComments' flag so that JavadocTokenizer is not used for tokenization.
2023-07-21 18:46:44 +05:30
Akash Yadav 52d401d992 refactor(lsp/java): format OverrideSuperclassMethods action class 2023-07-21 16:01:08 +05:30
Akash Yadav 601722dba7 fix(tests/lsp/java): fix compilation error 2023-07-09 16:49:45 +05:30
Akash Yadav 764a6fa8c2 fix(lsp): progress dialog for 'find references' action is shown indefinitely
This happens because the 'ReferenceProvider' in the Java LSP tries to start another compilation process while working with the current compilation task.
This results in a deadlock where the current task waits for the new compilation request to return and the new compilation request waits for the current task to finish. This commit fixes this issue.

Apart from fixing this issue, this commit also makes the 'Go to definition' and 'Find references' actions cancelable. Also, it eliminates the usage of the deprecated 'ProgressDialog' class for these two actions.
2023-07-09 12:56:28 +05:30
Akash Yadav 001dee0525 fix(lsp/java): add null checks for usage of FindHelper.findMethod(..) 2023-06-24 23:54:31 +05:30
Akash Yadav bffb2cbea5 fix(lsp/java): add null check for method in 'AddException' rewrite (#1050) 2023-06-24 23:54:31 +05:30
Akash Yadav d31f57b07c fix(deps): migrate to android-tree-sitter v3.0.0 2023-06-11 00:20:02 +05:30
Akash Yadav b950c34fb0 refactor(lookup): use ServiceLoader to load DefaultLookup 2023-04-30 23:26:09 +05:30
Akash Yadav fa8680e873 refactor: replace hardcoded package names in build scripts with BuildConfig property 2023-04-13 22:56:17 +05:30
Akash Yadav 23c30eeaeb fix(lsp/java): empty imports allows classes from same package to be imported with completion items 2023-04-09 19:22:58 +05:30
Akash Yadav f150f4f9ab feat(lsp/java): add top-level snippets 2023-04-04 22:07:41 +05:30
Akash Yadav 0ea7b40fc0 feat(lsp/java): add snippets for creating comments 2023-04-04 21:18:45 +05:30
Akash Yadav 04ffc747a7 fix(lsp/java): update snippet for Java constructor 2023-04-02 11:52:51 +05:30
Akash Yadav 2c130116b5 fix(lsp/java): remove params from method snippets 2023-04-01 18:40:37 +05:30
Akash Yadav 402c3f6db6 tests(fix): FileManager does not receive events 2023-04-01 00:13:21 +05:30
Akash Yadav a89e25680b tests: fix build issues 2023-03-31 23:34:33 +05:30
Akash Yadav f0ac4e8409 refactor(lsp/java): remove unnecessary methods for snippet completion 2023-03-31 22:49:59 +05:30
Akash Yadav 4728bf7d0b feat(lsp/java): add more snippets 2023-03-31 22:41:11 +05:30
Akash Yadav b8b17c2c39 feat: read snippets from JSON files stored in assets 2023-03-31 22:17:37 +05:30
Akash Yadav fd4ce13724 fix(lsp/java): invalid indentation in snippets 2023-03-31 18:22:57 +05:30
Akash Yadav 80f74d0d27 fix(lsp/java): remove 'label' from JavaSnippet 2023-03-31 17:52:04 +05:30
Akash Yadav 70b05f23ca fix(editor): tab in symbol input does not shift snippet to next tab stop 2023-03-31 17:47:51 +05:30
Akash Yadav 5be28d078e feat(lsp/java): add basic snippet support for Java 2023-03-31 17:37:48 +05:30
Akash Yadav e8e203f548 refactor: rename CompletionItem.kind to avoid conflict with editor's CompletionItem.kind 2023-03-31 13:31:01 +05:30
Akash Yadav 81df6d29db build: include EventBusAnnotationProcessor locally 2023-03-30 23:49:17 +05:30
Akash Yadav 233cb876e7 fix(lsp/java): 'Create missing method' unable to create methods outside of current file
This happens becase FindMethodCallAt does not initialize properties related to the found method.
2023-03-29 17:45:14 +05:30