(Currently used with XMLMemento to persist StyleEntry, it is hoped that an EMFMemento can be writen).
343344345346347348349350351352353
public void process(IExtension extension, IConfigurationElement element) throws Exception { if (found) return; StyleContent styleContent = (StyleContent) element.createExecutableExtension("class"); //$NON-NLS-1$ style = styleContent.load(url, monitor); if (style != null) { id = styleContent.getId(); id2content.put(styleContent.getId(), styleContent); found = true; }
204205206207208209210211212213214
try { StyleContent styleContent = getStyleContent(styleEntry.getID()); String mementoString = styleEntry.getMemento(); if (mementoString != null) { XMLMemento memento = XMLMemento.createReadRoot(new StringReader(mementoString)); Object style = styleContent.load(memento); styleEntry.setStyle(style); if (style != null) { styleEntry.setStyleClass(style.getClass()); } }