Community
Participate
Working Groups
My use case is my diagram editor needs to switch between two modes. Certain node element types are only applicable to one mode. Diagram editor's palette needs to dynamically change when mode switches.
The bug has been fixed a while ago. I just added enhancement doc for it.
Change in the visible-when condition does not cause the diagram or the palette to update accordingly.
What is the status of this bug? Are you on track to wrap this up by the end of day today?
The issue in Comment 2 has been addressed.
The palette now updates as expected, but the nodes themselves are still visible when they shouldn't be and the Add context menu still shows the option for invisible node types. Repro via Sapphire samples: 1. Edit ArchitectureEditor.sdef. In Component node's definition add visible when condition of "${ Root().DetailLevel == 1 }". 2. Create architecture.xml file and create a few components with dependencies. 3. Switch detail level to 2 via properties view. 4. Notice that the palette updates, but the nodes are still shown. Expect the nodes to hide and the add context menu to no longer offer "add component" option.
I've checked in a fix to hide invisible node types from the context Add menu. As for hiding the nodes and their associated connections, I did attempt to do that but it became very messy and complex. Since the underlying model doesn't change when the visible-when condition for nodes changes, I can't simply delete the corresponding parts and their visual representations from the editor. An alternative way would be through validations on the model. That's implemented in our adopter product's JDev counter part. Another point I want to make is due to the limitation of Sapphire 0.3.1's support on dynamic list binding, the Add for those nodes are still available in the form editor. So developers still need to handle invisible nodes added there.
Add support for showing/hiding node PEs when the visible-when condition changes.
Works very well now. The only issue I found is that when the last node in a palette compartment is hidden, the empty palette compartment remains visible. Would be best to hide it as well. I opened a separate Bug 359839 for 0.4 to track that. Verified. Closing.