Intellij中的数据类型呈现器? [英] Data Type Renderers in Intellij?

查看:436
本文介绍了Intellij中的数据类型呈现器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近转换为Intellij。 Eclipse在调试器Primitive Display Options中有一个功能,它具有十六进制和ascii值的调试器渲染基元。

Recent convert to Intellij. Eclipse has a feature in the debugger, "Primitive Display Options", which has the debugger render primitives in hex and ascii values.

因为到目前为止Intellij中的一切都变得轻而易举,我认为这不是一件容易的事,但是经过一个小时和一些非功能性的数据类型渲染后,我发现自己已经准备好了回到日食。我制作了一些有效的渲染器,但仅用于对象,所以我只能得出结论,渲染器似乎不适用于原语。有人能指出我在正确的方向吗?

Since everything has been a breeze in Intellij so far, I figured this would be a no brainer, but after an hour and a number of non-functional data type renders later, I find myself ready to crawl back to eclipse. I made a few renderers that worked, but only for objects, so I can only conclude that renderers seem to not work for primitives. Can someone point me in the right direction here?

编辑:我已经看到了在默认渲染中选择十六进制的选项,但我希望能有更多的东西比每个变量需要2次点击的解决方案。

I've seen the option to select hex in the default render, but I am hoping for something more than a solution that requires 2 clicks for every variable.

推荐答案

对于整数值(即既不是浮点值也不是布尔值),右键单击调试器中的基元,然后选择查看为 - >十六进制,可以将它们视为十六进制值。

For integral values (that is, neither floating-point values nor booleans), you can view them as a hexadecimal value by right-clicking on the primitive in the debugger, and selecting "View As" -> "Hex".

默认情况下,仅限数据类型渲染器功能使用对象,表示基元的唯一现实方法是作为其整数值或十六进制,所以我认为这是一个愉快的妥协。

By default, the Data Type Renderer feature only works with objects, and the only realistic way to represent a primitive is either as its integral value or in hex, so I think this is a happy compromise.

这篇关于Intellij中的数据类型呈现器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