Hi Christian, thanks for the patch, I'll have a look!
I see no point to show the import dialog with an empty combobox, unless it explains the situation to the user and offers a way to load an importer from somewhere (refresh ing the combobox). If the latter is not available, then I'd prefer a dialog box explaining the situation, internationalized of course. (My LOG message was a placeholder for that.) Thomas -------- Original-Nachricht -------- > Datum: Thu, 13 Nov 2008 02:38:31 +0100 > Von: "Christian López Espínola" <[EMAIL PROTECTED]> > An: "Thomas N." <[EMAIL PROTECTED]>, ArgoUML-dev <[email protected]> > Betreff: [argouml-dev] Import sources dialog when no importers are > available > Hi Thomas, > > If there isn't any importer and the user selects "Import Sources...", > the user has no feedback and (s)he sees no action in our GUI. > I'd like having a message dialog notifying the user, or if it is not > possible, IMHO it would be better showing the import dialog without > any language in the combo. See the attached patch. > > On Wed, Nov 12, 2008 at 11:41 PM, <[EMAIL PROTECTED]> wrote: > > Author: thn > > Date: 2008-11-12 14:41:43-0800 > > New Revision: 16033 > > > > Modified: > > trunk/src/argouml-app/src/org/argouml/uml/reveng/ImporterManager.java > > > trunk/src/argouml-app/src/org/argouml/uml/ui/ActionImportFromSources.java > > > > Log: > > supporting the case when no importer is available > > (needed since the Java importers became modules) > > > > Modified: > trunk/src/argouml-app/src/org/argouml/uml/reveng/ImporterManager.java > > Url: > http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/reveng/ImporterManager.java?view=diff&rev=16033&p1=trunk/src/argouml-app/src/org/argouml/uml/reveng/ImporterManager.java&p2=trunk/src/argouml-app/src/org/argouml/uml/reveng/ImporterManager.java&r1=16032&r2=16033 > > > ============================================================================== > > --- > trunk/src/argouml-app/src/org/argouml/uml/reveng/ImporterManager.java > (original) > > +++ > trunk/src/argouml-app/src/org/argouml/uml/reveng/ImporterManager.java > 2008-11-12 14:41:43-0800 > > @@ -113,4 +113,11 @@ > > return Collections.unmodifiableSet(importers); > > } > > > > + > > + /** > > + * @return true, if at least one importer exists. > > + */ > > + public boolean hasImporters() { > > + return !importers.isEmpty(); > > + } > > } > > > > Modified: > trunk/src/argouml-app/src/org/argouml/uml/ui/ActionImportFromSources.java > > Url: > http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/ui/ActionImportFromSources.java?view=diff&rev=16033&p1=trunk/src/argouml-app/src/org/argouml/uml/ui/ActionImportFromSources.java&p2=trunk/src/argouml-app/src/org/argouml/uml/ui/ActionImportFromSources.java&r1=16032&r2=16033 > > > ============================================================================== > > --- > trunk/src/argouml-app/src/org/argouml/uml/ui/ActionImportFromSources.java > (original) > > +++ > trunk/src/argouml-app/src/org/argouml/uml/ui/ActionImportFromSources.java > 2008-11-12 14:41:43-0800 > > @@ -29,9 +29,11 @@ > > > > import javax.swing.Action; > > > > +import org.apache.log4j.Logger; > > import org.argouml.application.helpers.ResourceLoaderWrapper; > > import org.argouml.i18n.Translator; > > import org.argouml.uml.reveng.Import; > > +import org.argouml.uml.reveng.ImporterManager; > > import org.argouml.util.ArgoFrame; > > import org.tigris.gef.undo.UndoableAction; > > > > @@ -42,6 +44,12 @@ > > public class ActionImportFromSources extends UndoableAction { > > > > /** > > + * Logger. > > + */ > > + private static final Logger LOG = > > + Logger.getLogger(ActionImportFromSources.class); > > + > > + /** > > * The singleton. > > */ > > private static final ActionImportFromSources SINGLETON = > > @@ -64,10 +72,13 @@ > > */ > > public void actionPerformed(ActionEvent event) { > > super.actionPerformed(event); > > - new Import(ArgoFrame.getInstance()); > > + if (ImporterManager.getInstance().hasImporters()) { > > + new Import(ArgoFrame.getInstance()); > > + } else { > > + LOG.info("Import sources dialog not shown: no importers!"); > > + } > > } > > > > - > > /** > > * @return Returns the SINGLETON. > > */ > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > Cheers, > > Christian López Espínola <penyaskito> -- Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
