[DSF-GDB] Extend FinalLaunchSequence Redo stepInitializeFinalLaunchSequence [message #1784486] |
Wed, 28 March 2018 15:20 |
Vincent Richaud Messages: 7 Registered: February 2018 |
Junior Member |
|
|
Hi everyone,
In the FinalLaunchSequence class, the first step (stepInitializeFinalLaunchSequence) is used to obtain the following objects : fCommandControl, fGDBBackend, fProcService, fCommandFactory, fTracker.
These objects are mandatory for the next step to execute correctly.
I'm making a custom launch sequence (CustomFinalLaunchSequence). This sequence extends FinalLauchSequence because I don't want to rewrite steps that are already define in FinalLaunchSequence.
But I also define new steps in my CustomFinalLaunchSequence. These new steps will need the same objects (fCommandControl, fGDBBackend, fProcService, fCommandFactory, fTracker).
My point is these objects are private fields inside FinalLaunchSequence, so I can't access them. What is the point of making them private ? Why not make them protected so it's easier to extend FinalLaunchSequence ?
Currently I have rewrite stepInitializeFinalLaunchSequence inside my CustomeFinalLaunchSequence. This step does exactly the same as inside FinalLaunchSequence so I obtain reference to the wanted objects. Then at the end of the step i call super.stepInitializeFinalLaunchSequence() so the super class also have he reference to these object. But I found it dirty.
PS : Actually I'm extending FinalLaunchSequence_7_7 but this does not change the problem
|
|
|
Powered by
FUDForum. Page generated in 0.02848 seconds