我们如何在目标平台上自动禁用 Eclipse 插件?
我们开发了一个名为 CodingSpectator 的 Eclipse 插件,它收集有关各种 Java 开发工具的使用情况的一些数据在日食中。这些数据帮助我们更好地了解开发人员如何使用 Eclipse 以及我们如何改进 Eclipse 以更好地满足程序员的需求。 CodingSpectator 从 Eclipse 中打开的每个工作区捕获数据。我们的一些用户开发 RCP 应用程序或 Eclipse 插件。因此,他们从其主 Eclipse 实例运行新的 Eclipse 实例。但是,我们不希望 CodingSpectator 从目标平台(从主 Eclipse 中打开的新 Eclipse 实例)收集数据。因此,我们指示用户配置其目标平台以排除 CodingSpectator(请参阅 http://codingspectator.cs.illinois.edu/resources/documentation/user-guide.html#htoc6)。但是,手动配置目标平台并不方便。而且,我们正在寻找更好的方法来停止从目标平台捕获数据。
我们如何在用户的目标平台上自动禁用 CodingSpectator?
We have developed an Eclipse plug-in called CodingSpectator that collects some data about the usage of various Java development tools in Eclipse. This data helps us better understand how developers use Eclipse and how we can improve Eclipse to better suit the needs of programmers. CodingSpectator captures data from every workspace that is opened in Eclipse. Some of our users develop RCP applications or Eclipse plug-ins. Therefore, they run new instances of Eclipse from their main instance of Eclipse. However, we don't want CodingSpectator to collect data from the target platforms (new instances of Eclipse opened from within the main Eclipse). So, we instruct our users to configure their target platform to exclude CodingSpectator (See http://codingspectator.cs.illinois.edu/resources/documentation/user-guide.html#htoc6). But, configuring the target platform manually is not convenient. And, we are looking for better ways to stop capturing data from target platforms.
How can we automatically disable CodingSpectator on the target platforms of our users?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
一种方法是查找 -dev 应用程序参数。从 Eclipse 中启动应用程序时,PDE 始终添加此参数。
One way could be to look for the -dev application argument. This argument is always added by PDE when launching an application from within Eclipse.
我使用
Platform.inDevelopmentMode()
来确定 Eclipse 实例是否是从另一个 Eclipse 实例中运行的。I used
Platform.inDevelopmentMode()
to determine if the instance Eclipse is run from within another instance of Eclipse.至少对于 RCP 应用程序来说,很可能已经定义了一个目标,以确保整个团队和版本的稳定性。
但对于那些想要使用开发人员版本的 Eclipse 测试插件的情况,也许您可以提供一个实用程序来创建目标。
目标可以由项目中的文件定义。您可以提供一个生成该文件的实用程序。用户所要做的就是:
For at least RCP applications, it's likely that a target has already been defined, for stability across a team and a release.
But for those cases where someone wants to test a plug-in using the developer's version of Eclipse, perhaps you could provide a utility to make the target.
A target can be defined by a file in a project. You could provide a utility that generates the file. All the user would have to do would be: