Clean CMS E4 RAP
authorMathieu Baudier <mbaudier@argeo.org>
Sun, 20 May 2018 11:37:36 +0000 (13:37 +0200)
committerMathieu Baudier <mbaudier@argeo.org>
Sun, 20 May 2018 11:37:36 +0000 (13:37 +0200)
org.argeo.cms.e4.rap/src/org/argeo/cms/e4/rap/AbstractRapE4App.java
org.argeo.cms.e4.rap/src/org/argeo/cms/e4/rap/CmsLoginLifecycle.java
org.argeo.cms.e4.rap/src/org/argeo/cms/e4/rap/TestTool.java [deleted file]

index 9d1f782e6830cab29dae9056146b92f880eb06df..3c37c1cb1f45c5b9f789e7027ad969a135cb95bd 100644 (file)
@@ -3,8 +3,6 @@ package org.argeo.cms.e4.rap;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.argeo.cms.ui.dialogs.CmsFeedback;
 import org.eclipse.rap.e4.E4ApplicationConfig;
 import org.eclipse.rap.rwt.application.Application;
@@ -12,14 +10,8 @@ import org.eclipse.rap.rwt.application.Application.OperationMode;
 import org.eclipse.rap.rwt.application.ApplicationConfiguration;
 import org.eclipse.rap.rwt.application.ExceptionHandler;
 import org.eclipse.rap.rwt.client.WebClient;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.FrameworkUtil;
 
 public abstract class AbstractRapE4App implements ApplicationConfiguration {
-       private final static Log log = LogFactory.getLog(AbstractRapE4App.class);
-
-       private final BundleContext bc = FrameworkUtil.getBundle(AbstractRapE4App.class).getBundleContext();
-
        private String pageTitle;
        private String e4Xmi;
        private String path;
@@ -31,8 +23,6 @@ public abstract class AbstractRapE4App implements ApplicationConfiguration {
                        @Override
                        public void handleException(Throwable throwable) {
                                CmsFeedback.show("Unexpected RWT exception", throwable);
-                               // log.error("Unexpected RWT exception", throwable);
-
                        }
                });
 
@@ -40,35 +30,6 @@ public abstract class AbstractRapE4App implements ApplicationConfiguration {
                properties.put(WebClient.PAGE_TITLE, pageTitle);
                E4ApplicationConfig config = new E4ApplicationConfig(e4Xmi, lifeCycleUri, null, false, true, true);
                addEntryPoint(application, config, properties);
-               // config.isClearPersistedState();
-               // E4EntryPointFactory entryPointFactory = new E4EntryPointFactory(config) {
-               //
-               // @Override
-               // public EntryPoint create() {
-               // Subject subject = new Subject();
-               // EntryPoint ep = createEntryPoint();
-               // EntryPoint authEp = new EntryPoint() {
-               //
-               // @Override
-               // public int createUI() {
-               // return Subject.doAs(subject, new PrivilegedAction<Integer>() {
-               //
-               // @Override
-               // public Integer run() {
-               // return ep.createUI();
-               // }
-               //
-               // });
-               // }
-               // };
-               // return authEp;
-               // }
-               //
-               // protected EntryPoint createEntryPoint() {
-               // return super.create();
-               // }
-               //
-               // };
        }
 
        protected void addEntryPoint(Application application, E4ApplicationConfig config, Map<String, String> properties) {
index 91b08f96ffa0d9ffb102ae0a06a4bf525a68adcf..047fb371e46e1efa464e9b53e8c88f9a5c90f03b 100644 (file)
@@ -50,7 +50,6 @@ public class CmsLoginLifecycle implements CmsView {
                                @Override
                                public void navigated(BrowserNavigationEvent event) {
                                        state = event.getState();
-                                       System.out.println("state=" + state);
                                        if (uxContext != null)// is logged in
                                                stateChanged();
                                }
diff --git a/org.argeo.cms.e4.rap/src/org/argeo/cms/e4/rap/TestTool.java b/org.argeo.cms.e4.rap/src/org/argeo/cms/e4/rap/TestTool.java
deleted file mode 100644 (file)
index 774af3f..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.argeo.cms.e4.rap;
-
-import javax.annotation.PostConstruct;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-
-public class TestTool {
-
-       @PostConstruct
-       public void createGui(Composite parent) {
-               Combo combo = new Combo(parent, SWT.READ_ONLY);
-               combo.add("First");
-               combo.add("Second");
-       }
-}
\ No newline at end of file