}
public static void registerWorkbenchAdapters()
{
// IWorkbenchAdapter
Platform.getAdapterManager().registerAdapters(new IAdapterFactory() {
public Object getAdapter(Object adaptableObject, Class adapterType) {
if (adapterType == IWorkbenchAdapter.class)
return createSpreadsheetEntryWorkbenchAdapter();
if (adapterType == IPropertySource.class)
return createSpreadsheetPropertySource((SpreadsheetEntry)adaptableObject);
return null;
}
public Class[] getAdapterList() {
return new Class[] { IWorkbenchAdapter.class, IPropertySource.class };
}
}, SpreadsheetEntry.class);
Platform.getAdapterManager().registerAdapters(new IAdapterFactory() {
public Object getAdapter(Object adaptableObject, Class adapterType) {
if (adapterType == IWorkbenchAdapter.class)
return createDocumentEntryWorkbenchAdapter();
if (adapterType == IPropertySource.class)
return createDocumentPropertySource((DocumentListEntry)adaptableObject);