1 11 package org.eclipse.ltk.core.refactoring.participants; 12 13 import java.util.ArrayList ; 14 import java.util.HashMap ; 15 import java.util.List ; 16 import java.util.Map ; 17 18 27 public class ReorgExecutionLog { 28 29 private Map fNewNames; 30 private List fProcessedElements; 31 private boolean fCanceled; 32 33 36 public ReorgExecutionLog() { 37 fNewNames= new HashMap (); 38 fProcessedElements= new ArrayList (); 39 } 40 41 45 public void markAsCanceled() { 46 fCanceled= true; 47 } 48 49 55 public boolean isCanceled() { 56 return fCanceled; 57 } 58 59 68 public boolean isProcessed(Object element) { 69 return fProcessedElements.contains(element); 70 } 71 72 81 public boolean isRenamed(Object element) { 82 return fNewNames.keySet().contains(element); 83 } 84 85 91 public void markAsProcessed(Object element) { 92 fProcessedElements.add(element); 93 } 94 95 100 public Object [] getProcessedElements() { 101 return fProcessedElements.toArray(); 102 } 103 104 111 public void setNewName(Object element, String newName) { 112 fNewNames.put(element, newName); 113 } 114 115 121 public Object [] getRenamedElements() { 122 return fNewNames.keySet().toArray(); 123 } 124 125 133 public String getNewName(Object element) { 134 return (String )fNewNames.get(element); 135 } 136 } 137 | Popular Tags |