Adding DocComments takes too long

I'm writing a plugin for generating javadoc comments for every uncommented
element (field, method, inner class, etc) in a java source file.
Everything is fine and working but when I try to add the comment in the file
it takes a long of time, so commenting every element in the file takes a
couple minutes.
The code I use to add the comment is:

psiDocCommentOwner.addBefore(docComment,
psiDocCommentOwner.getFirstChild());

where
. psiDocCommentOwner is the element for which I'm adding the comment
. docComment is the javadoc comment generated with
PsiElementFactory.createDocCommentFromText()

Is there another way to do this ?

thanks in advance,
Alejandro Gomez

3 comments

Hi Alejandro,

Which IntelliJ version do you use ? Have you tried a (more) recent build ? Are your files on a file server or on your hard drive ?

Gilles

0

I'm using the last build from the EAP and files are on local hard drive

0

Please sign in to leave a comment.