Package ideah.util

Examples of ideah.util.CompilerLocation


            insertImport(rootNode, imp, EXTERNAL_WEIGHT);
        }
    }

    static ImportTrie get(Module module, String path, List<String> otherFiles) {
        CompilerLocation compiler = CompilerLocation.get(module);
        if (compiler == null)
            return null;
        List<String> args = compiler.getCompileOptionsList(
            "-m", "AllImportsWithPkgs",
            path
        );
        args.addAll(otherFiles);
        try {
View Full Code Here


    static final String EOLN = "\n";

    public static List<GHCMessage> compile(VirtualFile output, String fileName, @NotNull Module module, boolean tests) {
        try {
            CompilerLocation compiler = CompilerLocation.get(module);
            if (compiler == null)
                return Collections.emptyList();
            List<String> args = compiler.getCompileOptionsList(
                "-m", "Compile",
                "-s", GHCUtil.rootsAsString(module, tests)
            );
            if (output != null) {
                args.addAll(Arrays.asList(
View Full Code Here

        final PsiFile file = element.getContainingFile();
        VirtualFile virtualFile = file.getVirtualFile();
        if (virtualFile == null)
            return null;
        Module module = DeclarationPosition.getDeclModule(file);
        CompilerLocation compiler = CompilerLocation.get(module);
        if (compiler == null)
            return null;
        List<String> args = compiler.getCompileOptionsList(
            "-m", "ParseTree",
            virtualFile.getPath()
        );
        ProcessLauncher launcher = new ProcessLauncher(false, virtualFile.getInputStream(), args);
        String stdOut = launcher.getStdOut();
View Full Code Here

//        }
//        return null;
//    }

    static boolean hasMain(VirtualFile file, Module module) throws IOException, InterruptedException {
        CompilerLocation compiler = CompilerLocation.get(module);
        if (compiler == null) {
            return false;
        }
        List<String> args = compiler.getCompileOptionsList(
            "-m", "CheckMain",
            file.getPath()
        );
        ProcessLauncher launcher = new ProcessLauncher(false, file.getInputStream(), args);
        String stdOut = launcher.getStdOut();
View Full Code Here

        Module module = DeclarationPosition.getDeclModule(psiFile);
        List<GHCMessage> ghcMessages = LaunchGHC.compile(null, path, module, true);
        final List<Import> redundantImports = getRedundantImports(ghcMessages);
        if (redundantImports.isEmpty())
            return empty;
        final CompilerLocation compiler = CompilerLocation.get(module);
        if (compiler == null)
            return empty;
        return new Runnable() {

            @Override
View Full Code Here

TOP

Related Classes of ideah.util.CompilerLocation

Copyright © 2018 www.massapicom. 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.