Generics Support in Aurora

Hi all,
we are quite interested in your impressions on generics support in Aurora.
We now use generics a lot in IDEA code, and what we have in #873 is rather
mature, in our opinion. There are some glitches of course, some we know of
and some we do not, so please do not hesistate to submit bug reports.

In 873 we support Generics 2.0, without variance. I suppose you will have to
wait for some time (3 week - 1 month) before we support all features of 2.2
('?' is most problematic, as you might expect), because it is vacation time
now :).

Cheers,
Dmitry
--
Dmitry Lomov
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

15 comments
Comment actions Permalink

('?' is most problematic, as you might expect), because it is vacation

time

now :).


So have nice holidays Dmitry, you mertit to take those vacations !

Guillaume


0
Comment actions Permalink

Dmitry Lomov wrote:

Hi all,
we are quite interested in your impressions on generics support in Aurora.
We now use generics a lot in IDEA code, and what we have in #873 is rather
mature, in our opinion.


I tried to start using it in the first build that supported generics,
but then there were too many bugs (which was of course only to be
expected). Maybe now is the right time for a second attempt to convert
my project to generics...

There are some glitches of course, some we know of
and some we do not, so please do not hesistate to submit bug reports.


And some you have already fixed but not closed. At least
http://www.intellij.net/tracker/idea/viewSCR?publicId=7586,
http://www.intellij.net/tracker/idea/viewSCR?publicId=13209,
http://www.intellij.net/tracker/idea/viewSCR?publicId=13205,
http://www.intellij.net/tracker/idea/viewSCR?publicId=13207 and
http://www.intellij.net/tracker/idea/viewSCR?publicId=13171 could be closed.

Maybe even the main generics RFE
(http://www.intellij.net/tracker/idea/viewSCR?publicId=7090) should be
closed? If generics is stable enough to be used in IDEA I'd say
generics has been implemented and whatever remains is bugs and lack fo
features in the implementation.

In 873 we support Generics 2.0, without variance. I suppose you will have to
wait for some time (3 week - 1 month) before we support all features of 2.2
('?' is most problematic, as you might expect), because it is vacation time
now :).


Any approximate ETA for the tool (or intentions, or whatever you were
planning) for converting non-generics code to generics?

0
Comment actions Permalink

Jonas Kvarnström wrote:

Dmitry Lomov wrote:

>> Hi all,
>> we are quite interested in your impressions on generics support in
>> Aurora. We now use generics a lot in IDEA code, and what we have in #873
>> is rather mature, in our opinion.


I tried to start using it in the first build that supported generics,
but then there were too many bugs (which was of course only to be
expected). Maybe now is the right time for a second attempt to convert
my project to generics...


Do it if you are brave. We are. :)

>> There are some glitches of course, some we know of
>> and some we do not, so please do not hesistate to submit bug reports.


And some you have already fixed but not closed. At least
http://www.intellij.net/tracker/idea/viewSCR?publicId=7586,
http://www.intellij.net/tracker/idea/viewSCR?publicId=13209,
http://www.intellij.net/tracker/idea/viewSCR?publicId=13205,
http://www.intellij.net/tracker/idea/viewSCR?publicId=13207 and
http://www.intellij.net/tracker/idea/viewSCR?publicId=13171 could be
closed.


Thanks Jonas. I did so.


Maybe even the main generics RFE
(http://www.intellij.net/tracker/idea/viewSCR?publicId=7090) should be
closed? If generics is stable enough to be used in IDEA I'd say
generics has been implemented and whatever remains is bugs and lack fo
features in the implementation.


Nice suggestion. Although there is still unsupported stuff, I have just
closed this RFE to indicate that if something is not supported/works
unexpected/crashes, then this is actually a bug separate from general
SCR7090.


Any approximate ETA for the tool (or intentions, or whatever you were
planning) for converting non-generics code to generics?


As to "whole project" tool/refactoring, it is difficult to say yet. A month
maybe?

However, there now handy intentions/quick fixes popping up that really help
in the process.
E.g. if you have something like this:
Set s = f(); for (Iterator it = s.iterator(); it.next();) { .... } intention pops up to change type of 'it' to 'Iterator'. Try also: Set]]> s = new HashSet|(); // CtrlShiftSpace

and other stuff.

Cheers,
Dmitry
--
Dmitry Lomov
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

Generics now supported by Aurora, but syntax highlighting not work correctly
for:
for (Object o : objectCollection) {

}

etc.


