facebook

Organize imports for TS

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

    Fedor Losev
    Participant

    It will be very helpful if we’ll have Organize Imports CTRL+Shift+O similar to Java one with missing import suggestions. Now fixing multiple missing imports one by one is a tedious task.

    #545347 Reply

    Brian Fernandes
    Moderator

    Fedor,

    I suppose you would use this action to remove unused imports as well? Are there any additional features you would find useful/important? (Sorting, grouping, etc.)

    #545482 Reply

    Fedor Losev
    Participant

    Of course, remove unused imports would be extremely nice to have, but it is less critical than adding imports (opposed to adding import, cleaning up imports can be done manually once in a while and it doesn’t produce a lot of friction in ongoing development).

    Note, with outstanding huge TS problems of implicit imports/exports and such complex rules, full support for auto remove imports may be not feasible (e.g. https://github.com/Microsoft/TypeScript/issues/9944). May be it should be controlled by a setting at least on a project level (there are no such issues if one disables d.ts for a module so primitive remove unused can be applied safely, one may want it ON in some projects but not in others).

    If Webclipse can also support an additional mode of adding required imports and removing unused imports taking in account implicitly re-exported types and compiler settings, it would very helpful, but probably this is very complex to solve, given that even compiler team still can’t figure it out.

    Controllable sorting and grouping of course would be nice to have too. Again, for me it sounds less critical as it does not introduce a lot of development friction, but for long term I think an IDE should have all of these.

    I think with such complex rules, issues, * imports, JS imports it sounds really complex and long term task to implement full grade organize with removal and expansion.

    Personally, I will be happy with something even simple but now, just something that automates going to missing import and fixing. Now there is even no common quick fix for this, one has to do one by one. CTRL+O for now may just apply all missing import quick fixes for file.

    #545641 Reply

    Brian Fernandes
    Moderator

    Fedor,

    As always, thank you for your detailed notes and thoughts – yes, adding the missing imports would clearly be the most useful feature that will be implemented first.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Organize imports for TS

This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.

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