-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scripteditor codeassist and code completion #54
Conversation
I will do a quick rebase onto master to make sure, then this can be merged, too. |
Needed for the upcoming autocompletion support in the script editor. Signed-off-by: squareys <[email protected]>
Signed-off-by: squareys <[email protected]>
Add `LanguageSupportPlugin` which is a ScijavaPlugin for `LanguageSupport` and the corresponding `LanguageSupportService` which is currently created manually in `EditorPane`. Whenever the `ScriptLanguage` for the `EditorPane` is set, corresponding language support will be installed on it, uninstalling existing. Signed-off-by: squareys <[email protected]>
Ah, much better :) You may have a look at this, it's ready from my side. |
@Squareys this is really cool stuff. I think how the API is actually being used needs a bit of tweaking though:
As a side note - is it possible to install the language support on the tab instead of the pane..? Does switching tabs cause |
The Service is not added to the context. (Or is it... automatically?)
Well, see above.
Alright, your suggestion makes sense, will do so tomorrow (German time, therefore in 12-14 hrs)
You mean install it on the pane but from the outside? Theoretically yes.
I do not believe so. It should at least only be called, when:
|
Yes, it is. You wrote |
Awesome! I will change the code respectively.
Alright, will do. |
They all get released simultaneously which means having a single property to change makes updating easier. Signed-off-by: squareys <[email protected]>
Service is added to the context automatically and will be injected when the Parameter annotation is present. Also: Remove language cache for uninstalling. Signed-off-by: squareys <[email protected]>
... for matching them to ScriptLanguages. Signed-off-by: squareys <[email protected]>
Better matches the return type. Signed-off-by: squareys <[email protected]>
…gins Signed-off-by: squareys <[email protected]>
@ctrueden Alright, I think I addressed all the issues mentioned above. |
Well, for some reason, AutoCompletion is not working anymore. I will need to investigate that first, before this can be merged. |
Signed-off-by: squareys <[email protected]>
Alright, done! This may be merged. |
Hi @Squareys . This is looking really good. The main problem I'm finding is that it seems like an uncaught exception is thrown by code completion parser when there's a compilation error. It's redundant because the error is already displayed in the editor.. so we don't want the stack trace to pop up in the console window. Is there a way to suppress these You can see this easily by dropping this into Fiji and opening any Java template. It currently is inserting |
OK, fixed the |
bleh.. so there is a catch block guarding these exceptions, it's being caught earlier here and printed. |
Alright @Squareys ... I just commented out the Java language plugin for now, until the stacktrace printing is resolved upstream. Everything on your end looked good so I merged. Thanks again for your work on this! |
@hinerm You're welcome, thank you, too! :) |
Hello everybody!
This adds codecompletion/-assist to the script editor using fifesoft
Autocomplete
andRSTALanguageSupport
. This branch is based on #51, which is needed to be merged first.Support for Autocompletion can be extend by extending the
LanguageSupportPlugin
. The repositoryRSTALanguageSupport
also implements outline trees for java for example, which one could take into consideration for the script editor. (Not implemented in this PR!)For this pullrequest, code assist is implemented for Java and JavaScript.
Have a nice day,
Squareys.