Author: scabanovich
Date: 2008-04-15 04:08:40 -0400 (Tue, 15 Apr 2008)
New Revision: 7529
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/ImportWebDirProjectContext.java
Log:
JBIDE-1072
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/ImportWebDirProjectContext.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/ImportWebDirProjectContext.java 2008-04-15
07:45:15 UTC (rev 7528)
+++
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/ImportWebDirProjectContext.java 2008-04-15
08:08:40 UTC (rev 7529)
@@ -16,6 +16,7 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
+import org.jboss.tools.common.model.XModelException;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.loaders.impl.SerializingLoader;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
@@ -79,8 +80,8 @@
}
try {
loadWebXML(body, location);
- } catch (Exception e) {
- WebModelPlugin.getPluginLog().logError(e);
+ } catch (XModelException e) {
+ //Do not log this exception. It will be shown in wizard.
webXMLErrorMessage = e.getMessage();
return;
}
@@ -88,7 +89,7 @@
try {
webInfLocation = webInfFile.getCanonicalPath().replace('\\', '/');
} catch (IOException e) {
- WebModelPlugin.getPluginLog().logError(e);
+ //Do not log this exception. It will be shown in wizard.
webXMLErrorMessage = e.getMessage();
return;
}
@@ -206,7 +207,7 @@
FileUtil.writeFile(f, text);
try {
IProject p = getProjectHandle();
- if(p.exists()) p.refreshLocal(IProject.DEPTH_INFINITE, null);
+ if(p.exists() && p.isAccessible()) p.refreshLocal(IProject.DEPTH_INFINITE,
null);
} catch (CoreException e) {
WebModelPlugin.getPluginLog().logError(e);
}
Show replies by date