mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
[266588] - Removed deprecated methods.
This commit is contained in:
parent
4387402833
commit
f340cd5908
7 changed files with 4 additions and 136 deletions
|
@ -23,7 +23,6 @@ import org.eclipse.cdt.dsf.datamodel.IDMEvent;
|
||||||
import org.eclipse.cdt.dsf.internal.ui.DsfUIPlugin;
|
import org.eclipse.cdt.dsf.internal.ui.DsfUIPlugin;
|
||||||
import org.eclipse.cdt.dsf.service.DsfServicesTracker;
|
import org.eclipse.cdt.dsf.service.DsfServicesTracker;
|
||||||
import org.eclipse.cdt.dsf.service.DsfSession;
|
import org.eclipse.cdt.dsf.service.DsfSession;
|
||||||
import org.eclipse.cdt.dsf.service.IDsfService;
|
|
||||||
import org.eclipse.cdt.dsf.ui.viewmodel.AbstractVMContext;
|
import org.eclipse.cdt.dsf.ui.viewmodel.AbstractVMContext;
|
||||||
import org.eclipse.cdt.dsf.ui.viewmodel.AbstractVMNode;
|
import org.eclipse.cdt.dsf.ui.viewmodel.AbstractVMNode;
|
||||||
import org.eclipse.cdt.dsf.ui.viewmodel.IVMContext;
|
import org.eclipse.cdt.dsf.ui.viewmodel.IVMContext;
|
||||||
|
@ -178,73 +177,6 @@ abstract public class AbstractDMVMNode extends AbstractVMNode implements IVMNode
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Convenience method that checks whether the given dmc context is null. If it is null, an
|
|
||||||
* appropriate error message is set in the update.
|
|
||||||
* @param dmc Data Model Context (DMC) to check.
|
|
||||||
* @param update Update to handle in case the DMC is null.
|
|
||||||
* @return true if the DMC is NOT null, indicating that it's OK to proceed.
|
|
||||||
*
|
|
||||||
* This method has been deprecated. Users should simply perform this functionality in-line
|
|
||||||
*
|
|
||||||
* Example :
|
|
||||||
*
|
|
||||||
* IExampleDmc dmc = final TimerDMContext dmc = findDmcInPath(...)
|
|
||||||
* if ( dmc == null ) {
|
|
||||||
* handleFailedUpdate(update);
|
|
||||||
* //
|
|
||||||
* // Perform whatever cleanup or completion is needed because of a lack of
|
|
||||||
* // a valid data model context.
|
|
||||||
* //
|
|
||||||
* ........
|
|
||||||
* return;
|
|
||||||
* }
|
|
||||||
*/
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
protected boolean checkDmc(IDMContext dmc, IViewerUpdate update) {
|
|
||||||
if (dmc == null) {
|
|
||||||
update.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_STATE,
|
|
||||||
"No valid context found.", null)); //$NON-NLS-1$
|
|
||||||
handleFailedUpdate(update);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A convenience method that checks whether a given service exists. If the service does not
|
|
||||||
* exist, the update is filled in with the appropriate error message.
|
|
||||||
* @param serviceClass Service class to find.
|
|
||||||
* @param filter Service filter to use in addition to the service class name.
|
|
||||||
* @param update Update object to fill in.
|
|
||||||
* @return true if service IS found, indicating that it's OK to proceed.
|
|
||||||
*
|
|
||||||
* This method has been deprecated. Users should simply perform this functionality in-line
|
|
||||||
*
|
|
||||||
* Example :
|
|
||||||
*
|
|
||||||
* IExampleService service = getServicesTracker().getService(IExampleService.class,null);
|
|
||||||
* if ( service == null ) {
|
|
||||||
* handleFailedUpdate(update);
|
|
||||||
* //
|
|
||||||
* // Perform whatever cleanup or completion is needed because of a lack of the service.
|
|
||||||
* //
|
|
||||||
* ........
|
|
||||||
* return;
|
|
||||||
* }
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
protected boolean checkService(Class<? extends IDsfService> serviceClass, String filter, IViewerUpdate update) {
|
|
||||||
if (getServicesTracker().getService(serviceClass, filter) == null) {
|
|
||||||
update.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_STATE,
|
|
||||||
"Service " + serviceClass.getName() + " not available.", null)); //$NON-NLS-1$ //$NON-NLS-2$
|
|
||||||
handleFailedUpdate(update);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void update(final IHasChildrenUpdate[] updates) {
|
public void update(final IHasChildrenUpdate[] updates) {
|
||||||
try {
|
try {
|
||||||
getSession().getExecutor().execute(new DsfRunnable() {
|
getSession().getExecutor().execute(new DsfRunnable() {
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
package org.eclipse.cdt.dsf.ui.viewmodel.datamodel;
|
package org.eclipse.cdt.dsf.ui.viewmodel.datamodel;
|
||||||
|
|
||||||
import org.eclipse.cdt.dsf.concurrent.ConfinedToDsfExecutor;
|
import org.eclipse.cdt.dsf.concurrent.ConfinedToDsfExecutor;
|
||||||
import org.eclipse.cdt.dsf.datamodel.IDMEvent;
|
|
||||||
import org.eclipse.cdt.dsf.service.DsfServiceEventHandler;
|
|
||||||
import org.eclipse.cdt.dsf.service.DsfSession;
|
import org.eclipse.cdt.dsf.service.DsfSession;
|
||||||
import org.eclipse.cdt.dsf.ui.viewmodel.AbstractVMAdapter;
|
import org.eclipse.cdt.dsf.ui.viewmodel.AbstractVMAdapter;
|
||||||
import org.eclipse.cdt.dsf.ui.viewmodel.IVMNode;
|
import org.eclipse.cdt.dsf.ui.viewmodel.IVMNode;
|
||||||
|
@ -56,13 +54,4 @@ abstract public class AbstractDMVMProvider extends AbstractCachingVMProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
public DsfSession getSession() { return fSession; }
|
public DsfSession getSession() { return fSession; }
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated Kept for API compatibility reasons.
|
|
||||||
* Events are now received and dispatched by the VM adapter.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
@DsfServiceEventHandler
|
|
||||||
public void eventDispatched(final IDMEvent<?> event) {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,17 +57,6 @@ abstract public class Query<V> extends DsfRunnable
|
||||||
/** The synchronization object for this query */
|
/** The synchronization object for this query */
|
||||||
private final Sync fSync = new Sync();
|
private final Sync fSync = new Sync();
|
||||||
|
|
||||||
/**
|
|
||||||
* The Query constructor no longer requires an executor to be specified.
|
|
||||||
* This executor was used to contruct the DataRequestMonitor argument to the
|
|
||||||
* {@link #execute(DataRequestMonitor)} method. But a simplification in the
|
|
||||||
* RequestMonitor object, made this unnecessary.
|
|
||||||
* @param executor
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public Query(DsfExecutor executor) {
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The no-argument constructor
|
* The no-argument constructor
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -240,6 +240,9 @@ abstract public class Sequence extends DsfRunnable implements Future<Object> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor that initialized the steps and the result callback.
|
* Constructor that initialized the steps and the result callback.
|
||||||
|
* <p>Note: This constructor should not be used because it creates a
|
||||||
|
* potential ambiguity when one of the two monitors is canceled.</p>
|
||||||
|
*
|
||||||
* @param executor The DSF executor which will be used to invoke all
|
* @param executor The DSF executor which will be used to invoke all
|
||||||
* steps.
|
* steps.
|
||||||
* @param pm Progress monitor for monitoring this sequence. This
|
* @param pm Progress monitor for monitoring this sequence. This
|
||||||
|
@ -253,12 +256,8 @@ abstract public class Sequence extends DsfRunnable implements Future<Object> {
|
||||||
* @param Result that will be submitted to executor when sequence is
|
* @param Result that will be submitted to executor when sequence is
|
||||||
* finished. Can be null if calling from non-executor thread and using
|
* finished. Can be null if calling from non-executor thread and using
|
||||||
* {@link Future#get()} method to wait for the sequence result.
|
* {@link Future#get()} method to wait for the sequence result.
|
||||||
*
|
|
||||||
* @deprecated This constructor should not be used because it creates a
|
|
||||||
* potential ambiguity when one of the two monitors is canceled.
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
private Sequence(DsfExecutor executor, IProgressMonitor pm, String taskName, String rollbackTaskName, RequestMonitor rm) {
|
||||||
public Sequence(DsfExecutor executor, IProgressMonitor pm, String taskName, String rollbackTaskName, RequestMonitor rm) {
|
|
||||||
fExecutor = executor;
|
fExecutor = executor;
|
||||||
fProgressMonitor = pm;
|
fProgressMonitor = pm;
|
||||||
fTaskName = taskName;
|
fTaskName = taskName;
|
||||||
|
|
|
@ -510,18 +510,6 @@ public class PDAExpressions extends AbstractDsfService implements ICachingServic
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
@Deprecated
|
|
||||||
public void getModelData(IDMContext dmc, DataRequestMonitor<?> rm) {
|
|
||||||
if (dmc instanceof IExpressionDMContext) {
|
|
||||||
getExpressionData((IExpressionDMContext) dmc, (DataRequestMonitor<IExpressionDMData>) rm);
|
|
||||||
} else if (dmc instanceof FormattedValueDMContext) {
|
|
||||||
getFormattedExpressionValue((FormattedValueDMContext) dmc, (DataRequestMonitor<FormattedValueDMData>) rm);
|
|
||||||
} else {
|
|
||||||
PDAPlugin.failRequest(rm, INVALID_HANDLE, "Unknown DMC type");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@DsfServiceEventHandler
|
@DsfServiceEventHandler
|
||||||
public void eventDispatched(IResumedDMEvent e) {
|
public void eventDispatched(IResumedDMEvent e) {
|
||||||
// Mark the cache as not available, so that data retrieval commands
|
// Mark the cache as not available, so that data retrieval commands
|
||||||
|
|
|
@ -22,7 +22,6 @@ import org.eclipse.cdt.dsf.concurrent.IDsfStatusConstants;
|
||||||
import org.eclipse.cdt.dsf.concurrent.Immutable;
|
import org.eclipse.cdt.dsf.concurrent.Immutable;
|
||||||
import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
|
import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
|
||||||
import org.eclipse.cdt.dsf.datamodel.AbstractDMEvent;
|
import org.eclipse.cdt.dsf.datamodel.AbstractDMEvent;
|
||||||
import org.eclipse.cdt.dsf.datamodel.IDMContext;
|
|
||||||
import org.eclipse.cdt.dsf.datamodel.IDMEvent;
|
import org.eclipse.cdt.dsf.datamodel.IDMEvent;
|
||||||
import org.eclipse.cdt.dsf.debug.service.IRunControl;
|
import org.eclipse.cdt.dsf.debug.service.IRunControl;
|
||||||
import org.eclipse.cdt.dsf.debug.service.command.IEventListener;
|
import org.eclipse.cdt.dsf.debug.service.command.IEventListener;
|
||||||
|
@ -285,19 +284,6 @@ public class PDARunControl extends AbstractDsfService
|
||||||
super.shutdown(rm);
|
super.shutdown(rm);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
public void getModelData(IDMContext dmc, DataRequestMonitor<?> rm) {
|
|
||||||
// The getModelData() is deprecated and clients are expected to switch
|
|
||||||
// to getExecutionData() and other data retrieve methods directly.
|
|
||||||
// However the UI cache still uses it for now.
|
|
||||||
if (dmc instanceof IExecutionDMContext) {
|
|
||||||
getExecutionData((IExecutionDMContext)dmc, (DataRequestMonitor<IExecutionDMData>)rm);
|
|
||||||
} else {
|
|
||||||
PDAPlugin.failRequest(rm, INVALID_HANDLE, "Unknown DMC type");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void eventReceived(Object output) {
|
public void eventReceived(Object output) {
|
||||||
if (!(output instanceof String)) return;
|
if (!(output instanceof String)) return;
|
||||||
String event = (String)output;
|
String event = (String)output;
|
||||||
|
|
|
@ -434,21 +434,6 @@ public class PDAStack extends AbstractDsfService implements IStack, ICachingServ
|
||||||
IExecutionDMContext execCtx = DMContexts.getAncestorOfType(context, IExecutionDMContext.class);
|
IExecutionDMContext execCtx = DMContexts.getAncestorOfType(context, IExecutionDMContext.class);
|
||||||
return execCtx != null && (fRunControl.isSuspended(execCtx) || (fRunControl.isStepping(execCtx)));
|
return execCtx != null && (fRunControl.isSuspended(execCtx) || (fRunControl.isStepping(execCtx)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
@Deprecated
|
|
||||||
public void getModelData(IDMContext dmc, DataRequestMonitor<?> rm) {
|
|
||||||
// The getModelData() is deprecated and clients are expected to switch
|
|
||||||
// to getExecutionData() and other data retrieve methods directly.
|
|
||||||
// However the UI cache still uses it for now.
|
|
||||||
if (dmc instanceof IFrameDMContext) {
|
|
||||||
getFrameData((IFrameDMContext)dmc, (DataRequestMonitor<IFrameDMData>)rm);
|
|
||||||
} else if (dmc instanceof IVariableDMContext) {
|
|
||||||
getVariableData((IVariableDMContext)dmc, (DataRequestMonitor<IVariableDMData>)rm);
|
|
||||||
} else {
|
|
||||||
PDAPlugin.failRequest(rm, IDsfStatusConstants.INVALID_HANDLE, "Unknown context type");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a frame context for the given thread and level;
|
* Returns a frame context for the given thread and level;
|
||||||
|
|
Loading…
Add table
Reference in a new issue