mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-26 02:15:31 +02:00
Bug 440387 - Allow to easily extend ServicesLaunchSequence
Change-Id: Ife35c51415fc9a5a07a5327a2eed3e564b3429c8 Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com> Reviewed-on: https://git.eclipse.org/r/30459 Tested-by: Hudson CI Reviewed-by: Mikhail Khodjaiants <mikhailkhod@googlemail.com>
This commit is contained in:
parent
2986eab315
commit
22b4459a37
1 changed files with 15 additions and 2 deletions
|
@ -26,6 +26,7 @@ import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
|
||||||
import org.eclipse.cdt.dsf.concurrent.ImmediateExecutor;
|
import org.eclipse.cdt.dsf.concurrent.ImmediateExecutor;
|
||||||
import org.eclipse.cdt.dsf.concurrent.Query;
|
import org.eclipse.cdt.dsf.concurrent.Query;
|
||||||
import org.eclipse.cdt.dsf.concurrent.RequestMonitorWithProgress;
|
import org.eclipse.cdt.dsf.concurrent.RequestMonitorWithProgress;
|
||||||
|
import org.eclipse.cdt.dsf.concurrent.Sequence;
|
||||||
import org.eclipse.cdt.dsf.concurrent.ThreadSafe;
|
import org.eclipse.cdt.dsf.concurrent.ThreadSafe;
|
||||||
import org.eclipse.cdt.dsf.debug.service.IDsfDebugServicesFactory;
|
import org.eclipse.cdt.dsf.debug.service.IDsfDebugServicesFactory;
|
||||||
import org.eclipse.cdt.dsf.debug.sourcelookup.DsfSourceLookupDirector;
|
import org.eclipse.cdt.dsf.debug.sourcelookup.DsfSourceLookupDirector;
|
||||||
|
@ -168,8 +169,7 @@ public class GdbLaunchDelegate extends AbstractCLaunchDelegate2
|
||||||
|
|
||||||
// Create and invoke the launch sequence to create the debug control and services
|
// Create and invoke the launch sequence to create the debug control and services
|
||||||
IProgressMonitor subMon1 = new SubProgressMonitor(monitor, 4, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK);
|
IProgressMonitor subMon1 = new SubProgressMonitor(monitor, 4, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK);
|
||||||
final ServicesLaunchSequence servicesLaunchSequence =
|
Sequence servicesLaunchSequence = getServicesSequence(launch.getSession(), launch, subMon1);
|
||||||
new ServicesLaunchSequence(launch.getSession(), launch, subMon1);
|
|
||||||
|
|
||||||
launch.getSession().getExecutor().execute(servicesLaunchSequence);
|
launch.getSession().getExecutor().execute(servicesLaunchSequence);
|
||||||
boolean succeed = false;
|
boolean succeed = false;
|
||||||
|
@ -399,6 +399,19 @@ public class GdbLaunchDelegate extends AbstractCLaunchDelegate2
|
||||||
return new GdbLaunch(configuration, mode, locator);
|
return new GdbLaunch(configuration, mode, locator);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a sequence that will create and initialize the different DSF services.
|
||||||
|
* Subclasses that wish to add/remove services can override this method.
|
||||||
|
*
|
||||||
|
* @param session The current DSF session
|
||||||
|
* @param launch The current launch
|
||||||
|
* @param rm The progress monitor that is to be used to cancel the sequence if so desired.
|
||||||
|
* @since 4.5
|
||||||
|
*/
|
||||||
|
protected Sequence getServicesSequence(DsfSession session, ILaunch launch, IProgressMonitor rm) {
|
||||||
|
return new ServicesLaunchSequence(session, (GdbLaunch)launch, rm);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and initializes the source locator for the given launch configuration and dsf session.
|
* Creates and initializes the source locator for the given launch configuration and dsf session.
|
||||||
* @since 4.1
|
* @since 4.1
|
||||||
|
|
Loading…
Add table
Reference in a new issue