Java – Eclipse: is there any way to force import in organize import to resolve ambiguity?

I use eclipse. Com on Android projects I updated to the lion, the problem began to appear... Try something for a few hours, and there was no result

This is the problem:

There are dozens of files in my project. Com stuff. morestuff. I want crtl to transfer my project, so every import is solved However, on every file, eclipse asks me to resolve the ambiguity

Therefore, I want to impose the first choice on eclipse

Some clues

1 - I try to make rules in the build path, but it's powerful For example, if I exclude Android from the build path R. Then it won't appear in the options, but I can't use it explicitly in my code

2 – manual operation – > long time

3 – I tried to configure the organization import tool, but failed

Thank you for your answer!

Solution

You can use 'Preferences > java > appearance > input filter' Create filters for types you don't want to use For example If you are interested in Java The types in AWT package are not interested. You can create filters for the whole package or filter out various types

The filtered types are then hidden from the UI, i.e. they are not used in the organization import or displayed in the open type dialog box Note that the compiler can still see these types, unlike fiddling with the build path, which hides the types in the compiler

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>