moosetechnology / MooseIDE

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

Revamp the Navigation panel of Inspector #802

Open badetitou opened 1 year ago

badetitou commented 1 year ago

When inspecting a not FamixModel, the navigation tab of the inspector always show all the famix column. image

But do not present the entities element (by default the group?, or restore the withNavigation keyword).

NicolasAnquetil commented 1 year ago

explanation : the problem is that for model like FAST or CRF, some of these groups (allPackages do not make sense and should not be displayed.

This list of groups must be hardcoded somewhere

Gabriel-Darbord commented 1 year ago

With @BastouP411, we found that when inspecting a model, the miNavigationInspectorExtension method is called, which calls MiModelNavigationBrowser>>itemsFor:, which calls Pragma allNamed: #navigation: from: self to: MooseAbstractGroup. Then in MooseAbstractGroup there are all the hardcoded methods with the navigation: pragma.

In order to have these navigation methods only in the models that are affected by these navigation options, our idea is to move these methods to traits that are only added when the corresponding trait is used. For example, if a model has an entity that uses the TAccess trait, the model should have a trait like TAccessNavigation that adds the navigation method.

Edit: It'd be better to have a single trait holding all the navigation method for a model, like TEntityCreator. I'm thinking this latter trait can be the one to contain the navigation methods, although it should be renamed, maybe to TEntityHandler...?