JOL Intellij Idea Plugin
Sergey Ponomarev
stokito at gmail.com
Wed Jul 18 23:01:20 UTC 2018
Hi,
I created a POC plugin which integrates JOl into IntelliJ
https://github.com/stokito/IdeaJol
It adds an item to main menu View / Show Object Layout.
At this point the plugin just shows the layout in dialog message and it
doesn't support classes with hierarchy and array fields.
But to implement it fully I stuck with a problem: I trying to convert
PsiClass (AST of Idea) to Jol's ClassData. In fact, we don't have a direct
access to classfile itself. But the only one method to add a superclass to
ClassData is by using the method ClassData.addSuperClassData(Class) which
accepts only raw java.lang.Class.
You can see the problem here in plugin:
https://github.com/stokito/IdeaJol/blob/master/src/main/java/com/github/stokito/IdeaJol/ShowObjectLayoutAction.java#L37
So could you add overloaded method ClassData.addSuperClassData(ClassData)
so I can create an instance of ClassData myself?
If someone interested - your contribution is welcome. I'll send a
notification about it's production ready release to the mailing list.
Regards,
Sergey Ponomarev
More information about the jol-dev
mailing list