1 19 package org.netbeans.modules.versioning.spi; 20 21 import java.io.File ; 22 import java.beans.PropertyChangeListener ; 23 import java.beans.PropertyChangeSupport ; 24 import java.util.*; 25 26 36 public abstract class VersioningSystem { 37 38 44 public static final String PROP_VERSIONED_ROOTS = "null VCS.VersionedFilesChanged"; 45 46 50 public static final String PROP_STATUS_CHANGED = "Set<File> VCS.StatusChanged"; 51 52 58 public static final String PROP_ANNOTATIONS_CHANGED = "Set<File> VCS.AnnotationsChanged"; 59 60 protected final PropertyChangeSupport support = new PropertyChangeSupport (this); 61 62 68 public abstract String getDisplayName(); 69 70 80 public File getTopmostManagedParent(File file) { 81 return null; 82 } 83 84 89 public VCSAnnotator getVCSAnnotator() { 90 return null; 91 } 92 93 98 public VCSInterceptor getVCSInterceptor() { 99 return null; 100 } 101 102 114 public OriginalContent getVCSOriginalContent(File workingCopy) { 115 return null; 116 } 117 118 123 public final void addPropertyChangeListener(PropertyChangeListener listener) { 124 support.addPropertyChangeListener(listener); 125 } 126 127 132 public final void removePropertyChangeListener(PropertyChangeListener listener) { 133 support.removePropertyChangeListener(listener); 134 } 135 136 142 protected final void fireAnnotationsChanged(Set<File > files) { 143 support.firePropertyChange(PROP_ANNOTATIONS_CHANGED, null, files); 144 } 145 146 151 protected final void fireStatusChanged(Set<File > files) { 152 support.firePropertyChange(PROP_STATUS_CHANGED, null, files); 153 } 154 155 159 protected final void fireVersionedFilesChanged() { 160 support.firePropertyChange(PROP_VERSIONED_ROOTS, null, null); 161 } 162 163 168 protected final void fireStatusChanged(File file) { 169 fireStatusChanged(new HashSet<File >(Arrays.asList(file))); 170 } 171 } 172 | Popular Tags |