// Event notifications private void notifyFieldSelected(ObjectProperty selectedProperty) { if (!skipNextFieldNotification && selectedProperty != null) { context.setObjectProperty(selectedProperty); dataModelerWBContextEvent.fire(new DataModelerWorkbenchContextChangeEvent()); } skipNextFieldNotification = false; }
private void deleteDataObjectProperty(final ObjectProperty objectProperty, final int index) { if (dataObject != null) { dataObject.getProperties().remove(objectProperty); dataObjectPropertiesProvider.getList().remove(index); dataObjectPropertiesProvider.flush(); dataObjectPropertiesProvider.refresh(); getContext() .getHelper() .dataObjectUnReferenced(objectProperty.getClassName(), dataObject.getClassName()); notifyFieldDeleted(objectProperty); if (dataObjectPropertiesProvider.getList().size() == 0) { context.setObjectProperty(null); dataModelerWBContextEvent.fire(new DataModelerWorkbenchContextChangeEvent()); } else if (dataObjectPropertiesProvider.getList().size() == 1) { // BZ-1255449 tricky bug. Considerable time was spent, and it was no direct to find an // optimal/better solution. // Since in this use case the Data Object will have just one field, it's acceptable to // reload the list. setDataObject(dataObject); } } }
private void notifyObjectSelected() { context.setObjectProperty(null); dataModelerWBContextEvent.fire(new DataModelerWorkbenchContextChangeEvent()); }