Nils-o-mat
Nils-o-mat

Reputation: 1257

Stop IntelliJ Idea autocompletion from removing qualifying classes

In a project of mine, we use default inner classnames and qualify them by their parent class like so:

Customer.Row
Product.Row
Supplier.Row

If I try to add a call to a row's method using autocompletion, IntelliJ will strip away the qualifying class and auto-import the Row, which I don't want to happen:

import what.ever.Supplier.Row;
...
Row.doSomething();

I just want

Supplier.Row.doSomething();

Is there a way to prevent this behaviour?

Upvotes: 1

Views: 224

Answers (1)

Ludvig W
Ludvig W

Reputation: 824

I can recommend two things.

  • Modify your settings in Preferences > Editor > General > Auto Import
  • Start with the parent class such as: Supplier.Row. then let it auto complete.

Upvotes: 1

Related Questions