public void RefreshField()
        {
            if (m_Row == null || m_Inspector == null)
            {
                return;
            }

            var cShartStyleName = BuilderInspectorStyleFields.ConvertUssStyleNameToCSharpStyleName(styleName);
            var property        = BuilderInspectorStyleFields.GetStyleProperty(m_Inspector.currentRule, cShartStyleName);

            // Disable completion on text field-based property fields when editing inline styles
            if (m_CompleterOnTarget != null)
            {
                m_CompleterOnTarget.enabled = BuilderSharedStyles.IsSelectorElement(m_Inspector.currentVisualElement);
            }

            if (property != null)
            {
                if (property.IsVariable())
                {
                    targetField.AddToClassList(BuilderConstants.InspectorLocalStyleVariableClassName);
                }
                else
                {
                    targetField.RemoveFromClassList(BuilderConstants.InspectorLocalStyleVariableClassName);
                }
            }
            else if (!string.IsNullOrEmpty(styleName))
            {
                bool found        = false;
                var  styleSheet   = m_Inspector.styleSheet;
                var  matchedRules = m_Inspector.matchingSelectors.matchedRulesExtractor.selectedElementRules;

                // Search for a variable in the best matching rule
                for (var i = matchedRules.Count - 1; i >= 0; --i)
                {
                    var matchRecord  = matchedRules.ElementAt(i).matchRecord;
                    var ruleProperty = styleSheet.FindProperty(matchRecord.complexSelector.rule, styleName);

                    if (ruleProperty != null)
                    {
                        if (ruleProperty.IsVariable())
                        {
                            targetField.AddToClassList(BuilderConstants.InspectorLocalStyleVariableClassName);
                            found = true;
                        }

                        break;
                    }
                }

                if (!found)
                {
                    targetField.RemoveFromClassList(BuilderConstants.InspectorLocalStyleVariableClassName);
                }
            }
        }
        static string GetBoundVariableName(VariableEditingHandler handler)
        {
            var    styleName = handler.targetField.GetProperty(BuilderConstants.InspectorStylePropertyNameVEPropertyName) as string;
            var    property  = BuilderInspectorStyleFields.GetStyleProperty(handler.m_Inspector.currentRule, styleName);
            string varName   = null;

            // Find the name of the variable bound to the field
            if (property != null)
            {
                if (property.IsVariable())
                {
                    varName = handler.m_Inspector.styleSheet.ReadVariable(property);
                }
            }
            else if (!handler.editingEnabled)
            {
                var matchedRules = handler.m_Inspector.matchingSelectors.matchedRulesExtractor.selectedElementRules;

                for (var i = matchedRules.Count - 1; i >= 0; --i)
                {
                    var matchRecord  = matchedRules.ElementAt(i).matchRecord;
                    var ruleProperty = matchRecord.sheet.FindProperty(matchRecord.complexSelector.rule, styleName);

                    if (ruleProperty != null)
                    {
                        if (ruleProperty.IsVariable())
                        {
                            varName = matchRecord.sheet.ReadVariable(ruleProperty);
                            break;
                        }
                    }
                }
            }

            return(varName);
        }