Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] FinalLaunchSequence has dramatically changed...

Thanks for the help - I need to understand the thing first. There aren't even any (useful) comments in the source..
--
Subs




On 6 Jul 2011, at 02:28, Alena Laskavaia wrote:

> Year you are right, adding features more fun. Feel free to contribute
> to docs if you need them. Open source you know.
> 
> On Tue, Jul 5, 2011 at 2:43 AM, Derek Morris <dmsubs@xxxxxxxxxxxxx> wrote:
>> Andy,
>> 
>> Thanks for you observations, which are very helpful.
>> 
>> General Comment:
>> <rant>
>> It seems that what little documentation there is ifor DSF, s hugely out of date and very misleading. Why isn't accurate docs part of the CDT release process? Surely, no docs should make the API provisional at best. It seems that CDT team spends their time adding cool new features, but doesn't spend any time on documenting how to use it....
>> </rant>
>> 
>> --
>> Subs
>> 
>> 
>> 
>> 
>> On 4 Jul 2011, at 16:30, Andy Jin wrote:
>> 
>>> I understand your pain because I just went through the same changes. But
>>> overall they are good changes and worth the efforts.
>>> 
>>> Here are some items I noted when migrating to CDT8. Hope they help.
>>> 
>>> 1) No more copy and paste. In CDT7 the "FinalLaunchSequence" was a giant
>>> "Steps()" array with almost everything you need to get debug working. If
>>> you need to customize just one step in the array you have to basically
>>> copy all other steps and create your own FinalLaunchSequence. In CDT8
>>> the "FinalLaunchSequence" is refactored to contains public methods, one
>>> method reflecting one debug step. If you want to customize it you just
>>> need to extend from it and override the step(s) you need. IMHO this is a
>>> very good refactoring well done. See this bug for details
>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=321084
>>> 
>>> 2) You have full control of what steps to be involved and their
>>> sequences. Override the "getExecutionOrder()" method, either remove the
>>> steps you don't need from the "GROUP_TOP_LEVEL" sequences array, or
>>> define you own sequences array to return from this method. You can mix
>>> and match different steps, either taken from your parent class or from
>>> your own implementation. Very flexible.
>>> 
>>> 3) Make sure to name your own steps with the prefix "step" and add the
>>> "@Execute" annotation otherwise they are skipped. It took me a while to
>>> get used to it.
>>> 
>>> 4) Some steps are moved from the "FinalLaunchSequence" class to the
>>> "DebugNewProcessSequence" class, like setting up the environment and
>>> arguments. The "DebugNewProcessSequence" uses the same structure so it's
>>> easy to override it to provide your own implementations.
>>> 
>>> 5) In your version of "FinalLaunchSequence" you need to have copies of
>>> the private class variables for command control, command factory and
>>> backend if you need to use them in your steps. IMHO the
>>> "FinalLaunchSequence" should have getter methods for them so sub-classes
>>> don't have to keep references to them.
>>> 
>>> 6) If you need to use you own GDB backend implementation by overriding
>>> GDBBackend class, make sure to register your class in OSGi so DSF can
>>> reach your class using reflection. See this bug
>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=350837 for one of the
>>> reason why you need to register your class. Override the "initialize()"
>>> method to do it.
>>> 
>>> Regards,
>>> Andy
>>> 
>>> 
>>> -----Original Message-----
>>> From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
>>> On Behalf Of Derek Morris
>>> Sent: July-04-11 8:50 AM
>>> To: CDT General developers list.
>>> Subject: [cdt-dev] FinalLaunchSequence has dramatically changed...
>>> 
>>> In the New in CDT8 docs, it mentions that "FinalLaunchSequence has
>>> dramatically changed, but unlike virtually everything else, it gives no
>>> referencing Bugzilla entry.
>>> 
>>> So, are there any docs on what those changes are, and how it should now
>>> be used? I am trying to port from CDT7 to CDT8. Any pointers gratefully
>>> received!
>>> 
>>> Thanks
>>> 
>>> 
>>> --
>>> Subs
>>> 
>>> 
>>> _______________________________________________
>>> cdt-dev mailing list
>>> cdt-dev@xxxxxxxxxxx
>>> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>> 
>> _______________________________________________
>> cdt-dev mailing list
>> cdt-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>> 
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev



Back to the top