Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-debug-dev] IToggleBreakpointsTargetFactory question

If the user changes the default setting, then this user setting will be applied to all parts.  However, the choice is keyed on the set of toggle target IDs that is presented to the user.  See ToggleBreakpointsTargetManager.chooseToggleTargetIDinSet().

Cheers,
Pawel

Chuong, Patrick wrote:

Hi Pawel,

 

The default selection can be set per factory, what about if there are multiple factories that contribute to the same viewpart? I have a factor that contributes to a CEditor, and the standard CDebugger also has a factory. So, how can I make it more transparent to the user not having to choose between toggle CLineBreakpoint and my breakpoint for each view, if I only have 1 toggle target? In my case, I have a toggle target for CEditor, disassembly view, outline view, project view and each view has its own toggle setting; now I have to configure setting for each of these views as a user to be able to switch between CBreakpoint and my breakpoint type.

 

Can a higher level filtering be done where it filters target factor and the user can select? This will apply globally for all viewpart, and will not required additional user interaction for each view if there is only one toggle target per factory. However, if there is multiple toggle targets, than the user can choose which toggle target for each factory per view.

 

Thanks,
Patrick

 


From: platform-debug-dev-bounces@xxxxxxxxxxx [mailto:platform-debug-dev-bounces@xxxxxxxxxxx] On Behalf Of Pawel Piech
Sent: January 27, 2010 2:34 PM
To: Eclipse Platform Debug component developers list.
Subject: Re: [platform-debug-dev] IToggleBreakpointsTargetFactory question

 

Chuong, Patrick wrote:

Hi,

 

I am trying to understand the purpose of IToggleBreakpointsTargetFactory class in the platform debug plugin. This interface is meant to allow client to override the default toggle breakpoint action in the workbench. What I am not sure about this interface is why there is a need to have different “active” toggle breakpoint target for a workbench part? For example, if I have a CDebugger and my own debugger, than there are two toggle breakpoint adapters per workbench part. But the active target breakpoint adapter is independent per workbench part. i.e a CEditor can have a CDebugger breakpoint adapter active, while a disassembly view can have my breakpoint adapter active. Having be able to do this, which is flexible, but it required the user to known what is the active toggle breakpoint adapter per workbench part. Would it make thing easier if the active toggle adapter is global, rather than workbench part dependent? Am I doing something not correct here that causes the active toggle selection tied to the workbench part?

The purpose of the interface is to allow a debugger to override the default breakpoint that is being created in a given editor/view.  This feature works off of the active part because different parts can create different kinds of breakpoints (i.e. Java editor vs. CDT Editor). 

I agree that the selection of the active toggle target is tricky once user overrides the default and it is a short-coming of this feature.  In my experience your best chance to avoid confusion for your users is to implement good default selection.  For example, you can use the active debug context to determine whether your breakpoints should be created instead of the standard ones.  You can also use the active project, active file, etc.

 

Also, why not the have the active debug session provides the target breakpoint adapter, this will eliminate user interaction. But if there is no debug session, than it should default to the current implementation.

Would you want a Java editor to create C breakpoints when the C debugger is active?  Seriously though, I think you can achieve this by having proper logic in your IToggleBreakpoinsTargetFactory.getDefaultToggleTarget().  For an example, look at the one for CDT breakpoints: it only returns a default if the CDT Debugger is active.  However, once user starts overriding the default the selection of breakpoint type becomes more blunt.

Cheers,
Pawel

 

Regards,

Patrick

 



 
_______________________________________________
platform-debug-dev mailing list
platform-debug-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-debug-dev
  

 


_______________________________________________ platform-debug-dev mailing list platform-debug-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/platform-debug-dev


Back to the top