如何获得“可用软件站点”以Eclipse方式编程 [英] How to get the "available software sites" in eclipse programmatically
问题描述
我知道如何从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屋!