Book a Demo

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - shreeya

Pages: [1]
1
General Board / Setting Tag
« on: April 25, 2011, 11:29:53 pm »
Hi,

In my DDL,i am setting the Tag as below,Attribute Template

%if attType == "Text" %
            $Comment="Size Tag implementation"
            $len=%attTag:"Length"%
            %if $len==""%
                  Tag{name="Length" value="100"}
            %endIf%
      %endIf%
[highlight]$len=%attTag:"Length"%      [/highlight]      
 $type="nvarchar("+ $len+")"
              type =%qt%$type%qt%

when i read the tag value(highlighted code) i am surprised to see that the value is blank.Any pointers on this?

Thanks

2
General Board / ocl
« on: March 17, 2011, 06:54:41 pm »
Hi,

I want to start using ocl to define constraints.As i am new to this.I am confused on where to start.I just declared class level constraint in my PIM,but not sure how to go about making it work in my c# code

any help on this here?

Thanks

3
General Board / Object Constraint language  question
« on: March 17, 2011, 06:31:47 pm »
Hi,

I am new to OCL.

Let's say i have a class Person and will define the OCL constraint in PIM

context Person inv:
Person.allInstances->forAll(p1, p2 |
p1 <> p2 implies p1.name <> p2.name)

when i convert the PIM to C# model,i am not seeing any changes to the model.

let me know if anyone has any pointers on this.

Thanks


4
Automation Interface, Add-Ins and Tools / Re: multiple stereotypes
« on: August 09, 2011, 04:10:02 pm »
Do you mean instead of using stereotype,you want me to use StereotypeEx?

i am getting runtime error when i use StereotypeEx,but as i told in my post for me stereotype property is working fine and is allowing me to control the assigning the multiple values to that property, i can see the result in the intermediate file as  stereotype=="Property (Sample)"    
           ,"Property (Mandatory)" and also in my model <<Property (Sample),Property (Mandatory)>> for the relevant attribute.but my major issue is [highlight]opStereotype[/highlight] as it is returning single value(Property (Sample))

Thanks

5
Automation Interface, Add-Ins and Tools / multiple stereotypes
« on: August 08, 2011, 07:30:44 pm »
I have been using Enterprise architect from past few months and I am a beginner.

I have modified the transformation and code generation template for c# so as to suit my requirement.as it is an ongoing task, recently I tried including the support for selecting multiple stereotypes.

Please find below the code snippets

Operation
{
%TRANSFORM_REFERENCE()%
                
      %elseIf attType == "Boolean" or attType == "Char" or attType == "DateTime" or attType == "Float" or attType == "Guid" or attType == "Integer" or attType == "Text"%
            name=%qt%$propertyName%qt%
            [highlight]stereotype="Property (Sample)"[/highlight]             %if attStereotype=="Mandatory"%
            [highlight],"Property (Mandatory)"[/highlight]      %endIf%    


I am dynamically assigning 2 stereotypes to an operation, I could see in the generated C# model the relevant stereotypes are checked in Stereotype Selector window. But when I try to read the stereotype using opStereotype, I am just getting the single value Property (Sample)

I would like to know how I check whether both the stereotypes are selected through the code in Code generation template.

I hope the above explanation is sufficient to provide me the relevant knowledge.

Thanks

Pages: [1]