重载getAdapter方法:
public Object getAdapter(Class required) {
if (org.eclipse.ui.views.properties.IPropertySheetPage.class
.equals(required){
org.eclipse.wst.sse.ui.views.properties.PropertySheetConfiguration cfg = createPropertySheetConfiguration();
if (cfg != null) {
PropertySheet propertySheetPage = new PropertySheet(
this);
propertySheetPage.setConfiguration(cfg);
}
}
public class PropertySheet extends Page implements
IPropertySheetPage {
public void selectionChanged(IWorkbenchPart part, ISelection selection) {
//change form part
}