bool ViewFactory::RestoreState(IMemento::Pointer memento) { QList<IMemento::Pointer> mem(memento->GetChildren( WorkbenchConstants::TAG_VIEW)); for (int i = 0; i < mem.size(); i++) { //for dynamic UI - add the next line to replace subsequent code that is commented out RestoreViewState(mem[i]); } // return new Status(IStatus.OK, PlatformUI.PLUGIN_ID, 0, "", null); //$NON-NLS-1$ return true; }
void LeftToRightTabOrder::RestoreState(IPresentationSerializer* serializer, IMemento::Pointer savedState) { std::vector<IMemento::Pointer> parts = savedState->GetChildren( WorkbenchConstants::TAG_PART); for (std::size_t idx = 0; idx < parts.size(); idx++) { std::string id; parts[idx]->GetString(WorkbenchConstants::TAG_ID, id); if (!id.empty()) { IPresentablePart::Pointer part = serializer->GetPart(id); if (part) { this->AddInitial(part); } } } }