1 11 package org.eclipse.jdt.internal.corext.buildpath; 12 13 import java.util.ArrayList ; 14 import java.util.List ; 15 16 import org.eclipse.core.runtime.IPath; 17 18 import org.eclipse.core.resources.IResource; 19 20 import org.eclipse.jdt.internal.ui.wizards.buildpaths.CPListElement; 21 22 public class BuildpathDelta { 23 24 private final String fOperationDescription; 25 private CPListElement[] fNewEntries; 26 private final List fCreatedResources; 27 private IPath fOutputLocation; 28 private final List fDeletedResources; 29 private final List fAddedEntries; 30 private final ArrayList fRemovedEntries; 31 32 public BuildpathDelta(String operationDescription) { 33 fOperationDescription= operationDescription; 34 35 fCreatedResources= new ArrayList (); 36 fDeletedResources= new ArrayList (); 37 fAddedEntries= new ArrayList (); 38 fRemovedEntries= new ArrayList (); 39 } 40 41 public String getOperationDescription() { 42 return fOperationDescription; 43 } 44 45 public CPListElement[] getNewEntries() { 46 return fNewEntries; 47 } 48 49 public IResource[] getCreatedResources() { 50 return (IResource[])fCreatedResources.toArray(new IResource[fCreatedResources.size()]); 51 } 52 53 public IResource[] getDeletedResources() { 54 return (IResource[])fDeletedResources.toArray(new IResource[fDeletedResources.size()]); 55 } 56 57 public IPath getDefaultOutputLocation() { 58 return fOutputLocation; 59 } 60 61 public void setNewEntries(CPListElement[] newEntries) { 62 fNewEntries= newEntries; 63 } 64 65 public void addCreatedResource(IResource resource) { 66 fCreatedResources.add(resource); 67 } 68 69 public void setDefaultOutputLocation(IPath outputLocation) { 70 fOutputLocation= outputLocation; 71 } 72 73 public void addDeletedResource(IResource resource) { 74 fDeletedResources.add(resource); 75 } 76 77 public List getAddedEntries() { 78 return fAddedEntries; 79 } 80 81 public void addEntry(CPListElement entry) { 82 fAddedEntries.add(entry); 83 } 84 85 public List getRemovedEntries() { 86 return fRemovedEntries; 87 } 88 89 public void removeEntry(CPListElement entry) { 90 fRemovedEntries.add(entry); 91 } 92 } 93 | Popular Tags |