|Restricting Target Platform's API usage when developing Eclipse plugins [message #1755953]
||Thu, 09 March 2017 13:53
| Alexander Levsha
Registered: December 2013
I'm developing an Eclipse plugin and i've run into this problem several times already.|
I always keep my Target Platform updated for the latest (stable) Eclipse release so that i test my code against all the recent updates, fixes etc.
However, this may (and have) result in accidental breakage of backward compatibility of my plugin, e.g. when i accidentally use new API that did not exist in the Eclipse version i aim to support.
Or, more sneaky example, in 4.6 Eclipse moved to Java 8 and some interface methods got default implementations. Now when i implement these interfaces my IDE doesn't automatically generate empty implementations for those methods and no error is generated. If i install and run this code against a previous Eclipse version these methods will throw AbstractMethodError since no implementation has been provided.
So my question is: is there a tool to further restrict API my Target Platform provides to some earlier Eclipse API version?
Is API Baseline an appropriate tool for this? Because i couldn't get it to work like this. (It allowed even non-baseline method calls not to mention the more complex default-methods example.)
[Updated on: Thu, 09 March 2017 13:55]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01977 seconds