1 11 package org.eclipse.ltk.internal.core.refactoring; 12 13 import org.eclipse.core.resources.ResourcesPlugin; 14 15 import org.eclipse.core.commands.operations.IUndoContext; 16 17 public class RefactoringUndoContext implements IUndoContext { 18 19 public String getLabel() { 20 return RefactoringCoreMessages.RefactoringUndoContext_label; 21 } 22 23 public boolean matches(IUndoContext context) { 24 if (this == context) 25 return true; 26 IUndoContext workspaceContext= (IUndoContext)ResourcesPlugin.getWorkspace().getAdapter(IUndoContext.class); 27 if (workspaceContext == null) 28 return false; 29 return workspaceContext.matches(context); 30 } 31 } 32 | Popular Tags |