"Add on demand static import" doesn't work

Answered

I've got the following problem regarding static import.

If I try to import anything standard, like Math, static import works:

But if I try to import anything from my own classes, something goes wrong.

Static import is unavailable. Is this a bug or something is wrong with IDEA's settings?

0
3 comments
Avatar
Permanently deleted user

The problem happens in both Community Edition 2016.2.5 and Ultimate Edition 2016.2.4

0

You can't import from the default package, make sure your enum is in some package: http://stackoverflow.com/questions/2193226/how-to-import-a-class-from-default-package.

Is that the case of your problem?

1
Avatar
Permanently deleted user

>> you can't import from the default package, make sure your enum is in some package

Thanks, it helped. I didn't know that.

0

Please sign in to leave a comment.