From stokito at gmail.com Wed Jul 18 23:01:20 2018 From: stokito at gmail.com (Sergey Ponomarev) Date: Thu, 19 Jul 2018 02:01:20 +0300 Subject: JOL Intellij Idea Plugin Message-ID: 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 From stokito at gmail.com Sat Jul 21 01:53:56 2018 From: stokito at gmail.com (Sergey Ponomarev) Date: Sat, 21 Jul 2018 04:53:56 +0300 Subject: JOL Intellij Idea Plugin In-Reply-To: References: Message-ID: Hi again, I glad to present for you a first release of IntelliJ Idea JOL Plugin Please see a patch to JOL in attachment to the letter. The same I published here https://github.com/stokito/jol/tree/extend_api On Thu, 19 Jul 2018 at 02:01, Sergey Ponomarev wrote: > 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 > From stokito at gmail.com Sat Jul 21 01:55:19 2018 From: stokito at gmail.com (Sergey Ponomarev) Date: Sat, 21 Jul 2018 04:55:19 +0300 Subject: JOL Intellij Idea Plugin References: Message-ID: On Sat, 21 Jul 2018 at 04:53, Sergey Ponomarev wrote: > Hi again, > > I glad to present for you a first release of IntelliJ Idea JOL Plugin > Please see a patch to JOL in attachment to the letter. The same I > published here https://github.com/stokito/jol/tree/extend_api > > > > On Thu, 19 Jul 2018 at 02:01, Sergey Ponomarev wrote: > >> 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 >> > > -- Sergey Ponomarev , skype:stokito -------------- next part -------------- A non-text attachment was scrubbed... Name: jol-extend-api.patch Type: text/x-patch Size: 1920 bytes Desc: not available URL: