开发者

Adding licensing support for Eclipse PDE

I have built an eclipse plugin which basically makes writing Java GUI applications as easy as using a 4GL programming language (Oracle Forms, Visual Basic etc). The plugin generates no GUI code but rather metadata which is parsed at runtime. I am building in a trial licence within the plugin but which will stop the plugin from working when开发者_StackOverflow the trial licence has run out. I am unsure of the best way to implement this. MAybe to stop one of the editors opening. I have managed to integrate my licensing software (Protection! from JProductivity), which will get called when the user tries to open on of my editors. But how can I stop an editor from opening?

Any help on this subject would be much appreciated!


Editor and its type alway is contributed by extension. So there is no good way to remove this extension besides early startup your bundle. But I don't think it's a good practice.

So the better way is checking your license in EditorPart.init(IEditorSite, IEditorInput) or createPartControl, throw the exception in init call or not create any widget in createPartControl if the license is invalid or expired.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