Bug 207609 - Replaced elements are not considered for configuration error "missing mandatory input"
Bug 207429 - Configration: Warring info should shown when deselect the replaced element
diff --git a/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ConfigurationHelper.java b/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ConfigurationHelper.java
index 528c3f0..79bcbe2 100644
--- a/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ConfigurationHelper.java
+++ b/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ConfigurationHelper.java
@@ -136,14 +136,33 @@
 	 */
 	public static boolean inConfig(MethodElement element,
 			MethodConfiguration config, boolean checkSubtracted) {
+		return inConfig(element, config, checkSubtracted, true);
+	}
+	
+	/**
+	 * check if the element is in the configuration
+	 * 
+	 * @param element
+	 * @param config
+	 * @return
+	 */
+	public static boolean inConfig(MethodElement element,
+			MethodConfiguration config, boolean checkSubtracted, boolean checkBase) {
 		if (!isOwnerSelected(element, config, checkSubtracted)) {
 			return false;
 		}
 
+		//Bug 207429 - Configration: Warring info should shown when deselect the replaced element
+		// for configuration closure checking, the missing base should be reported 
+		// so the element been checked still treated as in config
+		// added the checkBase flag to ignore the base checking
+		// for configuration realization, this flag should be set to true
+		// so the replacer missing base is not included in the config.
+		
 		// if the element is a repalcer, and it's base element has more than one
 		// replacer
 		// none of the replacers should be included into the configuration
-		if (element instanceof VariabilityElement) {
+		if (checkBase && (element instanceof VariabilityElement) ) {
 			VariabilityElement ve = (VariabilityElement) element;
 			if (isReplacer(ve)) {
 				VariabilityElement base = ve.getVariabilityBasedOnElement();
diff --git a/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/closure/ConfigurationClosure.java b/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/closure/ConfigurationClosure.java
index 726a9cd..beaefd9 100644
--- a/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/closure/ConfigurationClosure.java
+++ b/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/closure/ConfigurationClosure.java
@@ -33,6 +33,7 @@
 import org.eclipse.epf.uma.MethodLibrary;
 import org.eclipse.epf.uma.MethodPackage;
 import org.eclipse.epf.uma.MethodPlugin;
+import org.eclipse.epf.uma.VariabilityElement;
 import org.eclipse.ui.views.properties.IPropertyDescriptor;
 import org.eclipse.ui.views.properties.IPropertySource;
 
@@ -437,11 +438,20 @@
 			return;
 		}
 		
-		// the element might be subtracted, so ignore it
-		if ( !ConfigurationHelper.inConfig(e, config)) {
-			return;
+		// Bug 207609 - Replaced elements are not considered for configuration error "missing mandatory input"
+		// if the element is replaced, ignore the reference
+		if ( e instanceof VariabilityElement ) {
+			VariabilityElement replacer = ConfigurationHelper.getReplacer((VariabilityElement)e, config);
+			if ( replacer != null ) {
+				return;
+			}
 		}
 		
+		// the element might be subtracted, so ignore it
+		if ( !ConfigurationHelper.inConfig(e, config, true, false)) {
+			return;
+		}
+				
 		// if the referenced element is not in  config, log error
 		if ( !ConfigurationHelper.inConfig(e_ref, config)) {