INTRODUCTION
The aim of this post is to share some of the useful tips for Eclipse IDE. Hope it can be helpful during development of your project.
1. how to increase eclipse console size
- Go to Preferences
- Select Console on Run/Debug
- Enter the value 1000000 for 'Console buffer size'
- Click Apply & Ok.
- Now you can see more logs in the console.
2. how to create java code templates in eclipse
Consider I would like to add my name, Ranjith Sekar, as an author of the java file and the current date is the date of creation of the file.
- Go to Preferences in Eclipse
- Select Java->Code Style->Code Templates
- Expand the Code and select 'New Java File'
- The default would be as below
${filecomment}
${package_declaration}
${typecomment}
${type_declaration}
|
- Click Edit and Enter as below
${filecomment}
${package_declaration}
/**
* @author Ranjith Sekar(java2ranjith@gmail.com)
* @since ${date}
*/
${typecomment}
${type_declaration}
|
- Click Ok
- Create a new Java file called MyNewClass.java
- Your class would be created as below
package java2ranjith.thiskeyword;
/**
* @author Ranjith Sekar(java2ranjith@gmail.com)
* @since Jun 26, 2014
*/
public class MyJavaClass {
}
|
3. how to filter .class files in eclipse file search
- Select your project in eclipse and right click and select Properties.
- Go to Resource->Resource Filters
- Click Add
- Select 'Exclude All' in Filter Type.
- Select 'All Children' in Apply to
- Type *.class into the File and Folder Attributes (Name - Matches) and click OK.
- The Project will be rebuilt automatically.
Now try to search any java file where you couldn't find any .class file of those.