Examples of toFileString()


Examples of org.eclipse.emf.common.util.URI.toFileString()

    URI targetDefinitionLocation = targetPlatformLocation.trimFileExtension().appendFileExtension("target");
   
    if (hasContentDifferencesOtherThanSequenceNumber(targetDefinitionLocation, xml)) {
      OutputStream outputStream = null;
      try {
        outputStream = new BufferedOutputStream(new FileOutputStream(new File(targetDefinitionLocation.toFileString())));
        outputStream.write(xml.getBytes());
      } catch (Exception e) {
        ret.merge(BasicDiagnostic.toDiagnostic(e));
      } finally {
        try {
View Full Code Here

Examples of org.eclipse.emf.common.util.URI.toFileString()

  public boolean performFinish() {
    try {
      // Get the URI of the model file.
      //
      final URI fileURI = getModelURI();
      if (new File(fileURI.toFileString()).exists()) {
        if (!MessageDialog.openQuestion
            (getShell(),
             OntoUMLEditorPlugin.INSTANCE.getString("_UI_Question_title"),
             OntoUMLEditorPlugin.INSTANCE.getString("_WARN_FileConflict", new String []{ fileURI.toFileString() }))) {
          initialObjectCreationPage.selectFileField();
View Full Code Here

Examples of org.eclipse.emf.common.util.URI.toFileString()

      final URI fileURI = getModelURI();
      if (new File(fileURI.toFileString()).exists()) {
        if (!MessageDialog.openQuestion
            (getShell(),
             OntoUMLEditorPlugin.INSTANCE.getString("_UI_Question_title"),
             OntoUMLEditorPlugin.INSTANCE.getString("_WARN_FileConflict", new String []{ fileURI.toFileString() }))) {
          initialObjectCreationPage.selectFileField();
          return false;
        }
      }
     
View Full Code Here

Examples of org.eclipse.emf.common.util.URI.toFileString()

   * @generated
   */
  private static File getFile(Resource resource) {
    URI resourceUri = resource.getURI();
    if (resourceUri != null && resourceUri.isFile()) {
      File file = new File(resourceUri.toFileString());
      if (!file.isDirectory()) {
        return file;
      }
    }
    return null;
View Full Code Here

Examples of org.eclipse.emf.common.util.URI.toFileString()

  public boolean performFinish() {
    try {
      // Get the URI of the model file.
      //
      final URI fileURI = getModelURI();
      if (new File(fileURI.toFileString()).exists()) {
        if (!MessageDialog.openQuestion
            (getShell(),
             OntoUMLEditorPlugin.INSTANCE.getString("_UI_Question_title"),
             OntoUMLEditorPlugin.INSTANCE.getString("_WARN_FileConflict", new String []{ fileURI.toFileString() }))) {
          initialObjectCreationPage.selectFileField();
View Full Code Here

Examples of org.eclipse.emf.common.util.URI.toFileString()

      final URI fileURI = getModelURI();
      if (new File(fileURI.toFileString()).exists()) {
        if (!MessageDialog.openQuestion
            (getShell(),
             OntoUMLEditorPlugin.INSTANCE.getString("_UI_Question_title"),
             OntoUMLEditorPlugin.INSTANCE.getString("_WARN_FileConflict", new String []{ fileURI.toFileString() }))) {
          initialObjectCreationPage.selectFileField();
          return false;
        }
      }
     
View Full Code Here

Examples of org.eclipse.emf.common.util.URI.toFileString()

        monitor.worked(1);
    }

    private static String generateDestinationProjectFilePath( Resource resource, String name, String destinationDirectory ) {
        URI origURI = resource.getURI();
        File file = new File(origURI.toFileString());
        return destinationDirectory + File.separator + name + ".udig" + File.separator + file.getName(); //$NON-NLS-1$
    }

    private static void saveResource( Resource copy ) {
        try {
View Full Code Here

Examples of org.eclipse.emf.common.util.URI.toFileString()

        }
        if( getDialogSettings() != null){
            if( registery.getCurrentProject() != null ){
                URI uri = registery.getCurrentProject().getID();
                if( uri != null ){
                    String selected = uri.toFileString();
                    this.getDialogSettings().put("projectSelect", selected );
                }                       
            }
        }
View Full Code Here

Examples of org.eclipse.emf.common.util.URI.toFileString()

        IProjectElement elem = project.getElements().get(0);
       
        // Test remove project but leave files
    deleteAction.runDoDelete(project,false, Window.OK);
    assertEquals(0, registry.getProjects().size());
    assertTrue( new File(projecturi.toFileString()).exists() );
        assertFalse(resource.isLoaded());
       
    Project project=registry.getProject(projecturi);
    assertEquals(1, project.getElementsInternal().size());
        assertNotSame(elem, project.getElements().get(0));
View Full Code Here

Examples of org.eclipse.emf.common.util.URI.toFileString()

    assertEquals(project, project.getElementsInternal().get(0).getProject());
       
        // Test delete from file System
        deleteAction.runDoDelete(project,true, Window.OK);
        assertEquals(0, registry.getProjects().size());
        assertFalse( new File(projecturi.toFileString()).exists() );
  }

  class DeleteAccessor extends Delete {
    public DeleteAccessor() {
            super(true);
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.