--
Alexey Efimov, Software Engineer
Sputnik Labs,
http://www.spklabs.com
"Jonas Kvarnstr?m" <jonkv@ida.liu.se> wrote in message
news:bfqn0p$1f0$1@is.intellij.net...

Dmitry Lomov wrote:

>

Hi all,
we are quite interested in your impressions on generics support in

Aurora.

We now use generics a lot in IDEA code, and what we have in #873 is

rather

mature, in our opinion.

>

I tried to start using it in the first build that supported generics,
but then there were too many bugs (which was of course only to be
expected). Maybe now is the right time for a second attempt to convert
my project to generics...

>

There are some glitches of course, some we know of
and some we do not, so please do not hesistate to submit bug reports.

>

And some you have already fixed but not closed. At least
http://www.intellij.net/tracker/idea/viewSCR?publicId=7586,
http://www.intellij.net/tracker/idea/viewSCR?publicId=13209,
http://www.intellij.net/tracker/idea/viewSCR?publicId=13205,
http://www.intellij.net/tracker/idea/viewSCR?publicId=13207 and
http://www.intellij.net/tracker/idea/viewSCR?publicId=13171 could be

closed.
>

Maybe even the main generics RFE
(http://www.intellij.net/tracker/idea/viewSCR?publicId=7090) should be
closed? If generics is stable enough to be used in IDEA I'd say
generics has been implemented and whatever remains is bugs and lack fo
features in the implementation.

>

In 873 we support Generics 2.0, without variance. I suppose you will

have to

wait for some time (3 week - 1 month) before we support all features of

2.2

('?' is most problematic, as you might expect), because it is vacation

time

now :).

>

Any approximate ETA for the tool (or intentions, or whatever you were
planning) for converting non-generics code to generics?

>


0
Comment actions Permalink


Alexey Efimov wrote:

Generics now supported by Aurora, but syntax highlighting not work
correctly for:
for (Object o : objectCollection) {

}

etc.


This is a separate JSR (201). We are not sure we will support this in
Aurora.

Friendly,
Dmitry
--
Dmitry Lomov
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

It already support and work correctly :)
--
public class Main {
public static void main(String[] args) {
for (String arg : args) {
System.out.println(arg);
}
}
}

Just editor show it code as syntax error

Thanks!


--
Alexey Efimov, Software Engineer
Sputnik Labs,
http://www.spklabs.com
"Dmitry Lomov" <dsl@intellij.com> wrote in message
news:bfqpkh$d8p$1@is.intellij.net...
>

Alexey Efimov wrote:

>

Generics now supported by Aurora, but syntax highlighting not work
correctly for:
for (Object o : objectCollection) {

>

}

>

etc.

>

This is a separate JSR (201). We are not sure we will support this in
Aurora.

>

Friendly,
Dmitry
--
Dmitry Lomov
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"



0
Comment actions Permalink

Alexey Efimov wrote:

It already support and work correctly :)
--
public class Main {
public static void main(String[] args) {
for (String arg : args) {
System.out.println(arg);
}
}
}


Well, JSR 201 is implemented by Sun in the same prerelease compiler as
generics, but it isn't really a part of generics.

0
Comment actions Permalink

I don't want to sound unappreciative of all of the generics work you guys have been doing, but I can't imagine the motivation behind (considering) not supporting part of the language. Java 1.5 will be out around the same time Aurora will be, no? The new for syntax will be used a great deal by many people, I think. Don't you?

0
Comment actions Permalink

Keith Lea wrote:

I don't want to sound unappreciative of all of the generics work you guys
have been doing, but I can't imagine the motivation behind (considering)
not supporting part of the language. Java 1.5 will be out around the same
time Aurora will be, no?


No, not exactly. The beta JDK 1.5 will probably be out around the time
Aurora gets released. That is a motivation behind considering not
supporting beta part of the language.

What we use now is a EAP (not even beta) of a compiler, which is just a
small part of JDK.

Friendly,
Dmitry
--
Dmitry Lomov
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

Dmitry Lomov wrote:

Hi all,
we are quite interested in your impressions on generics support in Aurora.
We now use generics a lot in IDEA code, and what we have in #873 is rather
mature, in our opinion. There are some glitches of course, some we know of
and some we do not, so please do not hesistate to submit bug reports.


Well, now that I've been trying it out for a few hours it seems like
there are still some things to be done before the feature is ready for
prime time -- a few "good code is red" bugs and an exception that keeps
popping up. But it's far better than it was a month ago.

Before I go further -- will someone responsible for generics be working
on these bugs or will it take a month due to vacations? Of course have
no problem with you or whoever it is going on a well-deserved vacation,
but if it takes too long until these bugs are fixed I might revert to an
old version of the project and wait for a while until I really start
using generics.

