Use of Degenerator code from idea.jar
Hi,
My plugin passes source code to a tool which does not yet support Java 5.
I would like to use the com.intellij.degenerator classes to convert generics
code to equivalent Java 1.4 code. How should I do this? I don't want to depend
on idea.jar; would it be okay to copy the degenerator classes into a separate
jar for my project? Or, could degenerator classes be moved to OpenAPI?
Thanks,
-Keith
Please sign in to leave a comment.
Degenerator itself uses Psi and project model that uses ... etc. mostly full
idea.jar
-
Maxim Shafirov
http://www.jetbrains.com
"Develop with pleasure!"
So, do you think I shouldn't use it, or I should simply include idea.jar
in my classpath?
>> Hi, My plugin passes source code to a tool which does not yet support
>> Java 5. I would like to use the com.intellij.degenerator classes to
>> convert generics code to equivalent Java 1.4 code. How should I do
>> this? I don't want to depend on idea.jar; would it be okay to copy
>> the degenerator classes into a separate jar for my project? Or, could
>> degenerator classes be moved to OpenAPI?
>>
>> Thanks,
>> -Keith
It depends on what your plans for plugin distribution are. You're not licensed
to redistribute idea.jar, right?
-
Maxim Shafirov
http://www.jetbrains.com
"Develop with pleasure!"
>> Degenerator itself uses Psi and project model that uses ... etc.
>> mostly full idea.jar
>>
>> -
>> Maxim Shafirov
>> http://www.jetbrains.com
>> "Develop with pleasure!"
>>> Hi, My plugin passes source code to a tool which does not yet
>>> support Java 5. I would like to use the com.intellij.degenerator
>>> classes to convert generics code to equivalent Java 1.4 code. How
>>> should I do this? I don't want to depend on idea.jar; would it be
>>> okay to copy the degenerator classes into a separate jar for my
>>> project? Or, could degenerator classes be moved to OpenAPI?
>>>
>>> Thanks,
>>> -Keith
My plugin will just be distributed through the plugin manager. I wouldn't
redistribute idea.jar, I'd just keep it on my classpath and depend on it
at runtime. Does that sound okay? Will degenerator stay in the code base
for a while?
>> So, do you think I shouldn't use it, or I should simply include
>> idea.jar in my classpath?
>>
>>> Degenerator itself uses Psi and project model that uses ... etc.
>>> mostly full idea.jar
>>>
>>> -
>>> Maxim Shafirov
>>> http://www.jetbrains.com
>>> "Develop with pleasure!"
>>>> Hi, My plugin passes source code to a tool which does not yet
>>>> support Java 5. I would like to use the com.intellij.degenerator
>>>> classes to convert generics code to equivalent Java 1.4 code. How
>>>> should I do this? I don't want to depend on idea.jar; would it be
>>>> okay to copy the degenerator classes into a separate jar for my
>>>> project? Or, could degenerator classes be moved to OpenAPI?
>>>>
>>>> Thanks,
>>>> -Keith
I think yes. At least I see no good reason to kill the beast right away.
-
Maxim Shafirov
http://www.jetbrains.com
"Develop with pleasure!"
Great, thanks.
I'm having problems compiling with idea.jar in classpath. javac says:
nully\idea-plugin\src\net\kano\nully\analysis\psipreprocess\PreparerForSoot.java
Error: Error: line (42)cannot access com.intellij.degenerator.DegeneratorUtil
bad class file: C:\Program Files\IDEA-Irida\lib\idea.jar(com/intellij/degenerator/DegeneratorUtil.class)
undeclared type variable: T
Please remove or make sure it appears in the correct subdirectory of the
classpath.
This is with javac 5.0u3 in 5.0 source mode. Do you know why this would happen,
or know of any workaround?
Thanks