moosetechnology / MooseIDE

New Tools for Moose
MIT License
8 stars 17 forks source link

Search Moose entities using the spotter #1065

Closed badetitou closed 1 month ago

badetitou commented 1 month ago

With this PR, it is possible to searcg using the spotter some Moose entities. (I added the basic infrastructure here, it can be improved a lot to display additional information)

image

When you perform a search, it automatically search through the first moose model. If there is a lot of data, search in the spotter for the "#Moose" category.

This idea comes from the old moosebook in which the feature was implemented.

badetitou commented 1 month ago

for the baseline, I simply added the new package inside at the end and reformat with default code formatter

NicolasAnquetil commented 1 month ago

nice ! but the test coverage decreased by 0.05% :-(

badetitou commented 1 month ago

Yeah... I don't know how to test that. I have to find a way by looking at the spotter test :)

badetitou commented 1 month ago

I think the PR is ready now :) The tests cover 80% of the processor class and 25 of entry (only printString and same easy accessors are not covered)

I see three possible improvements

  1. The first possible improvement I see for now is with the icon. However, spotter is expecting an iconName, and our current implement directly provides the icon and not the name (when looking for methods mooseIcon)
  2. This PR enables searching in the first model in MooseModel root, but do not in the second, third, etc.
  3. The inspect when selecting an entity open a default inspector and not a MiInspector or an equivalent in MooseIDE application (maybe it is easy to do, but I do not know how)

I propose that we open a new issue to implement mooseIconName in places of the current mooseIcon, and then we will be able to improve the code here and at some other places.

IMO, this PR is ready for review and can be integrated if everything seems ok

jecisc commented 1 month ago

If you have some huges models in the image, does it have an impact on performances?