facebook

Advanced Angular/TS class+files rename

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

    Fedor Losev
    Participant

    The TS class rename feature in WebClipse/AngularIDE is quite handy.

    Unfortunately, the awkward convention selected by Angular almost always involves several files with names different from the class name, e.g. component MyClass has my-class.component.ts, my-class.component.spec.ts my-class.component.html and my-class.component.css|scss.

    In most cases the file has a single exported class and has at least two lowercase/dash files (for the class and for the spec).

    Renaming these classes is an extreme pain for fast-paced development and rename feature does not help a lot here. The Rename command just renames the class and references to the class, but files and imports stay the same and must be fixed manually.

    CLI rename https://github.com/angular/angular-cli/issues/900 goes nowhere, despite rename refactoring being daily development routine.

    Even a basic rename wizard with an optional rename of files with matching lowcase/dash names and fixing imports of these will be just awesome (and make AngularIDE the only affordable IDE supporting it for now).

    #520600 Reply

    support-piotr
    Participant

    Hi Fedor,

    Thank you for your request. We are currently working on improving refactoring capabilities of our TS support. We will be gradually adding following functionality:
    – inline refactoring within TS file without opening a wizard dialog (done)
    – renaming of import statements on file rename (in progress)
    – renaming of associated Angular files (css, htmls, etc.) when renaming file
    – renaming file and associated files when renaming class
    – renaming identifiers in Angular templates.

    Best regards,
    Piotr Tomiak

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Advanced Angular/TS class+files rename

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