Eclipse应用的更新
阅读数:90 评论数:0
跳转到新版页面分类
python/Java
正文
创建p2更新站点
安装的单元可以放到p2库中,使用URI定义一个库,URI可以指向本地文件系统或一个web服务器。p2库也常称为更新站点。
在导出Eclipse应用时,可以勾选Generate p2 repository选项。
勾选了这个选项后,update site会被创建在导出目录的repository子目录里。
p2 复合库
这种库会包含其它库的信息,client连接这种库, 不仅可以从本库还可以从其包含的其它库来安装features。
为了创建这样的复合库,需要创建两个文件,一个称为compositeContent.xml,另一个称为compositeArtifacts.xml。
compositeContent.xml文件示例
<?xml version='1.0' encoding='UTF-8'?>
<?compositeMetadataRepository version='1.0.0'?>
<repository name='"oclipse development environment"'
type='org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository'
version='1.0.0'>
<properties size='1'>
<property name='p2.timestamp' value='1243822502499' />
</properties>
<children size='2'>
<child location='http://download.eclipse.org/releases/luna/'/>
<child location='http://dl.bintray.com/vogellacompany/eclipse-preference-spy/'/>
</children>
</repository>
compositeArtifacts.xml文件示例
<?xml version='1.0' encoding='UTF-8'?>
<?compositeArtifactRepository version='1.0.0'?>
<repository name='"voclipse development environment"'
type='org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository'
version='1.0.0'>
<properties size='1'>
<property name='p2.timestamp' value='1243822502440' />
</properties>
<children size='2'>
<child location='http://download.eclipse.org/releases/luna/' />
<child location='http://dl.bintray.com/vogellacompany/eclipse-preference-spy/' />
</children>
</repository>
更新Eclipse RCP应用
为了更新Eclipse 4 应用,需要使用p2 API。
相关推荐
Eclipse RCP是Rich Client Platform,即富客户平台,使用者可以使用Java来创建桌面程序,这些应用程序能够得到Eclipse的底层支持。
1、下载</p
运行时,Eclipse 应用的结构是通过一个application model来描述的。这个application model包含了应用中独立的元素和它们的结构关系。
每个mode
每个plug-ins可以通过下面方式作用于application model:
(1)static contributions
通过文件,这些扩展称为fragment
1、@javax.inject.Inject
定义在JSR330中 ,可以写在字段、构建函数或方法上,Eclipse 框架试图把相关的对象注入到字段或实例的参数上。
一个Eclipse应用在启动过程时会创建一个实现IEclipseContext接口的对象,这个对象称为Eclipse context。
这个context和Map数据结构类似,但和
Eclipse application model允许你指定command和handlers。
command和handlers model element的使用是可选的,你可以使
一个Eclipse application的配置包括icons、splash screen和plug-ins。
一个product总是指向一个application class,对
一个feature可以理解为一个逻辑单元,描述了一组plug-in和其它features。它也有name、version number和license information。
f