简体   繁体   中英

Android Studio - JavaDoc comments not generating

I have one problem with the comments in Android Studio. My template file (File Header) Is like this:

/**
 * Created by ${USER} on ${DATE}.
 */

When I create new class, or Interface my comment header gets automatically generated, and this works.

But when I generate: activity, fragment, application, services, the comment does not generate. I really do not know where is the problem.

Here is the Activity template description. But when I create new Activity, the comment does not appear, and every time I need to retype it.

package ${PACKAGE_NAME};

import android.app.Activity;
import android.os.Bundle;

#parse("File Header.java")
public class ${NAME} extends Activity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }
}

Thanks!

To generate comments type /** above the method name and press enter. You can also use a tool under Android Studio menu:

Tools > Generate JavaDoc

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM