Example usage for org.eclipse.jdt.core.dom Javadoc isDocComment

List of usage examples for org.eclipse.jdt.core.dom Javadoc isDocComment

Introduction

In this page you can find the example usage for org.eclipse.jdt.core.dom Javadoc isDocComment.

Prototype

public final boolean isDocComment() 

Source Link

Document

Returns whether this comment is a doc comment (Javadoc).

Usage

From source file:com.tsc9526.monalisa.plugin.eclipse.tools.PluginHelper.java

License:Open Source License

public static String getJavadocField(Javadoc doc, String property) {
    String value = null;/*from   w  w w. ja  v a2  s  . c o m*/
    if (doc != null && doc.isDocComment()) {
        for (Object o : doc.tags()) {
            TagElement tag = (TagElement) o;
            String tn = tag.getTagName();
            if (property.equals(tn)) {
                value = tag.toString();
                int p = value.indexOf(property);
                value = value.substring(p + property.length()).trim();
                break;
            }
        }
    }
    return value;
}