コード例 #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;
 }