IntelliJ and JDOM

Hello,

I've noticed IntelliJ uses JDOM beta 9 - are there any plans to upgrade
to JDOM 1.0?

If not, how can a plugin safely use JDOM 1.0 without affecting
IntelliJ's use of JDOM beta 9?

10x in advance!

7 comments
Comment actions Permalink

Due to separated plugin classloaders you may use whatever version of any
libraries you want.

-


Maxim Shafirov
http://www.jetbrains.com
"Develop with pleasure!"

Hello,

I've noticed IntelliJ uses JDOM beta 9 - are there any plans to
upgrade to JDOM 1.0?

If not, how can a plugin safely use JDOM 1.0 without affecting
IntelliJ's use of JDOM beta 9?

10x in advance!



0
Comment actions Permalink

I'm not sure (I've tried) because some of my classes are
JDOMExternalizable, which mean they accept JDOM's Element. If I use JDOM
1.0 in addition to IntelliJ's, then there would be two copies of
Element, and a ClassCastException would result.

I've tried it, and I've gotten "Element violates ClassLoader rules" or
something like that.

I've also tried replacing IntelliJ's JDOM with 1.0 (can't help it - I
was curious!!) but ofcourse it didn't work (since they moved some
classes around..)

Maxim Shafirov (JetBrains) wrote:

Due to separated plugin classloaders you may use whatever version of any
libraries you want.

-------------------
Maxim Shafirov
http://www.jetbrains.com
"Develop with pleasure!"

>> Hello,
>>
>> I've noticed IntelliJ uses JDOM beta 9 - are there any plans to
>> upgrade to JDOM 1.0?
>>
>> If not, how can a plugin safely use JDOM 1.0 without affecting
>> IntelliJ's use of JDOM beta 9?
>>
>> 10x in advance!
>>


0
Comment actions Permalink

Arik Kfir wrote:

I've tried it, and I've gotten "Element violates ClassLoader rules" or
something like that.


I had the same problem in my JIRA plugin, and ended up bundling a
jdom-hack.jar which included only those additional jars I used that
arn't shipped with IntelliJ ( the xpath stuff ), this got around the
duplicate classes, but is truely evil

0
Comment actions Permalink

Due to separated plugin classloaders you may use whatever version of any
libraries you want.


It's true for every library but JDOM, since JDOM is used in OpenApi.

0
Comment actions Permalink

I agree. I also got a suggestion in mevenide mailing list to use a reflection abstraction layer along with a custom classloader - I'm still probing into that, but it still doesn't "feel right".

Maxim - since you are in EAP mode - isn't now the best time to do it (assuming you do want to upgrade from a beta to a final release)?

Also - here is a link to the JIRA issue: http://www.jetbrains.net/jira/browse/IDEA-1498

0
Comment actions Permalink

OK, planned.

-


Maxim Shafirov
http://www.jetbrains.com
"Develop with pleasure!"

I agree. I also got a suggestion in mevenide mailing list to use a
reflection abstraction layer along with a custom classloader - I'm
still probing into that, but it still doesn't "feel right".

Maxim - since you are in EAP mode - isn't now the best time to do it
(assuming you do want to upgrade from a beta to a final release)?

Also - here is a link to the JIRA issue:
http://www.jetbrains.net/jira/browse/IDEA-1498



0
Comment actions Permalink

Great - 10x!

0

Please sign in to leave a comment.