use of org.apache.logging.log4j.message.EntryMessage in project meghanada-server by mopemope.
the class LocationSearcher method searchFieldAccess.
private Optional<Location> searchFieldAccess(final Source src, final int line, final int col, final String symbol) {
final EntryMessage entryMessage = log.traceEntry("line={} col={} symbol={}", line, col, symbol);
final Optional<Location> result = src.searchFieldAccess(line, col, symbol).flatMap(fa -> {
final String fieldName = fa.name;
final String declaringClass = fa.declaringClass;
if (declaringClass == null) {
return Optional.empty();
}
final List<String> searchTargets = new ArrayList<>(2);
searchTargets.add(declaringClass);
final CachedASMReflector reflector = CachedASMReflector.getInstance();
searchTargets.addAll(reflector.getSuperClass(declaringClass));
return searchTargets.stream().map(fqcn -> existsFQCN(project.getAllSourcesWithDependencies(), fqcn).flatMap(file -> getFieldLocationFromProject(fqcn, fieldName, file)).orElseGet(wrapIO(() -> {
final SearchContext context = new SearchContext(fqcn, SearchKind.FIELD);
context.name = fieldName;
return Optional.ofNullable(searchFromSrcZip(context)).orElseGet(wrapIO(() -> searchFromDependency(context)));
}))).filter(Objects::nonNull).findFirst();
});
log.traceExit(entryMessage);
return result;
}
use of org.apache.logging.log4j.message.EntryMessage in project meghanada-server by mopemope.
the class ExpressionScope method dumpVariable.
@Override
public void dumpVariable() {
EntryMessage em = log.traceEntry("**** {} {}", this.getClassName(), this.range);
super.dumpVariable(log);
log.traceExit(em);
}
use of org.apache.logging.log4j.message.EntryMessage in project meghanada-server by mopemope.
the class ExpressionScope method dump.
@Override
public void dump() {
EntryMessage em = log.traceEntry("**** {} {}", this.getClassName(), this.range);
super.dumpVariable(log);
super.dumpFieldAccess(log);
log.traceExit(em);
}
use of org.apache.logging.log4j.message.EntryMessage in project meghanada-server by mopemope.
the class Source method dumpVariable.
public void dumpVariable() {
final EntryMessage entryMessage = log.traceEntry("{}", Strings.repeat("*", 100));
for (final ClassScope cs : classScopes) {
cs.dumpVariable();
}
log.traceExit(entryMessage);
}
use of org.apache.logging.log4j.message.EntryMessage in project meghanada-server by mopemope.
the class Source method dumpFieldAccess.
public void dumpFieldAccess() {
final EntryMessage entryMessage = log.traceEntry("{}", Strings.repeat("*", 100));
for (final ClassScope cs : classScopes) {
cs.dumpFieldAccess();
}
log.traceExit(entryMessage);
}
Aggregations