@Override protected IABCBytesRequestResult getResultForThrowable(CompilationUnitBase u, Throwable throwable) { return new ABCBytesRequestResult(new ICompilerProblem[] { new InternalCompilerProblem2(u.getAbsoluteFilename(), throwable, "ABC generator")}); } };
/** * @param sourcePath Name of source file for which code was being * generated when this problem was found. Must not be null. * @param throwable {@link Throwable} that caused this problem to be created. must not be null. * @param subSystemName is the Compiler module where the problem occurred. For example "ABC generator". Must not be null * * Note that if you do not have the required ctor arguments, you might use InternalCompilerProblem * instead of this class */ public InternalCompilerProblem2(String sourcePath, Throwable throwable, String subSystemName) { super(sourcePath); this.sourcePath = sourcePath; this.subSystemName = subSystemName; this.stackTrace = makeStackTrace(throwable); }
@Override protected IABCBytesRequestResult getResultForThrowable(CompilationUnitBase u, Throwable throwable) { return new ABCBytesRequestResult(new ICompilerProblem[] { new InternalCompilerProblem2(u.getAbsoluteFilename(), throwable, "ABC generator")}); } };
/** * @param sourcePath Name of source file for which code was being * generated when this problem was found. Must not be null. * @param throwable {@link Throwable} that caused this problem to be created. must not be null. * @param subSystemName is the Compiler module where the problem occurred. For example "ABC generator". Must not be null * * Note that if you do not have the required ctor arguments, you might use InternalCompilerProblem * instead of this class */ public InternalCompilerProblem2(String sourcePath, Throwable throwable, String subSystemName) { super(sourcePath); this.sourcePath = sourcePath; this.subSystemName = subSystemName; this.stackTrace = makeStackTrace(throwable); }
@Override protected IOutgoingDependenciesRequestResult getResultForThrowable(CompilationUnitBase u, Throwable throwable) { final ICompilerProblem prob = new InternalCompilerProblem2( u.getRootFileSpecification().getPath(), throwable, "outgoing dependency"); return new IOutgoingDependenciesRequestResult() { @Override public ICompilerProblem[] getProblems() { return new ICompilerProblem[] {prob}; } }; } };
@Override protected IOutgoingDependenciesRequestResult getResultForThrowable(CompilationUnitBase u, Throwable throwable) { final ICompilerProblem prob = new InternalCompilerProblem2( u.getRootFileSpecification().getPath(), throwable, "outgoing dependency"); return new IOutgoingDependenciesRequestResult() { @Override public ICompilerProblem[] getProblems() { return new ICompilerProblem[] {prob}; } }; } };
@Override protected IFileScopeRequestResult getResultForThrowable(CompilationUnitBase u, Throwable throwable) { final ICompilerProblem prob = new InternalCompilerProblem2( u.getRootFileSpecification().getPath(), throwable, "file scope builder"); return new FileScopeRequestResultBase(Collections.singleton(prob), null); } };
@Override protected IFileScopeRequestResult getResultForThrowable(CompilationUnitBase u, Throwable throwable) { final ICompilerProblem prob = new InternalCompilerProblem2( u.getRootFileSpecification().getPath(), throwable, "file scope builder"); return new FileScopeRequestResultBase(Collections.singleton(prob), null); } };
@Override protected ISWFTagsRequestResult getResultForThrowable(CompilationUnitBase u, Throwable throwable) final ICompilerProblem prob = new InternalCompilerProblem2( u.getRootFileSpecification().getPath(), throwable, "SWFTags"); return new ISWFTagsRequestResult()
@Override protected ISWFTagsRequestResult getResultForThrowable(CompilationUnitBase u, Throwable throwable) final ICompilerProblem prob = new InternalCompilerProblem2( u.getRootFileSpecification().getPath(), throwable, "SWFTags"); return new ISWFTagsRequestResult()
final ICompilerProblem problem = new InternalCompilerProblem2(rootSource.getPath(), e, SUB_SYSTEM); problems.add(problem); final ICompilerProblem problem = new InternalCompilerProblem2(rootSource.getPath(), e, SUB_SYSTEM); problems.add(problem);
@Override protected ISyntaxTreeRequestResult getResultForThrowable(CompilationUnitBase u, Throwable throwable) { final ICompilerProblem prob = new InternalCompilerProblem2( u.getRootFileSpecification().getPath(), throwable, "syntax tree request"); return new SyntaxTreeRequestResult(u.getRootFileSpecification().getLastModified(), Collections.singleton(prob)); } };
final ICompilerProblem problem = new InternalCompilerProblem2(rootSource.getPath(), e, SUB_SYSTEM); problems.add(problem); final ICompilerProblem problem = new InternalCompilerProblem2(rootSource.getPath(), e, SUB_SYSTEM); problems.add(problem);
@Override protected ISyntaxTreeRequestResult getResultForThrowable(CompilationUnitBase u, Throwable throwable) { final ICompilerProblem prob = new InternalCompilerProblem2( u.getRootFileSpecification().getPath(), throwable, "syntax tree request"); return new SyntaxTreeRequestResult(u.getRootFileSpecification().getLastModified(), Collections.singleton(prob)); } };
/** * Returns the next token that can be produced from the given input, without performing any repair code * @return an {@link MXMLToken} or null when no more tokens can be produced */ private final MXMLToken nextTokenInternal() { try { MXMLToken token = tokenizer.hasBufferToken() ? (MXMLToken)tokenizer.getBufferToken() : (MXMLToken)tokenizer.nextToken(); if(token == null) return null; MXMLToken mxmlToken = processToken(token); return mxmlToken; } catch (Exception e) { ICompilerProblem problem = new InternalCompilerProblem2(path, e, SUB_SYSTEM); problems.add(problem); } return null; }
ICompilerProblem problem = new InternalCompilerProblem2(filePath, ex, "PropertiesFileParser"); problems.add(problem);
/** * Returns the next token that can be produced from the given input, without performing any repair code * @return an {@link MXMLToken} or null when no more tokens can be produced */ private final MXMLToken nextTokenInternal() { try { MXMLToken token = tokenizer.hasBufferToken() ? (MXMLToken)tokenizer.getBufferToken() : (MXMLToken)tokenizer.nextToken(); if(token == null) return null; MXMLToken mxmlToken = processToken(token); return mxmlToken; } catch (Exception e) { ICompilerProblem problem = new InternalCompilerProblem2(path, e, SUB_SYSTEM); problems.add(problem); } return null; }
ICompilerProblem problem = new InternalCompilerProblem2(filePath, ex, "PropertiesFileParser"); problems.add(problem);
tokenizer.yyclose(); } catch (IOException e) { ICompilerProblem problem = new InternalCompilerProblem2(path, e, SUB_SYSTEM); problems.add(problem);
@Override public void walk(IASNode node) { try { getStrategy().handle(node); } catch (Exception e) { String sp = String.format("%s line %d column %d", node.getSourcePath(), node.getLine() + 1, node.getColumn()); if (node.getSourcePath() == null) { IASNode parent = node.getParent(); sp = String.format("%s line %d column %d", parent.getSourcePath(), parent.getLine() + 1, parent.getColumn()); } InternalCompilerProblem2 problem = new InternalCompilerProblem2(sp, e, "ASBlockWalker"); errors.add(problem); } }