public override RdUsageGroup CreateModel(IOccurrence occurrence, IOccurrenceBrowserDescriptor descriptor)
        {
            if (occurrence is ReferenceOccurrence referenceOccurrence &&
                referenceOccurrence.PrimaryReference is IUnityYamlReference reference)
            {
                return(CreateModel(UnityObjectPsiUtil.GetComponentName(reference.ComponentDocument)));
            }

            return(EmptyModel());
        }
Beispiel #2
0
        public override RdUsageGroup CreateModel(IOccurrence occurrence, IOccurrenceBrowserDescriptor descriptor)
        {
            using (CompilationContextCookie.GetExplicitUniversalContextIfNotSet())
            {
                if (occurrence is ReferenceOccurrence referenceOccurrence &&
                    referenceOccurrence.PrimaryReference is IUnityYamlReference reference)
                {
                    return(CreateModel(UnityObjectPsiUtil.GetComponentName(reference.ComponentDocument)));
                }
            }

            return(EmptyModel());
        }