if (adapter == RiderDesignEditor.class) {
return this.designEditor;
} else if (adapter == TextEditor.class) {
return this.sourceEditor;
} else if (adapter == IPropertySheetPage.class) {
return new TabbedPropertySheetPage(this);
} else if (adapter == ActionRegistry.class) {
// this is needed otherwise switching between source
// and design tab sometimes throws NPE
return designEditor.getActionRegistry();
} else if (adapter == IDocumentProvider.class) {