facebook

Code completion changed from version 4

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #268277 Reply

    Amos
    Member

    My apologies if it’s been posted already; I did a search for “code completion” related bug reports but only found ones specific to JSPs/taglibs/etc.

    Since the upgrade from version 4 to 5, code completion keeps inserting brackets even when they’re there already. For instance, if I have

    someObject.aMethod();

    in a Java class, double-click on “aMethod” (without the brackets), begin typing “ano” and hit Ctrl+Space to activate code completion, then complete with the method “anotherMethod”, I’ll end up with the text

    someObject.anotherMethod()();

    i.e. double sets of brackets. This used to work in previous versions, i.e. it would insert the brackets only if they weren’t already there, regardless of whether they were part of the selection.

    The bug where code completion in Java code within JSPs always overwrites, regardless of the preference setting Java > Editor > Content Assist > Insertion > Completion inserts/overwrites, is still present in version 5.

    If it makes a difference, I’ve turned “Fill argument names on completion” off (I found it annoying, personally).

    Cheers,

    Amos

    #268319 Reply

    Riyad Kalla
    Member

    I did a search for “code completion” related bug reports but only found ones specific to JSPs/taglibs/etc.

    That’s because there are no bugs, it’s perfect! 🙂

    The bug where code completion in Java code within JSPs always overwrites, regardless of the preference setting Java > Editor > Content Assist > Insertion > Completion inserts/overwrites, is still present in version 5.

    The JSP editor doesn’t honor this setting yet, but it should.

    i.e. double sets of brackets. This used to work in previous versions, i.e. it would insert the brackets only if they weren’t already there, regardless of whether they were part of the selection.

    Which version? Honestly this is the behavior I’ve always experienced but I don’t dabble much with my settings. You mentioned turning off fill-argument-names… did that help?

    #268381 Reply

    Amos
    Member

    @support-rkalla wrote:

    Which version? Honestly this is the behavior I’ve always experienced but I don’t dabble much with my settings. You mentioned turning off fill-argument-names… did that help?

    This is in Build id: 20070302-5.1.1-GA, a clean install from the all-in-one bit, with settings imported from version 4.1.1.

    When setting it to fill argument names, it does the same thing (i.e. leaving the double brackets), only it pre-selects the first argument’s default name so you can overtype it. The thing that bugs me about that setting is that if you auto-complete a method with multiple arguments, it will pre-select the first argument but won’t skip to the second when you type a comma, so you’re forced to manually move the cursor around to select and overtype the second default argument name. So turning off that setting only helped with that problem, it didn’t change the double-bracket-bug.

    If I understand you correctly, Riyad, you don’t experience this behaviour? If so, is there a later build I can install where this doesn’t happen? Or should I try a clean install without importing old settings and see if it happens there?

    #268398 Reply

    Riyad Kalla
    Member

    Ahh sorry, to clarify I have *always* experienced this issue in the default JDT Java editor… I’ll see if there is a bug for it though and if there isn’t one I’ll file it. I agree, it’s not intuitive.

    #268434 Reply

    Amos
    Member

    Thanks for that, much appreciated. 🙂

    #268444 Reply

    Amos
    Member

    Funnily enough, I just noticed that it still works in JSPs the way it used to work in Java editors, i.e. brackets are only added when necessary 😉

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Code completion changed from version 4

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