UiInspectorContextProvider (@NotNull Object component) { if (component instanceof UiInspectorContextProvider) { return ((UiInspectorContextProvider)component); } if (component instanceof JComponent) { return ObjectUtils.tryCast(((JComponent)component).getClientProperty(PROPERTY_KEY), UiInspectorContextProvider.class); } return null; }