List of usage examples for org.aspectj.weaver IHasSourceLocation getSourceContext
ISourceContext getSourceContext();
From source file:org.caesarj.compiler.aspectj.CaesarScope.java
License:Open Source License
/** * Creates the ISourceLocation for the given location. *//* ww w.ja v a 2 s.c o m*/ protected ISourceLocation makeSourceLocation(IHasPosition location) { if (location instanceof IHasSourceLocation) { IHasSourceLocation pattern = (IHasSourceLocation) location; ISourceContext sourceContext = pattern.getSourceContext(); if (sourceContext != null) { return pattern.getSourceContext().makeSourceLocation(location); } } if (where != null) { return new SourceLocation(where.getPath(), where.getLine()); } else { return new SourceLocation(new File(context.getCClass().getSourceFile()), location.getStart()); } }