Examples of GoPath


Examples of com.googlecode.goclipse.tooling.env.GoPath

  @Override
  protected ILaunchConfiguration createConfiguration(ILaunchTarget launchable) {
    Path packageLocation = launchable.getAssociatedResource().getLocation().toFile().toPath();
    IProject project = launchable.getProject();
   
    GoPath goPath = GoProjectEnvironment.getEffectiveGoPath(project);
    GoPackageName goPackage = goPath.findGoPackageForSourceFile(packageLocation.resolve("dummy.go"));
    String suggestedName = project.getName() + " - " + goPackage.getFullNameAsString();
    return super.createConfiguration(launchable, suggestedName);
  }
View Full Code Here

Examples of com.googlecode.goclipse.tooling.env.GoPath

    return new GoOs(getEffectiveValue_NonNull(GoEnvironmentPrefs.GO_OS, project, GOOS));
  }
 
  public static GoPath getEffectiveGoPath(IProject project) {
    String goPathPref = getEffectiveValue_NonNull(GoEnvironmentPrefs.GO_PATH, project, GOPATH);
    GoPath rawGoPath = new GoPath(goPathPref);
    if(project == null) {
      return rawGoPath;
    }
   
    IPath location = project.getLocation();
    if(location == null) {
      return rawGoPath;
    }
    java.nio.file.Path projectPath = location.toFile().toPath();
   
    java.nio.file.Path goPathEntry = rawGoPath.findGoPathEntryForSourcePath(projectPath);
    if(goPathEntry != null) {
      // GOPATH already contains project location
      return rawGoPath;
    }
   
    // Implicitly add project location to GOPATH
    ArrayList2<String> newGoPathEntries = new ArrayList2<>(projectPath.toString());
    newGoPathEntries.addElements(rawGoPath.getGoPathEntries());
   
    return new GoPath(newGoPathEntries);
  }
View Full Code Here

Examples of com.googlecode.goclipse.tooling.env.GoPath

   
    return new GoPath(newGoPathEntries);
  }
 
  public static boolean isProjectInsideGoPath(IProject project) throws CoreException {
    GoPath goPath = getEffectiveGoPath(project);
    return isProjectInsideGoPath(project, goPath);
  }
View Full Code Here

Examples of com.googlecode.goclipse.tooling.env.GoPath

   */
  public static GoEnvironment getGoEnvironment(IProject project) {
    GoRoot goRoot = getEffectiveGoRoot(project);
    GoArch goArch = getEffectiveGoArch(project);
    GoOs goOs = getEffectiveGoOs(project);
    GoPath goPath = getEffectiveGoPath(project);
    return new GoEnvironment(goRoot, goArch, goOs, goPath);
  }
View Full Code Here

Examples of com.googlecode.goclipse.tooling.env.GoPath

    return getGoEnvironment(project).isValid();
  }
 
  public static Collection<GoPackageName> getSourcePackages(IProject project, GoEnvironment goEnvironment)
      throws CoreException {
    GoPath goPath = goEnvironment.getGoPath();
    return goPath.findSourcePackages(ResourceUtils.getProjectLocation(project));
  }
View Full Code Here

Examples of com.googlecode.goclipse.tooling.env.GoPath

   
    ArrayList2<GoPathElement> buildpathChildren = new ArrayList2<>();
   
    buildpathChildren.add(new GoRootElement(goRootSource.toFile()));
   
    GoPath effectiveGoPath = goEnvironment.getGoPath();
   
    for (String goPathEntry : effectiveGoPath.getGoPathEntries()) {
      Path goPathEntryPath;
      try {
        goPathEntryPath = MiscUtil.createPath(goPathEntry);
      } catch (InvalidPathExceptionX e) {
        continue; // TODO: create error element
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.