0
Comment actions Permalink

Jonas Kvarnström wrote:

Dmitry Lomov wrote:

>> Hi all,
>> we are quite interested in your impressions on generics support in
>> Aurora. We now use generics a lot in IDEA code, and what we have in #873
>> is rather mature, in our opinion. There are some glitches of course, some
>> we know of and some we do not, so please do not hesistate to submit bug
>> reports.


Well, now that I've been trying it out for a few hours it seems like
there are still some things to be done before the feature is ready for
prime time -- a few "good code is red" bugs and an exception that keeps
popping up. But it's far better than it was a month ago.

Before I go further -- will someone responsible for generics be working
on these bugs or will it take a month due to vacations? Of course have
no problem with you or whoever it is going on a well-deserved vacation,
but if it takes too long until these bugs are fixed I might revert to an
old version of the project and wait for a while until I really start
using generics.


Have no worries - the bugs will get fixed :) It is not so that the whole
IDEA team is gone :)

Cheers,
Dmitry

--
Dmitry Lomov
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

Hi All,

I have been looking into Generics in Aurora and using a very small example:

ArrayList list = new ArrayList(); This worked and I was very impressed! I then got adventurous and tried to load the example given as part of the "adding_generics-2_2-ea\examples..." package. To do this I simply pasted the code into a class in my Idea project and waited for it to parse so that I could play around with it... and I waited and I waited and... eventually Idea told me there wasn't enough memory and I would need to restart Idea. So I up'd the memory in the .lax file to 512mb (the max capacity of my computer) and restarted Idea. It started and I waited and I waited and... eventually it parsed at 435mb used up. Needless to say it compiled but didn't run for various reasons. The point of this is that I was wondering if I am the only person having this out of memory problem when Idea tries to parse a file using Generics with examples that are more advanced than the very basic Collections declarations? Even using a small part of the example generics class: // Integer list LinkedList xs = new LinkedList(); xs.add(new Integer(0)); xs.add(new Integer(1)); Integer x = xs.iterator().next(); Integer mb = Collections.max(xs); Idea still cannot cope with it! When it does finally parse it, I cannot do anything because any change forces a re-parse that takes the memory usage over whatever limit I set. scott "Dmitry Lomov" ]]> wrote in message
news:bfqhtl$m7b$1@is.intellij.net...

Hi all,
we are quite interested in your impressions on generics support in Aurora.
We now use generics a lot in IDEA code, and what we have in #873 is rather
mature, in our opinion. There are some glitches of course, some we know of
and some we do not, so please do not hesistate to submit bug reports.

>

In 873 we support Generics 2.0, without variance. I suppose you will have

to

wait for some time (3 week - 1 month) before we support all features of

2.2

('?' is most problematic, as you might expect), because it is vacation

time

now :).

>

Cheers,
Dmitry
--
Dmitry Lomov
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"



0
Comment actions Permalink

See this SCR: http://www.intellij.net/tracker/idea/viewSCR?publicId=14522

The latest Aurora build(s) seems to have a problem with the generics-2_2
java.util.Collections class. Everything else is working quite well.

Sascha

"Scott Curtis" <scurtis@smart421.com> wrote:

Hi All,

>

I have been looking into Generics in Aurora and using a very small example:

>

ArrayList<String> list = new ArrayList<String>();

>

This worked and I was very impressed! I then got adventurous and tried to
load the example given as part of the "adding_generics-2_2-ea\examples..."
package. To do this I simply pasted the code into a class in my Idea project
and waited for it to parse so that I could play around with it... and I
waited and I waited and... eventually Idea told me there wasn't enough
memory and I would need to restart Idea. So I up'd the memory in the .lax
file to 512mb (the max capacity of my computer) and restarted Idea. It
started and I waited and I waited and... eventually it parsed at 435mb used
up. Needless to say it compiled but didn't run for various reasons.

>

The point of this is that I was wondering if I am the only person having
this out of memory problem when Idea tries to parse a file using Generics
with examples that are more advanced than the very basic Collections
declarations? Even using a small part of the example generics class:

>

// Integer list
LinkedList<Integer> xs = new LinkedList<Integer>();
xs.add(new Integer(0));
xs.add(new Integer(1));
Integer x = xs.iterator().next();
Integer mb = Collections.max(xs);

>

Idea still cannot cope with it! When it does finally parse it, I cannot do
anything because any change forces a re-parse that takes the memory usage
over whatever limit I set.

