Reputation: 537
I have a plug-in which renders an editor to edit a specific file. I wants to create a same plug-in with few more features.
Is it possible to create my own plug-in using\inheriting existing plug-in and overriding few behaviors?
I'm well versed with creating a new plug-in from scratch. But can't figure out how to do this?
Upvotes: 0
Views: 86
Reputation: 61
In general, there is no "inherit" mecanism that allows to fully inherit from a plugin.
In particular, most extensions declared in a plugin.xml don't support any mecanism similar to "inheritance".
However, in some simple case, you may be able to duplicate the declarations from the parent plugin.xml in the child plugin.xml and adapt them to point to classes that inherit from the original classes in the parent plugin. But this technique has many limitations :
This requires a fine understanding of each reused classes and their relation to the original plugin in order to prevent unexpected behavior. (This is quite important if the parent plugin actually works with other plugins.)
For better result, the parent plugin need to be designed for reuse, typically providing reusable classes or even better providing dedicated extension points.
Upvotes: 0
Reputation: 17841
You cannot inherit from a plugin, even if you are the creator of both the plugin(at least in the standard meaning of the term Inheritance).
In any case, you can't inherit from other plugins like PDT, JDT, etc... If you think about it, that's the whole idea behind the Plugin architecture. Instead of inheritance, you can have two plugins work in harmony to satisfy the needs of the user, via Extensions and Extension Points.
Upvotes: 1