1 11 package org.eclipse.core.internal.preferences; 12 13 import org.eclipse.core.runtime.preferences.IExportedPreferences; 14 15 18 public class ExportedPreferences extends EclipsePreferences implements IExportedPreferences { 19 20 private boolean isExportRoot = false; 21 private String version; 22 23 public static IExportedPreferences newRoot() { 24 return new ExportedPreferences(null, ""); } 26 27 protected ExportedPreferences(EclipsePreferences parent, String name) { 28 super(parent, name); 29 } 30 31 34 public boolean isExportRoot() { 35 return isExportRoot; 36 } 37 38 41 public void setExportRoot() { 42 isExportRoot = true; 43 } 44 45 49 public String getVersion() { 50 return version; 51 } 52 53 57 public void setVersion(String version) { 58 this.version = version; 59 } 60 61 protected EclipsePreferences internalCreate(EclipsePreferences nodeParent, String nodeName, Object context) { 62 return new ExportedPreferences(nodeParent, nodeName); 63 } 64 65 69 public String toString() { 70 StringBuffer buffer = new StringBuffer (); 71 if (isExportRoot) 72 buffer.append("* "); buffer.append(absolutePath()); 74 if (version != null) 75 buffer.append(" (" + version + ')'); return buffer.toString(); 77 } 78 } 79 | Popular Tags |