Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.IPath.toPortableString()


    IPath projectPath = proj.getResource().getLocation();
    IPath outputDirPath = projectPath.append(RutaProjectUtils.getDefaultOutputLocation());
    String outputFolderPath = configuration.getAttribute(RutaLaunchConstants.ARG_OUTPUT_FOLDER, "");
    if (StringUtils.isBlank(outputFolderPath)) {
      outputFolderPath = configuration.getAttribute(RutaLaunchConstants.OUTPUT_FOLDER,
              outputDirPath.toPortableString());
    }
    if (outputFolderPath.length() != 0) {
      IPath path = Path.fromPortableString(outputFolderPath);
      IResource member = ResourcesPlugin.getWorkspace().getRoot().findMember(path);
      if (member instanceof Folder) {
View Full Code Here


    try {
      File specFile = new File(engine);
      XMLInputSource in = new XMLInputSource(specFile);
      ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);
      ResourceManager resMgr = UIMAFramework.newDefaultResourceManager();
      resMgr.setDataPath(rootPath.toPortableString());
      ae = UIMAFramework.produceAnalysisEngine(specifier, resMgr, null);
    } catch (Exception e) {
      String message = e.getMessage();
      DLTKCore.error(message, e);
      clearConsoleLink(handler);
View Full Code Here

    IPath descriptorPath = RutaProjectUtils.getTypeSystemDescriptorPath(sourceModule.getResource()
            .getLocation(), sourceModule.getScriptProject().getProject());
    TypeSystemDescription typeSysDescr = null;
    if (descriptorPath.toFile().exists()) {
      typeSysDescr = UIMAFramework.getXMLParser().parseTypeSystemDescription(
              new XMLInputSource(descriptorPath.toPortableString()));
      ResourceManager resMgr = getResourceManager(classLoader);
      typeSysDescr.resolveImports(resMgr);
    }
    return typeSysDescr;
  }
View Full Code Here

    IPath removeLastSegments = path.removeLastSegments(1);
    IContainer containerForLocation = ResourcesPlugin.getWorkspace().getRoot()
            .getContainerForLocation(removeLastSegments);
    IPath removeFirstSegments = containerForLocation.getProjectRelativePath()
            .removeFirstSegments(1);
    String replaceAll = removeFirstSegments.toPortableString().replaceAll("/", ".");
    return "PACKAGE " + replaceAll + ";\n\n";
  }

  public String getFilterCommandString() {
    if (filterSet != null && filterSet.size() > 0 && !isDefaultFiltering()) {
View Full Code Here

    IPath targetPath = Path.fromOSString(target);
    IPath basePath = Path.fromPortableString(base);
    IPath result = targetPath.makeRelativeTo(basePath);
    // TODO remove the first part! Should be correct in first place!
    result = result.removeFirstSegments(1);
    return result.toPortableString();
  }

  private void configureExtensions(RutaBuildOptions options) {
    ConfigurationParameterSettings configurationParameterSettings = analysisEngineDescription
            .getAnalysisEngineMetaData().getConfigurationParameterSettings();
View Full Code Here

        RutaIdeCorePlugin.error(e);
      }

      String[] descriptorPaths = descriptorPathList.toArray(new String[0]);
      String[] scriptPaths = scriptPathList.toArray(new String[0]);
      String mainScript = relativeTo.toPortableString();
      mainScript = mainScript.replaceAll("/", ".");
      if (mainScript.endsWith(RutaEngine.SCRIPT_FILE_EXTENSION)) {
        mainScript = mainScript.substring(0, mainScript.length() - 5);
      }
      Collection<String> dependencies = RutaProjectUtils.getClassPath(proj
View Full Code Here

    Collection<String> types = new HashSet<String>();
    if (type == RutaTypeConstants.RUTA_TYPE_AT) {
      try {
        IPath path = sourceModule.getModelElement().getPath();
        path = path.removeFirstSegments(2);
        types = importTypeSystem(path.toPortableString(), sourceModule.getModelElement()
                .getScriptProject().getProject());
      } catch (Exception e) {
      }
      for (String string : types) {
        if (match(startPart, string)) {
View Full Code Here

          // init etc
          runCas.reset();
          goldCas.reset();
          // deserialize CASes
          IPath path2RunFile = runTestPath.append(td.getPath().toFile().getName());
          String runFilePath = path2RunFile.toPortableString();
          File runFile = new File(runFilePath);
          deserializeCASs(goldCas, td, runCas, runFile);
          runCas = runCas.getView(viewCasName);
          goldCas = goldCas.getView(viewCasName);
          // ** create TP, FP, FN annotations
View Full Code Here

          }
          cleanCas = cleanCas.getView(viewCasName);
          prepareCas(cleanCas);
          // store clean CAS
          IPath path2CleanFile = computeCleanPath(cleanInputPath, td);
          String fPath = path2CleanFile.toPortableString();
          File cleanFile = new File(fPath);
          writeXmi(cleanCas, cleanFile);

          td.setResultPath(path2CleanFile);
View Full Code Here

                .append(RutaProjectUtils.getDefaultTempTestLocation());
        path2ResultFile = path2Result.append(td.getPath().removeFileExtension().lastSegment()
                + ".result.xmi");
      }

      File resultFile = new File(path2ResultFile.toPortableString());
      writeXmi(resultCas, resultFile);

      td.setResultPath(path2ResultFile);

      // finally, calculate eval data and show it in the GUI
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.