private void logError(STMessage stMessage, String errorType) { String error = String.format("String template %s error while processing [%s]: %s", errorType, GsCollectionsCodeGenerator.this.url.getPath(), stMessage.toString()); this.errorListener.error(error); throw new RuntimeException(); }
/** Given an IP (code location), get it's range in source template then * return it's template line:col. */ public String getSourceLocation() { if ( ip<0 || self==null || self.impl==null ) return null; Interval I = self.impl.sourceMap[ip]; if ( I==null ) return null; // get left edge and get line/col int i = I.a; Coordinate loc = Misc.getLineCharPosition(self.impl.template, i); return loc.toString(); }
public CompilationState(ErrorManager errMgr, String name, TokenStream tokens) { this.errMgr = errMgr; this.tokens = tokens; impl.name = name; impl.prefix = Misc.getPrefix(name); }
public void lexerError(String srcName, String msg, Token templateToken, RecognitionException e) { if ( srcName!=null ) srcName = Misc.getFileName(srcName); listener.compileTimeError( new STLexerMessage(srcName, msg, templateToken, e) ); }
@Override public Object getProperty(Interpreter interp, ST self, Object o, Object property, String propertyName) throws STNoSuchPropertyException { Map<?, ?> map = ((Aggregate)o).properties; return super.getProperty(interp, self, map, property, propertyName); } }
protected Object throwNoSuchProperty(String propertyName) { if ( cachedException==null ) cachedException = new STNoSuchPropertyException(); cachedException.propertyName = propertyName; throw cachedException; } }
/** Given an IP (code location), get it's range in source template then * return it's template line:col. */ public String getSourceLocation() { if ( ip<0 || self==null || self.impl==null ) return null; Interval I = self.impl.sourceMap[ip]; if ( I==null ) return null; // get left edge and get line/col int i = I.a; Coordinate loc = Misc.getLineCharPosition(self.impl.template, i); return loc.toString(); }
private void logError(STMessage stMessage, String errorType) { String error = String.format("String template %s error while processing [%s]: %s", errorType, EclipseCollectionsCodeGenerator.this.url.getPath(), stMessage.toString()); this.errorListener.error(error); throw new RuntimeException(error); }
public void lexerError(String srcName, String msg, Token templateToken, RecognitionException e) { if ( srcName!=null ) srcName = Misc.getFileName(srcName); listener.compileTimeError( new STLexerMessage(srcName, msg, templateToken, e) ); }
@Override public Object getProperty(Interpreter interp, ST self, Object o, Object property, String propertyName) throws STNoSuchPropertyException { Map<?, ?> map = ((Aggregate)o).properties; return super.getProperty(interp, self, map, property, propertyName); } }
public CompilationState(ErrorManager errMgr, String name, TokenStream tokens) { this.errMgr = errMgr; this.tokens = tokens; impl.name = name; impl.prefix = Misc.getPrefix(name); }
/** Given an ip (code location), get it's range in source template then * return it's template line:col. */ public String getSourceLocation() { if ( ip<0 ) return null; Interval I = self.impl.sourceMap[ip]; if ( I==null ) return null; // get left edge and get line/col int i = I.a; Coordinate loc = Misc.getLineCharPosition(self.impl.template, i); return loc.toString(); }
@Override public Object getProperty(Interpreter interp, ST self, Object o, Object property, String propertyName) throws STNoSuchPropertyException { Map<?, ?> map = ((Aggregate)o).properties; return super.getProperty(interp, self, map, property, propertyName); } }
public CompilationState(ErrorManager errMgr, String name, TokenStream tokens) { this.errMgr = errMgr; this.tokens = tokens; impl.name = name; impl.prefix = Misc.getPrefix(name); }
/** Given an IP (code location), get it's range in source template then * return it's template line:col. */ public String getSourceLocation() { if ( ip<0 || self.impl==null ) return null; Interval I = self.impl.sourceMap[ip]; if ( I==null ) return null; // get left edge and get line/col int i = I.a; Coordinate loc = Misc.getLineCharPosition(self.impl.template, i); return loc.toString(); }
public CompilationState(ErrorManager errMgr, String name, TokenStream tokens) { this.errMgr = errMgr; this.tokens = tokens; impl.name = name; impl.prefix = Misc.getPrefix(name); }
/** Given an IP (code location), get it's range in source template then * return it's template line:col. */ public String getSourceLocation() { if ( ip<0 || self.impl==null ) return null; Interval I = self.impl.sourceMap[ip]; if ( I==null ) return null; // get left edge and get line/col int i = I.a; Coordinate loc = Misc.getLineCharPosition(self.impl.template, i); return loc.toString(); }
/** Given an IP (code location), get it's range in source template then * return it's template line:col. */ public String getSourceLocation() { if ( ip<0 || self.impl==null ) return null; Interval I = self.impl.sourceMap[ip]; if ( I==null ) return null; // get left edge and get line/col int i = I.a; Coordinate loc = Misc.getLineCharPosition(self.impl.template, i); return loc.toString(); }
/** Given an IP (code location), get it's range in source template then * return it's template line:col. */ public String getSourceLocation() { if ( ip<0 || self.impl==null ) return null; Interval I = self.impl.sourceMap[ip]; if ( I==null ) return null; // get left edge and get line/col int i = I.a; Coordinate loc = Misc.getLineCharPosition(self.impl.template, i); return loc.toString(); }
/** Given an IP (code location), get it's range in source template then * return it's template line:col. */ public String getSourceLocation() { if ( ip<0 || self==null || self.impl==null ) return null; Interval I = self.impl.sourceMap[ip]; if ( I==null ) return null; // get left edge and get line/col int i = I.a; Coordinate loc = Misc.getLineCharPosition(self.impl.template, i); return loc.toString(); }