You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2013/09/23 16:29:06 UTC

svn commit: r1525602 - /sling/branches/tooling-ide-vlt/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/ChooseArchetypeWizardPage.java

Author: rombert
Date: Mon Sep 23 14:29:05 2013
New Revision: 1525602

URL: http://svn.apache.org/r1525602
Log:
SLING-3032 - [Tooling] add a 'new' wizard for creating an application
based on a maven archetype

Proper error reporting in the ChooseArchetypeWizardPage

Modified:
    sling/branches/tooling-ide-vlt/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/ChooseArchetypeWizardPage.java

Modified: sling/branches/tooling-ide-vlt/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/ChooseArchetypeWizardPage.java
URL: http://svn.apache.org/viewvc/sling/branches/tooling-ide-vlt/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/ChooseArchetypeWizardPage.java?rev=1525602&r1=1525601&r2=1525602&view=diff
==============================================================================
--- sling/branches/tooling-ide-vlt/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/ChooseArchetypeWizardPage.java (original)
+++ sling/branches/tooling-ide-vlt/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/ChooseArchetypeWizardPage.java Mon Sep 23 14:29:05 2013
@@ -25,10 +25,13 @@ import java.util.Map;
 import java.util.Set;
 
 import org.apache.maven.archetype.catalog.Archetype;
+import org.apache.sling.ide.eclipse.m2e.internal.Activator;
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
 import org.eclipse.debug.internal.ui.DebugUIPlugin;
 import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.eclipse.jface.wizard.WizardPage;
@@ -230,11 +233,11 @@ public class ChooseArchetypeWizardPage e
 				}
 			});
 		} catch (InvocationTargetException e) {
-			// TODO proper logging
-			e.printStackTrace();
+		    Throwable targetException = e.getTargetException();
+            setMessage("Initialization failed: " + targetException.getClass().getName() + " - "  + targetException.getMessage(), ERROR);
+            Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Archetype initialization failed " + e.getMessage(), e));
 		} catch (InterruptedException e) {
-			// TODO proper logging
-			e.printStackTrace();
+		    Thread.currentThread().interrupt();
 		}
 	}