since 1050: "type com.intellij.openapi.util.Key does not take parameters."


Since 1050, FoldRegion implements UserDataHolder.

=> When extending FoldRegion, you now have to
- use generics, and
- add the 2 UserDataHolder methods, that have parametrized parameters.


Problem:

I get the following error message on the method parametrized parameters
types.

"type com.intellij.openapi.util.Key does not take parameters."

=> the code below - generated by - doesn't compile anymore :

(Note: I added collect.jar to the project, and I put it first in the
order list)

Is there a workaround, or am I doing something wrong?

Alain


code that doesn't compile anymore
-


 T getUserData ( Key i_key )
        {
            return null;  //To change body of implemented methods use 
Options | File Templates.
        }

        public  void putUserData ( Key i_key, T i_t )
        {
            //To change body of implemented methods use Options | File 
Templates.
        }
...

]]>


3 comments
Comment actions Permalink

See http://www.intellij.net/forums/thread.jsp?forum=23&thread=58913&tstart=0&trange=100#656428 for a way to go past that (small version: remove any generics specific syntax, i.e. ]]> and change any generic type parameter with Object)

So your code should look like this:

0
Comment actions Permalink

Jacques Morel wrote:

>(small version: remove any generics specific syntax, i.e. and change any generic type parameter with Object) >]]>

>

Thanks Jacques, it worked like a charm.

I missed that thread. It makes me wish we had some kind of knowledge
base for IDEA.
A mix of wiki and the forums, with tags, and keywords..

Alain

0
Comment actions Permalink

I agree. Right now the knowledge base is in our collective mind. Not very efficient I agree. However it is a lot easier to maintain up-to-date.
I did not add this tip on the wiki. Did you look in it and where? I was just too lazy to put it there but I can.

Jacques

0

Please sign in to leave a comment.