1 11 package org.eclipse.jdt.internal.core; 12 13 import org.eclipse.jdt.core.IBuffer; 14 import org.eclipse.jdt.core.ICompilationUnit; 15 import org.eclipse.jdt.core.WorkingCopyOwner; 16 17 21 public class DefaultWorkingCopyOwner extends WorkingCopyOwner { 22 23 public WorkingCopyOwner primaryBufferProvider; 24 25 public static final DefaultWorkingCopyOwner PRIMARY = new DefaultWorkingCopyOwner(); 26 27 private DefaultWorkingCopyOwner() { 28 } 30 31 public IBuffer createBuffer(ICompilationUnit workingCopy) { 32 if (this.primaryBufferProvider != null) return this.primaryBufferProvider.createBuffer(workingCopy); 33 return super.createBuffer(workingCopy); 34 } 35 public String toString() { 36 return "Primary owner"; } 38 } 39 | Popular Tags |