From: Frederic D. <de...@us...> - 2004-04-30 13:52:55
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/sipor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15346/src/org/fudaa/fudaa/sipor Modified Files: Sipor.java SiporImplementation.java Log Message: Simplification des classes de démarrage Index: SiporImplementation.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/sipor/SiporImplementation.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SiporImplementation.java 30 Apr 2004 07:33:42 -0000 1.6 --- SiporImplementation.java 30 Apr 2004 13:52:16 -0000 1.7 *************** *** 910,914 **** protected void initConnexions(Map _r) { FudaaDodicoTacheConnexion c=(FudaaDodicoTacheConnexion)_r.get(DCalculSipor.class); ! CONNEXION_SIPOR=c.getPersonne(); SERVEUR_SIPOR=ICalculSiporHelper.narrow(c.getTache()); } --- 910,914 ---- protected void initConnexions(Map _r) { FudaaDodicoTacheConnexion c=(FudaaDodicoTacheConnexion)_r.get(DCalculSipor.class); ! CONNEXION_SIPOR=c.getConnexion(); SERVEUR_SIPOR=ICalculSiporHelper.narrow(c.getTache()); } Index: Sipor.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/sipor/Sipor.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Sipor.java 25 Nov 2003 10:14:22 -0000 1.5 --- Sipor.java 30 Apr 2004 13:52:16 -0000 1.6 *************** *** 1,3 **** ! /* * @file Sipor.java * @creation 1999-10-01 --- 1,3 ---- ! /** * @file Sipor.java * @creation 1999-10-01 *************** *** 8,148 **** */ package org.fudaa.fudaa.sipor; ! import java.io.*; ! import javax.swing.JFrame; ! import org.fudaa.fudaa.commun.*; ! import com.diaam.lgpl.ts.*; ! import com.memoire.bu.*; ! import org.fudaa.dodico.corba.sipor.*; ! import org.fudaa.dodico.objet.*; ! import org.fudaa.dodico.sipor.*; /** * Permet de lancer l'application cliente de SIPOR. ! * ! * @version $Revision$ $Date$ by $Author$ ! * @author Nicolas Chevalier , Bertrand Audinet */ public class Sipor { public static void main(String[] args) { ! // Lecture des paramètres : erreur et sortie s'il y en a d'autres que ceux acceptés. ! FudaaCommandLineParser flags= new FudaaCommandLineParser(); ! args= flags.parse(args); ! if (args.length > 0) { ! System.err.println("The flag " + args[0] + " is unknown"); ! System.err.println("Flags : " + flags.flagTotalText()); ! System.exit(1); ! } ! // Affichage de la fenetre stdout/stderr ! if (!flags.no_terminal) { ! TerminalStandard ts= new TerminalStandard(); ! ts.activeStandards(); ! JFrame fts= new JFrame("Console"); ! fts.setContentPane(ts); ! fts.pack(); ! fts.show(); ! String wlcmsg= ! "******************************************************************************\n" ! + "* Bienvenue dans Sipor *\n" ! + "* ------------------ *\n" ! + "* Ceci est la console texte. Elle affiche tous les messages systeme: *\n" ! + "* erreurs, taches en cours. Consultez-la regulierement pour savoir *\n" ! + "* si le programme est actif, si une erreur s'est poduite, ... *\n" ! + "* En cas d'erreur, joignez son contenu (enregistre dans le fichier ts.log) *\n" ! + "* au mail de notification de bogue, ceci nous aidera a comprendre. *\n" ! + "******************************************************************************\n\n"; ! System.out.println(wlcmsg); ! } ! System.out.println("Client Sipor"); ! BuPreferences.BU.applyLanguage( ! SiporImplementation.informationsSoftware().languages); ! // NetCheck ! // FudaaNetworkChecker nc=new FudaaNetworkChecker(SiporImplementation.informationsSoftware()); ! //nc.check(); ! // Update ! // if( !flags.no_update ) { ! // FudaaUpdate update=new FudaaUpdate(SiporImplementation.informationsSoftware()); ! // update.setInstallMode(flags.jar_update?FudaaUpdate.JAR:FudaaUpdate.CLASS); ! // if( update.scanForUpdate() ) { ! // if( update.startUpdate() ) System.exit(0); ! // } ! // } else System.err.println("Sipor : no update"); ! // Splash ! BuSplashScreen ss= ! new BuSplashScreen( ! SiporImplementation.informationsSoftware(), ! 3000, ! new String[][] { BuLib.SWING_CLASSES, BuLib.BU_CLASSES }); ! ss.start(); ! /* ! if( !flags.no_server ) { ! if( !flags.no_corba ) { ! ss.start(); ! ss.setText("Connexion au serveur Sipor..."); ! ss.setProgression(0); ! System.out.println("Connexion au serveur Sipor.."); ! if( !flags.no_delay ) { ! SiporImplementation.SERVEUR_SIPOR= ! ICalculSiporHelper.narrow(CDodico.findServerByName("un-serveur-sipor", 31000)); ! if( SiporImplementation.SERVEUR_SIPOR==null ) { ! ss.setText("Connexion au serveur Sipor, deuxième tentative..."); ! ss.setProgression(30); ! System.out.println("Connexion au serveur Sipor, deuxième tentative..."); ! SiporImplementation.SERVEUR_SIPOR= ! ICalculSiporHelper.narrow(CDodico.findServerByName("un-serveur-sipor", 31000)); ! } ! } else { ! SiporImplementation.SERVEUR_SIPOR= ! ICalculSiporHelper.narrow(CDodico.findServerByName("un-serveur-sipor")); ! } ! if( SiporImplementation.SERVEUR_SIPOR==null ) { ! ss.setText("Echec de la connexion : sortie."); ! System.out.println("Echec de la connexion : sortie."); ! try {Thread.sleep(3000);} catch(InterruptedException e) { ! System.err.println("interrupted"); ! } ! System.exit(1); ! } else { ! ss.setText("Connexion établie"); ! System.out.println("Connexion établie"); ! try {Thread.sleep(3000);} catch(InterruptedException e) {} ! } ! } else { // flags.no_corba ! ss.start(); ! ss.setText("Lancement du serveur Sipor..."); ! ss.setProgression(0); ! System.out.println("Lancement du serveur local Sipor"); ! ICalculSipor s=new CCalculSipor(); ! ss.setProgression(40); ! SiporImplementation.SERVEUR_SIPOR=s; ! } ! } else { // flags.no_server ! ss.start(); ! ss.setText("Lancement sans serveur"); ! ss.setProgression(0); ! System.out.println("Lancement sans serveur"); ! } ! */ ! ss.setProgression(0); ! ss.setText("Initialisation de l'application..."); ! SiporApplication app= new SiporApplication(); ! app.getImplementation().setSplashScreen(ss); ! System.out.println("Initialisation..."); ! ss.setProgression(80); ! app.init(); ! ss.setProgression(100); ! ss.setVisible(false); ! try { ! app.start(); ! } catch (Throwable e) { ! ByteArrayOutputStream out= new ByteArrayOutputStream(); ! e.printStackTrace(new PrintStream(out)); ! new BuDialogError( ! app, ! SiporImplementation.informationsSoftware(), ! out.toString()) ! .activate(); ! try { ! out.close(); ! } catch (IOException ioe) {}; ! } } ! } --- 8,28 ---- */ package org.fudaa.fudaa.sipor; ! ! import org.fudaa.fudaa.commun.Fudaa; /** * Permet de lancer l'application cliente de SIPOR. ! * ! * @version $Revision$ $Date$ by $Author$ ! * @author Nicolas Chevalier , Bertrand Audinet */ public class Sipor { + + /** + * @param args les arg de l'appli + */ public static void main(String[] args) { ! Fudaa f = new Fudaa(); ! f.launch(args, SiporImplementation.informationsSoftware(), false); ! f.startApp(new SiporImplementation()); } ! } \ No newline at end of file |