* byte[])
*/
public void applyUpdate(ISharedDataGraph graph, Object data)
throws ECFException {
EDataGraph dataGraph = (EDataGraph) graph.getDataGraph();
EChangeSummary changeSummary = (EChangeSummary) dataGraph
.getChangeSummary();
changeSummary.endLogging();
// throw away any local changes
changeSummary.apply();
Resource res = changeSummary.eResource();
res.unload();
// apply changes from the event
try {
res.load(new ByteArrayInputStream((byte[]) data), null);
if (SDOPlugin.isTracing(TRACE_TAG)) {
SDOPlugin.getTraceLog().println("processUpdate:");
res.save(SDOPlugin.getTraceLog(), null);
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
changeSummary = (EChangeSummary) res.getContents().get(0);
dataGraph.setEChangeSummary(changeSummary);
// leave a change summary showing what has changed
changeSummary.applyAndReverse();
changeSummary.resumeLogging();
}