Skip to content

Commit

Permalink
[26587] event for mediorder part refresh (#714)
Browse files Browse the repository at this point in the history
Co-authored-by: pdenzler <[email protected]>
  • Loading branch information
PatrickDenzler and pdenzler authored Sep 9, 2024
1 parent 1fb632a commit 18cd518
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.e4.core.di.annotations.Optional;
import org.eclipse.e4.core.di.extensions.Service;
import org.eclipse.e4.core.services.events.IEventBroker;
import org.eclipse.e4.ui.di.Focus;
import org.eclipse.e4.ui.di.UIEventTopic;
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
import org.eclipse.e4.ui.services.EMenuService;
import org.eclipse.e4.ui.workbench.modeling.EPartService;
Expand Down Expand Up @@ -51,6 +53,7 @@
import org.eclipse.swt.widgets.TableColumn;
import org.slf4j.LoggerFactory;

import ch.elexis.core.common.ElexisEventTopics;
import ch.elexis.core.l10n.Messages;
import ch.elexis.core.model.IArticle;
import ch.elexis.core.model.IOrderEntry;
Expand Down Expand Up @@ -123,6 +126,14 @@ public void setFocus() {
tableViewer.getTable().setFocus();
}

@Inject
@Optional
public void reload(@UIEventTopic(ElexisEventTopics.EVENT_RELOAD) Class<?> clazz) {
if (IStock.class.equals(clazz)) {
refresh();
}
}

@Override
public void refresh(Map<Object, Object> filterParameters) {
Object firstElement = tableViewer.getStructuredSelection().getFirstElement();
Expand Down

0 comments on commit 18cd518

Please sign in to comment.