Repository navigation
Commit 00de65d
Provide code completion
Complete code in appose-python scripts in two layers:
* tree-sitter, in process: names in scope, script parameters, task,
builtins and keywords, instantly and without any Python.
* Jedi, in a small tooling environment of its own (built in the
background on first use), analyzing scripts against their own
environment's interpreter: members, module contents, signatures and
documentation. Answers come without blocking typing, as updates;
documentation is fetched on demand.
Completion never builds a script's environment or disturbs its worker:
environments built earlier (in any session) are found read-only.
Dependencies a script declares but its environment lacks are installed
for completion only, into a separate overlay directory, once they stop
changing. Signature help comes from Jedi.
Also extract the engine's environment resolution into ScriptEnvironment,
shared with completion, and add ResidentWorkerService#find, a lookup
that never replaces a running worker.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 407f10a commit 00de65d
18 files changed
Lines changed: 3511 additions & 116 deletions
File tree
- src
- main
- java/org/scijava/plugins/scripting/appose/python
- _internal
- completion
- resources/org/scijava/plugins/scripting/appose/python/completion
- test/java/org/scijava/plugins/scripting/appose/python
- _internal
- completion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
97 | 101 | | |
98 | 102 | | |
99 | 103 | | |
| |||
106 | 110 | | |
107 | 111 | | |
108 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
109 | 118 | | |
110 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
111 | 131 | | |
112 | 132 | | |
113 | 133 | | |
| |||
0 commit comments