* \r
* @see org.eclipse.ui.part.PageBookView#getAdapter(java.lang.Class)\r
*/\r
- @SuppressWarnings({ "rawtypes" })\r
+ @SuppressWarnings("unchecked")\r
@Override\r
- public Object getAdapter(Class adapter) {\r
+ public <T> T getAdapter(Class<T> adapter) {\r
if (adapter == IContributedContentsView.class) {\r
// This makes it possible to duplicate a PropertyPageView with another\r
// secondary ID and make it show the same property page that was showing\r
// in the original property page view.\r
- return new IContributedContentsView() {\r
+ return (T) new IContributedContentsView() {\r
@Override\r
public IWorkbenchPart getContributingPart() {\r
return getContributingEditor();\r
};\r
}\r
if (adapter == ISessionContextProvider.class)\r
- return contextProvider;\r
+ return (T) contextProvider;\r
return super.getAdapter(adapter);\r
}\r
\r