Package org.eclipse.core.filesystem

Examples of org.eclipse.core.filesystem.IFileStore.toURI()


    String projectName = "Orion Project";
    ProjectInfo projectInfo = new ProjectInfo();
    projectInfo.setFullName(projectName);
    projectInfo.setWorkspaceId(workspaceInfo.getUniqueId());
    IFileStore linkedFolder = metaStore.getUserHome(userInfo.getUniqueId()).getChild("Linked Project");
    projectInfo.setContentLocation(linkedFolder.toURI());

    metaStore.createProject(projectInfo);

    // create a project directory and file
    IFileStore projectFolder = projectInfo.getProjectStore();
View Full Code Here


    projectInfo.setWorkspaceId(workspaceInfo.getUniqueId());
    metaStore.createProject(projectInfo);

    // update the content location
    IFileStore projectLocation = metaStore.getDefaultContentLocation(projectInfo);
    projectInfo.setContentLocation(projectLocation.toURI());
    metaStore.updateProject(projectInfo);

    // read the user back again
    userInfo = metaStore.readUser(testUserLogin);
    assertNotNull(userInfo);
View Full Code Here

      projectInfo.setFullName(projectName);
      projectInfo.setWorkspaceId(workspaceInfo.getUniqueId());
      OrionConfiguration.getMetaStore().createProject(projectInfo);

      IFileStore projectFolder = OrionConfiguration.getMetaStore().getDefaultContentLocation(projectInfo);
      projectInfo.setContentLocation(projectFolder.toURI());
      OrionConfiguration.getMetaStore().updateProject(projectInfo);
      if (!projectFolder.fetchInfo().exists()) {
        projectFolder.mkdir(EFS.NONE, null);
      }
      assertTrue(projectFolder.fetchInfo().exists() && projectFolder.fetchInfo().isDirectory());
View Full Code Here

    for (int i = 0; i < 100; i++) {
      ProjectInfo projectInfo = new ProjectInfo();
      projectInfo.setFullName("Project " + i);
      projectInfo.setWorkspaceId(workspace.getUniqueId());
      IFileStore fileStore = metaStore.getDefaultContentLocation(projectInfo);
      projectInfo.setContentLocation(fileStore.toURI());
      metaStore.createProject(projectInfo);
      String projectId = projectInfo.getUniqueId();
      final java.io.File currentProject = new java.io.File(projectId);
      for (String id : ids) {
        //tests that project id is unique based on current file system case sensitivity
View Full Code Here

            props.setProperty(IJvm.HOST_PROP_KEY, getHost().getName());

            props.storeToXML(os, "JVM Properties"); //$NON-NLS-1$
        } catch (CoreException e) {
            Activator.log(IStatus.ERROR, NLS.bind(
                    Messages.openOutputStreamFailedMsg, fileStore.toURI()
                            .getPath()), e);
        } catch (IOException e) {
            try {
                fileStore.delete(EFS.NONE, null);
            } catch (CoreException e1) {
View Full Code Here

                fileStore.delete(EFS.NONE, null);
            } catch (CoreException e1) {
                // do nothing
            }
            Activator.log(IStatus.ERROR, NLS.bind(
                    Messages.writePropertiesFileFailedMsg, fileStore.toURI()
                            .getPath()), e);
        } finally {
            if (os != null) {
                try {
                    os.close();
View Full Code Here

      return new ExternalStorageEditorInput((IStorage) element);
    }
    if (element instanceof IFileStore) {
      IFileStore fileStore = (IFileStore) element;
      NonExistingPHPFileEditorInput nonExistingEditorInput = NonExistingPHPFileEditorInput
          .findEditorInput(new Path(fileStore.toURI().getPath()));
      if (nonExistingEditorInput != null) {
        return nonExistingEditorInput;
      }

      return new FileStoreEditorInput(fileStore);
View Full Code Here

        int compare = compareStringOrNull(store1.getFileSystem().getScheme(), store2.getFileSystem().getScheme());
        if (compare != 0)
          return compare;
        // compare based on URI path segment values
        final URI uri1 = store1.toURI();
        final URI uri2 = store2.toURI();
        IPath path1 = new Path(uri1.getPath());
        IPath path2 = new Path(uri2.getPath());
        int segmentCount1 = path1.segmentCount();
        int segmentCount2 = path2.segmentCount();
        for (int i = 0; (i < segmentCount1) && (i < segmentCount2); i++) {
View Full Code Here

    try {
      // TaskActivator.getInstance().getClass();
      IPath stateLocation= EditorsPlugin.getDefault().getStateLocation();
      IPath path= stateLocation.append("/untitled.todo"); //$NON-NLS-1$
      IFileStore fileStore = EFS.getLocalFileSystem().getStore(path);
      new File(fileStore.toURI()).createNewFile();
      IDE.openEditor(page, new TmpFileStoreEditorInput(fileStore),
          "de.sebastianbenz.task.Task");
    } catch (CoreException e) {
      e.printStackTrace();
    } catch (IOException 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.