/** * Add an array of compiler problems to the problems collection. * @param newProblems - the problems to add. * @post the problems collection is marked "not sorted." */ public void addAll(ICompilerProblem[] newProblems) { addAll(Arrays.asList(newProblems)); }
/** * Add an array of compiler problems to the problems collection. * @param newProblems - the problems to add. * @post the problems collection is marked "not sorted." */ public void addAll(ICompilerProblem[] newProblems) { addAll(Arrays.asList(newProblems)); }
private ITargetSettings getTargetSettings() { if (targetSettings == null) targetSettings = projectConfigurator.getTargetSettings(getTargetType()); if (targetSettings == null) problems.addAll(projectConfigurator.getConfigurationProblems()); return targetSettings; }
private ITargetSettings getTargetSettings() { if (targetSettings == null) targetSettings = projectConfigurator.getTargetSettings(getTargetType()); if (targetSettings == null) problems.addAll(projectConfigurator.getConfigurationProblems()); return targetSettings; }
private ITargetSettings getTargetSettings() { if (targetSettings == null) targetSettings = projectConfigurator.getTargetSettings(getTargetType()); if (targetSettings == null) problems.addAll(projectConfigurator.getConfigurationProblems()); return targetSettings; }
private ITargetSettings getTargetSettings() { if (targetSettings == null) targetSettings = projectConfigurator.getTargetSettings(getTargetType()); if (targetSettings == null) problems.addAll(projectConfigurator.getConfigurationProblems()); return targetSettings; }
private void dumpDependencyGraphIfNeeded() throws IOException, InterruptedException { File dependencyGraphOutput = config.getDependencyGraphOutput(); if (dependencyGraphOutput != null) { LinkageChecker linkageChecker = new LinkageChecker(project, getTargetSettings()); Target.RootedCompilationUnits rootedCompilationUnits = target.getRootedCompilationUnits(); problems.addAll(rootedCompilationUnits.getProblems()); GraphMLWriter dependencyGraphWriter = new GraphMLWriter(project.getDependencyGraph(), rootedCompilationUnits.getUnits(), true, linkageChecker); BufferedOutputStream graphStream = new BufferedOutputStream(new FileOutputStream(dependencyGraphOutput)); LinkedList<ICompilerProblem> problemList = new LinkedList<ICompilerProblem>(); Iterables.addAll(problemList, rootedCompilationUnits.getProblems()); dependencyGraphWriter.writeToStream(graphStream, problemList); problems.addAll(problemList); } }
private void dumpDependencyGraphIfNeeded() throws IOException, InterruptedException { File dependencyGraphOutput = config.getDependencyGraphOutput(); if (dependencyGraphOutput != null) { LinkageChecker linkageChecker = new LinkageChecker(project, getTargetSettings()); Target.RootedCompilationUnits rootedCompilationUnits = target.getRootedCompilationUnits(); problems.addAll(rootedCompilationUnits.getProblems()); GraphMLWriter dependencyGraphWriter = new GraphMLWriter(project.getDependencyGraph(), rootedCompilationUnits.getUnits(), true, linkageChecker); BufferedOutputStream graphStream = new BufferedOutputStream(new FileOutputStream(dependencyGraphOutput)); LinkedList<ICompilerProblem> problemList = new LinkedList<ICompilerProblem>(); Iterables.addAll(problemList, rootedCompilationUnits.getProblems()); dependencyGraphWriter.writeToStream(graphStream, problemList); problems.addAll(problemList); } }
/** * Build SWF model object and collect problems building SWF in * {@link #problems}. * * @return SWF model or null if SWF can't be built. * @throws InterruptedException concurrency problem */ private ISWF buildSWFModel() throws InterruptedException { final List<ICompilerProblem> problemsBuildingSWF = new ArrayList<ICompilerProblem>(); final ISWF swf = target.build(problemsBuildingSWF); problems.addAll(problemsBuildingSWF); if (swf == null) { ICompilerProblem problem = new UnableToBuildSWFProblem(getOutputFilePath()); problems.add(problem); } return swf; }
private IJSApplication buildJSTarget() throws InterruptedException, FileNotFoundException, ConfigurationException { final List<ICompilerProblem> problemsBuildingSWF = new ArrayList<ICompilerProblem>(); final IJSApplication app = buildApplication(project, config.getMainDefinition(), null, problemsBuildingSWF); problems.addAll(problemsBuildingSWF); if (app == null) { ICompilerProblem problem = new UnableToBuildSWFProblem( getOutputFilePath()); problems.add(problem); } return app; }
private IJSApplication buildJSTarget() throws InterruptedException, FileNotFoundException, ConfigurationException { final List<ICompilerProblem> problemsBuildingSWF = new ArrayList<ICompilerProblem>(); final IJSApplication app = buildApplication(project, config.getMainDefinition(), null, problemsBuildingSWF); problems.addAll(problemsBuildingSWF); if (app == null) { ICompilerProblem problem = new UnableToBuildSWFProblem( getOutputFilePath()); problems.add(problem); } return app; }
private IJSApplication buildJSTarget() throws InterruptedException, FileNotFoundException, ConfigurationException { final List<ICompilerProblem> problemsBuildingSWF = new ArrayList<ICompilerProblem>(); final IJSApplication app = buildApplication(project, config.getMainDefinition(), null, problemsBuildingSWF); problems.addAll(problemsBuildingSWF); if (app == null) { ICompilerProblem problem = new UnableToBuildSWFProblem( getOutputFilePath()); problems.add(problem); } return app; }
private IJSApplication buildJSTarget() throws InterruptedException, FileNotFoundException, ConfigurationException { final List<ICompilerProblem> problemsBuildingSWF = new ArrayList<ICompilerProblem>(); final IJSApplication app = buildApplication(project, config.getMainDefinition(), null, problemsBuildingSWF); problems.addAll(problemsBuildingSWF); if (app == null) { ICompilerProblem problem = new UnableToBuildSWFProblem( getOutputFilePath()); problems.add(problem); } return app; }
private IJSApplication buildJSTarget() throws InterruptedException, FileNotFoundException, ConfigurationException { final List<ICompilerProblem> problemsBuildingSWF = new ArrayList<ICompilerProblem>(); project.mainCU = mainCU; final IJSApplication app = buildApplication(project, config.getMainDefinition(), mainCU, problemsBuildingSWF); problems.addAll(problemsBuildingSWF); if (app == null) { ICompilerProblem problem = new UnableToBuildSWFProblem( getOutputFilePath()); problems.add(problem); } return app; }
private IJSApplication buildJSTarget() throws InterruptedException, FileNotFoundException, ConfigurationException { final List<ICompilerProblem> problemsBuildingSWF = new ArrayList<ICompilerProblem>(); project.mainCU = mainCU; final IJSApplication app = buildApplication(project, config.getMainDefinition(), mainCU, problemsBuildingSWF); problems.addAll(problemsBuildingSWF); if (app == null) { ICompilerProblem problem = new UnableToBuildSWFProblem( getOutputFilePath()); problems.add(problem); } return app; }
private IJSApplication buildJSTarget() throws InterruptedException, FileNotFoundException, ConfigurationException { final List<ICompilerProblem> problemsBuildingSWF = new ArrayList<ICompilerProblem>(); project.mainCU = mainCU; final IJSApplication app = buildApplication(project, config.getMainDefinition(), mainCU, problemsBuildingSWF); problems.addAll(problemsBuildingSWF); if (app == null) { ICompilerProblem problem = new UnableToBuildSWFProblem( getOutputFilePath()); problems.add(problem); } return app; }
private IJSApplication buildJSTarget() throws InterruptedException, FileNotFoundException, ConfigurationException { final List<ICompilerProblem> problemsBuildingSWF = new ArrayList<ICompilerProblem>(); project.mainCU = mainCU; final IJSApplication app = buildApplication(project, config.getMainDefinition(), mainCU, problemsBuildingSWF); problems.addAll(problemsBuildingSWF); if (app == null) { ICompilerProblem problem = new UnableToBuildSWFProblem( getOutputFilePath()); problems.add(problem); } return app; }
private IJSApplication buildJSTarget() throws InterruptedException, FileNotFoundException, ConfigurationException { final List<ICompilerProblem> problemsBuildingSWF = new ArrayList<ICompilerProblem>(); project.mainCU = mainCU; final IJSApplication app = buildApplication(project, config.getMainDefinition(), mainCU, problemsBuildingSWF); problems.addAll(problemsBuildingSWF); if (app == null) { ICompilerProblem problem = new UnableToBuildSWFProblem( getOutputFilePath()); problems.add(problem); } return app; }
public boolean configure(String[] args) { projectConfigurator = createConfigurator(); projectConfigurator.setConfiguration(args, "typedefs", false); projectConfigurator.getTargetSettings(TargetType.SWC); configure((ExternCConfiguration) projectConfigurator.getConfiguration()); problems = new ProblemQuery( projectConfigurator.getCompilerProblemSettings()); problems.addAll(projectConfigurator.getConfigurationProblems()); if (problems.hasErrors()) { return false; } return true; }
public boolean configure(String[] args) { projectConfigurator = createConfigurator(); projectConfigurator.setConfiguration(args, "typedefs", false); projectConfigurator.getTargetSettings(TargetType.SWC); configure((ExternCConfiguration) projectConfigurator.getConfiguration()); problems = new ProblemQuery( projectConfigurator.getCompilerProblemSettings()); problems.addAll(projectConfigurator.getConfigurationProblems()); if (problems.hasErrors()) { return false; } return true; }