Menu

Showing posts with label Eclipse. Show all posts
Showing posts with label Eclipse. Show all posts

.content.xml files are not visible in Eclipse project explorer

While working in Eclipse with Adobe Experience Manager (AEM) code, .content.xml file which is the content file of node structure is not visible in Eclipse project explorer.

This is happening because of the filtration of the file in the project explorer.

To view the .content.xml or any other hidden file which starts with .[dot], remove the following filter from project explorer.


Open Eclipse >> open project explorer >> click on view option >> Filters and Customization

How to open Filters and Customization option in Eclispe.


A new popup window will appear as below. From here, we need to de-filter the .resources option.

Goto tab Pre-set filters >> uncheck the .*resources >> OK

Eclipse filters and customization option

Remove all unused imports in one go using Eclipse IDE

Many times we face problem where some unwanted imports get added in the our program file. It is very irritating and time consuming task to remove those unused imports one by one, to make our code clear and readable.
But we do have a shortcut for this, just in a millisecond our Eclipse IDE done this job for us. Eclipse provide a shortcut CTRL + SHIFT + O, this shortcut command will remove all those unused imports from your code file. 

To do so, click anywhere in your java file and press CTRL+SHIFT+O. After using this shortcut command Eclipse will remove all the unused import from your java file. Below are the screen shots:

Before:

Unused imports in a java file
unused imports in a Java file
After using the shortcut CTRL+SHIFT+O, your java file will look like this.

After

How to remove unused imports
No unused imports