Slide 15
Slide 15 text
private static void checkThreadAnnotation(PsiCallExpression methodCall,
ProblemsHolder holder, PsiMethod method, String qualifiedName) {
String threadContext = getThreadContext(methodCall);
if (threadContext != null && !isCompatibleThread(threadContext, qualifiedName)) {
String message = String.format("Method %1$s must be called from the %2$s
thread, currently inferred thread is %3$s",
method.getName(), describeThread(qualifiedName),
describeThread(threadContext));
holder.registerProblem(methodCall, message);
}
}
checkThreadAnnotation
private static void checkThreadAnnotation(PsiCallExpression methodCall,
ProblemsHolder holder, PsiMethod method, String qualifiedName) {
String threadContext = getThreadContext(methodCall);
if (threadContext != null && !isCompatibleThread(threadContext, qualifiedName)) {
String message = String.format("Method %1$s must be called from the %2$s
thread, currently inferred thread is %3$s",
method.getName(), describeThread(qualifiedName),
describeThread(threadContext));
holder.registerProblem(methodCall, message);
}
}
ifจͷத͕࣮ߦ͞ΕΔͱܯࠂ͕දࣔ͞Ε·͢