Static imports with Eclipse

Static imports with Eclipse


Posted in : Java Posted on : November 23, 2010 at 7:12 PM Comments : [ 0 ]

This section contains the detail about how to configure Static imports with Eclipse

Static imports with Eclipse

  • JUnit uses a lot of static methods and Eclipse cannot automatically import  static imports. You can make the JUnit test methods available via the content assists.

  • Open the Preferences via Window -> Preferences and select Java >Editor > Content Assist > Favorites. Add the methods you need via "New Member".For example this makes the assertTrue, assertFalse and assertEquals method available.

         

 

After adding these method to content assist, Eclipse can automatically import  static imports(which are added).

Go to Topic «PreviousHomeNext»

Your Comment:


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

 
Tutorial Topics