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

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


    rewriter.remove(node, null);
     TextEdit edits = rewriter.rewriteAST(document, null);
     try {
       edits.apply(document);
     } catch (BadLocationException e) {
       throw new JavaModelException(e, IJavaModelStatusConstants.INVALID_CONTENTS);
     }
  }
View Full Code Here


    int uniqueCUs = 0;
    for (int i = 0, length = elementsToProcess.length; i < length; i++) {
      IJavaElement e = elementsToProcess[i];
      ICompilationUnit cu = getCompilationUnitFor(e);
      if (cu == null) {
        throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.READ_ONLY, e));
      } else {
        IRegion region = (IRegion) childrenToRemove.get(cu);
        if (region == null) {
          region = new Region();
          childrenToRemove.put(cu, region);
View Full Code Here

          }
        }
      }
    }
  } catch (CoreException e) {
    throw new JavaModelException(e);
  }
 
  if (kind == IPackageFragmentRoot.K_SOURCE) {
    // add primary compilation units
    ICompilationUnit[] primaryCompilationUnits = getCompilationUnits(DefaultWorkingCopyOwner.PRIMARY);
View Full Code Here

  pathBuffer.append(packPath).append('/').append(JavadocConstants.PACKAGE_FILE_NAME);
 
  if (monitor != null && monitor.isCanceled()) throw new OperationCanceledException();
  final String contents = getURLContents(String.valueOf(pathBuffer));
  if (monitor != null && monitor.isCanceled()) throw new OperationCanceledException();
  if (contents == null) throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.CANNOT_RETRIEVE_ATTACHED_JAVADOC, this));
  synchronized (projectInfo.javadocCache) {
    projectInfo.javadocCache.put(this, contents);
  }
  return contents;
}
View Full Code Here

}
/*
* @see ISourceManipulation
*/
public void copy(IJavaElement container, IJavaElement sibling, String rename, boolean force, IProgressMonitor monitor) throws JavaModelException {
  throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.READ_ONLY, this));
}
View Full Code Here

}
/*
* @see ISourceManipulation
*/
public void move(IJavaElement container, IJavaElement sibling, String rename, boolean force, IProgressMonitor monitor) throws JavaModelException {
  throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.READ_ONLY, this));
}
View Full Code Here

}
/*
* @see ISourceManipulation
*/
public void rename(String newName, boolean force, IProgressMonitor monitor) throws JavaModelException {
  throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.READ_ONLY, this));
}
View Full Code Here

/*
* Sets the contents of this element.
* Throws an exception as this element is read only.
*/
public void setContents(String contents, IProgressMonitor monitor) throws JavaModelException {
  throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.READ_ONLY, this));
}
View Full Code Here

              stream,
              this.force,
              this.progressMonitor);
          }
        } catch (CoreException e) {
          throw new JavaModelException(e);
        } catch (UnsupportedEncodingException e) {
          throw new JavaModelException(e, IJavaModelStatusConstants.IO_EXCEPTION);
        }
       
      }

      setAttribute(HAS_MODIFIED_RESOURCE_ATTR, TRUE);
View Full Code Here

      binaryType = getBinaryInfo(classFile, classFile.getResource());
    } catch (CoreException e) {
      if (e instanceof JavaModelException) {
        throw (JavaModelException) e;
      } else {
        throw new JavaModelException(e);
      }
    }
  }
  BinaryTypeBinding binding = this.lookupEnvironment.cacheBinaryType(binaryType, null /*no access restriction*/);
  if (binding == null) { // it was already cached as a result of a previous query
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.