Package org.eclipse.core.runtime

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


        return;
     
      IPath destination = partDestinationMap.get(root);
      IPath htmlDestination = getHTMLDestinationFor(destination);
      EObject resolved = partEObjectMap.get(root);
      finalMonitor.subTask("Writing " + htmlDestination.lastSegment());
     
      // construct the HTML
      StringBuffer html = new StringBuffer();
      html.append(getHTMLHeader(targetDiagram, resolved))
        .append(getBreadcrumb(resolved))
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) {
View Full Code Here

   
    editor = new FileFieldEditor("fileSelect","Select File: ",fileSelectionArea); //NON-NLS-1 //NON-NLS-2
    editor.getTextControl(fileSelectionArea).addModifyListener(new ModifyListener(){
      public void modifyText(ModifyEvent e) {
        IPath path = new Path(ImportWizardPage.this.editor.getStringValue());
        setFileName(path.lastSegment());
      }
    });
    String[] extensions = new String[] { "*.*" }; //NON-NLS-1
    editor.setFileExtensions(extensions);
    fileSelectionArea.moveAbove(null);
View Full Code Here

    final IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
    for (int i = 0; i < resolvedBuildpath.length; i++) {
      final IBuildpathEntry entry = resolvedBuildpath[i];
      if (entry.getEntryKind() == IBuildpathEntry.BPE_PROJECT) {
        final IPath path = entry.getPath();
        final IProject project = workspaceRoot.getProject(path.lastSegment());
        if (project.exists()) {
          packageCollector.getPackagesProvided().addAll(
                  manager.getInternalPackageNames(install, project));
        }
      }
View Full Code Here

  }

  private String getTypeSystemDescriptorFromScriptFile(IPath scriptFilePath) {
    IPath folder = scriptFilePath;

    while (!folder.lastSegment().equals(RutaProjectUtils.getDefaultScriptLocation())) {
      folder = folder.removeLastSegments(1);
    }
    IPath relativeTo = scriptFilePath.makeRelativeTo(folder);
    IPath projectPath = folder.removeLastSegments(1);
    String elementName = scriptFilePath.lastSegment();
View Full Code Here

    IFolder testFolder = project.getFolder(RutaProjectUtils.getDefaultTestLocation());
    IFolder descFolder = project.getFolder(RutaProjectUtils.getDefaultDescriptorLocation());
    IPath relativeTo = location.makeRelativeTo(testFolder.getLocation());
    IPath segments = relativeTo.removeLastSegments(2);
    String scriptName = segments.lastSegment();
    if(scriptName == null) {
      return null;
    }
    scriptName += "TypeSystem.xml";
    segments = segments.removeLastSegments(1);
View Full Code Here

  }

  public static synchronized String getEngineDescriptorFromTMSourceFile(IPath scriptFilePath) {
    IPath folder = scriptFilePath;

    while (!folder.lastSegment().equals(RutaProjectUtils.getDefaultScriptLocation())) {
      folder = folder.removeLastSegments(1);
    }
    IPath relativeTo = scriptFilePath.makeRelativeTo(folder);
    IPath projectPath = folder.removeLastSegments(1);
    String elementName = scriptFilePath.lastSegment();
View Full Code Here

  }

  public static synchronized String getTypeSystemDescriptorFromTMSourceFile(IPath scriptFilePath) {
    IPath folder = scriptFilePath;

    while (!folder.lastSegment().equals(RutaProjectUtils.getDefaultScriptLocation())) {
      folder = folder.removeLastSegments(1);
    }
    IPath relativeTo = scriptFilePath.makeRelativeTo(folder);
    IPath projectPath = folder.removeLastSegments(1);
    String elementName = scriptFilePath.lastSegment();
View Full Code Here

        getSite().getPage().addSelectionListener(this);
        FileEditorInput fileInput = (FileEditorInput) input;
        this.definitionFile = fileInput.getFile();
        IPath path = fileInput.getPath().removeLastSegments(1);
        path = path.removeFirstSegments(path.segmentCount() - 1);
        setPartName(path.lastSegment());
        definition = ProcessCache.getProcessDefinition(definitionFile);
        definition.setDirty(false);
        ResourcesPlugin.getWorkspace().addResourceChangeListener(this, IResourceChangeEvent.POST_CHANGE);
        definition.addPropertyChangeListener(this);
    }
View Full Code Here

            // Add the jars from runtime/modules
            File modulesDirectory = runtimePath.append("modules").toFile();
            if (modulesDirectory != null && modulesDirectory.exists()) {
                for (File file : modulesDirectory.listFiles()) {
                    IPath path = new Path(file.getPath());
                    String name = path.lastSegment();
                    String extension = path.getFileExtension();
                   
                    // Only include API and launcher JARs
                    if (!"jar".equals(extension)) {
                        continue;
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.