This is like this, I am in the project, I use a lot of as
, used to alias for the type of import. But I found that in Idea, it is not very friendly for aliahe automatic filling.
For example, I wrote this code:
import xxx.xxx.xxx.databinding.ActivityLoginBinding as Binding
class LoginActivity : BaseActivity<Binding>()
{
override fun Binding.initData(savedInstanceState: Bundle?)
{
}
}
But in fact, IDEA automatically completes this code:
import xxx.xxx.xxx.databinding.ActivityLoginBinding as Binding
class LoginActivity : BaseActivity<Binding>()
{
// See here, there is no use of alias `binding.
override fun xxx.xxx.xxx.databinding.ActivityLoginBinding.initData(savedInstanceState: Bundle?)
{
}
}
Obviously, in this class, IDEA should automatically use my alias, not a real class name.