Author Topic: import *  (Read 633 times)

Andrefern

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
import *
« on: May 18, 2006, 06:00:01 am »
Hi,

I'm trying to define a dependency relation between a class and a package (package1) as import. I'd like to generate code of this class with:

import xxx.xxxx.xxxx.package1.*

But it haven't worked. Have I done something wrong?

Thanks.

thomaskilian

  • Guest
Re:  import *
« Reply #1 on: May 18, 2006, 06:42:52 am »
You should mention the language you're using...

Andrefern

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re:  import *
« Reply #2 on: May 18, 2006, 06:54:29 am »
Java

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re:  import *
« Reply #3 on: May 18, 2006, 07:06:56 am »
Is this something of your own design - a part of your model - that needs to be imported somewhere else? Or, are you attempting to import a part of the Java environment?

In the latter case you'll have to use EA's Import Binary Module to bring the Java environment into your model somewhere. There is a lot of info here in the forum on how to do that, so try a search.

David
No, you can't have it!

Andrefern

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re:  import *
« Reply #4 on: May 18, 2006, 07:12:19 am »
This package is from my own design. But, if it were from some package in Java Environment I would like to do the same.

I don't like verbose imports. Anyway, it's a good pratice use import *.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re:  import *
« Reply #5 on: May 18, 2006, 07:17:13 am »
But difficult for EA and other tools to interpret.
No, you can't have it!

Simon M

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 6200
  • Karma: +47/-5
    • View Profile
Re:  import *
« Reply #6 on: May 18, 2006, 03:11:18 pm »
If you really want to do this, then you're going to need to add a list over connectors in your import section template.  Add as a condition in the list that the source needs to be the current element, the target should be a package and the connector type should be a dependency.

Sorry, I can't give a code fragment that would do it at the moment.
Simon

support@sparxsystems.com

Andrefern

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re:  import *
« Reply #7 on: May 19, 2006, 11:42:06 am »
Ok.

Thanks for your answers.  ;)