org.eclipse.cdt.ui
Interface IWorkingCopyManager

All Known Implementing Classes:
WorkingCopyManager

public interface IWorkingCopyManager

Interface for accessing working copies of ITranslationUnit objects. The original translation unit is only given indirectly by means of an IEditorInput. The life cycle is as follows:

This interface is not intended to be implemented by clients.

See Also:
CUIPlugin.getWorkingCopyManager()

Method Summary
 void connect(org.eclipse.ui.IEditorInput input)
          Connects the given editor input to this manager.
 void disconnect(org.eclipse.ui.IEditorInput input)
          Disconnects the given editor input from this manager.
 org.eclipse.cdt.core.model.IWorkingCopy getWorkingCopy(org.eclipse.ui.IEditorInput input)
          Returns the working copy remembered for the translation unit encoded in the given editor input.
 void shutdown()
          Shuts down this working copy manager.
 

Method Detail

connect

void connect(org.eclipse.ui.IEditorInput input)
             throws org.eclipse.core.runtime.CoreException
Connects the given editor input to this manager. After calling this method, a working copy will be available for the translation unit encoded in the given editor input (does nothing if there is no encoded translation unit).

Parameters:
input - the editor input
Throws:
org.eclipse.core.runtime.CoreException - if the working copy cannot be created for the translation unit

disconnect

void disconnect(org.eclipse.ui.IEditorInput input)
Disconnects the given editor input from this manager. After calling this method, a working copy for the translation unit encoded in the given editor input will no longer be available. Does nothing if there is no encoded translation unit, or if there is no remembered working copy for the translation unit.

Parameters:
input - the editor input

getWorkingCopy

org.eclipse.cdt.core.model.IWorkingCopy getWorkingCopy(org.eclipse.ui.IEditorInput input)
Returns the working copy remembered for the translation unit encoded in the given editor input.

Parameters:
input - the editor input
Returns:
the working copy of the translation unit, or null if the input does not encode an editor input, or if there is no remembered working copy for this translation unit

shutdown

void shutdown()
Shuts down this working copy manager. All working copies still remembered by this manager are destroyed.