Eclipse plugins jar



当我们在eclipse中运行应用程序时,如何识别eclipse中调用的是哪个jar。

当我们运行一个应用程序

时,是否有任何进程或代码会给我们特定的jar名称

我认为您需要与Eclipse本身的About对话框中相同的内容,但针对您的应用程序。在这种情况下,您可以简单地查询平台。类似:

IBundleGroupProvider[] bundleGroupProviders = Platform.getBundleGroupProviders(); 
for (IBundleGroupProvider bundleProvider : bundleGroupProviders) {
  for (IBundleGroup bundleGroup : bundleProvider.getBundleGroups()) {
    Bundle aSingleBundle = bundleGroup.getBundles();
    // TODO: do something useful with this precious information
  }
}

这将为您提供加载了应用程序的所有捆绑包

您可能对Eclipse插件系统有误解。如果您运行的是一个Eclipse应用程序,那么这个应用程序由几百个插件组成,在正常情况下,大量插件会同时执行。一个只用于管理您的工作区,一个用于某个视图,另一个用于另一个视图,依此类推

最新更新