Code cleaning, use homogeneous name packages
authorBruno Sinou <bsinou@argeo.org>
Tue, 22 Nov 2016 11:26:33 +0000 (11:26 +0000)
committerBruno Sinou <bsinou@argeo.org>
Tue, 22 Nov 2016 11:26:33 +0000 (11:26 +0000)
git-svn-id: https://svn.argeo.org/commons/trunk@9319 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

org.argeo.cms.ui.workbench.rap/META-INF/spring/commands.xml
org.argeo.cms.ui.workbench.rap/META-INF/spring/osgi.xml
org.argeo.cms.ui.workbench.rap/plugin.xml
org.argeo.cms.ui.workbench.rap/src/org/argeo/cms/ui/workbench/rap/commands/OpenHome.java [new file with mode: 0644]
org.argeo.cms.ui.workbench.rap/src/org/argeo/cms/ui/workbench/rap/commands/UserMenu.java [new file with mode: 0644]
org.argeo.cms.ui.workbench.rap/src/org/argeo/security/ui/rap/RapActionBarAdvisor.java
org.argeo.cms.ui.workbench.rap/src/org/argeo/security/ui/rap/SecureRapActivator.java
org.argeo.cms.ui.workbench.rap/src/org/argeo/security/ui/rap/commands/OpenHome.java [deleted file]
org.argeo.cms.ui.workbench.rap/src/org/argeo/security/ui/rap/commands/UserMenu.java [deleted file]
org.argeo.eclipse.ui.rap/src/org/argeo/eclipse/ui/specific/UploadFileWizardPage.java

index 3fdfbe3d61e8c2c6f80477f848ee7007ebbaa2d2..d7048db9a7ada3b04cccc220b28a77b49312fc69 100644 (file)
@@ -4,16 +4,16 @@
        xsi:schemaLocation="http://www.springframework.org/schema/beans
         http://www.springframework.org/schema/beans/spring-beans.xsd">
 
-       <bean id="openChangePasswordDialog" class="org.argeo.cms.ui.workbench.commands.OpenChangePasswordDialog"
+       <bean id="org.argeo.cms.ui.workbench.rap.openChangePasswordDialog"
+               class="org.argeo.cms.ui.workbench.commands.OpenChangePasswordDialog"
                scope="prototype">
                <property name="userAdmin" ref="userAdmin" />
                <property name="userTransaction" ref="userTransaction" />
        </bean>
 
-
        <!-- RAP Specific command and corresponding service to enable open file -->
        <bean id="org.argeo.eclipse.ui.workbench.openFile" class="org.argeo.cms.ui.workbench.commands.OpenFile"
-       scope="prototype">
+               scope="prototype">
                <property name="openFileServiceId"
                        value="org.argeo.security.ui.specific.openFileService" />
        </bean>
index 84e5d7b8b529f5e17c6580fe99b9214cc2af52a8..6e0f3b332a88b0111d34d7d5a263902adeba472f 100644 (file)
@@ -10,4 +10,4 @@
 \r
        <reference id="userAdmin" interface="org.osgi.service.useradmin.UserAdmin" />\r
        <reference id="userTransaction" interface="javax.transaction.UserTransaction" />\r
-</beans:beans>
\ No newline at end of file
+</beans:beans>\r
index 243a433d0925f40f66d862ec78a3eeed8db6b64e..e5b083ded55128ce90ce541140dd116523c88a52 100644 (file)
@@ -4,41 +4,41 @@
    <extension
          point="org.eclipse.rap.ui.entrypoint">
       <entrypoint
-            id="org.argeo.security.ui.rap.secureEntryPoint"
+            id="org.argeo.cms.ui.workbench.rap.secureEntryPoint"
             class="org.argeo.security.ui.rap.RapWorkbenchLogin"
             path="/node"
-            brandingId="org.argeo.security.ui.rap.defaultBranding">
+            brandingId="org.argeo.cms.ui.workbench.rap.defaultBranding">
       </entrypoint>
       <entrypoint
-            id="org.argeo.security.ui.rap.anonymousEntryPoint"
+            id="org.argeo.cms.ui.workbench.rap.anonymousEntryPoint"
             class="org.argeo.security.ui.rap.AnonymousEntryPoint"
             path="/public"
-            brandingId="org.argeo.security.ui.rap.defaultBranding">
+            brandingId="org.argeo.cms.ui.workbench.rap.defaultBranding">
       </entrypoint>
