Author: tchemit Date: 2008-01-18 01:49:10 +0000 (Fri, 18 Jan 2008) New Revision: 179 Added: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/actions/ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/actions/SimExplorerAbstractOptionAction.java Log: la super classe de toutes les actions d'options Added: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/actions/SimExplorerAbstractOptionAction.java =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/actions/SimExplorerAbstractOptionAction.java (rev 0) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/actions/SimExplorerAbstractOptionAction.java 2008-01-18 01:49:10 UTC (rev 179) @@ -0,0 +1,47 @@ +/* +* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007,2008 Code Lutin. +* +* 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 2 +* 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, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* ##% */ + +package fr.cemagref.simexplorer.is.actions; + +import fr.cemagref.simexplorer.is.SimExplorer; +import fr.cemagref.simexplorer.is.SimExplorerContext; +import fr.cemagref.simexplorer.is.SimExplorerOptionParser; +import org.codelutin.option.Option; +import org.codelutin.option.OptionAction; + +/** + * Implantation de base des actions spécifiques au parseur <b><code>SimExplorerOptionParser</code></b>. + * + * @author chemit + * @see OptionAction + */ +public abstract class SimExplorerAbstractOptionAction<O extends Option> extends org.codelutin.option.OptionAction<O, SimExplorerOptionParser> { + + protected SimExplorerContext context; + + public SimExplorerAbstractOptionAction() { + super(SimExplorer.getContext().getParser()); + } + + public SimExplorerContext getContext() { + if (context == null) { + context = SimExplorer.getContext(); + } + return context; + } +}
participants (1)
-
tchemit@users.labs.libre-entreprise.org