Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.NullProgressMonitor


          return false;
        }
      }
      try {
        _model.exportPlugin(exportFile, _exportAsPluginAsFilePage.getBuild(), false, false);
        _designContainer.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());       
        MessageDialog.openInformation(getShell(), "Export finished.", "Plugin has been exported to '" + exportFile.getAbsolutePath() + "'.");
        return true;
      } catch (Exception e) {
        WorkbenchUtils.showErrorDialog(Plugin.getDefault(), getShell(), "Export plugin failed", "Unable to export plugin to file '" + exportFile.getAbsolutePath() + "'", e);
      }
View Full Code Here


        catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        parser.setSource(writer.toString().toCharArray());
        ASTNode ast = parser.createAST(new NullProgressMonitor());
        ast.accept(new ASTVisitor() {
           
            private Map<String, String> _imports = new HashMap<String, String>();

            @Override
View Full Code Here

      String innerLayoutName = _layoutPage.getInnerLayoutName();
     
      WGADesignStructureHelper helper = new WGADesignStructureHelper(designRoot);
      IFolder html = helper.getTmlRoot().getFolder("html");
      if (!html.exists()) {
        html.create(false, true, new NullProgressMonitor());
      }
     
      IFile outerLayoutFile = html.getFile(new Path(outerLayoutName + ".tml"));
      InputStream outerLayoutTemplate = null;
      try {
        outerLayoutTemplate = Plugin.getDefault().getResourceAsStream("resources/templates/defaultOuterLayout.template");
        outerLayoutFile.create(outerLayoutTemplate, true, new NullProgressMonitor());
      } finally {
        if (outerLayoutTemplate != null) {
          try {
            outerLayoutTemplate.close();
          } catch (IOException e) {
          }
        }
      }
     
      IFolder inner = html.getFolder("inner");
      if (!inner.exists()) {
        inner.create(false, true, new NullProgressMonitor());
      }
     
      IFile innerLayoutFile = inner.getFile(innerLayoutName + ".tml");
      InputStream innerLayoutTemplate = null;
      try {
        innerLayoutTemplate = Plugin.getDefault().getResourceAsStream("resources/templates/defaultInnerLayout.template");       
        innerLayoutFile.create(innerLayoutTemplate, true, new NullProgressMonitor());
      } finally  {
        if (innerLayoutTemplate != null) {
          try {
            innerLayoutTemplate.close();
          } catch (IOException e) {
View Full Code Here

      tmlFile = _tmlModulePage.getTmlFile();
      boolean isDirectAccess = _tmlModulePage.getIsTmlFileDirectAccess();
      boolean isCachable = _tmlModulePage.getIsTmlFileCachable();
     
          String header = Plugin.getDefault().getHeaderFileMap().get(Plugin.HEADER_TML_MODUL).getHeaderForProject(tmlFile.getProject())
          tmlFile.create(new ByteArrayInputStream(header.getBytes()), true, new NullProgressMonitor());   
     
      if(isCachable || isDirectAccess){
        TMLFileMetadataModel model = new TMLFileMetadataModel(tmlFile);
        model.setCachable(isCachable);
        model.setDirectAccess(isDirectAccess);
View Full Code Here

  public boolean performFinish() {
    IFile target = _modulePage.getTargetFile();
        String header = Plugin.getDefault().getHeaderFileMap().get(_fileExtToHeader.get(target.getFileExtension())).getHeaderForProject(target.getProject());  
    if (_modulePage.getCopyFromFile() != null) {
      try {
        target.create(new ByteArrayInputStream((header + "\n").getBytes()), true, new NullProgressMonitor());
        target.appendContents(Plugin.getDefault().getResourceAsStream(_modulePage.getCopyFromFile()), true, false, new NullProgressMonitor());     
      } catch (CoreException e) {
        Plugin.getDefault().logError("Unable to create file " + target.getLocation(), e);
        return false;
      } catch (IOException e) {
        Plugin.getDefault().logError("Unable to cpoy from template in file " + target.getLocation(), e);
        return false;
      }
    }else{
      try {     
        target.create(new ByteArrayInputStream(header.getBytes()), true, new NullProgressMonitor());
      } catch (CoreException e) {
        Plugin.getDefault().logError("Unable to create file " + target.getLocation(), e);
        return false;
      }
    }
View Full Code Here

        IFile moveToFile = _metaDataFilesToMove.get(moveFrom);
        try {
          if (moveToFile.getParent() instanceof IFolder) {
            IFolder folder = (IFolder) moveToFile.getParent();
            if (!folder.exists()) {
              folder.create(true,true, new NullProgressMonitor());
            }
            moveFrom.move(moveToFile.getFullPath(), true, new NullProgressMonitor());
          }         
        } catch (CoreException e) {
          Plugin.getDefault().logError("Unable to execute TMLMetadataMaintenance." , e);
        }           
      }

      Iterator<IFile> removeFiles = _metaDataFilesToRemove.iterator();
      while (removeFiles.hasNext()) {
        try {
          removeFiles.next().delete(true, new NullProgressMonitor());
        } catch (CoreException e) {
          Plugin.getDefault().logError("Unable to execute TMLMetadataMaintenance." , e);
        }
      }
      _metaDataFilesToMove.clear();
View Full Code Here

    FileUtils.copy(loggingProperties, new File(confTargetDir, "logging.properties"));
 
   
  public void start(WGARuntime runtime, IProgressMonitor monitor) throws IOException, CoreException {
    if (monitor == null) {
      monitor = new NullProgressMonitor();
    }
    if (!isRunning()) {
      notifyListeners(TomcatServerStateListener.STATE_STARTING);
     
     
View Full Code Here

    }
  }

  public void stop(IProgressMonitor monitor) throws IOException, DocumentException {
    if (monitor == null) {
      monitor = new NullProgressMonitor();
    }
   
    if (_currentRuntime != null) {   
      try {
        _stopRequested = true;
View Full Code Here

  private static Change createDirlinkChange(DirlinkRefactoringInformation info) throws Exception {

   
    if(info.getArguments() instanceof MoveArguments || info.getArguments() instanceof RenameArguments){
      TextFileChange change = new TextFileChange("", info.getFile());
      IDocument doc = change.getCurrentDocument(new NullProgressMonitor());
      // create Textedit
   
 
      FindReplaceDocumentAdapter find = new FindReplaceDocumentAdapter(doc);
      IRegion resultStart = find.find(0, "location\\s*=\\s*\"", true, true, false, true);
View Full Code Here

      if(errors.isEmpty()) {
       
     
      ByteArrayOutputStream configContent = new ByteArrayOutputStream();   
      WGAConfiguration.write(config, configContent);
      change.setEdit(new ReplaceEdit(0, change.getCurrentDocument((new NullProgressMonitor())).getLength(), configContent.toString()))
      return change;
      } else {
        for(ValidationError current : errors){
          WGADesignerPlugin.getDefault().logError(current.getMessage());
        }
View Full Code Here

TOP

Related Classes of org.eclipse.core.runtime.NullProgressMonitor

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.