添加对 Eclipse PDE 的许可支持

发布于 2024-10-04 14:47:02 字数 294 浏览 0 评论 0原文

我构建了一个 eclipse 插件,它基本上使编写 Java GUI 应用程序像使用 4GL 编程语言(Oracle Forms、Visual Basic 等)一样简单。该插件不生成 GUI 代码,而是生成在运行时解析的元数据。我正在插件中构建试用许可证,但是当试用许可证用完时,这将阻止插件工作。我不确定实现这一点的最佳方法。也许可以阻止其中一位编辑打开。我已经成功集成了我的许可软件(来自 JProductivity 的 Protection!),当用户尝试打开我的编辑器时将调用该软件。但是我怎样才能阻止编辑器打开呢?

任何有关此主题的帮助将不胜感激!

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 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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

最美不过初阳 2024-10-11 14:47:02

编辑器及其类型总是由扩展贡献的。因此,除了尽早启动您的捆绑包之外,没有什么好方法可以删除此扩展。但我认为这不是一个好的做法。

因此,更好的方法是在 EditorPart.init(IEditorSite, IEditorInput)createPartControl 中检查您的许可证,在 init 调用中抛出异常或不创建如果许可证无效或过期,则 createPartControl 中的任何小部件。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文