Poll: Generics & OpenApi

This is a poll to all plugin writers.
1. Do you use generics in your plugins' code?
2. If you do in 1 how do you avoid the following problem: OpenApi
sources do have generics while compiled classes in openapi.jar have all
generics annotations ommited?

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

7 comments
Comment actions Permalink

No, I don't use generics in plugin code.

Maxim Shafirov (JetBrains) wrote:

This is a poll to all plugin writers.
1. Do you use generics in your plugins' code?
2. If you do in 1 how do you avoid the following problem: OpenApi
sources do have generics while compiled classes in openapi.jar have all
generics annotations ommited?

0
Comment actions Permalink

Maxim Shafirov (JetBrains) wrote:

This is a poll to all plugin writers.
1. Do you use generics in your plugins' code?


Nope.

I have yet to use generics in any Java project. Personally, I don't
think they're that great since they're essentially faking it by
generating normal code with casts. :P

Ciao,
Gordon

--
Gordon Tyler (Software Developer)
Quest Software <http://java.quest.com/>
260 King Street East, Toronto, Ontario M5A 4L5, Canada
Voice: (416) 933-5046 | Fax: (416) 933-5001

0
Comment actions Permalink

I haven't yet used Generics in any project since I've tried it back in the
4.0 EAP OpenAPI but was stopped by the obfuscator screwing up the
generics info. I probably won't bother again before Java 5 is final.

Sascha

Maxim Shafirov (JetBrains) wrote:

This is a poll to all plugin writers.
1. Do you use generics in your plugins' code?
2. If you do in 1 how do you avoid the following problem: OpenApi sources do have generics while compiled classes in openapi.jar
have all generics annotations ommited?



0
Comment actions Permalink

I use the 2.4 generics compiler targeted to 1.4 (-target jsr14).
However due to problems I have in my project I removed all generics from my classes.
I am however still using the generics enabled source and have no problem compiling with them.

I did not have time to file a bug but IDEA has still problems with the generics openapi. Take a look at PsiClass. 2235 doesn't like "List>" at all. In addition with the generics ea 2.4 I could not make simple things like public class Test]]> {
}

even compile right. Fine in the editor, wrong outside.

Anyway I just gave up and are waiting for 1.5.

Jacques

0
Comment actions Permalink

Hello, Maxim!
You wrote on Thu, 19 Aug 2004 17:35:05 +0400:

MSJ> This is a poll to all plugin writers.
MSJ> 1. Do you use generics in your plugins' code?
MSJ> 2. If you do in 1 how do you avoid the following problem: OpenApi
MSJ> sources do have generics while compiled classes in openapi.jar have
MSJ> all generics annotations ommited?

I use generics from JDK 1.5 for all my plugins, and i have build.xml for
launch degenerator tool. But open api sometimes show non generic sources,
event if i have generics sources in library, it just take it from
openapi.jar, but not from sources. For example, Application.getComponent,
and etc.

And also i forced disable using of for enchancements and autoboxing, cos
degenerator tool not support it.

Thanks!
--
Alexey Efimov, Java Developer
Tops-BI
http://www.topsbi.ru


0
Comment actions Permalink

Alexey,
What degenerator tool were you referencing here?

I use generics from JDK 1.5 for all my plugins, and i
have build.xml for
launch degenerator tool.

0
Comment actions Permalink

Hello Martin,

MF> What degenerator tool were you referencing here?

Here:
http://www.intellij.org/twiki/bin/view/Main/PluginANTScript
But this script does not use Degenerator anymore. It just use -target jsr14.

Thanks!
--
Alexey Efimov, Java Developer
Tops BI
http://www.topsbi.ru


0

Please sign in to leave a comment.