Book a Demo

Author Topic: Repository.WriteSelectableOutput()  (Read 5701 times)

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Repository.WriteSelectableOutput()
« on: January 29, 2020, 09:07:37 pm »
Hello,


Repository.WriteOutput() takes an ID which EA passes to Add-Ins in EA_OnOutputItem[Double]Clicked().

In an AddIn-less situation, it would be useful to be able to write output which links to an element or diagram, but which is handled by the EA client. This would simply need to call Repository.ShowInProjectView() (and quash any exception thrown). Possibly the text itself should be underlined, signalling that it allows interaction.

Repository.WriteSelectableOutput(string Name, string Output, object Item)
    Writes text to a specified tab in the System Output window, and associates the text with an item which can be selected in the project browser.
    Accepted object types are Package, Element, Diagram, Attribute, and Method.
    Parameters:
  • Name: String - specifies the tab on which to display the text
  • Output: String - specifies the text to display
  • Item: Object - the object to highlight
There. I've even written the documentation for you.


/Uffe
My theories are always correct, just apply them to the right reality.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Repository.WriteSelectableOutput()
« Reply #1 on: January 29, 2020, 10:50:56 pm »
+1

Geert

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Repository.WriteSelectableOutput()
« Reply #2 on: January 29, 2020, 11:43:01 pm »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Repository.WriteSelectableOutput()
« Reply #3 on: January 30, 2020, 11:47:27 am »
In an AddIn-less situation, it would be useful to be able to write output which links to an element or diagram, but which is handled by the EA client.
The reason why that isn't done already is because there's no way for EA to know what type of thing is referenced.

On the other hand, you can trivially write a modeled add-in that implements those functions.

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Repository.WriteSelectableOutput()
« Reply #4 on: January 30, 2020, 07:02:29 pm »
In an AddIn-less situation, it would be useful to be able to write output which links to an element or diagram, but which is handled by the EA client.
The reason why that isn't done already is because there's no way for EA to know what type of thing is referenced.

This doesn't quite make sense. If EA can resolve the object type in Repository.ShowInProjectView(), why not here?
But whatever, make it a GUID instead of an Object, and try the five types of object listed. Solved.

Quote
On the other hand, you can trivially write a modeled add-in that implements those functions.
Nothing is "trivial" with the documentation in the state it's in, but more to the point, model Add-Ins are counter-indicated in multi-project setups. Having the client handle context-tagged output from a script would work regardless of deployment model.

/U
My theories are always correct, just apply them to the right reality.