<xml version= encoding=UTF?>
<eclipse version=?>
<plugin
id=FormSamples
name=FormSamples Plugin
version=
providername=nelson_tu
class=orgxqtusamplesFormSamplesPlugin>
<runtime>
<library name=FormSamplesjar>
<export name=*/>
</library>
</runtime>
<requires>
<import plugin=orgeclipseui/>
<import plugin=orgeclipsecoreruntime/>
<import plugin=orgeclipseuiforms/>
</requires>
<extension
point=orgeclipseuiviews>
<view
class=orgxqtusamplesviewsFormView
name=Form Sample
id=FormView/>
</extension>
</plugin>
()添加内容
public void createPartControl(Composite parent) {
toolkit = new FormToolkit(parentgetDisplay());
form = toolkitcreateScrolledForm(parent);
formsetText(Hello Eclipse Forms);
Composite body = formgetBody();
GridLayout layout = new GridLayout();
bodysetLayout(layout);
Hyperlink link = toolkitcreateHyperlink(body Click hereSWTWRAP);
linkaddHyperlinkListener(new HyperlinkAdapter() {
public void linkActivated(HyperlinkEvent e) {
Systemoutprintln(Link activated!);
}
});
}
[] [] []