[402924] When module deleted, can't tell if the module was external
or not
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/DeletedModule.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/DeletedModule.java
index bd2a0e9..1b89c70 100644
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/DeletedModule.java
+++ b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/DeletedModule.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2011 IBM Corporation and others.
+ * Copyright (c) 2005, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,11 +22,17 @@
 	protected String id;
 	protected String name;
 	protected IModuleType moduleType2;
+	protected boolean isExternal;
 
 	public DeletedModule(String id, String name, IModuleType moduleType) {
+		this(id, name, moduleType, false);
+	}
+
+	public DeletedModule(String id, String name, IModuleType moduleType, boolean isExternal) {
 		this.id = id;
 		this.name = name;
 		this.moduleType2 = moduleType;
+		this.isExternal = isExternal;
 	}
 
 	public String getId() {
@@ -73,7 +79,7 @@
 	}
 
 	public boolean isExternal() {
-		return false;
+		return isExternal;
 	}
 
 	public boolean exists() {
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ModulePublishInfo.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ModulePublishInfo.java
index 950e084..0c4de6f 100644
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ModulePublishInfo.java
+++ b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ModulePublishInfo.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2011 IBM Corporation and others.
+ * Copyright (c) 2005, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -34,6 +34,7 @@
 	private static final String NAME = "name";
 	private static final String MODULE_TYPE_ID = "module-type-id";
 	private static final String MODULE_TYPE_VERSION = "module-type-version";
+	private static final String MODULE_IS_EXTERNAL = "module-is-external";
 	private static final String STAMP = "stamp";
 	private static final String FILE = "file";
 	private static final String FOLDER = "folder";
@@ -42,6 +43,7 @@
 	private String name;
 	private IModuleResource[] resources = EMPTY_MODULE_RESOURCE;
 	private IModuleType moduleType;
+	private boolean isExternal;
 
 	private boolean useCache;
 	private IModuleResource[] currentResources = null;
@@ -66,6 +68,22 @@
 	/**
 	 * ModulePublishInfo constructor.
 	 * 
+	 * @param moduleId a module id
+	 * @param name the module's name
+	 * @param moduleType the module type
+	 */
+	public ModulePublishInfo(String moduleId, String name, IModuleType moduleType, boolean isExternal) {
+		super();
+
+		this.moduleId = moduleId;
+		this.name = name;
+		this.moduleType = moduleType;
+		this.isExternal = isExternal;
+	}
+
+	/**
+	 * ModulePublishInfo constructor.
+	 * 
 	 * @param memento a memento
 	 */
 	public ModulePublishInfo(IMemento memento) {
@@ -121,6 +139,8 @@
 			String mv = memento.getString(MODULE_TYPE_VERSION);
 			if (mt != null && mt.length() > 0)
 				moduleType = ModuleType.getModuleType(mt, mv);
+			String isExternalStr = memento.getString(MODULE_IS_EXTERNAL);
+			isExternal = Boolean.parseBoolean(isExternalStr);
 			
 			resources = loadResource(memento, new Path(""));
 		} catch (Exception e) {
@@ -459,7 +479,7 @@
 		int index = id.lastIndexOf("#");
 		if (index > 0)
 			id = id.substring(index+1);
-		return new DeletedModule(id, name, moduleType);
+		return new DeletedModule(id, name, moduleType, isExternal);
 	}
 
 	public String toString() {
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerPublishInfo.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerPublishInfo.java
index fe36104..cedbc60 100644
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerPublishInfo.java
+++ b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerPublishInfo.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2011 IBM Corporation and others.
+ * Copyright (c) 2005, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -168,7 +168,7 @@
 			
 			// have to create a new one
 			IModule mod = module[module.length - 1];
-			ModulePublishInfo mpi = new ModulePublishInfo(getKey(module), mod.getName(), mod.getModuleType());
+			ModulePublishInfo mpi = new ModulePublishInfo(getKey(module), mod.getName(), mod.getModuleType(), mod.isExternal());
 			modulePublishInfo.put(key, mpi);
 			return mpi;
 		}