>

scott



0
Comment actions Permalink

Yeah, I just added each line one at a time and it was the line:

Integer mb = Collections.max(xs);

which seemed to be causing the problem. You are right, everything else is
working fine now!

Thanks
scott

"Sascha Weinreuter" <sascha.weinreuter@cit.de> wrote in message
news:bg83rj$2jn$1@is.intellij.net...

See this SCR: http://www.intellij.net/tracker/idea/viewSCR?publicId=14522

>

The latest Aurora build(s) seems to have a problem with the generics-2_2
java.util.Collections class. Everything else is working quite well.

>

Sascha

>

"Scott Curtis" <scurtis@smart421.com> wrote:

Hi All,

>

I have been looking into Generics in Aurora and using a very small

example:

>

ArrayList<String> list = new ArrayList<String>();

>

This worked and I was very impressed! I then got adventurous and tried

to

load the example given as part of the

"adding_generics-2_2-ea\examples..."

package. To do this I simply pasted the code into a class in my Idea

project

and waited for it to parse so that I could play around with it... and I
waited and I waited and... eventually Idea told me there wasn't enough
memory and I would need to restart Idea. So I up'd the memory in the

.lax

file to 512mb (the max capacity of my computer) and restarted Idea. It
started and I waited and I waited and... eventually it parsed at 435mb

used

up. Needless to say it compiled but didn't run for various reasons.

>

The point of this is that I was wondering if I am the only person having
this out of memory problem when Idea tries to parse a file using

Generics

with examples that are more advanced than the very basic Collections
declarations? Even using a small part of the example generics class:

>

// Integer list
LinkedList<Integer> xs = new LinkedList<Integer>();
xs.add(new Integer(0));
xs.add(new Integer(1));
Integer x = xs.iterator().next();
Integer mb = Collections.max(xs);

>

Idea still cannot cope with it! When it does finally parse it, I cannot

do

anything because any change forces a re-parse that takes the memory

usage

over whatever limit I set.

>

scott

>
>



0
Comment actions Permalink

I've been playing with Tiger only for a couple hours only, but I am amazed at the new Java style. I am just a Java hobbyist (still forced to 'program' in a funny '4GL', but eager to switch to Java in enterprise connectors A.S.A.P.), but ONLY NOW, after adding Tiger's new features (generics, autoboxing, enumerations etc) Java REALLY ROCKS. Now at last it's not going to be a scary experience to read somebody else's verbooose code (and often even my own after some time:). That's why I am very disappointed by Sun saying that Tiger's beta (even beta only!) will be out no sooner than by the end of 2003.
That doesn't make sense to me at all, because that ea_2_2 seems to be pretty complete by now with only metadata and autoboxing other than in passed params still to be done... To be frank, given the number of people working on it, surprisingly not very large source of the gjc-rt.jar package, as well as the fact that Java is (and I am convinced it's true) the best language for large projects, 18 months seems like... well, the word "sabotage" comes to me (Sorry, Mighty Sun:).
Especially when that .NET wintel-only C# nonsense (by the way, packed with attractive Tiger-like features, albeit violating OOP rules) is attacking literally millions of unaware young people out there, Sun's attitude seems to be a bit careless at least... I am sure these Tiger features alone will attract HUGE number of programmers to Java - and - now my point comes :) - why you, people producing the coolest Java IDE ever seen under Sun, are reluctant to be the first ones to support (optionally, of course, like in current Aurora) beta version (at that time) of Tiger completely (ref. to Dmitry's remark), allowing great many POTENTIAL new lovers of your wonderful IDE to indulge the new breath-taking style of Java programming (and, at least, be perfectly prepared for it once the final version is released in Q2 2004)??? I just don't get it. I cannot imagine better self-seller feature for a Java IDE, and also worse distractor than lack of it - even I, a big Idea evangelist, had to sin with demo JCreator because I was really distracted by the "red sea" of reported bugs in source, although compiling, debugging and running Tiger_ea_2_2 seemed to be fine in Aurora (by the way, could anyone tell me where to find the Aurora's officialy supported ea_2_0 version in case the ea_2_2 proves to be crashy with Aurora by now? Thanks a lot.)

I just couldn't find a way how to get rid of this "red sea" in Aurora - is there any chance to switch off the (otherwise very useful, but in this case extremely annoying) Idea/Aurora's syntax intelligence?

Good luck guys and thank you for giving us chance to experience real pleasure while programming in Java, which makes your IDE so distinct from all the rest!

Faithfully,
Ludo

0

Please sign in to leave a comment.