-      <entrypoint
-            brandingId="org.argeo.security.ui.rap.defaultBranding"
+<!--      <entrypoint
+            id="org.argeo.cms.ui.workbench.rap.secureEntryPoint"
             class="org.argeo.security.ui.rap.RapWorkbenchLogin"
-            id="org.argeo.security.ui.rap.secureEntryPoint"
-            path="/login">
-      </entrypoint>
+            path="/login"
+            brandingId="org.argeo.cms.ui.workbench.rap.defaultBranding">
+      </entrypoint> -->
    </extension>
 
        <!-- COMMANDS --> 
        <extension point="org.eclipse.ui.commands">
                <command
-                       id="org.argeo.security.ui.rap.mainMenuCommand"
-                       defaultHandler="org.argeo.security.ui.rap.commands.OpenHome"
+                       id="org.argeo.cms.ui.workbench.rap.mainMenuCommand"
+                       defaultHandler="org.argeo.cms.ui.workbench.rap.commands.OpenHome"
                        name="Main"> 
                </command>
                <command
-                       id="org.argeo.security.ui.rap.openChangePasswordDialog"
+                       id="org.argeo.cms.ui.workbench.rap.openChangePasswordDialog"
                        defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
                        name="%changePassword">
                </command>
                <!-- Enable an "open file" action in a single sourced application  -->  
                <command
-                       defaultHandler="org.argeo.eclipse.spring.SpringExtensionFactory"
                        id="org.argeo.eclipse.ui.workbench.openFile"
+                       defaultHandler="org.argeo.eclipse.spring.SpringExtensionFactory"
                        name="OpenFile">
                        <commandParameter
                        id="param.fileName"
        <extension point="org.eclipse.ui.menus">
        <!-- Main tool bar menu -->
        <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar">
-               <toolbar id="org.argeo.security.ui.rap.userToolbar">
+               <toolbar id="org.argeo.cms.ui.workbench.rap.userToolbar">
                                <command
-                                       commandId="org.argeo.security.ui.rap.mainMenuCommand"
+                                       commandId="org.argeo.cms.ui.workbench.rap.mainMenuCommand"
                                        icon="icons/home.gif"
-                                       id="org.argeo.security.ui.rap.mainMenu"
+                                       id="org.argeo.cms.ui.workbench.rap.mainMenu"
                                        style="pulldown">
                                </command>
                                <command commandId="org.eclipse.ui.file.save"/>
                </menuContribution>
                
                <!-- User drop down default menu -->
-               <menuContribution locationURI="menu:org.argeo.security.ui.rap.mainMenu">
+               <menuContribution locationURI="menu:org.argeo.cms.ui.workbench.rap.mainMenu">
                        <!-- Managed programmatically in the RapActionBarAdvisor to enable 
                             the display of the current logged-in user id -->
-                       <command
-                               commandId="org.argeo.security.ui.rap.userMenuCommand"
+               <!--    <command
+                               commandId="org.argeo.cms.ui.workbench.rap.userMenuCommand"
                                icon="icons/main.gif"
-                               id="org.argeo.security.ui.rap.userMenu">
-                       </command>
+                               id="org.argeo.cms.ui.workbench.rap.userMenu">
+                       </command> -->
                        <!-- Still unused
                        <command
                                commandId="org.eclipse.ui.window.preferences"
                                icon="icons/preferences.png"/> -->
                <command
-                               commandId="org.argeo.security.ui.rap.openChangePasswordDialog"
+                               commandId="org.argeo.cms.ui.workbench.rap.openChangePasswordDialog"
                                icon="icons/password.gif"
                                label="%changePassword"/>
                        <separator
-                               name="org.argeo.security.ui.rap.beforeFile"
+                               name="org.argeo.cms.ui.workbench.rap.beforeFile"
                                visible="true">
                        </separator>
                        <command
        
                        <!--<command commandId="org.eclipse.ui.views.showView"/>-->
                <!--<command commandId="org.eclipse.ui.perspectives.showPerspective"/>-->
-       
                        <separator
-                               name="org.argeo.security.ui.rap.beforeExit"
+                               name="org.argeo.cms.ui.workbench.rap.beforeExit"
                                visible="true">
                        </separator>
                        <command commandId="org.eclipse.ui.file.exit" icon="icons/exit.png"/>
            point="org.eclipse.ui.activities">
         <activity
               description="Anonymous"
