Package org.eclipse.core.resources

Examples of org.eclipse.core.resources.IFile.move()


      int _length_4 = _children.length;
      Matcher<Integer> _is_12 = Matchers.<Integer>is(Integer.valueOf(0));
      MatcherAssert.<Integer>assertThat(Integer.valueOf(_length_4), _is_12);
      IFile _file_1 = erlFile2.getFile();
      Path _path = new Path("/Test001/nop.erl");
      _file_1.move(_path, true, null);
      boolean _exists_5 = erlFile2.exists();
      Matcher<Boolean> _is_13 = Matchers.<Boolean>is(Boolean.valueOf(false));
      MatcherAssert.<Boolean>assertThat(Boolean.valueOf(_exists_5), _is_13);
      Iterable<IErlModule> _modules = erlProject2.getModules();
      int _length_5 = ((Object[])Conversions.unwrapArray(_modules, Object.class)).length;
View Full Code Here


      ErlNotificationTest.assertEquality(_insertRemoved, this.listener.delta);
      final IErlSource erlFile2 = erlProject2.getSourceFile("nop.erl");
      final IErlSource movedErlFile2 = erlProject1.getSourceFile("test1.erl");
      IFile _file_3 = erlFile2.getFile();
      Path _path_1 = new Path("/Test001/test1.erl");
      _file_3.move(_path_1, true, null);
      HandleDelta _newDelta_4 = this.newDelta();
      HandleDelta _insertMovedTo = _newDelta_4.insertMovedTo(movedErlFile2, erlFile2);
      HandleDelta _insertMovedFrom = _insertMovedTo.insertMovedFrom(erlFile2, movedErlFile2);
      ErlNotificationTest.assertEquality(_insertMovedFrom,
        this.listener.delta);
View Full Code Here

  public void test_getSingleModule_maven_2() throws Exception {
    GTestUtils.configureMavenProject();
    // move module file into "java"
    {
      IFile moduleFile = getFile("src/main/resources/test/Module.gwt.xml");
      moduleFile.move(new Path("/TestProject/src/main/java/test/Module.gwt.xml"), true, null);
    }
    // use project
    {
      IResource resource = m_project;
      ModuleDescription module = Utils.getSingleModule(resource);
View Full Code Here

    GTestUtils.createModule(m_testProject, "test.Module");
    // move module file into "resources"
    {
      IFile moduleFile = getFile("src/main/java/test/Module.gwt.xml");
      getFolder("src/main/resources/test");
      moduleFile.move(new Path("/TestProject/src/main/resources/test/Module.gwt.xml"), true, null);
    }
    // OK, really "source" package
    {
      IPackageFragment pkg = m_testProject.getPackage("test.client");
      assertTrue(Utils.isModuleSourcePackage(pkg));
View Full Code Here

        }
        final IFile oldFile = ResourcesPlugin.getWorkspace().getRoot().getFile(path.append(sourceType.getTypeQualifiedName() + ".html"));

        if (oldFile.exists() && oldFile.isAccessible()) { // if there's a file in the same folder
          oldFile.refreshLocal(SAVE_IF_DIRTY, paramIProgressMonitor);
          oldFile.move(newPath, true, true, paramIProgressMonitor);
        }

        FileSearcher fs = new FileSearcher(sourceType.getJavaProject().getProject(), sourceType.getTypeQualifiedName() + "*");
        ResourcesPlugin.getWorkspace().getRoot().accept(fs);
        List<IFile> ffs = fs.getFoundFiles();
View Full Code Here

        fTemplate.delete(true, monitor);
      } else {
        fTemplate = file;
      }
    }
    file.move(new Path(filename), true, monitor);
  }

  /**
   * Return the basic structure of an ATG file.
   *
 
View Full Code Here

          monitor.subTask("Deleting broken file");
          model.delete(true, new SubProgressMonitor(monitor, 1));
        }
       
        monitor.subTask("Replacing with backup");
        backup.move(model.getFullPath(), true, new SubProgressMonitor(monitor, 1));
      } else {
        // delete the backup if it exists
        if (backup.exists())
          backup.delete(true, new SubProgressMonitor(monitor, 1));
      }
View Full Code Here

    monitor.worked(5);
    monitor.subTask("Replacing original model");

    // rename the tempFile
    o.delete(true, monitor);
    tempFile.move(o.getFullPath(), true, monitor);
    tempJavaFile.delete();
   
    // finished
    monitor.done();
   
View Full Code Here

    createModule(testProject, "test.Module");
    // move module file into "resources"
    {
      IFile moduleFile = getFile("src/main/java/test/Module.gwt.xml");
      getFolder("src/main/resources/test");
      moduleFile.move(new Path("/TestProject/src/main/resources/test/Module.gwt.xml"), true, null);
    }
  }

  ////////////////////////////////////////////////////////////////////////////
  //
View Full Code Here

    GTestUtils.createModule(m_testProject, "test.Module");
    // move module file into "resources"
    {
      IFile moduleFile = getFile("src/main/java/test/Module.gwt.xml");
      getFolder("src/main/resources/test");
      moduleFile.move(new Path("/TestProject/src/main/resources/test/Module.gwt.xml"), true, null);
    }
  }

  ////////////////////////////////////////////////////////////////////////////
  //
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.