Package org.eclipse.core.runtime

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


    IVResource userFile = user.getResource(path.toString());

    if ( userFile != null && !userFile.exists() ) {
      if ( path.getFileExtension() == null ) {
        userFile = user.getResource(path.addFileExtension("html").toString());
      }
      if ( !userFile.exists() ) {
        theLogger.warning("user file not found: " + path);
        resp.sendError(HttpServletResponse.SC_NOT_FOUND);
        return;
View Full Code Here


        }
        final IContainer container = (IContainer) resource;
        IPath path = new Path(fileName);
        final String ext = path.getFileExtension();
        if (!"erlScratchPad".equals(ext)) {
            path = path.addFileExtension("erlScratchPad");
        }
        final IFile file = container.getFile(path);
        try {
            final InputStream stream = openContentStream();
            if (file.exists()) {
View Full Code Here

            throwCoreException("Container \"" + containerName + "\" does not exist.");
        }
        final IContainer container = (IContainer) resource;
        IPath path = new Path(fileName);
        if (!CommonUtils.isErlangFileContentFileName(fileName)) {
            path = path.addFileExtension("erl");
        }
        final IFile file = container.getFile(path);
        try {
            final InputStream stream = openContentStream(skeleton);
            if (file.exists()) {
View Full Code Here

    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

    if (module.length == 2) {
      IModule workingModule = module[module.length - 1];
      modulePath = modulePath.append(workingModule.getName());
      if (GeronimoUtils.isWebModule(workingModule)) {
        modulePath = modulePath.addFileExtension("war");
      } else if (GeronimoUtils.isEjbJarModule(workingModule)) {
        modulePath = modulePath.addFileExtension("jar");
      } else if (GeronimoUtils.isRARModule(workingModule)) {
        modulePath = modulePath.addFileExtension("rar");
      } else if (GeronimoUtils.isEarModule(workingModule)) {
View Full Code Here

      IModule workingModule = module[module.length - 1];
      modulePath = modulePath.append(workingModule.getName());
      if (GeronimoUtils.isWebModule(workingModule)) {
        modulePath = modulePath.addFileExtension("war");
      } else if (GeronimoUtils.isEjbJarModule(workingModule)) {
        modulePath = modulePath.addFileExtension("jar");
      } else if (GeronimoUtils.isRARModule(workingModule)) {
        modulePath = modulePath.addFileExtension("rar");
      } else if (GeronimoUtils.isEarModule(workingModule)) {
        modulePath = modulePath.addFileExtension("ear");
      } else if (GeronimoUtils.isAppClientModule(workingModule)) {
View Full Code Here

      if (GeronimoUtils.isWebModule(workingModule)) {
        modulePath = modulePath.addFileExtension("war");
      } else if (GeronimoUtils.isEjbJarModule(workingModule)) {
        modulePath = modulePath.addFileExtension("jar");
      } else if (GeronimoUtils.isRARModule(workingModule)) {
        modulePath = modulePath.addFileExtension("rar");
      } else if (GeronimoUtils.isEarModule(workingModule)) {
        modulePath = modulePath.addFileExtension("ear");
      } else if (GeronimoUtils.isAppClientModule(workingModule)) {
        modulePath = modulePath.addFileExtension("jar");
      }
View Full Code Here

      } else if (GeronimoUtils.isEjbJarModule(workingModule)) {
        modulePath = modulePath.addFileExtension("jar");
      } else if (GeronimoUtils.isRARModule(workingModule)) {
        modulePath = modulePath.addFileExtension("rar");
      } else if (GeronimoUtils.isEarModule(workingModule)) {
        modulePath = modulePath.addFileExtension("ear");
      } else if (GeronimoUtils.isAppClientModule(workingModule)) {
        modulePath = modulePath.addFileExtension("jar");
      }
    }
View Full Code Here

      } else if (GeronimoUtils.isRARModule(workingModule)) {
        modulePath = modulePath.addFileExtension("rar");
      } else if (GeronimoUtils.isEarModule(workingModule)) {
        modulePath = modulePath.addFileExtension("ear");
      } else if (GeronimoUtils.isAppClientModule(workingModule)) {
        modulePath = modulePath.addFileExtension("jar");
      }
    }

        Trace.tracePoint("Exit ", "GeronimoServerBehaviourDelegate.getModulePath", modulePath);
    return modulePath;
View Full Code Here

    if (path.segmentCount() > 0 && ensureTargetFileIsValid(path.toFile())
        && path.getFileExtension() == null) {
      if (pharCompressRadio.getSelection()) {
        if (!PharConstants.PHAR_EXTENSION.equals(path
            .getFileExtension())) {
          path = path.addFileExtension(PharConstants.PHAR_EXTENSION);
        }
      } else if (zipCompressRadio.getSelection()) {
        if (!PharConstants.PHAR_EXTENSION_ZIP.equals(path
            .getFileExtension())) {
          path = path
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.