// Path: app/src/main/java/com/ftinc/showcase/ShowcaseApp.java
// public class ShowcaseApp extends Application {
// 
//     public static final String DB_NAME = "Showcase.db";
//     public static final int DB_VERSION = 1;
// 
//     private ObjectGraph objectGraph;
// 
//     @Override
//     public void onCreate() {
// 
//         if(BuildConfig.DEBUG){
//             Timber.plant(new Timber.DebugTree());
//             Timber.plant(new CrashlyticsTree(this));
//         }else{
//             Timber.plant(new CrashlyticsTree(this));
//         }
// 
//         // Initialize PostOffice
//         PostOffice.lick(new Stamp.Builder(this)
//                 .setCancelable(true)
//                 .setCanceledOnTouchOutside(true)
//                 .setDesign(Design.MATERIAL_LIGHT)
//                 .setThemeColorResource(R.color.accent)
//                 .build());
// 
//         // Intialize Ollie
//         Ollie.with(this)
//              .setName(DB_NAME)
//              .setVersion(DB_VERSION)
//              .setLogLevel(BuildConfig.DEBUG ? Ollie.LogLevel.FULL : Ollie.LogLevel.NONE)
//              .init();
// 
//         // Build and Inject Dagger Object Graph
//         buildObjectGraphAndInject();
// 
//     }
// 
//     @DebugLog
//     public void buildObjectGraphAndInject(){
//         objectGraph = ObjectGraph.create(new Object[]{
//             new ShowcaseModule(this)
//         });
//         objectGraph.inject(this);
//     }
// 
//     /**
//      * Create a scoped object graph
//      *
//      * @param modules       the list of modules to add to the scope
//      * @return              the scoped graph
//      */
//     public ObjectGraph createScopedGraph(Object... modules){
//         return objectGraph.plus(modules);
//     }
// 
//     /**
//      * Inject an object with the object graph
//      */
//     public void inject(Object o){
//         objectGraph.inject(o);
//     }
// 
//     /**
//      * Get a reference to the Application
//      *
//      * @param ctx       the context
//      *
//      * @return          the ChipperApp reference
//      */
//     public static ShowcaseApp get(Context ctx){
//         return (ShowcaseApp) ctx.getApplicationContext();
//     }
// 
//     /**
//      * Get a reference to this application with a service
//      * object
//      *
//      * @param ctx
//      * @return
//      */
//     public static ShowcaseApp get(Service ctx){
//         return (ShowcaseApp) ctx.getApplication();
//     }
// 
// }


import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.AppCompatActivity;
import com.ftinc.showcase.ShowcaseApp;
import dagger.ObjectGraph;
package com.ftinc.showcase.ui.model;




/**
 * This is a base UI activity that assists in creating a scoped
 * object graph on the activity for DI
 *
 * Project: Chipper
 * Package: com.r0adkll.chipper.ui
 * Created by drew.heavner on 11/12/14.
 */
public abstract class BaseActivity extends AppCompatActivity {

    private ObjectGraph activityGraph;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
// Path: app/src/main/java/com/ftinc/showcase/ShowcaseApp.java
// public class ShowcaseApp extends Application {
// 
//     public static final String DB_NAME = "Showcase.db";
//     public static final int DB_VERSION = 1;
// 
//     private ObjectGraph objectGraph;
// 
//     @Override
//     public void onCreate() {
// 
//         if(BuildConfig.DEBUG){
//             Timber.plant(new Timber.DebugTree());
//             Timber.plant(new CrashlyticsTree(this));
//         }else{
//             Timber.plant(new CrashlyticsTree(this));
//         }
// 
//         // Initialize PostOffice
//         PostOffice.lick(new Stamp.Builder(this)
//                 .setCancelable(true)
//                 .setCanceledOnTouchOutside(true)
//                 .setDesign(Design.MATERIAL_LIGHT)
//                 .setThemeColorResource(R.color.accent)
//                 .build());
// 
//         // Intialize Ollie
//         Ollie.with(this)
//              .setName(DB_NAME)
//              .setVersion(DB_VERSION)
//              .setLogLevel(BuildConfig.DEBUG ? Ollie.LogLevel.FULL : Ollie.LogLevel.NONE)
//              .init();
// 
//         // Build and Inject Dagger Object Graph
//         buildObjectGraphAndInject();
// 
//     }
// 
//     @DebugLog
//     public void buildObjectGraphAndInject(){
//         objectGraph = ObjectGraph.create(new Object[]{
//             new ShowcaseModule(this)
//         });
//         objectGraph.inject(this);
//     }
// 
//     /**
//      * Create a scoped object graph
//      *
//      * @param modules       the list of modules to add to the scope
//      * @return              the scoped graph
//      */
//     public ObjectGraph createScopedGraph(Object... modules){
//         return objectGraph.plus(modules);
//     }
// 
//     /**
//      * Inject an object with the object graph
//      */
//     public void inject(Object o){
//         objectGraph.inject(o);
//     }
// 
//     /**
//      * Get a reference to the Application
//      *
//      * @param ctx       the context
//      *
//      * @return          the ChipperApp reference
//      */
//     public static ShowcaseApp get(Context ctx){
//         return (ShowcaseApp) ctx.getApplicationContext();
//     }
// 
//     /**
//      * Get a reference to this application with a service
//      * object
//      *
//      * @param ctx
//      * @return
//      */
//     public static ShowcaseApp get(Service ctx){
//         return (ShowcaseApp) ctx.getApplication();
//     }
// 
// }


// Path: app/src/main/java/com/ftinc/showcase/ui/model/BaseActivity.java
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.AppCompatActivity;
import com.ftinc.showcase.ShowcaseApp;
import dagger.ObjectGraph;

package com.ftinc.showcase.ui.model;




/**
 * This is a base UI activity that assists in creating a scoped
 * object graph on the activity for DI
 *
 * Project: Chipper
 * Package: com.r0adkll.chipper.ui
 * Created by drew.heavner on 11/12/14.
 */
public abstract class BaseActivity extends AppCompatActivity {

    private ObjectGraph activityGraph;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        activityGraph = ShowcaseApp.get(this).createScopedGraph(getModules());