Author Topic: extended referencing capability  (Read 2964 times)

SF_lt

  • EA User
  • **
  • Posts: 216
  • Karma: +1/-0
  • The Truth Is Out There
    • View Profile
extended referencing capability
« 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
registertm everything to SparX

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8083
  • Karma: +118/-20
    • View Profile
Re: extended referencing capability
« Reply #1 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.)

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.
« Last Edit: November 10, 2005, 04:24:30 pm by simonm »

SF_lt

  • EA User
  • **
  • Posts: 216
  • Karma: +1/-0
  • The Truth Is Out There
    • View Profile
Re: extended referencing capability
« Reply #2 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 ;)
registertm everything to SparX