Author: akazakov
Date: 2007-09-21 03:57:02 -0400 (Fri, 21 Sep 2007)
New Revision: 3752
Modified:
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/log/BasePlugin.java
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/log/BaseUIPlugin.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-916
Modified:
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/log/BasePlugin.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/log/BasePlugin.java 2007-09-21
07:53:33 UTC (rev 3751)
+++
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/log/BasePlugin.java 2007-09-21
07:57:02 UTC (rev 3752)
@@ -55,4 +55,4 @@
public void logInfo(String message) {
LogHelper.logInfo(this, message);
}
-}
+}
\ No newline at end of file
Modified:
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/log/BaseUIPlugin.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/log/BaseUIPlugin.java 2007-09-21
07:53:33 UTC (rev 3751)
+++
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/log/BaseUIPlugin.java 2007-09-21
07:57:02 UTC (rev 3752)
@@ -10,6 +10,10 @@
******************************************************************************/
package org.jboss.tools.common.log;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.plugin.AbstractUIPlugin;
/**
@@ -56,4 +60,11 @@
public void logWarning(Throwable t) {
LogHelper.logWarning(this, t);
}
-}
+
+ public void showError(String message, Throwable t) {
+ logError(message, t);
+ Shell shell = Display.getDefault().getActiveShell();
+ IStatus s = StatusFactory.getInstance(IStatus.ERROR,
this.getBundle().getSymbolicName(), message, t);
+ ErrorDialog.openError(shell, "Hibernate Console", message, s);
+ }
+}
\ No newline at end of file
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java 2007-09-21
07:53:33 UTC (rev 3751)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java 2007-09-21
07:57:02 UTC (rev 3752)
@@ -115,7 +115,7 @@
launchManager.addLaunch(wc.launch(ILaunchManager.RUN_MODE, monitor));
} catch (CoreException e) {
- SeamGuiPlugin.getPluginLog().logError(e);
+ SeamCorePlugin.getDefault().showError("Can't generate seam entities",
e);
}
return Status.OK_STATUS;
}