Package org.eclipse.jdt.core

Examples of org.eclipse.jdt.core.JavaModelException


   * @see IJavaProject#findElement(IPath, WorkingCopyOwner)
   */
  public IJavaElement findElement(IPath path, WorkingCopyOwner owner) throws JavaModelException {

    if (path == null || path.isAbsolute()) {
      throw new JavaModelException(
        new JavaModelStatus(IJavaModelStatusConstants.INVALID_PATH, path));
    }
    try {

      String extension = path.getFileExtension();
View Full Code Here


        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

        }

        IField ifield = type.getField(field.getFieldName());
        ISourceRange sourceRange = null;
        IScanner scanner = null;
        JavaModelException ex = null;
        try {
            sourceRange = ifield.getNameRange();
        } catch (JavaModelException e) {
            ex = e;
        }
View Full Code Here

    String source = null;
    if (_info.isCreateField()) {
      try {
        source = GetterSetterUtil.getGetterStub(componentType.getField(fieldName), accessorMethodName, true, Flags.AccPublic);
      } catch (CoreException e) {
        throw new JavaModelException(e);
      }
    } else {
      source = "public " + simpleTypeName + " " + accessorMethodName + "() {\n" + " // TODO\n" + "return null;\n" + "}";
    }
    if (source != null) {
View Full Code Here

    String source = null;
    if (_info.isCreateField()) {
      try {
        source = GetterSetterUtil.getSetterStub(componentType.getField(fieldName), mutatorMethodName, true, Flags.AccPublic);
      } catch (CoreException e) {
        throw new JavaModelException(e);
      }
    } else {
      source = "public void " + mutatorMethodName + "(" + simpleTypeName + " " + _info.getName() + ") {\n" + " // TODO\n" + "}";
    }
    if (source != null) {
View Full Code Here

      else {
        bindingNames.add(bindingName);
      }
    }

    JavaModelException javaModelException = null;

    if (checkBindingValues && javaFileType != null) {
      Iterator<IWodBinding> bindingsIter = getBindings().iterator();
      while (bindingsIter.hasNext()) {
        IWodBinding binding = bindingsIter.next();
View Full Code Here

        }
      };
      workspace.run(runnable, rule, IWorkspace.AVOID_UPDATE, null);
    } catch(CoreException e){
      if (!ExternalJavaProject.EXTERNAL_PROJECT_NAME.equals(this.project.getElementName()))
        throw new JavaModelException(e);
    }
  }
View Full Code Here

        if (JavaModelManager.CP_RESOLVE_VERBOSE || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE)
          verbose_failure(e);
        if (e instanceof JavaModelException) {
          throw (JavaModelException)e;
        } else {
          throw new JavaModelException(e);
        }
      } finally {
        for (int i = 0; i < projectLength; i++) {
          if (this.respectiveContainers[i] == null) {
            manager.containerPut(this.affectedProjects[i], this.containerPath, null); // reset init in progress marker
View Full Code Here

}
/**
* @see ISourceManipulation
*/
public void rename(String newName, boolean force, IProgressMonitor monitor) throws JavaModelException {
  throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.INVALID_ELEMENT_TYPES, this));
}
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.