-              id="org.argeo.security.ui.rap.anonymousActivity"
+              id="org.argeo.cms.ui.workbench.rap.anonymousActivity"
               name="Anonymous">
                  <enabledWhen>
                    <with variable="roles">
         </activity>
         <activity
               description="Not anonymous"
-              id="org.argeo.security.ui.rap.notAnonymousActivity"
+              id="org.argeo.cms.ui.workbench.rap.notAnonymousActivity"
               name="NotAnonymous">
                  <enabledWhen>
                        <not>
                  </enabledWhen>
         </activity>
                <activityPatternBinding
-              activityId="org.argeo.security.ui.rap.notAnonymousActivity"
-              pattern="org.argeo.security.ui.rap/org.argeo.security.ui.rap.userMenuCommand"/>         
+              activityId="org.argeo.cms.ui.workbench.rap.notAnonymousActivity"
+              pattern="org.argeo.cms.ui.workbench.rap/org.argeo.cms.ui.workbench.rap.userMenuCommand"/>         
         <activityPatternBinding
-              activityId="org.argeo.security.ui.rap.notAnonymousActivity"
-              pattern="org.argeo.security.ui.rap/org.eclipse.ui.window.preferences"/>
+              activityId="org.argeo.cms.ui.workbench.rap.notAnonymousActivity"
+              pattern="org.argeo.cms.ui.workbench.rap/org.eclipse.ui.window.preferences"/>
         <activityPatternBinding
-              activityId="org.argeo.security.ui.rap.notAnonymousActivity"
-              pattern="org.argeo.security.ui.rap/org.argeo.security.ui.rap.openChangePasswordDialog"/>
+              activityId="org.argeo.cms.ui.workbench.rap.notAnonymousActivity"
+              pattern="org.argeo.cms.ui.workbench.rap/org.argeo.cms.ui.workbench.rap.openChangePasswordDialog"/>
      </extension>
     
     <!-- BRANDINGS --> 
      <extension
          point="org.eclipse.rap.ui.branding">
        <branding
-                       id="org.argeo.security.ui.rap.defaultBranding"
+                       id="org.argeo.cms.ui.workbench.rap.defaultBranding"
             themeId="org.eclipse.rap.rwt.theme.Default"
             title="Argeo Web UI"
             favicon="branding/favicon.ico">
        <!-- we need a servlet with this name j_spring_security_logout
                 for the logout filter -->
        <branding
-                       id="org.argeo.security.ui.rap.logoutBranding"
+                       id="org.argeo.cms.ui.workbench.rap.logoutBranding"
             title="Argeo Logout"
             favicon="branding/favicon.ico"
             body="branding/empty.html">
