Skip to content
Snippets Groups Projects
Commit 5ad6a3d3 authored by Simon Barner's avatar Simon Barner
Browse files

Retrieve both specification and model element for the edited row entry

* Fixes a bug for DerivedAnnotations that return different EENums
  depending on the edited model element

Issue-Ref: 4092
Issue-Url: af3#4092



Signed-off-by: default avatarSimon Barner <barner@fortiss.org>
parent 1a73b424
No related branches found
No related tags found
1 merge request!1474092: Implement a JFX controller for the creation and visualization of reference lists
Pipeline #31112 failed
Pipeline: maven-releng

#31113

    This commit is part of merge request !147. Comments created here will be created in the context of that merge request.
    AnnotationFxViewPart.java ca1548c49aa3842a9436262531464ba345b83688 GREEN
    AnnotationTreeTableUIProvider.java 9efdeb7261cafe9dfe763daf20af186c906c3ec3 YELLOW
    AnnotationViewFXController.java c2b3e6a1cbffae55b88bff93418fa5797585d75d YELLOW
    AnnotationViewFXController.java 7017eb40e9511b6bdc40fcc5a95fd9f79247dfee YELLOW
    AnnotationsFXUtils.java e180d593b69b1e4b90adf83ba47753b29f9d6ff8 YELLOW
    ColumnHandle.java 7b0fe536d4eb9faa63c4d812f0c078cf83d0fd42 GREEN
    FXAnnotationFilterContentProvider.java ca4587ef5dce1288ee4d7bf3bea5bd544ce6b89e GREEN
    ......@@ -25,6 +25,7 @@ import static org.fortiss.tooling.base.ui.annotation.view.fx.FXAnnotationFilterC
    import static org.fortiss.tooling.kernel.ui.util.SelectionUtils.checkAndPickFirst;
    import static org.fortiss.tooling.kernel.utils.EcoreUtils.getChildrenWithType;
    import static org.fortiss.tooling.kernel.utils.EcoreUtils.getFirstParentWithType;
    import static org.fortiss.tooling.kernel.utils.EcoreUtils.pickFirstInstanceOf;
    import static org.fortiss.tooling.kernel.utils.LoggingUtils.showWarning;
    import java.util.ArrayList;
    ......@@ -425,10 +426,16 @@ public class AnnotationViewFXController extends CompositeFXControllerBase<SplitP
    if(valueType instanceof EEnum || valueType instanceof EClass) {
    // Add a combo column for enumerations and references
    column = annotationViewer.addComboColumn(columnName, 150, rowEntry -> {
    Map<Object, String> comboValues = getComboValues(featureDescriptor, specification,
    rowEntry.getModelElement());
    // We must retrieve the specification and model element for the edited row entry
    IAnnotatedSpecification entrySpec =
    pickFirstInstanceOf(annotationType, rowEntry.getSpecificationsList());
    IModelElement entryElement = rowEntry.getModelElement();
    Map<Object, String> comboValues =
    getComboValues(featureDescriptor, entrySpec, entryElement);
    return comboValues;
    });
    } else if(valueType.getInstanceClass().equals(Boolean.class)) {
    // Use a checkbox column for booleans
    column = annotationViewer.addCheckboxColumn(columnName, 100);
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment