Package org.eclipse.core.internal.resources

Examples of org.eclipse.core.internal.resources.ResourceStatus


    try {
      compilerProcess = builder.start();
    } catch (IOException e1) {
      e1.printStackTrace();
      buildMonitor.done();
      throw new CoreException(new ResourceStatus(ResourceStatus.BUILD_FAILED, "Compilation of " + prj.getName() + " failed due to the following exception: " + e1.getMessage()));
    }
    CompilerConsoleHandler.dumpBuildMessages(compilerProcess.getInputStream());
   
    try {
      compilerProcess.waitFor();
    } catch (InterruptedException e) {
      e.printStackTrace();
    }
    finally{
      buildMonitor.worked(60);
      buildMonitor.done();
    }
   
    if(compilerProcess.exitValue() != 0)
      //throw new CoreException(new Status(Status.ERROR, XVRPlugin.PLUGIN_ID, "Compilation of " + prj.getName() + "failed and returns with code : " + compilerProcess.exitValue()));
      throw new CoreException(new ResourceStatus(ResourceStatus.BUILD_FAILED, "Compilation of " + prj.getName() + " failed and returns with code : " + compilerProcess.exitValue()));
   
    prj.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
   
    return true;
  }
View Full Code Here


      try {
        int version = source.readByte();
        if (version != getVersion()) {
          // unknown version
          String message = NLS.bind(Messages.resources_readMetaWrongVersion, location.getAbsolutePath(), Integer.toString(version));
          ResourceStatus status = new ResourceStatus(IResourceStatus.FAILED_READ_METADATA, message);
          throw new ResourceException(status);
        }
        int entryCount = source.readInt();
        for (int i = 0; i < entryCount; i++)
          this.entries.put(readEntryKey(source), readEntryValue(source));
      } finally {
        source.close();
      }
    } catch (IOException ioe) {
      String message = NLS.bind(Messages.resources_readMeta, location.getAbsolutePath());
      ResourceStatus status = new ResourceStatus(IResourceStatus.FAILED_READ_METADATA, null, message, ioe);
      throw new ResourceException(status);
    }
  }
View Full Code Here

        destination.close();
      }
      needSaving = false;
    } catch (IOException ioe) {
      String message = NLS.bind(Messages.resources_writeMeta, location.getAbsolutePath());
      ResourceStatus status = new ResourceStatus(IResourceStatus.FAILED_WRITE_METADATA, null, message, ioe);
      throw new ResourceException(status);
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.core.internal.resources.ResourceStatus

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.