-
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
Complex Completion Proposal #36
base: master
Are you sure you want to change the base?
Conversation
I did some further enhancements which include: MyList < JTextField > x = new MyList < > (); x.get => in completion you will get type JTextField as return type for method get d.) fixed interface parsing, where interface did not contain any declaration (empty interface) eg. I will do some further testing before committing these changes, but looks good. |
Did some further testing and bug fixing. |
I uploaded now the files. I still test and fix if find anything, but now it has a lot of new features, and is almost more usable as the Netbeans code editor :) Later I will write here a review of all features currently supported. Important notice: there are changes in the AutoComplete library, which are needed for this library as well! |
So the feature list of current code stand:
|
Last two enhancement added which was in my mind (further optimization (eg adding method parameter type check, etc) would require a much bigger refactoring):
Now the big question is, when can you review the changes and merge with master branch? Since these modifications make the usability of Java code completion much-much better. I assume it is at least at Netbeans editor level, or even a bit more in some cases (of course some cases also worse). |
One last thing I was missing is working now too: if you are in a method call, pressing Ctrl-P will pop up the tooltip about the method's parameters. If it finds multiple methods with similar signature, it will show multiple popups for each match. This should also work for constructor and super constructor parameters as well. This required some modification in the AutoComplete library. I pushed there the changes separately. It isn't anything which would destroy any other completion, most provider return null or just use the default implementation when calling the getParameterizedCompletions method of CompletionProvider interface. In JavaCompletionProvider this method call returned NULL previously, now I forward this call to the SourceCompletionProvider, which gathers the possible method parameters, and returns it. This way now a nice tooltip is shown with the possible method parameters. Big help when coding. :) |
The last bunch of changes add better support for subclasses (like MyClass.MyInnerClass x = new MyClass.MyInnerClass(); x. => will give proposal for MyInnerClass methods) |
Wow! Works. It very nice! |
Based on venkato's proposal I did the changes on the current master branch. I did also some enhancement to give more precise completions and support more cases (like resolving complex completions in function call, etc.). I updated the ExampleCode java test case for the demo application to reflect the changes.