How to add interfacename to a classes implements list?

Hi

I want automatically using PIS to add a class to a classes implements list.

I have some code like:

But the code adds the entire javaclass as text:

Example (adding java.io.Serializable)



So how do I just add the 'Serializable' to the implements list of a class????????

I want the end result to be like


I have looked the javadoc API but no methods jumps my face with a method like:

etc.


/Claus

4 comments

PIS it should have been PSI :)



PS: PIS is like bullshit in Danish

0

You get smarter.

I found a solution I want to share to the fellow plugin developers :)

Add the element as a reference (PsiJavaCodeReferenceElement). See the code snipet below

0

Thanks, that'll come in handy.

--Dave Griffith

0

You are welcome.

Ahh the great plugin author of Inspector Gadgets.
Your plugin is really really cool.


/Claus

0

Please sign in to leave a comment.