Package org.aspectj.org.eclipse.jdt.core

Examples of org.aspectj.org.eclipse.jdt.core.JavaModelException


    return info;
  } catch (ClassFormatException e) {
    //e.printStackTrace();
    return null;
  } catch (java.io.IOException e) {
    throw new JavaModelException(e, IJavaModelStatusConstants.IO_EXCEPTION);
  }
}
View Full Code Here


              report(match);
            }
          } catch (JavaModelException e) {
            throw e;
          } catch (CoreException e) {
            throw new JavaModelException(e);
          }
        }
      }
    }
  }
View Full Code Here

}
/**
* @see org.aspectj.org.eclipse.jdt.core.IPackageFragment
*/
public ICompilationUnit createCompilationUnit(String cuName, String contents, boolean force, IProgressMonitor monitor) throws JavaModelException {
  throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.READ_ONLY, this));
}
View Full Code Here

          collection.add(r);
          collectAllSubfolders((IFolder)r, collection);
        }
      } 
    } catch (CoreException e) {
      throw new JavaModelException(e);
    }
  }
View Full Code Here

public String getAttachedJavadoc(IProgressMonitor monitor) throws JavaModelException {
  String contents = ((BinaryType) this.getDeclaringType()).getJavadocContents(monitor);
  if (contents == null) return null;
  int indexAnchor = contents.indexOf(
      JavadocConstants.ANCHOR_PREFIX_START + this.getElementName() + JavadocConstants.ANCHOR_PREFIX_END);
  if (indexAnchor == -1) throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.UNKNOWN_JAVADOC_FORMAT, this));
  int indexOfEndLink = contents.indexOf(JavadocConstants.ANCHOR_SUFFIX, indexAnchor);
  if (indexOfEndLink == -1) throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.UNKNOWN_JAVADOC_FORMAT, this));
  int indexOfNextField = contents.indexOf(JavadocConstants.ANCHOR_PREFIX_START, indexOfEndLink);
  int indexOfBottom = contents.indexOf(JavadocConstants.CONSTRUCTOR_DETAIL, indexOfEndLink);
  if (indexOfBottom == -1) {
    indexOfBottom = contents.indexOf(JavadocConstants.METHOD_DETAIL, indexOfEndLink);
    if (indexOfBottom == -1) {
      indexOfBottom = contents.indexOf(JavadocConstants.END_OF_CLASS_DATA, indexOfEndLink);
    }
  }
  indexOfNextField= Math.min(indexOfNextField, indexOfBottom);
  if (indexOfNextField == -1) throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.UNKNOWN_JAVADOC_FORMAT, this));
  return contents.substring(indexOfEndLink + JavadocConstants.ANCHOR_SUFFIX_LENGTH, indexOfNextField);
}
View Full Code Here

  protected void apply(ASTRewrite rewriter, IDocument document, Map options) throws JavaModelException {
    TextEdit edits = rewriter.rewriteAST(document, options);
     try {
       edits.apply(document);
     } catch (BadLocationException e) {
       throw new JavaModelException(e, IJavaModelStatusConstants.INVALID_CONTENTS);
     }
  }
View Full Code Here

  super(parentElement, source, force);
}
protected ASTNode generateElementAST(ASTRewrite rewriter, IDocument document, ICompilationUnit cu) throws JavaModelException {
  ASTNode node = super.generateElementAST(rewriter, document, cu);
  if (!(node instanceof AbstractTypeDeclaration))
    throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.INVALID_CONTENTS));
  return node;
}
View Full Code Here

  return this.parameterTypes;
}
protected ASTNode generateElementAST(ASTRewrite rewriter, IDocument document, ICompilationUnit cu) throws JavaModelException {
  ASTNode node = super.generateElementAST(rewriter, document, cu);
  if (node.getNodeType() != ASTNode.METHOD_DECLARATION)
    throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.INVALID_CONTENTS));
  return node;
}
View Full Code Here

TOP

Related Classes of org.aspectj.org.eclipse.jdt.core.JavaModelException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.