Feature model handling improvements and clean-up

Issue #297 resolved
Cécile Camillieri created an issue

There are several issues with the feature model display and handling :

  • a LOT of feature model related code in the GUI is located in the FeatureView class, which should only be used to display the view of single a COREFeature, and not to do recursive calls on the feature's children.
  • The highlight of the features realized by an aspect is broken. All features are highlighted when an aspect is selected.
  • Constraint definition has bugs (for example we can add multiple times the same relationship, which results in the app crashing)
  • Constraint checking also has a few issues
    • when making a selection, it considers the 'Requires' constraint to be reciprociqual, where it shouldn't.
    • the checks should take in account the re-expositions. For example if A requires B, A is re-exposed and B is not, it should show the constraint is violated, because if A is selected later on the model will never be valid
  • During selection, icons don't always show up and sometimes don't disappear
  • Currently the 'Next mode' shows only manually selected features. It should show automatically selected features as well.

Comments (8)

  1. Matthias Schoettle

    I found some too, but I am happy to create separate issues for them if they are not related to your stuff :)

    • The aspect container in the feature model is not attached to the border of the screen
    • When associating an existing model (that is not part of the models reference, i.e., it does not show up in the aspect list), it is not added to that reference (or the list is not updated right away)
    • When deleting a model from the aspect container, the file is deleted, the removed from realizing the features, but when the concern is saved, an exception is thrown. It seems that the model wasn't removed from the models reference, but it doesn't always occur. It once also happened when a new aspect is created for a feature, saved (the existing one overwritten) and then the concern saved.
    java.lang.NullPointerException
        at ca.mcgill.sel.core.ui.handler.impl.DisplayConcernSceneHandler.save(DisplayConcernSceneHandler.java:87)
        at ca.mcgill.sel.core.ui.scenes.DisplayConcernScene.actionPerformed(DisplayConcernScene.java:247)
    
    • The checkmark when reusing does not disappear in the following case: Reuse Association, select ArrayList, tap-and-hold on Unique to unexpose it, then select Unique and unselect it.
    • The checkmarks disappear in the following case: Reuse Observer, select Push, tap-and-hold on Controller to unexpose.
    • `FeatureView.notifyChanged(...)* prints on the console every time a notification is received (also, it does not check for which feature and event type the notification is for)
  2. Cécile Camillieri reporter

    I noticed some problems with the Aspect deletion too, so I think I'll create a separate issue for points #2 and #3 and some other stuff regarding association between Aspects and features Checkmarks display has been fixed already! :)

  3. Matthias Schoettle

    Cool, thanks!

    Yes, I had a discussion with Nishanth about this. Personally, I think the deletion should be command-based as well. Of course, this would require some custom-made command that can delete a model and restore it.

  4. Log in to comment