bool RangeProfilePlotManager::deserialize(SessionItemDeserializer& deserializer)
{
   XmlReader reader(NULL, false);
   DOMElement* pRootElement = deserializer.deserialize(reader, "RangeProfilePlotManager");
   if (pRootElement)
   {
      std::string viewId = A(pRootElement->getAttribute(X("viewId")));
      mpView = dynamic_cast<PlotView*>(Service<SessionManager>()->getSessionItem(viewId));

      mpPlot = Service<DesktopServices>()->createPlotWidget(getName(), CARTESIAN_PLOT);
      VERIFY(mpPlot);
      Serializable* pPlotSer = dynamic_cast<Serializable*>(mpPlot); // The imp side is serializable
      VERIFY(pPlotSer);
      if (!pPlotSer->fromXml(findChildNode(pRootElement, "plot"), reader.VERSION))
      {
         return false;
      }

      mpView = mpPlot->getPlot();
      VERIFY(mpView);
      Serializable* pPlotViewSer = dynamic_cast<Serializable*>(mpView); // The imp side is serializable
      VERIFY(pPlotViewSer);
      if (!pPlotViewSer->fromXml(findChildNode(pRootElement, "plotView"), reader.VERSION))
      {
         return false;
      }

      std::list<PlotObject*> objects;
      mpView->getObjects(POINT_SET, objects);
      FOR_EACH_DOMNODE(pRootElement, pChild)
      {
         if (XMLString::equals(pChild->getNodeName(), X("signature")))
         {
            DOMElement* pChldElmnt = static_cast<DOMElement*>(pChild);
            std::string sigId = A(pChldElmnt->getAttribute(X("sigId")));
            std::string pointSetName = A(pChldElmnt->getAttribute(X("pointSetName")));
            Signature* pSignature = static_cast<Signature*>(Service<SessionManager>()->getSessionItem(sigId));
            if (pSignature == NULL)
            {
               return false;
            }
            mSigPointSets[pSignature] = pointSetName;
            pSignature->attach(SIGNAL_NAME(Subject, Deleted), Slot(this, &RangeProfilePlotManager::signatureDeleted));
            pSignature->getDataDescriptor()->attach(SIGNAL_NAME(DataDescriptor, Renamed),
               Slot(this, &RangeProfilePlotManager::signatureRenamed));
         }
      }
      deserializer.nextBlock();
      return DockWindowShell::deserialize(deserializer);
   }
   return false;
}