package com.antew.redditinpictures.library.ui.base;

import android.os.Bundle;
import com.actionbarsherlock.app.SherlockFragment;
import com.antew.redditinpictures.library.Injector;

public class BaseFragment extends SherlockFragment {
    @Override public void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        Injector.inject(this);
    }
}

@@ -174,16 +174,74 @@
 njector;
+%0Aimport com.squareup.otto.Bus;%0Aimport javax.inject.Inject;
 %0A%0Apublic
@@ -287,16 +287,53 @@
 gment %7B%0A
+    @Inject%0A    protected Bus mBus;%0A%0A
     @Ove
@@ -450,16 +450,16 @@
 State);%0A
-
         
@@ -486,11 +486,221 @@
 );%0A    %7D
+%0A%0A    @Override%0A    public void onResume() %7B%0A        super.onResume();%0A        mBus.register(this);%0A    %7D%0A%0A    @Override%0A    public void onPause() %7B%0A        mBus.unregister(this);%0A        super.onPause();%0A    %7D
 %0A%7D%0A

Add Otto to BaseFragment, make @Subscribe methods public to make it work