+ new DefaultToolTip(table, ToolTip.NO_RECREATE, false) {
+
+ @Override
+ protected boolean shouldCreateToolTip(Event event) {
+ TableItem item = table.getItem(new Point(event.x, event.y));
+ if (item != null) {
+ ComponentTypeViewerPropertyInfo info = (ComponentTypeViewerPropertyInfo) item.getData();
+ return info.valid != null;
+ }
+ return false;
+ }
+
+ @Override
+ protected String getText(Event event) {
+ TableItem item = table.getItem(new Point(event.x, event.y));
+ if (item != null) {
+ ComponentTypeViewerPropertyInfo info = (ComponentTypeViewerPropertyInfo) item.getData();
+ return info.valid.replaceAll("\n", "");
+ }
+ return super.getText(event);
+ }
+ };
+