WGZ import issue was fixed
authorEugene Ostroukhov <eugeneo@symbian.org>
Tue, 16 Mar 2010 12:13:22 -0700
changeset 271 4ff7e6f31c66
parent 270 7f7b30fe54c9
child 272 c91ee4e0a0ad
WGZ import issue was fixed
org.symbian.tools.wrttools/src/org/symbian/tools/wrttools/util/ProjectUtils.java
org.symbian.tools.wrttools/src/org/symbian/tools/wrttools/wizards/WgzImportWizard.java
--- a/org.symbian.tools.wrttools/src/org/symbian/tools/wrttools/util/ProjectUtils.java	Tue Mar 16 11:41:07 2010 -0700
+++ b/org.symbian.tools.wrttools/src/org/symbian/tools/wrttools/util/ProjectUtils.java	Tue Mar 16 12:13:22 2010 -0700
@@ -338,7 +338,12 @@
                 if (!isIgnored(p) && !nextEntry.isDirectory()) {
                     IFile file = location.getFile(p);
                     checkParent(file.getParent());
-                    file.create(new NonClosingStream(stream), false, new SubProgressMonitor(progressMonitor, 1));
+                    if (file.exists()) {
+                        file.setContents(new NonClosingStream(stream), false, true, new SubProgressMonitor(
+                                progressMonitor, 1));
+                    } else {
+                        file.create(new NonClosingStream(stream), true, new SubProgressMonitor(progressMonitor, 1));
+                    }
                 }
             }
         } finally {
--- a/org.symbian.tools.wrttools/src/org/symbian/tools/wrttools/wizards/WgzImportWizard.java	Tue Mar 16 11:41:07 2010 -0700
+++ b/org.symbian.tools.wrttools/src/org/symbian/tools/wrttools/wizards/WgzImportWizard.java	Tue Mar 16 12:13:22 2010 -0700
@@ -89,9 +89,13 @@
 									}
 
 								}, monitor);
-					} catch (CoreException e) {
-						StatusManager.getManager().handle(e.getStatus(),
-								StatusManager.SHOW);
+                    } catch (final CoreException e) {
+                        getShell().getDisplay().asyncExec(new Runnable() {
+                            public void run() {
+                                StatusManager.getManager().handle(e.getStatus(),
+                                        StatusManager.SHOW | StatusManager.BLOCK | StatusManager.LOG);
+                            }
+                        });
 					}
 				}
 			});