/* (non-Javadoc) * @see org.eclipse.ui.IPersistableElement#saveState(org.eclipse.ui.IMemento) */ public void saveState(IMemento memento) { String root_id = m_input.getModelRoot().getId(); Ooaofooa modelRoot = Ooaofooa.getInstance(root_id, false); memento.putString(GraphicalEditorFactory.TAG_MODELROOTID, m_input.getModelRoot().getId()); memento.putString(GraphicalEditorFactory.TAG_OOAID, m_input.getOoa_id().toString()); memento.putInteger(GraphicalEditorFactory.TAG_OOATYPE, m_input.getOoa_type()); memento.putInteger(GraphicalEditorFactory.TAG_MODELTYPE, m_input.getModel_type()); NonRootModelElement nrme = (NonRootModelElement) m_input.getRepresents(); if (nrme == null) { nrme = (NonRootModelElement) Cl_c.Getinstancefromooa_id(modelRoot, m_input.getOoa_id(), m_input.getOoa_type()); } // if there's no way to get a component path, then don't save the tag // CanvasFactory.createElement() will check for the tag's existence // before doing anything if (nrme != null) { memento.putString(GraphicalEditorFactory.TAG_COMPONENTPATH, nrme.getContent()); } }