1 11 package org.eclipse.team.internal.ccvs.ui.model; 12 13 import org.eclipse.core.runtime.IProgressMonitor; 14 import org.eclipse.team.core.TeamException; 15 import org.eclipse.team.internal.ccvs.core.CVSTag; 16 import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation; 17 18 22 public class RemoteProjectsElement extends CVSTagElement { 23 24 27 public RemoteProjectsElement() { 28 super(CVSTag.DEFAULT, null); 29 } 30 31 35 public void setRoot(ICVSRepositoryLocation root) { 36 this.root = root; 37 } 38 39 43 public void setTag(CVSTag tag) { 44 this.tag = tag; 45 } 46 49 public boolean equals(Object o) { 50 if (!(o instanceof RemoteProjectsElement)) return false; 51 RemoteProjectsElement element = (RemoteProjectsElement)o; 52 if (root == null) { 53 return element.root == null && tag.equals(element.tag); 54 } 55 return super.equals(o); 56 } 57 58 61 public Object getParent(Object o) { 62 return null; 63 } 64 65 68 public int hashCode() { 69 if (root == null) return tag.hashCode(); 70 return super.hashCode(); 71 } 72 73 76 public Object [] fetchChildren(Object o, IProgressMonitor monitor) throws TeamException { 77 if (root == null) return new Object [0]; 78 return super.fetchChildren(o, monitor); 79 } 80 } 81 | Popular Tags |