# Organize imports shortcut misses common imports

**URL:** <https://forum.katalon.com/t/organize-imports-shortcut-misses-common-imports/64655>\
**Category:** Feature Request\
**Tags:** feature-request, tracked, katalon-studio\
**Created:** [April 27, 2022, 11:31pm UTC](https://forum.katalon.com/t/organize-imports-shortcut-misses-common-imports/64655 "2022-04-27T23:31:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sbrod](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/sbrod/32/20464_2.png) [@sbrod](https://forum.katalon.com/u/sbrod)\
**Post date:** [April 27, 2022, 11:31pm UTC](https://forum.katalon.com/t/organize-imports-shortcut-misses-common-imports/64655/1 "2022-04-27T23:31:28Z")

</div>

#### Describe the problem you have.

Organize imports/auto import function does not find common aliases and also doesn’t include findTestObject, findTestCase, etc.

#### Please let us know, how would your work be affected while this request has not been resolved?

I can continue my job, resolving this ticket can boost my performance

#### Describe the feature you’d like or how the current features need to be updated

I’d like the auto import shortcut (ctrl+shift+o) to check for common package aliases, and also to work properly with findTestObject, etc (I realize that latter request is more of a bug report, but the former is more of a feature request). Currently, when you create a new keyword or testcase file, it comes with a bunch of imports provided by default. This includes several aliased packages, such as WebUI (this is the only one I tested, but I assume it’s the same thing with the other ones as well). However, if you try to add this import to a file by using the ctrl+shift+o command, it doesn’t add, presumably because ‘WebUI’ is an alias and not the actual package name.

Since Katalon Studio itself provides these aliases, and they are referred to frequently on these forums, I think the auto import should seek them out and add those imports when used.

The other issue is with the packages with methods like findTestObject or findTestCase (I assume the other find-- methods have the same issue, but I haven’t tested them). Despite not being aliased, these just don’t get imported by the keyboard shortcut.

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [April 28, 2022, 12:34am UTC](https://forum.katalon.com/t/organize-imports-shortcut-misses-common-imports/64655/2 "2022-04-28T00:34:16Z")

</div>

Eclipse support content assist for “import static” by Ctrl+Shift+o as [http://www.eclipseonetips.com/2010/02/01/generate-static-imports-in-eclipse-on-autocomplete/](http://www.eclipseonetips.com/2010/02/01/generate-static-imports-in-eclipse-on-autocomplete/) tells. I tried it but failed. Katalon Studio seems not supporting it. I do not know why.

@duyluong  
@Jass

Can you improve this?

* * *

“ **as** ” is a special keyword of Groovy Language, which allows you to give “an alternative name of your choice”. I think there is no software that can intelligently guess your choice “as”. I think KS would be never be able to guess “as WebUI” by Ctrl+Shift+o. “import FQCN **as** _Name_” is not supported in Eclipse Groovy editor. I am negative that Ctrl+Shift+o will ever have this in future.

The easiest workaround could be creating a blank Test Case “New Test Case” in Katalon Studio GUI, which will have a list of default import statements like:

```auto
import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI

```

You can copy any part of the import statements from it when needed.
