コード例 #1
0
 /* (non-Javadoc)
  * @see org.aspectj.org.eclipse.jdt.internal.compiler.ast.Javadoc#print(int, java.lang.StringBuffer)
  */
 public StringBuffer print(int indent, StringBuffer output) {
   super.print(indent, output);
   if (this.selectedNode != null) {
     String selectedString = null;
     if (this.selectedNode instanceof JavadocFieldReference) {
       JavadocFieldReference fieldRef = (JavadocFieldReference) this.selectedNode;
       if (fieldRef.methodBinding != null) {
         selectedString = "<SelectOnMethod:"; // $NON-NLS-1$
       } else {
         selectedString = "<SelectOnField:"; // $NON-NLS-1$
       }
     } else if (this.selectedNode instanceof JavadocMessageSend) {
       selectedString = "<SelectOnMethod:"; // $NON-NLS-1$
     } else if (this.selectedNode instanceof JavadocAllocationExpression) {
       selectedString = "<SelectOnConstructor:"; // $NON-NLS-1$
     } else if (this.selectedNode instanceof JavadocSingleNameReference) {
       selectedString = "<SelectOnLocalVariable:"; // $NON-NLS-1$
     } else if (this.selectedNode instanceof JavadocSingleTypeReference) {
       JavadocSingleTypeReference typeRef = (JavadocSingleTypeReference) this.selectedNode;
       if (typeRef.packageBinding == null) {
         selectedString = "<SelectOnType:"; // $NON-NLS-1$
       }
     } else if (this.selectedNode instanceof JavadocQualifiedTypeReference) {
       JavadocQualifiedTypeReference typeRef = (JavadocQualifiedTypeReference) this.selectedNode;
       if (typeRef.packageBinding == null) {
         selectedString = "<SelectOnType:"; // $NON-NLS-1$
       }
     } else {
       selectedString = "<SelectOnType:"; // $NON-NLS-1$
     }
     int pos = output.length() - 3;
     output.replace(pos - 2, pos, selectedString + this.selectedNode + '>');
   }
   return output;
 }
コード例 #2
0
 /*
  * @see ASTVisitor#visit(Javadoc)
  */
 @Override
 public boolean visit(Javadoc node) {
   this.fBuffer.append("/** "); // $NON-NLS-1$
   for (Iterator<TagElement> it = node.tags().iterator(); it.hasNext(); ) {
     ASTNode e = it.next();
     e.accept(this);
   }
   this.fBuffer.append("\n */"); // $NON-NLS-1$
   return false;
 }
コード例 #3
0
  /**
   * Parses a given list of options.
   *
   * @param options the list of options as an array of strings
   * @throws Exception if an option is not supported
   */
  public void setOptions(String[] options) throws Exception {
    super.setOptions(options);

    setProlog(!Utils.getFlag("noprolog", options));
  }