Author: DartPeng
Date: 2008-08-21 06:10:34 -0400 (Thu, 21 Aug 2008)
New Revision: 9851
Modified:
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java
workspace/dart/plugins/org.jboss.tools.smooks.xml2java/META-INF/MANIFEST.MF
Log:
modify ui to show the generate error message
Modified:
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java
===================================================================
---
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2008-08-21
09:52:23 UTC (rev 9850)
+++
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2008-08-21
10:10:34 UTC (rev 9851)
@@ -415,6 +415,7 @@
public void doSave(IProgressMonitor monitor) {
SmooksFileBuilder builder = this.getSmooksFileBuilder();
SmooksConfigurationFileGenerateContext context = createContext();
+ Exception exp = null;
try {
InputStream stream = builder.generateSmooksFile(context, monitor);
IFile file = ((IFileEditorInput) this.getEditorInput()).getFile();
@@ -422,12 +423,15 @@
file.setContents(stream, IResource.FORCE, monitor);
}
} catch (CoreException e) {
- e.printStackTrace();
+ exp = e;
} catch (SmooksAnalyzerException e) {
- e.printStackTrace();
+ exp = e;
} catch (IOException e) {
- e.printStackTrace();
+ exp = e;
}
+ if(exp != null){
+ MessageDialog.openError(getSite().getShell(), "Save Error", "Error!
\n" + exp.getMessage());
+ }
super.doSave(monitor);
commandStackChanged = false;
getManagedForm().dirtyStateChanged();
Modified: workspace/dart/plugins/org.jboss.tools.smooks.xml2java/META-INF/MANIFEST.MF
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.xml2java/META-INF/MANIFEST.MF 2008-08-21
09:52:23 UTC (rev 9850)
+++ workspace/dart/plugins/org.jboss.tools.smooks.xml2java/META-INF/MANIFEST.MF 2008-08-21
10:10:34 UTC (rev 9851)
@@ -14,3 +14,5 @@
org.eclipse.emf.edit,
org.eclipse.emf
Eclipse-LazyStart: true
+Export-Package: org.jboss.tools.smooks.xml2java,
+ org.jboss.tools.smooks.xml2java.analyzer
Show replies by date