1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-31 21:05:37 +02:00

Documentation fixes/improvements. This class was apparently refactored to not be gdb/mi specific, but the comments were not updated to reflect that.

This commit is contained in:
John Cortell 2009-09-24 15:31:34 +00:00
parent 20c2e582df
commit 64bfd874f4

View file

@ -32,13 +32,17 @@ import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.Status;
/** /**
* This is a utility class for caching results of MI Commands. Return MIInfo * This is a utility class for caching results of commands--typically commands
* data is retrieved from the cache if command was previously executed, and * sent to an external engine via some protocol (GDB/MI, e.g.). Commands are
* it is executed with MICommand service if it was not previously seen. * sent to their intended target through the supplied {@link ICommandControl},
* and their results are cached so as to quickly service future identical
* commands.
* *
* Resetting the cache has to be performed by the object owning the cache when * The cache has to be reset by the client that owns and uses the cache. A reset
* when an event indicates that the data is obsolete (which is specific to the * should be done when an event occurs that alters the state of a context such
* types of commands being cached). * that commands on that context may no longer yield the same outcome as they
* did before the event. A reset can be done on the entire cache or on a per
* context basis.
* *
* @since 1.0 * @since 1.0
*/ */
@ -213,10 +217,10 @@ public class CommandCache implements ICommandListener
fSession = session; fSession = session;
fCommandControl = control; fCommandControl = control;
/* /*
* We listen for the notifications that the commands have been sent to the * We listen for the notifications that the commands have been sent to
* backend from the GDB/MI Communications engine. * their intended target via the ICommandControl service.
*/ */
fCommandControl.addCommandListener(this); fCommandControl.addCommandListener(this);
} }
@ -529,11 +533,9 @@ public class CommandCache implements ICommandListener
return false; return false;
} }
/**
* Clears all the cache data. Equivalent to <code>reset(null)</code>.
/** */
* Clears the cache data.
*/
public void reset() { public void reset() {
fCachedContexts.clear(); fCachedContexts.clear();
} }
@ -544,9 +546,8 @@ public class CommandCache implements ICommandListener
*/ */
} }
/* /* (non-Javadoc)
* (non-Javadoc) * @see org.eclipse.cdt.dsf.debug.service.command.ICommandListener#commandQueued(org.eclipse.cdt.dsf.debug.service.command.ICommandToken)
* @see org.eclipse.cdt.dsf.mi.service.control.IDebuggerControl.ICommandListener#commandQueued(org.eclipse.cdt.dsf.mi.core.command.ICommand)
*/ */
public void commandQueued(ICommandToken token) { public void commandQueued(ICommandToken token) {
/* /*
@ -554,9 +555,8 @@ public class CommandCache implements ICommandListener
*/ */
} }
/* /* (non-Javadoc)
* (non-Javadoc) * @see org.eclipse.cdt.dsf.debug.service.command.ICommandListener#commandDone(org.eclipse.cdt.dsf.debug.service.command.ICommandToken, org.eclipse.cdt.dsf.debug.service.command.ICommandResult)
* @see org.eclipse.cdt.dsf.mi.service.control.IDebuggerControl.ICommandListener#commandDone(org.eclipse.cdt.dsf.mi.core.command.ICommand, org.eclipse.cdt.dsf.mi.core.command.ICommandResult)
*/ */
public void commandDone(ICommandToken token, ICommandResult result) { public void commandDone(ICommandToken token, ICommandResult result) {
/* /*
@ -570,8 +570,7 @@ public class CommandCache implements ICommandListener
* this command for possible coalescence since it has been given to the debug engine * this command for possible coalescence since it has been given to the debug engine
* and is currently being processed. * and is currently being processed.
* *
* (non-Javadoc) * @see org.eclipse.cdt.dsf.debug.service.command.ICommandListener#commandSent(org.eclipse.cdt.dsf.debug.service.command.ICommandToken)
* @see org.eclipse.cdt.dsf.mi.service.control.IDebuggerControl.ICommandListener#commandSent(org.eclipse.cdt.dsf.mi.core.command.ICommand)
*/ */
public void commandSent(ICommandToken token) { public void commandSent(ICommandToken token) {