How to write java code in intention?


I am still investgating how to write a importer to parse a existing XML format file and create a AST tree.

Right now I think the best solution is to write a intention in the root concept, using intension menu to trigger this operation.

In intention's execute function, it should

1. Use FileChooser to popup a window to let user select a XML file.

2. Parse the XML file, create node of root concept and all the children nodes. The newly created root node should replace existing one.

My question is, how to enable java and start to write java code? What language/module should I import?

At least I need FileChooser, File, and XML library to do the job.

Please someone give me some suggestions or a project for reference.



Comment actions Permalink

Got exception, seems I should not use file chooser in intention...


java.lang.Throwable: AWT events are not allowed inside write action:


Comment actions Permalink

I have started a series of posts on writing an importer, the last post is here:

Comment actions Permalink

Hi Sergej,

Thanks very much for your reply!

Look forward to learn more from your series!


Please sign in to leave a comment.