Beispiel #1
0
        public override List <FirstObject> getFirstObjects(SQLElement elementToSearch, SQLRepository repository)
        {
            EditorAttributeValueExpression eavExp        = new EditorAttributeValueExpression();
            List <FirstObject>             targetObjects = eavExp.getFirstObjects(elementToSearch, repository);

            return(targetObjects);
        }
Beispiel #2
0
        public override List <FirstObject> getFirstObjects(SQLElement elementToSearch, SQLRepository repository)
        {
            EditorAttributeValueExpression eAvExpression         = new EditorAttributeValueExpression();
            List <FirstObject>             targetObjectVariables = eAvExpression.getFirstObjects(elementToSearch, repository);

            //add parameters of associatedMethod
            SQLMethod associatedMethod = null;

            if (elementToSearch.Stereotype == SDMModelingMain.SdmContainerStereotype)
            {
                SQLTaggedValue assoMethodTag = EAEcoreAddin.Util.EAUtil.findTaggedValue(elementToSearch, SDMModelingMain.SDMContainerAssociatedMethodTaggedValueName);
                associatedMethod = repository.GetMethodByGuid(assoMethodTag.Value);
            }
            else if (elementToSearch.Stereotype == TGGModelingMain.TggRuleStereotype)
            {
                associatedMethod = elementToSearch.Methods.GetAt(0);
            }
            if (associatedMethod != null)
            {
                foreach (SQLParameter parameter in associatedMethod.Parameters)
                {
                    if (parameter.ClassifierID != "0")
                    {
                        Boolean alreadyIn = false;
                        foreach (Object searchTarget in targetObjectVariables)
                        {
                            if (searchTarget is SQLElement)
                            {
                                if ((searchTarget as SQLElement).Name == parameter.Name)
                                {
                                    alreadyIn = true;
                                }
                            }
                        }
                        if (!alreadyIn)
                        {
                            targetObjectVariables.Add(new FirstObject(parameter));
                        }
                    }
                }
            }

            return(targetObjectVariables);
        }