Package java.io

Examples of java.io.File.toURI()


 
 
 
  public static IContainer dirLinkFolderToContainer(IFolder folder){
    File linkedFile = WGUtils.resolveDirLink(folder.getLocation().toFile());
    IContainer[] containers = folder.getWorkspace().getRoot().findContainersForLocationURI(linkedFile.toURI());

    if (containers != null && containers.length > 0) {
      IContainer container = containers[0];
      if (container instanceof IFolder) {
        return container;
View Full Code Here


    }
  }
 
  public static IContainer resolveDirLink(IFile file) {
    File linkedFile = WGUtils.resolveDirLink(file.getParent().getLocation().toFile());
    return  (IContainer) file.getWorkspace().getRoot().findContainersForLocationURI(linkedFile.toURI())[0];
  }
 
  public static IContainer resolveDirLink(IContainer container) {
    return resolveDirLink(container.getFile(new Path(WGUtils.DIRLINK_FILE)));
  }
View Full Code Here

      Locale defaultLocale = Locale.getDefault();
      Locale.setDefault(DEFAULT_LOCALE);
      File furnitureLibraryFile = File.createTempFile("furniture", ".sh3f");
      furnitureLibraryFile.deleteOnExit();
      copyFile(new File(furnitureLibraryName), furnitureLibraryFile);     
      URL furnitureLibraryUrl = furnitureLibraryFile.toURI().toURL();
      String furnitureResourcesLocalDirectory = preferences.getFurnitureResourcesLocalDirectory();
      URL furnitureResourcesUrlBase = furnitureResourcesLocalDirectory != null
          ? new File(furnitureResourcesLocalDirectory).toURI().toURL()
          : null;
      final List<CatalogPieceOfFurniture> furniture = new ArrayList<CatalogPieceOfFurniture>();
View Full Code Here

                                                        File.pathSeparator);
        while (tokenizer.hasMoreTokens()) {
            String path = tokenizer.nextToken();
            try {
                File libFile = new File(path);
                urls.add(libFile.toURI().toURL());
            } catch (IOException ioe) {
                // Failing a toCanonicalPath on a file that
                // exists() should be a JVM regression test,
                // therefore we have permission to freak uot
                throw new RuntimeException(ioe.toString());
View Full Code Here

        IContainer container = (IContainer) selectedElement;

        IFile dirlink = container.getFile(new Path("dirlink.xml"));
        if (dirlink.exists()) {
          File linkedFile = WGUtils.resolveDirLink(container.getLocation().toFile());
          container = (IContainer) container.getWorkspace().getRoot().findContainersForLocationURI(linkedFile.toURI())[0];

        }

        if (WGADesignStructureHelper.isDesignFolder(container)) {
          _designContainer = container;
View Full Code Here

    // TODO: should throw more specific exception (PWW 25/07/2006)
    public void setDocument(File file)
            throws Exception {
        resetListeners();
        File parent = file.getAbsoluteFile().getParentFile();
        String parentURL = ( parent == null ? "" : parent.toURI().toURL().toExternalForm());
        setDocument(
                loadDocument(file.toURI().toURL().toExternalForm()),
                parentURL
        );
    }
View Full Code Here

            throws IOException {
       
        File parent = file.getAbsoluteFile().getParentFile();
        setDocument(
                loadDocument(file.toURI().toURL().toExternalForm()),
                (parent == null ? "" : parent.toURI().toURL().toExternalForm())
        );
    }

    public void setDocumentFromString(String content) {
        InputSource is = new InputSource(new BufferedReader(new StringReader(content)));
View Full Code Here

        boolean debug = GradleWrapperMain.isDebug();
        File gradleJar = new File(gradleHome, "lib/gradle-launcher-" + version + ".jar");
        if (debug) {
            System.out.println("gradleJar = " + gradleJar.getAbsolutePath());
        }
        URLClassLoader contextClassLoader = new URLClassLoader(new URL[] { gradleJar.toURI().toURL() });
        Thread.currentThread().setContextClassLoader(contextClassLoader);
        Class<?> mainClass = contextClassLoader.loadClass("org.gradle.launcher.GradleMain");
        Method mainMethod = mainClass.getMethod("main", String[].class);
        mainMethod.invoke(null, new Object[] {args});
    }
View Full Code Here

        String fname = fileName(file.getAbsolutePath());
        String sname = bindingFromFileName(fname);
       
        // construct and return the binding definition
        return loadBinding(fname, sname, new FileInputStream(file),
            file.toURI().toURL(), valid);
    }
}
View Full Code Here

              xcode_adapter,
              provider_analysis,
              direct_input,
              job.getFile(),
              profile,
              output_file.toURI().toURL());
        }
       
        provider_job[0].setMaxBytesPerSecond( max_bytes_per_sec );
       
        TranscodeQueueListener listener =
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.