Repository navigation
Commit a308f24
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 4d3cdc7 commit a308f24
18 files changed
Lines changed: 3483 additions & 107 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 | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 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