Sorry if I am asking the same question again (Generics Syntax)

The tracker request
http://www.intellij.net/tracker/idea/viewSCR?publicId=7090
state changed to fixed.

I am trying a simple line

 v = new Vector();
]]>


And the error strip shows red bar and the message is Vector takes no parameter.

I copied collect.jar and gjc-rt.jar into lib/generics and added collect.jar to my project path and moved to the first in the order.

The build I am trying is 876.

Am I missing something?

Thanks in advance.

12 comments
Comment actions Permalink

I am keep on searching and still searching to get the answe, but couldn't find :(

0
Comment actions Permalink

I copied collect.jar and gjc-rt.jar into lib/generics and added

collect.jar to my project path and moved to the first in the order.

The simpliest way to check is to control-B on Vector class and see if it
really brings you to parameterized class definition.


0
Comment actions Permalink

but it works!!! i think that the code-highlighting of generics isn't finished, yet. they first have integraded only the generics-support and now they integrate the code-highlighting for generics!?

0
Comment actions Permalink

Evgueny Vigdorchik wrote:

>>I copied collect.jar and gjc-rt.jar into lib/generics and added


collect.jar to my project path and moved to the first in the order.

The simpliest way to check is to control-B on Vector class and see if it
really brings you to parameterized class definition.


When you have added collect.jar to the module and placed it first in the
order tab, I think you also have to restart IDEA to make it understand
that the generics classes should be used.

(I just tried to verify this but ended up restarting Ariadna instead of
Aurora and destroying my project file.)

0
Comment actions Permalink

Jonas Kvarnström wrote:

When you have added collect.jar to the module and placed it first in the
order tab, I think you also have to restart IDEA to make it understand
that the generics classes should be used.


Now I've rebuilt my project file and verified this. When I add the new
collections classes and reorder them to place them before the JDK
classes, Aurora doesn't realize that List should now be taken from
collect.jar and not from the JDK as before. You have to restart IDEA
for these changes to take effect.

0
Comment actions Permalink

Hi,

from your description of the problem, IDEA does not recognize the classes from
collect.jar. Did you try to restart IDEA after adding collect.jar? This is a bug I just
noticed which makes it neccessary to restart IDEA to recognize the module order:

http://www.intellij.net/tracker/idea/viewSCR?publicId=14789

Hope that helps

Sascha


"Anki" <no_mail@jetbrains.com> wrote:

The tracker request
http://www.intellij.net/tracker/idea/viewSCR?publicId=7090
state changed to fixed.

>

I am trying a simple line

>

 Vector v = new Vector();
> ]]>

>

And the error strip shows red bar and the message is Vector takes no parameter.

>

I copied collect.jar and gjc-rt.jar into lib/generics and added collect.jar to my project path and

moved to the first in the order.
>

The build I am trying is 876.

>

Am I missing something?

>

Thanks in advance.

>


0
Comment actions Permalink

Funny... I just filed a bug report:
http://www.intellij.net/tracker/idea/viewSCR?publicId=14789

Sascha

"Jonas Kvarnström" <jonkv@ida.liu.se> wrote:

Jonas Kvarnström wrote:

>

When you have added collect.jar to the module and placed it first in the
order tab, I think you also have to restart IDEA to make it understand
that the generics classes should be used.

>

Now I've rebuilt my project file and verified this. When I add the new
collections classes and reorder them to place them before the JDK
classes, Aurora doesn't realize that List should now be taken from
collect.jar and not from the JDK as before. You have to restart IDEA
for these changes to take effect.

>


0
Comment actions Permalink

Thanks guys

After restarting its working. Thanks for all replies.

0
Comment actions Permalink

i get crazy with "out of memory errors" (in 896) in context with setting up "generics" support.

As soon as i define collect.jar to be the first in the order list, my test source code and IDEA at all isnt usable at all. I get out of memory errors every x seconds w/o doing something.

What i ve done to set up generics (is there somewhere an official document for this?)

1. copy the two jars in IDEA_HOME/lib/generics
2. defined collect.jar as library and put it in highest order
3. restart IDEA
4. the "out of memory" error hell begins...

As soon i put down the order number of collect.jar below the SDK, everything is ok again. But of course i get many errors inside the editor because of not finding the collection-generics enhancements

why does IDEA also mark this line:

for (String s : ys)

this has nothing to do with collect.jar or? Did i make any errors with gjc-rt.jar? I am clueless what i have to do now...

0
Comment actions Permalink

forget the "for" sentence at the end. foreach style seems not implemented yet...

0
Comment actions Permalink

Marc Logemann wrote:

i get crazy with "out of memory errors" (in 896) in context with setting up "generics" support.


Do you use Collections.sort(), max(), or similar methods? In that case
it's probably http://www.intellij.net/tracker/idea/viewSCR?publicId=14522.

0
Comment actions Permalink

Do you use Collections.sort(), max(), or similar
methods? In that case
it's probably
http://www.intellij.net/tracker/idea/viewSCR?publicId=
4522.


oh yeah, i use these static methods... Thanks for pointing me to this.

0

Please sign in to leave a comment.