Improve CMS dialogs and localisation.
[lgpl/argeo-commons.git] / org.argeo.cms.ui / src / org / argeo / cms / ui / dialogs / CmsWizardDialog.java
index 451287d64623778a93c8c00e211086fed6162541..e4fe35d3426c72880e9d20afb968a5f45c90860c 100644 (file)
@@ -2,12 +2,10 @@ package org.argeo.cms.ui.dialogs;
 
 import java.lang.reflect.InvocationTargetException;
 
-import org.argeo.cms.CmsException;
 import org.argeo.cms.CmsMsg;
 import org.argeo.cms.ui.util.CmsUiUtils;
 import org.argeo.eclipse.ui.EclipseUiUtils;
 import org.argeo.eclipse.ui.Selected;
-import org.argeo.eclipse.ui.dialogs.LightweightDialog;
 import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.eclipse.jface.wizard.IWizard;
 import org.eclipse.jface.wizard.IWizardContainer2;
@@ -48,7 +46,7 @@ public class CmsWizardDialog extends LightweightDialog implements IWizardContain
                wizard.addPages();
                currentPage = wizard.getStartingPage();
                if (currentPage == null)
-                       throw new CmsException("At least one wizard page is required");
+                       throw new IllegalArgumentException("At least one wizard page is required");
        }
 
        @Override
@@ -138,7 +136,7 @@ public class CmsWizardDialog extends LightweightDialog implements IWizardContain
                        }
                }
                if (index < 0)
-                       throw new CmsException("Cannot find index of wizard page " + page);
+                       throw new IllegalArgumentException("Cannot find index of wizard page " + page);
                pageBodies[index].moveAbove(pageBodies[currentPageIndex]);
 
                // // clear