svn commit: r16044 - trunk/src/argouml-app/src/org/argouml/uml/ui/ActionImportFromSources.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: thn
Date: 2008-11-13 14:45:23-0800
New Revision: 16044

Modified:
   trunk/src/argouml-app/src/org/argouml/uml/ui/ActionImportFromSources.java

Log:
show dialog when no importers are available

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=16044&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=16043&r2=16044
==============================================================================
--- 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-13 14:45:23-0800
@@ -32,6 +32,7 @@
 import org.apache.log4j.Logger;
 import org.argouml.application.helpers.ResourceLoaderWrapper;
 import org.argouml.i18n.Translator;
+import org.argouml.ui.ExceptionDialog;
 import org.argouml.uml.reveng.Import;
 import org.argouml.uml.reveng.ImporterManager;
 import org.argouml.util.ArgoFrame;
@@ -76,6 +77,12 @@
             new Import(ArgoFrame.getInstance());
     	} else {
     	    LOG.info("Import sources dialog not shown: no importers!");
+            ExceptionDialog ed = new ExceptionDialog(ArgoFrame.getInstance(),
+                Translator.localize("dialog.title.problem"),
+                Translator.localize("dialog.import.no-importers.intro"),
+                Translator.localize("dialog.import.no-importers.message"));
+            ed.setModal(true);
+            ed.setVisible(true);
     	}
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.