]> git.argeo.org Git - lgpl/argeo-commons.git/blobdiff - org.argeo.security.ui.admin/src/org/argeo/security/ui/admin/internal/providers/UserTransactionProvider.java
Improve and simplify OSGi Boot
[lgpl/argeo-commons.git] / org.argeo.security.ui.admin / src / org / argeo / security / ui / admin / internal / providers / UserTransactionProvider.java
index c5b9026c74c31109febbce2bf4037a2f0ea8987c..4ba304bb5f09082896ad951cf0befe1ce2e7919a 100644 (file)
@@ -10,7 +10,6 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.argeo.cms.CmsException;
 import org.argeo.security.ui.admin.SecurityAdminPlugin;
-import org.eclipse.swt.SWTException;
 import org.eclipse.ui.AbstractSourceProvider;
 import org.eclipse.ui.ISources;
 
@@ -29,13 +28,13 @@ public class UserTransactionProvider extends AbstractSourceProvider {
 
        @Override
        public String[] getProvidedSourceNames() {
-               return new String[] { TRANSACTION_STATE };
+               return new String[] { TRANSACTION_STATE};
        }
 
        @Override
        public Map<String, String> getCurrentState() {
                Map<String, String> currentState = new HashMap<String, String>(1);
-               currentState.put(TRANSACTION_STATE, getInternalCurrentState());
+                       currentState.put(TRANSACTION_STATE, getInternalCurrentState());
                return currentState;
        }
 
@@ -62,10 +61,9 @@ public class UserTransactionProvider extends AbstractSourceProvider {
                try {
                        fireSourceChanged(ISources.WORKBENCH, TRANSACTION_STATE,
                                        getInternalCurrentState());
-               } catch (SWTException e) {
-                       // FIXME
-                       log.warn("Cannot fire transaction state change event: "
-                                       + e.getMessage());
+               } catch (Exception e) {
+                       log.warn("Cannot fire transaction state change event. Caught exception: "
+                                       + e.getClass().getCanonicalName() + " - " + e.getMessage());
                }
        }