It should be possible to optimize the imports

feature-request

#1

Reporting against Webtestit version 0.24.0

It would be better if user can optimize the imports through IDE itself.
In current version there is no option to optimize the imports.

image


#2

Hi @janesh!
Could you please be more specific about this, what are you exact requirements when it comes to handling the imports ? Thank you for your feedback!


#3

As a user I would like to remove the unused import statements and keep only the used/required import statements and keep the code well organized.

This feature is available with the standard IDEs. e.g Eclipse , IntelliJ IDEA etc

image


#4

Hi @janesh,

optimize does a few things as far as I remember. One of them being to remove “unused imports” right? Would you see that specific feature as the most important one or any additional part as well? As an example, I’m not sure where but I think I remember an IDE that when optimizing did also resorting of the import lines, which frankly felt a bit weird.


#5

So we learn something new everyday :wink:

If you have an active issue with your imports, our editor will actually offer that behavior via the quick-fix menu.

Take a look at the attached video. What we’ll try to look into is to pull out this action into our F1 menu. So than you would press F1 -> start typing “organize” -> and see the action to choose.


#6

Added the “Organize imports” option to the F1 action menu with the release v0.25.0


closed #7