Examples of Sdk


Examples of com.android.ide.eclipse.adt.internal.sdk.Sdk

        OptionBuilder.hasArg().isRequired().withLongOpt("application").create());
    options.addOption(OptionBuilder.hasArg().withLongOpt("activity").create());
    options.addOption(OptionBuilder.withLongOpt("library").create());
    org.apache.commons.cli.CommandLine cli = parser.parse(options, args);

    Sdk sdk = Sdk.getCurrent();

    String targetHash = cli.getOptionValue("target");
    IAndroidTarget target = sdk.getTargetFromHashString(targetHash);

    Map<String,Object> parameters = new HashMap<String,Object>();
    parameters.put("SDK_TARGET", target);
    parameters.put("SRC_FOLDER", SdkConstants.FD_SOURCES);
    parameters.put("IS_NEW_PROJECT", true);
View Full Code Here

Examples of com.intellij.openapi.projectRoots.Sdk

        }
        return Collections.emptyMap();
    }

    private static void addStandardImports(Module module, String symbol, List<String> imports, ImportTrie importTrie) {
        Sdk sdk = ModuleRootManager.getInstance(module).getSdk();
        if (sdk == null)
            return;
        SdkAdditionalData sdkAdditionalData = sdk.getSdkAdditionalData();
        if (!(sdkAdditionalData instanceof HaskellSdkAdditionalData))
            return;
        HaskellSdkAdditionalData data = (HaskellSdkAdditionalData) sdkAdditionalData;
        Map<String, SortedSet<String>> autoImports = data.getAutoImports();
        addImports(imports, autoImports, symbol, importTrie);
View Full Code Here

Examples of com.intellij.openapi.projectRoots.Sdk

        Set<Module> noGhcModules = new HashSet<Module>();
        for (Module module : modules) {
            if (!isAcceptableModuleType(module))
                continue;
            Sdk sdk = ModuleRootManager.getInstance(module).getSdk();
            if (sdk == null || !(sdk.getSdkType() instanceof HaskellSdkType)) {
                noGhcModules.add(module);
            }
        }

        if (!noGhcModules.isEmpty()) {
View Full Code Here

Examples of com.intellij.openapi.projectRoots.Sdk

                    try {
                        HaskellParameters parameters = getHaskellParameters();
                        if (parameters == null) {
                            throw new CantRunException("Configuration parameters not specified");
                        }
                        Sdk ghc = parameters.getGhc();
                        if (ghc == null) {
                            throw new CantRunException(NO_GHC);
                        }

                        SdkTypeId sdkTypeId = ghc.getSdkType();
                        if (!(sdkTypeId instanceof HaskellSdkType)) {
                            throw new CantRunException(NO_GHC);
                        }

                        String exePath = ghc.getHomePath() + "/bin/" + GHCUtil.getExeName("runghc"); // todo
                        if (!new File(exePath).isFile()) {
                            throw new CantRunException("Cannot find runghc executable");
                        }
                        String mainFile = parameters.getMainFile();
                        if (mainFile == null) {
View Full Code Here

Examples of com.intellij.openapi.projectRoots.Sdk

    public void configureByModule(@NotNull Module module) {
        setGhc(getModuleGhc(module));
    }

    public static Sdk getModuleGhc(@NotNull Module module) {
        Sdk ghc = ModuleRootManager.getInstance(module).getSdk();
        if (ghc == null)
            return null;
        VirtualFile homeDirectory = ghc.getHomeDirectory();
        if (homeDirectory == null || !homeDirectory.isValid())
            return null;
        return ghc;
    }
View Full Code Here

Examples of com.intellij.openapi.projectRoots.Sdk

    @Override
    public void setupRootModel(ModifiableRootModel rootModel) throws ConfigurationException {
        ProjectJdkTable table = ProjectJdkTable.getInstance();
        Sdk[] sdks = table.getAllJdks();
        Sdk ghc = null;
        for (Sdk sdk : sdks) {
            if (sdk.getSdkType().equals(HaskellSdkType.INSTANCE)) {
                ghc = sdk;
                break;
            }
View Full Code Here

Examples of com.intellij.openapi.projectRoots.Sdk

    @Nullable
    static AskUtil get(@Nullable Module module, String mainFile) {
        if (module == null)
            return null;
        Sdk sdk = ModuleRootManager.getInstance(module).getSdk();
        if (sdk == null)
            return null;
        VirtualFile ghcHome = sdk.getHomeDirectory();
        if (ghcHome == null)
            return null;
        SdkAdditionalData sdkAdditionalData = sdk.getSdkAdditionalData();
        if (!(sdkAdditionalData instanceof HaskellSdkAdditionalData))
            return null;
        HaskellSdkAdditionalData data = (HaskellSdkAdditionalData) sdkAdditionalData;
        String libDir = data.getLibPath();
        if (libDir == null)
            return null;
        File pluginPath = new File(new File(System.getProperty("user.home"), ".ideah"), sdk.getVersionString());
        pluginPath.mkdirs();
        File exe = new File(pluginPath, GHCUtil.getExeName(mainFile));
        return new AskUtil(ghcHome, libDir, data.getCabalPath(), data.getGhcOptions(), pluginPath, exe, mainFile, data);
    }
View Full Code Here

Examples of com.intellij.openapi.projectRoots.Sdk

    private HaskellConsoleView createConsoleView() {
        return new HaskellConsoleView(project, consoleTitle, historyModel);
    }

    private static GeneralCommandLine createCommandLine(Module module, String workingDir) throws CantRunException {
        Sdk sdk = ModuleRootManager.getInstance(module).getSdk();
        VirtualFile homePath;
        if (sdk == null || !(sdk.getSdkType() instanceof HaskellSdkType) || sdk.getHomePath() == null) {
            throw new CantRunException("Invalid SDK Home path set. Please set your SDK path correctly.");
        } else {
            homePath = sdk.getHomeDirectory();
        }
        GeneralCommandLine line = new GeneralCommandLine();
        line.setExePath(GHCUtil.getCommandPath(homePath, "ghci"));
        line.setWorkDirectory(workingDir);
        SdkAdditionalData sdkAdditionalData = sdk.getSdkAdditionalData();
        if (sdkAdditionalData instanceof HaskellSdkAdditionalData) {
            HaskellSdkAdditionalData data = (HaskellSdkAdditionalData) sdkAdditionalData;
            CommandLineTokenizer tokenizer = new CommandLineTokenizer(data.getGhcOptions());
            while (tokenizer.hasMoreTokens()) {
                line.addParameter(tokenizer.nextToken());
View Full Code Here

Examples of com.intellij.openapi.projectRoots.Sdk

  private static boolean compileModule(final CompileContext context, @NotNull final Module module) {
    final HaxeModuleSettings settings = HaxeModuleSettings.getInstance(module);
    final boolean isDebug = ExecutorRegistry.getInstance()
      .isStarting(context.getProject(), DefaultDebugExecutor.EXECUTOR_ID, HaxeDebugRunner.HAXE_DEBUG_RUNNER_ID);
    final ModuleRootManager moduleRootManager = ModuleRootManager.getInstance(module);
    final Sdk sdk = moduleRootManager.getSdk();
    if (sdk == null) {
      context.addMessage(CompilerMessageCategory.ERROR, HaxeBundle.message("no.sdk.for.module", module.getName()), null, -1, -1);
      return false;
    }
    boolean compiled = HaxeCommonCompilerUtil.compile(new HaxeCommonCompilerUtil.CompilationContext() {
      private String myErrorRoot;

      @NotNull
      @Override
      public HaxeModuleSettingsBase getModuleSettings() {
        return settings;
      }

      @Override
      public String getModuleName() {
        return module.getName();
      }

      @Override
      public void errorHandler(String message) {
        context.addMessage(CompilerMessageCategory.ERROR, message, null, -1, -1);
      }

      @Override
      public void log(String message) {
        LOG.debug(message);
      }

      @Override
      public String getSdkName() {
        return sdk.getName();
      }

      @Override
      public String getSdkHomePath() {
        return sdk.getHomePath();
      }

      @Override
      public String getHaxelibPath() {
        SdkAdditionalData data = sdk.getSdkAdditionalData();
        return data instanceof HaxeSdkAdditionalDataBase ? ((HaxeSdkAdditionalDataBase)data).getHaxelibPath() : null;
      }

      @Override
      public boolean isDebug() {
View Full Code Here

Examples of com.intellij.openapi.projectRoots.Sdk

                                                   final Module module,
                                                   RunContentDescriptor contentToReuse,
                                                   ExecutionEnvironment env,
                                                   String urlToLaunch,
                                                   String flexSdkName) throws ExecutionException {
    final Sdk flexSdk = FlexSdkUtils.findFlexOrFlexmojosSdk(flexSdkName);
    if (flexSdk == null) {
      throw new ExecutionException(HaxeBundle.message("flex.sdk.not.found", flexSdkName));
    }

    final FlexBuildConfiguration bc = new FakeFlexBuildConfiguration(flexSdk, urlToLaunch);
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.