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 - da_Burp

Pages: [1]
1
Thanks. I realize I never found this helpitem because I have never used the contents to find helpitems. ::)

2
On a model transformation i;m generating ID's for classes, and i would like to set the initial value of that id to -1. But it seems like I can not set the 'initial' value of an attribute on transformation of a model. I can access all the other fields like name, notes, alias etc.. But why on earth can't I set the initial field?

Am I just using the wrong name(initial)? Or is it, for some odd reason, simple not possible to do so?

3
I understand, but I want to use the role name for generating code in the target class(Parent) of the linked attribute which sets up the Bi-Directional relationship when adding or removing an child through Add/Remove functions.
Quote
...in Bi-Directional relations I want to add another line that sets the relation on the child in the form of Child.Dad = this; I have explicitly named the role dad because it's the rolename that is used to generate the field & property on the Child class.
But since I'm not in any class scope when the connectors Template is run, so I don't have the ability to do any editing in the class neccesary for adding functions & code(Child.Dad = this;).

I have also tried adding TaggedValues to the connector so I could use those in the LinkedAttrbute template, but I figured it's also not possible to add Tagged Values to connectors in the templates. :(

4
For a modeltransformation from PIM to a C# PSM I would like to have access to information about the source of a Linked Attribute so I can generate intial code in one class that know about the the class/role on the other side of the association.

I have a bi-directional one to many association between let's say a Parent[1]<-(dad) and a (kids)->[0..*]Child. Now I want to expose the collection of children as ReadOnly, this can be done in code generation and is ok. To be able to add and remove children from that relation I have written templates that generate these Add and Remove functions. I want to generate code in these functions as well. I have succeeded in generating initial code for the collection access in the form of this.Kids.Add(child); However, in Bi-Directional relations I want to add another line that sets the relation on the child in the form of Child.Dad = this; I have explicitly named the role dad because it's the rolename that is used to generate the field & property on the Child class. Unfortunately the only information I have access to on the moment of generating the Add/Remove functions during the transformation is the Type information of the target(Child). So the only way I have found so far to make this work is to give the role the same name as the target Type using the 'linkAttName' substitution macro. This however can be very confusing, and it would just be a whole lot easier to make it useable when there is access to source information of the linked attribute just like there is on the connector substitution macro fields.

I guess there's might be some explicit reasoning for this. So the question is if this can be made possible, and if not, for what reason it is done this way?


[size=10]Another thing that apparently isn't possible is that parts of the PIM that have been deleted don't get deleted on transformation in the PSM. I was striving to be able to have the PSM be equal with what was in the model plus have functionality that was added in code to be synchronised with the PSM as well. But I guess that's just simply to ambitious since it's is not possible to have the Transformation distinguish what in the PSM is from synchronising with code and what is from the PIM. Concluding this I think I will abandon the reverse engineering(or reverse engineer in a seperate model if needed) and stick to only forward engineering to make this not to complicated and error prone for other people to use.[/size]

5
General Board / Re: Code generation for Associations
« on: August 02, 2007, 09:46:58 pm »
Quote
The rules for what constitutes an attribute vary somewhat between associations without any aggregation and those that do.  However, LinkedAttribute templates should still execute for aggregations and compositions.  (They won't generate at the other end)
And that axectly what i'm running up against now. So the only option is to have bot sides navigable is either make it a bi-directional association again or to add the attribute X manually on class B the PIM in the following situation: [A]<><-X---Y->?

6
General Board / Re: Code generation for Associations
« on: August 02, 2007, 03:11:04 am »
I could give that a try on another PC later on. If it works I will drive the version manager nuts though, ;D Since we have the policy of sticking to a version for a little longer. This is because each update requires a new roll-out has to be arranged for the whole company. ;)

7
General Board / Re: Code generation for Associations
« on: August 02, 2007, 02:44:50 am »
Quote
*But* it only works for "plain" associations, not with aggregation nor composition. Why is that? Is there any way around it?

It seems this behaviour is still the same in version 6.5.806. Even though I came across this behaviour during transformation and not generation it is identical. So a composition or aggregation won't result in a linked attribute. Is there any specific UML design reason why it is implemented like this?

I have a model here where a composition is bi-directional. But  because the composite side doesn't result in a Linked Attribute it's not really navigable. I've never see it in any model using this bi-directional composition, and I faintly remember reading something it's actually not appropriate, but i'm not sure about that. But I wonder what there would be against this.

8
General Board / Re: tagged values in associations/connections
« on: June 07, 2007, 04:46:46 am »
Quote
Simon,

Do you know if this is on the radar at Sparx?

David
Is it possible someone could give an answer to this question? Can we expect this anytime soon?

9
Bugs and Issues / Re: VS2005 MDG integration not working
« on: March 07, 2008, 09:52:40 am »
I've had the same issue tonight in VS2008 running on WinXP.
Running the installer again fixed it for me though.

Pages: [1]