Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.NullProgressMonitor


        }
    }
   
    try {
      new WGADesignStructureHelper(_designContainer).enforceDesignEncoding();
      _designContainer.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());     
    } catch (CoreException e) {     
    } 
   
    if (_directAccessDefaultChanged) {
      IDecoratorManager decoratorManager = Activator.getDefault().getWorkbench().getDecoratorManager();
View Full Code Here


    if (_designContainer != null) {
      WGADesignStructureHelper helper = new WGADesignStructureHelper(_designContainer);
      IFolder systemContainer = helper.getFileContainer("system");
      if (systemContainer != null) {
        try {
          systemContainer.refreshLocal(depth, new NullProgressMonitor());
        } catch (CoreException e) {
        }
      }
    }
  }
View Full Code Here

        XStream xstream = new XStream(new DomDriver());
        xstream.alias(TMLMetadataInfo.XSTREAM_ALIAS, TMLMetadataInfo.class);
        Reader reader = null;
        try {
          if(!_metadataFile.isSynchronized(IResource.DEPTH_ZERO)){
            _metadataFile.refreshLocal(IResource.DEPTH_ZERO, new NullProgressMonitor());
          }
          reader = new InputStreamReader(_metadataFile.getContents(), _fileEncoding);
          TMLMetadataInfo metaData = (TMLMetadataInfo) xstream.fromXML(reader);
          directAccess = metaData.isDirectAccess();
          cacheable = metaData.isCacheable();
View Full Code Here

  @Override
  public void saveChanges() throws IOException {
    if (isDefault()) {
      if (_metadataFile != null && _metadataFile.exists()) {
        try {
          _metadataFile.delete(false, new NullProgressMonitor());
          if (_metadataFolder.members().length == 0) {
              _metadataFolder.delete(false, new NullProgressMonitor());
          }
          reload();
        } catch (CoreException e) {
          IOException ioe = new IOException("Unable to delete meta data file '" + _metadataFile.getLocation() + "'.");
          ioe.setStackTrace(e.getStackTrace());
          throw ioe;
       
      }   
    } else {     
      TMLMetadataInfo metaData = new TMLMetadataInfo();
      metaData.setDirectAccess(directAccess);
      metaData.setDescription(description);
      metaData.setCacheable(cacheable);
      metaData.setCategory(category);
      XStream xstream = new XStream(new DomDriver());
      xstream.alias(TMLMetadataInfo.XSTREAM_ALIAS, TMLMetadataInfo.class);
      Writer writer = null;
      try {
        if (!_metadataFolder.exists()) {
          _metadataFolder.create(true, true, new NullProgressMonitor())
          _metadataFile = _metadataFolder.getFile(_tmlFile.getName().substring(0, _tmlFile.getName().length() - _tmlFile.getFileExtension().length()) + "metadata.xml");
        }

        writer = new OutputStreamWriter(new FileOutputStream(_metadataFile.getLocation().toFile()), _fileEncoding);
        xstream.toXML(metaData, writer);
       
      } catch (CoreException e) {
        IOException ioe = new IOException("Unable to save metadata file '" + _metadataFile.getLocation() + "'.");
        ioe.setStackTrace(e.getStackTrace());
        throw ioe;
      } finally {
        if (writer != null) {
          try {
            writer.close();
          } catch (IOException e) {
          }
          try {
            if(_metadataFile!=null){
              _metadataFile.refreshLocal(IResource.DEPTH_ZERO, new NullProgressMonitor());
            }
          } catch (CoreException e) {
          }
        }
      }
View Full Code Here

  public WGARemoteServerSubscriber(WGARemoteServer server, WGARuntime runtime) {
    _server = server;
    _runtime = runtime;   
    _comparator = new WGAFSDesignResourceVariantComparator();
    _pluginComparator = new WGAPluginResourceVariantComparator();
    refresh(roots(), IResource.DEPTH_INFINITE, new NullProgressMonitor());   
  }
View Full Code Here

    WGARuntime runtime = _page.getRuntime();   
    if(runtime != null){
      try {
        IFolder folder = runtime.getDesignRoot().getFolder(new Path(_page.getDesignName()));
        if (!folder.exists()) {
          folder.create(false, true, new NullProgressMonitor());
          DesignTemplate template = _page.getTemplate();
          WGADesignFactory.createDesign(folder, folder.getName(), template);
         
          if (!_page.isCreateContentStore()) {
            _page.getRuntime().register(folder, false, null, null, null, template.getProperties());
View Full Code Here

    _hsqlRoot = _wgaData.getFolder(new Path(DBS_FOLDERNAME));
    IFolder oldHSQLRoot = _wgaData.getFolder(new Path("dbs"));
    if (oldHSQLRoot.exists()) {
      try {
        oldHSQLRoot.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
        oldHSQLRoot.move(new Path(DBS_FOLDERNAME), false, new NullProgressMonitor());
      } catch (CoreException e) {
        WGADesignerPlugin.getDefault().logError("Unable to migrate existing dbs folder.", e);
      }
    }
    if (!_hsqlRoot.exists()) {
      _hsqlRoot.create(false, true, new NullProgressMonitor());
    }
    _hsqlRoot.setDerived(true);

    _luceneRoot = _wgaData.getFolder(new Path(LUCENE_FOLDERNAME));
    IFolder oldLuceneRoot = _wgaData.getFolder(new Path("lucene"));
    if (oldLuceneRoot.exists()) {
      try {
        oldLuceneRoot.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
        oldLuceneRoot.move(new Path(LUCENE_FOLDERNAME), false, new NullProgressMonitor());
      } catch (CoreException e) {
        WGADesignerPlugin.getDefault().logError("Unable to migrate existing lucene folder.", e);
      }
    }
    if (!_luceneRoot.exists()) {
      _luceneRoot.create(false, true, new NullProgressMonitor());
    }
    _luceneRoot.setDerived(true);

    _workflowRoot = FileUtils.createFolder(_wgaData, "workflows");
View Full Code Here

    _hsqlRoot = _wgaData.getFolder(new Path(DBS_FOLDERNAME));
    IFolder oldHSQLRoot = _wgaData.getFolder(new Path("dbs"));
    if (oldHSQLRoot.exists() && !_hsqlRoot.exists()) {
      try {
        oldHSQLRoot.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
        oldHSQLRoot.move(new Path(DBS_FOLDERNAME), false, new NullProgressMonitor());
      } catch (CoreException e) {
        WGADesignerPlugin.getDefault().logError("Unable to migrate existing dbs folder.", e);
      }
    }
    try {
        if(!_hsqlRoot.exists()){
            FileUtils.createFolder(_wgaData, DBS_FOLDERNAME);
        }
      _hsqlRoot.setDerived(true);
    } catch (CoreException e1) {
      WGADesignerPlugin.getDefault().logError("Unable to set derived flag on folder '" + _hsqlRoot.getLocation() + "'.", e1);
    }

    _luceneRoot = _wgaData.getFolder(new Path(LUCENE_FOLDERNAME));
    IFolder oldLuceneRoot = _wgaData.getFolder(new Path("lucene"));
    if (oldLuceneRoot.exists() && !_luceneRoot.exists()) {
      try {
        oldLuceneRoot.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
        oldLuceneRoot.move(new Path(LUCENE_FOLDERNAME), false, new NullProgressMonitor());
      } catch (CoreException e) {
        WGADesignerPlugin.getDefault().logError("Unable to migrate existing lucene folder.", e);
      }
    }
    try {
        if(!_luceneRoot.exists()){
            FileUtils.createFolder(_wgaData, LUCENE_FOLDERNAME);
        }
      _luceneRoot.setDerived(true);
    } catch (CoreException e1) {
      WGADesignerPlugin.getDefault().logError("Unable to set derived flag on folder '" + _luceneRoot.getLocation() + "'.", e1);
    }

    _developerPluginsRoot = _project.getFolder("plugins");
    if (!_developerPluginsRoot.exists()) {
      try {
        _developerPluginsRoot.create(false, true, new NullProgressMonitor());
      } catch (CoreException e) {
        WGADesignerPlugin.getDefault().logError("Unable to create folder for developer plugins.", e);
      }
    }
View Full Code Here

  }

  public void registerExternalDesign(WGADesign wgaDesign) throws IOException, CoreException {
    IFolder designFolder = getDesignRoot().getFolder(new Path(wgaDesign.getName()));
    if (!designFolder.exists()) {
      designFolder.create(false, true, new NullProgressMonitor());
      createDirlink(wgaDesign, designFolder);
      getDesignRoot().refreshLocal(IResource.DEPTH_INFINITE, null);
    }
  }
View Full Code Here

  }

  public void registerExternalPlugin(WGADesign wgaDesign) throws IOException, CoreException {
    IFolder pluginFolder = getPluginRoot().getFolder(wgaDesign.getName());
    if (!pluginFolder.exists()) {
      pluginFolder.create(false, true, new NullProgressMonitor());
      createDirlink(wgaDesign, pluginFolder);
      getPluginRoot().refreshLocal(IResource.DEPTH_INFINITE, null);
    }
  }
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.