Examples of CompilationResult


Examples of bear.context.CompilationResult

    public CompilationResult compile(ClassLoader parentCL) {
        compileScripts(sourceDirs, parentCL);

        final long now = System.currentTimeMillis();

        return new CompilationResult() {
            @Override
            public Optional<? extends CompiledEntry> byName(String name) {
                CompiledEntry<?> entry = simpleNameMap.get(name);

                if(entry != null){
View Full Code Here

Examples of com.github.sommeri.less4j.LessCompiler.CompilationResult

  }

  private static void basicFileExample() throws Less4jException {
    File inputLessFile = createFile("sampleInput.less", "* { margin: 1 1 1 1; }");
    LessCompiler compiler = new ThreadUnsafeLessCompiler();
    CompilationResult compilationResult = compiler.compile(inputLessFile);

    System.out.println(compilationResult.getCss());
    for (Problem warning : compilationResult.getWarnings()) {
      System.err.println(format(warning));
    }
   
    deleteFile(inputLessFile);
  }
View Full Code Here

Examples of com.google.gwt.core.ext.linker.CompilationResult

        text.append("return;");

      } else if (compilations.size() == 1) {
        // Just one distinct compilation; no need to evaluate properties
        Iterator<CompilationResult> iter = compilations.iterator();
        CompilationResult result = iter.next();
        text.append("strongName = '" + compilationStrongNames.get(result)
            + "';");
      } else {
        for (CompilationResult r : compilations) {
          for (Map<SelectionProperty, String> propertyMap : r.getPropertyMap()) {
View Full Code Here

Examples of com.google.gwt.core.ext.linker.CompilationResult

          "The module must have exactly one distinct"
              + " permutation when using the " + getDescription() + " Linker.",
          null);
      throw new UnableToCompleteException();
    }
    CompilationResult result = results.iterator().next();

    out.print("var $strongName = '" + result.getStrongName() + "';");
    out.newlineOpt();

    String[] js = result.getJavaScript();
    if (js.length != 1) {
      logger.log(TreeLogger.ERROR,
          "The module must not have multiple fragments when using the "
              + getDescription() + " Linker.", null);
      throw new UnableToCompleteException();
View Full Code Here

Examples of com.subhajit.common.javacompiler.CompilationResult

    }
    compiler.setVerbose(true);

    FileUtils.mkdirs(outputDirectory);
    compiler.setOutputLocation(outputDirectory);
    CompilationResult result = compiler.doCompilation();
    if (!result.isSuccessful()) {
      throw new RuntimeException(result.toString());
    } else {
      // Now copy the resources from the source paths.
      for (File sourcePath : sourcePaths) {
        for (Iterator<IResource> it = new DirectoryParser(sourcePath)
            .iterator(); it.hasNext();) {
View Full Code Here

Examples of org.apache.commons.jci.compilers.CompilationResult

    public void compile(String[] fileNames,
                        ResourceReader src,
                        ResourceStore dst,
                        ClassLoader classLoader) {

        CompilationResult result = compiler.compile( fileNames,
                                                     src,
                                                     dst,
                                                     classLoader );

        handleAnyErrors( result );
View Full Code Here

Examples of org.apache.commons.jci.compilers.CompilationResult

        } else {
            // Default to 1.5
            settings.setTargetVersion("1.5");
        }

        CompilationResult result = javaCompiler.compile(resources, reader, store, classLoader, settings);
       
        ArrayList<JavacErrorDetail> problemList = new ArrayList<JavacErrorDetail>();
        CompilationProblem[] problems = result.getErrors();
        if (problems != null) {
            try {
                for (int i = 0; i < problems.length; i++) {
                    CompilationProblem problem = problems[i];
                    problemList.add(ErrorDispatcher.createJavacError
View Full Code Here

Examples of org.apache.commons.jci.compilers.CompilationResult

        if (resourcesToCompile.length > 0) {

            log.debug(resourcesToCompile.length + " classes to compile");
           
            final CompilationResult result = compiler.compile(resourcesToCompile, reader, transactionalStore);
           
            synchronized(this) {
                lastResult = result;
            }
           
            final CompilationProblem[] errors = result.getErrors();
            final CompilationProblem[] warnings = result.getWarnings();
           
            log.debug(errors.length + " errors, " + warnings.length + " warnings");
       
            if (errors.length > 0) {
                // FIXME: they need to be marked for re-compilation
View Full Code Here

Examples of org.apache.sling.commons.compiler.CompilationResult

        final Map<String, String> mapping = new HashMap<String, String>();
        for(int i=0;i<srcFiles.length;i++) {
            mapping.put(units[i].getMainClassName() + ".java", srcFiles[i]);
        }
        return new CompilationResult() {

            private List<CompilerMessage> mapMessages(final List<CompilerMessage> msgs) {
                if ( msgs == null || msgs.size() == 0 ) {
                    return msgs;
                }
View Full Code Here

Examples of org.apache.sling.commons.compiler.CompilationResult

        final Options options = new Options();
        options.put(Options.KEY_SOURCE_VERSION, Options.VERSION_1_5);
        options.put(Options.KEY_CLASS_LOADER_WRITER, this);
        options.put(Options.KEY_CLASS_LOADER, this.getClass().getClassLoader());

        final CompilationResult result = new EclipseJavaCompiler().compile(new CompilationUnit[]{unit}, options);
        assertNotNull(result);
        assertNull(result.getErrors());
    }
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.