]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.browsing.ui.platform/src/org/simantics/browsing/ui/platform/VariablesPageView.java
Lots of small fixes for the Simantics SDK build
[simantics/platform.git] / bundles / org.simantics.browsing.ui.platform / src / org / simantics / browsing / ui / platform / VariablesPageView.java
index d42f383157f45263b4a80376fb7ce9590111897e..f56cdfcf59697deae2109f830e5fe369956e4950 100644 (file)
@@ -126,14 +126,14 @@ public class VariablesPageView extends PageBookView implements ISelectionListene
      * \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
@@ -141,7 +141,7 @@ public class VariablesPageView extends PageBookView implements ISelectionListene
             };\r
         }\r
         if (adapter == ISessionContextProvider.class)\r
-            return contextProvider;\r
+            return (T) contextProvider;\r
         return super.getAdapter(adapter);\r
     }\r
 \r