Examples of NullProgressMonitor


Examples of org.eclipse.core.runtime.NullProgressMonitor

    _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

Examples of org.eclipse.core.runtime.NullProgressMonitor

    _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

Examples of org.eclipse.core.runtime.NullProgressMonitor

  }

  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

Examples of org.eclipse.core.runtime.NullProgressMonitor

  }

  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

Examples of org.eclipse.core.runtime.NullProgressMonitor

         
          // configure tomcat
          Map<String,String> variables = new HashMap<String,String>();
          TomcatUtils.getInstance().initConfDir(runtime.getCatalinaConf().getLocation().toFile(), variables);       
 
          _project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
        }
      }
    } catch (Exception e) {
      WorkbenchUtils.showErrorDialog(WGADesignerPlugin.getDefault(), Display.getCurrent().getActiveShell(), "Migration to WGA Runtime failed.", "Unable to migrate project '" + _project + "' to runtime.", e);
    }
View Full Code Here

Examples of org.eclipse.core.runtime.NullProgressMonitor

      sortedProperties.putAll(_props);
      FileOutputStream labelFileStream = null;
      try {
        labelFileStream = new FileOutputStream(_file.getLocation().toString());
        sortedProperties.store(labelFileStream, null);
        _file.refreshLocal(IResource.DEPTH_ZERO, new NullProgressMonitor());
      } catch (IOException e) {
        WGADesignerPlugin.getDefault().logInfo("Unable to store file: " + _file.getLocation(), e);
      } catch (CoreException e) {
        WGADesignerPlugin.getDefault().logInfo("Unable to refresh resource on: " + _file.getLocation(), e);
      } finally {
View Full Code Here

Examples of org.eclipse.core.runtime.NullProgressMonitor

                foldersToCreate.add((IFolder)parent);
              }
              parent = parent.getParent();
            }
            for (int i=foldersToCreate.size() - 1; i >= 0; i--) {
              foldersToCreate.get(i).create(false, true, new NullProgressMonitor());
            }           
            // create tml file           
                  String header = Plugin.getDefault().getHeaderFileMap().get(Plugin.HEADER_TML_MODUL).getHeaderForProject(fileToCreate.getProject())
                  fileToCreate.create(new ByteArrayInputStream(header.getBytes()), true, new NullProgressMonitor());             
            // open editor
            WorkbenchUtils.openEditor(Plugin.getDefault().getWorkbench(), fileToCreate, ResourceIDs.EDITOR_TML);
          } catch (CoreException e) {
          }       
        }
View Full Code Here

Examples of org.eclipse.core.runtime.NullProgressMonitor

                foldersToCreate.add((IFolder)parent);
              }
              parent = parent.getParent();
            }
            for (int i=foldersToCreate.size() - 1; i >= 0; i--) {
              foldersToCreate.get(i).create(false, true, new NullProgressMonitor());
            }           
            // create tml file
            fileToCreate.create(new ByteArrayInputStream(new byte[0]), true, new NullProgressMonitor());
            // open editor
            WorkbenchUtils.openEditor(Plugin.getDefault().getWorkbench(), fileToCreate);
          } catch (CoreException e) {
          }       
        }
View Full Code Here

Examples of org.eclipse.core.runtime.NullProgressMonitor

    IFolder container = getFileContainer("labels_" + language.toLowerCase());
    if (container == null) {
      container = getFileContainerRoot().getFolder(new Path("labels_" + language.toLowerCase()));
    }
    if (!container.exists()) {
      container.create(false, true, new NullProgressMonitor());
    }
    return container;
  }
View Full Code Here

Examples of org.eclipse.core.runtime.NullProgressMonitor

    if (!labelFile.exists()) {
      try {
        if (!labelFile.getParent().exists()) {
          if (labelFile.getParent() instanceof IFolder) {
            IFolder parentFolder = (IFolder) labelFile.getParent();
            parentFolder.create(false, true, new NullProgressMonitor());
          }
        }
        ByteArrayInputStream byteStream = new ByteArrayInputStream("".getBytes());
        labelFile.create(byteStream, true, new NullProgressMonitor());
       
      } catch (CoreException e) {
        Activator.getDefault().getLog().log(new Status(Status.ERROR, Activator.PLUGIN_ID, "Can't create propertyfile : " + labelFile.getLocation(), e));
      }      
    }

    // stores labelfile
    FileOutputStream labelFileStream = null;
    BufferedWriter writer = null;
    try {
      if (isSortLabelFiles()) {
        Properties labelProperties = loadLabel(labelFile);
        labelProperties.setProperty(key, value);
        SortedProperties sortedProperties = new SortedProperties();
        sortedProperties.putAll(labelProperties);
        labelFileStream = new FileOutputStream(labelFile.getLocation().toString());
        sortedProperties.store(labelFileStream, null);
     
       
      } else {
        // append new label to existing file
        Properties labelProperties = loadLabel(labelFile);
        if (!labelProperties.containsKey(key)) {
          writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(labelFile.getLocation().toFile(), true), "8859_1"));
          if(labelProperties.entrySet().size()>0){
            writer.newLine();
          }         
          writer.write(LabelFileEncodingHelper.saveConvert(key, true));
          writer.write("=");
          writer.write(LabelFileEncodingHelper.saveConvert(value, false));         
          writer.flush();
       
        }
      }
      labelFile.refreshLocal(IResource.DEPTH_ZERO, new NullProgressMonitor());
    } catch (FileNotFoundException e) {
      Activator.getDefault().getLog().log(new Status(Status.ERROR, Activator.PLUGIN_ID, "Can't find propertyfile : " + labelFile.getLocation(), e));
    } catch (IOException e) {
      Activator.getDefault().getLog().log(new Status(Status.ERROR, Activator.PLUGIN_ID, "Can't write propertyfile : " + labelFile.getLocation(), e));
    } catch (CoreException e) {
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.