java - How to create new classes with IntelliJ Plugin API? -


i new intellij plugin programming , got because current project requires me same steps again , again , having small differences.

becauste takes lot of time, decided take hours once create plugin work me , save lot of time when having these steps again.

my question how can create new class files programmatically intellij plugin api. found out how content of open , in editor selected file , how change content, how create new files in specific package.

to honest, think there must in documentation wasted 1 hour googling without success. hope of guys experienced in creating plugins intellij platform , maybe can send me handbook or reference. don't think have write lot of plugins sometimes, can help.

thanks in advance.

please see meo's tip com.intellij.ide.actions.createclassaction#docreate.

the code following:

return javadirectoryservice.getinstance().createclass(dir, classname, templatename, true); 

and here can see different signatures in javadirectoryservice

perhaps 1 might relevant:

public abstract psiclass createclass(@notnull psidirectory dir, @notnull string name) throws incorrectoperationexception; 

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -