如何获得“可用软件站点”以Eclipse方式编程 [英] How to get the "available software sites" in eclipse programmatically

查看:554
本文介绍了如何获得“可用软件站点”以Eclipse方式编程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想检查我的日食中安装了哪些可用软件站点。 (例如 - 检查是否安装在我的eclipse上)通过C ++通过QT。



我知道如何从eclipse(帮助 - >安装新软件 - >可用软件站点链接 - http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Freference%2Fref-p2-siteprefs.htm )。
但我不知道如何从c ++代码...
任何想法?

解决方案

它的数据看起来像在Eclipse安装中的 p2 目录的子目录中。



子目录 org.eclipse.equinox.p2.engine / profileRegistry / xxx.profile / .data / .settings 包含文件 org.eclipse.equinox.p2.artifact.repository.prefs org.eclipse.equinox.p2.metadata.repository.prefs 这两个似乎都有可用的更新站点信息。



xxx.prefs文件是Java的属性文件,必须被读取通过了解该格式的内容,包括特殊字符转义和Unicode编码。


I want to check in which "available software sites" is installed in my eclipse. (for example- check is CDT installed on my eclipse) through C++ via QT.

I know how to do that from eclipse (Help -> install new software -> available software sites link - http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Freference%2Fref-p2-siteprefs.htm). But I don't know how to do that from c++ code... Any idea please?

解决方案

It looks like the data for this is in a subdirectory of the p2 directory in the Eclipse installation.

The subdirectory org.eclipse.equinox.p2.engine/profileRegistry/xxx.profile/.data/.settings contains the files org.eclipse.equinox.p2.artifact.repository.prefs and org.eclipse.equinox.p2.metadata.repository.prefs both of which seem to have available update site information.

The xxx.prefs files are Java 'properties' files and will have to be read by something that understands that format, including the special character escaping and Unicode encoding.

这篇关于如何获得“可用软件站点”以Eclipse方式编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