facebook

Feature request: take imports/packages into account

  1. Copilot4Eclipse – GitHub Copilot on Eclipse
  2.  > 
  3. General Discussion
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #700899 Reply

    Olivier Juin
    Participant

    Issue:
    With the current version, if I use one of my own class (Foo), and I start to write:
    new Foo().ac
    If a ‘Foo.java’ tab is open in Eclipse, Copilot will come up with a relevant ending (maybe new Foo().accept())
    If no ‘Foo.java’ tab is open, Copilot will use its imagination (e.g., new Foo().activate() even if Foo has no activate() method).
    This is very disturbing, even if this is the standard Copilot behavior.

    Solution 1 (light)
    Copilot4Eclipse has a preference where a list of packages is declared. The source of these packages is available (jar or .java files).
    Whenever a non-* import declared in the current java file starts with a package from this list, Copilot4Eclipse acts as if the file is opened in another tab.

    Solution 2 (maybe too heavy for Copilot)
    Copilot4Eclipse has a preference where a list of packages is declared. The source of these packages is available (jar or .java files).
    Copilot4Eclipse acts as if all sources from these packages are always opened in tabs.

    Solution 2 would allow much better predictions than Solution 1, but would maybe put a lot of burden on Copilot.

    I reckon I made this issue very java-centric, but this issue is applicable for all languages.

    #700905 Reply

    wayne
    Moderator

    Oliveier,
    Thanks for your suggestions. I’ve opened an enhancement in our tracking system with your comments.
    Regards,

    Wayne
    Copilot4Eclipse Team

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Feature request: take imports/packages into account

You must be logged in to post in the forum log in