1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 17:56:01 +02:00

[265882] - Additional interface cleanup and @since comments.

This commit is contained in:
Pawel Piech 2009-02-27 23:27:45 +00:00
parent b006bc98c3
commit 516d06123b
126 changed files with 338 additions and 133 deletions

View file

@ -31,13 +31,13 @@ Export-Package: org.eclipse.cdt.dsf.debug.ui,
org.eclipse.cdt.dsf.debug.ui.sourcelookup, org.eclipse.cdt.dsf.debug.ui.sourcelookup,
org.eclipse.cdt.dsf.debug.ui.viewmodel, org.eclipse.cdt.dsf.debug.ui.viewmodel,
org.eclipse.cdt.dsf.debug.ui.viewmodel.actions, org.eclipse.cdt.dsf.debug.ui.viewmodel.actions,
org.eclipse.cdt.dsf.debug.ui.viewmodel.expression, org.eclipse.cdt.dsf.debug.ui.viewmodel.expression;x-internal:=true,
org.eclipse.cdt.dsf.debug.ui.viewmodel.launch, org.eclipse.cdt.dsf.debug.ui.viewmodel.launch;x-internal:=true,
org.eclipse.cdt.dsf.debug.ui.viewmodel.modules, org.eclipse.cdt.dsf.debug.ui.viewmodel.modules;x-internal:=true,
org.eclipse.cdt.dsf.debug.ui.viewmodel.numberformat, org.eclipse.cdt.dsf.debug.ui.viewmodel.numberformat,
org.eclipse.cdt.dsf.debug.ui.viewmodel.register, org.eclipse.cdt.dsf.debug.ui.viewmodel.register;x-internal:=true,
org.eclipse.cdt.dsf.debug.ui.viewmodel.update, org.eclipse.cdt.dsf.debug.ui.viewmodel.update,
org.eclipse.cdt.dsf.debug.ui.viewmodel.variable, org.eclipse.cdt.dsf.debug.ui.viewmodel.variable;x-internal:=true,
org.eclipse.cdt.dsf.ui.concurrent, org.eclipse.cdt.dsf.ui.concurrent,
org.eclipse.cdt.dsf.ui.viewmodel, org.eclipse.cdt.dsf.ui.viewmodel,
org.eclipse.cdt.dsf.ui.viewmodel.datamodel, org.eclipse.cdt.dsf.ui.viewmodel.datamodel,

View file

@ -8,7 +8,7 @@
</extension> </extension>
<extension point="org.eclipse.core.runtime.preferences"> <extension point="org.eclipse.core.runtime.preferences">
<initializer class="org.eclipse.cdt.dsf.debug.ui.PreferenceInitializer"/> <initializer class="org.eclipse.cdt.dsf.debug.internal.ui.PreferenceInitializer"/>
</extension> </extension>
<extension point="org.eclipse.ui.editors.annotationTypes"> <extension point="org.eclipse.ui.editors.annotationTypes">

View file

