25 lines
630 B
Java
25 lines
630 B
Java
|
package com.itjw.txviewer.ui.adapter;
|
||
|
|
||
|
import org.eclipse.core.runtime.IAdapterFactory;
|
||
|
import org.eclipse.ui.views.properties.IPropertySource;
|
||
|
|
||
|
import com.itjw.txviewer.database.ITransaction;
|
||
|
|
||
|
public class AdapterFactory implements IAdapterFactory {
|
||
|
|
||
|
@SuppressWarnings("rawtypes")
|
||
|
@Override
|
||
|
public Object getAdapter(Object adaptableObject, Class adapterType) {
|
||
|
if (adapterType == IPropertySource.class)
|
||
|
return new ITransactionPropertySource((ITransaction) adaptableObject);
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
@SuppressWarnings("rawtypes")
|
||
|
@Override
|
||
|
public Class[] getAdapterList() {
|
||
|
return new Class[]{IPropertySource.class};
|
||
|
}
|
||
|
|
||
|
}
|