Book a Demo

Author Topic: Realize an interface thats not part of the model?  (Read 2396 times)

Stefan Block

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Realize an interface thats not part of the model?
« on: September 06, 2009, 06:24:11 pm »
Hello!
I have classes that realize interfaces from external frameworks. I could not figure out, how to design these relationships. So i thougt - never mind, just use sourcecode generation and add the "inherits Exception" line. I am doing vbNet code generation.
But when synching the next time, EA deletes that line from the sourcecode and does not add that relation to the model.
Once i tried a "import source code" of a (different) vb projekt. Inherits leads to the baseclass name being displayed in the top right corner of the name compartment of the generated class(es). But i couldnt find out where to edit this information. Subsequent synchs here leave the classes untouched.
Do you have any hints for me?
Best regards, Stefan
« Last Edit: September 06, 2009, 06:25:08 pm by sblock »

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Realize an interface thats not part of the mod
« Reply #1 on: September 07, 2009, 01:28:50 am »
Hello Stefan,

Try importing the .Net libraries that contain your interfaces (or base classes for that matter).

Look up the Import Binary Module feature in the EA documentation.

Doing this may seem like a it creates a lot of structure for just a few import statements, but it works pretty well. EA can handle the number of elements. You can also limit the number of modules you import to just those you need.

Note that this approach works well with both .Net dll and Java jar files. In both cases you can import from files supplied by the frameworks themselves as well as those in applications provided by third parties (including yourself). As long as the appropriate metadata is not somehow hidden you should be able to import the modules.

HTH, David
No, you can't have it!

Stefan Block

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Realize an interface thats not part of the mod
« Reply #2 on: September 08, 2009, 04:40:09 pm »
Hello David,

That is the solution. It took me some time to figure out what dll to import and where to find it. I downloaded Reflector and finally made it. After setting namespace root correctly it works like a charm now.

Thank you very much,
Stefan

Quote
Hello Stefan,

Try importing the .Net libraries that contain your interfaces (or base classes for that matter).

Look up the Import Binary Module feature in the EA documentation.

Doing this may seem like a it creates a lot of structure for just a few import statements, but it works pretty well. EA can handle the number of elements. You can also limit the number of modules you import to just those you need.

Note that this approach works well with both .Net dll and Java jar files. In both cases you can import from files supplied by the frameworks themselves as well as those in applications provided by third parties (including yourself). As long as the appropriate metadata is not somehow hidden you should be able to import the modules.

HTH, David