From 777e9323de66659c4ac3804ff71cc74cbb825bb8 Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Mon, 24 Sep 2018 11:02:13 -0700 Subject: [PATCH] Rename remaining exported Sonar Android references Summary: Excludes internal plugins, but should cover everything else. Reviewed By: priteshrnandgaonkar Differential Revision: D10009134 fbshipit-source-id: f601014e984bccf78fadbe59ee50dffdb4f6cb12 --- .../plugins/common/BufferingFlipperPlugin.java | 14 +++++++------- .../console/iface/ConsoleCommandReceiver.java | 2 +- .../flipper/plugins/inspector/BoundsDrawable.java | 2 +- .../plugins/inspector/InspectorFlipperPlugin.java | 2 +- .../flipper/plugins/inspector/InspectorValue.java | 2 +- .../flipper/plugins/inspector/NodeDescriptor.java | 14 +++++++------- .../descriptors/utils/AccessibilityUtil.java | 4 ++-- .../plugins/leakcanary/RecordLeakService.java | 2 +- .../plugins/litho/DebugComponentDescriptor.java | 2 +- .../flipper/plugins/litho/PropWithDescription.java | 2 +- .../plugins/network/FlipperOkhttpInterceptor.java | 2 +- .../SharedPreferencesFlipperPlugin.java | 6 +++--- 12 files changed, 27 insertions(+), 27 deletions(-) diff --git a/android/src/main/java/com/facebook/flipper/plugins/common/BufferingFlipperPlugin.java b/android/src/main/java/com/facebook/flipper/plugins/common/BufferingFlipperPlugin.java index 915334b62..b03b01d7c 100644 --- a/android/src/main/java/com/facebook/flipper/plugins/common/BufferingFlipperPlugin.java +++ b/android/src/main/java/com/facebook/flipper/plugins/common/BufferingFlipperPlugin.java @@ -13,7 +13,7 @@ import com.facebook.flipper.core.FlipperPlugin; import javax.annotation.Nullable; /** - * Sonar plugin that keeps events in a buffer until a connection is available. + * Flipper plugin that keeps events in a buffer until a connection is available. * *

In order to send data to the {@link FlipperConnection}, use {@link #send(String, FlipperObject)} * instead of {@link FlipperConnection#send(String, FlipperObject)}. @@ -22,7 +22,7 @@ public abstract class BufferingFlipperPlugin implements FlipperPlugin { private static final int BUFFER_SIZE = 500; - private @Nullable RingBuffer mEventQueue; + private @Nullable RingBuffer mEventQueue; private @Nullable FlipperConnection mConnection; @Override @@ -52,24 +52,24 @@ public abstract class BufferingFlipperPlugin implements FlipperPlugin { if (mConnection != null) { mConnection.send(method, sonarObject); } else { - mEventQueue.enqueue(new CachedSonarEvent(method, sonarObject)); + mEventQueue.enqueue(new CachedFlipperEvent(method, sonarObject)); } } private synchronized void sendBufferedEvents() { if (mEventQueue != null && mConnection != null) { - for (CachedSonarEvent cachedSonarEvent : mEventQueue.asList()) { - mConnection.send(cachedSonarEvent.method, cachedSonarEvent.sonarObject); + for (CachedFlipperEvent cachedFlipperEvent : mEventQueue.asList()) { + mConnection.send(cachedFlipperEvent.method, cachedFlipperEvent.sonarObject); } mEventQueue.clear(); } } - private static class CachedSonarEvent { + private static class CachedFlipperEvent { final String method; final FlipperObject sonarObject; - private CachedSonarEvent(String method, FlipperObject sonarObject) { + private CachedFlipperEvent(String method, FlipperObject sonarObject) { this.method = method; this.sonarObject = sonarObject; } diff --git a/android/src/main/java/com/facebook/flipper/plugins/console/iface/ConsoleCommandReceiver.java b/android/src/main/java/com/facebook/flipper/plugins/console/iface/ConsoleCommandReceiver.java index b1485e5b2..345994e24 100644 --- a/android/src/main/java/com/facebook/flipper/plugins/console/iface/ConsoleCommandReceiver.java +++ b/android/src/main/java/com/facebook/flipper/plugins/console/iface/ConsoleCommandReceiver.java @@ -16,7 +16,7 @@ import com.facebook.flipper.plugins.common.MainThreadFlipperReceiver; import org.json.JSONObject; /** - * Convenience class for adding console execution to a Sonar Plugin. Calling {@link + * Convenience class for adding console execution to a Flipper Plugin. Calling {@link * ConsoleCommandReceiver#listenForCommands(FlipperConnection, ScriptingEnvironment, ContextProvider)} * will add the necessary listeners for responding to command execution calls. */ diff --git a/android/src/main/java/com/facebook/flipper/plugins/inspector/BoundsDrawable.java b/android/src/main/java/com/facebook/flipper/plugins/inspector/BoundsDrawable.java index 85c3b2da9..e0b872c73 100644 --- a/android/src/main/java/com/facebook/flipper/plugins/inspector/BoundsDrawable.java +++ b/android/src/main/java/com/facebook/flipper/plugins/inspector/BoundsDrawable.java @@ -103,7 +103,7 @@ public class BoundsDrawable extends Drawable { drawBoundsDimensions(canvas, mContentBounds); - // Disabled for now since Sonar doesn't support options too well at this point in time. + // Disabled for now since Flipper doesn't support options too well at this point in time. // Once options are supported, we should re-enable the calls below // drawCardinalDimensionsBetween(canvas, mContentBounds, mPaddingBounds); // drawCardinalDimensionsBetween(canvas, mPaddingBounds, mMarginBounds); diff --git a/android/src/main/java/com/facebook/flipper/plugins/inspector/InspectorFlipperPlugin.java b/android/src/main/java/com/facebook/flipper/plugins/inspector/InspectorFlipperPlugin.java index f9147f09a..4da4c7cac 100644 --- a/android/src/main/java/com/facebook/flipper/plugins/inspector/InspectorFlipperPlugin.java +++ b/android/src/main/java/com/facebook/flipper/plugins/inspector/InspectorFlipperPlugin.java @@ -47,7 +47,7 @@ public class InspectorFlipperPlugin implements FlipperPlugin { private @Nullable List mExtensionCommands; private boolean mShowLithoAccessibilitySettings; - /** An interface for extensions to the Inspector Sonar plugin */ + /** An interface for extensions to the Inspector Flipper plugin */ public interface ExtensionCommand { /** The command to respond to */ String command(); diff --git a/android/src/main/java/com/facebook/flipper/plugins/inspector/InspectorValue.java b/android/src/main/java/com/facebook/flipper/plugins/inspector/InspectorValue.java index 5cce42a00..865ba7114 100644 --- a/android/src/main/java/com/facebook/flipper/plugins/inspector/InspectorValue.java +++ b/android/src/main/java/com/facebook/flipper/plugins/inspector/InspectorValue.java @@ -15,7 +15,7 @@ public class InspectorValue implements FlipperValue { /** * Descrive the type of data this value contains. This will influence how values are parsed and - * displayed by the Sonar desktop app. For example colors will be parse as integers and displayed + * displayed by the Flipper desktop app. For example colors will be parse as integers and displayed * using hex values and be editable using a color picker. * *

Do not extends this list of types without adding support for the type in the desktop diff --git a/android/src/main/java/com/facebook/flipper/plugins/inspector/NodeDescriptor.java b/android/src/main/java/com/facebook/flipper/plugins/inspector/NodeDescriptor.java index c5d2c6ba4..49cb32a57 100644 --- a/android/src/main/java/com/facebook/flipper/plugins/inspector/NodeDescriptor.java +++ b/android/src/main/java/com/facebook/flipper/plugins/inspector/NodeDescriptor.java @@ -18,7 +18,7 @@ import javax.annotation.Nullable; /** * A NodeDescriptor is an object which known how to expose an Object of type T to the ew Inspector. - * This class is the extension point for the Sonar inspector plugin and is how custom classes and + * This class is the extension point for the Flipper inspector plugin and is how custom classes and * data can be exposed to the inspector. */ public abstract class NodeDescriptor { @@ -44,8 +44,8 @@ public abstract class NodeDescriptor { } /** - * Invalidate a node. This tells Sonar that this node is no longer valid and its properties and/or - * children have changed. This will trigger Sonar to re-query this node getting any new data. + * Invalidate a node. This tells Flipper that this node is no longer valid and its properties and/or + * children have changed. This will trigger Flipper to re-query this node getting any new data. */ protected final void invalidate(final T node) { if (mConnection != null) { @@ -64,8 +64,8 @@ public abstract class NodeDescriptor { } /** - * Invalidate a node in the ax tree. This tells Sonar that this node is no longer valid and its properties and/or - * children have changed. This will trigger Sonar to re-query this node getting any new data. + * Invalidate a node in the ax tree. This tells Flipper that this node is no longer valid and its properties and/or + * children have changed. This will trigger Flipper to re-query this node getting any new data. */ protected final void invalidateAX(final T node) { if (mConnection != null) { @@ -187,13 +187,13 @@ public abstract class NodeDescriptor { } /** - * @return A string indicating how this element should be decorated. Check with the Sonar desktop + * @return A string indicating how this element should be decorated. Check with the Flipper desktop * app to see what values are supported. */ public abstract String getDecoration(T node) throws Exception; /** - * @return A string indicating how this element should be decorated in the AX tree. Check with the Sonar desktop + * @return A string indicating how this element should be decorated in the AX tree. Check with the Flipper desktop * app to see what values are supported. */ public String getAXDecoration(T node) throws Exception { diff --git a/android/src/main/java/com/facebook/flipper/plugins/inspector/descriptors/utils/AccessibilityUtil.java b/android/src/main/java/com/facebook/flipper/plugins/inspector/descriptors/utils/AccessibilityUtil.java index d9e8b64e7..2caa28d14 100644 --- a/android/src/main/java/com/facebook/flipper/plugins/inspector/descriptors/utils/AccessibilityUtil.java +++ b/android/src/main/java/com/facebook/flipper/plugins/inspector/descriptors/utils/AccessibilityUtil.java @@ -512,7 +512,7 @@ public final class AccessibilityUtil { /** * Creates a {@link FlipperObject} of useful properties of AccessibilityNodeInfo, to be shown in the - * Sonar Layout Inspector accessibility extension. All properties are immutable since they are all derived from + * Flipper Layout Inspector accessibility extension. All properties are immutable since they are all derived from * various {@link View} properties. This is a more complete list than * getAccessibilityNodeInfoProperties returns. * @@ -609,7 +609,7 @@ public final class AccessibilityUtil { /** * Modifies a {@link FlipperObject.Builder} to add Talkback-specific Accessibiltiy properties to be - * shown in the Sonar Layout Inspector. + * shown in the Flipper Layout Inspector. * * @param props The {@link FlipperObject.Builder} to add the properties to. * @param view The {@link View} to derive the properties from. diff --git a/android/src/main/java/com/facebook/flipper/plugins/leakcanary/RecordLeakService.java b/android/src/main/java/com/facebook/flipper/plugins/leakcanary/RecordLeakService.java index 217d82a29..27d9a415a 100644 --- a/android/src/main/java/com/facebook/flipper/plugins/leakcanary/RecordLeakService.java +++ b/android/src/main/java/com/facebook/flipper/plugins/leakcanary/RecordLeakService.java @@ -16,7 +16,7 @@ import com.squareup.leakcanary.AnalysisResult; import com.squareup.leakcanary.HeapDump; /** - * When a leak is detected, sends results to connected Sonar desktop app. In order to use this + * When a leak is detected, sends results to connected Flipper desktop app. In order to use this * service in place of the default, a custom RefWatcher will need to be created See * https://github.com/square/leakcanary/wiki/Customizing-LeakCanary#uploading-to-a-server */ diff --git a/android/src/main/java/com/facebook/flipper/plugins/litho/DebugComponentDescriptor.java b/android/src/main/java/com/facebook/flipper/plugins/litho/DebugComponentDescriptor.java index 80ee604c8..d9ba14a12 100644 --- a/android/src/main/java/com/facebook/flipper/plugins/litho/DebugComponentDescriptor.java +++ b/android/src/main/java/com/facebook/flipper/plugins/litho/DebugComponentDescriptor.java @@ -284,7 +284,7 @@ public class DebugComponentDescriptor extends NodeDescriptor { && PropWithDescription.class.isAssignableFrom(f.get(component).getClass())) { final Object description = ((PropWithDescription) f.get(component)) - .getSonarLayoutInspectorPropDescription(); + .getFlipperLayoutInspectorPropDescription(); // Treat the description as immutable for now, because it's a "translation" of the // actual prop, // mutating them is not going to change the original prop. diff --git a/android/src/main/java/com/facebook/flipper/plugins/litho/PropWithDescription.java b/android/src/main/java/com/facebook/flipper/plugins/litho/PropWithDescription.java index 5aedacdbd..ee2796289 100644 --- a/android/src/main/java/com/facebook/flipper/plugins/litho/PropWithDescription.java +++ b/android/src/main/java/com/facebook/flipper/plugins/litho/PropWithDescription.java @@ -4,5 +4,5 @@ package com.facebook.flipper.plugins.litho; public interface PropWithDescription { - Object getSonarLayoutInspectorPropDescription(); + Object getFlipperLayoutInspectorPropDescription(); } diff --git a/android/src/main/java/com/facebook/flipper/plugins/network/FlipperOkhttpInterceptor.java b/android/src/main/java/com/facebook/flipper/plugins/network/FlipperOkhttpInterceptor.java index 8fd802c76..beb33bce1 100644 --- a/android/src/main/java/com/facebook/flipper/plugins/network/FlipperOkhttpInterceptor.java +++ b/android/src/main/java/com/facebook/flipper/plugins/network/FlipperOkhttpInterceptor.java @@ -94,7 +94,7 @@ public class FlipperOkhttpInterceptor implements Interceptor { try { info.body = body.bytes(); } catch (IOException e) { - Log.e("Sonar", e.toString()); + Log.e("Flipper", e.toString()); } return info; } diff --git a/android/src/main/java/com/facebook/flipper/plugins/sharedpreferences/SharedPreferencesFlipperPlugin.java b/android/src/main/java/com/facebook/flipper/plugins/sharedpreferences/SharedPreferencesFlipperPlugin.java index a3be1c714..4236e4dea 100644 --- a/android/src/main/java/com/facebook/flipper/plugins/sharedpreferences/SharedPreferencesFlipperPlugin.java +++ b/android/src/main/java/com/facebook/flipper/plugins/sharedpreferences/SharedPreferencesFlipperPlugin.java @@ -43,7 +43,7 @@ public class SharedPreferencesFlipperPlugin implements FlipperPlugin { }; /** - * Creates a {@link android.content.SharedPreferences} plugin for Sonar + * Creates a {@link android.content.SharedPreferences} plugin for Flipper * * @param context The context to retrieve the file from. Will use the package name as the file * name with {@link Context#MODE_PRIVATE}. @@ -53,7 +53,7 @@ public class SharedPreferencesFlipperPlugin implements FlipperPlugin { } /** - * Creates a {@link android.content.SharedPreferences} plugin for Sonar + * Creates a {@link android.content.SharedPreferences} plugin for Flipper * * @param context The context to retrieve the file from. Will use the name as the file name with * {@link Context#MODE_PRIVATE}. @@ -64,7 +64,7 @@ public class SharedPreferencesFlipperPlugin implements FlipperPlugin { } /** - * Creates a {@link android.content.SharedPreferences} plugin for Sonar + * Creates a {@link android.content.SharedPreferences} plugin for Flipper * * @param context The context to retrieve the file from. * @param name The preference file name.