Skip to content

Dockings inside compound are not properly serialized/deserialized when compound is floating #1

@GoogleCodeExporter

Description

@GoogleCodeExporter
What steps will reproduce the problem?

1. Create new Frame with one compound docking panel
2. Add at least 1 docking to that compound
3. Enable floating for compound.
4. Add some code to persist the docking state to XML

What is the expected output? What do you see instead?

For some reason in the XML file compound childs are serialized outside the 
compound dockable as floating.

Also when you try yo read state from that XML SAXNotRecognizedException is 
generated. The reason is that there is missing checks in 
xmlBuildCompoundDockable where all childs of floating dockable are processed. 
That means that RealtivePosition, PreviousState should also be checked and not 
only Key.

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


Please provide any additional information below.


For the first problem the fix is to add in method xmlWriteFloating
additional check before check for processed dockable:

if (DockingUtilities.isChildOfCompoundDockable(d)) {
  // Skip childs
  continue;
}

That will skip all compound dockable childs in case the compound dockable is 
floating(childs are also marked as floating).

For the restore problem the update is to add check for 2 other node names in 
method xmlBuildCompoundDockable.

         if (elt.getNodeName().equals("Key") ||
                    elt.getNodeName().equals("PreviousState") ||
                    elt.getNodeName().equals("RelativePosition")) {
                    // ignore : it's the key of the compound dockable and also the attributes in case it is floatable

Original issue reported on code.google.com by doyc...@gmail.com on 21 Oct 2010 at 11:48

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions