How to invoke the generate -> equals method option from code?

Is there any way I could invoke the IntelliJ intention action for generating equals/hashcode method from my plugin? I looked at the OpenAPI and couldnt find anything related.

A simple code example would be greatly appreciated.

0
3 comments

Hello Anay,

Is there any way I could invoke the IntelliJ intention action for
generating equals/hashcode method from my plugin? I looked at the
OpenAPI and couldnt find anything related.

A simple code example would be greatly appreciated.


new GenerateEqualsAction().actionPerformedImpl(project, editor)

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Avatar
Permanently deleted user

Hi Dimitry,

Thanks for your reply, however I guess I am probably missing something really obvious. I could not find this class reference in the http://www.jetbrains.com/idea/openapi/5.1/  javadoc and IntelliJ cant seem to resolve the import for the class . Is there any particular jar/lib that I should associate with my project in order to have these classes get resolved?

Thanks again,
Anay

0

Hello Anay,

This class is not part of OpenAPI, so you need to add idea.jar to the classpath
of your IntelliJ IDEA SDK.

Thanks for your reply, however I guess I am probably missing something
really obvious. I could not find this class reference in the
http://www.jetbrains.com/idea/openapi/5.1/ javadoc and IntelliJ cant
seem to resolve the import for the class
. Is there any particu

lar jar/lib that I should associate with my project in order to have
these classes get resolved?

Thanks again,
Anay
---
Original message URL:
http://www.jetbrains.net/devnet/message/5229063#5229063

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Please sign in to leave a comment.