Package org.eclipse.core.runtime

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


                location = ResourceUtils.relativeToAbsolute(location);
            }
            if (!isValidPath(location)) {
                continue;
            }
            locationStr = location.toOSString();
            if (!pdeClassPath.contains(locationStr)) {
                pdeClassPath.add(locationStr);
            }
        }
    }
View Full Code Here


        IProjectNature nature = rProject.getNature(JavaCore.NATURE_ID);
        if (nature != null) {
            IJavaProject javaProject = (IJavaProject) nature;
            IPath output = javaProject.getOutputLocation();
            String substitutedOutput = PathUtils.substituteProjectPath(rProject, output
                            .toOSString());
            classpath.add(substitutedOutput);

            IClasspathEntry[] classpathEntries = javaProject.getResolvedClasspath(true);
            if (classpathEntries != null && classpathEntries.length > 0) {
View Full Code Here

                            break;
                        case IClasspathEntry.CPE_LIBRARY:
                        case IClasspathEntry.CPE_VARIABLE:
                        case IClasspathEntry.CPE_CONTAINER:
                            IPath path = e.getPath();
                            additionalPath = path.toOSString();
                            if (!path.toFile().exists()
                                            && additionalPath.startsWith("/" + rProject.getName())) {
                                additionalPath = PathUtils.substituteProjectPath(rProject,
                                                additionalPath);
                            }
View Full Code Here

     
      finalMonitor.worked(1);
     
      // export HTML page
      try {
        File destFile = new File(htmlDestination.toOSString());
        FileWriter fw = new FileWriter(destFile);
        fw.write(html.toString());
        fw.close();
      } catch (IOException e) {
        throw new ExportImageException("Could not export individual HTML page '" + htmlDestination + "': " + e.getMessage(), e);
View Full Code Here

    }
   
    // export Latex page
    IPath latexDestination = targetDiagram.getLocation().removeFileExtension().addFileExtension("tex");
    try {
      File destFile = new File(latexDestination.toOSString());
      FileWriter fw = new FileWriter(destFile);
     
      // we want to sort the latex output based on EObject depth
      List<EObject> objectList = new ArrayList<EObject>(latexMap.keySet());
      Collections.sort(objectList, new EObjectDepthComparator());
View Full Code Here

    // does the folder exist?
    // get the folder name from the diagram, e.g. Foo.iaml_diagram -> "Foo"
    String newFolderName = targetDiagram.getFullPath().removeFileExtension().lastSegment();
   
    IPath targetFolder = source.removeLastSegments(1).append(newFolderName).addTrailingSeparator();
    File f = new File(targetFolder.toOSString());
    if (!f.exists()) {
      if (!f.mkdir()) {
        // could not create directory
        throw new ExportImageException("Could not mkdir: '" + f + "'");
      }
View Full Code Here

    if (input instanceof IURIEditorInput && !(input instanceof IFileEditorInput)) {
      FileDialog dialog= new FileDialog(shell, SWT.SAVE);
      IPath oldPath= URIUtil.toPath(((IURIEditorInput)input).getURI());
      if (oldPath != null) {
        dialog.setFileName(oldPath.lastSegment());
        dialog.setFilterPath(oldPath.toOSString());
      }
     
      String path= dialog.open();
      if (path == null) {
        if (progressMonitor != null)
View Full Code Here

          return desc.getContentType();
      } catch (IOException x) {
        IPath path= storage.getFullPath();
        String name;
        if (path != null)
          name= path.toOSString();
        else
          name= storage.getName();
        String message;
        if (name != null)
          message= NLSUtility.format(TextEditorMessages.StorageDocumentProvider_getContentDescriptionFor, name);
View Full Code Here

     */
    private String getPolicySource() {
        IPath fullPath = creationPage.getContainerFullPath();
        fullPath = fullPath.removeFirstSegments(1);
        fullPath = fullPath.makeRelative();
        return fullPath.toOSString();
    }

    /**
     * Returns the type of policy created by this wizard.
     *
 
View Full Code Here

            problemType = PROBLEM_NONE;
            boolean result = super.validateContainer();
            if (result) {
                IPath policySourcePath = getPolicySourcePath();
                if (policySourcePath != null) {
                    String policySource = policySourcePath.toOSString();

                    int index = super.getContainerFullPath().toOSString().
                            indexOf(policySource);
                    if (index < 0) {
                        Object formatArgs[] = new Object[]{policySourcePath};
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.