Ejemplo n.º 1
0
        protected override void ModifyMonoBehaviour()
        {
            base.ModifyMonoBehaviour();

            this.childSortingOrderUpdaters = ModificationUtility.GetDirectChildComponents <SortingOrderUpdater>(this);
            gameObject.layer = ConstUi.UserLayerMask;
            ModifyComponentInDerivedClass();
        }
Ejemplo n.º 2
0
        private void TryCreateProductionOrTestClass(IReadOnlyCollection <ITypeElement> typesInContext)
        {
            if (typesInContext.Count != 1)
            {
                MessageBox.ShowInfo("There is no single class in context to create production/test class from.");
                return;
            }

            ModificationUtility.TryCreateTestOrProductionClass(typesInContext.Single(), _textControl);
        }
Ejemplo n.º 3
0
 void ModifyCanvasScaler()
 {
     if (canvas.rootCanvas == canvas)
     {
         var canvasScaler = ModificationUtility.GetAndAddComponent <CanvasScaler>(this);
         DefaultSettingUtility.SetCanvasScaler(canvasScaler);
     }
     else
     {
         ModificationUtility.DeleteComponent <CanvasScaler>(this);
     }
 }
        public override ICollection <IOccurrence> Search(IProgressIndicator progressIndicator)
        {
            if (!_typeElement.IsValid())
            {
                return(EmptyList <IOccurrence> .InstanceList);
            }

            var linkedTypes = LinkedTypesUtil.GetLinkedTypes(_typeElement);

            if (linkedTypes.Count == 0)
            {
                ModificationUtility.TryCreateTestOrProductionClass(_typeElement, _textControl);
            }

            bool IsDerivedName(ITypeElement typeElement) =>
            _typeElement.ShortName.Contains(typeElement.ShortName) ||
            typeElement.ShortName.Contains(_typeElement.ShortName);

            return(linkedTypes
                   .Select(x => new LinkedTypesOccurrence(x, OccurrenceType.Occurrence, IsDerivedName(x)))
                   .Where(x => !_derivedNamesOnly || x.HasNameDerived)
                   .ToArray());
        }
Ejemplo n.º 5
0
        void ModifyGraphicRaycaster()
        {
            var graphicRaycaster = ModificationUtility.GetAndAddComponent <GraphicRaycaster>(this);

            DefaultSettingUtility.SetGraphicRaycaster(graphicRaycaster);
        }