Eclipse preference page
<p>I'm working on adding a preference page to my eclipse application (Juno). I would like create something similar to what you see on the following Eclipse preference page: Eclipse (Juno) > Window Menu > Preferences > Java > Compiler > Building. That preference page appears to be created using org.eclipse.swt.widgets.Tree, but I'm not sure. If that is the case, how did they create the TreeItems? Are they org.eclipse.swt.widgets.TreeItems? I need to add StringFieldEditors and IntegerFieldEditors, or some type of fields (TextArea??), with some labels in front of them, that I could validate later on. From what I understand, it's not possible to add a Composite to a TreeItem, so how should I go around this problem? Any suggestion is greatly appreciated. Thanks.</p>

<p>Need to add that, since I can't use the Eclipse internal packages, is there other way to implement what I described above using the public API?</p>

<p>Here is an idea, but this code places the TreeItems contents under the tree. Thoughts?</p>

<pre><code>    Composite comp = getFieldEditorParent();

    Tree tree = new Tree(comp, SWT.NONE);
    tree.setLayout(new FillLayout());
    tree.setHeaderVisible(true);

    TreeItem item1 = new TreeItem(tree, SWT.NONE);
    item1.setText("Name1");

    TreeItem item11 = new TreeItem(item1, SWT.NONE);
    item11.setText("Name11");
    StringFieldEditor s11 = new StringFieldEditor(
        "name11",
        "label11:",
        comp);
    item11.setData(s11);

    TreeItem item12 = new TreeItem(item1, SWT.NONE);
    item12.setText("Name12");
    StringFieldEditor s12 = new StringFieldEditor(
        "name12",
        "label12:",
        comp);
    item12.setData(s12);


    item1.setExpanded(true);
    item11.setExpanded(true);
    item12.setExpanded(true);


    TreeItem item2 = new TreeItem(tree, SWT.NONE);
    item2.setText("Name2");
</code></pre>
