A simple solution to understand memory consumption is the variable view in Eclipse Helios which has a new column called Instance Count. It allows us to see the number of active instances of any object.
When you are debugging, some times, you would want to change the value of a variable. For example a variable is null and you know you are going to encounter the dreaded NullPointerException. If you could just set the correct value to it you can proceed with the debugging and worry about the null check later.
Eclipse tip: Conditional breakpoints
Eclipse provides a very nice debugging environment. One of the features I use often is conditional breakpoints. It is essentially breakpoints which suspend code execution only when a specified condition is satisfied. For example you want to set a breakpoint inside a loop but only are interested when a certain variable is null. To specify a condition select ‘Breakpoint Properties…‘ in the context menu of the breakpoint.
Eclipse tip: Type Filters
Eclipse provides a lot of useful assistance to developers like the code completion, finding types or quick fix proposals. But if you have a large number of libraries in your projects these assistance can be a bit overwhelming. For instance you might be developing a web application but you might see Swing or AWT types in code assists. Eclipse provides a solution for this problem with Type Filters. Go to Window>Preference>Java>Type Filters and add the packages you do not want to see. You can add javax.swing.* and java.awt.*.
If you need any urgent assistance on Eclipse_Tips_Tricks_To_Use_In_Java, kindly email your requirement to us at : info@javagenious.com or Contact-an-Expert. Our experts will try their best to solve your problem.
You can also subscribe to our newsletters on Eclipse_Tips_Tricks_To_Use_In_Java, to receive updates on Eclipse_Tips_Tricks_To_Use_In_Java,via email.Enter you email below: