Skip to content

Conversation

@venkato
Copy link

@venkato venkato commented Oct 5, 2016

Add assist for method result, like :
var1.getSomething1().getSomething2
proposals here ^

@kovadam69
Copy link

Hi!
Would it be possible to merge this to the main branch? It would be really nice to have code completion suggestions on member methods/fields.
Thanks!

@bobbylight
Copy link
Owner

This pull request has a few issues to resolve before I can look at it:

  • Merge conflicts
  • Use of sun.reflect.* (and any other non-public APIs)
  • Eliminate diffs triggered only by whitespace or newline differences.

I'll try to add checkstyle/editorconfig support to minimize issues around the third bullet point.

@kovadam69
Copy link

I see...
the sun.reflect can be eliminated since it is only used for the logger configuration if I'm not mistaken something, so it is not really needed, but I will try to do the same changes (when I will have some time) on the current codebase without using any non-public API-s to see that
a.) it is working
b.) can be merged with current 2.6.0 RSTALanguageSupport
Would be great if we could put this into 2.6.1

@kovadam69
Copy link

Hi!
I managed to recreate this on the newest RSTALanguageSupport codebase. I did some fix regarding the changes "venkato" did, since some cases were not working properly (eg. ExampleCode.this. or this. or ExampleCode. => only static members should be listed, etc.). I also enchanced the Open method proposed by "venkato" with a MemberClickedListener, which can be added to the JavaLinkGenerator and has following methods:

  • openClass: when user ctrl-clicks on an external class
  • gotoMethodInClass: when user ctrl-clicks on a method belonging to an external class
  • gotoFieldInClass: when user ctrl-clicks on a field belonging to an external class
  • gotoInnerClass: when user ctrl-clicks a class which is inner class in the currently edited java file
  • gotoMethod: when user ctrl-clicks a method which is defined inside the currently edited java file (main class or inner class)
  • gotoField: when user ctrl-clicks a method which is defined inside the currently edited java file (main class or inner class)
  • gotoLocalVar: when user ctrl-clicks a variable which is defined in the current method
  • gotoMethodParameter: when user ctrl-clicks a variable which is defined in the current method's signature
    A default listener implementation is added when installing java parser, which does the in-class navigation, but does nothing for external-class navigation. Like said, this can be overridden with an external Listener, where user can potentially open source code for external classes, etc.
    The code completion is also working quite well.
    I did not use the logger introduces by "venkato", I replaced them by System.out. No internal APIs are used, and I hopefully managed to keep the code style as it was. Since I used the latest code, I hope there won't be any merge conflicts.
    One question remains: how can I send you my changes to review and potentially include into RSTALanguageSupport?
    Thanks!

@venkato
Copy link
Author

venkato commented Aug 20, 2017

See #36

@venkato venkato closed this Aug 20, 2017
@venkato venkato deleted the propose1 branch October 22, 2017 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants