/*
 * Copyright (c) 2017-present, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 */

package com.facebook.litho.stetho;

import android.app.Application;
import com.facebook.litho.config.ComponentsConfiguration;
import com.facebook.stetho.InspectorModulesProvider;
import com.facebook.stetho.Stetho;
import com.facebook.stetho.inspector.elements.DescriptorProvider;
import com.facebook.stetho.inspector.elements.android.AndroidDocumentProviderFactory;
import com.facebook.stetho.inspector.protocol.ChromeDevtoolsDomain;
import java.util.Arrays;

public class LithoWebKitInspector implements InspectorModulesProvider {
  private final Application mApplication;

  public LithoWebKitInspector(Application application) {
    mApplication = application;
    ComponentsConfiguration.isDebugModeEnabled = true;
  }

  @Override
  public Iterable<ChromeDevtoolsDomain> get() {
    final Stetho.DefaultInspectorModulesBuilder defaultModulesBuilder =
        new Stetho.DefaultInspectorModulesBuilder(mApplication);

    defaultModulesBuilder.documentProvider(
        new AndroidDocumentProviderFactory(
            mApplication,
            Arrays.<DescriptorProvider>asList(new ComponentsDescriptorProvider())));

    return defaultModulesBuilder.finish();
  }
}

@@ -366,24 +366,53 @@
 pplication;%0A
+import android.widget.Toast;%0A
 import com.f
@@ -453,24 +453,24 @@
 figuration;%0A
-
 import com.f
@@ -791,16 +791,198 @@
 rrays;%0A%0A
+/**%0A * @deprecated We are deprecating Stetho integration as of 0.12.0. We are looking into better%0A *     solutions which will improve the litho debugging experience.%0A */%0A@Deprecated%0A
 public c
@@ -1549,16 +1549,16 @@
 cation,%0A
-
         
@@ -1631,24 +1631,211 @@
 ider())));%0A%0A
+    Toast.makeText(%0A            mApplication,%0A            %22The litho-stetho plugin is being deprecated and will be removed with 0.12.0.%22,%0A            Toast.LENGTH_LONG)%0A        .show();%0A%0A
     return d

Add stetho deprecation message