Sparx Systems Forum

Enterprise Architect => Suggestions and Requests => Topic started by: SF_lt on November 10, 2005, 06:13:51 am

Title: extended referencing capability
Post by: SF_lt on November 10, 2005, 06:13:51 am
EA 6.0 added "Connecting to a class for which you know the GUID" feature - I propose to go further and add to reference elements by their reference (reference name uniqueness will be user's responsebility), for example:

class
{
   name="classA"       %TRANSFORM_REFERENCE("reference_to_classA")%
  ...
}

then then creating connectors:
dependency
{
....
source
{
   "reference_to_classA"
}
}

reference name syntax could be in other forms, but this capability would greatly improve build-in EA transforming capabilities

Hope to see this feature ASAP
Title: Re: extended referencing capability
Post by: Eve on November 10, 2005, 04:21:58 pm
Hello,

I came across a way to do this in the last couple of days.  I still don't recommend it, and I suspect you'll find it less useful than you think, but here it is.  (Example taken from what you wanted to do here (http://www.sparxsystems.com.au/cgi-bin/yabb/YaBB.pl?board=general;action=display;num=1127996437;start=0#9).)

File template:
Package
{
name="test model"
namespaceroot="true"
%list="Class" @separator="\n\n" @indent="  "%
%Class__Dependency%
}

Class template:
%elemType%
{
%TRANSFORM_REFERENCE( className, "IgnoreGUID" )%
%TRANSFORM_CURRENT()%
}

Class_Dependency template:
Dependency
{
%TRANSFORM_REFERENCE( "MyDependency" , "IgnoreGUID" )%
Source
{
%TRANSFORM_REFERENCE( "ClassA" , "IgnoreGUID")%
}
Target
{
%TRANSFORM_REFERENCE( "ClassB" , "IgnoreGUID" )%
}
}

Note that what I've done here is specified a guid that is the same across all references.
Title: Re: extended referencing capability
Post by: SF_lt on November 16, 2005, 10:39:55 am

yeah, thanks for the workaround - that's how is called temporary solution in QA ;)

however, I still propose Sparx to implement this referencing totally independently from the other transformation elements.

I suppose, it could have one of the forms:

Code: [Select]

Target { %TRANSFORM_REFERENCE( "ClassB" ) }

or
Code: [Select]

Target { XRef( name="ClassB" ) }


or many other possible forms.
Right now instead of the magic work "IgnoreGUID" using packageGUID ;)