Book a Demo

Author Topic: Recognise multiple selection - GetTreeSelected .... (e.g. with JaVA API)  (Read 4900 times)

Pegasus

  • EA User
  • **
  • Posts: 38
  • Karma: +0/-0
    • View Profile
Hello,

there are some contratictory topics to question how to get in projectbrowser selected Obejcts (e.g. packages, requirements/elements); e.g. http://sparxsystems.com/forums/smf/index.php/topic,30519.msg222208.html#msg222208 [Geerd] and http://sparxsystems.com/forums/smf/index.php/topic,5050.msg123251.html#msg123251 [Aaron]. I do have same problem. In EA 13 using Java API GetTreeSelectedElements returns collection with e.g requirements only not also selected packages, so I assume there isn't an interface returning collection of selected "objects" [in project-browser]. But how is it possible to recognise multiple selections of "objects" e.g. packages and elements at once

Thanks for support and elucidation
Pegasus

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13471
  • Karma: +571/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Recognise multiple selection - GetTreeSelected .... (e.g. with JaVA API)
« Reply #1 on: January 04, 2017, 11:38:23 pm »
I just checked in v13 and GetTreeSelectedElements returns nothing when only packages are selected.
There also doesn't seem to be a way to select both packages and elements, it's one or the other.

To my knowledge there's no way to get the selected packages.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Recognise multiple selection - GetTreeSelected .... (e.g. with JaVA API)
« Reply #2 on: January 04, 2017, 11:44:29 pm »
You could trick with a UML search that includes the #Branch# tag. However, this is just bad API design here.

q.