diff --git a/org.argeo.cms.ui.workbench.rap/src/org/argeo/cms/ui/workbench/rap/commands/OpenHome.java b/org.argeo.cms.ui.workbench.rap/src/org/argeo/cms/ui/workbench/rap/commands/OpenHome.java
new file mode 100644 (file)
index 0000000..a6744d2
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2007-2012 Argeo GmbH
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.cms.ui.workbench.rap.commands;
+
+import org.argeo.cms.ui.workbench.UserHomePerspective;
+import org.argeo.cms.ui.workbench.util.CommandUtils;
+import org.argeo.eclipse.ui.dialogs.ErrorFeedback;
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.ui.WorkbenchException;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/** Default action of the user menu */
+public class OpenHome extends AbstractHandler {
+       private final static String PROP_OPEN_HOME_CMD_ID = "org.argeo.ui.openHomeCommandId";
+
+       public Object execute(ExecutionEvent event) throws ExecutionException {
+
+               String defaultCmdId = System.getProperty(PROP_OPEN_HOME_CMD_ID, "");
+               if (!"".equals(defaultCmdId.trim()))
+                       CommandUtils.callCommand(defaultCmdId);
+               else {
+                       try {
+                               HandlerUtil.getActiveSite(event).getWorkbenchWindow()
+                                               .openPage(UserHomePerspective.ID, null);
+                       } catch (WorkbenchException e) {
+                               ErrorFeedback.show("Cannot open home perspective", e);
+                       }
+               }
+               return null;
+       }
+}
diff --git a/org.argeo.cms.ui.workbench.rap/src/org/argeo/cms/ui/workbench/rap/commands/UserMenu.java b/org.argeo.cms.ui.workbench.rap/src/org/argeo/cms/ui/workbench/rap/commands/UserMenu.java
new file mode 100644 (file)
index 0000000..4934e56
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2007-2012 Argeo GmbH
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.cms.ui.workbench.rap.commands;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+
+/** Default action of the user menu */
+public class UserMenu extends AbstractHandler {
+
+       @Override
+       public Object execute(ExecutionEvent event) throws ExecutionException {
+               return null;
+       }
+
+}
index 0ca598dce7fe1de554160bdff8db70959f5ad28b..6e33cdd4f3c445c6b848ef0fb4217c24114dd1db 100644 (file)
@@ -33,7 +33,7 @@ import org.eclipse.ui.commands.ICommandService;
 
 /** Eclipse rap specific action bar advisor */
 public class RapActionBarAdvisor extends ActionBarAdvisor {
-       private final static String ID_BASE = "org.argeo.security.ui.rap";
+       private final static String ID_BASE = SecureRapActivator.ID;
        // private final static Log log = LogFactory
        // .getLog(SecureActionBarAdvisor.class);
 
@@ -154,7 +154,7 @@ public class RapActionBarAdvisor extends ActionBarAdvisor {
        //
        // @Override
        // public String getId() {
-       // return "org.argeo.security.ui.rap.userMenu";
+       // return "org.argeo.cms.ui.workbench.rap.userMenu";
        // }
        //
        // @Override
index b3d7c23378e412be98de5e462320943bf60c3c9b..045f88a454672f636c176df5d7d6cf43ef6e6ac2 100644 (file)
@@ -20,7 +20,7 @@ import org.osgi.framework.BundleContext;
 
 /** Configure Equinox login context from the bundle context. */
 public class SecureRapActivator implements BundleActivator {
-       public final static String ID = "org.argeo.security.ui.rap";
+       public final static String ID = "org.argeo.cms.ui.workbench.rap";
 
        private static BundleContext bundleContext;
 
diff --git a/org.argeo.cms.ui.workbench.rap/src/org/argeo/security/ui/rap/commands/OpenHome.java b/org.argeo.cms.ui.workbench.rap/src/org/argeo/security/ui/rap/commands/OpenHome.java
deleted file mode 100644 (file)
index cc1bca8..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.security.ui.rap.commands;
-
-import org.argeo.cms.ui.workbench.UserHomePerspective;
-import org.argeo.cms.ui.workbench.util.CommandUtils;
-import org.argeo.eclipse.ui.dialogs.ErrorFeedback;
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.ui.WorkbenchException;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-/** Default action of the user menu */
-public class OpenHome extends AbstractHandler {
-       private final static String PROP_OPEN_HOME_CMD_ID = "org.argeo.ui.openHomeCommandId";
-
-       public Object execute(ExecutionEvent event) throws ExecutionException {
-
-               String defaultCmdId = System.getProperty(PROP_OPEN_HOME_CMD_ID, "");
-               if (!"".equals(defaultCmdId.trim()))
-                       CommandUtils.callCommand(defaultCmdId);
-               else {
-                       try {
-                               HandlerUtil.getActiveSite(event).getWorkbenchWindow()
-                                               .openPage(UserHomePerspective.ID, null);
-                       } catch (WorkbenchException e) {
-                               ErrorFeedback.show("Cannot open home perspective", e);
-                       }
-               }
-               return null;
-       }
-}
diff --git a/org.argeo.cms.ui.workbench.rap/src/org/argeo/security/ui/rap/commands/UserMenu.java b/org.argeo.cms.ui.workbench.rap/src/org/argeo/security/ui/rap/commands/UserMenu.java
deleted file mode 100644 (file)
index 9867430..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.security.ui.rap.commands;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-
-/** Default action of the user menu */
-public class UserMenu extends AbstractHandler {
-
-       @Override
-       public Object execute(ExecutionEvent event) throws ExecutionException {
-               return null;
-       }
-
-}
index d68f84290decb115245cfb8ae81fc6639a3ea380..b166e7f84b792154ce0b3871c3c9432351148f6c 100644 (file)
@@ -209,4 +209,4 @@ public class UploadFileWizardPage extends WizardPage {
        public boolean getNeedsProgressMonitor() {
                return false;
        }
-}
\ No newline at end of file
+}