1 11 package org.eclipse.debug.internal.ui.viewers.model; 12 13 import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementCompareRequest; 14 import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta; 15 import org.eclipse.jface.viewers.TreePath; 16 import org.eclipse.ui.IMemento; 17 18 21 class ElementCompareRequest extends MementoUpdate implements IElementCompareRequest { 22 23 private boolean fEqual; 24 private ModelDelta fDelta; 25 30 public ElementCompareRequest(ModelContentProvider provider, Object element, TreePath elementPath, IMemento memento, ModelDelta delta) { 31 super(provider, provider.getPresentationContext(), element, elementPath, memento); 32 fProvider = provider; 33 fDelta = delta; 34 } 35 36 39 public void setEqual(boolean equal) { 40 fEqual = equal; 41 } 42 43 46 public void done() { 47 if (isEqual()) { 48 fDelta.setElement(getElement()); 49 fProvider.doRestore(fDelta); 50 } 51 } 52 53 boolean isEqual() { 54 return fEqual; 55 } 56 57 } 58 | Popular Tags |