xBlackCat / ice-framework-idea-plugin

Automatically exported from code.google.com/p/ice-framework-idea-plugin
6 stars 3 forks source link

How to use it? #3

Closed jianrongfeng closed 4 years ago

jianrongfeng commented 4 years ago

The configuration ICE home in IDEA is ok, but how to execute slicetojava in this plugin?

xBlackCat commented 4 years ago

In Idea UI add facet "ZeroC" to your module in Project Structure View. In the facet configuration you can choose target language translator and target directory. Files are generated on build project command or you can force generate files by selecting Ice file and choose 'Recompile ' option from context menu.

jianrongfeng commented 4 years ago

Thanks for your reply. I have done the first step, I tried "build project" without effort and the "Recompile" option was disabled. Screenshot is below: 微信截图_20200812112940 微信截图_20200812113133

xBlackCat commented 4 years ago

Put the Test.ice file into sources folder: into your src/main/java or better create a new one like (src/main/ice and mark it as "sources" in project structure). image

jianrongfeng commented 4 years ago

Yes i do that, but nothing is generated.

xBlackCat commented 4 years ago

Could you please attach your project to the issue to check configuration?

jianrongfeng commented 4 years ago

Sorry, I don't understand it, are you mean "Modules" configuration?

xBlackCat commented 4 years ago

zip your Ice-demo folder content and attach to the issue. I could check project configuration and tell you what is missing in configuration

jianrongfeng commented 4 years ago

Thanks very much, You are so kind ! code.zip

xBlackCat commented 4 years ago

For the first, *.ice files must be located in 'Sources' folder (not 'Resources')

I'm recommending to create a separate sources folder for *.ice files.

I've created a new folder /src/main/ice in your project and marked it as 'Sources'. Put to the folder your Test.ice file and invoke 'Recompile file' command: slice translator was started.

image

Ensure your settings is correct for Ice translator location: image

And Facet configuration in the module: image

jianrongfeng commented 4 years ago

Great! I have generated successfully! Thank you for your help.