Receive tabbed area from Argeo Commons.
[gpl/argeo-suite.git] / core / org.argeo.suite.ui / src / org / argeo / suite / ui / SuiteUiUtils.java
index 3c47b96a6053a187abb123cbdc95af5bfc1c4305..79edb6416e38ffd7644037b9bbae3b68fce58ea2 100644 (file)
@@ -12,6 +12,7 @@ import org.argeo.cms.auth.CurrentUser;
 import org.argeo.cms.ui.CmsEditable;
 import org.argeo.cms.ui.CmsView;
 import org.argeo.cms.ui.dialogs.LightweightDialog;
+import org.argeo.cms.ui.util.CmsEvent;
 import org.argeo.cms.ui.util.CmsUiUtils;
 import org.argeo.eclipse.ui.EclipseUiUtils;
 import org.argeo.entity.EntityNames;
@@ -32,6 +33,7 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Text;
+import org.osgi.service.event.Event;
 
 /** UI utilities related to the APAF project. */
 public class SuiteUiUtils {
@@ -318,6 +320,10 @@ public class SuiteUiUtils {
                return coworker;
        }
 
+       public static boolean isTopic(Event event, CmsEvent cmsEvent) {
+               return event.getTopic().equals(cmsEvent.topic());
+       }
+
 //     public static String createAndConfigureEntity(Shell shell, Session referenceSession, String mainMixin,
 //                     String... additionnalProps) {
 //