mt5225 / scxmlgui

Automatically exported from code.google.com/p/scxmlgui
0 stars 0 forks source link

Non Cluster Parent States does not cause validation error when child states are present #52

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a new file
2. Add a cluster node
3. Add a child node
4. Select the cluster node and Toggle Cluster -> Off

What is the expected output? What do you see instead?
A validation error similar to that of trying to drag an orphan node into a 
parent node where the parent is NOT a cluster node. However no validation error 
is shown.

I also saved SCXML files where the parent node was a Cluster and where it was 
not.
Both saves produced the same SCXML file. When either file was re-loaded, 
FSM-Editor automatically interpreted the parent XML element as a Node with 
cluster ON.
This leads me to believe that the toggling is a concept used only by the Editor 
primarily for graphical distinction purposes.

Question: Could you remove concept of cluster in the editor and let every node 
be capable of parenting? When a node is dragged over another childless node it 
could toggle its graphical appearance to be a cluster node. If a parent node 
has its only child removed, it could revert to the graphical appearance of a 
non-cluster node.

Otherwise, if specifically marked cluster nodes should invalidate if they have 
children when cluster is toggled off. Bearing in mind that the toggling makes 
no difference to the actual SCXML.

What version of the product are you using? On what operating system?
Version 172
Windows 7 32-bit
Java 7 update 11

Original issue reported on code.google.com by miketrah...@gmail.com on 15 Jan 2013 at 9:28

GoogleCodeExporter commented 9 years ago

Original comment by fmorbini on 15 Jan 2013 at 5:46