@ -8,8 +8,9 @@
* Contributors: * Contributors:
* IBM Corporation - initial API and implementation * IBM Corporation - initial API and implementation
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.dsf.debug.ui; package org.eclipse.cdt.dsf.debug.internal.ui;
import org.eclipse.cdt.dsf.debug.ui.IDsfDebugUIConstants;
import org.eclipse.cdt.dsf.internal.ui.DsfUIPlugin; import org.eclipse.cdt.dsf.internal.ui.DsfUIPlugin;
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
import org.eclipse.debug.ui.IDebugUIConstants; import org.eclipse.debug.ui.IDebugUIConstants;
@ -17,7 +18,6 @@ import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferenceConverter; import org.eclipse.jface.preference.PreferenceConverter;
import org.eclipse.swt.graphics.RGB; import org.eclipse.swt.graphics.RGB;
// Note: this class should be removed from public API. See bug 246004
public class PreferenceInitializer extends AbstractPreferenceInitializer { public class PreferenceInitializer extends AbstractPreferenceInitializer {
public PreferenceInitializer() { public PreferenceInitializer() {

View file

@ -13,6 +13,9 @@ package org.eclipse.cdt.dsf.debug.internal.ui.viewmodel.numberformat.detail;
import org.eclipse.osgi.util.NLS; import org.eclipse.osgi.util.NLS;
/**
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class MessagesForNumberFormatDetailPane extends NLS { public class MessagesForNumberFormatDetailPane extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.cdt.dsf.debug.internal.ui.viewmodel.numberformat.detail.messages"; //$NON-NLS-1$ private static final String BUNDLE_NAME = "org.eclipse.cdt.dsf.debug.internal.ui.viewmodel.numberformat.detail.messages"; //$NON-NLS-1$

View file

@ -14,6 +14,8 @@ import org.eclipse.debug.ui.IDebugUIConstants;
/** /**
* @noimplement This interface is not intended to be implemented by clients. * @noimplement This interface is not intended to be implemented by clients.
*
* @since 1.0
*/ */
public interface IDsfDebugUIConstants { public interface IDsfDebugUIConstants {

View file

@ -26,6 +26,9 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.commands.IDebugCommandRequest; import org.eclipse.debug.core.commands.IDebugCommandRequest;
/**
* @since 1.0
*/
@Immutable @Immutable
public abstract class DsfCommandRunnable extends DsfRunnable { public abstract class DsfCommandRunnable extends DsfRunnable {
private final IExecutionDMContext fContext; private final IExecutionDMContext fContext;

View file

@ -22,6 +22,10 @@ import org.eclipse.debug.core.commands.IDebugCommandRequest;
import org.eclipse.debug.core.commands.IEnabledStateRequest; import org.eclipse.debug.core.commands.IEnabledStateRequest;
import org.eclipse.debug.core.commands.IResumeHandler; import org.eclipse.debug.core.commands.IResumeHandler;
/**
*
* @since 1.0
*/
@Immutable @Immutable
public class DsfResumeCommand implements IResumeHandler { public class DsfResumeCommand implements IResumeHandler {

View file

@ -22,6 +22,10 @@ import org.eclipse.debug.core.commands.IDebugCommandRequest;
import org.eclipse.debug.core.commands.IEnabledStateRequest; import org.eclipse.debug.core.commands.IEnabledStateRequest;
import org.eclipse.debug.core.commands.IStepIntoHandler; import org.eclipse.debug.core.commands.IStepIntoHandler;
/**
*
* @since 1.0
*/
@Immutable @Immutable
public class DsfStepIntoCommand implements IStepIntoHandler { public class DsfStepIntoCommand implements IStepIntoHandler {

View file

@ -22,6 +22,10 @@ import org.eclipse.debug.core.commands.IDebugCommandRequest;
import org.eclipse.debug.core.commands.IEnabledStateRequest; import org.eclipse.debug.core.commands.IEnabledStateRequest;
import org.eclipse.debug.core.commands.IStepOverHandler; import org.eclipse.debug.core.commands.IStepOverHandler;
/**
*
* @since 1.0
*/
@Immutable @Immutable
public class DsfStepOverCommand implements IStepOverHandler { public class DsfStepOverCommand implements IStepOverHandler {

View file

@ -22,6 +22,10 @@ import org.eclipse.debug.core.commands.IDebugCommandRequest;
import org.eclipse.debug.core.commands.IEnabledStateRequest; import org.eclipse.debug.core.commands.IEnabledStateRequest;
import org.eclipse.debug.core.commands.IStepReturnHandler; import org.eclipse.debug.core.commands.IStepReturnHandler;
/**
*
* @since 1.0
*/
@Immutable @Immutable
public class DsfStepReturnCommand implements IStepReturnHandler { public class DsfStepReturnCommand implements IStepReturnHandler {

View file

@ -20,6 +20,8 @@ import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI; import org.eclipse.ui.PlatformUI;
/** /**
*
* @since 1.0
*/ */
public class DsfSteppingModeTarget implements ISteppingModeTarget, ITargetProperties { public class DsfSteppingModeTarget implements ISteppingModeTarget, ITargetProperties {

View file

@ -22,6 +22,10 @@ import org.eclipse.debug.core.commands.IDebugCommandRequest;
import org.eclipse.debug.core.commands.IEnabledStateRequest; import org.eclipse.debug.core.commands.IEnabledStateRequest;
import org.eclipse.debug.core.commands.ISuspendHandler; import org.eclipse.debug.core.commands.ISuspendHandler;
/**
*
* @since 1.0
*/
@Immutable @Immutable
public class DsfSuspendCommand implements ISuspendHandler { public class DsfSuspendCommand implements ISuspendHandler {
private final DsfExecutor fExecutor; private final DsfExecutor fExecutor;

View file

@ -37,6 +37,8 @@ import org.eclipse.debug.ui.contexts.ISuspendTriggerListener;
* the debugger suspends. * the debugger suspends.
* *
* @see ISuspendTrigger * @see ISuspendTrigger
*
* @since 1.0
*/ */
@ConfinedToDsfExecutor("fSession.getExecutor()") @ConfinedToDsfExecutor("fSession.getExecutor()")
public class DsfSuspendTrigger implements ISuspendTrigger { public class DsfSuspendTrigger implements ISuspendTrigger {

View file

@ -24,6 +24,10 @@ import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IViewActionDelegate; import org.eclipse.ui.IViewActionDelegate;
import org.eclipse.ui.IViewPart; import org.eclipse.ui.IViewPart;
/**
*
* @since 1.0
*/
@SuppressWarnings("restriction") @SuppressWarnings("restriction")
public class RefreshAction implements IViewActionDelegate { public class RefreshAction implements IViewActionDelegate {

View file

@ -34,6 +34,7 @@ import org.eclipse.ui.IViewPart;
/** /**
* *
* @since 1.0
*/ */
public class SelectUpdatePolicyAction implements IMenuCreator, IViewActionDelegate, IDebugContextListener, IActionDelegate2 { public class SelectUpdatePolicyAction implements IMenuCreator, IViewActionDelegate, IDebugContextListener, IActionDelegate2 {

View file

@ -100,6 +100,8 @@ import org.eclipse.ui.texteditor.ITextEditor;
* Hence there is some involved logic which ensures that the jobs are run in * Hence there is some involved logic which ensures that the jobs are run in
* proper order. To avoid race conditions, this logic uses the session's * proper order. To avoid race conditions, this logic uses the session's
* dispatch thread to synchronize access to the state data of the running jobs. * dispatch thread to synchronize access to the state data of the running jobs.
*
* @since 1.0
*/ */
@ThreadSafe @ThreadSafe
public class DsfSourceDisplayAdapter implements ISourceDisplay, ISteppingControlParticipant public class DsfSourceDisplayAdapter implements ISourceDisplay, ISteppingControlParticipant

View file

@ -19,7 +19,7 @@ import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.texteditor.IAnnotationImageProvider; import org.eclipse.ui.texteditor.IAnnotationImageProvider;
@ThreadSafe @ThreadSafe
public class InstructionPointerImageProvider implements IAnnotationImageProvider { class InstructionPointerImageProvider implements IAnnotationImageProvider {
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.ui.texteditor.IAnnotationImageProvider#getManagedImage(org.eclipse.jface.text.source.Annotation) * @see org.eclipse.ui.texteditor.IAnnotationImageProvider#getManagedImage(org.eclipse.jface.text.source.Annotation)

View file

@ -12,6 +12,10 @@ package org.eclipse.cdt.dsf.debug.ui.viewmodel;
import org.eclipse.cdt.dsf.internal.ui.DsfUIPlugin; import org.eclipse.cdt.dsf.internal.ui.DsfUIPlugin;
/**
*
* @since 1.0
*/
public interface IDebugVMConstants { public interface IDebugVMConstants {
/** /**
* Standard across the board column IDs. * Standard across the board column IDs.

View file

@ -10,7 +10,7 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.dsf.debug.ui.viewmodel.actions; package org.eclipse.cdt.dsf.debug.ui.viewmodel.actions;
import org.eclipse.cdt.dsf.ui.viewmodel.IVMAdapterExtension; import org.eclipse.cdt.dsf.ui.viewmodel.IVMAdapter;
import org.eclipse.cdt.dsf.ui.viewmodel.IVMProvider; import org.eclipse.cdt.dsf.ui.viewmodel.IVMProvider;
import org.eclipse.cdt.dsf.ui.viewmodel.update.ICachingVMProvider; import org.eclipse.cdt.dsf.ui.viewmodel.update.ICachingVMProvider;
import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.CoreException;
@ -27,7 +27,7 @@ import org.eclipse.jface.viewers.IStructuredSelection;
public class DefaultRefreshAllTarget implements IRefreshAllTarget { public class DefaultRefreshAllTarget implements IRefreshAllTarget {
public void refresh(ISelection debugContext) throws CoreException { public void refresh(ISelection debugContext) throws CoreException {
IVMAdapterExtension adapter = getActiveVMAdapter( debugContext ); IVMAdapter adapter = getActiveVMAdapter( debugContext );
if (adapter != null) { if (adapter != null) {
for (IVMProvider provider : adapter.getActiveProviders()) { for (IVMProvider provider : adapter.getActiveProviders()) {
@ -38,12 +38,12 @@ public class DefaultRefreshAllTarget implements IRefreshAllTarget {
} }
} }
protected IVMAdapterExtension getActiveVMAdapter(ISelection debugContext) { protected IVMAdapter getActiveVMAdapter(ISelection debugContext) {
if (debugContext instanceof IStructuredSelection) { if (debugContext instanceof IStructuredSelection) {
Object activeElement = ((IStructuredSelection)debugContext).getFirstElement(); Object activeElement = ((IStructuredSelection)debugContext).getFirstElement();
if (activeElement instanceof IAdaptable) { if (activeElement instanceof IAdaptable) {
return (IVMAdapterExtension)((IAdaptable)activeElement).getAdapter(IVMAdapterExtension.class); return (IVMAdapter)((IAdaptable)activeElement).getAdapter(IVMAdapter.class);
} }
} }
return null; return null;

View file

@ -12,6 +12,9 @@ package org.eclipse.cdt.dsf.debug.ui.viewmodel.expression;
import org.eclipse.osgi.util.NLS; import org.eclipse.osgi.util.NLS;
/**
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class MessagesForExpressionVM extends NLS { public class MessagesForExpressionVM extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.cdt.dsf.debug.ui.viewmodel.expression.messages"; //$NON-NLS-1$ private static final String BUNDLE_NAME = "org.eclipse.cdt.dsf.debug.ui.viewmodel.expression.messages"; //$NON-NLS-1$

View file

@ -15,7 +15,7 @@ import java.util.MissingResourceException;
import java.util.ResourceBundle; import java.util.ResourceBundle;
/** /**
* Comment for . * @noinstantiate This class is not intended to be instantiated by clients.
*/ */
public class ModulesMessages { public class ModulesMessages {

View file

@ -16,6 +16,8 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationCont
/** /**
* Provides default implementation of preference storage. * Provides default implementation of preference storage.
*
* @since 1.0
*/ */
@SuppressWarnings("restriction") @SuppressWarnings("restriction")
public class FormattedValuePreferenceStore implements IFormattedValuePreferenceStore { public class FormattedValuePreferenceStore implements IFormattedValuePreferenceStore {

View file

@ -14,8 +14,8 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationCont
/** /**
* *
* @since 1.0
*/ */
@SuppressWarnings("restriction") @SuppressWarnings("restriction")
public interface IFormattedValuePreferenceStore { public interface IFormattedValuePreferenceStore {
/* /*

View file

@ -13,7 +13,7 @@ package org.eclipse.cdt.dsf.debug.ui.viewmodel.numberformat;
import org.eclipse.cdt.dsf.ui.viewmodel.IVMContext; import org.eclipse.cdt.dsf.ui.viewmodel.IVMContext;
/** /**
* * @since 1.0
*/ */
public interface IFormattedValueVMContext extends IVMContext { public interface IFormattedValueVMContext extends IVMContext {
IFormattedValuePreferenceStore getPreferenceStore(); IFormattedValuePreferenceStore getPreferenceStore();

View file

@ -13,6 +13,9 @@ package org.eclipse.cdt.dsf.debug.ui.viewmodel.numberformat;
import org.eclipse.osgi.util.NLS; import org.eclipse.osgi.util.NLS;
/**
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class MessagesForNumberFormat extends NLS { public class MessagesForNumberFormat extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.cdt.dsf.debug.ui.viewmodel.numberformat.messages"; //$NON-NLS-1$ private static final String BUNDLE_NAME = "org.eclipse.cdt.dsf.debug.ui.viewmodel.numberformat.messages"; //$NON-NLS-1$

View file

@ -40,6 +40,8 @@ import org.eclipse.ui.IWorkbenchPart;
* value is the currently active number format for the given receiver.</li> * value is the currently active number format for the given receiver.</li>
* </ul> * </ul>
* </p> * </p>
*
* @since 1.0
*/ */
@SuppressWarnings("restriction") @SuppressWarnings("restriction")
public class NumberFormatsPropertyTester extends PropertyTester { public class NumberFormatsPropertyTester extends PropertyTester {

View file

@ -12,6 +12,9 @@ package org.eclipse.cdt.dsf.debug.ui.viewmodel.register;
import org.eclipse.osgi.util.NLS; import org.eclipse.osgi.util.NLS;
/**
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class MessagesForRegisterVM extends NLS { public class MessagesForRegisterVM extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.cdt.dsf.debug.ui.viewmodel.register.messages"; //$NON-NLS-1$ private static final String BUNDLE_NAME = "org.eclipse.cdt.dsf.debug.ui.viewmodel.register.messages"; //$NON-NLS-1$

View file

@ -16,7 +16,7 @@ import org.eclipse.cdt.dsf.ui.viewmodel.update.IElementUpdateTester;
import org.eclipse.cdt.dsf.ui.viewmodel.update.ManualUpdatePolicy; import org.eclipse.cdt.dsf.ui.viewmodel.update.ManualUpdatePolicy;
/** /**
* * @since 1.0
*/ */
public class BreakpointHitUpdatePolicy extends ManualUpdatePolicy { public class BreakpointHitUpdatePolicy extends ManualUpdatePolicy {

View file

@ -12,6 +12,9 @@ package org.eclipse.cdt.dsf.debug.ui.viewmodel.update;
import org.eclipse.osgi.util.NLS; import org.eclipse.osgi.util.NLS;
/**
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class MessagesForVMUpdate extends NLS { public class MessagesForVMUpdate extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.cdt.dsf.debug.ui.viewmodel.update.messages"; //$NON-NLS-1$ private static final String BUNDLE_NAME = "org.eclipse.cdt.dsf.debug.ui.viewmodel.update.messages"; //$NON-NLS-1$

View file

@ -13,6 +13,9 @@ package org.eclipse.cdt.dsf.debug.ui.viewmodel.variable;
import org.eclipse.osgi.util.NLS; import org.eclipse.osgi.util.NLS;
/**
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class MessagesForVariablesVM extends NLS { public class MessagesForVariablesVM extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.cdt.dsf.debug.ui.viewmodel.variable.messages"; //$NON-NLS-1$ private static final String BUNDLE_NAME = "org.eclipse.cdt.dsf.debug.ui.viewmodel.variable.messages"; //$NON-NLS-1$

View file

@ -34,6 +34,8 @@ import org.eclipse.swt.widgets.Listener;
* and callables. The implementation is based on the default DSF executor * and callables. The implementation is based on the default DSF executor
* which still creates its own thread. However this thread blocks when running * which still creates its own thread. However this thread blocks when running
* each executable in the display thread. * each executable in the display thread.
*
* @since 1.0
*/ */
public class DisplayDsfExecutor extends DefaultDsfExecutor public class DisplayDsfExecutor extends DefaultDsfExecutor
{ {

View file

@ -28,6 +28,8 @@ import org.eclipse.swt.widgets.Display;
* {@link java.util.concurrent.ScheduledExecutorService}). However, this * {@link java.util.concurrent.ScheduledExecutorService}). However, this
* implementation is much more efficient than DisplayDsfExecutor as it does * implementation is much more efficient than DisplayDsfExecutor as it does
* not use a separate thread or maintain its own queue. * not use a separate thread or maintain its own queue.
*
* @since 1.0
*/ */
public class SimpleDisplayExecutor implements Executor{ public class SimpleDisplayExecutor implements Executor{
/** /**

View file

@ -21,6 +21,8 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
* canceled as well. * canceled as well.
* *
* @see IViewerUpdate. * @see IViewerUpdate.
*
* @since 1.0
*/ */
@SuppressWarnings("restriction") @SuppressWarnings("restriction")
public class ViewerCountingRequestMonitor extends CountingRequestMonitor { public class ViewerCountingRequestMonitor extends CountingRequestMonitor {

View file

@ -19,6 +19,8 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
* Data Request monitor that takean <code>IViewerUpdate</code> as a parent. * Data Request monitor that takean <code>IViewerUpdate</code> as a parent.
* If the IViewerUpdate is canceled, this request monitor becomes canceled as well. * If the IViewerUpdate is canceled, this request monitor becomes canceled as well.
* @see IViewerUpdate * @see IViewerUpdate
*
* @since 1.0
*/ */
@SuppressWarnings("restriction") @SuppressWarnings("restriction")
public class ViewerDataRequestMonitor<V> extends DataRequestMonitor<V> { public class ViewerDataRequestMonitor<V> extends DataRequestMonitor<V> {

View file

@ -39,10 +39,12 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
* Base implementation for View Model Adapters. The implementation uses * Base implementation for View Model Adapters. The implementation uses
* its own single-thread executor for communicating with providers and * its own single-thread executor for communicating with providers and
* layout nodes. * layout nodes.
*
* @since 1.0
*/ */
@ThreadSafe @ThreadSafe
@SuppressWarnings("restriction") @SuppressWarnings("restriction")
abstract public class AbstractVMAdapter implements IVMAdapterExtension abstract public class AbstractVMAdapter implements IVMAdapter
{ {
private boolean fDisposed; private boolean fDisposed;

View file

@ -28,6 +28,8 @@ import org.eclipse.core.runtime.Platform;
* This is because the view model context objects are just wrappers that are * This is because the view model context objects are just wrappers that are
* created by the view model on demand, so the equals methods must use the * created by the view model on demand, so the equals methods must use the
* object being wrapped to perform a meaningful comparison. * object being wrapped to perform a meaningful comparison.
*
* @since 1.0
*/ */
abstract public class AbstractVMContext implements IVMContext { abstract public class AbstractVMContext implements IVMContext {
protected final IVMNode fNode; protected final IVMNode fNode;

View file

@ -26,6 +26,8 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
* Base implementation of the view model node. * Base implementation of the view model node.
* The main functionality implemented here is for building the view model * The main functionality implemented here is for building the view model
* deltas (IModelDelta), based on the flags returned by child nodes. * deltas (IModelDelta), based on the flags returned by child nodes.
*
* @since 1.0
*/ */
@SuppressWarnings("restriction") @SuppressWarnings("restriction")
abstract public class AbstractVMNode implements IVMNode { abstract public class AbstractVMNode implements IVMNode {

View file

@ -61,6 +61,8 @@ import org.eclipse.swt.widgets.Display;
* @see IAsynchronousLabelAdapter * @see IAsynchronousLabelAdapter
* @see IModelProxy * @see IModelProxy
* @see IVMNode * @see IVMNode
*
* @since 1.0
*/ */
@SuppressWarnings("restriction") @SuppressWarnings("restriction")
abstract public class AbstractVMProvider implements IVMProvider, IVMEventListener abstract public class AbstractVMProvider implements IVMProvider, IVMEventListener

View file

@ -40,6 +40,8 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
* This class is closely linked with a view model provider which is required * This class is closely linked with a view model provider which is required
* for the constructor. The view model provider is used to access the correct * for the constructor. The view model provider is used to access the correct
* executor and the node hierarchy. * executor and the node hierarchy.
*
* @since 1.0
*/ */
@ConfinedToDsfExecutor("#getExecutor()") @ConfinedToDsfExecutor("#getExecutor()")
@SuppressWarnings("restriction") @SuppressWarnings("restriction")

View file

@ -49,10 +49,12 @@ import org.eclipse.jface.viewers.Viewer;
* This class is closely linked with a view model provider which is required * This class is closely linked with a view model provider which is required
* for the constructor. The view model provider is used to access the correct * for the constructor. The view model provider is used to access the correct
* executor and the node hierarchy. * executor and the node hierarchy.
*
* @since 1.0
*/ */
@ConfinedToDsfExecutor("#getProvider()#getExecutor()") @ConfinedToDsfExecutor("#getProvider()#getExecutor()")
@SuppressWarnings("restriction") @SuppressWarnings("restriction")
public class DefaultVMModelProxyStrategy implements IVMModelProxy, IVMModelProxyExtension { public class DefaultVMModelProxyStrategy implements IVMModelProxy {
private final AbstractVMProvider fProvider; private final AbstractVMProvider fProvider;
private final Object fRootElement; private final Object fRootElement;

View file

@ -16,6 +16,8 @@ import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
* Special type of the view model node, which can be used as a root node * Special type of the view model node, which can be used as a root node
* for a hierarchy. The root node of a layout hierarchy has to implement this * for a hierarchy. The root node of a layout hierarchy has to implement this
* interface. * interface.
*
* @since 1.0
*/ */
public interface IRootVMNode extends IVMNode{ public interface IRootVMNode extends IVMNode{

View file

@ -22,6 +22,8 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerInputProvi
* set of viewers. This adapter should be returned by an adapter factory for * set of viewers. This adapter should be returned by an adapter factory for
* the input object of the viewer, and this adapter implementation will then * the input object of the viewer, and this adapter implementation will then
* populate the view contents. * populate the view contents.
*
* @since 1.0
*/ */
@ThreadSafe @ThreadSafe
@SuppressWarnings("restriction") @SuppressWarnings("restriction")
@ -33,4 +35,14 @@ public interface IVMAdapter
* context. Returns <code>null</code> if there is none. * context. Returns <code>null</code> if there is none.
*/ */
public IVMProvider getVMProvider(IPresentationContext presentationContext); public IVMProvider getVMProvider(IPresentationContext presentationContext);
/**
* Retrieves the currently active VM providers in this adapter.
*
* @return array of VM providers
*
* @since 2.0
*/
public IVMProvider[] getActiveProviders();
} }

View file

@ -1,27 +0,0 @@
/*******************************************************************************
* Copyright (c) 2008 Wind River Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.dsf.ui.viewmodel;
/**
* Extension to the IVMAdapter interface which allows access to the array of active
* providers.
*
* @since 1.1
*/
public interface IVMAdapterExtension extends IVMAdapter {
/**
* Retrieves the currently active VM providers in this adapter.
*
* @return array of VM providers
*/
public IVMProvider[] getActiveProviders();
}

View file

@ -18,6 +18,8 @@ import org.eclipse.core.runtime.IAdaptable;
* The implementation of this interface is usually a wrapper object for an object * The implementation of this interface is usually a wrapper object for an object
* from some data model, which is then used to correctly implement the * from some data model, which is then used to correctly implement the
* {@link #equals(Object)} and {@link #hashCode()} methods of this wrapper. * {@link #equals(Object)} and {@link #hashCode()} methods of this wrapper.
*
* @since 1.0
*/ */
@Immutable @Immutable
public interface IVMContext extends IAdaptable { public interface IVMContext extends IAdaptable {

View file

@ -13,6 +13,8 @@ package org.eclipse.cdt.dsf.ui.viewmodel;
import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor; import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta; import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxy; import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxy;
import org.eclipse.jface.viewers.TreePath;
import org.eclipse.jface.viewers.Viewer;
/** /**
* View Model extension to the platform IModelProxy interface. This extension * View Model extension to the platform IModelProxy interface. This extension
@ -21,6 +23,8 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxy;
* <br/> * <br/>
* Note: The IVMModelProxy.init() may be called twice when installed, as a * Note: The IVMModelProxy.init() may be called twice when installed, as a
* workaround for bug 241024. * workaround for bug 241024.
*
* @since 1.0
*/ */
@SuppressWarnings("restriction") @SuppressWarnings("restriction")
public interface IVMModelProxy extends IModelProxy { public interface IVMModelProxy extends IModelProxy {
@ -46,4 +50,26 @@ public interface IVMModelProxy extends IModelProxy {
*/ */
public void fireModelChanged(IModelDelta delta); public void fireModelChanged(IModelDelta delta);
/**
* Returns the viewer.
*
* @since 2.0
*/
public Viewer getViewer();
/**
* Returns the viewer input that was set to the viewer when this proxy
* was created.
*
* @since 2.0
*/
public Object getViewerInput();
/**
* Returns the full path for the root element. If the path is empty, it
* means that the root element is the viewer input.
*
* @since 2.0
*/
public TreePath getRootPath();
} }

View file

@ -1,41 +0,0 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.dsf.ui.viewmodel;
import org.eclipse.jface.viewers.TreePath;
import org.eclipse.jface.viewers.Viewer;
/**
* View Model extension to IVMModelProxy interface. This extension
* allows access to the viewer.
*
* @since 1.1
*/
public interface IVMModelProxyExtension extends IVMModelProxy {
/**
* Returns the viewer.
*/
public Viewer getViewer();
/**
* Returns the viewer input that was set to the viewer when this proxy
* was created.
*/
public Object getViewerInput();
/**
* Returns the full path for the root element. If the path is empty, it
* means that the root element is the viewer input.
* @return
*/
public TreePath getRootPath();
}

View file

@ -42,6 +42,8 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
* *
* @see AbstractDMVMProvider * @see AbstractDMVMProvider
* @see IElementContentProvider * @see IElementContentProvider
*
* @since 1.0
*/ */
@ConfinedToDsfExecutor("") @ConfinedToDsfExecutor("")
@SuppressWarnings("restriction") @SuppressWarnings("restriction")

View file

@ -46,6 +46,8 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerInputProvi
* {@link IVMAdapter} which implements <code>IElementContentProvider</code>, * {@link IVMAdapter} which implements <code>IElementContentProvider</code>,
* and <code>IVMAdapter</code> implementation is expected to switch to * and <code>IVMAdapter</code> implementation is expected to switch to
* provider's thread before delegating the call to it. * provider's thread before delegating the call to it.
*
* @since 1.0
*/ */
@ConfinedToDsfExecutor("#getExecutor()") @ConfinedToDsfExecutor("#getExecutor()")
@SuppressWarnings("restriction") @SuppressWarnings("restriction")

View file

@ -16,6 +16,8 @@ import org.eclipse.jface.viewers.Viewer;
/** /**
* Event generated by an IModelProxy implementation when it is installed * Event generated by an IModelProxy implementation when it is installed
* into a viewer. * into a viewer.
*
* @since 1.0
*/ */
@SuppressWarnings("restriction") @SuppressWarnings("restriction")
public class ModelProxyInstalledEvent { public class ModelProxyInstalledEvent {

View file

@ -20,6 +20,8 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
/** /**
* Default implementation of a root view model node. This class may be sub-classed * Default implementation of a root view model node. This class may be sub-classed
* to implement model-specific event handling. * to implement model-specific event handling.
*
* @since 1.0
*/ */
@SuppressWarnings("restriction") @SuppressWarnings("restriction")
public class RootVMNode extends AbstractVMNode implements IRootVMNode { public class RootVMNode extends AbstractVMNode implements IRootVMNode {

View file

@ -21,6 +21,8 @@ import org.eclipse.jface.viewers.TreePath;
* Helper class implementation of the {@link IChildrenCountUpdate} update object. * Helper class implementation of the {@link IChildrenCountUpdate} update object.
* *
* @see VMViewerUpdate * @see VMViewerUpdate
*
* @since 1.0
*/ */
@SuppressWarnings("restriction") @SuppressWarnings("restriction")
public class VMChildrenCountUpdate extends VMViewerUpdate implements IChildrenCountUpdate { public class VMChildrenCountUpdate extends VMViewerUpdate implements IChildrenCountUpdate {

View file

@ -24,6 +24,8 @@ import org.eclipse.jface.viewers.TreePath;
* Helper class implementation of the {@link IChildrenUpdate} update object. * Helper class implementation of the {@link IChildrenUpdate} update object.
* *
* @see VMViewerUpdate * @see VMViewerUpdate
*
* @since 1.0
*/ */
@SuppressWarnings("restriction") @SuppressWarnings("restriction")
public class VMChildrenUpdate extends VMViewerUpdate implements IChildrenUpdate { public class VMChildrenUpdate extends VMViewerUpdate implements IChildrenUpdate {

View file

@ -21,6 +21,8 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
* constructed. * constructed.
* *
* @see IModelDelta#getNodes() * @see IModelDelta#getNodes()
*
* @since 1.0
*/ */
@SuppressWarnings("restriction") @SuppressWarnings("restriction")
public class VMDelta extends ModelDelta { public class VMDelta extends ModelDelta {

View file

@ -21,6 +21,8 @@ import org.eclipse.jface.viewers.TreePath;
* Helper class implementation of the {@link IHasChildrenUpdate} update object. * Helper class implementation of the {@link IHasChildrenUpdate} update object.
* *
* @see VMViewerUpdate * @see VMViewerUpdate
*
* @since 1.0
*/ */
@SuppressWarnings("restriction") @SuppressWarnings("restriction")
public class VMHasChildrenUpdate extends VMViewerUpdate implements IHasChildrenUpdate { public class VMHasChildrenUpdate extends VMViewerUpdate implements IHasChildrenUpdate {

View file

@ -34,6 +34,8 @@ import org.eclipse.jface.viewers.TreePath;
* and {@link IElementMementoProvider}. The viewer update can be constructed * and {@link IElementMementoProvider}. The viewer update can be constructed
* using a higher level update object or a set of parameters to fulfill the * using a higher level update object or a set of parameters to fulfill the
* <code>IViewerUpdate</code> interface. * <code>IViewerUpdate</code> interface.
*
* @since 1.0
*/ */
@SuppressWarnings("restriction") @SuppressWarnings("restriction")
public class VMViewerUpdate implements IViewerUpdate { public class VMViewerUpdate implements IViewerUpdate {

View file

@ -20,6 +20,8 @@ import org.eclipse.cdt.dsf.ui.viewmodel.AbstractVMAdapter;
/** /**
* Base implementation for DSF-based view model adapters. * Base implementation for DSF-based view model adapters.
*
* @since 1.0
*/ */
@ThreadSafe @ThreadSafe
abstract public class AbstractDMVMAdapter extends AbstractVMAdapter abstract public class AbstractDMVMAdapter extends AbstractVMAdapter

View file

@ -45,6 +45,8 @@ import org.eclipse.jface.viewers.TreePath;
* The assumption in this implementation is that elements of this node have * The assumption in this implementation is that elements of this node have
* a single IDMContext associated with them, and all of these contexts * a single IDMContext associated with them, and all of these contexts
* are of the same class type. * are of the same class type.
*
* @since 1.0
*/ */
@SuppressWarnings("restriction") @SuppressWarnings("restriction")
abstract public class AbstractDMVMNode extends AbstractVMNode implements IVMNode { abstract public class AbstractDMVMNode extends AbstractVMNode implements IVMNode {

View file

@ -36,6 +36,8 @@ import org.eclipse.debug.internal.ui.viewers.provisional.IAsynchronousLabelAdapt
* @see IAsynchronousLabelAdapter * @see IAsynchronousLabelAdapter
* @see IModelProxy * @see IModelProxy
* @see IVMNode * @see IVMNode
*
* @since 1.0
*/ */
@ConfinedToDsfExecutor("fSession#getExecutor") @ConfinedToDsfExecutor("fSession#getExecutor")
@SuppressWarnings("restriction") @SuppressWarnings("restriction")

View file

@ -22,6 +22,8 @@ import org.eclipse.jface.viewers.TreePath;
* Object used to combine several DM Contexts found in a tree path of a viewer * Object used to combine several DM Contexts found in a tree path of a viewer
* update. This object allows the view model to pass complete data model context * update. This object allows the view model to pass complete data model context
* information found in the view to the services. * information found in the view to the services.
*
* @since 1.0
*/ */
@SuppressWarnings("restriction") @SuppressWarnings("restriction")
public class CompositeDMVMContext extends CompositeDMContext { public class CompositeDMVMContext extends CompositeDMContext {

View file

@ -15,6 +15,8 @@ import org.eclipse.cdt.dsf.ui.viewmodel.IVMContext;
/** /**
* Interface for a view model context based on a DSF data model context. * Interface for a view model context based on a DSF data model context.
*
* @since 1.0
*/ */
public interface IDMVMContext extends IVMContext { public interface IDMVMContext extends IVMContext {

View file

@ -27,6 +27,8 @@ import org.eclipse.cdt.dsf.ui.viewmodel.RootVMNode;
* selection, as in IStructuredSelection.getFirstElement(). Therefore the root * selection, as in IStructuredSelection.getFirstElement(). Therefore the root
* node also has to use the first element as the root object instead of the * node also has to use the first element as the root object instead of the
* whole selection. * whole selection.
*
* @since 1.0
*/ */
public class RootDMVMNode extends RootVMNode public class RootDMVMNode extends RootVMNode
implements IRootVMNode implements IRootVMNode

View file

@ -14,6 +14,8 @@ package org.eclipse.cdt.dsf.ui.viewmodel.properties;
/** /**
* Provides context-sensitive properties. Can be registered as an adapter for * Provides context-sensitive properties. Can be registered as an adapter for
* an element or implemented directly * an element or implemented directly
*
* @since 1.0
*/ */
public interface IElementPropertiesProvider { public interface IElementPropertiesProvider {

View file

@ -12,6 +12,7 @@ package org.eclipse.cdt.dsf.ui.viewmodel.properties;
/** /**
* *
* @since 1.0
*/ */
public interface ILabelAttributeChangedListener { public interface ILabelAttributeChangedListener {

View file

@ -14,6 +14,8 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
/** /**
* Context sensitive properties update request for an element. * Context sensitive properties update request for an element.
*
* @since 1.0
*/ */
@SuppressWarnings("restriction") @SuppressWarnings("restriction")
public interface IPropertiesUpdate extends IViewerUpdate { public interface IPropertiesUpdate extends IViewerUpdate {

View file

@ -30,6 +30,8 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate;
* *
* @see PropertyBasedLabelProvider * @see PropertyBasedLabelProvider
* @see LabelColumnInfo * @see LabelColumnInfo
*
* @since 1.0
*/ */
@SuppressWarnings("restriction") @SuppressWarnings("restriction")
abstract public class LabelAttribute { abstract public class LabelAttribute {

View file

@ -22,6 +22,8 @@ import org.eclipse.swt.graphics.RGB;
* @see LabelAttribute * @see LabelAttribute
* @see LabelColumnInfo * @see LabelColumnInfo
* @see PropertyBasedLabelProvider * @see PropertyBasedLabelProvider
*
* @since 1.0
*/ */
@SuppressWarnings("restriction") @SuppressWarnings("restriction")

View file

@ -28,6 +28,8 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate;
* Clients are not intended to extend this class. * Clients are not intended to extend this class.
* *
* @see PropertyBasedLabelProvider * @see PropertyBasedLabelProvider
*
* @since 1.0
*/ */
@SuppressWarnings("restriction") @SuppressWarnings("restriction")
@ThreadSafe @ThreadSafe

View file

@ -22,6 +22,8 @@ import org.eclipse.swt.graphics.FontData;
* @see LabelAttribute * @see LabelAttribute
* @see LabelColumnInfo * @see LabelColumnInfo
* @see PropertyBasedLabelProvider * @see PropertyBasedLabelProvider
*
* @since 1.0
*/ */
@SuppressWarnings("restriction") @SuppressWarnings("restriction")
public class LabelFont extends LabelAttribute { public class LabelFont extends LabelAttribute {

View file

@ -21,6 +21,8 @@ import org.eclipse.jface.resource.ImageDescriptor;
* @see LabelAttribute * @see LabelAttribute
* @see LabelColumnInfo * @see LabelColumnInfo
* @see PropertyBasedLabelProvider * @see PropertyBasedLabelProvider
*
* @since 1.0
*/ */
@SuppressWarnings("restriction") @SuppressWarnings("restriction")
public class LabelImage extends LabelAttribute { public class LabelImage extends LabelAttribute {

View file

@ -27,6 +27,8 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate;
* @see LabelAttribute * @see LabelAttribute
* @see LabelColumnInfo * @see LabelColumnInfo
* @see PropertyBasedLabelProvider * @see PropertyBasedLabelProvider
*
* @since 1.0
*/ */
@SuppressWarnings("restriction") @SuppressWarnings("restriction")
public class LabelText extends LabelAttribute { public class LabelText extends LabelAttribute {

View file

@ -12,6 +12,9 @@ package org.eclipse.cdt.dsf.ui.viewmodel.properties;
import org.eclipse.osgi.util.NLS; import org.eclipse.osgi.util.NLS;
/**
* @noinstantiate This class is not intended to be instantiated by clients.
*/
class MessagesForProperties extends NLS { class MessagesForProperties extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.cdt.dsf.ui.viewmodel.properties.messages"; //$NON-NLS-1$ private static final String BUNDLE_NAME = "org.eclipse.cdt.dsf.ui.viewmodel.properties.messages"; //$NON-NLS-1$

View file

@ -39,6 +39,8 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate;
* element's property provider to retrieve those properties. After the property * element's property provider to retrieve those properties. After the property
* values are retrieved, they are processed in order to produce correct label text, * values are retrieved, they are processed in order to produce correct label text,
* images, fonts, and colors, for the given element. * images, fonts, and colors, for the given element.
*
* @since 1.0
*/ */
@SuppressWarnings("restriction") @SuppressWarnings("restriction")
@ThreadSafe @ThreadSafe

View file

@ -36,7 +36,6 @@ import org.eclipse.cdt.dsf.ui.concurrent.ViewerDataRequestMonitor;
import org.eclipse.cdt.dsf.ui.viewmodel.AbstractVMAdapter; import org.eclipse.cdt.dsf.ui.viewmodel.AbstractVMAdapter;
import org.eclipse.cdt.dsf.ui.viewmodel.AbstractVMProvider; import org.eclipse.cdt.dsf.ui.viewmodel.AbstractVMProvider;
import org.eclipse.cdt.dsf.ui.viewmodel.IVMModelProxy; import org.eclipse.cdt.dsf.ui.viewmodel.IVMModelProxy;
import org.eclipse.cdt.dsf.ui.viewmodel.IVMModelProxyExtension;
import org.eclipse.cdt.dsf.ui.viewmodel.IVMNode; import org.eclipse.cdt.dsf.ui.viewmodel.IVMNode;
import org.eclipse.cdt.dsf.ui.viewmodel.VMChildrenCountUpdate; import org.eclipse.cdt.dsf.ui.viewmodel.VMChildrenCountUpdate;
import org.eclipse.cdt.dsf.ui.viewmodel.VMChildrenUpdate; import org.eclipse.cdt.dsf.ui.viewmodel.VMChildrenUpdate;
@ -739,45 +738,39 @@ public class AbstractCachingVMProvider extends AbstractVMProvider implements ICa
flush(new FlushMarkerKey(proxyStrategy.getRootElement(), elementTester)); flush(new FlushMarkerKey(proxyStrategy.getRootElement(), elementTester));
if (proxyStrategy instanceof IVMModelProxyExtension) { CountingRequestMonitor multiRm = new CountingRequestMonitor(getExecutor(), rm);
IVMModelProxyExtension proxyStrategyExtension = (IVMModelProxyExtension)proxyStrategy; super.handleEvent(proxyStrategy, event, multiRm);
int rmCount = 1;
CountingRequestMonitor multiRm = new CountingRequestMonitor(getExecutor(), rm);
super.handleEvent(proxyStrategy, event, multiRm); if(fDelayEventHandleForViewUpdate) {
int rmCount = 1; if(this.getActiveUpdateScope().getID().equals(AllUpdateScope.ALL_UPDATE_SCOPE_ID)) {
new MultiLevelUpdateHandler(getExecutor(), proxyStrategy, getPresentationContext(), this, multiRm).
if(fDelayEventHandleForViewUpdate) { startUpdate();
if(this.getActiveUpdateScope().getID().equals(AllUpdateScope.ALL_UPDATE_SCOPE_ID)) { rmCount++;
new MultiLevelUpdateHandler(getExecutor(), proxyStrategyExtension, getPresentationContext(), this, multiRm). } else if (!proxyStrategy.isDisposed()) {
startUpdate(); // block updating only the viewport
rmCount++; TreeViewer viewer = (TreeViewer) proxyStrategy.getViewer();
} else if (!proxyStrategy.isDisposed()) { Tree tree = viewer.getTree();
// block updating only the viewport int count = tree.getSize().y / tree.getItemHeight();
TreeViewer viewer = (TreeViewer) proxyStrategyExtension.getViewer();
Tree tree = viewer.getTree(); TreeItem topItem = tree.getTopItem();
int count = tree.getSize().y / tree.getItemHeight(); int index = computeTreeIndex(topItem);
TreeItem topItem = tree.getTopItem(); MultiLevelUpdateHandler handler = new MultiLevelUpdateHandler(
int index = computeTreeIndex(topItem); getExecutor(), proxyStrategy, getPresentationContext(), this, multiRm);
handler.setRange(index, index + count);
MultiLevelUpdateHandler handler = new MultiLevelUpdateHandler( handler.startUpdate();
getExecutor(), proxyStrategyExtension, getPresentationContext(), this, multiRm); rmCount++;
handler.setRange(index, index + count); }
handler.startUpdate();
rmCount++;
}
} else {
if(this.getActiveUpdateScope().getID().equals(AllUpdateScope.ALL_UPDATE_SCOPE_ID)) {
MultiLevelUpdateHandler handler = new MultiLevelUpdateHandler(
getExecutor(), proxyStrategyExtension, getPresentationContext(), this, multiRm);
handler.startUpdate();
rmCount++;
}
}
multiRm.setDoneCount(rmCount);
} else { } else {
super.handleEvent(proxyStrategy, event, rm); if(this.getActiveUpdateScope().getID().equals(AllUpdateScope.ALL_UPDATE_SCOPE_ID)) {
MultiLevelUpdateHandler handler = new MultiLevelUpdateHandler(
getExecutor(), proxyStrategy, getPresentationContext(), this, multiRm);
handler.startUpdate();
rmCount++;
}
} }
multiRm.setDoneCount(rmCount);
} }
private static int computeTreeIndex(TreeItem child) { private static int computeTreeIndex(TreeItem child) {

View file

@ -16,6 +16,8 @@ import org.eclipse.jface.viewers.TreePath;
* An "automatic" update policy which causes the view model provider cache to * An "automatic" update policy which causes the view model provider cache to
* be flushed whenever an event causes a delta to be generated in the given * be flushed whenever an event causes a delta to be generated in the given
* model. * model.
*
* @since 1.0
*/ */
public class AutomaticUpdatePolicy implements IVMUpdatePolicy { public class AutomaticUpdatePolicy implements IVMUpdatePolicy {

View file

@ -16,6 +16,8 @@ import org.eclipse.cdt.dsf.ui.viewmodel.IVMProvider;
* A view model provider which supports caching of data returned by view model * A view model provider which supports caching of data returned by view model
* nodes. The methods in this interface allow clients to configure how the * nodes. The methods in this interface allow clients to configure how the
* cache should be updated in response to different events. * cache should be updated in response to different events.
*
* @since 1.0
*/ */
public interface ICachingVMProvider extends IVMProvider { public interface ICachingVMProvider extends IVMProvider {

View file

@ -17,6 +17,8 @@ import org.eclipse.jface.viewers.TreePath;
* entries should be updated during a flush operation. * entries should be updated during a flush operation.
* *
* @see IVMUpdatePolicy * @see IVMUpdatePolicy
*
* @since 1.0
*/ */
public interface IElementUpdateTester { public interface IElementUpdateTester {

View file

@ -15,6 +15,8 @@ package org.eclipse.cdt.dsf.ui.viewmodel.update;
* Interface for an update policy. The main function of an update policy is * Interface for an update policy. The main function of an update policy is
* to create an element tester for each given event. The element tester * to create an element tester for each given event. The element tester
* is then used to update the viewer cache. * is then used to update the viewer cache.
*
* @since 1.0
*/ */
public interface IVMUpdatePolicy { public interface IVMUpdatePolicy {

View file

@ -18,6 +18,8 @@ import org.eclipse.jface.viewers.TreePath;
/** /**
* An "manual" update policy which causes the view model provider cache to be * An "manual" update policy which causes the view model provider cache to be
* flushed only as a result of an explicit user action. * flushed only as a result of an explicit user action.
*
* @since 1.0
*/ */
public class ManualUpdatePolicy implements IVMUpdatePolicy { public class ManualUpdatePolicy implements IVMUpdatePolicy {

View file

@ -19,7 +19,7 @@ import org.eclipse.cdt.dsf.concurrent.CountingRequestMonitor;
import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor; import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
import org.eclipse.cdt.dsf.concurrent.DsfRunnable; import org.eclipse.cdt.dsf.concurrent.DsfRunnable;
import org.eclipse.cdt.dsf.concurrent.RequestMonitor; import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
import org.eclipse.cdt.dsf.ui.viewmodel.IVMModelProxyExtension; import org.eclipse.cdt.dsf.ui.viewmodel.IVMModelProxy;
import org.eclipse.cdt.dsf.ui.viewmodel.VMChildrenUpdate; import org.eclipse.cdt.dsf.ui.viewmodel.VMChildrenUpdate;
import org.eclipse.cdt.dsf.ui.viewmodel.VMHasChildrenUpdate; import org.eclipse.cdt.dsf.ui.viewmodel.VMHasChildrenUpdate;
import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IAdaptable;
@ -38,6 +38,9 @@ import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.graphics.FontData; import org.eclipse.swt.graphics.FontData;
import org.eclipse.swt.graphics.RGB; import org.eclipse.swt.graphics.RGB;
/**
* @since 1.0
*/
@SuppressWarnings("restriction") @SuppressWarnings("restriction")
class MultiLevelUpdateHandler extends DataRequestMonitor<List<Object>> { class MultiLevelUpdateHandler extends DataRequestMonitor<List<Object>> {
@ -123,7 +126,7 @@ class MultiLevelUpdateHandler extends DataRequestMonitor<List<Object>> {
private int fPendingUpdates; private int fPendingUpdates;
public MultiLevelUpdateHandler(Executor executor, public MultiLevelUpdateHandler(Executor executor,
IVMModelProxyExtension modelProxy, IVMModelProxy modelProxy,
IPresentationContext presentationContext, IPresentationContext presentationContext,
IElementContentProvider contentProvider, IElementContentProvider contentProvider,
RequestMonitor parentRequestMonitor) { RequestMonitor parentRequestMonitor) {

View file

@ -18,6 +18,8 @@ import java.util.Set;
* a viewer is configured to be in a manual update mode, if user edits a value, the * a viewer is configured to be in a manual update mode, if user edits a value, the
* viewer should still update at least the value that the user editor. This event * viewer should still update at least the value that the user editor. This event
* is used to accomplish that behavior. * is used to accomplish that behavior.
*
* @since 1.0
*/ */
public class UserEditEvent { public class UserEditEvent {
private final Set<Object> fElements; private final Set<Object> fElements;

View file

@ -15,6 +15,7 @@ package org.eclipse.cdt.dsf.ui.viewmodel.update;
* An "automatic" update policy which causes the view model provider cache to * An "automatic" update policy which causes the view model provider cache to
* be flushed whenever an event causes a delta to be generated in the given * be flushed whenever an event causes a delta to be generated in the given
* model. * model.
*
* @since 1.1 * @since 1.1
*/ */
public class VisibleUpdateScope implements IVMUpdateScope { public class VisibleUpdateScope implements IVMUpdateScope {

View file

@ -13,7 +13,7 @@ Require-Bundle: org.eclipse.core.runtime,
Bundle-ActivationPolicy: lazy Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.cdt.dsf.concurrent, Export-Package: org.eclipse.cdt.dsf.concurrent,
org.eclipse.cdt.dsf.datamodel, org.eclipse.cdt.dsf.datamodel,
org.eclipse.cdt.dsf.debug.internal.provisional.model, org.eclipse.cdt.dsf.debug.internal.provisional.model;x-friends:="org.eclipse.cdt.dsf.ui",
org.eclipse.cdt.dsf.debug.model, org.eclipse.cdt.dsf.debug.model,
org.eclipse.cdt.dsf.debug.service, org.eclipse.cdt.dsf.debug.service,
org.eclipse.cdt.dsf.debug.service.command, org.eclipse.cdt.dsf.debug.service.command,

View file

@ -27,7 +27,9 @@ import java.lang.annotation.Target;
* and validation code. * and validation code.
* *
* @param value The value indicates the method to use to obtain the executor. * @param value The value indicates the method to use to obtain the executor.
* It should be null if it cannot be determined from the given object. * It should be null if it cannot be determined from the given object.
*
* @since 1.0
*/ */
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.PACKAGE, ElementType.TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR}) @Target({ElementType.PACKAGE, ElementType.TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR})

View file

@ -34,6 +34,8 @@ import org.eclipse.core.runtime.MultiStatus;
* *
* countingRm.setDoneCount(count); * countingRm.setDoneCount(count);
* </pre></code> * </pre></code>
*
* @since 1.0
*/ */
public class CountingRequestMonitor extends RequestMonitor { public class CountingRequestMonitor extends RequestMonitor {
/** /**

View file

@ -17,6 +17,8 @@ import java.util.concurrent.Executor;
* Request monitor that allows data to be returned to the request initiator. * Request monitor that allows data to be returned to the request initiator.
* *
* @param V The type of the data object that this monitor handles. * @param V The type of the data object that this monitor handles.
*
* @since 1.0
*/ */
public class DataRequestMonitor<V> extends RequestMonitor { public class DataRequestMonitor<V> extends RequestMonitor {

View file

@ -31,6 +31,8 @@ import org.eclipse.core.runtime.Status;
/** /**
* Default implementation of a DSF executor interfaces, based on the * Default implementation of a DSF executor interfaces, based on the
* standard java.util.concurrent.ThreadPoolExecutor. * standard java.util.concurrent.ThreadPoolExecutor.
*
* @since 1.0
*/ */
public class DefaultDsfExecutor extends ScheduledThreadPoolExecutor public class DefaultDsfExecutor extends ScheduledThreadPoolExecutor

View file

@ -23,6 +23,8 @@ import org.eclipse.core.runtime.Platform;
* an object only implementing the Runnable/Callable interface, the DsfExecutable * an object only implementing the Runnable/Callable interface, the DsfExecutable
* contains fields and methods that used for debugging and tracing when * contains fields and methods that used for debugging and tracing when
* tracing is enabled. * tracing is enabled.
*
* @since 1.0
*/ */
@Immutable @Immutable
public class DsfExecutable { public class DsfExecutable {

View file

@ -19,6 +19,8 @@ import java.util.concurrent.ScheduledExecutorService;
* <br>Note: A DSF executor dispatch thread does not necessarily have * <br>Note: A DSF executor dispatch thread does not necessarily have
* to be exclusive to the executor, it could be shared with * to be exclusive to the executor, it could be shared with
* another event dispatch service, such as the SWT display dispatch thread. * another event dispatch service, such as the SWT display dispatch thread.
*
* @since 1.0
*/ */
@ThreadSafe @ThreadSafe
public interface DsfExecutor extends ScheduledExecutorService public interface DsfExecutor extends ScheduledExecutorService

View file

@ -10,9 +10,12 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.dsf.concurrent; package org.eclipse.cdt.dsf.concurrent;
/** /**
* Interface that hold the codes used when reporting status using the DSF * Interface that hold the codes used when reporting status using the DSF
* Request Monitor. * Request Monitor.
*
* @since 1.0
*/ */
public interface IDsfStatusConstants { public interface IDsfStatusConstants {
/** /**

View file

@ -20,6 +20,8 @@ import org.eclipse.core.runtime.Platform;
* executor is useful for clients that need to create <code>RequestMonitor</code> * executor is useful for clients that need to create <code>RequestMonitor</code>
* objects, but which do not have their own executor. * objects, but which do not have their own executor.
* @see RequestMonitor * @see RequestMonitor
*
* @since 1.0
*/ */
public class ImmediateExecutor implements Executor { public class ImmediateExecutor implements Executor {

View file

@ -23,6 +23,8 @@ import java.lang.annotation.Target;
* <p> * <p>
* Note: the runtime retention policy is there to allow automated testing * Note: the runtime retention policy is there to allow automated testing
* and validation code. * and validation code.
*
* @since 1.0
*/ */
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE) @Target(ElementType.TYPE)

View file

@ -39,6 +39,8 @@ import org.eclipse.core.runtime.MultiStatus;
* })); * }));
* } * }
* </pre> * </pre>
*
* @since 1.0
*/ */
public class MultiRequestMonitor<V extends RequestMonitor> extends RequestMonitor { public class MultiRequestMonitor<V extends RequestMonitor> extends RequestMonitor {
private List<V> fRequestMonitorList = new LinkedList<V>(); private List<V> fRequestMonitorList = new LinkedList<V>();

View file

@ -47,6 +47,8 @@ import org.eclipse.core.runtime.CoreException;
* </pre> * </pre>
* <p> * <p>
* @see java.util.concurrent.Callable * @see java.util.concurrent.Callable
*
* @since 1.0
*/ */
@ThreadSafe @ThreadSafe
abstract public class Query<V> extends DsfRunnable abstract public class Query<V> extends DsfRunnable

View file

@ -69,6 +69,8 @@ import org.eclipse.core.runtime.Status;
* } * }
* </pre> * </pre>
* </p> * </p>
*
* @since 1.0
*/ */
@ThreadSafe @ThreadSafe
public class RequestMonitor { public class RequestMonitor {

View file

@ -50,6 +50,8 @@ import org.eclipse.core.runtime.SubProgressMonitor;
* if progress reporting, cancellability, and roll-back ability is required, it * if progress reporting, cancellability, and roll-back ability is required, it
* has to be re-implemented every time. The Sequence class tries to address * has to be re-implemented every time. The Sequence class tries to address
* this problem by containing this pattern in a single class. * this problem by containing this pattern in a single class.
*
* @since 1.0
*/ */
@ThreadSafe @ThreadSafe
abstract public class Sequence extends DsfRunnable implements Future<Object> { abstract public class Sequence extends DsfRunnable implements Future<Object> {

View file

@ -10,9 +10,12 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.dsf.concurrent; package org.eclipse.cdt.dsf.concurrent;
/** /**
* Untility class for easy pretty-printing stack traces. Local to the * Untility class for easy pretty-printing stack traces. Local to the
* concurrent package. * concurrent package.
*
* @since 1.0
*/ */
@Immutable @Immutable
class StackTraceWrapper { class StackTraceWrapper {

View file

@ -25,6 +25,8 @@ import java.lang.annotation.Target;
* <p> * <p>
* Note: the runtime retention policy is there to allow automated testing * Note: the runtime retention policy is there to allow automated testing
* and validation code. * and validation code.
*
* @since 1.0
*/ */
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.PACKAGE, ElementType.TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR}) @Target({ElementType.PACKAGE, ElementType.TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR})

View file

@ -33,6 +33,8 @@ import java.lang.annotation.Target;
* *
* @param value The value indicates the method to use to obtain the executor. * @param value The value indicates the method to use to obtain the executor.
* It should be null if it cannot be determined from the given object. * It should be null if it cannot be determined from the given object.
*
* @since 1.0
*/ */
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.PACKAGE, ElementType.TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR}) @Target({ElementType.PACKAGE, ElementType.TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR})

View file

@ -28,6 +28,8 @@ import org.eclipse.core.runtime.PlatformObject;
* therefore a proper equals implementation is critical. * therefore a proper equals implementation is critical.
* </p> * </p>
* @param <V> Data Model data type that this context is for. * @param <V> Data Model data type that this context is for.
*
* @since 1.0
*/ */
@Immutable @Immutable
abstract public class AbstractDMContext extends PlatformObject abstract public class AbstractDMContext extends PlatformObject

View file

@ -15,6 +15,8 @@ import org.eclipse.cdt.dsf.concurrent.Immutable;
/** /**
* Base implementation of the IDMEvent interface. It only handles the * Base implementation of the IDMEvent interface. It only handles the
* required DM-Context reference. * required DM-Context reference.
*
* @since 1.0
*/ */
@Immutable @Immutable
abstract public class AbstractDMEvent<V extends IDMContext> implements IDMEvent<V> { abstract public class AbstractDMEvent<V extends IDMContext> implements IDMEvent<V> {

Some files were not shown because too many files have changed in this diff Show more