ObeoNetwork / SysONExtensionDemo

Eclipse Public License 2.0
0 stars 0 forks source link

Add FBS to PBS allocation view #4

Open jessymallet opened 2 months ago

jessymallet commented 2 months ago

Description

This form view allow to have an overview on allocated function among all functions defined in the model. After user allocates a function from the PBS diagram by using semantic Drag & drop (Function to LogicalConstituent), this view will display results :

Example of expected behavior

image

EasyMod table behavior

image

jessymallet commented 1 month ago

To anticipate the setting up of tables that will be done via sirius component (and not view), we will begin to implement a form with Sirius Component including a pie chart.

For now, our representation view implement IRepresentationDescriptionProvider et they are adding to the list of Representation description views thanks to org.eclipse.syson.diagram.common.view.SysONViewDescriptionProvider.

We should create a new class to load org.eclipse.sirius.components.representations.IRepresentationDescription instead of org.eclipse.sirius.components.view.View :

@Service
public class EasyModDescriptionProvider implements IEditingContextProcessor {

    private final List<IRepresentationDescription> representationDescriptions;
    ...
    @Override
    public void preProcess(IEditingContext editingContext) {
        if (editingContext instanceof EditingContext siriusWebEditingContext) {
            siriusWebEditingContext.getRepresentationDescriptions().put(...)
        }
    }
}

Then we create an instance of org.eclipse.sirius.components.forms.description.FormDescription representing our form. This form will include one page with one group and two widgets : the pie chart and the future table.

ebausson-obeo commented 1 week ago

Apres discussion avec @jessymallet pour savoir que faire quand il n'y avait pas d'élément, il m'a dit de ne pas traiter le cas pour le moment.