I was wondering what would be the right to go: I have an eclipse rcp application which uses some JPA entities. Now I’ve would love to use the adapter pattern, which is provided through the IAdapterFactory and the IAdaptable interface. According to this article my entity has to implement the IAdaptable interface but I want to have clean entities and I also do not want write stupid ContentProvider. My question: Do I have any other choice then using ContentProvider?
I was wondering what would be the right to go: I have an eclipse
Share
Look at this
They say that it is not strictly necessary to implement
IAdaptable.It is also possible to do this
e.g.
WorkbenchLabelProviderusesorg.eclipse.ui.internal.util.Util.getAdapter()which checks if object isIAdaptablelater usesIAdapterManager.IAdapterManagermanagesIAdapterFactories. Adapter factories can be registered programatically using theregisterAdaptersmethod. Alternatively, they can be registered declaratively using theorg.eclipse.core.runtime.adaptersextension point.