mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
[224466] Renamed SourceDisplayAdapter to DsfSourceDisplayAdapter, and DsfMISourceLookupParticipant to DsfSourceLookupParticipant.
This commit is contained in:
parent
7018e1238b
commit
549cdbd6fd
4 changed files with 14 additions and 13 deletions
|
@ -36,7 +36,7 @@ import org.eclipse.dd.dsf.debug.service.StepQueueManager;
|
||||||
import org.eclipse.dd.dsf.debug.service.IRunControl.StateChangeReason;
|
import org.eclipse.dd.dsf.debug.service.IRunControl.StateChangeReason;
|
||||||
import org.eclipse.dd.dsf.debug.service.IStack.IFrameDMContext;
|
import org.eclipse.dd.dsf.debug.service.IStack.IFrameDMContext;
|
||||||
import org.eclipse.dd.dsf.debug.service.IStack.IFrameDMData;
|
import org.eclipse.dd.dsf.debug.service.IStack.IFrameDMData;
|
||||||
import org.eclipse.dd.dsf.debug.sourcelookup.DsfMISourceLookupParticipant;
|
import org.eclipse.dd.dsf.debug.sourcelookup.DsfSourceLookupParticipant;
|
||||||
import org.eclipse.dd.dsf.service.DsfServiceEventHandler;
|
import org.eclipse.dd.dsf.service.DsfServiceEventHandler;
|
||||||
import org.eclipse.dd.dsf.service.DsfServicesTracker;
|
import org.eclipse.dd.dsf.service.DsfServicesTracker;
|
||||||
import org.eclipse.dd.dsf.service.DsfSession;
|
import org.eclipse.dd.dsf.service.DsfSession;
|
||||||
|
@ -81,7 +81,7 @@ import org.eclipse.ui.texteditor.ITextEditor;
|
||||||
* 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.
|
||||||
*/
|
*/
|
||||||
@ThreadSafe
|
@ThreadSafe
|
||||||
public class SourceDisplayAdapter implements ISourceDisplay
|
public class DsfSourceDisplayAdapter implements ISourceDisplay
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* A job to perform source lookup on the given DMC.
|
* A job to perform source lookup on the given DMC.
|
||||||
|
@ -389,7 +389,7 @@ public class SourceDisplayAdapter implements ISourceDisplay
|
||||||
private IDMContext fPrevModelContext;
|
private IDMContext fPrevModelContext;
|
||||||
private SourceLookupResult fPrevResult;
|
private SourceLookupResult fPrevResult;
|
||||||
private ISourceLookupDirector fSourceLookup;
|
private ISourceLookupDirector fSourceLookup;
|
||||||
private DsfMISourceLookupParticipant fSourceLookupParticipant;
|
private DsfSourceLookupParticipant fSourceLookupParticipant;
|
||||||
private InstructionPointerManager fIPManager;
|
private InstructionPointerManager fIPManager;
|
||||||
|
|
||||||
private LookupJob fRunningLookupJob;
|
private LookupJob fRunningLookupJob;
|
||||||
|
@ -398,12 +398,12 @@ public class SourceDisplayAdapter implements ISourceDisplay
|
||||||
private ClearingJob fRunningClearingJob;
|
private ClearingJob fRunningClearingJob;
|
||||||
private List<IRunControl.IExecutionDMContext> fPendingExecDmcsToClear = new LinkedList<IRunControl.IExecutionDMContext>();
|
private List<IRunControl.IExecutionDMContext> fPendingExecDmcsToClear = new LinkedList<IRunControl.IExecutionDMContext>();
|
||||||
|
|
||||||
public SourceDisplayAdapter(DsfSession session, ISourceLookupDirector sourceLocator) {
|
public DsfSourceDisplayAdapter(DsfSession session, ISourceLookupDirector sourceLocator) {
|
||||||
fSession = session;
|
fSession = session;
|
||||||
fExecutor = session.getExecutor();
|
fExecutor = session.getExecutor();
|
||||||
fServicesTracker = new DsfServicesTracker(DsfDebugUIPlugin.getBundleContext(), session.getId());
|
fServicesTracker = new DsfServicesTracker(DsfDebugUIPlugin.getBundleContext(), session.getId());
|
||||||
fSourceLookup = sourceLocator;
|
fSourceLookup = sourceLocator;
|
||||||
fSourceLookupParticipant = new DsfMISourceLookupParticipant(session);
|
fSourceLookupParticipant = new DsfSourceLookupParticipant(session);
|
||||||
fSourceLookup.addParticipants(new ISourceLookupParticipant[] {fSourceLookupParticipant} );
|
fSourceLookup.addParticipants(new ISourceLookupParticipant[] {fSourceLookupParticipant} );
|
||||||
|
|
||||||
fIPManager = new InstructionPointerManager();
|
fIPManager = new InstructionPointerManager();
|
|
@ -41,9 +41,10 @@ import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector;
|
||||||
import org.eclipse.debug.core.sourcelookup.ISourceLookupParticipant;
|
import org.eclipse.debug.core.sourcelookup.ISourceLookupParticipant;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Source lookup participant that should be used with DSF-based debuggers.
|
||||||
*/
|
*/
|
||||||
@ThreadSafe
|
@ThreadSafe
|
||||||
public class DsfMISourceLookupParticipant implements ISourceLookupParticipant {
|
public class DsfSourceLookupParticipant implements ISourceLookupParticipant {
|
||||||
protected static final Object[] EMPTY = new Object[0];
|
protected static final Object[] EMPTY = new Object[0];
|
||||||
|
|
||||||
private DsfExecutor fExecutor;
|
private DsfExecutor fExecutor;
|
||||||
|
@ -52,7 +53,7 @@ public class DsfMISourceLookupParticipant implements ISourceLookupParticipant {
|
||||||
private ISourceLookupDirector fDirector;
|
private ISourceLookupDirector fDirector;
|
||||||
private Map<String, List<Object>> fLookupCache = Collections.synchronizedMap(new HashMap<String, List<Object>>());
|
private Map<String, List<Object>> fLookupCache = Collections.synchronizedMap(new HashMap<String, List<Object>>());
|
||||||
|
|
||||||
public DsfMISourceLookupParticipant(DsfSession session) {
|
public DsfSourceLookupParticipant(DsfSession session) {
|
||||||
fSessionId = session.getId();
|
fSessionId = session.getId();
|
||||||
fExecutor = session.getExecutor();
|
fExecutor = session.getExecutor();
|
||||||
fServicesTracker = new DsfServicesTracker(DsfDebugPlugin.getBundleContext(), fSessionId);
|
fServicesTracker = new DsfServicesTracker(DsfDebugPlugin.getBundleContext(), fSessionId);
|
|
@ -22,7 +22,7 @@ import org.eclipse.dd.dsf.debug.ui.actions.DsfStepIntoCommand;
|
||||||
import org.eclipse.dd.dsf.debug.ui.actions.DsfStepOverCommand;
|
import org.eclipse.dd.dsf.debug.ui.actions.DsfStepOverCommand;
|
||||||
import org.eclipse.dd.dsf.debug.ui.actions.DsfStepReturnCommand;
|
import org.eclipse.dd.dsf.debug.ui.actions.DsfStepReturnCommand;
|
||||||
import org.eclipse.dd.dsf.debug.ui.actions.DsfSuspendCommand;
|
import org.eclipse.dd.dsf.debug.ui.actions.DsfSuspendCommand;
|
||||||
import org.eclipse.dd.dsf.debug.ui.sourcelookup.SourceDisplayAdapter;
|
import org.eclipse.dd.dsf.debug.ui.sourcelookup.DsfSourceDisplayAdapter;
|
||||||
import org.eclipse.dd.dsf.service.DsfSession;
|
import org.eclipse.dd.dsf.service.DsfSession;
|
||||||
import org.eclipse.dd.examples.pda.PDAPlugin;
|
import org.eclipse.dd.examples.pda.PDAPlugin;
|
||||||
import org.eclipse.dd.examples.pda.launch.PDALaunch;
|
import org.eclipse.dd.examples.pda.launch.PDALaunch;
|
||||||
|
@ -68,7 +68,7 @@ public class PDAAdapterFactory implements IAdapterFactory, ILaunchesListener2
|
||||||
final PDAVMAdapter fViewModelAdapter;
|
final PDAVMAdapter fViewModelAdapter;
|
||||||
|
|
||||||
// Source lookup and positioning adapter
|
// Source lookup and positioning adapter
|
||||||
final SourceDisplayAdapter fSourceDisplayAdapter;
|
final DsfSourceDisplayAdapter fSourceDisplayAdapter;
|
||||||
|
|
||||||
// Command adapters
|
// Command adapters
|
||||||
final DsfStepIntoCommand fStepIntoCommand;
|
final DsfStepIntoCommand fStepIntoCommand;
|
||||||
|
@ -91,7 +91,7 @@ public class PDAAdapterFactory implements IAdapterFactory, ILaunchesListener2
|
||||||
fViewModelAdapter = new PDAVMAdapter(session);
|
fViewModelAdapter = new PDAVMAdapter(session);
|
||||||
|
|
||||||
// Initialize source lookup
|
// Initialize source lookup
|
||||||
fSourceDisplayAdapter = new SourceDisplayAdapter(session, (ISourceLookupDirector)launch.getSourceLocator());
|
fSourceDisplayAdapter = new DsfSourceDisplayAdapter(session, (ISourceLookupDirector)launch.getSourceLocator());
|
||||||
session.registerModelAdapter(ISourceDisplay.class, fSourceDisplayAdapter);
|
session.registerModelAdapter(ISourceDisplay.class, fSourceDisplayAdapter);
|
||||||
|
|
||||||
// Initialize retargetable command handler.
|
// Initialize retargetable command handler.
|
||||||
|
|
|
@ -23,7 +23,7 @@ import org.eclipse.dd.dsf.debug.ui.actions.DsfStepOverCommand;
|
||||||
import org.eclipse.dd.dsf.debug.ui.actions.DsfStepReturnCommand;
|
import org.eclipse.dd.dsf.debug.ui.actions.DsfStepReturnCommand;
|
||||||
import org.eclipse.dd.dsf.debug.ui.actions.DsfSuspendCommand;
|
import org.eclipse.dd.dsf.debug.ui.actions.DsfSuspendCommand;
|
||||||
import org.eclipse.dd.dsf.debug.ui.contexts.DsfSuspendTrigger;
|
import org.eclipse.dd.dsf.debug.ui.contexts.DsfSuspendTrigger;
|
||||||
import org.eclipse.dd.dsf.debug.ui.sourcelookup.SourceDisplayAdapter;
|
import org.eclipse.dd.dsf.debug.ui.sourcelookup.DsfSourceDisplayAdapter;
|
||||||
import org.eclipse.dd.dsf.service.DsfSession;
|
import org.eclipse.dd.dsf.service.DsfSession;
|
||||||
import org.eclipse.dd.gdb.internal.ui.actions.DsfTerminateCommand;
|
import org.eclipse.dd.gdb.internal.ui.actions.DsfTerminateCommand;
|
||||||
import org.eclipse.dd.gdb.internal.ui.viewmodel.GdbViewModelAdapter;
|
import org.eclipse.dd.gdb.internal.ui.viewmodel.GdbViewModelAdapter;
|
||||||
|
@ -61,7 +61,7 @@ public class GdbAdapterFactory
|
||||||
class SessionAdapterSet {
|
class SessionAdapterSet {
|
||||||
final GdbLaunch fLaunch;
|
final GdbLaunch fLaunch;
|
||||||
final GdbViewModelAdapter fViewModelAdapter;
|
final GdbViewModelAdapter fViewModelAdapter;
|
||||||
final SourceDisplayAdapter fSourceDisplayAdapter;
|
final DsfSourceDisplayAdapter fSourceDisplayAdapter;
|
||||||
final DsfStepIntoCommand fStepIntoCommand;
|
final DsfStepIntoCommand fStepIntoCommand;
|
||||||
final DsfStepOverCommand fStepOverCommand;
|
final DsfStepOverCommand fStepOverCommand;
|
||||||
final DsfStepReturnCommand fStepReturnCommand;
|
final DsfStepReturnCommand fStepReturnCommand;
|
||||||
|
@ -78,7 +78,7 @@ public class GdbAdapterFactory
|
||||||
fViewModelAdapter = new GdbViewModelAdapter(session);
|
fViewModelAdapter = new GdbViewModelAdapter(session);
|
||||||
|
|
||||||
if (launch.getSourceLocator() instanceof ISourceLookupDirector) {
|
if (launch.getSourceLocator() instanceof ISourceLookupDirector) {
|
||||||
fSourceDisplayAdapter = new SourceDisplayAdapter(session, (ISourceLookupDirector)launch.getSourceLocator());
|
fSourceDisplayAdapter = new DsfSourceDisplayAdapter(session, (ISourceLookupDirector)launch.getSourceLocator());
|
||||||
} else {
|
} else {
|
||||||
fSourceDisplayAdapter = null;
|
fSourceDisplayAdapter = null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue