facebook

Incorrect brace added by code completion

  1. CodeMix & Angular IDE
  2.  > 
  3. Webclipse 1.x Help
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #522468 Reply

    Fedor Losev
    Participant
    
    export const environment = {
      production: false,
      name: 'local'
    };
    

    move the caret after the { brace on the first line and press Enter. This will result in an incorrect brace inserted after the line break:

    
    export const environment = {
      
    }
      production: false,
      name: 'local'
    };
    

    There are may cases with similar scope behavior, e.g. if(){.

    The workaround is to press Enter when the caret is on the second line, but it is not convenient.

    • This topic was modified 7 years, 6 months ago by Fedor Losev.
    • This topic was modified 7 years, 6 months ago by Fedor Losev.
    #522521 Reply

    support-tony
    Keymaster

    Fedor,

    I’ve been able to replicate the problem and have raised a bug for the development team to investigate. We’ll let you know when a fix is out. Sorry for the inconvenience.

    #522640 Reply

    Fedor Losev
    Participant

    Note in the frequent case of transforming single line definition to multi line there is no any workaround, we always have to correct the mess after the generator:

    const x = { a: 1 };
    const y = { };

    Result:

    
    const x = { 
      
    }a: 1 };
    const y = {
      
    } };
    

    Expected:

    
    const x = {
      a: 1
    };
    const y = {
    
    };
    
    #522804 Reply

    support-swapna
    Moderator

    Fedor,

    Thank you for the details. I have added them to the bug report and the dev team is looking into it.

    –Swapna
    MyEclipse Support

    #523786 Reply

    andrei-ivanov
    Participant

    Is there a public roadmap somewhere for Webclipse?

    #523902 Reply

    support-swapna
    Moderator

    Andrei,

    Sorry, there is no roadmap page available for Webclipse.

    –Swapna
    MyEclipse Support

    #524723 Reply

    Brian Fernandes
    Moderator

    Andrei / Fedor,

    We’ve put out a prerelease of the 2017 CI 6 release, which addresses the typing issue. To get the pre-release build, please follow the instructions in this thread: https://www.genuitec.com/forums/topic/webclipse-angular-ide-prerelease-stream/

    Do let us know if your issue is fixed by the prerelease stream, so we can ensure the final 2017 CI 6 release correctly addresses your problems.

    #524731 Reply

    andrei-ivanov
    Participant

    Seems to work fine now, thank you ?

    #525173 Reply

    Fedor Losev
    Participant

    Yep, seems fixed.

    #525458 Reply

    Fedor Losev
    Participant

    There is still case if there is no closing brace.

    const x = { a:1

    If caret is positioned before a and ENTER is pressed, this results in

    
    const x = { 
      
    }a:1
    

    Similar frequent case

    let x: Observable<string>;
    x.map( s => s );
    

    If one comes to convert it to scoped body instead of s after =>, the intuition is to put opening brace before s and press ENTER. This results in

    x.map( s => {
      
    }s );
    

    Putting closing brace is a good thing, but moving lambda or member definition after the brace is not handy.

    • This reply was modified 7 years, 5 months ago by Fedor Losev.
    #525556 Reply

    support-piotr
    Participant

    Fedor,

    Thanks for reporting this. We will work on further improvement of auto-addition of braces in the next release – CI7.

Viewing 11 posts - 1 through 11 (of 11 total)
Reply To: Incorrect brace added by code completion

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