org.mybatis.generator.api.dom.java.JavaElement Java Examples

The following examples show how to use org.mybatis.generator.api.dom.java.JavaElement. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DefaultCommentGenerator.java    From mapper-generator-javafx with Apache License 2.0 6 votes vote down vote up
/**
 * This method adds the custom javadoc tag for. You may do nothing if you do not wish to include the Javadoc tag -
 * however, if you do not include the Javadoc tag then the Java merge capability of the eclipse plugin will break.
 *
 * @param javaElement
 *            the java element
 * @param markAsDoNotDelete
 *            the mark as do not delete
 */
protected void addJavadocTag(JavaElement javaElement,
        boolean markAsDoNotDelete) {
    javaElement.addJavaDocLine(" *");
    StringBuilder sb = new StringBuilder();
    sb.append(" * ");
    if (markAsDoNotDelete) {
        sb.append(" do_not_delete_during_merge");
    }
    String s = getDateString();
    if (s != null) {
        sb.append(' ');
        sb.append(s);
    }
    javaElement.addJavaDocLine(sb.toString());
}
 
Example #2
Source File: DefaultCommentGenerator.java    From mybatis-generator-plus with Apache License 2.0 6 votes vote down vote up
/**
 * This method adds the custom javadoc tag for. You may do nothing if you do
 * not wish to include the Javadoc tag - however, if you do not include the
 * Javadoc tag then the Java merge capability of the eclipse plugin will
 * break.
 * 
 * @param javaElement
 *            the java element
 */
protected void addJavadocTag(JavaElement javaElement,
        boolean markAsDoNotDelete) {
    javaElement.addJavaDocLine(" *"); //$NON-NLS-1$
    StringBuilder sb = new StringBuilder();
    sb.append(" * "); //$NON-NLS-1$
    sb.append(MergeConstants.NEW_ELEMENT_TAG);
    if (markAsDoNotDelete) {
        sb.append(" do_not_delete_during_merge"); //$NON-NLS-1$
    }
    String s = getDateString();
    if (s != null) {
        sb.append(' ');
        sb.append(s);
    }
    javaElement.addJavaDocLine(sb.toString());
}
 
Example #3
Source File: MyMapperCommentGenerator.java    From jvue-admin with MIT License 5 votes vote down vote up
/**
 * 删除标记
 *
 * @param javaElement
 * @param markAsDoNotDelete
 */
protected void addJavadocTag(JavaElement javaElement, boolean markAsDoNotDelete) {
    StringBuilder sb = new StringBuilder();
    sb.append(" * ");
    sb.append(MergeConstants.NEW_ELEMENT_TAG);
    if (markAsDoNotDelete) {
        sb.append(" do_not_delete_during_merge");
    }
    javaElement.addJavaDocLine(sb.toString());
}