Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Eclipse – Java – Auto Commenting (Alt-Shift-J) just adds blank comments

I am trying to add comments to my code. When I highlight a function and press Alt-Shift-J, it just adds three blank lines of commenting:

/**      
 *   
 */     
 protected void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
        System.out.println("In Gateway doGet...");
        this.doRequest("GET", request, response);   }

NOTE – this is a screenshot of what my preferences looks like:
enter image description here

The "${tags} do nothing, but I put in a string for "Title" and it still does nothing. Can someone help me out please?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

I am assuming you are extending HttpServletRequest since your doGet method is defined there and you are therefore overriding that method.

Since you are overriding a method, you need to select Overriding methods in that menu and then enter your comment:

enter image description here

With that, Eclipse will fill in the comment.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading