diff --git a/core/org.eclipse.cdt.core/ChangeLog b/core/org.eclipse.cdt.core/ChangeLog index 915de962848..d35fa4e4a69 100644 --- a/core/org.eclipse.cdt.core/ChangeLog +++ b/core/org.eclipse.cdt.core/ChangeLog @@ -1,3 +1,6 @@ +2004-03-01 Hoda Amer + Removing the "empty" array in the CElement that was not used anywhere ! + 2004-03-01 Alain Magloire Fix to PR 53253. From Steve Garbarini diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElement.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElement.java index 4445e75eb19..e6432790aa9 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElement.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElement.java @@ -36,8 +36,6 @@ public abstract class CElement extends PlatformObject implements ICElement { protected int fStartLine; protected int fEndLine; - protected CElement[] empty = new CElement[0]; - protected CElement(ICElement parent, String name, int type) { fParent= parent; fName= name; diff --git a/core/org.eclipse.cdt.ui/ChangeLog b/core/org.eclipse.cdt.ui/ChangeLog index eb4b1bf2657..bbd8c1b9b18 100644 --- a/core/org.eclipse.cdt.ui/ChangeLog +++ b/core/org.eclipse.cdt.ui/ChangeLog @@ -1,3 +1,7 @@ +2004-03-01 Hoda Amer + Removing WorkingCopyManager.getWorkingCop(ITranslationUnit) + Users should call ITranslationUnit.getSharedWorkingCopy instead. + 2004-02-28 Alain Magloire PR 51757 diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/WorkingCopyManager.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/WorkingCopyManager.java index d179f69dcb7..3674e350f71 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/WorkingCopyManager.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/WorkingCopyManager.java @@ -93,23 +93,6 @@ public class WorkingCopyManager implements IWorkingCopyManager, IWorkingCopyMana fMap.put(input, copy); return copy; } - /* - * @see org.eclipse.cdt.ui.IWorkingCopyManager#getWorkingCopy(org.eclipse.cdt.core.model.ITranslationUnit) - */ - public IWorkingCopy getWorkingCopy(ITranslationUnit unit){ - if((fMap == null) || (fMap.size() == 0)){ - return null; - } else { - List copies = new ArrayList(fMap.values()); - Iterator i = copies.iterator(); - while (i.hasNext()){ - IWorkingCopy copy = (IWorkingCopy)i.next(); - if(copy.getOriginalElement().equals(unit)) - return copy; - } - } - return null; - } /* * @see org.eclipse.cdt.internal.ui.editor.IWorkingCopyManagerExtension#setWorkingCopy(org.eclipse.ui.IEditorInput, org.eclipse.cdt.core.model.ITranslationUnit) */ diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/IWorkingCopyManager.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/IWorkingCopyManager.java index 43d346cc4e2..f4726885420 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/IWorkingCopyManager.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/IWorkingCopyManager.java @@ -67,17 +67,6 @@ public interface IWorkingCopyManager { * copy for this translation unit */ IWorkingCopy getWorkingCopy(IEditorInput input); - - /** - * Returns the working copy remembered for the given translation unit if one exists - * in the current list of the working copy manager - * - * @param unit : the Translation unit - * @return the working copy of the translation unit, or null if the - * unit was not seen by the manager before. - * - */ - IWorkingCopy getWorkingCopy(ITranslationUnit unit); /** * Shuts down this working copy manager. All working copies still remembered