定义简介内容

现在,我们可以看一下内容本身。内容是按页面来描述的。所有页面都具有 id 属性。这是定义主页和备用页面以及引用了页面的其它位置时所使用的标识。否则,相关属性取决于所定义的页面种类。有两种基本类型的页面:

获得关于内容定义格式的感性知识的最好办法就是在 SDK 中浏览实现。以下片段只显示了 SDK 根页(它是所显示的第一个简介页面)的内容的第一部分。

<introContent>
  <page alt-style="css/root_swt.properties" style="css/root.css" id="root" style-id="page">
    <title style-id="intro-header">Welcome to Eclipse Platform 3.0</title>
    <group id="links-background">
      <group id="page-links">
        <link label="Overview" url="http://org.eclipse.ui.intro/showPage?id=overview" id="overview" style-id="left">
          <text>Find out what Eclipse is all about</text>
        </link>
        <link label="Tutorials" url="http://org.eclipse.ui.intro/showPage?id=tutorials" id="tutorials" style-id="left">
          <text>Let us guide you through Eclipse end-to-end tutorials</text>
        </link>
        <link label="Samples" url="http://org.eclipse.ui.intro/showPage?id=samples" id="samples" style-id="right">
          <text>Explore Eclipse development through code samples</text>
        </link>
        <link label="Whats New" url="http://org.eclipse.ui.intro/showPage?id=news" id="news" style-id="right">
          <text>Find out what is new in this release</text>
        </link>
    </group>
</group>

页面上的元素还可以从特定实现过滤(filteredFrom)。这允许页面设计者针对特定平台进行设计。当描述页面及其内容时,可以使用许多功能更强大的属性。有关有效元素、子元素及其属性的完整参考,请参阅 org.eclipse.ui.intro.config 的扩展点文档及其相关联的简介内容文件格式规范