Package org.eclipse.jdt.core

Examples of org.eclipse.jdt.core.JavaModelException


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


    IProject externalFoldersProject = null;
    try {
      externalFoldersProject = createExternalFoldersProject(monitor);
    }
    catch(CoreException e) {
      throw new JavaModelException(e);
    }
    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=368152
    // To avoid race condition (from addFolder and removeFolder, load the map elements into an array and clear the map immediately.
    // The createLinkFolder being in the synchronized block can cause a deadlock and hence keep it out of the synchronized block.
    Object[] arrayOfFolders = null;
View Full Code Here

      binaryType = getBinaryInfo(classFile, classFile.resource());
    } 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

    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

            e.printStackTrace();
          }
          if (e instanceof JavaModelException) {
            throw (JavaModelException)e;
          } else {
            throw new JavaModelException(e);
          }
        }
      }
    } finally {
      done();
View Full Code Here

    ASTNode node = parser.createAST(this.progressMonitor);
    String createdNodeSource;
    if (node.getNodeType() != ASTNode.TYPE_DECLARATION) {
      createdNodeSource = generateSyntaxIncorrectAST();
      if (this.createdNode == null)
        throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.INVALID_CONTENTS));
    } else {
      TypeDeclaration typeDeclaration = (TypeDeclaration) node;
      if ((typeDeclaration.getFlags() & ASTNode.MALFORMED) != 0) {
        createdNodeSource = generateSyntaxIncorrectAST();
        if (this.createdNode == null)
          throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.INVALID_CONTENTS));
      } else {
        List bodyDeclarations = typeDeclaration.bodyDeclarations();
        if (bodyDeclarations.size() == 0) {
          throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.INVALID_CONTENTS));
        }
        this.createdNode = (ASTNode) bodyDeclarations.iterator().next();
        createdNodeSource = this.source;
      }
    }
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

}
/**
* @see 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

        computeTypeRange();
      }
    }
   
    if (this.typeDocRange != null) {
      if (this.typeDocRange == UNKNOWN_FORMAT) throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.UNKNOWN_JAVADOC_FORMAT, this.type));
      return String.valueOf(CharOperation.subarray(this.content, this.typeDocRange[0], this.typeDocRange[1]));
    }
    return null;
  }
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.