Simexplorer-si-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- 1607 discussions
r1525 - in trunk/simexplorer-is: . simexplorer-is-web
by tchemit@users.labs.libre-entreprise.org 29 Jul '08
by tchemit@users.labs.libre-entreprise.org 29 Jul '08
29 Jul '08
Author: tchemit
Date: 2008-07-29 09:20:56 +0000 (Tue, 29 Jul 2008)
New Revision: 1525
Modified:
trunk/simexplorer-is/pom.xml
trunk/simexplorer-is/simexplorer-is-web/pom.xml
Log:
try another maven-war-plugin to fix hudson bug on war assembly...
Modified: trunk/simexplorer-is/pom.xml
===================================================================
--- trunk/simexplorer-is/pom.xml 2008-07-28 18:01:17 UTC (rev 1524)
+++ trunk/simexplorer-is/pom.xml 2008-07-29 09:20:56 UTC (rev 1525)
@@ -588,7 +588,8 @@
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
- <version>2.0.1</version>
+ <version>2.1-alpha-1</version>
+ <!--version>2.0.1</version-->
<!-- force version because maven seem to can't find automaticaly -->
</dependency>
Modified: trunk/simexplorer-is/simexplorer-is-web/pom.xml
===================================================================
--- trunk/simexplorer-is/simexplorer-is-web/pom.xml 2008-07-28 18:01:17 UTC (rev 1524)
+++ trunk/simexplorer-is/simexplorer-is-web/pom.xml 2008-07-29 09:20:56 UTC (rev 1525)
@@ -1,107 +1,107 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
- <groupId>simexplorer-is</groupId>
- <artifactId>simexplorer-is-web</artifactId>
- <name>Web</name>
+ <groupId>simexplorer-is</groupId>
+ <artifactId>simexplorer-is-web</artifactId>
+ <name>Web</name>
- <packaging>war</packaging>
- <version>${current.version}</version>
- <description>simexplorer-is web module</description>
+ <packaging>war</packaging>
+ <version>${current.version}</version>
+ <description>simexplorer-is web module</description>
- <parent>
- <groupId>simexplorer-is</groupId>
- <artifactId>simexplorer-is</artifactId>
- <version>${current.version}</version>
- </parent>
- <build>
- <plugins>
- <!--WebApp in JAR -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <version>2.0.2</version>
- <configuration>
- <warSourceDirectory>
- ${basedir}/src/main/webapp
- </warSourceDirectory>
- <warSourceExcludes>
- WEB-INF/lib/*.jar
- </warSourceExcludes>
- <archive>
- <manifest>
- <addClasspath>true</addClasspath>
- <classpathPrefix>lib/</classpathPrefix>
- </manifest>
- </archive>
- </configuration>
- </plugin>
+ <parent>
+ <groupId>simexplorer-is</groupId>
+ <artifactId>simexplorer-is</artifactId>
+ <version>${current.version}</version>
+ </parent>
+ <build>
+ <plugins>
+ <!--WebApp in JAR -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <!--version>2.0.2</version-->
+ <configuration>
+ <warSourceDirectory>
+ ${basedir}/src/main/webapp
+ </warSourceDirectory>
+ <warSourceExcludes>
+ WEB-INF/lib/*.jar
+ </warSourceExcludes>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ <classpathPrefix>lib/</classpathPrefix>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
- <!-- Run the application using "mvn jetty:run" -->
- <plugin>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>maven-jetty-plugin</artifactId>
- <configuration>
- <!-- Log to the console. -->
- <requestLog
- implementation="org.mortbay.jetty.NCSARequestLog">
- <!-- This doesn't do anything for Jetty, but is a workaround for a Maven bug
- that prevents the requestLog from being set. -->
- <append>true</append>
- </requestLog>
- <connectors>
- <connector
- implementation="org.mortbay.jetty.nio.SelectChannelConnector">
- <port>9090</port>
- <maxIdleTime>60000</maxIdleTime>
- </connector>
- </connectors>
- </configuration>
- </plugin>
- </plugins>
- </build>
+ <!-- Run the application using "mvn jetty:run" -->
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>maven-jetty-plugin</artifactId>
+ <configuration>
+ <!-- Log to the console. -->
+ <requestLog
+ implementation="org.mortbay.jetty.NCSARequestLog">
+ <!-- This doesn't do anything for Jetty, but is a workaround for a Maven bug
+ that prevents the requestLog from being set. -->
+ <append>true</append>
+ </requestLog>
+ <connectors>
+ <connector
+ implementation="org.mortbay.jetty.nio.SelectChannelConnector">
+ <port>9090</port>
+ <maxIdleTime>60000</maxIdleTime>
+ </connector>
+ </connectors>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
- <dependencies>
- <dependency>
- <groupId>simexplorer-is</groupId>
- <artifactId>simexplorer-is-service</artifactId>
- </dependency>
- <dependency>
- <groupId>tapestry5-treegrid</groupId>
- <artifactId>tapestry5-treegrid</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.tapestry</groupId>
- <artifactId>tapestry-upload</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.tapestry</groupId>
- <artifactId>tapestry-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.tapestry</groupId>
- <artifactId>tapestry-ioc</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.tapestry</groupId>
- <artifactId>t5c-commons</artifactId>
- </dependency>
-
- <dependency>
- <groupId>jboss</groupId>
- <artifactId>jbossall-client</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.persistence</groupId>
- <artifactId>persistence-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <classifier>jdk15</classifier>
- </dependency>
- </dependencies>
+ <dependencies>
+ <dependency>
+ <groupId>simexplorer-is</groupId>
+ <artifactId>simexplorer-is-service</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>tapestry5-treegrid</groupId>
+ <artifactId>tapestry5-treegrid</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tapestry</groupId>
+ <artifactId>tapestry-upload</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tapestry</groupId>
+ <artifactId>tapestry-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tapestry</groupId>
+ <artifactId>tapestry-ioc</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tapestry</groupId>
+ <artifactId>t5c-commons</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jbossall-client</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.persistence</groupId>
+ <artifactId>persistence-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <classifier>jdk15</classifier>
+ </dependency>
+ </dependencies>
</project>
\ No newline at end of file
1
0
r1524 - in trunk/simexplorer-is/simexplorer-is-swing-generated: . src/resources src/resources/i18n
by tchemit@users.labs.libre-entreprise.org 28 Jul '08
by tchemit@users.labs.libre-entreprise.org 28 Jul '08
28 Jul '08
Author: tchemit
Date: 2008-07-28 18:01:17 +0000 (Mon, 28 Jul 2008)
New Revision: 1524
Modified:
trunk/simexplorer-is/simexplorer-is-swing-generated/pom.xml
trunk/simexplorer-is/simexplorer-is-swing-generated/src/resources/commandline.properties
trunk/simexplorer-is/simexplorer-is-swing-generated/src/resources/i18n/simexplorer-is-swing-generated-en_GB.properties
trunk/simexplorer-is/simexplorer-is-swing-generated/src/resources/i18n/simexplorer-is-swing-generated-fr_FR.properties
Log:
utilisation propriete auto-generee par commandline
Modified: trunk/simexplorer-is/simexplorer-is-swing-generated/pom.xml
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing-generated/pom.xml 2008-07-27 10:06:51 UTC (rev 1523)
+++ trunk/simexplorer-is/simexplorer-is-swing-generated/pom.xml 2008-07-28 18:01:17 UTC (rev 1524)
@@ -52,6 +52,10 @@
<_projectName>SimExplorer-SI</_projectName>
<_configFileName>.simexplorer-si-1</_configFileName>
<_version>${current.version}</_version>
+ <_projectURL>http://simexplorer-si.labs.libre-entreprise.org</_projectURL>
+ <_organisationName>Cemagref</_organisationName>
+ <_organisationURL>http://www.cemagref.fr</_organisationURL>
+ <_copyright>Copyright Cemagref 2008</_copyright>
</configuration>
</execution>
<execution>
Modified: trunk/simexplorer-is/simexplorer-is-swing-generated/src/resources/commandline.properties
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing-generated/src/resources/commandline.properties 2008-07-27 10:06:51 UTC (rev 1523)
+++ trunk/simexplorer-is/simexplorer-is-swing-generated/src/resources/commandline.properties 2008-07-28 18:01:17 UTC (rev 1524)
@@ -53,9 +53,6 @@
main.config.definition.debugMode=java.lang.Boolean:false
main.config.modifiers.debugMode=mandatory
-main.config.definition.siteURL=java.net.URL:http://simexplorer-si.labs.libre-entreprise.org
-main.config.modifiers.siteURL=final,static,mandatory
-
#main.config.definition.smtpServer=java.lang.String:smtp
#main.config.modifiers.smtpServer=mandatory
Modified: trunk/simexplorer-is/simexplorer-is-swing-generated/src/resources/i18n/simexplorer-is-swing-generated-en_GB.properties
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing-generated/src/resources/i18n/simexplorer-is-swing-generated-en_GB.properties 2008-07-27 10:06:51 UTC (rev 1523)
+++ trunk/simexplorer-is/simexplorer-is-swing-generated/src/resources/i18n/simexplorer-is-swing-generated-en_GB.properties 2008-07-28 18:01:17 UTC (rev 1524)
@@ -18,16 +18,19 @@
simexplorer.config.local.optimizePeriod.description=Optimize period (Lucene)
simexplorer.config.main.autoConnect.description=Flag to auto connect to remote server at init time
simexplorer.config.main.configFileName.description=The path of the configuration file
+simexplorer.config.main.copyright.description=
simexplorer.config.main.debugMode.description=Debug mode
simexplorer.config.main.description=Configuration de l'application SimExplorer SI
simexplorer.config.main.encoding.description=Encoding of application
simexplorer.config.main.localSizor.description=number of result to display by page in local list
simexplorer.config.main.locale.description=User locale
+simexplorer.config.main.organisationName.description=
+simexplorer.config.main.organisationURL.description=
simexplorer.config.main.projectName.description=name of PRoject
+simexplorer.config.main.projectURL.description=
simexplorer.config.main.remoteSizor.description=number of result to display by page in remote list
simexplorer.config.main.showLocalTab.description=Show at launch time, the local tab
simexplorer.config.main.showRemoteTab.description=Show at launch time, the remote tab
-simexplorer.config.main.siteURL.description=Simexplorer-is site URL
simexplorer.config.main.userFirstName.description=User first name
simexplorer.config.main.userLastName.description=User last name
simexplorer.config.main.userMail.description=User email adress
Modified: trunk/simexplorer-is/simexplorer-is-swing-generated/src/resources/i18n/simexplorer-is-swing-generated-fr_FR.properties
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing-generated/src/resources/i18n/simexplorer-is-swing-generated-fr_FR.properties 2008-07-27 10:06:51 UTC (rev 1523)
+++ trunk/simexplorer-is/simexplorer-is-swing-generated/src/resources/i18n/simexplorer-is-swing-generated-fr_FR.properties 2008-07-28 18:01:17 UTC (rev 1524)
@@ -18,16 +18,19 @@
simexplorer.config.local.optimizePeriod.description=La p\u00E9riode optimale (Lucene)
simexplorer.config.main.autoConnect.description=Se connecter automatiquement au d\u00E9marrage
simexplorer.config.main.configFileName.description=Le chemin du fichier de configuration
+simexplorer.config.main.copyright.description=
simexplorer.config.main.debugMode.description=Mode debug
simexplorer.config.main.description=La configuration de l'application
simexplorer.config.main.encoding.description=L'encoding du syst\u00E8me
simexplorer.config.main.localSizor.description=Nombre de r\u00E9sultats par page dans la liste locale
simexplorer.config.main.locale.description=La langue de l'utilisateur
+simexplorer.config.main.organisationName.description=
+simexplorer.config.main.organisationURL.description=
simexplorer.config.main.projectName.description=Le nom du projet
+simexplorer.config.main.projectURL.description=
simexplorer.config.main.remoteSizor.description=Nombre de r\u00E9sultats par page dans la liste distante
simexplorer.config.main.showLocalTab.description=Voir au d\u00E9marrage l'onglet Local
simexplorer.config.main.showRemoteTab.description=Voir au d\u00E9mrrage l'onglet Distant
-simexplorer.config.main.siteURL.description=L'URL du site de Simexplorer-is
simexplorer.config.main.userFirstName.description=Le pr\u00E9nom de l'utilisateur
simexplorer.config.main.userLastName.description=Le nom de l'utilisateur
simexplorer.config.main.userMail.description=Le courriel de l'utilisateur
1
0
r1523 - in trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing: . actions actions/util ui
by tchemit@users.labs.libre-entreprise.org 27 Jul '08
by tchemit@users.labs.libre-entreprise.org 27 Jul '08
27 Jul '08
Author: tchemit
Date: 2008-07-27 10:06:51 +0000 (Sun, 27 Jul 2008)
New Revision: 1523
Modified:
trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorer.java
trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ShowSynchronizeTabAction.java
trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/ShowListTabAbstractAction.java
trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/DetailTabUpdater.java
trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/EntityTreeNodeHelper.java
trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/ListTabUpdater.java
trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/SimExplorerMainUI.java
trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/SynchronizeTabUpdater.java
Log:
use ContextProvider and ActionHelper from commandline
Modified: trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorer.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorer.java 2008-07-26 11:48:02 UTC (rev 1522)
+++ trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorer.java 2008-07-27 10:06:51 UTC (rev 1523)
@@ -16,7 +16,6 @@
*/
package fr.cemagref.simexplorer.is.ui.swing;
-import fr.cemagref.simexplorer.is.exceptions.SimExplorerRuntimeException;
import fr.cemagref.simexplorer.is.ui.swing.actions.util.SimExplorerBaseAction;
import fr.cemagref.simexplorer.is.ui.swing.commandline.configs.SimExplorerConfigMain;
import fr.cemagref.simexplorer.is.ui.swing.ui.SimExplorerMainUI;
@@ -40,13 +39,8 @@
private static final Log log = LogFactory.getLog(SimExplorer.class);
- /** le context principal de l'application */
- protected static SimExplorerContext context;
-
-
public static SimExplorerContext getContext() {
- checkInitContext();
- return context;
+ return (SimExplorerContext) ContextProvider.get();
}
/**
@@ -60,7 +54,7 @@
try {
// instanciate context, parser and configs
- context = (SimExplorerContext) ContextProvider.getContext();
+ SimExplorerContext context = (SimExplorerContext) ContextProvider.init();
// init context
context.init(args);
@@ -88,13 +82,16 @@
// init ui
SimExplorerMainUI mainUI = SimExplorerMainUI.getUI();
- SimExplorerConfigMain conf = getContext().getMainConfig();
+ SimExplorerContext context = getContext();
+ SimExplorerConfigMain conf = context.getMainConfig();
+
if (conf.isShowLocalTab()) {
// show local tab
mainUI.getToggleTab_local().doClick();
}
+
if (conf.isAutoConnect()) {
try {
// try to connect
@@ -134,6 +131,8 @@
// init application (parser,config,i18n,...)
init(args);
+ SimExplorerContext context = getContext();
+
// launch actions required
context.getParser().getLastResult().doAllActions(context);
@@ -151,12 +150,6 @@
}
}
- public static void checkInitContext() {
- if (context == null) {
- throw new SimExplorerRuntimeException("context is null, you must init first the " + SimExplorer.class.getName() + " class via init method");
- }
- }
-
public void initI18n() {
I18n.init(getContext().getMainConfig().getLocale(), getContext().getMainConfig().getEncoding());
}
Modified: trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ShowSynchronizeTabAction.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ShowSynchronizeTabAction.java 2008-07-26 11:48:02 UTC (rev 1522)
+++ trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ShowSynchronizeTabAction.java 2008-07-27 10:06:51 UTC (rev 1523)
@@ -24,8 +24,8 @@
import fr.cemagref.simexplorer.is.ui.swing.model.tab.SynchronizeTabModel;
import fr.cemagref.simexplorer.is.ui.swing.ui.EntityTreeNodeHelper;
import fr.cemagref.simexplorer.is.ui.swing.ui.JSynchronizeTab;
-import fr.cemagref.simexplorer.is.ui.swing.ui.SimExplorerMainUI;
import fr.cemagref.simexplorer.is.ui.swing.ui.TreeActionsUpdater;
+import org.codelutin.option.ui.actions.ActionHelper;
import javax.swing.AbstractButton;
import javax.swing.event.TreeSelectionEvent;
@@ -166,7 +166,7 @@
super.valueChanged(e);
EntityTreeNode node = EntityTreeNodeHelper.getSelectedNode(e);
boolean enable = node != null && node.isLoggableElement();
- SimExplorerMainUI.UpdateButton(ui.getShowDetailButton(remote), enable, !enable ? null : node.getLoggableElement());
+ ActionHelper.UpdateButton(ui.getShowDetailButton(remote), enable, !enable ? null : node.getLoggableElement());
}
protected AbstractButton getExpandAction() {
Modified: trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/ShowListTabAbstractAction.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/ShowListTabAbstractAction.java 2008-07-26 11:48:02 UTC (rev 1522)
+++ trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/ShowListTabAbstractAction.java 2008-07-27 10:06:51 UTC (rev 1523)
@@ -20,8 +20,8 @@
import fr.cemagref.simexplorer.is.ui.swing.model.ListTableModel;
import fr.cemagref.simexplorer.is.ui.swing.model.tab.ListTabModel;
import fr.cemagref.simexplorer.is.ui.swing.ui.JListTab;
-import fr.cemagref.simexplorer.is.ui.swing.ui.SimExplorerMainUI;
import jaxx.runtime.swing.JAXXTab;
+import org.codelutin.option.ui.actions.ActionHelper;
import javax.swing.JTabbedPane;
import javax.swing.JTable;
@@ -118,7 +118,7 @@
//FIXME : when we change locale, this is no more enabled ?
- SimExplorerMainUI.EnableButton(ui.getImportElement());
+ ActionHelper.EnableButton(ui.getImportElement());
//ImportElementAction action = (ImportElementAction) ui.getImportElement().getAction();
//ui.getImportElement().setToolTipText(_(action.getI18nToolTipText(model.isRemote())));
Modified: trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/DetailTabUpdater.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/DetailTabUpdater.java 2008-07-26 11:48:02 UTC (rev 1522)
+++ trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/DetailTabUpdater.java 2008-07-27 10:06:51 UTC (rev 1523)
@@ -23,11 +23,12 @@
import fr.cemagref.simexplorer.is.entities.metadata.MetaData;
import fr.cemagref.simexplorer.is.entities.metadata.Version;
import fr.cemagref.simexplorer.is.ui.swing.SimExplorerContext;
-import fr.cemagref.simexplorer.is.ui.swing.model.tab.DetailTabModel;
import fr.cemagref.simexplorer.is.ui.swing.model.DetailTableModel;
import fr.cemagref.simexplorer.is.ui.swing.model.EntityTreeNode;
import fr.cemagref.simexplorer.is.ui.swing.model.HistoryModel;
+import fr.cemagref.simexplorer.is.ui.swing.model.tab.DetailTabModel;
import static org.codelutin.i18n.I18n._;
+import org.codelutin.option.ui.actions.ActionHelper;
import javax.swing.DefaultComboBoxModel;
import javax.swing.DefaultListModel;
@@ -74,7 +75,7 @@
return;
}
- throw new IllegalStateException("could not treate property " + evtName+"\n"+evt);
+ throw new IllegalStateException("could not treate property " + evtName + "\n" + evt);
}
@@ -99,20 +100,20 @@
HistoryModel<EntityTreeNode> history = model.getHistory();
// reset history action
- SimExplorerMainUI.UpdateButton(getMainUI().getHistoryReset(), history.size() > 0);
+ ActionHelper.UpdateButton(getMainUI().getHistoryReset(), history.size() > 0);
// history next action
if (history.size() > 1 && history.hasPrevious()) {
- SimExplorerMainUI.EnableButton(ui.getHistoryPrevious(), history.getPrevious());
+ ActionHelper.EnableButton(ui.getHistoryPrevious(), history.getPrevious());
} else {
- SimExplorerMainUI.DisableButton(ui.getHistoryPrevious());
+ ActionHelper.DisableButton(ui.getHistoryPrevious());
}
// history previous action
if (history.size() > 1 && history.hasNext()) {
- SimExplorerMainUI.EnableButton(ui.getHistoryNext(), history.getNext());
+ ActionHelper.EnableButton(ui.getHistoryNext(), history.getNext());
} else {
- SimExplorerMainUI.DisableButton(ui.getHistoryNext());
+ ActionHelper.DisableButton(ui.getHistoryNext());
}
// select root node (will trigger fireNodeSelected)
@@ -139,23 +140,23 @@
Version newVersion = newSelectedNode.getMetaData().getVersion();
Version[] versions = model.getVersions();
- Integer newIndex=null;
+ Integer newIndex = null;
if (versions != null) {
for (int i = 0; i < versions.length; i++) {
Version version = versions[i];
historyModel.addElement(version);
if (version.equals(newVersion)) {
- newIndex=i;
+ newIndex = i;
}
}
}
- if (newIndex!=null) {
+ if (newIndex != null) {
ui.getDetailVersions().setSelectedIndex(newIndex);
}
// add accessibility on combo
boolean enabled = ui.getDetailVersions().getItemCount() > 1;
- SimExplorerMainUI.UpdateCombo(ui.getDetailVersions(), enabled, !enabled ? null : _("simexplorer.action.changeVersion.tooltip"));
+ ActionHelper.UpdateCombo(ui.getDetailVersions(), enabled, !enabled ? null : _("simexplorer.action.changeVersion.tooltip"));
}
@@ -193,11 +194,11 @@
} else {
ui.getDetailAttachments().getSelectionModel().clearSelection();
// if we had a previous empty list, no trigger to fireAttachmentSelected
- SimExplorerMainUI.DisableButton(ui.getDownloadAttachment());
+ ActionHelper.DisableButton(ui.getDownloadAttachment());
ui.getScrollAttachments().setVisible(false);
}
- if (ui.getDetailVersions().getSelectedIndex()!=index) {
+ if (ui.getDetailVersions().getSelectedIndex() != index) {
ui.getDetailVersions().setSelectedIndex(index);
}
@@ -219,12 +220,12 @@
// refresh download LoggableElement button
enabled = detail != null && EntityHelper.Action.DOWNLOAD.accept(node);
- SimExplorerMainUI.UpdateButton(ui.getDownloadElement(), enabled, enabled ? detail == null ? node.getUserObject() : detail.getName() + " [" + model.getSelectedVersion() + "]" : null);
+ ActionHelper.UpdateButton(ui.getDownloadElement(), enabled, enabled ? detail == null ? node.getUserObject() : detail.getName() + " [" + model.getSelectedVersion() + "]" : null);
// refresh delete button
enabled = detail != null && EntityHelper.Action.DELETE.accept(detail);
- SimExplorerMainUI.UpdateButton(ui.getDeleteElement(), enabled, enabled ? detail.getName() + " [" + model.getSelectedVersion() + "]" : null);
+ ActionHelper.UpdateButton(ui.getDeleteElement(), enabled, enabled ? detail.getName() + " [" + model.getSelectedVersion() + "]" : null);
// refresh detail to tree button
@@ -239,14 +240,14 @@
}
enabled = detail != null && !(detail.getName().equals(data.getName()) && data.getVersion().equals(version));
- SimExplorerMainUI.UpdateButton(ui.getDetailToTree(), enabled, enabled ? detail.getName() + " [" + version + "]" : null);
+ ActionHelper.UpdateButton(ui.getDetailToTree(), enabled, enabled ? detail.getName() + " [" + version + "]" : null);
}
protected void fireAttachmentSelected(JDetailTab ui, DetailTabModel model, PropertyChangeEvent evt) {
log.info(evt.getPropertyName() + " old:" + evt.getOldValue() + ", new:" + evt.getNewValue());
Attachment attachment = model.getSelectedAttachment();
boolean enabled = model.getDetailNode() != null && attachment != null;
- SimExplorerMainUI.UpdateButton(ui.getDownloadAttachment(), enabled, enabled ? attachment : null);
+ ActionHelper.UpdateButton(ui.getDownloadAttachment(), enabled, enabled ? attachment : null);
}
public void refreshWithConnectAction() {
@@ -256,7 +257,7 @@
boolean enabled = b && context.isConnected();
MetaData detail = b ? model.getDetailNode().getMetaData() : null;
- SimExplorerMainUI.UpdateButton(ui.getShowTab_synchronize(), enabled, enabled ? detail.getName() + " [" + model.getSelectedVersion() + "]" : null);
+ ActionHelper.UpdateButton(ui.getShowTab_synchronize(), enabled, enabled ? detail.getName() + " [" + model.getSelectedVersion() + "]" : null);
LoggableElement sNode = model.getSelectedNode();
getMainUI().refreshExportElement(context, ui.getExportElement(), model.isRemote(), sNode);
}
@@ -278,9 +279,9 @@
ui.getDetailAttachmentsHeader().setText(_("simexplorer.node.noattachments"));
if (disable) {
- versions.setVisible(false);
+ versions.setVisible(false);
ui.getDetail().setVisible(false);
- SimExplorerMainUI.DisableButton(
+ ActionHelper.DisableButton(
ui.getDetailToTree(),
ui.getShowTab_synchronize(),
ui.getExportElement(),
Modified: trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/EntityTreeNodeHelper.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/EntityTreeNodeHelper.java 2008-07-26 11:48:02 UTC (rev 1522)
+++ trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/EntityTreeNodeHelper.java 2008-07-27 10:06:51 UTC (rev 1523)
@@ -16,31 +16,24 @@
*/
package fr.cemagref.simexplorer.is.ui.swing.ui;
-import java.util.ArrayDeque;
-import java.util.Deque;
+import fr.cemagref.simexplorer.is.entities.Entity;
+import fr.cemagref.simexplorer.is.entities.EntityVisitorTreeNode;
+import fr.cemagref.simexplorer.is.entities.data.LoggableElement;
+import fr.cemagref.simexplorer.is.ui.swing.model.EntityTreeNode;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.codelutin.option.ui.actions.ActionHelper;
import javax.swing.AbstractButton;
import javax.swing.JTree;
import javax.swing.event.TreeSelectionEvent;
import javax.swing.tree.TreePath;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import fr.cemagref.simexplorer.is.entities.Composite;
-import fr.cemagref.simexplorer.is.entities.Entity;
-import fr.cemagref.simexplorer.is.entities.EntityVisitable;
-import fr.cemagref.simexplorer.is.entities.EntityVisitor;
-import fr.cemagref.simexplorer.is.entities.EntityVisitorTreeNode;
-import fr.cemagref.simexplorer.is.entities.Leaf;
-import fr.cemagref.simexplorer.is.entities.data.LoggableElement;
-import fr.cemagref.simexplorer.is.ui.swing.model.EntityTreeNode;
-
/**
* La classe responsable de la création des arbres de {@link fr.cemagref.simexplorer.is.ui.swing.model.EntityTreeNode} à
* partir de {@link LoggableElement} . <p/> La classe possède une instance cachée par thread qui délègue la construction
* del'arbre de navigation à un visiteur de {@link LoggableElement}. <p/>
- *
+ *
* @author Code Lutin, Landais Gabriel, Chemit Tony
*/
public class EntityTreeNodeHelper {
@@ -49,8 +42,8 @@
/**
* Construit un arbre de navigation à partir d'un {@link LoggableElement}.
- *
- * @param v la donnée à visiter
+ *
+ * @param v la donnée à visiter
* @param remote flag pour indiquer si on travaille sur des données locales ou en remote.
* @return le noeud parent de l'arbre de nivation construit.
*/
@@ -119,21 +112,21 @@
}
public static void refreshTreeActions(AbstractButton collapseButton, AbstractButton expandButton,
- EntityTreeNode node) {
+ EntityTreeNode node) {
boolean enabled = node != null && !node.isLeaf() && node.getChildCount() > 0;
Object o = enabled ? node.getUserObject() : null;
- SimExplorerMainUI.UpdateButton(collapseButton, enabled, o);
- SimExplorerMainUI.UpdateButton(expandButton, enabled, o);
+ ActionHelper.UpdateButton(collapseButton, enabled, o);
+ ActionHelper.UpdateButton(expandButton, enabled, o);
}
protected EntityTreeNodeHelper() {
// no instance
}
-
+
public static class EntityVisitorBuilder extends EntityVisitorTreeNode<EntityTreeNode> {
private boolean remote;
-
+
public EntityVisitorBuilder(boolean remote) {
super();
this.remote = remote;
Modified: trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/ListTabUpdater.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/ListTabUpdater.java 2008-07-26 11:48:02 UTC (rev 1522)
+++ trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/ListTabUpdater.java 2008-07-27 10:06:51 UTC (rev 1523)
@@ -16,18 +16,18 @@
*/
package fr.cemagref.simexplorer.is.ui.swing.ui;
-import java.beans.PropertyChangeEvent;
-import java.text.SimpleDateFormat;
-
-import javax.swing.JComboBox;
-
import fr.cemagref.simexplorer.is.entities.EntityHelper;
import fr.cemagref.simexplorer.is.entities.metadata.MetaData;
import fr.cemagref.simexplorer.is.ui.swing.SimExplorerContext;
import fr.cemagref.simexplorer.is.ui.swing.model.DataEntityModel;
import fr.cemagref.simexplorer.is.ui.swing.model.ListTableModel;
import fr.cemagref.simexplorer.is.ui.swing.model.tab.ListTabModel;
+import org.codelutin.option.ui.actions.ActionHelper;
+import javax.swing.JComboBox;
+import java.beans.PropertyChangeEvent;
+import java.text.SimpleDateFormat;
+
/**
* La classe responsable du rafrachissement des ui de l'onglet de liste.
*
@@ -100,7 +100,7 @@
// on selectionne le premier item
if (!model.isEmpty()) {
- ui.getTable().getSelectionModel().setSelectionInterval(0,0);
+ ui.getTable().getSelectionModel().setSelectionInterval(0, 0);
}
}
@@ -110,7 +110,7 @@
}
ui.getSearchText().setText(model.getQuery().getQuery());
-
+
refreshSearchActions();
refreshPaginationActions(model.getPagination());
@@ -118,7 +118,7 @@
((ListTableModel) ui.getTable().getModel()).setData(model.getList());
if (!model.isEmpty()) {
- ui.getTable().getSelectionModel().setSelectionInterval(0,0);
+ ui.getTable().getSelectionModel().setSelectionInterval(0, 0);
}
}
@@ -172,7 +172,7 @@
public void resetSearch() {
getUi().getSearchText().setText(null);
- SimExplorerMainUI.DisableButton(getUi().getResetSearch(), getUi().getSearch());
+ ActionHelper.DisableButton(getUi().getResetSearch(), getUi().getSearch());
}
/** Rafraichit les actions de recherche d'un onglet de type liste. */
@@ -180,8 +180,8 @@
JListTab ui = getUi();
String text = ui.getSearchText().getText();
boolean hasQuery = getModel().hasQuery() || !text.isEmpty();
- SimExplorerMainUI.UpdateButton(ui.getSearch(), hasQuery);
- SimExplorerMainUI.UpdateButton(ui.getResetSearch(), hasQuery);
+ ActionHelper.UpdateButton(ui.getSearch(), hasQuery);
+ ActionHelper.UpdateButton(ui.getResetSearch(), hasQuery);
}
public void refreshListTablePopupMenu(final ListTabModel model) {
@@ -196,10 +196,10 @@
String text = data.getName() + " [" + data.getVersion() + "]";
- SimExplorerMainUI.UpdateButton(ui.getDownloadElement(), EntityHelper.Action.DOWNLOAD.accept(data), text);
- SimExplorerMainUI.UpdateButton(ui.getDeleteElement(), EntityHelper.Action.DELETE.accept(data), text);
- SimExplorerMainUI.UpdateButton(ui.getShowTab_detail(), true, text);
- SimExplorerMainUI.UpdateButton(ui.getShowTab_synchronize(), getContext().isConnected(), text);
+ ActionHelper.UpdateButton(ui.getDownloadElement(), EntityHelper.Action.DOWNLOAD.accept(data), text);
+ ActionHelper.UpdateButton(ui.getDeleteElement(), EntityHelper.Action.DELETE.accept(data), text);
+ ActionHelper.UpdateButton(ui.getShowTab_detail(), true, text);
+ ActionHelper.UpdateButton(ui.getShowTab_synchronize(), getContext().isConnected(), text);
getMainUI().refreshExportElement(getContext(), ui.getExportElement(), model.isRemote(), data);
}
Modified: trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/SimExplorerMainUI.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/SimExplorerMainUI.java 2008-07-26 11:48:02 UTC (rev 1522)
+++ trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/SimExplorerMainUI.java 2008-07-27 10:06:51 UTC (rev 1523)
@@ -22,18 +22,15 @@
import fr.cemagref.simexplorer.is.ui.swing.SimExplorer;
import fr.cemagref.simexplorer.is.ui.swing.SimExplorerContext;
import fr.cemagref.simexplorer.is.ui.swing.actions.ExportElementAction;
-import fr.cemagref.simexplorer.is.ui.swing.actions.util.SimExplorerBaseAction;
import static org.codelutin.i18n.I18n._;
+import org.codelutin.option.ui.actions.ActionHelper;
import javax.swing.AbstractButton;
-import javax.swing.JComboBox;
import javax.swing.JComponent;
import javax.swing.KeyStroke;
import javax.swing.SwingUtilities;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
-import java.util.Locale;
-import java.util.regex.Matcher;
/**
* L'ui principale de l'application
@@ -51,7 +48,7 @@
public SynchronizeTabUpdater synchronizeUpdater;
public static SimExplorerMainUI getUI() {
- SimExplorer.checkInitContext();
+
if (ui == null) {
ui = new SimExplorerMainUI();
}
@@ -111,40 +108,15 @@
getRootPane().getActionMap().put("quit", context.getActionFactory().newAction("quit"));
// repaint i18n actions
- refreshI18nActions(context);
+ ActionHelper.refreshI18nActions(context, context.getActionFactory(), this);
if (!context.getMainConfig().isDebugMode()) {
getDebug().setVisible(false);
}
- UpdateButton(getHistoryReset(), false);
+ ActionHelper.UpdateButton(getHistoryReset(), false);
}
- /**
- * Rafraichit les actions i18n dans le menu en fonction de la locale
- * actuellement utilisée.
- *
- * @param context application context
- */
- public void refreshI18nActions(SimExplorerContext context) {
-
- Locale locale = context.getMainConfig().getLocale();
- //CountryEnum country = context.getConfig().getUserCountry();
- String[] actions = context.getActionFactory().getActionNames();
- for (String actionName : actions) {
- Matcher matcher = org.codelutin.option.ui.actions.ChangeLocaleAction.PATTERN_NAME.matcher(actionName);
- if (!matcher.matches()) {
- continue;
- }
- AbstractButton button = (AbstractButton) getObjectById(actionName);
- SimExplorerBaseAction action = (SimExplorerBaseAction) button.getAction();
- org.codelutin.option.ui.actions.ChangeLocaleAction realAction = (org.codelutin.option.ui.actions.ChangeLocaleAction) action.getDelegate();
- boolean enable = !realAction.equalsLocale(locale);
- UpdateButton(button, enable, enable ? realAction.getLocale() : null);
- //button.setEnabled(enable);
- }
- }
-
public void refreshExportElement(SimExplorerContext context, AbstractButton button, boolean remote, LoggableElement sNode) {
boolean enabled = EntityHelper.Action.EXPORT.accept(sNode) && context.isConnected();
refreshExportElement(context, button, remote, enabled ? sNode.getMetaData() : null);
@@ -161,40 +133,6 @@
button.setToolTipText(t);
}
- public static void DisableButton(AbstractButton... buttons) {
- for (AbstractButton button : buttons) {
- UpdateButton(button, false);
- }
- }
-
- public static void EnableButton(AbstractButton button, Object... params) {
- UpdateButton(button, true, params);
- }
-
- public static void UpdateButton(AbstractButton button, boolean enabled, Object... params) {
- button.setEnabled(enabled);
- if (!enabled) {
- button.setToolTipText(null);
- } else {
- SimExplorerBaseAction action = (SimExplorerBaseAction) button.getAction();
- String t = _(action.getI18nToolTipText(), params);
- button.setToolTipText(t);
- }
- }
-
- public static void UpdateCombo(JComboBox button, boolean enabled, Object... params) {
- button.setEnabled(enabled);
- if (!enabled) {
- button.setToolTipText(null);
- } else {
- SimExplorerBaseAction action = (SimExplorerBaseAction) button.getAction();
- if (action != null) {
- String t = _(action.getI18nToolTipText(), params);
- button.setToolTipText(t);
- }
- }
- }
-
public DetailTabUpdater getDetailUpdater(SimExplorerContext context) {
if (detailUpdater == null) {
detailUpdater = new DetailTabUpdater(context);
Modified: trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/SynchronizeTabUpdater.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/SynchronizeTabUpdater.java 2008-07-26 11:48:02 UTC (rev 1522)
+++ trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/SynchronizeTabUpdater.java 2008-07-27 10:06:51 UTC (rev 1523)
@@ -20,6 +20,7 @@
import fr.cemagref.simexplorer.is.ui.swing.SimExplorerContext;
import fr.cemagref.simexplorer.is.ui.swing.model.EntityTreeNode;
import fr.cemagref.simexplorer.is.ui.swing.model.tab.SynchronizeTabModel;
+import org.codelutin.option.ui.actions.ActionHelper;
import javax.swing.JTree;
import javax.swing.tree.DefaultTreeModel;
@@ -86,14 +87,14 @@
SimExplorerTab.synchronize.closeTab(getContext(), getMainUI(), getMainUI().getContent());
}
- if (sources[0]==null && oldSources[0]==null) {
+ if (sources[0] == null && oldSources[0] == null) {
// disable local
- SimExplorerMainUI.DisableButton(getUi().getExportButton(false), getUi().getShowDetailButton(false),getUi().getCollapseButton(false),getUi().getExpandButton(false));
+ ActionHelper.DisableButton(getUi().getExportButton(false), getUi().getShowDetailButton(false), getUi().getCollapseButton(false), getUi().getExpandButton(false));
}
- if (sources[1]==null&& oldSources[1]==null) {
+ if (sources[1] == null && oldSources[1] == null) {
// disable remote
- SimExplorerMainUI.DisableButton(getUi().getExportButton(true), getUi().getShowDetailButton(true),getUi().getCollapseButton(true),getUi().getExpandButton(true));
+ ActionHelper.DisableButton(getUi().getExportButton(true), getUi().getShowDetailButton(true), getUi().getCollapseButton(true), getUi().getExpandButton(true));
}
}
1
0
r1522 - in trunk/simexplorer-is: . simexplorer-is-entities simexplorer-is-service simexplorer-is-swing simexplorer-is-swing-generated
by tchemit@users.labs.libre-entreprise.org 26 Jul '08
by tchemit@users.labs.libre-entreprise.org 26 Jul '08
26 Jul '08
Author: tchemit
Date: 2008-07-26 11:48:02 +0000 (Sat, 26 Jul 2008)
New Revision: 1522
Modified:
trunk/simexplorer-is/pom.xml
trunk/simexplorer-is/simexplorer-is-entities/pom.xml
trunk/simexplorer-is/simexplorer-is-service/pom.xml
trunk/simexplorer-is/simexplorer-is-swing-generated/pom.xml
trunk/simexplorer-is/simexplorer-is-swing/pom.xml
Log:
refactor maven-i18n-plugin invocation (common configuration in super-pom)
Modified: trunk/simexplorer-is/pom.xml
===================================================================
--- trunk/simexplorer-is/pom.xml 2008-07-26 11:31:46 UTC (rev 1521)
+++ trunk/simexplorer-is/pom.xml 2008-07-26 11:48:02 UTC (rev 1522)
@@ -218,6 +218,21 @@
</executions>
</plugin>
+ <plugin>
+ <groupId>lutinplugin</groupId>
+ <artifactId>maven-i18n-plugin</artifactId>
+ <version>0.3</version>
+ <configuration>
+ <bundles>
+ <param>fr_FR</param>
+ <param>en_GB</param>
+ </bundles>
+ <keepBackup>false</keepBackup>
+ <!--ea>true</ea-->
+ <!--detectea>true</detectea-->
+ </configuration>
+ </plugin>
+
</plugins>
</build>
Modified: trunk/simexplorer-is/simexplorer-is-entities/pom.xml
===================================================================
--- trunk/simexplorer-is/simexplorer-is-entities/pom.xml 2008-07-26 11:31:46 UTC (rev 1521)
+++ trunk/simexplorer-is/simexplorer-is-entities/pom.xml 2008-07-26 11:48:02 UTC (rev 1522)
@@ -1,65 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
- <!--groupId>simexplorer-is</groupId-->
- <artifactId>simexplorer-is-entities</artifactId>
- <name>Entities</name>
+ <!--groupId>simexplorer-is</groupId-->
+ <artifactId>simexplorer-is-entities</artifactId>
+ <name>Entities</name>
- <version>${current.version}</version>
- <description>simexplorer-is entities module</description>
- <packaging>jar</packaging>
+ <version>${current.version}</version>
+ <description>simexplorer-is entities module</description>
+ <packaging>jar</packaging>
- <parent>
- <groupId>simexplorer-is</groupId>
- <artifactId>simexplorer-is</artifactId>
- <version>${current.version}</version>
- </parent>
+ <parent>
+ <groupId>simexplorer-is</groupId>
+ <artifactId>simexplorer-is</artifactId>
+ <version>${current.version}</version>
+ </parent>
- <profiles>
- <profile>
- <id>project</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <properties>
- <!--launch unit tests-->
- <maven.test.skip>false</maven.test.skip>
- </properties>
- </profile>
- </profiles>
+ <profiles>
+ <profile>
+ <id>project</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <properties>
+ <!--launch unit tests-->
+ <maven.test.skip>false</maven.test.skip>
+ </properties>
+ </profile>
+ </profiles>
- <build>
- <plugins>
- <plugin>
- <groupId>lutinplugin</groupId>
- <artifactId>maven-i18n-plugin</artifactId>
- <version>0.2-SNAPSHOT</version>
- <configuration>
- <bundles>
- <param>fr_FR</param>
- <param>en_GB</param>
- </bundles>
- </configuration>
- <executions>
- <execution>
- <phase>process-classes</phase>
- <goals>
- <goal>parserJava</goal>
- <goal>gen</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>lutinplugin</groupId>
+ <artifactId>maven-i18n-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>parserJava</goal>
+ <goal>gen</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
- <dependencies>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- </dependency>
- </dependencies>
+ <dependencies>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ </dependency>
+ </dependencies>
</project>
Modified: trunk/simexplorer-is/simexplorer-is-service/pom.xml
===================================================================
--- trunk/simexplorer-is/simexplorer-is-service/pom.xml 2008-07-26 11:31:46 UTC (rev 1521)
+++ trunk/simexplorer-is/simexplorer-is-service/pom.xml 2008-07-26 11:48:02 UTC (rev 1522)
@@ -1,99 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
- <artifactId>simexplorer-is-service</artifactId>
- <name>Service</name>
+ <artifactId>simexplorer-is-service</artifactId>
+ <name>Service</name>
- <version>${current.version}</version>
- <description>services ejb de SimExplorer-IS</description>
- <packaging>ejb</packaging>
+ <version>${current.version}</version>
+ <description>services ejb de SimExplorer-IS</description>
+ <packaging>ejb</packaging>
- <parent>
- <groupId>simexplorer-is</groupId>
- <artifactId>simexplorer-is</artifactId>
- <version>${current.version}</version>
- </parent>
+ <parent>
+ <groupId>simexplorer-is</groupId>
+ <artifactId>simexplorer-is</artifactId>
+ <version>${current.version}</version>
+ </parent>
- <build>
- <plugins>
- <plugin>
- <groupId>lutinplugin</groupId>
- <artifactId>maven-i18n-plugin</artifactId>
- <version>0.2-SNAPSHOT</version>
- <configuration>
- <bundles>
- <param>fr_FR</param>
- <param>en_GB</param>
- </bundles>
- </configuration>
- <executions>
- <execution>
- <phase>process-classes</phase>
- <goals>
- <goal>parserJava</goal>
- <goal>gen</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>lutinplugin</groupId>
+ <artifactId>maven-i18n-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>parserJava</goal>
+ <goal>gen</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
- </plugins>
- </build>
+ </plugins>
+ </build>
- <repositories>
- <!-- pour la dependance rmiio -->
- <repository>
- <id>openhms</id>
- <url>http://open.hmsonline.com/repo/maven2</url>
- </repository>
- </repositories>
- <dependencies>
- <dependency>
- <groupId>simexplorer-is</groupId>
- <artifactId>simexplorer-is-storage</artifactId>
- </dependency>
- <dependency>
- <groupId>simexplorer-is</groupId>
- <artifactId>simexplorer-is-security</artifactId>
- </dependency>
- <dependency>
- <groupId>com.healthmarketscience.rmiio</groupId>
- <artifactId>rmiio</artifactId>
- </dependency>
- <dependency>
- <groupId>jboss</groupId>
- <artifactId>jboss-ejb3x</artifactId>
- </dependency>
- <dependency>
- <groupId>jboss</groupId>
- <artifactId>jboss-annotations-ejb3</artifactId>
- </dependency>
- <dependency>
- <groupId>jboss</groupId>
- <artifactId>jbossall-client</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.persistence</groupId>
- <artifactId>persistence-api</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.mail</groupId>
- <artifactId>mail</artifactId>
- </dependency>
+ <repositories>
+ <!-- pour la dependance rmiio -->
+ <repository>
+ <id>openhms</id>
+ <url>http://open.hmsonline.com/repo/maven2</url>
+ </repository>
+ </repositories>
+ <dependencies>
+ <dependency>
+ <groupId>simexplorer-is</groupId>
+ <artifactId>simexplorer-is-storage</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>simexplorer-is</groupId>
+ <artifactId>simexplorer-is-security</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.healthmarketscience.rmiio</groupId>
+ <artifactId>rmiio</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-ejb3x</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-annotations-ejb3</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jbossall-client</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.persistence</groupId>
+ <artifactId>persistence-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ </dependency>
- <dependency>
- <groupId>com.bm</groupId>
- <artifactId>ejb3unit</artifactId>
- </dependency>
- <dependency>
- <groupId>jboss</groupId>
- <artifactId>javassist</artifactId>
- <scope>test</scope>
- </dependency>
+ <dependency>
+ <groupId>com.bm</groupId>
+ <artifactId>ejb3unit</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>javassist</artifactId>
+ <scope>test</scope>
+ </dependency>
- </dependencies>
+ </dependencies>
</project>
Modified: trunk/simexplorer-is/simexplorer-is-swing/pom.xml
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing/pom.xml 2008-07-26 11:31:46 UTC (rev 1521)
+++ trunk/simexplorer-is/simexplorer-is-swing/pom.xml 2008-07-26 11:48:02 UTC (rev 1522)
@@ -40,15 +40,6 @@
<plugin>
<groupId>lutinplugin</groupId>
<artifactId>maven-i18n-plugin</artifactId>
- <version>0.3</version>
- <configuration>
- <bundles>
- <param>fr_FR</param>
- <param>en_GB</param>
- </bundles>
- <!--ea>true</ea-->
- <!--detectea>true</detectea-->
- </configuration>
<executions>
<execution>
<phase>process-classes</phase>
Modified: trunk/simexplorer-is/simexplorer-is-swing-generated/pom.xml
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing-generated/pom.xml 2008-07-26 11:31:46 UTC (rev 1521)
+++ trunk/simexplorer-is/simexplorer-is-swing-generated/pom.xml 2008-07-26 11:48:02 UTC (rev 1522)
@@ -104,13 +104,6 @@
<plugin>
<groupId>lutinplugin</groupId>
<artifactId>maven-i18n-plugin</artifactId>
- <version>0.3</version>
- <configuration>
- <bundles>
- <param>fr_FR</param>
- <param>en_GB</param>
- </bundles>
- </configuration>
<executions>
<execution>
<phase>process-classes</phase>
1
0
r1521 - trunk/simexplorer-is/simexplorer-is-security/src/test/fr/cemagref/simexplorer/is/security/credentials
by tchemit@users.labs.libre-entreprise.org 26 Jul '08
by tchemit@users.labs.libre-entreprise.org 26 Jul '08
26 Jul '08
Author: tchemit
Date: 2008-07-26 11:31:46 +0000 (Sat, 26 Jul 2008)
New Revision: 1521
Modified:
trunk/simexplorer-is/simexplorer-is-security/src/test/fr/cemagref/simexplorer/is/security/credentials/CredentialDataSet.java
Log:
Suppresswarning on test :)
Modified: trunk/simexplorer-is/simexplorer-is-security/src/test/fr/cemagref/simexplorer/is/security/credentials/CredentialDataSet.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-security/src/test/fr/cemagref/simexplorer/is/security/credentials/CredentialDataSet.java 2008-07-26 11:26:10 UTC (rev 1520)
+++ trunk/simexplorer-is/simexplorer-is-security/src/test/fr/cemagref/simexplorer/is/security/credentials/CredentialDataSet.java 2008-07-26 11:31:46 UTC (rev 1521)
@@ -16,33 +16,26 @@
*/
package fr.cemagref.simexplorer.is.security.credentials;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.List;
-
-import javax.persistence.EntityManager;
-import javax.persistence.EntityTransaction;
-
import com.bm.testsuite.dataloader.EntityInitialDataSet;
-
import fr.cemagref.simexplorer.is.security.entities.Actor;
import fr.cemagref.simexplorer.is.security.entities.Group;
import fr.cemagref.simexplorer.is.security.entities.LoginAction;
import fr.cemagref.simexplorer.is.security.entities.Permission;
import fr.cemagref.simexplorer.is.security.entities.User;
+import javax.persistence.EntityManager;
+import javax.persistence.EntityTransaction;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.List;
+
/**
* The Class CredentialDataSet.
+ *
* @author Code Lutin, Landais Gabriel, Chemit Tony
*/
public class CredentialDataSet extends EntityInitialDataSet {
- /** The Constant log. */
- private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory
- .getLog(CredentialDataSet.class);
-
/** The entity manager. */
protected EntityManager entityManager = null;
@@ -52,9 +45,8 @@
/** The Constant N_PERMISSIONS_USER3. */
public static final int N_PERMISSIONS_USER3 = 13;
- /**
- * Instantiates a new credential data set.
- */
+ /** Instantiates a new credential data set. */
+ @SuppressWarnings({"unchecked"})
public CredentialDataSet() {
// ...
super(Actor.class);
@@ -62,9 +54,10 @@
/**
* Instantiates a new credential data set.
- *
+ *
* @param entityType the entity type
*/
+ @SuppressWarnings({"unchecked"})
public CredentialDataSet(Class entityType) {
super(entityType);
throw new IllegalStateException();
@@ -108,11 +101,10 @@
/**
* Creates the user.
- *
- * @param login the login
- * @param admin the admin
+ *
+ * @param login the login
+ * @param admin the admin
* @param superadmin the superadmin
- *
* @return the user
*/
private User createUser(String login, boolean admin, boolean superadmin) {
@@ -137,10 +129,9 @@
/**
* Creates the group.
- *
- * @param name the name
+ *
+ * @param name the name
* @param owner the owner
- *
* @return the group
*/
private Group createGroup(String name, User owner) {
@@ -155,10 +146,9 @@
/**
* Creates the permission.
- *
- * @param bid the bid
+ *
+ * @param bid the bid
* @param actor the actor
- *
* @return the permission
*/
private Permission createPermission(String bid, Actor actor) {
@@ -200,7 +190,7 @@
user3 = createUser("user3", false, false);
User user4 = createUser("user4", false, false);
User admin = createUser("admin", true, false);
- User superadmin = createUser("superadmin", true, true);
+ //User superadmin = createUser("superadmin", true, true);
Group groupA = createGroup("groupA", admin);
@@ -254,7 +244,7 @@
/**
* Gets the user3.
- *
+ *
* @return the user3
*/
public User getUser3() {
1
0
r1520 - trunk/simexplorer-is/simexplorer-is-swing/src/resources/i18n
by tchemit@users.labs.libre-entreprise.org 26 Jul '08
by tchemit@users.labs.libre-entreprise.org 26 Jul '08
26 Jul '08
Author: tchemit
Date: 2008-07-26 11:26:10 +0000 (Sat, 26 Jul 2008)
New Revision: 1520
Modified:
trunk/simexplorer-is/simexplorer-is-swing/src/resources/i18n/simexplorer-is-swing-en_GB.properties
trunk/simexplorer-is/simexplorer-is-swing/src/resources/i18n/simexplorer-is-swing-fr_FR.properties
Log:
utilisation du module commandline-ui-action avec les actions de base (help,quit,i18n,config,about,help)...
Modified: trunk/simexplorer-is/simexplorer-is-swing/src/resources/i18n/simexplorer-is-swing-en_GB.properties
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing/src/resources/i18n/simexplorer-is-swing-en_GB.properties 2008-07-26 11:25:00 UTC (rev 1519)
+++ trunk/simexplorer-is/simexplorer-is-swing/src/resources/i18n/simexplorer-is-swing-en_GB.properties 2008-07-26 11:26:10 UTC (rev 1520)
@@ -1,11 +1,6 @@
-simexplorer.action.about=About
-simexplorer.action.about.help=
-simexplorer.action.about.tooltip=Show About dialog
simexplorer.action.advancedSearch=Advanced search
simexplorer.action.advancedSearch.help=
simexplorer.action.advancedSearch.tooltip=Show advanced search dialog
-simexplorer.action.changeLocale.help=
-simexplorer.action.changeLocale.tooltip=Change to ''{0}'' language
simexplorer.action.changeSizor=Change Page size
simexplorer.action.changeSizor.help=
simexplorer.action.changeSizor.tooltip=Select the number of results to display in a page
@@ -16,9 +11,6 @@
simexplorer.action.collapseAll=collapseAll
simexplorer.action.collapseAll.help=
simexplorer.action.collapseAll.tooltip=Collapse all nodes of ''{0}''
-simexplorer.action.config=Preferences
-simexplorer.action.config.help=
-simexplorer.action.config.tooltip=Display the configuration modifier UI
simexplorer.action.connect=Connect
simexplorer.action.connect.help=
simexplorer.action.connect.tooltip=Connect to remote server
@@ -61,9 +53,6 @@
simexplorer.action.goPreviousPage=Previous page
simexplorer.action.goPreviousPage.help=
simexplorer.action.goPreviousPage.tooltip=Access to previous page in the list of results
-simexplorer.action.help=Help
-simexplorer.action.help.help=
-simexplorer.action.help.tooltip=Show help dialog
simexplorer.action.hideTab_local=List (local)
simexplorer.action.hideTab_local.help=
simexplorer.action.hideTab_local.tooltip=hide the list of local elements
@@ -95,9 +84,6 @@
simexplorer.action.importElement.help=
simexplorer.action.importElementToLocal.tooltip=Import into local database
simexplorer.action.importElementToRemote.tooltip=Import into remote database
-simexplorer.action.quit=Quit
-simexplorer.action.quit.help=
-simexplorer.action.quit.tooltip=Quit SimExplorer SI
simexplorer.action.resetPassword=Reset password
simexplorer.action.resetPassword.help=
simexplorer.action.resetPassword.tooltip=Reset you remote connexion password (a new password will be asked at next connexion)
@@ -119,9 +105,6 @@
simexplorer.action.showTab_synchronize=Synchronize
simexplorer.action.showTab_synchronize.help=
simexplorer.action.showTab_synchronize.tooltip=Show synchronize screen for element ''{0}''
-simexplorer.action.site=Site
-simexplorer.action.site.help=
-simexplorer.action.site.tooltip=Go to SimExplorer SI site
simexplorer.action.unconnect=Unconnect
simexplorer.action.unconnect.help=
simexplorer.action.unconnect.tooltip=Disconnect from remote server
@@ -135,7 +118,6 @@
simexplorer.common.name=name
simexplorer.common.value=value
simexplorer.common.version=version
-simexplorer.confirm.changeLanguage=Changing to language ''{0}'' will reset the ui and the history
simexplorer.confirm.delete=Confirm delete of ''{0}''
simexplorer.error.login.failed=Remote authentication failed...
simexplorer.error.service.failed=Remote server is not reachable...
Modified: trunk/simexplorer-is/simexplorer-is-swing/src/resources/i18n/simexplorer-is-swing-fr_FR.properties
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing/src/resources/i18n/simexplorer-is-swing-fr_FR.properties 2008-07-26 11:25:00 UTC (rev 1519)
+++ trunk/simexplorer-is/simexplorer-is-swing/src/resources/i18n/simexplorer-is-swing-fr_FR.properties 2008-07-26 11:26:10 UTC (rev 1520)
@@ -1,11 +1,6 @@
-simexplorer.action.about=A propos
-simexplorer.action.about.help=
-simexplorer.action.about.tooltip=Afficher les cr\u00E9dits
simexplorer.action.advancedSearch=Recherche avanc\u00E9e
simexplorer.action.advancedSearch.help=
simexplorer.action.advancedSearch.tooltip=Cliquer pour afficher le recherche avanc\u00E9e
-simexplorer.action.changeLocale.help=
-simexplorer.action.changeLocale.tooltip=Changer de langue ''{0}''
simexplorer.action.changeSizor=Change fen\u00EAtre
simexplorer.action.changeSizor.help=
simexplorer.action.changeSizor.tooltip=Choisir le nombre de r\u00E9sultats par page
@@ -16,9 +11,6 @@
simexplorer.action.collapseAll=tout r\u00E9duire
simexplorer.action.collapseAll.help=
simexplorer.action.collapseAll.tooltip=R\u00E9duire tous les noeuds de ''{0}''
-simexplorer.action.config=Pr\u00E9f\u00E9rences
-simexplorer.action.config.help=
-simexplorer.action.config.tooltip=Afficher le dialogue de modification de configuration
simexplorer.action.connect=Connexion
simexplorer.action.connect.help=
simexplorer.action.connect.tooltip=Se connecter au serveur distant
@@ -61,9 +53,6 @@
simexplorer.action.goPreviousPage=Pr\u00E9c\u00E9dente page
simexplorer.action.goPreviousPage.help=
simexplorer.action.goPreviousPage.tooltip=Acc\u00E9der \u00E0 la page pr\u00E9c\u00E9dente de la liste des r\u00E9sultats
-simexplorer.action.help=Aide
-simexplorer.action.help.help=
-simexplorer.action.help.tooltip=Acc\u00E9der \u00E0 l'aide
simexplorer.action.hideTab_local=Liste locale
simexplorer.action.hideTab_local.help=
simexplorer.action.hideTab_local.tooltip=Cacher la liste des \u00E9lements du serveur local
@@ -95,9 +84,6 @@
simexplorer.action.importElement.help=
simexplorer.action.importElementToLocal.tooltip=Importer dans la base locale
simexplorer.action.importElementToRemote.tooltip=Importer dans la base distante
-simexplorer.action.quit=Quitter
-simexplorer.action.quit.help=
-simexplorer.action.quit.tooltip=Pour quitter l'application
simexplorer.action.resetPassword=R\u00E9initialiser mot de passe
simexplorer.action.resetPassword.help=
simexplorer.action.resetPassword.tooltip=R\u00E9initialiser votre mot de passe (un novueau vous sera demand\u00E9 \u00E0 la prochainne connexion)
@@ -119,9 +105,6 @@
simexplorer.action.showTab_synchronize=Synchroniser
simexplorer.action.showTab_synchronize.help=
simexplorer.action.showTab_synchronize.tooltip=Afficher l''\u00E9cran de synchronisation de l''\u00E9l\u00E9ment ''{0}''
-simexplorer.action.site=Site
-simexplorer.action.site.help=
-simexplorer.action.site.tooltip=Acc\u00E9der dans votre navigateur au site de SimExplorer-SI
simexplorer.action.unconnect=D\u00E9connexion
simexplorer.action.unconnect.help=
simexplorer.action.unconnect.tooltip=Se d\u00E9connecter du serveur distant
@@ -135,7 +118,6 @@
simexplorer.common.name=nom
simexplorer.common.value=valeur
simexplorer.common.version=version
-simexplorer.confirm.changeLanguage=Changer vers la langue ''{0}'' va r\u00E9initialiser les interfaces et l''historique
simexplorer.confirm.delete=Confirmer la suppression de ''{0}''
simexplorer.error.login.failed=L'authentification a \u00E9chou\u00E9e...
simexplorer.error.service.failed=Le serveur central n'est pas joignable
1
0
r1519 - trunk/simexplorer-is/simexplorer-is-swing-generated
by tchemit@users.labs.libre-entreprise.org 26 Jul '08
by tchemit@users.labs.libre-entreprise.org 26 Jul '08
26 Jul '08
Author: tchemit
Date: 2008-07-26 11:25:00 +0000 (Sat, 26 Jul 2008)
New Revision: 1519
Modified:
trunk/simexplorer-is/simexplorer-is-swing-generated/pom.xml
Log:
utilisation du provider de context commandline : il faut g?\195?\169n?\195?\169rer le fichier de d?\195?\169claration du service : on doit donc fournir la classe d'implantation concrete du context (m?\195?\170me si celui-ci n'est pas disponible dans ce module...)
Modified: trunk/simexplorer-is/simexplorer-is-swing-generated/pom.xml
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing-generated/pom.xml 2008-07-26 11:23:57 UTC (rev 1518)
+++ trunk/simexplorer-is/simexplorer-is-swing-generated/pom.xml 2008-07-26 11:25:00 UTC (rev 1519)
@@ -47,6 +47,8 @@
<source>${maven.src.dir}/resources/commandline.properties</source>
<out>${maven.gen.dir}/java</out>
<concreteConfig>true</concreteConfig>
+ <concreteContextFQN>fr.cemagref.simexplorer.is.ui.swing.SimExplorerContext
+ </concreteContextFQN>
<_projectName>SimExplorer-SI</_projectName>
<_configFileName>.simexplorer-si-1</_configFileName>
<_version>${current.version}</_version>
1
0
r1518 - in trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions: . util
by tchemit@users.labs.libre-entreprise.org 26 Jul '08
by tchemit@users.labs.libre-entreprise.org 26 Jul '08
26 Jul '08
Author: tchemit
Date: 2008-07-26 11:23:57 +0000 (Sat, 26 Jul 2008)
New Revision: 1518
Removed:
trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/AboutAction.java
trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ConfigAction.java
trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/HelpAction.java
trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/QuitAction.java
trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/SiteAction.java
trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/ChangeLocaleAction.java
Log:
utilisation du module commandline-ui-action avec les actions de base (help,quit,i18n,config,about,help)...
Deleted: trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/AboutAction.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/AboutAction.java 2008-07-26 11:23:03 UTC (rev 1517)
+++ trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/AboutAction.java 2008-07-26 11:23:57 UTC (rev 1518)
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2008 Cemagref
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package fr.cemagref.simexplorer.is.ui.swing.actions;
-
-import fr.cemagref.simexplorer.is.exceptions.SimExplorerRuntimeException;
-import fr.cemagref.simexplorer.is.ui.swing.actions.util.SimExplorerBaseAction;
-
-import java.awt.event.ActionEvent;
-
-/**
- * Action pour afficher la boit de dialogue About de l'application
- *
- * @author Code Lutin, Landais Gabriel, Chemit Tony
- */
- at org.codelutin.jaxx.action.ActionConfig(
- actionCommand = "about",
- name = "simexplorer.action.about",
- shortDescription = "simexplorer.action.about.tooltip",
- longDescription = "simexplorer.action.about.help",
- smallIcon = "action/about.png",
- mnemonic = 'A',
- hideActionText = false
-)
-public class AboutAction extends SimExplorerBaseAction {
-
- private static final long serialVersionUID = 8275852970637350877L;
-
- public AboutAction(String name) {
- super(name);
- }
-
- @Override
- protected void doAction(ActionEvent e) throws Exception {
- super.doAction(e);
- throw new SimExplorerRuntimeException(this + " is not implemented yet!");
- }
-}
\ No newline at end of file
Deleted: trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ConfigAction.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ConfigAction.java 2008-07-26 11:23:03 UTC (rev 1517)
+++ trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ConfigAction.java 2008-07-26 11:23:57 UTC (rev 1518)
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2008 Cemagref
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package fr.cemagref.simexplorer.is.ui.swing.actions;
-
-import fr.cemagref.simexplorer.is.ui.swing.actions.util.SimExplorerBaseAction;
-import org.codelutin.option.ui.ConfigUI;
-
-/**
- * Action pour afficher la dialogue de modification de configuration
- *
- * @author Code Lutin, Landais Gabriel, Chemit Tony
- */
- at org.codelutin.jaxx.action.ActionConfig(
- actionCommand = "config",
- name = "simexplorer.action.config",
- shortDescription = "simexplorer.action.config.tooltip",
- longDescription = "simexplorer.action.config.help",
- smallIcon = "action/config.png",
- mnemonic = 'P',
- hideActionText = false
-)
-public class ConfigAction extends SimExplorerBaseAction {
-
- ConfigUI ui;
-
- private static final long serialVersionUID = 1449553547444065616L;
-
- public ConfigAction(String name) {
- super(name);
- }
-
- @Override
- public void doAction(java.awt.event.ActionEvent e) {
- getUi().setVisible(true);
- }
-
- @Override
- public void disposeUI() {
- super.disposeUI();
- if (ui != null) {
- ui.dispose();
- ui = null;
- }
- }
-
- public ConfigUI getUi() {
- if (ui == null) {
- ui = new ConfigUI().init(getContext(), getContext().getMainConfig(), getContext().getLocalConfig(), getContext().getRemoteConfig());
- }
- return ui;
- }
-}
\ No newline at end of file
Deleted: trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/HelpAction.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/HelpAction.java 2008-07-26 11:23:03 UTC (rev 1517)
+++ trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/HelpAction.java 2008-07-26 11:23:57 UTC (rev 1518)
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2008 Cemagref
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package fr.cemagref.simexplorer.is.ui.swing.actions;
-
-import fr.cemagref.simexplorer.is.exceptions.SimExplorerRuntimeException;
-import fr.cemagref.simexplorer.is.ui.swing.actions.util.SimExplorerBaseAction;
-
-import java.awt.event.ActionEvent;
-
-/**
- * Action pour afficher l'aide principale
- *
- * @author Code Lutin, Landais Gabriel, Chemit Tony
- */
- at org.codelutin.jaxx.action.ActionConfig(
- actionCommand = "help",
- name = "simexplorer.action.help",
- shortDescription = "simexplorer.action.help.tooltip",
- longDescription = "simexplorer.action.help.help",
- smallIcon = "action/help.png",
- mnemonic = 'e',
- hideActionText = false
-)
-public class HelpAction extends SimExplorerBaseAction {
-
- private static final long serialVersionUID = 8250247303366300958L;
-
- public HelpAction(String name) {
- super(name);
- }
-
- @Override
- protected void doAction(ActionEvent e) throws Exception {
- super.doAction(e);
- throw new SimExplorerRuntimeException(this + " is not implemented yet!");
- }
-}
\ No newline at end of file
Deleted: trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/QuitAction.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/QuitAction.java 2008-07-26 11:23:03 UTC (rev 1517)
+++ trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/QuitAction.java 2008-07-26 11:23:57 UTC (rev 1518)
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2008 Cemagref
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package fr.cemagref.simexplorer.is.ui.swing.actions;
-
-import fr.cemagref.simexplorer.is.ui.swing.SimExplorer;
-import fr.cemagref.simexplorer.is.ui.swing.actions.util.SimExplorerBaseAction;
-
-/**
- * Action pour quitter l'application
- *
- * @author Code Lutin, Landais Gabriel, Chemit Tony
- */
- at org.codelutin.jaxx.action.ActionConfig(
- actionCommand = "quit",
- name = "simexplorer.action.quit",
- shortDescription = "simexplorer.action.quit.tooltip",
- longDescription = "simexplorer.action.quit.help",
- smallIcon = "action/quit.png",
- mnemonic = 'Q',
- hideActionText = false
-)
-public class QuitAction extends SimExplorerBaseAction {
-
- private static final long serialVersionUID = -2291089937320691627L;
-
- public QuitAction(String name) {
- super(name);
- }
-
- @Override
- protected void doAction(java.awt.event.ActionEvent e) throws Exception {
- //TODO Fermer tous les tabs
- //TODO se deconnecter,...
- SimExplorer.dispose(false);
- }
-}
Deleted: trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/SiteAction.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/SiteAction.java 2008-07-26 11:23:03 UTC (rev 1517)
+++ trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/SiteAction.java 2008-07-26 11:23:57 UTC (rev 1518)
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2008 Cemagref
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package fr.cemagref.simexplorer.is.ui.swing.actions;
-
-import fr.cemagref.simexplorer.is.exceptions.SimExplorerRuntimeException;
-import fr.cemagref.simexplorer.is.ui.swing.actions.util.SimExplorerBaseAction;
-
-import java.awt.Desktop;
-import java.awt.event.ActionEvent;
-import java.net.URL;
-
-/**
- * Action pour accéder au site de l'application
- *
- * @author Code Lutin, Landais Gabriel, Chemit Tony
- */
- at org.codelutin.jaxx.action.ActionConfig(
- actionCommand = "site",
- name = "simexplorer.action.site",
- shortDescription = "simexplorer.action.site.tooltip",
- longDescription = "simexplorer.action.site.help",
- smallIcon = "action/site.png",
- mnemonic = 'S',
- hideActionText = false
-)
-public class SiteAction extends SimExplorerBaseAction {
-
- private static final long serialVersionUID = 7458557977976803799L;
-
- protected URL siteUrl;
-
- public SiteAction(String name) {
- super(name);
- }
-
- @Override
- protected boolean beforeAction(ActionEvent e) throws Exception {
- if (!super.beforeAction(e)) {
- return false;
- }
- siteUrl = getContext().getMainConfig().getSiteURL();
- return siteUrl != null;
- }
-
- @Override
- protected void doAction(ActionEvent e) throws Exception {
- super.doAction(e);
- if (Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) {
- Desktop.getDesktop().browse(siteUrl.toURI());
- } else {
- //TODO log error ?
- throw new SimExplorerRuntimeException(this + " browser is not supported");
- }
- }
-}
\ No newline at end of file
Deleted: trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/ChangeLocaleAction.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/ChangeLocaleAction.java 2008-07-26 11:23:03 UTC (rev 1517)
+++ trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/ChangeLocaleAction.java 2008-07-26 11:23:57 UTC (rev 1518)
@@ -1,114 +0,0 @@
-/*
- * Copyright (C) 2008 Cemagref
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package fr.cemagref.simexplorer.is.ui.swing.actions.util;
-
-import fr.cemagref.simexplorer.is.ui.swing.SimExplorer;
-import static org.codelutin.i18n.I18n._;
-
-import javax.swing.Action;
-import java.awt.event.ActionEvent;
-import java.util.Locale;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * Une action pour recharger la locale.
- * <p/>
- * Le nom de l'action doit etre de la forme i18n_XX_YY où XX est la langue
- * et YY le pays de la locale à charger.
- *
- * @author Code Lutin, Landais Gabriel, Chemit Tony
- */
- at org.codelutin.jaxx.action.ActionConfig(
- actionCommand = "changeLocale",
- shortDescription = "simexplorer.action.changeLocale.tooltip",
- longDescription = "simexplorer.action.changeLocale.help",
- hideActionText = false,
- multiNames = {"i18n_fr", "i18n_en"}
-)
- at org.codelutin.i18n.I18nable
-public class ChangeLocaleAction extends SimExplorerBaseAction {
-
- public static final Pattern PATTERN_NAME = Pattern.compile("i18n_(\\w\\w)");
-
- protected Locale locale;
-
- private static final long serialVersionUID = 4180668477670765253L;
-
- public ChangeLocaleAction(String name) {
- super(name);
- Matcher matcher = PATTERN_NAME.matcher(name);
- if (!matcher.matches()) {
- throw new IllegalArgumentException(_(getClass().getName() + " should have a name like this 'i18n_XX', but was {0}", name));
- }
-
- locale = org.codelutin.i18n.I18n.newLocale(matcher.group(1));
-
- //putValue(Action.NAME, _(locale.getLibelle()));
- //TODO Make it works again :)
- putValue(Action.NAME, _(locale.getDisplayLanguage()));
- putValue(Action.SMALL_ICON, org.codelutin.jaxx.util.UIHelper.createImageIcon(getIcon()));
- }
-
- @Override
- public String getI18nToolTipText() {
- return "simexplorer.action.changeLocale.tooltip";
- }
-
- public String getIcon() {
- return "action/i18n-" + locale.getLanguage() + ".png";
- }
-
- @Override
- protected boolean beforeAction(ActionEvent e) throws Exception {
- return true;
- //TODO Faut-il proposer une confirmation ?
- //String s = _(locale.getLibelle());
- //int result = JOptionPane.showConfirmDialog(null, _("simexplorer.confirm.changeLanguage", s), "changeLanguage", JOptionPane.YES_NO_OPTION);
- //return result == JOptionPane.OK_OPTION;
- }
-
- @Override
- public void doAction(ActionEvent e) {
-
- // suppression de l'historique
- getContext().getActionFactory().fireAction("historyReset", e.getSource());
-
- getContext().getMainConfig().setLocale(locale);
- // on doit initialiser la nouvelle locale avant de decharger les ui
- // au cas ou un appel à une ui surviendrait et dans quel cas la locale
- // serait toujours sur l'ancienne valeur ...
- getContext().initI18n();
- // save config
- getContext().saveSafely();
- // dispose then reload main ui
- SimExplorer.dispose(true);
- }
-
- @Override
- public String toString() {
- return super.toString() + " Locale " + locale;
- }
-
- public boolean equalsLocale(Locale locale) {
- return this.locale == locale;
- }
-
- public Locale getLocale() {
- return locale;
- }
-}
\ No newline at end of file
1
0
r1517 - in trunk/simexplorer-is: . simexplorer-is-swing simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui
by tchemit@users.labs.libre-entreprise.org 26 Jul '08
by tchemit@users.labs.libre-entreprise.org 26 Jul '08
26 Jul '08
Author: tchemit
Date: 2008-07-26 11:23:03 +0000 (Sat, 26 Jul 2008)
New Revision: 1517
Modified:
trunk/simexplorer-is/pom.xml
trunk/simexplorer-is/simexplorer-is-swing/pom.xml
trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorer.java
trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorerContext.java
trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/SimExplorerMainUI.java
Log:
utilisation du module commandline-ui-action avec les actions de base (help,quit,i18n,config,about,help)...
Modified: trunk/simexplorer-is/pom.xml
===================================================================
--- trunk/simexplorer-is/pom.xml 2008-07-25 16:07:36 UTC (rev 1516)
+++ trunk/simexplorer-is/pom.xml 2008-07-26 11:23:03 UTC (rev 1517)
@@ -455,6 +455,12 @@
<version>${commandline.version}</version>
<scope>compile</scope>
</dependency>
+ <dependency>
+ <groupId>org.codelutin.commandline</groupId>
+ <artifactId>commandline-ui-action</artifactId>
+ <version>${commandline.version}</version>
+ <scope>compile</scope>
+ </dependency>
<dependency>
<groupId>javax.persistence</groupId>
Modified: trunk/simexplorer-is/simexplorer-is-swing/pom.xml
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing/pom.xml 2008-07-25 16:07:36 UTC (rev 1516)
+++ trunk/simexplorer-is/simexplorer-is-swing/pom.xml 2008-07-26 11:23:03 UTC (rev 1517)
@@ -242,6 +242,10 @@
<groupId>org.codelutin.commandline</groupId>
<artifactId>commandline-ui</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.codelutin.commandline</groupId>
+ <artifactId>commandline-ui-action</artifactId>
+ </dependency>
<!-- librairie jaxx -->
<dependency>
<groupId>org.codelutin.jaxx</groupId>
Modified: trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorer.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorer.java 2008-07-25 16:07:36 UTC (rev 1516)
+++ trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorer.java 2008-07-26 11:23:03 UTC (rev 1517)
@@ -25,6 +25,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.codelutin.i18n.I18n;
+import org.codelutin.option.ContextProvider;
import org.codelutin.option.ParserFailedException;
import java.awt.event.ActionEvent;
@@ -59,7 +60,7 @@
try {
// instanciate context, parser and configs
- context = new SimExplorerContext();
+ context = (SimExplorerContext) ContextProvider.getContext();
// init context
context.init(args);
Modified: trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorerContext.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorerContext.java 2008-07-25 16:07:36 UTC (rev 1516)
+++ trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorerContext.java 2008-07-26 11:23:03 UTC (rev 1517)
@@ -32,9 +32,11 @@
import fr.cemagref.simexplorer.is.ui.swing.actions.util.SimExplorerBaseAction;
import fr.cemagref.simexplorer.is.ui.swing.commandline.SimExplorerAbstractContext;
import fr.cemagref.simexplorer.is.ui.swing.model.DataEntityModel;
+import fr.cemagref.simexplorer.is.ui.swing.ui.SimExplorerMainUI;
+import fr.cemagref.simexplorer.is.ui.swing.ui.SimExplorerTab;
+import fr.cemagref.simexplorer.is.ui.swing.ui.util.ErrorDialog;
import org.codelutin.i18n.I18n;
import org.codelutin.jaxx.action.factory.ActionFactory;
-import org.codelutin.option.ParserFailedException;
/**
* Le context de l'application, implanté en singleton.
@@ -104,7 +106,18 @@
I18n.init(getMainConfig().getLocale(), getMainConfig().getEncoding());
}
+ public void dispose(boolean reload) {
+ SimExplorerTab.dispose();
+ getActionFactory().dispose();
+ ErrorDialog.disposeUI();
+ SimExplorerMainUI.getUI().disposeUI();
+ if (reload) {
+ SimExplorer.launch();
+ }
+ }
+
+
public void initServices() {
// init local service
getLocalStorageService();
@@ -199,12 +212,11 @@
}
/**
- * restricted access constructor
+ * public access constructor to make it instanciable vai a {@link java.util.ServiceLoader}
*
- * @throws java.io.IOException if pb while saing configuration
- * @throws ParserFailedException if pb while parsing arguments
+ * @throws Exception if any execption while init the context
*/
- SimExplorerContext() throws Exception {
+ public SimExplorerContext() throws Exception {
super();
}
Modified: trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/SimExplorerMainUI.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/SimExplorerMainUI.java 2008-07-25 16:07:36 UTC (rev 1516)
+++ trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/ui/SimExplorerMainUI.java 2008-07-26 11:23:03 UTC (rev 1517)
@@ -22,7 +22,6 @@
import fr.cemagref.simexplorer.is.ui.swing.SimExplorer;
import fr.cemagref.simexplorer.is.ui.swing.SimExplorerContext;
import fr.cemagref.simexplorer.is.ui.swing.actions.ExportElementAction;
-import fr.cemagref.simexplorer.is.ui.swing.actions.util.ChangeLocaleAction;
import fr.cemagref.simexplorer.is.ui.swing.actions.util.SimExplorerBaseAction;
import static org.codelutin.i18n.I18n._;
@@ -133,14 +132,15 @@
//CountryEnum country = context.getConfig().getUserCountry();
String[] actions = context.getActionFactory().getActionNames();
for (String actionName : actions) {
- Matcher matcher = ChangeLocaleAction.PATTERN_NAME.matcher(actionName);
+ Matcher matcher = org.codelutin.option.ui.actions.ChangeLocaleAction.PATTERN_NAME.matcher(actionName);
if (!matcher.matches()) {
continue;
}
AbstractButton button = (AbstractButton) getObjectById(actionName);
- ChangeLocaleAction action = (ChangeLocaleAction) button.getAction();
- boolean enable = !action.equalsLocale(locale);
- UpdateButton(button, enable, enable ? action.getLocale() : null);
+ SimExplorerBaseAction action = (SimExplorerBaseAction) button.getAction();
+ org.codelutin.option.ui.actions.ChangeLocaleAction realAction = (org.codelutin.option.ui.actions.ChangeLocaleAction) action.getDelegate();
+ boolean enable = !realAction.equalsLocale(locale);
+ UpdateButton(button, enable, enable ? realAction.getLocale() : null);
//button.setEnabled(enable);
}
}
1
0
r1516 - trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util
by tchemit@users.labs.libre-entreprise.org 25 Jul '08
by tchemit@users.labs.libre-entreprise.org 25 Jul '08
25 Jul '08
Author: tchemit
Date: 2008-07-25 16:07:36 +0000 (Fri, 25 Jul 2008)
New Revision: 1516
Modified:
trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/ChangeLocaleAction.java
trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/SimExplorerAbstractTabAction.java
Log:
renommage de l'action de base en SimExplorerBaseAction car ce n'est plus une classe abstraite (voir jaxx-swing-action)
Modified: trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/ChangeLocaleAction.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/ChangeLocaleAction.java 2008-07-25 16:07:23 UTC (rev 1515)
+++ trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/ChangeLocaleAction.java 2008-07-25 16:07:36 UTC (rev 1516)
@@ -41,7 +41,7 @@
multiNames = {"i18n_fr", "i18n_en"}
)
@org.codelutin.i18n.I18nable
-public class ChangeLocaleAction extends SimExplorerAbstractAction {
+public class ChangeLocaleAction extends SimExplorerBaseAction {
public static final Pattern PATTERN_NAME = Pattern.compile("i18n_(\\w\\w)");
Modified: trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/SimExplorerAbstractTabAction.java
===================================================================
--- trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/SimExplorerAbstractTabAction.java 2008-07-25 16:07:23 UTC (rev 1515)
+++ trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/SimExplorerAbstractTabAction.java 2008-07-25 16:07:36 UTC (rev 1516)
@@ -42,7 +42,7 @@
* @author Code Lutin, Landais Gabriel, Chemit Tony
*/
@org.codelutin.i18n.I18nable
-public abstract class SimExplorerAbstractTabAction extends SimExplorerAbstractAction {
+public abstract class SimExplorerAbstractTabAction extends SimExplorerBaseAction {
private SimExplorerTab tab;
protected String param;
1
0