protected void addComment(JavaElement field, String comment) {
   StringBuilder sb = new StringBuilder();
   field.addJavaDocLine("/**");
   sb.append(" * ");
   comment =
       comment.replaceAll(
           OutputUtilities.lineSeparator, "<br>" + OutputUtilities.lineSeparator + "\t * ");
   sb.append(comment);
   field.addJavaDocLine(sb.toString());
   field.addJavaDocLine(" */");
 }
 /**
  * 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());
 }
Esempio n. 3
0
 /**
  * 删除标记
  *
  * @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());
 }