Examples of IInterpreterInstall


Examples of org.eclipse.dltk.launching.IInterpreterInstall

    install.setInstallLocation(new LazyFileHandle(LocalEnvironment.ENVIRONMENT_ID,
      new org.eclipse.core.runtime.Path(installExePath.toString())));
    install.setName(installName);
    install.setInterpreterArgs(null);
    install.setLibraryLocations(null); // Use default locations
    IInterpreterInstall realInstall = install.convertToRealInterpreter();
    if(setAsDefault) {
      try {
        ScriptRuntime.setDefaultInterpreterInstall(realInstall, null);
      } catch(CoreException e) {
        throw melnorme.utilbox.core.ExceptionAdapter.unchecked(e);
View Full Code Here

Examples of org.eclipse.dltk.launching.IInterpreterInstall

    return scriptProject;
  }
 
  public static void checkInstall(IScriptProject project, String installTypeId, String installId)
      throws CoreException {
    IInterpreterInstall install = ScriptRuntime.getInterpreterInstall(project);
    assertNotNull(install);
    assertTrue(install.getInterpreterInstallType().getId().endsWith(installTypeId));
    assertTrue(install.getId().startsWith(installId));
  }
View Full Code Here

Examples of org.eclipse.dltk.launching.IInterpreterInstall

  private void checkRutaInterpreter() throws IOException, CoreException {
    // TODO move this method... it is called way too early when eclipse starts
    IEnvironment localEnv = LocalEnvironment.getInstance();
    DefaultInterpreterEntry defaultInterpreterEntry = new DefaultInterpreterEntry(
            RutaNature.NATURE_ID, localEnv.getId());
    IInterpreterInstall defaultInterpreterInstall = null;
    try {
      defaultInterpreterInstall = ScriptRuntime
              .getDefaultInterpreterInstall(defaultInterpreterEntry);
    } catch (Exception e) {
      error(e);
    }
    if(defaultInterpreterInstall == null) {
      // initialized too early
      return;
    }
    IFileHandle rawInstallLocation = defaultInterpreterInstall.getRawInstallLocation();
    if (!rawInstallLocation.exists()) {
      String pluginIdToJarPath = pluginIdToJarPath(RutaIdeUIPlugin.PLUGIN_ID);
      FileAsFileHandle fh = new FileAsFileHandle(new File(pluginIdToJarPath));
      defaultInterpreterInstall.setInstallLocation(fh);
      ScriptRuntime.setDefaultInterpreterInstall(defaultInterpreterInstall,
              new NullProgressMonitor());

    }
  }
View Full Code Here

Examples of org.eclipse.dltk.launching.IInterpreterInstall

  public static boolean isFixable(String pkgName, IScriptProject scriptProject) {
    IDLTKLanguageToolkit toolkit = null;
    toolkit = DLTKLanguageManager.getLanguageToolkit(scriptProject);
    if (toolkit != null && toolkit.getNatureId().equals(RutaNature.NATURE_ID)) {
      IInterpreterInstall install = null;
      try {
        install = ScriptRuntime.getInterpreterInstall(scriptProject);
      } catch (CoreException e) {
        if (DLTKCore.DEBUG) {
          e.printStackTrace();
View Full Code Here

Examples of org.eclipse.dltk.launching.IInterpreterInstall

    final String msg = Messages.RutaRequirePackageMarkerResolution_addPackageToBuildpath;
    return NLS.bind(msg, pkgName);
  }

  private boolean resolve() {
    final IInterpreterInstall install;
    try {
      install = ScriptRuntime.getInterpreterInstall(project);
      if (install != null) {
        final Set names = new HashSet();
        final Set autoNames = new HashSet();
View Full Code Here

Examples of org.eclipse.dltk.launching.IInterpreterInstall

    }
    return deeInstallTypes;
  }
 
  protected void addCompilerInstall(IInterpreterInstallType installType, IFileHandle compilerLocation) {
    IInterpreterInstall existingInstall = getExistingInstall(installType, compilerLocation);
    if(existingInstall != null) {
      return;
    }
    // Note: there can be multiple installs in same location if all have different compiler type.
   
View Full Code Here

Examples of org.eclipse.dltk.launching.IInterpreterInstall

  public static boolean isFixable(String pkgName, IScriptProject scriptProject) {
    IDLTKLanguageToolkit toolkit = null;
    toolkit = DLTKLanguageManager.getLanguageToolkit(scriptProject);
    if (toolkit != null && toolkit.getNatureId().equals(RutaNature.NATURE_ID)) {
      IInterpreterInstall install = null;
      try {
        install = ScriptRuntime.getInterpreterInstall(scriptProject);
      } catch (CoreException e) {
        if (DLTKCore.DEBUG) {
          e.printStackTrace();
View Full Code Here

Examples of org.eclipse.dltk.launching.IInterpreterInstall

    final String msg = Messages.RutaRequirePackageMarkerResolution_addPackageToBuildpath;
    return NLS.bind(msg, pkgName);
  }

  private boolean resolve() {
    final IInterpreterInstall install;
    try {
      install = ScriptRuntime.getInterpreterInstall(project);
      if (install != null) {
        final Set names = new HashSet();
        final Set autoNames = new HashSet();
View Full Code Here

Examples of org.eclipse.dltk.launching.IInterpreterInstall

  private void checkRutaInterpreter() throws IOException, CoreException {
    IEnvironment localEnv = LocalEnvironment.getInstance();
    DefaultInterpreterEntry defaultInterpreterEntry = new DefaultInterpreterEntry(
            RutaNature.NATURE_ID, localEnv.getId());
    IInterpreterInstall defaultInterpreterInstall = ScriptRuntime.getDefaultInterpreterInstall(defaultInterpreterEntry);
    IFileHandle rawInstallLocation = defaultInterpreterInstall.getRawInstallLocation();
    if(!rawInstallLocation.exists()) {
      String pluginIdToJarPath = pluginIdToJarPath(RutaIdePlugin.PLUGIN_ID);
      FileAsFileHandle fh = new FileAsFileHandle(new File(pluginIdToJarPath));
      defaultInterpreterInstall.setInstallLocation(fh);
      ScriptRuntime.setDefaultInterpreterInstall(defaultInterpreterInstall, new NullProgressMonitor());
     
    }
  }
View Full Code Here

Examples of org.eclipse.dltk.launching.IInterpreterInstall

    GnuParser parser = new GnuParser();
    org.apache.commons.cli.Options options = new org.apache.commons.cli.Options();
    options.addOption(OptionBuilder.hasArg().withLongOpt("interpreter").create());
    org.apache.commons.cli.CommandLine cli = parser.parse(options, args);

    IInterpreterInstall interpreter = null;
    if (cli.hasOption("interpreter")){
      String interpreterName = cli.getOptionValue("interpreter");
      IInterpreterInstallType[] types =
        ScriptRuntime.getInterpreterInstallTypes(getNatureId());
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.