Examples of toPortableString()


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

        for (String sf: srcs) {
          final IPath p = new Path(sf + "/" + fr);
          // getProject().getWorkspace().getRoot().getFile(new Path(depPath));
          final IResource toRes = file.getProject().findMember(p)
          getPlugin().writeInfoMsg(
              "DependenciesCollector looks for: " + p.toPortableString());
          if (toRes != null && toRes instanceof IFile) {
            final IFile to = (IFile) toRes;
            // avoid endless recursion for frege.prelude.Base -> frege.prelude.Base
            if (!file.equals(to))  {
              this.fPackages.put(pack, to);
View Full Code Here

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

    final Date date = new Date(_timestamp);
    final String sdate = this.formatter.format(date);
    String _hexString = Integer.toHexString(event.workspace);
    IPath _append = this.storagePath.append(_hexString);
    IPath _append_1 = _append.append((sdate + ".log"));
    final String name = _append_1.toPortableString();
    try {
      FileWriter _fileWriter = new FileWriter(name, false);
      BufferedWriter _bufferedWriter = new BufferedWriter(_fileWriter);
      PrintWriter _printWriter = new PrintWriter(_bufferedWriter);
      this.file = _printWriter;
View Full Code Here

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

                IResource resource = marker.getResource();
                if (resource != null) {
                    IPath location = resource.getLocation();
                    if (location != null) {
                        line.append(location.toPortableString());
                    } else {
                        line.append(resource.getFullPath());
                    }
                }
                Integer lineNumber = (Integer) marker.getAttribute(IMarker.LINE_NUMBER);
View Full Code Here

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

  @Test public void should_use_variable_if_path_contains_project_name() {
    IPath path = Path.fromOSString("/test/src/test");
    when(project.getName()).thenReturn("test");
    IPath newPath = ProjectVariable.replaceProjectNameWithProjectVariable(path, project);
    assertThat(newPath.toPortableString(), equalTo("/${project}/src/test"));
  }

  @Test public void should_not_use_variable_if_path_does_not_contain_project_name() {
    IPath path = Path.fromOSString("/main/src/test");
    when(project.getName()).thenReturn("test");
View Full Code Here

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

  @Test public void should_not_use_variable_if_path_does_not_contain_project_name() {
    IPath path = Path.fromOSString("/main/src/test");
    when(project.getName()).thenReturn("test");
    IPath newPath = ProjectVariable.replaceProjectNameWithProjectVariable(path, project);
    assertThat(newPath.toPortableString(), equalTo("/main/src/test"));
  }

  @Test public void should_not_use_variable_if_path_already_contains_it() {
    IPath path = Path.fromOSString("/${project}/src/test");
    when(project.getName()).thenReturn("test");
View Full Code Here

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

  @Test public void should_not_use_variable_if_path_already_contains_it() {
    IPath path = Path.fromOSString("/${project}/src/test");
    when(project.getName()).thenReturn("test");
    IPath newPath = ProjectVariable.replaceProjectNameWithProjectVariable(path, project);
    assertThat(newPath.toPortableString(), equalTo("/${project}/src/test"));
  }
}
View Full Code Here

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

  @Test public void should_use_project_name_if_path_contains_variable() {
    when(project.getName()).thenReturn("test");
    IPath path = Path.fromOSString("/${project}/src/test");
    IPath newPath = ProjectVariable.replaceProjectVariableWithProjectName(path, project);
    assertThat(newPath.toPortableString(), equalTo("/test/src/test"));
  }

  @Test public void should_not_use_project_name_if_path_does_not_contain_variable() {
    when(project.getName()).thenReturn("test");
    IPath path = Path.fromOSString("/main/src/test");
View Full Code Here

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

  @Test public void should_not_use_project_name_if_path_does_not_contain_variable() {
    when(project.getName()).thenReturn("test");
    IPath path = Path.fromOSString("/main/src/test");
    IPath newPath = ProjectVariable.replaceProjectVariableWithProjectName(path, project);
    assertThat(newPath.toPortableString(), equalTo("/main/src/test"));
  }

  @Test public void should_not_use_project_name_if_path_already_contains_it() {
    when(project.getName()).thenReturn("test");
    IPath path = Path.fromOSString("/test/src/test");
View Full Code Here

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

  @Test public void should_not_use_project_name_if_path_already_contains_it() {
    when(project.getName()).thenReturn("test");
    IPath path = Path.fromOSString("/test/src/test");
    IPath newPath = ProjectVariable.replaceProjectVariableWithProjectName(path, project);
    assertThat(newPath.toPortableString(), equalTo("/test/src/test"));
  }
}
View Full Code Here

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

      actualPath = matcher.group(1);
      isWorkspacePath = true;
      if (project != null) {
        IPath newPath = replaceProjectVariableWithProjectName(Path.fromOSString(actualPath), project);
        // Issue 204: we'll create an URI from this path. It must not have OS-specific path separators.
        actualPath = newPath.toPortableString();
      }
    }
    return new DirectoryPath(actualPath, isWorkspacePath);
  }
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.