Example #1
0
 public void accept(final RefVisitor visitor) {
   if (visitor instanceof RefJavaVisitor) {
     ApplicationManager.getApplication()
         .runReadAction(
             new Runnable() {
               public void run() {
                 ((RefJavaVisitor) visitor).visitClass(RefClassImpl.this);
               }
             });
   } else {
     super.accept(visitor);
   }
 }
 @Override
 public void accept(@NotNull final RefVisitor visitor) {
   if (visitor instanceof RefJavaVisitor) {
     ApplicationManager.getApplication()
         .runReadAction(
             new Runnable() {
               @Override
               public void run() {
                 ((RefJavaVisitor) visitor).visitMethod(RefMethodImpl.this);
               }
             });
   } else {
     super.accept(visitor);
   }
 }