Book a Demo

Author Topic: Integration between EA and VS.NET  (Read 2896 times)

Jie_Zhao

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
Integration between EA and VS.NET
« on: September 20, 2002, 06:28:16 am »
Hi

I am looking for the code generation for VS.NET and like to be able to link the EA model with VS.NET project/Solution.

Any ideas?

Thanks

AntonK

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
  • DOT NETTED
    • View Profile
Re: Integration between EA and VS.NET
« Reply #1 on: September 21, 2002, 04:38:07 am »
To import all source files from a directory into a package - right click on a package in EA and select code generation - import source directory.
Same routine for export selecting Generate source code.

To import a single source file in to a diagram select the diagram,  (make sure no current classes are selected) then use menu Diagram -> Import

There  are a couple of issues.(at least in C#). Import does not correctly preserve properties wrapped members. Code export fails if there are multiple classes within the same source file(allows you to overwrite the file) which can be fixed by setting a unique source file name for each class (defeats the purpose soewhat).  Code import in C# fails if there are comments appended to end of code lines eg
int X = 0;//some comment
This requires manual preparation of the files B4 import. Regex can help here (Search and replace )
Search:^(([\s]*)[^\/\r\n]+?)(\/\/)(.*)$
Replace:\2\3\4
\1

There are also issues with NameSpaces.
I Have worked out the gist of it and it seems that Namespaces must correspond with packages in EA.

Eg import each namespace into its own package in a representative namespace and package hierarchy.
System.Text.StringBuilder Goes in Package Text under package System.


Cheers

macinnesm

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Integration between EA and VS.NET
« Reply #2 on: September 22, 2002, 07:10:40 am »
I have also noticed that unmodified generated code C# does not directly import back in to EA using synchronise. Especially interface implementations.

Does anyone know how to draw Interface Implementations that will synchronise correctly?

Marcus