From: <de...@us...> - 2010-01-03 21:33:55
|
Revision: 5581 http://fudaa.svn.sourceforge.net/fudaa/?rev=5581&view=rev Author: deniger Date: 2010-01-03 21:33:49 +0000 (Sun, 03 Jan 2010) Log Message: ----------- Modified Paths: -------------- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java =================================================================== --- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java 2010-01-03 21:30:58 UTC (rev 5580) +++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java 2010-01-03 21:33:49 UTC (rev 5581) @@ -85,9 +85,7 @@ } public static void init() { - if (infoSoft != null) { - return; - } + if (infoSoft != null) { return; } final String languages = "fr,en"; @@ -113,8 +111,8 @@ infoSoft = new BuInformationsSoftware(); infoSoft.name = "prepro"; - infoSoft.version = "0.96"; - infoSoft.date = "2009-12-10"; + infoSoft.version = "0.96RC3"; + infoSoft.date = "2009-12-22"; infoSoft.rights = TrResource.getS("Tous droits r\xE9serv\xE9s") + ". CETMEF (c)2003-2009"; infoSoft.contact = "fre...@fu..."; infoSoft.license = "GPL2"; @@ -130,7 +128,7 @@ } else { infoSoft.man = manUrl.toString() + '/'; } - infoSoft.authors = new String[] {"Fr\xE9d\xE9ric Deniger", "Nicolas Clavreul" }; + infoSoft.authors = new String[] { "Fr\xE9d\xE9ric Deniger", "Nicolas Clavreul" }; infoSoft.contributors = new String[] { "Equipes Dodico, Ebli et Fudaa" }; infoSoft.documentors = new String[] { "" }; infoSoft.testers = new String[] { "Fr\xE9d\xE9ric Deniger, Patrick Gomi, Vanessya Laborie", "Andr\xE9 Paquier", @@ -256,16 +254,12 @@ } public TrImplHelperAbstract getImplHelper(final String _id) { - if (_id == null) { - return null; - } + if (_id == null) { return null; } if (FileFormatSoftware.REFLUX_IS.name.equals(_id)) { return getRefluxImplHelper(); } else if (FileFormatSoftware.TELEMAC_IS.name.equals(_id)) { return getTelemacImplHelper(); - } else if (FileFormatSoftware.RUBAR_IS.name.equals(_id)) { - return getRubarImplHelper(); - } + } else if (FileFormatSoftware.RUBAR_IS.name.equals(_id)) { return getRubarImplHelper(); } FuLog.warning(new Throwable()); return null; } @@ -314,34 +308,26 @@ } public TrEditorImplementation findImplWithOpenedFile(final File _f) { - if (_f == null || !_f.exists()) { - return null; - } + if (_f == null || !_f.exists()) { return null; } final DefaultListModel model = BuRegistry.getModel(); for (int i = model.getSize() - 1; i >= 0; i--) { final Object app = model.get(i); if (app instanceof BuApplication && ((BuApplication) app).getImplementation() instanceof TrEditorImplementation) { final TrEditorImplementation imp = (TrEditorImplementation) ((BuApplication) app).getImplementation(); - if (imp.projetCourant() != null && _f.equals(imp.projetCourant().getParamsFile())) { - return imp; - } + if (imp.projetCourant() != null && _f.equals(imp.projetCourant().getParamsFile())) { return imp; } } } return null; } public boolean isUsedInEditor(final File _f) { - if (_f == null) { - return false; - } + if (_f == null) { return false; } final DefaultListModel model = BuRegistry.getModel(); for (int i = model.getSize() - 1; i >= 0; i--) { final Object app = model.get(i); if (app instanceof BuApplication && ((BuApplication) app).getImplementation() instanceof TrEditorImplementation) { final TrEditorImplementation imp = (TrEditorImplementation) ((BuApplication) app).getImplementation(); - if (imp.projetCourant() != null && imp.projetCourant().isAlreadyUsed(_f)) { - return true; - } + if (imp.projetCourant() != null && imp.projetCourant().isAlreadyUsed(_f)) { return true; } } } return false; @@ -352,17 +338,13 @@ } public TrPostImplementation findPostWithOpenedFile(final File _f) { - if (_f == null || !_f.exists()) { - return null; - } + if (_f == null || !_f.exists()) { return null; } final DefaultListModel model = BuRegistry.getModel(); for (int i = model.getSize() - 1; i >= 0; i--) { final Object app = model.get(i); if (app instanceof BuApplication && ((BuApplication) app).getImplementation() instanceof TrPostImplementation) { final TrPostImplementation imp = (TrPostImplementation) ((BuApplication) app).getImplementation(); - if (imp.getCurrentProject() != null && imp.getCurrentProject().isOpened(_f)) { - return imp; - } + if (imp.getCurrentProject() != null && imp.getCurrentProject().getSources().isOpened(_f)) { return imp; } } } return null; @@ -407,13 +389,13 @@ * Methode appelee pour generer le trpost avec le ficheir de layout ouvert. */ public TrPostImplementation openLayoutPost(final File _f) { - - //-- version scop ou non --// -// if(TrApplicationManager.isScopFormat(_f)){ -// return openScopPost(_f); -// -// } - + + // -- version scop ou non --// + // if(TrApplicationManager.isScopFormat(_f)){ + // return openScopPost(_f); + // + // } + final TrPostImplementation alreadyOpened = findPostWithOpenedFile(_f); if (alreadyOpened != null) { alreadyOpened.setMainErrorAndClear(TrLib.getMessageAlreadyOpen(_f)); @@ -442,7 +424,7 @@ return post; } - + /** * Methode appelee pour generer le trpost avec le fichier scop choisi (S, T ou GENE) */ @@ -465,10 +447,9 @@ public void run() { if (_f != null) { - - post.cmdOuvrirScopFile(_f); - - + + post.cmdOuvrirScopFile(_f); + } } @@ -477,7 +458,6 @@ return post; } - public TrPostImplementation openPost(final File _f) { final TrPostImplementation alreadyOpened = findPostWithOpenedFile(_f); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |