private static Map<PropertyItem, PropertyManipulator> createManipulators(CompoundPropertyItem item, Object obj) {
try {
+ @SuppressWarnings("unchecked")
Map<String,Object> map = (Map<String, Object>)item.getter.invoke(obj);
Map<PropertyItem, PropertyManipulator> result = new HashMap<AnnotatedPropertyTabContributorFactory.PropertyItem, PropertyManipulator>();
for (String key : map.keySet()) {
return result;
} catch (Exception e) {
e.printStackTrace();
- return Collections.EMPTY_MAP;
+ return Collections.emptyMap();
}
}
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) {
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()
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 });
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 });