Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.SubMonitor.worked()


                FileOutputStream fileOutputStream;
                try {
                    monitor.subTask(Messages.SendFileAction_monitor_opening_text);
                    fileOutputStream = new FileOutputStream(file);
                    monitor.worked(1);
                } catch (FileNotFoundException e) {
                    errorPopup(Messages.SendFileAction_error_cannot_open_file_title,
                        Messages.SendFileAction_error_cannot_open_file_message,
                        e, monitor);
                    return new Status(IStatus.ERROR, Saros.SAROS,
View Full Code Here


      public void run() {
        IDE.saveAllEditors(new IResource[]{prj}, !XVRUtils.getBooleanPreference(PreferenceConstants.GEN_AUTO_SAVE_ON_BUILD));
      }
    });
   
    buildMonitor.worked(30);
    buildMonitor.subTask("compiling");

    List<String> compilerArgs = new ArrayList<String>();

    compilerArgs.add(this.compiler_path);
View Full Code Here

    builder.directory( new File(prj.getLocation().toString()));
    builder.redirectErrorStream(true);
    final Process compilerProcess;
    //ILaunch l = XVRUtils.getXVRLaunh();
   
    buildMonitor.worked(10);
    try {
      compilerProcess = builder.start();
    } catch (IOException e1) {
      e1.printStackTrace();
      buildMonitor.done();
View Full Code Here

      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()));
View Full Code Here

    lParser.setSource(compilationUnit);
    lParser.setResolveBindings(true);
   
    CompilationUnit cu = (CompilationUnit) lParser.createAST(subMonitor.newChild(60));
    cu.accept(new CompilationUnitVisitor(compilationUnit, packageName, modelOf(compilationUnit.getJavaProject())));
    subMonitor.worked(40);
  }

  // TODO DI?
  private JavaOntModel modelOf(IJavaProject javaProject) {
    JavaOntModel model;
View Full Code Here

    sub.beginTask("Adding " + NATURE_ID + " nature to project.", 5);
   
    try {
      IProjectDescription description = theProject.getDescription();
      String[] natures = description.getNatureIds();
      sub.worked(1);
     
      String[] newNatures = new String[natures.length + 1];
      System.arraycopy(natures, 0, newNatures, 0, natures.length);   
      newNatures[natures.length] = NATURE_ID;
      sub.worked(1);
View Full Code Here

      sub.worked(1);
     
      String[] newNatures = new String[natures.length + 1];
      System.arraycopy(natures, 0, newNatures, 0, natures.length);   
      newNatures[natures.length] = NATURE_ID;
      sub.worked(1);
     
      description.setNatureIds(newNatures);
      sub.worked(1);
     
      theProject.setDescription(description, sub.newChild(2));
View Full Code Here

      System.arraycopy(natures, 0, newNatures, 0, natures.length);   
      newNatures[natures.length] = NATURE_ID;
      sub.worked(1);
     
      description.setNatureIds(newNatures);
      sub.worked(1);
     
      theProject.setDescription(description, sub.newChild(2));
    } catch(CoreException cex) {
      // should not happen
      throw new EvolizerRuntimeException("Unexpected error while applying nature to " + theProject.getName() +".", cex);
View Full Code Here

            if (session.isOpen()) {
                session.close();
                Properties properties = EvolizerSessionHandler.getHandler().getProperties(fDBUrl);
                EvolizerSessionHandler.getHandler().updateSchema(properties);
            }
            progress.worked(20);
            progress.setTaskName("Deleting existing models of this project ...");
            DAOModel queryModel= new DAOModel(fDBUrl);
            List<FamixModel> existingModels = queryModel.queryStoredModels(fFamixModel.getName());
            for (FamixModel famixModel : existingModels) {
                DAOModel modelToDelete = new DAOModel(fDBUrl, famixModel);
View Full Code Here

            List<FamixModel> existingModels = queryModel.queryStoredModels(fFamixModel.getName());
            for (FamixModel famixModel : existingModels) {
                DAOModel modelToDelete = new DAOModel(fDBUrl, famixModel);
                modelToDelete.deleteModel();
            }
            progress.worked(20);
           
            DAOModel newDAOModel = new DAOModel(fDBUrl, fFamixModel);
            newDAOModel.store(progress.newChild(60));
        } catch (EvolizerRuntimeException ere) {
            sfLogger.error("Error storing FAMIX" , ere);
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.