对通用简介添加内容

为了连接到通用简介,开发者应该使用基于产品的 Eclipse 应用程序。这要求使用 org.eclipse.runtime.products 扩展点(假定产品已定义):

   <extension
         id="foo"
         point="org.eclipse.core.runtime.products">
      <product
            application="org.eclipse.ui.ide.workbench"
            description="Product Foo to use for testing the universal intro"
            name="Product Foo">
      </product>
   </extension>

在本示例中,假定扩展是在 com.example.intro 插件中的 plugin.xml 文件中定义的。Eclipse 简介支持的一项长期功能是能够使用“产品-简介”品牌来连接产品和简介:

   <extension
         point="org.eclipse.ui.intro">
      <introProductBinding
            introId="org.eclipse.ui.intro.universal"
            productId="com.example.intro.foo"/>
   </extension>

以上扩展将通用简介实现(org.eclipse.ui.intro.universal)与我们的产品标识绑定。

通用简介定制分为产品品牌属性和首选项。产品品牌属性由产品设置,不能修改。它们包括标题、品牌形象和品牌形象文本:

   <product
         application="org.eclipse.ui.ide.workbench"
         description="Product Foo to use for testing the universal intro"
         name="Product Foo">
      <property
            name="introTitle"
            value="Welcome to Product Bar"/>
      <property
            name="introBrandingImage"
            value="product:eclipse.png"/>
      <property
            name="introBrandingImageText"
            value="XYZ Company"/>
   </product>

如果产品属性的值表示相对于产品捆绑软件的文件名,则必须使用“product:”前缀来对该值进行限定。支持下列属性:

通用简介变量的第二部分是作为首选项访问的。这样划分的原因是,这些变量可以由用户配置,并且将显示在新的“欢迎”首选项页上。应该在从产品扩展中引用的“plugin_customization.ini”文件中指定这些首选项的初始值。这些首选项是: