1 /*******************************************************************************
2 * Copyright (c) 2000, 2004 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v10.html
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 package net.sourceforge.phpdt.internal.core;
13 import net.sourceforge.phpdt.core.IBuffer;
14 import net.sourceforge.phpdt.core.ICompilationUnit;
15 import net.sourceforge.phpdt.core.WorkingCopyOwner;
18 * A working copy owner that creates internal buffers.
19 * It also defines the PRIMARY working copy owner that is used by JDT/Core.
21 public class DefaultWorkingCopyOwner extends WorkingCopyOwner {
23 public WorkingCopyOwner primaryBufferProvider;
25 public static final DefaultWorkingCopyOwner PRIMARY = new DefaultWorkingCopyOwner();
27 private DefaultWorkingCopyOwner() {
28 // only one instance can be created
32 * @deprecated Marked deprecated as it is using deprecated code
34 public IBuffer createBuffer(ICompilationUnit workingCopy) {
35 if (this.primaryBufferProvider != null) return this.primaryBufferProvider.createBuffer(workingCopy);
36 return super.createBuffer(workingCopy);
38 public String toString() {
39 return "Primary owner"; //$NON-NLS-1$