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.viewmodel,
org.eclipse.cdt.dsf.debug.ui.viewmodel.actions,
org.eclipse.cdt.dsf.debug.ui.viewmodel.expression,
org.eclipse.cdt.dsf.debug.ui.viewmodel.launch,
org.eclipse.cdt.dsf.debug.ui.viewmodel.modules,
org.eclipse.cdt.dsf.debug.ui.viewmodel.expression;x-internal:=true,
org.eclipse.cdt.dsf.debug.ui.viewmodel.launch;x-internal:=true,
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.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.variable,
org.eclipse.cdt.dsf.debug.ui.viewmodel.variable;x-internal:=true,
org.eclipse.cdt.dsf.ui.concurrent,
org.eclipse.cdt.dsf.ui.viewmodel,
org.eclipse.cdt.dsf.ui.viewmodel.datamodel,

View file

@ -8,7 +8,7 @@
</extension>
<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 point="org.eclipse.ui.editors.annotationTypes">

View file

@ -8,8 +8,9 @@
* Contributors:
* 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.core.runtime.preferences.AbstractPreferenceInitializer;
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.swt.graphics.RGB;
// Note: this class should be removed from public API. See bug 246004
public class PreferenceInitializer extends AbstractPreferenceInitializer {
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;
/**
* @noinstantiate This class is not intended to be instantiated by clients.
*/
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$

View file

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

View file

@ -26,6 +26,9 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.commands.IDebugCommandRequest;
/**
* @since 1.0
*/
@Immutable
public abstract class DsfCommandRunnable extends DsfRunnable {
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.IResumeHandler;
/**
*
* @since 1.0
*/
@Immutable
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.IStepIntoHandler;
/**
*
* @since 1.0
*/
@Immutable
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.IStepOverHandler;
/**
*
* @since 1.0
*/
@Immutable
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.IStepReturnHandler;
/**
*
* @since 1.0
*/
@Immutable
public class DsfStepReturnCommand implements IStepReturnHandler {

View file

@ -20,6 +20,8 @@ import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
/**
*
* @since 1.0
*/
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.ISuspendHandler;
/**
*
* @since 1.0
*/
@Immutable
public class DsfSuspendCommand implements ISuspendHandler {
private final DsfExecutor fExecutor;

View file

@ -37,6 +37,8 @@ import org.eclipse.debug.ui.contexts.ISuspendTriggerListener;
* the debugger suspends.
*
* @see ISuspendTrigger
*
* @since 1.0
*/
@ConfinedToDsfExecutor("fSession.getExecutor()")
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.IViewPart;
/**
*
* @since 1.0
*/
@SuppressWarnings("restriction")
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 {

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
* 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.
*
* @since 1.0
*/
@ThreadSafe
public class DsfSourceDisplayAdapter implements ISourceDisplay, ISteppingControlParticipant

View file

@ -19,7 +19,7 @@ import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.texteditor.IAnnotationImageProvider;
@ThreadSafe
public class InstructionPointerImageProvider implements IAnnotationImageProvider {
class InstructionPointerImageProvider implements IAnnotationImageProvider {
/* (non-Javadoc)
* @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;
/**
*
* @since 1.0
*/
public interface IDebugVMConstants {
/**
* Standard across the board column IDs.

View file

@ -10,7 +10,7 @@
*******************************************************************************/
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.update.ICachingVMProvider;
import org.eclipse.core.runtime.CoreException;
@ -27,7 +27,7 @@ import org.eclipse.jface.viewers.IStructuredSelection;
public class DefaultRefreshAllTarget implements IRefreshAllTarget {
public void refresh(ISelection debugContext) throws CoreException {
IVMAdapterExtension adapter = getActiveVMAdapter( debugContext );
IVMAdapter adapter = getActiveVMAdapter( debugContext );
if (adapter != null) {
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) {
Object activeElement = ((IStructuredSelection)debugContext).getFirstElement();
if (activeElement instanceof IAdaptable) {
return (IVMAdapterExtension)((IAdaptable)activeElement).getAdapter(IVMAdapterExtension.class);
return (IVMAdapter)((IAdaptable)activeElement).getAdapter(IVMAdapter.class);
}
}
return null;

View file

@ -12,6 +12,9 @@ package org.eclipse.cdt.dsf.debug.ui.viewmodel.expression;
import org.eclipse.osgi.util.NLS;
/**
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class MessagesForExpressionVM extends NLS {
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;
/**
* Comment for .
* @noinstantiate This class is not intended to be instantiated by clients.
*/
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.
*
* @since 1.0
*/
@SuppressWarnings("restriction")
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")
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;
/**
*
* @since 1.0
*/
public interface IFormattedValueVMContext extends IVMContext {
IFormattedValuePreferenceStore getPreferenceStore();

View file

@ -13,6 +13,9 @@ package org.eclipse.cdt.dsf.debug.ui.viewmodel.numberformat;
import org.eclipse.osgi.util.NLS;
/**
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class MessagesForNumberFormat extends NLS {
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>
* </ul>
* </p>
*
* @since 1.0
*/
@SuppressWarnings("restriction")
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;
/**
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class MessagesForRegisterVM extends NLS {
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;
/**
*
* @since 1.0
*/
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;
/**
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class MessagesForVMUpdate extends NLS {
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;
/**
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class MessagesForVariablesVM extends NLS {
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
* which still creates its own thread. However this thread blocks when running
* each executable in the display thread.
*
* @since 1.0
*/
public class DisplayDsfExecutor extends DefaultDsfExecutor
{

View file

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

View file

@ -21,6 +21,8 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
* canceled as well.
*
* @see IViewerUpdate.
*
* @since 1.0
*/
@SuppressWarnings("restriction")
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.
* If the IViewerUpdate is canceled, this request monitor becomes canceled as well.
* @see IViewerUpdate
*
* @since 1.0
*/
@SuppressWarnings("restriction")
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
* its own single-thread executor for communicating with providers and
* layout nodes.
*
* @since 1.0
*/
@ThreadSafe
@SuppressWarnings("restriction")
abstract public class AbstractVMAdapter implements IVMAdapterExtension
abstract public class AbstractVMAdapter implements IVMAdapter
{
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
* created by the view model on demand, so the equals methods must use the
* object being wrapped to perform a meaningful comparison.
*
* @since 1.0
*/
abstract public class AbstractVMContext implements IVMContext {
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.
* The main functionality implemented here is for building the view model
* deltas (IModelDelta), based on the flags returned by child nodes.
*
* @since 1.0
*/
@SuppressWarnings("restriction")
abstract public class AbstractVMNode implements IVMNode {

View file

@ -61,6 +61,8 @@ import org.eclipse.swt.widgets.Display;
* @see IAsynchronousLabelAdapter
* @see IModelProxy
* @see IVMNode
*
* @since 1.0
*/
@SuppressWarnings("restriction")
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
* for the constructor. The view model provider is used to access the correct
* executor and the node hierarchy.
*
* @since 1.0
*/
@ConfinedToDsfExecutor("#getExecutor()")
@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
* for the constructor. The view model provider is used to access the correct
* executor and the node hierarchy.
*
* @since 1.0
*/
@ConfinedToDsfExecutor("#getProvider()#getExecutor()")
@SuppressWarnings("restriction")
public class DefaultVMModelProxyStrategy implements IVMModelProxy, IVMModelProxyExtension {
public class DefaultVMModelProxyStrategy implements IVMModelProxy {
private final AbstractVMProvider fProvider;
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
* for a hierarchy. The root node of a layout hierarchy has to implement this
* interface.
*
* @since 1.0
*/
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
* the input object of the viewer, and this adapter implementation will then
* populate the view contents.
*
* @since 1.0
*/
@ThreadSafe
@SuppressWarnings("restriction")
@ -33,4 +35,14 @@ public interface IVMAdapter
* context. Returns <code>null</code> if there is none.
*/
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
* from some data model, which is then used to correctly implement the
* {@link #equals(Object)} and {@link #hashCode()} methods of this wrapper.
*
* @since 1.0
*/
@Immutable
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.debug.internal.ui.viewers.model.provisional.IModelDelta;
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
@ -21,6 +23,8 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxy;
* <br/>
* Note: The IVMModelProxy.init() may be called twice when installed, as a
* workaround for bug 241024.
*
* @since 1.0
*/
@SuppressWarnings("restriction")
public interface IVMModelProxy extends IModelProxy {
@ -46,4 +50,26 @@ public interface IVMModelProxy extends IModelProxy {
*/
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 IElementContentProvider
*
* @since 1.0
*/
@ConfinedToDsfExecutor("")
@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>,
* and <code>IVMAdapter</code> implementation is expected to switch to
* provider's thread before delegating the call to it.
*
* @since 1.0
*/
@ConfinedToDsfExecutor("#getExecutor()")
@SuppressWarnings("restriction")

View file

@ -16,6 +16,8 @@ import org.eclipse.jface.viewers.Viewer;
/**
* Event generated by an IModelProxy implementation when it is installed
* into a viewer.
*
* @since 1.0
*/
@SuppressWarnings("restriction")
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
* to implement model-specific event handling.
*
* @since 1.0
*/
@SuppressWarnings("restriction")
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.
*
* @see VMViewerUpdate
*
* @since 1.0
*/
@SuppressWarnings("restriction")
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.
*
* @see VMViewerUpdate
*
* @since 1.0
*/
@SuppressWarnings("restriction")
public class VMChildrenUpdate extends VMViewerUpdate implements IChildrenUpdate {

View file

@ -21,6 +21,8 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
* constructed.
*
* @see IModelDelta#getNodes()
*
* @since 1.0
*/
@SuppressWarnings("restriction")
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.
*
* @see VMViewerUpdate
*
* @since 1.0
*/
@SuppressWarnings("restriction")
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
* using a higher level update object or a set of parameters to fulfill the
* <code>IViewerUpdate</code> interface.
*
* @since 1.0
*/
@SuppressWarnings("restriction")
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.
*
* @since 1.0
*/
@ThreadSafe
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
* a single IDMContext associated with them, and all of these contexts
* are of the same class type.
*
* @since 1.0
*/
@SuppressWarnings("restriction")
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 IModelProxy
* @see IVMNode
*
* @since 1.0
*/
@ConfinedToDsfExecutor("fSession#getExecutor")
@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
* update. This object allows the view model to pass complete data model context
* information found in the view to the services.
*
* @since 1.0
*/
@SuppressWarnings("restriction")
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.
*
* @since 1.0
*/
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
* node also has to use the first element as the root object instead of the
* whole selection.
*
* @since 1.0
*/
public class RootDMVMNode extends RootVMNode
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
* an element or implemented directly
*
* @since 1.0
*/
public interface IElementPropertiesProvider {

View file

@ -12,6 +12,7 @@ package org.eclipse.cdt.dsf.ui.viewmodel.properties;
/**
*
* @since 1.0
*/
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.
*
* @since 1.0
*/
@SuppressWarnings("restriction")
public interface IPropertiesUpdate extends IViewerUpdate {

View file

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

View file

@ -22,6 +22,8 @@ import org.eclipse.swt.graphics.RGB;
* @see LabelAttribute
* @see LabelColumnInfo
* @see PropertyBasedLabelProvider
*
* @since 1.0
*/
@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.
*
* @see PropertyBasedLabelProvider
*
* @since 1.0
*/
@SuppressWarnings("restriction")
@ThreadSafe

View file

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

View file

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

View file

@ -27,6 +27,8 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate;
* @see LabelAttribute
* @see LabelColumnInfo
* @see PropertyBasedLabelProvider
*
* @since 1.0
*/
@SuppressWarnings("restriction")
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;
/**
* @noinstantiate This class is not intended to be instantiated by clients.
*/
class MessagesForProperties extends NLS {
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
* values are retrieved, they are processed in order to produce correct label text,
* images, fonts, and colors, for the given element.
*
* @since 1.0
*/
@SuppressWarnings("restriction")
@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.AbstractVMProvider;
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.VMChildrenCountUpdate;
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));
if (proxyStrategy instanceof IVMModelProxyExtension) {
IVMModelProxyExtension proxyStrategyExtension = (IVMModelProxyExtension)proxyStrategy;
CountingRequestMonitor multiRm = new CountingRequestMonitor(getExecutor(), rm);
super.handleEvent(proxyStrategy, event, multiRm);
int rmCount = 1;
if(fDelayEventHandleForViewUpdate) {
if(this.getActiveUpdateScope().getID().equals(AllUpdateScope.ALL_UPDATE_SCOPE_ID)) {
new MultiLevelUpdateHandler(getExecutor(), proxyStrategyExtension, getPresentationContext(), this, multiRm).
startUpdate();
rmCount++;
} else if (!proxyStrategy.isDisposed()) {
// block updating only the viewport
TreeViewer viewer = (TreeViewer) proxyStrategyExtension.getViewer();
Tree tree = viewer.getTree();
int count = tree.getSize().y / tree.getItemHeight();
TreeItem topItem = tree.getTopItem();
int index = computeTreeIndex(topItem);
MultiLevelUpdateHandler handler = new MultiLevelUpdateHandler(
getExecutor(), proxyStrategyExtension, getPresentationContext(), this, multiRm);
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);
CountingRequestMonitor multiRm = new CountingRequestMonitor(getExecutor(), rm);
super.handleEvent(proxyStrategy, event, multiRm);
int rmCount = 1;
if(fDelayEventHandleForViewUpdate) {
if(this.getActiveUpdateScope().getID().equals(AllUpdateScope.ALL_UPDATE_SCOPE_ID)) {
new MultiLevelUpdateHandler(getExecutor(), proxyStrategy, getPresentationContext(), this, multiRm).
startUpdate();
rmCount++;
} else if (!proxyStrategy.isDisposed()) {
// block updating only the viewport
TreeViewer viewer = (TreeViewer) proxyStrategy.getViewer();
Tree tree = viewer.getTree();
int count = tree.getSize().y / tree.getItemHeight();
TreeItem topItem = tree.getTopItem();
int index = computeTreeIndex(topItem);
MultiLevelUpdateHandler handler = new MultiLevelUpdateHandler(
getExecutor(), proxyStrategy, getPresentationContext(), this, multiRm);
handler.setRange(index, index + count);
handler.startUpdate();
rmCount++;
}
} 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) {

View file

@ -16,6 +16,8 @@ import org.eclipse.jface.viewers.TreePath;
* 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
* model.
*
* @since 1.0
*/
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
* nodes. The methods in this interface allow clients to configure how the
* cache should be updated in response to different events.
*
* @since 1.0
*/
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.
*
* @see IVMUpdatePolicy
*
* @since 1.0
*/
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
* to create an element tester for each given event. The element tester
* is then used to update the viewer cache.
*
* @since 1.0
*/
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
* flushed only as a result of an explicit user action.
*
* @since 1.0
*/
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.DsfRunnable;
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.VMHasChildrenUpdate;
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.RGB;
/**
* @since 1.0
*/
@SuppressWarnings("restriction")
class MultiLevelUpdateHandler extends DataRequestMonitor<List<Object>> {
@ -123,7 +126,7 @@ class MultiLevelUpdateHandler extends DataRequestMonitor<List<Object>> {
private int fPendingUpdates;
public MultiLevelUpdateHandler(Executor executor,
IVMModelProxyExtension modelProxy,
IVMModelProxy modelProxy,
IPresentationContext presentationContext,
IElementContentProvider contentProvider,
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
* viewer should still update at least the value that the user editor. This event
* is used to accomplish that behavior.
*
* @since 1.0
*/
public class UserEditEvent {
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
* be flushed whenever an event causes a delta to be generated in the given
* model.
*
* @since 1.1
*/
public class VisibleUpdateScope implements IVMUpdateScope {

View file

@ -13,7 +13,7 @@ Require-Bundle: org.eclipse.core.runtime,
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.cdt.dsf.concurrent,
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.service,
org.eclipse.cdt.dsf.debug.service.command,

View file

@ -27,7 +27,9 @@ import java.lang.annotation.Target;
* and validation code.
*
* @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)
@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);
* </pre></code>
*
* @since 1.0
*/
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.
*
* @param V The type of the data object that this monitor handles.
*
* @since 1.0
*/
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
* standard java.util.concurrent.ThreadPoolExecutor.
*
* @since 1.0
*/
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
* contains fields and methods that used for debugging and tracing when
* tracing is enabled.
*
* @since 1.0
*/
@Immutable
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
* to be exclusive to the executor, it could be shared with
* another event dispatch service, such as the SWT display dispatch thread.
*
* @since 1.0
*/
@ThreadSafe
public interface DsfExecutor extends ScheduledExecutorService

View file

@ -10,9 +10,12 @@
*******************************************************************************/
package org.eclipse.cdt.dsf.concurrent;
/**
* Interface that hold the codes used when reporting status using the DSF
* Request Monitor.
*
* @since 1.0
*/
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>
* objects, but which do not have their own executor.
* @see RequestMonitor
*
* @since 1.0
*/
public class ImmediateExecutor implements Executor {

View file

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

View file

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

View file

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

View file

@ -69,6 +69,8 @@ import org.eclipse.core.runtime.Status;
* }
* </pre>
* </p>
*
* @since 1.0
*/
@ThreadSafe
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
* has to be re-implemented every time. The Sequence class tries to address
* this problem by containing this pattern in a single class.
*
* @since 1.0
*/
@ThreadSafe
abstract public class Sequence extends DsfRunnable implements Future<Object> {

View file

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

View file

@ -25,6 +25,8 @@ import java.lang.annotation.Target;
* <p>
* Note: the runtime retention policy is there to allow automated testing
* and validation code.
*
* @since 1.0
*/
@Retention(RetentionPolicy.RUNTIME)
@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.
* It should be null if it cannot be determined from the given object.
*
* @since 1.0
*/
@Retention(RetentionPolicy.RUNTIME)
@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.
* </p>
* @param <V> Data Model data type that this context is for.
*
* @since 1.0
*/
@Immutable
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
* required DM-Context reference.
*
* @since 1.0
*/
@Immutable
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