Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] default Number Format in variables view

I had lost track of review 30274.  I'll have a look again to see how it can help with extendability.


From: cdt-dev-bounces@xxxxxxxxxxx [cdt-dev-bounces@xxxxxxxxxxx] on behalf of Bruno Medeiros [bruno.do.medeiros@xxxxxxxxx]
Sent: April 24, 2015 8:02 AM
To: CDT General developers list.
Subject: Re: [cdt-dev] default Number Format in variables view

Cool, that's one of the code modifications I was hoping to get, as it's directly related to this change I proposed: https://git.eclipse.org/r/#/c/30274/ . I'll need to take a proper look later, when I have the time. (My first impression is that is a good step forward, but doesn't completely subsume c/30274, there are still other areas that require code duplication in order to extend/customize CDT debug UI)

On Thu, Apr 23, 2015 at 9:01 PM, Marc Khouzam <marc.khouzam@xxxxxxxxxxxx> wrote:
BTW, we just committed a patch that should make overriding the VMProviders much simpler.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=462623

You can have a look at GdbExtendedViewModelAdapter (from o.e.cdt.examples.dsf.gdb) for an example

From: cdt-dev-bounces@xxxxxxxxxxx [cdt-dev-bounces@xxxxxxxxxxx] on behalf of Bruno Medeiros [bruno.do.medeiros@xxxxxxxxx]
Sent: April 23, 2015 2:05 PM

To: CDT General developers list.
Subject: Re: [cdt-dev] default Number Format in variables view

Oh nice! I tried in the past to do this (make the Details format the default), but ended up doing it in a much more convoluted way, which also had some drawbacks in functionality. This way works perfectly though.

On Fri, Mar 6, 2015 at 3:21 PM, Derek Morris <dmsubs@xxxxxxxxxxxxx> wrote:
Thanks for the hints...

I had to override GdbVariableVMProvider and then 
getPresentationContext()
.setProperty(
IDebugVMConstants.PROP_FORMATTED_VALUE_FORMAT_PREFERENCE,
IFormattedValues.HEX_FORMAT);
Seems a bit complex, just to change the default!


On 5 Mar 2015, at 18:58, Marc Khouzam <marc.khouzam@xxxxxxxxxxxx> wrote:

You can look at how IDebugVMConstants.PROP_FORMATTED_VALUE_FORMAT_PREFERENCE
is used.  It seems to be the way the format is being fetched.

I hope this helps.
________________________________________
From: cdt-dev-bounces@xxxxxxxxxxx [cdt-dev-bounces@xxxxxxxxxxx] on behalf of Derek Morris [dmsubs@xxxxxxxxxxxxx]
Sent: March 5, 2015 10:24 AM
To: CDT General developers list.
Subject: Re: [cdt-dev] default Number Format in variables view

Sorry, no that is not what I want.

I want to be able to display Hex (or whatever else) as the default. I do not want to have to change the NUmber Format for every new project (Launch Config?) I create. Persistence is helpful, but I don't want to have to change it - I want the DEFAULT to be what I choose, not what CDT chooses..

Many years ago, in CDI debug, the preference mentioned in my original email worked, but now there seems to be no way to display as Hex by default.

I am happy to write code to do this, I just need to know if it is at all possible.

Thanks

On 5 Mar 2015, at 15:20, Marc Khouzam <marc.khouzam@xxxxxxxxxxxx> wrote:

I believe the setting is persisted so once you change it to hex, it will remain there for new sessions, clones views,
restarted eclipse.  Not sure about a new workspace though.

Is that what you need?
________________________________________
From: cdt-dev-bounces@xxxxxxxxxxx [cdt-dev-bounces@xxxxxxxxxxx] on behalf of Derek Morris [dmsubs@xxxxxxxxxxxxx]
Sent: March 5, 2015 10:13 AM
To: CDT General developers list.
Subject: Re: [cdt-dev] default Number Format in variables view

Marc,

Thanks for the response.

I know that I can change the view, but I want to change the default. i.e. I always want the view in Hex and not 'Default'.

Is there a way to change the default?

Thanks

On 5 Mar 2015, at 15:10, Marc Khouzam <marc.khouzam@xxxxxxxxxxxx> wrote:

The variables view has a menu (view menu) to change the number format for the entire view.

Marc
________________________________________
From: cdt-dev-bounces@xxxxxxxxxxx [cdt-dev-bounces@xxxxxxxxxxx] on behalf of Derek Morris [dmsubs@xxxxxxxxxxxxx]
Sent: March 5, 2015 7:19 AM
To: CDT General developers list.
Subject: [cdt-dev] default Number Format in variables view

It is good to see that we can now change the Number Format for individual variables in CDT8.6, but how do we change the Default number format?

The default display is Decimal (and, for chars) the character.

We would like the default display to be Hex.

Any clues on how to do this?

(Note: The preference C/C++->Debug->Default Number format has no effect)

Thanks

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev


_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev



--

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev



--

Back to the top