Author Topic: When a selected element has the "Find-In project browser" context menu option ?  (Read 6385 times)

mateiacd

  • EA User
  • **
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Hi,

In a diagram, I select an element, then I right-click that element, showing its context menu

I notice that for some elements, the "Find-In project browser" context menu exists,
while for other elements, the Find context menu does not exist at all.

Please see the below image as an example.

Can please someone indicate an SQL query or an API function that allows me to
detect in advance if the "Find-In project browser" context option is available for the selected element?



« Last Edit: February 15, 2019, 11:19:21 pm by mateiacd »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Whether or the menu option is depends on whether or not the element is visible in the project browser.
Element who are not visible are typically "diagram owned" elements such as notes, boundaries, legends,...

There is no list available I'm afraid.
You'll have to figure it out by trial and error.

Geert

mateiacd

  • EA User
  • **
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Whether or the menu option is depends on whether or not the element is visible in the project browser.
Element who are not visible are typically "diagram owned" elements such as notes, boundaries, legends,...
There is no list available I'm afraid.
You'll have to figure it out by trial and error.

Ok thank you, but how Enterprise Architect seems to just "know" if the element is "diagram owned"
and it does not display the "Find" context menu option ?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
As Geert said: it's hard coded in EA. So EA knows well about it. But not us users...

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Whether or the menu option is depends on whether or not the element is visible in the project browser.
Element who are not visible are typically "diagram owned" elements such as notes, boundaries, legends,...
There is no list available I'm afraid.
You'll have to figure it out by trial and error.

Ok thank you, but how Enterprise Architect seems to just "know" if the element is "diagram owned"
and it does not display the "Find" context menu option ?
Yes. I'm pretty sure there's a hardcoded list of element types somewhere in the EA application code.

Geert

Mauricio Moya (Arquesoft)

  • EA User
  • **
  • Posts: 340
  • Karma: +8/-4
  • EA Consulting and development in Spanish
    • View Profile
    • Arquehub Azure Module
Just something to add to the discussion: the Diagram Legend in previous versions of EA (< 14) was a diagram element, which means that only was visible in a diagram but not in the project browser. But since version 14, diagram legend nows appears in the project browser (with empty name), so this type of element has a weird behavior and it is possible that Sparx has forgotten to include in the contextual menu to list the option to find in project browser. Just try Alt + G command to find it.

JayHollingsworth

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Just something to add to the discussion: the Diagram Legend in previous versions of EA (< 14) was a diagram element, which means that only was visible in a diagram but not in the project browser. But since version 14, diagram legend nows appears in the project browser (with empty name), so this type of element has a weird behavior and it is possible that Sparx has forgotten to include in the contextual menu to list the option to find in project browser. Just try Alt + G command to find it.

That actually sounds like a bug to me (I'm not yet on 14 so I can't play with it myself). I wouldn't want to see the legend listed as an object in the Browser window.