Examples of addFileExtension()


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

        PolicyBuilder policyBuilder = getPolicy();
        try {
            // Generate the path to which the policy will be written
            final IPath containerPath = creationPage.getContainerFullPath();
            IPath newPolicyPath = containerPath.append(creationPage.getPolicyName());
            newPolicyPath = newPolicyPath.
                    addFileExtension(creationPage.getPolicyExtension());

            IProject project = creationPage.getProject();

            // Add an MCSProjectNature derived from the projectPropertiesPage to the
View Full Code Here

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

          newPath = path.append(sourceType.getDeclaringType().getElementName() + "$" + getArguments().getNewName());
        } else {
          newPath = path.append(getArguments().getNewName());
        }
        if (newPath.getFileExtension() == null) {
          newPath = newPath.addFileExtension("html");
        }
        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);
View Full Code Here

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

            if (ff.getName().startsWith(sourceType.getTypeQualifiedName() + "_")) { // variation
              nfn = ff.getFullPath().removeLastSegments(1).append(getArguments().getNewName() + ff.getName().substring(ff.getName().indexOf("_")));
            } else if (ff.getName().startsWith(sourceType.getTypeQualifiedName() + "$")) { // inner type
              nfn = ff.getFullPath().removeLastSegments(1).append(getArguments().getNewName() + ff.getName().substring(ff.getName().indexOf("$")));
            } else {
              nfn = nfn.addFileExtension("html");
            }
            ff.refreshLocal(SAVE_IF_DIRTY, paramIProgressMonitor);
            ff.move(nfn, true, true, paramIProgressMonitor);
          }
        }
View Full Code Here

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

            if (ff.getName().startsWith(sourceType.getTypeQualifiedName() + "_")) { // variation
              nfn = ff.getFullPath().removeLastSegments(1).append(getArguments().getNewName() + ff.getName().substring(ff.getName().indexOf("_")));
            } else if (ff.getName().startsWith(sourceType.getTypeQualifiedName() + "$")) { // inner type

            } else {
              nfn = nfn.addFileExtension("properties");
            }
            ff.refreshLocal(SAVE_IF_DIRTY, paramIProgressMonitor);
            ff.move(nfn, true, true, paramIProgressMonitor);
          }
        }
View Full Code Here

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

    return ResourcesPlugin.getWorkspace().getRoot().getFile(path);
  }

  private static IPath getFilePath(String baseName) {
    IPath path = new Path(baseName.replace('.', '/'));
    path = path.addFileExtension("properties");//$NON-NLS-1$
    return path;
  }

  private static IStorage getJarFile(IJavaProject javaProject, String baseName)
      throws JavaModelException {
View Full Code Here

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

            String extension = filePath.getFileExtension();
            filePath = filePath.removeFirstSegments(webContentPath.segmentCount());
            filePath = filePath.removeLastSegments(1);
            filePath = filePath.append(value);
            if (filePath.getFileExtension() == null && extension != null) {
              filePath = filePath.addFileExtension(extension);
            }
            IVirtualFile file = webRoot.getFile(filePath);
            if (file.exists()) {
              return true;
            }
View Full Code Here

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

      IPath annotationFolder = annotationPath.removeLastSegments(1);
      // append location of propertiles file
      IPath propertiesFile = annotationFolder.append(propertiesLocation);
      // append .properties extension if needed
      if (propertiesFile.getFileExtension() == null)
        propertiesFile = propertiesFile.addFileExtension("properties"); //$NON-NLS-1$
      // create a URL out of the properties file location
      propertiesURL = Platform.find(Platform.getBundle(fileInfo.getBundleId()), propertiesFile);
      return propertiesURL;
    }
View Full Code Here

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

//      dfile.mkdirs();
//    }

    IPath path = p.getFullPath().append("/" + getLocation());
    path = path.append("/" + _pageOne.getFileName());
    path = path.addFileExtension(getFileExtension());
    IFile file = createFileHandle(path);

    if (!file.exists())
    {
      createFile(file, getInitialContents());
View Full Code Here

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

  private static void createLink(IProject project, Library lib, String file,
      String outputFolder) throws CoreException
  {
    IPath path = project.getFullPath().append("/" + outputFolder);
    path = path.append("/" + file.substring(0, file.indexOf('.')));
    path = path.addFileExtension(file.substring(file.indexOf('.') + 1));
    IFile newFile = createFileHandle(path);
    Bundle b = Platform.getBundle(ILibrariesConstants.PLUGIN_ID);
    String location = b.getLocation();
    // System.out.println("Bundle location: " + location);
    IPath systemfilePath = null;
View Full Code Here

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

      rootPath = rootPath.append(packageName.replace('.', '/'));
    }

    IPath moduleFilePath = rootPath.append(typeName);

    moduleFilePath = moduleFilePath.addFileExtension("java");

    return moduleFilePath;
  }

  public void createEntryPoint(IProject projectHandle, String packName, String typeName,
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.