Package org.eclipse.jdt.core

Examples of org.eclipse.jdt.core.IJavaProject.open()


    for(IProject project: workspace.getRoot().getProjects()){
      if (project.getDescription().getName().equals(name)){
        //prepare project for tests
        project.refreshLocal(IResource.DEPTH_INFINITE, null);
        IJavaProject result = JavaCore.create(project);
        result.open(null);
        result.makeConsistent(null);
        assert result.isOpen();
        assert result.isConsistent();
        return result;
      }
View Full Code Here


    throws Exception
  {
    IPath path = Path.fromOSString(file);

    IJavaProject javaProject = getJavaProject(project);
    javaProject.open(null);
    //javaProject.getResource().refreshLocal(IResource.DEPTH_INFINITE, null);

    ICompilationUnit src = (ICompilationUnit)javaProject.findElement(path);

    return src;
View Full Code Here

    IProject[] projects =
      ResourcesPlugin.getWorkspace().getRoot().getProjects();
    for(IProject project : projects){
      if (project.hasNature(JavaCore.NATURE_ID)){
        IJavaProject javaProject = getJavaProject(project);
        javaProject.open(null);
        //javaProject.getResource().refreshLocal(IResource.DEPTH_INFINITE, null);

        ICompilationUnit src = (ICompilationUnit)javaProject.findElement(path);
        if(src != null){
          return src;
View Full Code Here

   
    String javaProjectName = doc.getProject().segment(0);
    IJavaProject javaProj = javaModel.getJavaProject(javaProjectName);
   
    if( !javaProj.isOpen() )
      javaProj.open(new NullProgressMonitor());
   
    javaModel.refreshExternalArchives(new IJavaElement[]{javaProj}, new NullProgressMonitor());
   
    String jarName = doc.getJarName();
   
View Full Code Here

   
    if( proj == null )
      throw new Exception("Project " + javaProjectName + " not found");
   
    if( !proj.isOpen() )
      proj.open(new NullProgressMonitor());
   
    javaModel.refreshExternalArchives(new IJavaElement[]{proj}, new NullProgressMonitor());
   
    IPath filePath = new Path(doc.getFilePath());
    String fileName = filePath.lastSegment();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.