Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Debugger tabs activate/deactivate methods

Hi Vladimir,

deactivated() was added to AbstractLaunchConfigurationTab for Eclipse
3.0. It probably went unnoticed at that time. Your suggestion to
overwrite it for CLaunchConfigurationTab makes sense, my only concern
is that it would change the behaviour of public classes.


On Wed, Feb 17, 2010 at 8:28 AM, Vladimir Prus
<vladimir@xxxxxxxxxxxxxxxx> wrote:
> Hello,
> I was working on some contrived defaulting logic in debugger, and run into what
> seems a problem with CDT.
> At present, all tabs of C launch configurations are extending AbstractLaunchConfigurationTab,
> which has this code:
>        public void deactivated(ILaunchConfigurationWorkingCopy workingCopy) {
>                performApply(workingCopy);
>        }
> It appears that *most* of configuration tabs actually used in CDT override
> that method with an empty one. In particular, see:
>        - CommonTab.deactivated
>    - RefreshTab.deactivated
>    - EnvironmentTab.deactivated
> Some tabs do not, including both the CMainTab and CDebuggerTab. If I understand
> correctly, the above definition of deactivated would only matter if a tab has
> failed to call updateLaunchConfigurationDialog when the user changes something --
> and in that case we already have a bug that 'deactivated' cannot fix. So,
> deactivated only servers to complicate the logic, without solving any problem.
> So, why don't we define deactivated as empty method of *all* tabs used in CDT?
> Specifically, I propose defining that method as empty in CLaunchConfigurationTab.
> Comments? The actual patch is trivial, but I wanted to get feedback first.
> Thanks,
> --
> Vladimir Prus
> CodeSourcery
> vladimir@xxxxxxxxxxxxxxxx
> (650) 331-3385 x722
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx

Back to the top