From 74a878fe6015531ddb00bba2daa6cb288e25def9 Mon Sep 17 00:00:00 2001 From: thuster Date: Thu, 8 Aug 2024 10:59:56 +0200 Subject: [PATCH 1/5] [26525] do not use ElexisEventDispatcher on InvoiceCorrectionView --- .../views/rechnung/InvoiceCorrectionView.java | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/bundles/ch.elexis.core.ui/src/ch/elexis/core/ui/views/rechnung/InvoiceCorrectionView.java b/bundles/ch.elexis.core.ui/src/ch/elexis/core/ui/views/rechnung/InvoiceCorrectionView.java index c43c4af162..6251247a09 100644 --- a/bundles/ch.elexis.core.ui/src/ch/elexis/core/ui/views/rechnung/InvoiceCorrectionView.java +++ b/bundles/ch.elexis.core.ui/src/ch/elexis/core/ui/views/rechnung/InvoiceCorrectionView.java @@ -85,8 +85,6 @@ import ch.elexis.core.common.ElexisEventTopics; import ch.elexis.core.constants.Preferences; import ch.elexis.core.constants.StringConstants; -import ch.elexis.core.data.events.ElexisEvent; -import ch.elexis.core.data.events.ElexisEventDispatcher; import ch.elexis.core.data.interfaces.IFall; import ch.elexis.core.data.interfaces.IPersistentObject; import ch.elexis.core.data.service.LocalLockServiceHolder; @@ -99,8 +97,10 @@ import ch.elexis.core.model.IBillable; import ch.elexis.core.model.IBilled; import ch.elexis.core.model.IDiagnosis; +import ch.elexis.core.model.IEncounter; import ch.elexis.core.model.IInvoice; import ch.elexis.core.model.IUser; +import ch.elexis.core.services.IContextService; import ch.elexis.core.ui.UiDesk; import ch.elexis.core.ui.actions.CodeSelectorHandler; import ch.elexis.core.ui.dialogs.DateSelectorDialog; @@ -153,6 +153,9 @@ public class InvoiceCorrectionView extends ViewPart implements IUnlockable { private boolean unlocked; + @Inject + private IContextService contextService; + @SuppressWarnings("unchecked") private final List detailComposites = Extensions.getClasses(VIEWCONTRIBUTION, VIEWCONTRIBUTION_CLASS, VIEWCONTRIBUTION_VIEWID, RnDetailView.ID); @@ -221,8 +224,8 @@ void activeUser(@Optional IUser user) { private void adaptForUser(IUser user) { if (actualInvoice != null) { - ElexisEventDispatcher.getInstance() - .fire(new ElexisEvent(actualInvoice, actualInvoice.getClass(), ElexisEvent.EVENT_RELOAD)); + contextService.postEvent(ElexisEventTopics.EVENT_UPDATE, + NoPoUtil.loadAsIdentifiable(actualInvoice, IInvoice.class)); } else { reload(null); } @@ -271,9 +274,9 @@ public void createPartControl(Composite parent) { parent.setLayout(new GridLayout(1, false)); invoiceComposite = new InvoiceComposite(parent); invoiceComposite.createComponents(invoiceCorrectionDTO); - Rechnung selected = (Rechnung) ElexisEventDispatcher.getSelected(Rechnung.class); - if (selected != null) { - reload(selected); + java.util.Optional selected = contextService.getTyped(IInvoice.class); + if (selected.isPresent()) { + reload((Rechnung) NoPoUtil.loadAsPersistentObject(selected.get())); } } @@ -473,7 +476,7 @@ public void setUnlocked(boolean unlocked) { private void openInvoiceNr(String invoiceNr) { Rechnung r = Rechnung.getFromNr(invoiceNr); if (r != null) { - ElexisEventDispatcher.fireSelectionEvent(r); + contextService.setTyped(NoPoUtil.loadAsIdentifiable(r, IInvoice.class)); } else { MessageDialog.openError(UiDesk.getDisplay().getActiveShell(), "Fehler", "Die Rechnung mit der Nummer: " + invoiceNr + " konnte nicht geöffnet werden.\nBitte versuchen Sie diesn manuell zu öffnen."); @@ -612,9 +615,9 @@ public void expansionStateChanged(ExpansionEvent e) { if ((boolean) e.data) { Konsultation originKons = Konsultation.load(konsultationDTO.getId()); - ElexisEventDispatcher.fireSelectionEvent(originKons); + contextService.setTyped(NoPoUtil.loadAsIdentifiable(originKons, IEncounter.class)); } else { - ElexisEventDispatcher.clearSelection(Konsultation.class); + contextService.removeTyped(IEncounter.class); } } }); @@ -1281,8 +1284,8 @@ public void widgetSelected(SelectionEvent e) { openInvoiceNr(invoiceCorrectionDTO.getNewInvoiceNumber()); } else { // reloads the current invoice nr - ElexisEventDispatcher.getInstance().fire( - new ElexisEvent(actualInvoice, actualInvoice.getClass(), ElexisEvent.EVENT_RELOAD)); + contextService.postEvent(ElexisEventTopics.EVENT_UPDATE, + NoPoUtil.loadAsIdentifiable(actualInvoice, IInvoice.class)); } } } From 1ff8cf5945519a547c50936ad13348a5aa5abe87 Mon Sep 17 00:00:00 2001 From: pdenzler Date: Thu, 8 Aug 2024 15:03:04 +0200 Subject: [PATCH 2/5] [26521] display name of patient stock (#692) Co-authored-by: pdenzler --- .../src/ch/elexis/core/l10n/Messages.java | 2 + .../ch/elexis/core/l10n/messages.properties | 4 ++ .../elexis/core/l10n/messages_de.properties | 4 ++ .../elexis/core/l10n/messages_en.properties | 4 ++ .../elexis/core/l10n/messages_fr.properties | 4 ++ .../elexis/core/l10n/messages_it.properties | 4 ++ .../ch/elexis/core/ui/dialogs/Messages.java | 8 ++++ .../core/ui/dialogs/OrderImportDialog.java | 46 ++++++++++++++----- .../ch/elexis/core/ui/views/BestellView.java | 21 +++++---- 9 files changed, 76 insertions(+), 21 deletions(-) diff --git a/bundles/ch.elexis.core.l10n/src/ch/elexis/core/l10n/Messages.java b/bundles/ch.elexis.core.l10n/src/ch/elexis/core/l10n/Messages.java index 5b026a0e2d..acc0a1919b 100644 --- a/bundles/ch.elexis.core.l10n/src/ch/elexis/core/l10n/Messages.java +++ b/bundles/ch.elexis.core.l10n/src/ch/elexis/core/l10n/Messages.java @@ -480,6 +480,8 @@ public class Messages extends NLS { public static String BestellView_loadEarlierOrder; public static String BestellView_saveOrder; public static String BestellView_transmitOrder; + public static String BestellView_inventory; + public static String BestellView_delivered; public static String BezugsKonktat_FormalerReference; public static String BezugsKontakt_ContactDoesntExist; public static String Bezugskontakt_ConfirmDelete; diff --git a/bundles/ch.elexis.core.l10n/src/ch/elexis/core/l10n/messages.properties b/bundles/ch.elexis.core.l10n/src/ch/elexis/core/l10n/messages.properties index 32374bce45..ad2bf90b0d 100644 --- a/bundles/ch.elexis.core.l10n/src/ch/elexis/core/l10n/messages.properties +++ b/bundles/ch.elexis.core.l10n/src/ch/elexis/core/l10n/messages.properties @@ -947,6 +947,10 @@ BestellView_saveOrder = save order BestellView_transmitOrder = transmit order automatically +BestellView_inventory = inventory + +BestellView_delivered = delivered + BezugsKonktat_FormalerReference = formal reference BezugsKontakt_ContactDoesntExist = This contact does not exist diff --git a/bundles/ch.elexis.core.l10n/src/ch/elexis/core/l10n/messages_de.properties b/bundles/ch.elexis.core.l10n/src/ch/elexis/core/l10n/messages_de.properties index 824aecab80..16a60f3f74 100644 --- a/bundles/ch.elexis.core.l10n/src/ch/elexis/core/l10n/messages_de.properties +++ b/bundles/ch.elexis.core.l10n/src/ch/elexis/core/l10n/messages_de.properties @@ -945,6 +945,10 @@ BestellView_saveOrder = Bestellung speichern BestellView_transmitOrder = Bestellung automatisch \u00FCbermitteln +BestellView_inventory = Bestand + +BestellView_delivered = Geliefert + BezugsKonktat_FormalerReference = Formaler Bezug BezugsKontakt_ContactDoesntExist = Angegebener Kontakt nicht vorhanden diff --git a/bundles/ch.elexis.core.l10n/src/ch/elexis/core/l10n/messages_en.properties b/bundles/ch.elexis.core.l10n/src/ch/elexis/core/l10n/messages_en.properties index 83f7dc7e6b..fe20c40762 100644 --- a/bundles/ch.elexis.core.l10n/src/ch/elexis/core/l10n/messages_en.properties +++ b/bundles/ch.elexis.core.l10n/src/ch/elexis/core/l10n/messages_en.properties @@ -925,6 +925,10 @@ BestellView_saveOrder = Save order BestellView_transmitOrder = Submit order automatically +BestellView_inventory = Inventory + +BestellView_delivered = Delivered + BezugsKonktat_FormalerReference = Formal reference BezugsKontakt_ContactDoesntExist = Specified contact not available diff --git a/bundles/ch.elexis.core.l10n/src/ch/elexis/core/l10n/messages_fr.properties b/bundles/ch.elexis.core.l10n/src/ch/elexis/core/l10n/messages_fr.properties index c202766ece..3ffaa006a7 100644 --- a/bundles/ch.elexis.core.l10n/src/ch/elexis/core/l10n/messages_fr.properties +++ b/bundles/ch.elexis.core.l10n/src/ch/elexis/core/l10n/messages_fr.properties @@ -921,6 +921,10 @@ BestellView_saveOrder = Sauver commande BestellView_transmitOrder = Envoyer automatiquement la commande +BestellView_inventory = Inventaire + +BestellView_delivered = Livré + BezugsKonktat_FormalerReference = R\u00E9f\u00E9rence formelle BezugsKontakt_ContactDoesntExist = Aucun contact d\u00E9clar\u00E9 diff --git a/bundles/ch.elexis.core.l10n/src/ch/elexis/core/l10n/messages_it.properties b/bundles/ch.elexis.core.l10n/src/ch/elexis/core/l10n/messages_it.properties index 5707befc4c..3bbd54532e 100644 --- a/bundles/ch.elexis.core.l10n/src/ch/elexis/core/l10n/messages_it.properties +++ b/bundles/ch.elexis.core.l10n/src/ch/elexis/core/l10n/messages_it.properties @@ -923,6 +923,10 @@ BestellView_saveOrder = Salva ordine BestellView_transmitOrder = Inviare automaticamente ordine +BestellView_inventory = Inventario + +BestellView_delivered = Consegnato + BezugsKonktat_FormalerReference = Riferimento formale BezugsKontakt_ContactDoesntExist = Detto Contatto No diff --git a/bundles/ch.elexis.core.ui/src/ch/elexis/core/ui/dialogs/Messages.java b/bundles/ch.elexis.core.ui/src/ch/elexis/core/ui/dialogs/Messages.java index dc5f6ec2a1..aeffcd2b57 100644 --- a/bundles/ch.elexis.core.ui/src/ch/elexis/core/ui/dialogs/Messages.java +++ b/bundles/ch.elexis.core.ui/src/ch/elexis/core/ui/dialogs/Messages.java @@ -285,4 +285,12 @@ public class Messages { public static String DailyOrderMandantOnlyFollowing = ch.elexis.core.l10n.Messages.DailyOrderMandantOnlyFollowing; public static String DailyOrderMandantNone = ch.elexis.core.l10n.Messages.DailyOrderMandantNone; + public static String Core_ok = ch.elexis.core.l10n.Messages.Core_Ok; + public static String BestellView_delivered = ch.elexis.core.l10n.Messages.BestellView_delivered; + public static String BestellView_inventory = ch.elexis.core.l10n.Messages.BestellView_inventory; + public static String Core_Phamacode = ch.elexis.core.l10n.Messages.Core_Phamacode; + public static String Core_EAN = ch.elexis.core.l10n.Messages.Core_EAN; + public static String UI_description = ch.elexis.core.l10n.Messages.UI_description; + public static String Core_Stock = ch.elexis.core.l10n.Messages.Core_Stock; + } \ No newline at end of file diff --git a/bundles/ch.elexis.core.ui/src/ch/elexis/core/ui/dialogs/OrderImportDialog.java b/bundles/ch.elexis.core.ui/src/ch/elexis/core/ui/dialogs/OrderImportDialog.java index f241a0b35e..7363a55431 100644 --- a/bundles/ch.elexis.core.ui/src/ch/elexis/core/ui/dialogs/OrderImportDialog.java +++ b/bundles/ch.elexis.core.ui/src/ch/elexis/core/ui/dialogs/OrderImportDialog.java @@ -24,9 +24,11 @@ import org.eclipse.e4.ui.di.UIEventTopic; import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.dialogs.TitleAreaDialog; +import org.eclipse.jface.layout.TableColumnLayout; import org.eclipse.jface.viewers.CellEditor; import org.eclipse.jface.viewers.CheckboxCellEditor; import org.eclipse.jface.viewers.ColumnLabelProvider; +import org.eclipse.jface.viewers.ColumnPixelData; import org.eclipse.jface.viewers.ColumnViewerEditor; import org.eclipse.jface.viewers.ColumnViewerEditorActivationEvent; import org.eclipse.jface.viewers.ColumnViewerEditorActivationStrategy; @@ -120,6 +122,8 @@ public class OrderImportDialog extends TitleAreaDialog { private int actionMode; + private TableColumnLayout tcLayout; + /** * @wbp.parser.constructor */ @@ -225,6 +229,8 @@ public void widgetDefaultSelected(SelectionEvent e) { viewer = new TableViewer(tableArea, SWT.FULL_SELECTION); Table table = viewer.getTable(); table.setLayoutData(SWTHelper.getFillGridData(1, true, 1, true)); + tcLayout = new TableColumnLayout(); + tableArea.setLayout(tcLayout); table.setLinesVisible(true); table.setHeaderVisible(true); @@ -320,8 +326,8 @@ private void createViewerColumns() { /* OK (checkbox column) */ column = new TableViewerColumn(viewer, SWT.LEFT); - column.getColumn().setText("OK"); - column.getColumn().setWidth(50); + column.getColumn().setText(Messages.Core_ok); + tcLayout.setColumnData(column.getColumn(), new ColumnPixelData(50, true, true)); column.setLabelProvider(new CheckboxLabelProvider()); column.setEditingSupport(new EditingSupport(viewer) { public boolean canEdit(Object element) { @@ -355,8 +361,8 @@ public void setValue(Object element, Object value) { /* Amount delivered */ column = new TableViewerColumn(viewer, SWT.LEFT); - column.getColumn().setText("Geliefert"); - column.getColumn().setWidth(60); + column.getColumn().setText(Messages.BestellView_delivered); + tcLayout.setColumnData(column.getColumn(), new ColumnPixelData(60, true, true)); column.setLabelProvider(new AmountLabelProvider()); column.setEditingSupport(new EditingSupport(viewer) { public boolean canEdit(Object element) { @@ -396,28 +402,33 @@ public void setValue(Object element, Object value) { /* Amount on stock */ column = new TableViewerColumn(viewer, SWT.LEFT); - column.getColumn().setText("Lager"); - column.getColumn().setWidth(60); + column.getColumn().setText(Messages.BestellView_inventory); + tcLayout.setColumnData(column.getColumn(), new ColumnPixelData(60, true, true)); column.setLabelProvider(new StockLabelProvider()); /* Pharamcode */ column = new TableViewerColumn(viewer, SWT.LEFT); - column.getColumn().setText("Pharmacode"); //$NON-NLS-1$ - column.getColumn().setWidth(80); + column.getColumn().setText(Messages.Core_Phamacode); + tcLayout.setColumnData(column.getColumn(), new ColumnPixelData(70, true, true)); column.setLabelProvider(new PharamcodeLabelProvider()); /* EAN */ column = new TableViewerColumn(viewer, SWT.LEFT); - column.getColumn().setText("EAN"); //$NON-NLS-1$ - column.getColumn().setWidth(110); + column.getColumn().setText(Messages.Core_EAN); + tcLayout.setColumnData(column.getColumn(), new ColumnPixelData(70, true, true)); column.setLabelProvider(new EANLabelProvider()); /* Description */ column = new TableViewerColumn(viewer, SWT.LEFT); - column.getColumn().setText("Beschreibung"); - column.getColumn().setWidth(300); + column.getColumn().setText(Messages.UI_description); + tcLayout.setColumnData(column.getColumn(), new ColumnPixelData(200, true, true)); column.setLabelProvider(new DescriptionLabelProvider()); + column = new TableViewerColumn(viewer, SWT.LEFT); + column.getColumn().setText(Messages.Core_Stock); + tcLayout.setColumnData(column.getColumn(), new ColumnPixelData(100, true, true)); + column.setLabelProvider(new StockNameLabelProvider()); + } @Override @@ -748,6 +759,17 @@ public String getText(Object element) { } } + private class StockNameLabelProvider extends BaseLabelProvider { + public String getText(Object element) { + if (element instanceof OrderElement) { + OrderElement orderElement = (OrderElement) element; + IStock stock = orderElement.getStockEntry().getStock(); + return stock.getId().contains("PatientStock-") ? stock.getDescription() : stock.getCode(); + } + return null; + } + } + private class TransientStockEntry implements IStockEntry { private IArticle article; diff --git a/bundles/ch.elexis.core.ui/src/ch/elexis/core/ui/views/BestellView.java b/bundles/ch.elexis.core.ui/src/ch/elexis/core/ui/views/BestellView.java index 26b0f0df2f..97c898c5db 100644 --- a/bundles/ch.elexis.core.ui/src/ch/elexis/core/ui/views/BestellView.java +++ b/bundles/ch.elexis.core.ui/src/ch/elexis/core/ui/views/BestellView.java @@ -35,7 +35,9 @@ import org.eclipse.jface.action.IAction; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.layout.TableColumnLayout; import org.eclipse.jface.viewers.CellEditor; +import org.eclipse.jface.viewers.ColumnPixelData; import org.eclipse.jface.viewers.EditingSupport; import org.eclipse.jface.viewers.IStructuredContentProvider; import org.eclipse.jface.viewers.IStructuredSelection; @@ -52,7 +54,6 @@ import org.eclipse.swt.dnd.Transfer; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Table; import org.eclipse.ui.IWorkbenchPage; @@ -125,16 +126,17 @@ public void createPartControl(final Composite parent) { parent.setLayout(new FillLayout()); form = tk.createForm(parent); Composite body = form.getBody(); - body.setLayout(new GridLayout()); Table table = new Table(body, SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.MULTI); table.setLayoutData(SWTHelper.getFillGridData(1, true, 1, true)); + TableColumnLayout tcLayout = new TableColumnLayout(); + body.setLayout(tcLayout); table.setHeaderVisible(true); table.setLinesVisible(false); tv = new TableViewer(table); TableViewerColumn tvcNumber = new TableViewerColumn(tv, SWT.CENTER); tvcNumber.getColumn().setText(Messages.Core_Number); - tvcNumber.getColumn().setWidth(40); + tcLayout.setColumnData(tvcNumber.getColumn(), new ColumnPixelData(40, true, true)); ReflectiveEditingSupport poes = new ReflectiveEditingSupport(tv, ModelPackage.Literals.IORDER_ENTRY__AMOUNT.getName()); poes.setModelService(CoreModelServiceHolder.get()); @@ -142,11 +144,11 @@ public void createPartControl(final Composite parent) { TableViewerColumn tvcArticle = new TableViewerColumn(tv, SWT.LEFT); tvcArticle.getColumn().setText(Messages.Core_Article); - tvcArticle.getColumn().setWidth(280); + tcLayout.setColumnData(tvcArticle.getColumn(), new ColumnPixelData(280, true, true)); TableViewerColumn tvcDealer = new TableViewerColumn(tv, SWT.LEFT); tvcDealer.getColumn().setText(Messages.Core_Article_provider); - tvcDealer.getColumn().setWidth(250); + tcLayout.setColumnData(tvcDealer.getColumn(), new ColumnPixelData(250, true, true)); tvcDealer.setEditingSupport(new EditingSupport(tv) { @Override @@ -181,9 +183,9 @@ protected boolean canEdit(Object element) { return (be != null); } }); - TableViewerColumn tvc3 = new TableViewerColumn(tv, SWT.LEFT); - tvc3.getColumn().setText("Lager"); //$NON-NLS-1$ - tvc3.getColumn().setWidth(50); + TableViewerColumn tvcStock = new TableViewerColumn(tv, SWT.LEFT); + tvcStock.getColumn().setText(Messages.Core_Stock); + tcLayout.setColumnData(tvcStock.getColumn(), new ColumnPixelData(150, true, true)); tv.setContentProvider(new BestellungContentProvider()); blp = new BestellungLabelProvider(); @@ -363,7 +365,8 @@ public String getColumnText(final Object element, final int columnIndex) { return (k != null) ? k.getLabel() : Messages.Core_Unknown; case 3: IStock s = entry.getStock(); - return (s != null) ? s.getCode() : StringConstants.EMPTY; + return (s != null) ? (s.getId().contains("PatientStock-") ? s.getDescription() : s.getCode()) + : StringConstants.EMPTY; default: return "?"; //$NON-NLS-1$ } From a3ad5d5e9e7e4fdf67f8e51046edce511275a544 Mon Sep 17 00:00:00 2001 From: thuster Date: Mon, 12 Aug 2024 09:20:21 +0200 Subject: [PATCH 3/5] [26530] fix lab selected column index lower bound --- .../core/ui/laboratory/controls/LaborResultsComposite.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/ch.elexis.core.ui.laboratory/src/ch/elexis/core/ui/laboratory/controls/LaborResultsComposite.java b/bundles/ch.elexis.core.ui.laboratory/src/ch/elexis/core/ui/laboratory/controls/LaborResultsComposite.java index 7def25efd3..93d9af9fb3 100644 --- a/bundles/ch.elexis.core.ui.laboratory/src/ch/elexis/core/ui/laboratory/controls/LaborResultsComposite.java +++ b/bundles/ch.elexis.core.ui.laboratory/src/ch/elexis/core/ui/laboratory/controls/LaborResultsComposite.java @@ -292,7 +292,7 @@ public List getSelectedResults() { } private List getSelectedResults(ViewerCell cell) { - if (cell != null && cell.getColumnIndex() > 2) { + if (cell != null && cell.getColumnIndex() > 3) { TreeViewerColumn column = resultColumns.get(cell.getColumnIndex() - 4); TimeTool time = (TimeTool) column.getColumn().getData(COLUMN_DATE_KEY); if ((time != null) && (cell.getElement() instanceof LaborItemResults)) { From 2d891ea0e5e7b17a57ca49f1d95aa9efd8d7bbab Mon Sep 17 00:00:00 2001 From: thuster Date: Mon, 12 Aug 2024 09:52:39 +0200 Subject: [PATCH 4/5] [26537] fix allergy intolerance ui, using correct class for databinding --- .../composites/AllergyIntoleranceComposite.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/bundles/ch.elexis.core.findings.ui/src/ch/elexis/core/findings/ui/composites/AllergyIntoleranceComposite.java b/bundles/ch.elexis.core.findings.ui/src/ch/elexis/core/findings/ui/composites/AllergyIntoleranceComposite.java index 9c9bc7e7d9..827d9a9681 100644 --- a/bundles/ch.elexis.core.findings.ui/src/ch/elexis/core/findings/ui/composites/AllergyIntoleranceComposite.java +++ b/bundles/ch.elexis.core.findings.ui/src/ch/elexis/core/findings/ui/composites/AllergyIntoleranceComposite.java @@ -21,7 +21,6 @@ import ch.elexis.core.findings.IAllergyIntolerance; import ch.elexis.core.findings.IAllergyIntolerance.AllergyIntoleranceCategory; -import ch.elexis.core.findings.ui.model.AbstractBeanAdapter; import ch.elexis.core.findings.ui.model.AllergyIntoleranceBeanAdapter; import ch.elexis.core.findings.ui.services.FindingsServiceComponent; @@ -31,7 +30,7 @@ public class AllergyIntoleranceComposite extends Composite { private StyledText textOberservation = null; - protected WritableValue> item = new WritableValue<>(); + protected WritableValue item = new WritableValue<>(); public AllergyIntoleranceComposite(Composite parent, int style) { super(parent, style); @@ -61,8 +60,11 @@ public String getText(Object element) { public void setAllergyIntolerance(Optional input) { if (textOberservation != null) { - item.setValue(new AllergyIntoleranceBeanAdapter(input.isPresent() ? input.get() - : FindingsServiceComponent.getService().create(IAllergyIntolerance.class)).autoSave(true)); + AllergyIntoleranceBeanAdapter adapter = new AllergyIntoleranceBeanAdapter( + input.isPresent() ? input.get() + : FindingsServiceComponent.getService().create(IAllergyIntolerance.class)); + adapter.autoSave(true); + item.setValue(adapter); } } @@ -77,12 +79,13 @@ protected void initDataBindings() { DataBindingContext bindingContext = new DataBindingContext(); IViewerObservableValue targetObservable = ViewerProperties.singleSelection().observe(categoryViewer); - IObservableValue modelObservable = PojoProperties.value(AbstractBeanAdapter.class, "category") + IObservableValue modelObservable = PojoProperties.value(AllergyIntoleranceBeanAdapter.class, "category") .observeDetail(item); bindingContext.bindValue(targetObservable, modelObservable); ISWTObservableValue target = WidgetProperties.text(SWT.Modify).observeDelayed(1500, textOberservation); - IObservableValue model = PojoProperties.value(AbstractBeanAdapter.class, "text").observeDetail(item); + IObservableValue model = PojoProperties.value(AllergyIntoleranceBeanAdapter.class, "text") + .observeDetail(item); bindingContext.bindValue(target, model, null, null); } } From d0c7692012e651188ed36a520c8d1672deaabd52 Mon Sep 17 00:00:00 2001 From: Marco Descher Date: Mon, 12 Aug 2024 13:25:02 +0200 Subject: [PATCH 5/5] [26142] Missing o.e.jdt.core.prefs --- .../.settings/org.eclipse.jdt.core.prefs | 9 +++++++++ .../ch.rgw.utility/.settings/org.eclipse.jdt.core.prefs | 9 +++++++++ 2 files changed, 18 insertions(+) create mode 100644 bundles/ch.elexis.core.text.docx/.settings/org.eclipse.jdt.core.prefs create mode 100644 bundles/ch.rgw.utility/.settings/org.eclipse.jdt.core.prefs diff --git a/bundles/ch.elexis.core.text.docx/.settings/org.eclipse.jdt.core.prefs b/bundles/ch.elexis.core.text.docx/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..62ef3488cc --- /dev/null +++ b/bundles/ch.elexis.core.text.docx/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,9 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=17 diff --git a/bundles/ch.rgw.utility/.settings/org.eclipse.jdt.core.prefs b/bundles/ch.rgw.utility/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..62ef3488cc --- /dev/null +++ b/bundles/ch.rgw.utility/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,9 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=17