IntelliJ Community . StubbingIdeaJar

 
StubbingIdeaJar 

HOME INDEX SEARCH CHANGES GO  
Re: http://www.intellij.net/forums/thread.jsp?forum=23&thread=58913&tstart=0&trange=15

A few people (myself included) have noticed that the latest EAP (922) idea.jar isn't readable from the EA generics javac compiler (with bad signature) errors.

I have a workaround. Basically, I create a new idea.jar that contains classes with the exact same signatures, but without whatever generics stuff is screwing up javac. It's enough to compile against (but not run against).

A little program is attached that you can use to stub idea.jar. (It wouldn't let me upload the 6 meg pre-stubbed idea.jar, sorry)

You'll need BCEL first, from http://jakarta.apache.org/site/binindex.cgi

Compile it & run like this:

java -cp classes;C:\bcel-5.1\bcel-5.1.jar CompileStubGenerator idea.jar stubs.jar

Then put stubs.jar into your project instead of idea.jar like you normally do. Magic. smile

-- PaulMclachlan - 12 Dec 2003

Thanks Paul, it work. I just find that problems only in VirtualFile?, and i put jar. You can use for fix 992:

  • In %IDEA_HOME%/lib directory create "hotfixes" directory.
  • Put openapi-vfs-992.jar into %IDEA_HOME%/lib/hotfixes
  • Add to your module project library "hotfixes" with it jar, and be sure that it above openapi.jar or idea.jar in project libraries order.
  • Also link this file in ANT script, if needed.

-- AlexeyEfimov - 13 Dec 2003


Dave found a bug with this not stubbing PsiJavaToken?.EQ properly - because I wasn't storing constants in the stub classes (and these constants are inlined by javac in classes compiled against the stubs), so I've attached a 'version 2' that fixes this problem.

-- PaulMclachlan - 23 Dec 2003


Compiled all requered classes into one jar, see classRewriter.jar in attachments (287KB). Using: java -jar classRewriter.jar

-- AlexeyEfimov - 20 Jan 2004

Attachment: sort Action: Size: Date: Who: Comment:
CompileStubGenerator.java action 7478 24 Dec 2003 - 00:16 PaulMclachlan Version 2
openapi-vfs-992.jar action 1541 13 Dec 2003 - 15:10 AlexeyEfimov 992 VirtualFile? hotfix
openapi-stub-996.jar action 179868 15 Dec 2003 - 20:31 DaveKriewall OpenAPI build 996 stub
idea-stub-996.jar action 6210639 15 Dec 2003 - 20:36 DaveKriewall idea.jar build 996 stub
classRewriter.jar action 287532 20 Jan 2004 - 20:11 AlexeyEfimov Compiled convertor wich requeres BCEL 5.1 included

e d i t a t t a c h r e f - b y d i f f s m o r e
Have ideas, requests, problems regarding this site? Send feedback.
Copyright © 2000-2003 by the contributing authors. All materials at intellij.org are the property of the contributing authors.