Package org.eclipse.jdt.core

Examples of org.eclipse.jdt.core.JavaModelException


        resolvedClasspath = temporaryInfo.getResolvedClasspath();
        unresolvedEntryStatus = temporaryInfo.unresolvedEntryStatus;
      }
    }
    if (!ignoreUnresolvedEntry && unresolvedEntryStatus != null && !unresolvedEntryStatus.isOK())
      throw new JavaModelException(unresolvedEntryStatus);
    return resolvedClasspath;
  }
View Full Code Here


    // actual file saving
    try {
      setSharedProperty(JavaProject.CLASSPATH_FILENAME, encodeClasspath(newClasspath, referencedEntries, newOutputLocation, true, unknownElements));
      return true;
    } catch (CoreException e) {
      throw new JavaModelException(e);
    }
  }
View Full Code Here

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

    int uniqueCUs = 0;
    for (int i = 0, length = this.elementsToProcess.length; i < length; i++) {
      IJavaElement e = this.elementsToProcess[i];
      ICompilationUnit cu = getCompilationUnitFor(e);
      if (cu == null) {
        throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.READ_ONLY, e));
      } else {
        IRegion region = (IRegion) this.childrenToRemove.get(cu);
        if (region == null) {
          region = new Region();
          this.childrenToRemove.put(cu, region);
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

          }
        }
      }
    }
  } 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

  return this.parameterTypes;
}
protected ASTNode generateElementAST(ASTRewrite rewriter, ICompilationUnit cu) throws JavaModelException {
  ASTNode node = super.generateElementAST(rewriter, 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.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.