Cross version API compatibility [message #143233] |
Mon, 13 October 2003 15:01  |
Eclipse User |
|
|
|
Originally posted by: matt_conway.nospam.i2.com
I compile my plugin against eclipse 3.0M4, and try and run it in eclipse
2.1.1, and get the following verify error. Is this expected behavior?
i.e. should eclipse 3.0 be able to build plugins for use on both
versions? If not, how do I build a multi version plugin, expecially
when the plugin uses API (code reached through a extension point that
doesn't get triggered in 2.1) that only exist in 3.0? Thanks,
Matt
java.lang.VerifyError: (class: net/sourceforge/eclipseccase/MoveHandler,
method: validateDest signature:
(Lorg/eclipse/core/resources/IResource;Lorg/eclipse/core/run time/IProgressMonitor;)Lorg/eclipse/core/runtime/IStatus;)
Incompatible object argument for function call
|
|
|
Re: Cross version API compatibility [message #143348 is a reply to message #143233] |
Mon, 13 October 2003 21:45  |
Eclipse User |
|
|
|
Originally posted by: bob.objfac.com
"Matt Conway" <matt_conway@nospam.i2.com> wrote in message
news:bmesqi$jdd$1@eclipse.org...
> I compile my plugin against eclipse 3.0M4, and try and run it in eclipse
> 2.1.1, and get the following verify error. Is this expected behavior?
It would be the expected behavior if the type of the argument changed
between 2.1.1 and 3.0M4.
> i.e. should eclipse 3.0 be able to build plugins for use on both
> versions?
Oh, heck no. If you're lucky you may be able to go forward from 2.1.1 to
3.0. At least, an effort is made to make this work. But going back from 3.0
to 2.1.1 isn't in the cards.
> If not, how do I build a multi version plugin, expecially
> when the plugin uses API (code reached through a extension point that
> doesn't get triggered in 2.1) that only exist in 3.0?
A really good question.
The standard way to deal with version incompatibilities like this is to
engineer two (or more) loads that will fail if a particular version is not
present, that can be used as a test. Then provide two alternative ways of
doing the same thing and don't call/load classes that aren't going to work.
James Clark uses this technique in Jing to adapt to the regex packages in
Xerces 1 or Xerces 2. However, this only works if the two versions don't
have a class that is present in both but incompatible with each other, or
you will get verify errors like that one.
It is probably simpler to maintain two different versions and let your users
download one or the other.
Bob
> Thanks,
>
> Matt
>
>
> java.lang.VerifyError: (class: net/sourceforge/eclipseccase/MoveHandler,
> method: validateDest signature:
>
(Lorg/eclipse/core/resources/IResource;Lorg/eclipse/core/run time/IProgressMo
nitor;)Lorg/eclipse/core/runtime/IStatus;)
> Incompatible object argument for function call
>
|
|
|
Powered by
FUDForum. Page generated in 0.02676 seconds