Monday, February 21, 2011

Can eclipse prevent you from using particular classes?

For example,

  1. I don't want to use org.testng.v6.Maps, (I want com.google.common.collect.Maps)
  2. I don't want to use org.hibernate.mapping.List, (I want java.util.List like everyone else!)

Is there a way to tell Eclipse not to suggest these in the autocomplete box?

From stackoverflow
  • Re-arrange your dependencies in the library path according to the order you want them to be.

    • Right click on project > Properties
    • Java Build Path
    • Order and Export tab

    This should give priority to the dependencies you do prefer. (Although on second thought I am not sure this is reflected in the auto-complete boxes.)

  • Yup - I have exactly this problem at work for a few classes too.

    Preferences -> Java -> Appearance -> Type Filters.

0 comments:

Post a Comment