fkorotkov/intellij-thrift

Documentation

walter-weinmann opened this issue · 12 comments

Is there any documentation available how to use this plug-in ?

I did the installation (IntelliJ IDEA 2017.2.2) and see with new project (except the empty project ?) the following:

image

I also see in the "Project Structure":

image

and

image

Finally in "Default Settings" I have:

image

But I have absolutely no idea how to compile with Thrift or how the formatting of the Thrift file works.

Thanks a lot for any help !!!

Best way to place your *.thrift files to a separate folder in module and mark the folder as 'Source root'
After that you could simply invoke 'rebuild' command (Ctrl+Shift+F9) on the folder.
Do not forget to specify target lang and folder in Facet configuration of the module - as I noted it is empty in your screenshots.
Also it is preferrable to mark output folder in module for generated files as 'Generated source root'

Thanks a lot for your help !

  1. The thrift files are in a separate deirctory:

image

  1. The folders are marked as follows:

image

  1. The facet configuration is as follows:

image

  1. With Ctrl+Shift+F9 I get:

image

Ctrl+Shift+F9

image

Please, create target folders manually
Also it is not good idea to plage result folders as source subfolders. In your case use:
erlang_and_thrift/gen_py
erlang_and_thrift/gen_erlang
and mark them as "Generated source root"- this will allow IDE to track changed files after they are regenerated.

I've changed the facets as follows:

image

but the result of Ctrl+Shift+F9 is the same:

image

could you attach logs from IDE to the task?

I found the following under C:\Users\walte\.PyCharmCE2017.2\system\log:

threadDump-20170828-152523.txt

and

idea.log.txt

(I added the .txt extension manually)

Do you have any logs in logs/build-log/ folder?

I found the following (again added suffix txt):

build.log.txt

and

build-log.properties.txt

Sorry. By mistake Erlang compiler in not worked yet. I've made pull request with fix and it will be working next plugin version.

Thanks a lot - should I try to write a documentation page which describes the IntelliJ configuration (based on the current IntelliJ version) ?

U R welcome.

I've started the documentation - @xBlackCat and @fkorotkov you may contribute directly in my fork.