X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.g3d%2Fsrc%2Forg%2Fsimantics%2Fg3d%2Fproperty%2FAnnotatedPropertyTabContributorFactory.java;h=7e3f85333bb88022ce5038e43670bdf0ab792346;hb=refs%2Fchanges%2F02%2F3502%2F1;hp=7198ead22ba6ccd9ad96cc30303158f9a9b9f317;hpb=01441002a94a1f4ad2b078d63cb719ce617bd6cf;p=simantics%2F3d.git diff --git a/org.simantics.g3d/src/org/simantics/g3d/property/AnnotatedPropertyTabContributorFactory.java b/org.simantics.g3d/src/org/simantics/g3d/property/AnnotatedPropertyTabContributorFactory.java index 7198ead2..7e3f8533 100644 --- a/org.simantics.g3d/src/org/simantics/g3d/property/AnnotatedPropertyTabContributorFactory.java +++ b/org.simantics.g3d/src/org/simantics/g3d/property/AnnotatedPropertyTabContributorFactory.java @@ -216,6 +216,7 @@ public class AnnotatedPropertyTabContributorFactory implements PropertyTabContri private static Map createManipulators(CompoundPropertyItem item, Object obj) { try { + @SuppressWarnings("unchecked") Map map = (Map)item.getter.invoke(obj); Map result = new HashMap(); for (String key : map.keySet()) { @@ -232,7 +233,7 @@ public class AnnotatedPropertyTabContributorFactory implements PropertyTabContri return result; } catch (Exception e) { e.printStackTrace(); - return Collections.EMPTY_MAP; + return Collections.emptyMap(); } } @@ -980,9 +981,9 @@ public class AnnotatedPropertyTabContributorFactory implements PropertyTabContri if (focusCellManager != null) { try { Method m = focusCellManager.getClass().getSuperclass() - .getDeclaredMethod("init", null); + .getDeclaredMethod("init"); m.setAccessible(true); - m.invoke(focusCellManager, null); + m.invoke(focusCellManager); } catch (SecurityException e) { e.printStackTrace(); } catch (IllegalArgumentException e) { @@ -1050,9 +1051,10 @@ public class AnnotatedPropertyTabContributorFactory implements PropertyTabContri if (DEBUG)System.err.println("FOCUS CELL: " + focusCell); Method m = AbstractTableViewer.class.getDeclaredMethod( - "getSelectionFromWidget", null); + "getSelectionFromWidget"); m.setAccessible(true); - List l = (List) m.invoke(getViewer(), null); + @SuppressWarnings("rawtypes") + List l = (List) m.invoke(getViewer()); if (focusCellManager != null) { m = focusCellManager .getClass() @@ -1152,9 +1154,9 @@ public class AnnotatedPropertyTabContributorFactory implements PropertyTabContri ViewerColumn column = (ViewerColumn) m.invoke(viewer, new Object[] { new Integer(columnIndex) }); m = ViewerColumn.class.getDeclaredMethod( - "getEditingSupport", null); + "getEditingSupport"); m.setAccessible(true); - EditingSupport es = (EditingSupport) m.invoke(column, null); + EditingSupport es = (EditingSupport) m.invoke(column); if (column != null && es != null) { m = EditingSupport.class.getDeclaredMethod("canEdit", new Class[] { Object.class }); @@ -1258,10 +1260,9 @@ public class AnnotatedPropertyTabContributorFactory implements PropertyTabContri m.setAccessible(true); ViewerColumn column = (ViewerColumn) m.invoke(viewer, new Object[] { new Integer(cell.getColumnIndex()) }); - m = ViewerColumn.class.getDeclaredMethod("getEditingSupport", - null); + m = ViewerColumn.class.getDeclaredMethod("getEditingSupport"); m.setAccessible(true); - EditingSupport es = (EditingSupport) m.invoke(column, null); + EditingSupport es = (EditingSupport) m.invoke(column); if (column != null && es != null) { m = EditingSupport.class.getDeclaredMethod("canEdit", new Class[] { Object.class });