|
From: <de...@us...> - 2004-02-12 15:38:15
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20934/commun Modified Files: DodicoAnalyze.java DodicoLib.java ProgressionBuAdapter.java ProgressionDodicoAdapter.java ProgressionInterface.java ProgressionTestAdapter.java dodico_en.fr_txt Added Files: DodicoEnumType.java ProgressionUpdater.java Log Message: Maj version 0.05 prepro --- NEW FILE: DodicoEnumType.java --- /* * @file H2dEnumType.java * @creation 26 juin 2003 * @modification $Date: 2004/02/12 15:32:43 $ * @license GNU General Public License 2 * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne * @mail de...@fu... */ package org.fudaa.dodico.commun; import java.util.Comparator; import java.util.Iterator; import java.util.List; /** * @author deniger * @version $Id: DodicoEnumType.java,v 1.1 2004/02/12 15:32:43 deniger Exp $ */ public class DodicoEnumType implements Comparable { int id_; String nom_; /** * */ public DodicoEnumType(int _id, String _nom) { id_= _id; nom_= _nom; } public String getNom() { return nom_; } public String toString() { return nom_; } public int getId() { return id_; } public boolean equals(Object _o) { if (_o == this) return true; if (!(getClass().isInstance(_o))) { return false; } return id_ == ((DodicoEnumType)_o).id_; } /** * Compare selon le nom de le nom de l'enumeration */ public int compareTo(Object o) { if (o == this) return 0; if (o instanceof DodicoEnumType) { return nom_.compareTo(((DodicoEnumType)o).nom_); } else throw new IllegalArgumentException("compareTo " + getClass().getName()); } public static DodicoEnumType getIdInList(List _l, int _id) { for (Iterator it= _l.iterator(); it.hasNext();) { DodicoEnumType e= (DodicoEnumType)it.next(); if (e.id_ == _id) return e; } return null; } public static class H2dEnumIDComparator implements Comparator{ /** * */ public int compare(Object o1, Object o2) { if( (o1 instanceof DodicoEnumType) && (o2 instanceof DodicoEnumType)){ return ((DodicoEnumType)o1).id_-((DodicoEnumType)o2).id_; } throw new IllegalArgumentException("o1 and o2 must be H2dEnumType"); } } } --- NEW FILE: ProgressionUpdater.java --- /* * @file ProgressionUpdater.java * @creation 28 janv. 2004 * @modification $Date: 2004/02/12 15:32:43 $ * @license GNU General Public License 2 * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne * @mail de...@fu... */ package org.fudaa.dodico.commun; /** * Cette classe permet de mettre a jour automatiquement la progression * d'une boucle en donnant le nombre d'iteration attendu et le nombre de * mise a jour ( ou etape) voulue.Exemple<br> * <pre> * int nbEle=_getNombreElementATraiter(); * ProgressionUpdater prog=new ProgressionUpdater(_inter); * prog.setValue(4, nbEle); * for(int i=nbEle-1;i>=0;i--){ * //faire plein de chose * * prog.majAvancement(); * } * </pre> * L'updater possede un compteur interne qui est mis a jour * a chaque appel de {@link #majAvancement()} * @author deniger * @version $Id: ProgressionUpdater.java,v 1.1 2004/02/12 15:32:43 deniger Exp $ */ public class ProgressionUpdater { /** * La progression qui doit etre mise a jour */ ProgressionInterface progress_; int pourcStep_; int pas_; int nextPas_; int avancementEnCours_; int iEnCours_; public ProgressionUpdater() {} public ProgressionUpdater(ProgressionInterface _progress) { setProgress(_progress); iEnCours_= 0; } public ProgressionInterface getProgress() { return progress_; } public final void setProgress(ProgressionInterface _interface) { progress_= _interface; } /** * Permet d'initialiser cet updater avec le nombre d'étapes voulues * et le nombre d'iteration attendue. * Exemple:<br> vous avez une boucle qui contient 200 iteration et vous * voulez mettre a jour la progression tous les 50 (soit 4 étapes). * Il suffit d'appeler setValue(4,200). * Appelle la fonction setValue(int,int,0,100) * @see #setValue(int, int, int, int) */ public void setValue(int _nbStep, int nbIterationMax) { setValue(_nbStep, nbIterationMax, 0, 100); } /** * Permet d'initialiser cet updater avec le nombre d'étapes voulues * et le nombre d'iteration attendue. De plus, il est possible de * preciser le pourcentage initial et l'étendu du pourcentage. * Exemple:<br> * vous avez une boucle qui contient 300 iteration et vous * voulez mettre a jour la progression tous les 100 (soit 3 étapes). * Par contre, vous voulez que la progression commence à 20 et * qu'elle se finisse a 60 ( soit une étendue de 60) * Il suffit d'appeler setValue(3,300,20,60). * * Attention : si le nombre d'iteration pour chaque etape est trop * faible (<20) le nombre d'etape sera de 2. C'est pour eviter de * mettre a jour trop souvent l'interface * @see #getStep(int, int) */ public void setValue( int _nbStep, int nbIterationMax, int _pourcentOffSet, int _pourcentRange) { int step= (((int) (nbIterationMax / _nbStep)) < 20) ? 2 : _nbStep; pourcStep_= (int) (_pourcentRange / step); pas_= (int) (nbIterationMax / step); nextPas_= pas_; avancementEnCours_= _pourcentOffSet; iEnCours_= 0; } /** * Met a jour l'interface de progression uniquement */ public void majProgessionStateOnly() { if (progress_ != null) progress_.setProgression(avancementEnCours_); } /** * Met a jour l'interface de progression uniquement avec la * description <code>_message</code> */ public void majProgessionStateOnly(String _message) { if (progress_ != null) { progress_.setProgression(avancementEnCours_); progress_.setDesc(_message); } } /** * Calcul si i est superieur au pas attendu, et si oui, la progression * est mise a jour. */ public void majAvancement() { if (++iEnCours_ > nextPas_) { avancementEnCours_ += pourcStep_; nextPas_ += pas_; majProgessionStateOnly(); } } /** * Methode utilisée pour mettre a jour l'avancement. * Renvoie le nb d'etapes "acceptables" dans nbIteration. * Si le nombre d'iteration dans l'etape * est inf a 20, 2 etapes sont renvoyees. * Exemple :vous avez 100 iterations que vous voulez parcourir en 4 etapes * de 25 (sup a 20). La methode getStep(100,4) renvoie donc 4. * Par contre getStep(100,10) renvoie 2 :(étapes de 10 iterations inf a 25). * @deprecated used the ProgressionUpdater */ public final static int getStep(int nbIteration, int _nbStep) { return (((int) (nbIteration / _nbStep)) < 20) ? 2 : _nbStep; } } Index: DodicoAnalyze.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun/DodicoAnalyze.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** DodicoAnalyze.java 12 Dec 2003 10:30:52 -0000 1.10 --- DodicoAnalyze.java 12 Feb 2004 15:32:43 -0000 1.11 *************** *** 26,58 **** */ public class DodicoAnalyze { ! private DodicoAnalyze.Field[] errors_; ! private DodicoAnalyze.Field[] warns_; ! private DodicoAnalyze.Field[] infos_; private DodicoAnalyze.Field fatalError_; private String desc_; private String ressource_; ! public DodicoAnalyze(DodicoAnalyze.Editor _io) { ! if (_io != null) { ! errors_= _io.getErrors(); ! warns_= _io.getWarnings(); ! infos_= _io.getInfos(); ! fatalError_= _io.getFatalError(); ! desc_= _io.desc_; ! ressource_= _io.getRessource(); ! } ! } ! public boolean containsFatalError() { ! return fatalError_ != null; ! } ! public static DodicoAnalyze[] getAnalyze(DodicoAnalyze.Editor[] _io) { ! if (_io == null) ! return null; ! int nb= _io.length; ! DodicoAnalyze[] r= new DodicoAnalyze[nb]; ! for (int i= nb - 1; i >= 0; i--) { ! r[i]= _io[i].toAnalyze(); ! } ! return r; ! } public void printResume() { System.out.println(getResume()); --- 26,37 ---- */ public class DodicoAnalyze { ! private DodicoAnalyze.Canal errors_; ! private DodicoAnalyze.Canal warns_; ! private DodicoAnalyze.Canal infos_; private DodicoAnalyze.Field fatalError_; private String desc_; private String ressource_; ! public DodicoAnalyze() {} ! public void printResume() { System.out.println(getResume()); *************** *** 123,127 **** */ public DodicoAnalyze.Field[] getErrors() { ! return errors_; } /** --- 102,106 ---- */ public DodicoAnalyze.Field[] getErrors() { ! return errors_.getFields(); } /** *************** *** 130,134 **** */ public DodicoAnalyze.Field[] getWarnings() { ! return warns_; } /** --- 109,113 ---- */ public DodicoAnalyze.Field[] getWarnings() { ! return warns_.getFields(); } /** *************** *** 137,198 **** */ public DodicoAnalyze.Field[] getInfos() { ! return infos_; } public boolean containsErrors() { return ( ! (fatalError_ != null) || ((errors_ != null) && (errors_.length > 0))) ! ? true ! : false; } public boolean containsWarnings() { ! return ((warns_ != null) && (warns_.length > 0)) ? true : false; } public boolean containsInfos() { ! return ((infos_ != null) && (infos_.length > 0)) ? true : false; } public boolean isEmpty() { return (!containsErrors()) && (!containsWarnings()) && (!containsInfos()); } ! public static void manageException( ! FileNotFoundException _e, ! DodicoAnalyze.Editor _analyze) { ! _analyze.addError(DodicoResource.getS("Fichier non trouvé")); ! _analyze.addInfo(_e.getMessage()); if (CtuluLib.DEBUG) _e.printStackTrace(); } ! public static void manageException( ! IOException _e, ! DodicoAnalyze.Editor _analyze) { ! _analyze.addFatalError(DodicoResource.getS("Erreur d'entrée/sortie")); ! _analyze.addInfo(_e.getMessage()); if (CtuluLib.DEBUG) _e.printStackTrace(); } ! public static void manageException( NumberFormatException _e, - DodicoAnalyze.Editor _analyze, FortranReader _l) { ! _analyze.addFatalError( DodicoResource.getS("Format du champ incorrect"), _l); ! _analyze.addInfo(_e.getMessage()); if (CtuluLib.DEBUG) _e.printStackTrace(); } ! public static void manageException( ! IllegalArgumentException _e, ! DodicoAnalyze.Editor _analyze) { ! _analyze.addFatalError( DodicoResource.getS("Erreur interne: argument non valide")); ! _analyze.addInfo(_e.getMessage()); if (CtuluLib.DEBUG) _e.printStackTrace(); } ! public static void manageException( ! Exception _e, ! DodicoAnalyze.Editor _analyze) { ! _analyze.addFatalError(DodicoResource.getS("Erreur à l'exécution")); ! _analyze.addInfo(_e.getMessage()); if (CtuluLib.DEBUG) _e.printStackTrace(); --- 116,174 ---- */ public DodicoAnalyze.Field[] getInfos() { ! return infos_.getFields(); ! } ! ! public boolean containsFatalError() { ! return fatalError_ != null; } public boolean containsErrors() { return ( ! (fatalError_ != null) || ((errors_ != null) && (!errors_.isEmpty()))); } public boolean containsWarnings() { ! return ((warns_ != null) && (!warns_.isEmpty())); } public boolean containsInfos() { ! return ((infos_ != null) && (!infos_.isEmpty())); } + public boolean isEmpty() { return (!containsErrors()) && (!containsWarnings()) && (!containsInfos()); } ! public void manageException( ! FileNotFoundException _e) { ! getErrorCanal().addMessage( ! DodicoResource.getS("Fichier non trouvé")); ! getInfoCanal().addMessage(_e.getMessage()); if (CtuluLib.DEBUG) _e.printStackTrace(); } ! public void manageException(IOException _e) { ! addFatalError(DodicoResource.getS("Erreur d'entrée/sortie")); ! getInfoCanal().addMessage(_e.getMessage()); if (CtuluLib.DEBUG) _e.printStackTrace(); } ! public void manageException( NumberFormatException _e, FortranReader _l) { ! addFatalError( DodicoResource.getS("Format du champ incorrect"), _l); ! getInfoCanal().addMessage(_e.getMessage()); if (CtuluLib.DEBUG) _e.printStackTrace(); } ! public void manageException( ! IllegalArgumentException _e) { ! addFatalError( DodicoResource.getS("Erreur interne: argument non valide")); ! getInfoCanal().addMessage(_e.getMessage()); if (CtuluLib.DEBUG) _e.printStackTrace(); } ! public void manageException(Exception _e) { ! addFatalError(DodicoResource.getS("Erreur à l'exécution")); ! getInfoCanal().addMessage(_e.getMessage()); if (CtuluLib.DEBUG) _e.printStackTrace(); *************** *** 200,206 **** protected static String getResume( String _titre, ! DodicoAnalyze.Field[] _ls, String _prefix) { ! if ((_ls == null) || (_ls.length <= 0)) { return null; } --- 176,182 ---- protected static String getResume( String _titre, ! DodicoAnalyze.Canal _ls, String _prefix) { ! if ((_ls == null) || (_ls.isEmpty())) { return null; } *************** *** 212,218 **** StringBuffer _bufferStockage, String _titre, ! DodicoAnalyze.Field[] _ls, String _prefix) { ! if ((_ls == null) || (_ls.length <= 0)) { return false; } --- 188,194 ---- StringBuffer _bufferStockage, String _titre, ! DodicoAnalyze.Canal _ls, String _prefix) { ! if ((_ls == null) || (_ls.isEmpty())) { return false; } *************** *** 221,228 **** String lineSep= CtuluLib.LINE_SEP; Field element; ! int nb= _ls.length; for (int i= 0; i < nb; i++) { _bufferStockage.append(lineSep); ! element= _ls[i]; _bufferStockage.append(_prefix); int t= element.getOffset(); --- 197,204 ---- String lineSep= CtuluLib.LINE_SEP; Field element; ! int nb= _ls.messages_.size(); for (int i= 0; i < nb; i++) { _bufferStockage.append(lineSep); ! element= (Field)_ls.messages_.get(i); _bufferStockage.append(_prefix); int t= element.getOffset(); *************** *** 237,479 **** return true; } ! public static class Editor { ! String desc_; ! private ArrayList editorWarnings_; ! private ArrayList editorErrors_; ! private ArrayList editorInfos_; ! private DodicoAnalyze.Field editorFatalError_; ! String ressource_; ! public Editor() {} ! public DodicoAnalyze.Field getFatalError() { ! return editorFatalError_; ! } ! public void merge(DodicoAnalyze.Editor _a) { ! if ((_a == null) || _a.isEmpty()) ! return; ! editorWarnings_= merge(editorWarnings_, _a.editorWarnings_); ! editorInfos_= merge(editorInfos_, _a.editorInfos_); ! editorErrors_= merge(editorErrors_, _a.editorErrors_); ! } ! private ArrayList merge(ArrayList _target, ArrayList _s) { ! if ((_s == null) || (_s.isEmpty())) ! return _target; ! if (_target == null) ! return new ArrayList(_s); ! else { ! _target.addAll(_s); ! return _target; ! } ! } public void clear() { ! if (editorWarnings_ != null) ! editorWarnings_.clear(); ! if (editorErrors_ != null) ! editorErrors_.clear(); ! if (editorInfos_ != null) ! editorInfos_.clear(); ! } ! /** ! * Returns the erreurs. ! * @return Field[] ! */ ! public DodicoAnalyze.Field[] getErrors() { ! return getFieldArray(editorErrors_); ! } ! /** ! * Returns the warns. ! * @return Field[] ! */ ! public DodicoAnalyze.Field[] getWarnings() { ! return getFieldArray(editorWarnings_); ! } ! /** ! * Returns the warns. ! * @return Field[] ! */ ! public DodicoAnalyze.Field[] getInfos() { ! return getFieldArray(editorInfos_); ! } ! /** ! * Test pour savoir si l'analyse s'est passee sans erreur. ! * @return true si le tableau d'erreur est non null. ! */ ! public boolean containsErrors() { ! return editorErrors_ == null ? false : true; ! } ! public boolean containsInfos() { ! return editorInfos_ == null ? false : true; ! } ! public boolean containsWarnings() { ! return editorWarnings_ == null ? false : true; ! } ! public boolean isEmpty() { ! return ( ! (editorWarnings_ == null) ! && (editorInfos_ == null) ! && (editorErrors_ == null) ! && (editorFatalError_ == null)) ! ? true ! : false; } ! public DodicoAnalyze toAnalyze() { ! return (isEmpty()) ? null : new DodicoAnalyze(this); } ! /** ! * Renvoie dans un tableau le contenu de la liste <code>_list</code> (qui ne ! * contient que des Field). ! * @return null si la liste est null ou de taille nulle. ! * ! */ ! private static DodicoAnalyze.Field[] getFieldArray(Collection _list) { ! if ((_list == null) || (_list.size() == 0)) return null; ! int l= _list.size(); ! DodicoAnalyze.Field[] r= new DodicoAnalyze.Field[l]; ! _list.toArray(r); return r; } ! public Field addError(String _message) { ! return addError(_message, 0); ! } ! public Field addError(String _message, FortranReader _in) { ! return addError(_message, _in.getLineNumber()); ! } ! public Field addError(String _message, LineNumberReader _in) { ! return addError(_message, _in.getLineNumber()); ! } ! public boolean containsFatalError() { ! return editorFatalError_ != null; ! } ! public Field addFatalError(String _message) { ! return addFatalError(_message, 0); ! } ! public Field addFatalError(String _message, LineNumberReader _in) { ! return addFatalError(_message, _in.getLineNumber()); ! } ! public Field addFatalError(String _message, FortranReader _in) { ! return addFatalError(_message, _in.getLineNumber()); ! } ! public Field addFatalError(String _message, int _offset) { ! if (editorFatalError_ == null) { ! editorFatalError_= new DodicoAnalyze.Field(_message, _offset); ! } ! return editorFatalError_; ! } ! public synchronized Field addError(String _message, int _offset) { ! if (editorErrors_ == null) ! editorErrors_= new ArrayList(); ! if (_message == null) { ! return addField( ! editorErrors_, ! DodicoResource.getS("Erreur inconnue"), ! _offset); ! } ! return addField(editorErrors_, _message, _offset); ! } ! public Field addWarning(String _message, FortranReader _in) { ! return addWarning(_message, _in.getLineNumber()); } ! public synchronized Field addWarning(String _message, int _offset) { ! if (editorWarnings_ == null) ! editorWarnings_= new ArrayList(); ! if (_message == null) { ! return addField( ! editorWarnings_, ! DodicoResource.getS("Avertissement inconnu"), ! _offset); ! } ! return addField(editorWarnings_, _message, _offset); } ! public Field addInfo(String _message, FortranReader _in) { ! return addInfo(_message, _in.getLineNumber()); } ! public Field addInfo(String _message, LineNumberReader _in) { ! return addInfo(_message, _in.getLineNumber()); } ! public Field addInfo(String _message) { ! return addInfo(_message, 0); } ! public Field addInfo(String _message, int _offset) { ! if (editorInfos_ == null) ! editorInfos_= new ArrayList(); ! if (_message == null) { ! return addField( ! editorInfos_, ! DodicoResource.getS("Information inconnue"), _offset); ! } ! return addField(editorInfos_, _message, _offset); ! } ! /** ! * Appelle la methode complete avec _offset=0 et sans tranduction du ! * message. ! * @see #getField(String, int, boolean) ! */ ! public static DodicoAnalyze.Field createField(String _message) { ! return createField(_message, 0); ! } ! /** ! * Cree (si <code>_message</code> non null) un champ contenant les infos ! * passes en parametres. ! * @param _message le message ! * @param _offset la ligne (ou le byte) concerne ! */ ! public static DodicoAnalyze.Field createField( ! String _message, ! int _offset) { ! if (_message == null) ! return null; ! return new DodicoAnalyze.Field(_message, _offset); ! } ! /** ! * Ajoute le message <code>_message</code> a la collection ! * <code>_warns</code>.Le numero de ligne sera determine a partir de ! * la methode <code>_in.getLineNumber()</code>. ! * @see #addField(Collection, String, int) ! */ ! public static void addField( ! Collection _warns, ! String _message, ! FortranReader _in) { ! addField(_warns, _message, _in.getLineNumber()); ! } ! /** ! * Ajoute le message <code>_message</code>a la collection ! * <code>_warns</code>.Le numero de ligne sera determine a partir de ! * la methode <code>_in.getLineNumber()</code>. ! */ ! private static Field addField( ! Collection _warns, ! String _message, ! int _offset) { ! Field f= DodicoAnalyze.Editor.createField(_message, _offset); ! _warns.add(f); ! return f; ! } ! /** ! * ! */ ! public String getDesc() { ! return desc_; } ! /** ! * ! */ ! public void setDesc(String _string) { ! desc_= _string; } ! /** ! * ! */ ! public String getRessource() { ! return ressource_; } ! /** ! * ! */ ! public void setRessource(String _string) { ! ressource_= _string; } } public static class Field { /** --- 213,368 ---- return true; } ! public static class Canal { ! ArrayList messages_; ! public Canal() {} ! public void clear() { ! if (messages_ != null) ! messages_.clear(); } ! ! public void merge(Canal _c){ ! if(_c!=null) { ! if(messages_==null) messages_=_c.messages_; ! else if(_c.messages_!=null) messages_.addAll(_c.messages_); ! } } ! ! public DodicoAnalyze.Field[] getFields() { ! if (isEmpty()) return null; ! Field[] r= new Field[messages_.size()]; ! messages_.toArray(r); return r; } ! ! public boolean containsMessage() { ! return messages_ == null ? false : messages_.size() > 0; } ! public boolean isEmpty() { ! return !containsMessage(); } ! public Field addMessage(String _message) { ! return addMessage(_message, 0); } ! ! public Field addMessage(String _message, LineNumberReader _in) { ! return addMessage(_message, _in.getLineNumber()); } ! ! public Field addMessage(String _message, FortranReader _in) { ! return addMessage(_message, _in.getLineNumber()); } ! ! public synchronized Field addMessage(String _message, int _offset) { ! if (messages_ == null) ! messages_= new ArrayList(); ! Field r= ! new DodicoAnalyze.Field( ! _message == null ? DodicoResource.getS("Message inconnu") : _message, _offset); ! messages_.add(r); ! return r; } ! ! } ! ! public void clear() { ! if (warns_ != null) ! warns_.clear(); ! if (errors_ != null) ! errors_.clear(); ! if (infos_ != null) ! infos_.clear(); ! } ! ! public Field addFatalError(Field _f) { ! if (fatalError_ == null) { ! fatalError_= _f; } ! return fatalError_; ! } ! ! public Field addFatalError(String _m) { ! return addFatalError(_m, 0); ! } ! ! public Field addFatalError(String _m, LineNumberReader _in) { ! return addFatalError(new Field(_m, _in.getLineNumber())); ! } ! ! public Field addFatalError(String _m, FortranReader _in) { ! return addFatalError(new Field(_m, _in.getLineNumber())); ! } ! ! public Field addFatalError(String _m, int _index) { ! return addFatalError(new Field(_m, _index)); ! } ! ! public Field addError(String _m, FortranReader _in) { ! return getErrorCanal().addMessage(_m, _in.getLineNumber()); ! } ! ! public Field addError(String _m, LineNumberReader _in) { ! return getErrorCanal().addMessage(_m, _in.getLineNumber()); } ! ! public Field addError(String _m, int _index) { ! return getErrorCanal().addMessage(_m, _index); ! } ! ! public Field addWarn(String _m, FortranReader _in) { ! return getWarnCanal().addMessage(_m, _in.getLineNumber()); ! } ! ! public Field addWarn(String _m, LineNumberReader _in) { ! return getWarnCanal().addMessage(_m, _in.getLineNumber()); ! } ! ! public Field addWarn(String _m, int _index) { ! return getWarnCanal().addMessage(_m, _index); ! } ! ! public Field addInfo(String _m) { ! return addInfo(_m, -1); ! } ! ! public Field addInfo(String _m, FortranReader _in) { ! return getInfoCanal().addMessage(_m, _in.getLineNumber()); ! } ! ! public Field addInfo(String _m, LineNumberReader _in) { ! return getInfoCanal().addMessage(_m, _in.getLineNumber()); } + + public Field addInfo(String _m, int _index) { + return getInfoCanal().addMessage(_m, _index); + } + + public Canal getErrorCanal() { + if (errors_ == null) + errors_= new Canal(); + return errors_; + } + + public Canal getWarnCanal() { + if (warns_ == null) + warns_= new Canal(); + return warns_; } + + public Canal getInfoCanal() { + if (infos_ == null) + infos_= new Canal(); + return infos_; + } + + /** + * + */ + public void setRessource(String _string) { + ressource_= _string; + } + public static class Field { /** *************** *** 550,552 **** --- 439,451 ---- ressource_= _string; } + + public void merge(DodicoAnalyze _analyze){ + if(_analyze==null) return; + if(errors_==null) errors_=_analyze.errors_; + else errors_.merge(_analyze.errors_); + if(warns_==null) warns_=_analyze.warns_; + else warns_.merge(_analyze.warns_); + if(infos_==null) errors_=_analyze.infos_; + else infos_.merge(_analyze.infos_); + } } Index: DodicoLib.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun/DodicoLib.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** DodicoLib.java 19 Dec 2003 12:10:33 -0000 1.21 --- DodicoLib.java 12 Feb 2004 15:32:43 -0000 1.22 *************** *** 43,46 **** --- 43,48 ---- import com.memoire.fu.FuLib; + + import org.fudaa.dodico.ef.EfLib; /** * Des methodes statiques qui "semblent" utiles *************** *** 579,581 **** --- 581,590 ---- return r; } + + /** + * Appel la methode getStep(nbIteration,5) + */ + public final static int getStep(int nbIteration) { + return ProgressionUpdater.getStep(nbIteration, 5); + } } Index: ProgressionBuAdapter.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun/ProgressionBuAdapter.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ProgressionBuAdapter.java 25 Nov 2003 10:11:25 -0000 1.9 --- ProgressionBuAdapter.java 12 Feb 2004 15:32:43 -0000 1.10 *************** *** 34,36 **** --- 34,46 ---- t_.setName(_s); } + /** + * + */ + public void reset() { + if (t_ != null) { + t_.setName(null); + t_.setProgression(0); + } + } + } Index: ProgressionDodicoAdapter.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun/ProgressionDodicoAdapter.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ProgressionDodicoAdapter.java 25 Nov 2003 10:11:25 -0000 1.7 --- ProgressionDodicoAdapter.java 12 Feb 2004 15:32:43 -0000 1.8 *************** *** 8,11 **** --- 8,13 ---- */ package org.fudaa.dodico.commun; + import org.fudaa.ctulu.CtuluLib; + import org.fudaa.dodico.corba.calcul.SProgression; /** *************** *** 30,32 **** --- 32,42 ---- t_.operation= _s; } + + public void reset() { + if(t_!=null){ + t_.pourcentage=0; + t_.operation=CtuluLib.EMPTY_STRING; + } + } + } Index: ProgressionInterface.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun/ProgressionInterface.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ProgressionInterface.java 25 Nov 2003 10:11:25 -0000 1.7 --- ProgressionInterface.java 12 Feb 2004 15:32:43 -0000 1.8 *************** *** 17,19 **** --- 17,20 ---- void setProgression(int _v); void setDesc(String _s); + void reset(); } Index: ProgressionTestAdapter.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun/ProgressionTestAdapter.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ProgressionTestAdapter.java 25 Nov 2003 10:11:25 -0000 1.3 --- ProgressionTestAdapter.java 12 Feb 2004 15:32:43 -0000 1.4 *************** *** 31,33 **** --- 31,38 ---- System.out.println("progress desc : " + _s); } + /** + * + */ + public void reset() {} + } Index: dodico_en.fr_txt =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun/dodico_en.fr_txt,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** dodico_en.fr_txt 21 Jan 2004 10:59:09 -0000 1.7 --- dodico_en.fr_txt 12 Feb 2004 15:32:43 -0000 1.8 *************** *** 59,61 **** Fichier csv (texte)=File csv (text) Reflux crb=Reflux crb ! Reflux courbes transitoires (format binaire)=Reflux transient curves (binary format) \ No newline at end of file --- 59,110 ---- Fichier csv (texte)=File csv (text) Reflux crb=Reflux crb ! Reflux courbes transitoires (format binaire)=Reflux transient curves (binary format) ! Orientation des éléments=Element Orientation ! transformation T3->T6=T3->T6 transformation ! transformation T6->T3=T6->T3 transformation ! transformation T6 en 4 T3=T6->4 T3 transformation ! Recherche des frontières=Boundary edges search ! Classement des frontières=Boundary edges sort ! Orientation des frontières=Boundary edges orientation ! Nombre d'éléments mal orientés\: {0}=Number of element oriented in wrong direction\: {0} ! Pas de connexions trouvées pour le point {0}=No connection found for point {0} ! Recherche des connexions=Connection search ! Impossible de trouver les connexions=Connections can't be found ! Aucun point n'a pu être interpolé=No point interpolated ! {0} points n'ont pas été interpolés correctement={0} points are not correctly interpolated ! Points non interpolés correctement\: {0}=Points that are not correctly interpolated \: {0} ! Interpolation=Interpolation ! Seuls les maillages de type T3 ou T6 peuvent servir de référence=Only grids with T3 or T6 elements can be used as a reference for this interpolation ! Les indices suivants ont été extrapolés\: {0}=The following indices have been extrapolated \: {0} ! Recherche des éléments mal orientés=Search for bad oriented elements ! Contrôle de l'orientation des éléments=Element orientation control ! Ne pas faire de contrôle=No control ! Eléments orientés dans le sens trigo=Elements oriented in trigo direction ! Recherche des éléments orientés dans le sens trigo=Search for elements oriented in trigo direction ! Eléments orientés dans le sens horaire=Elements oriented in clockwise direction ! Recherche des éléments orientés dans le sens trigo=Search for elements oriented in clockwise direction ! Rechercher des éléments orientés dans le sens trigo=Search elements oriented in trigo direction ! Rechercher des éléments orientés dans le sens trigo=Search elements oriented in clockwise direction ! Contrôle des angles=Angles control ! Angle minimum (en degré)=Minimun angle (degree) ! Recherche des éléments plats=Search for flat elements ! Connexions=Connections ! Eléments surcontraints=Overstressed elements ! Recherche valable uniquement pour les triangles=Search available only in the case of triangle ! Triangle surcontraint\: triangle dont dont les 3 extrémités appartiennent à une frontière=Overstressed triangle\: triangle which 3 extremities belonging to a frontier ! Recherche des éléments surcontraints=Search for overstressed elements ! Recherche des éléments dont l'aire est inférieure à {0}=Search for elements wich area is less than {0} ! Petits éléments=Small elements ! Eléments ayant une aire inférieure à=Elements with an area less than ! Eléments ayant une aire inférieure à {0}=Elements with an area less than {0} ! Eléments ayant un angle inférieur à {0}=Elements with an angle less than {0} ! Aire inférieure à {0}=Area less than {0} ! Angle inférieur à {0}=Angle less than {0} ! Aire=Area ! Angle mini=Minus angle ! Nombre d'éléments détectés=Number of detected elements ! Tester=Test ! Elément=Element ! Comporte les définitions de points,polylignes et polygones=Contains nodes,polygons and polylines ! Ligne ignorée :Skipped line ! Nombre d'éléments/noeuds détectés=Number of elements/nodes detected \ No newline at end of file |