fmorbini / scxmlgui

A graphical user interface for editing SCXML finite state machines.
Other
105 stars 37 forks source link

Improve xml formatting in node editor #40

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
# create a node
 add the following datamodel

<timeout>23:00:00</timeout>
<name>start</name>
<dummy/>

# save and reopen scxml and you will get in datamodel:

<timeout>23:00:00</timeout>
   <name>start</name>
   <dummy></dummy>

What is the expected output? 
An xml that is close to original

What do you see instead?
Additional indenting of some tags
Additional closing tags when there is no value inside it.

What version of the product are you using? On what operating system?
Latest on WinWP

Original issue reported on code.google.com by daggett....@gmail.com on 9 Oct 2012 at 5:42

GoogleCodeExporter commented 9 years ago
it may be a problem with the syntax highlighting library we use. but i didn't 
check.

Original comment by fmorbini on 24 Oct 2012 at 5:14

GoogleCodeExporter commented 9 years ago
i think it's a result of xml formatting during scxml serialize
in the file it will be formatted:

<scxml initial="start" version="0.9" xmlns="http://www.w3.org/2005/07/scxml">
 <state id="start">
  <datamodel>
   <timeout>23:00:00</timeout>
   <name>start</name>
   <dummy></dummy>
  </datamodel>
 </state>
</scxml>

<timeout>23:00:00</timeout>
   <name>start</name>
   <dummy></dummy>

and when you reopen datamodel editor
the first line does not have spaces in front
and others does

i think datamodel must be reformatted on open (as on save).

Original comment by daggett....@gmail.com on 25 Oct 2012 at 5:37