/** * 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 boolean buildDB() { staticInitializers = new ArrayList<String>(); staticInitializerOwners = new ArrayList<String>(); graph = new DependencyGraph(); if (isGoogClass(mainName)) { problems.add(new MainDefinitionQNameProblem("Google Closure Library", mainName)); return false; } if (isExternal(mainName)) { problems.add(new MainDefinitionQNameProblem("External Libraries", mainName)); return false; } addDeps(mainName); return true; }
/** * 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; }
problemQuery.add(new InvalidImportFileProblem(importFilename));
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; }
problemQuery.add(new InvalidImportFileProblem(importFilename));
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; }
problems.add(unexpectedExceptionProblem);
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; }
problems.add(unexpectedExceptionProblem);
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 List<ClassReference> getInterfaces() { ArrayList<ClassReference> result = new ArrayList<ClassReference>(); List<JSTypeExpression> implementedInterfaces = getComment().getImplementedInterfaces(); for (JSTypeExpression jsTypeExpression : implementedInterfaces) { JSType jsType = getModel().evaluate(jsTypeExpression); String interfaceName = jsType.toAnnotationString(); ClassReference interfaceReference = getModel().getClassReference(interfaceName); if (interfaceReference != null) result.add(interfaceReference); else { DummyNode node = new DummyNode(); String externName = AbstractCompilerPass.getSourceFileName(this.getNode().getStaticSourceFile().getName(), getModel()); node.setSourcePath(externName); node.setLine(this.getNode().getLineno()); UnresolvedClassReferenceProblem problem = new UnresolvedClassReferenceProblem(node, interfaceName); getModel().problems.add(problem); } } return result; }
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 List<ClassReference> getInterfaces() { ArrayList<ClassReference> result = new ArrayList<ClassReference>(); List<JSTypeExpression> implementedInterfaces = getComment().getImplementedInterfaces(); for (JSTypeExpression jsTypeExpression : implementedInterfaces) { JSType jsType = getModel().evaluate(jsTypeExpression); if (jsType.isTemplatizedType()) { jsType = ((TemplatizedType)jsType).getReferencedType(); } String interfaceName = jsType.getDisplayName(); ClassReference interfaceReference = getModel().getClassReference(interfaceName); if (interfaceReference != null) result.add(interfaceReference); else { DummyNode node = new DummyNode(); String externName = AbstractCompilerPass.getSourceFileName(this.getNode().getStaticSourceFile().getName(), getModel()); node.setSourcePath(externName); node.setLine(this.getNode().getLineno()); UnresolvedClassReferenceProblem problem = new UnresolvedClassReferenceProblem(node, interfaceName); getModel().problems.add(problem); } } return result; }
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>(); 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; }
problems.add(problem); return;
problems.add(problem); return false;