[251722] defaultFacets extension point should support optional contributions
[197557] Allow facet constraints to conditionally ignore facets not present in an install
diff --git a/plugins/org.eclipse.wst.common.project.facet.core/schemas/defaultFacets.exsd b/plugins/org.eclipse.wst.common.project.facet.core/schemas/defaultFacets.exsd
index af61d3b..6eae9a9 100644
--- a/plugins/org.eclipse.wst.common.project.facet.core/schemas/defaultFacets.exsd
+++ b/plugins/org.eclipse.wst.common.project.facet.core/schemas/defaultFacets.exsd
@@ -1,6 +1,6 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.wst.common.project.facet.core">
+<schema targetNamespace="org.eclipse.wst.common.project.facet.core" xmlns="http://www.w3.org/2001/XMLSchema">
 <annotation>
       <appInfo>
          <meta.schema plugin="org.eclipse.wst.common.project.facet.core" id="defaultFacets" name="Default Facets Extension Point"/>
@@ -12,6 +12,9 @@
 
    <element name="extension">
       <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
          <documentation>
             (no description available)
          </documentation>
@@ -56,6 +59,21 @@
             <element ref="runtime-component" minOccurs="0" maxOccurs="unbounded"/>
             <element ref="facet" minOccurs="1" maxOccurs="unbounded"/>
          </sequence>
+         <attribute name="ignore-problems" type="string">
+            <annotation>
+               <documentation>
+                  Used to control how the framework reports problems when the entities referenced by this extension are not defined. When a problem is encountered, the framework will ignore the extension contribution at level of the default-facets element. Once the problem has been handled, the framework will (by default) log an error with information about the problem. The framework can be told not to log anything in specific circumstances by using the ignore-problems attribute.&lt;br/&gt;
+
+Currently, the following rules are supported. Multiple rules can be specified by separating them with a comma. The master &quot;not-defined&quot; rule is a short hand notation for specifying all of the *-not-defined rules at the same time.&lt;br/&gt;&lt;/br/&gt;
+
+not-defined&lt;br/&gt;
+runtime-component-type-not-defined&lt;br/&gt;
+runtime-component-version-not-defined&lt;br/&gt;
+facet-not-defined&lt;br/&gt;
+facet-version-not-defined
+               </documentation>
+            </annotation>
+         </attribute>
       </complexType>
    </element>
 
@@ -184,7 +202,6 @@
   &lt;/default-facets&gt;
 &lt;/extension&gt;
 &lt;/pre&gt;
-
       </documentation>
    </annotation>
 
diff --git a/plugins/org.eclipse.wst.common.project.facet.core/schemas/facets.exsd b/plugins/org.eclipse.wst.common.project.facet.core/schemas/facets.exsd
index 401f54a..84b99ff 100644
--- a/plugins/org.eclipse.wst.common.project.facet.core/schemas/facets.exsd
+++ b/plugins/org.eclipse.wst.common.project.facet.core/schemas/facets.exsd
@@ -2,9 +2,9 @@
 <!-- Schema file written by PDE -->
 <schema targetNamespace="org.eclipse.wst.common.project.facet.core" xmlns="http://www.w3.org/2001/XMLSchema">
 <annotation>
-      <appinfo>
+      <appInfo>
          <meta.schema plugin="org.eclipse.wst.common.project.facet.core" id="facets" name="Project Facets Extension Point"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          This is the main extension point in the faceted project framework. It is used for defining project facets. A project facet can be thought of as a unit of functionality that the user can add to the project when the functionality is needed.
       </documentation>
@@ -12,6 +12,9 @@
 
    <element name="extension">
       <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
          <documentation>
             (no description available)
          </documentation>
@@ -46,9 +49,9 @@
                <documentation>
                   An optional name of the extension instance.
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute translatable="true"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
@@ -83,6 +86,22 @@
             <element ref="requires"/>
             <element ref="conflicts"/>
          </choice>
+         <attribute name="ignore-problems" type="string">
+            <annotation>
+               <documentation>
+                  Used to control how the framework reports problems when the entities referenced by this constraint are not defined. When a problem is encountered, the framework will prune the constraint expression in a way that maintains as much of the expression as possible while removing the part that has the problem. For instance, if a problem is found in one branch of an OR expression, only that branch is removed. Once the problem has been handled, the framework will (by default) log an error with information about the problem. The framework can be told not to log anything in specific circumstances by using the ignore-problems attribute.&lt;br/&gt;
+
+If the ignore-problems attribute is specified at multiple levels in the constraint expression, the one that&apos;s closest to the source of the problem takes affect.&lt;br/&gt;
+
+Currently, the following rules are supported. Multiple rules can be specified by separating them with a comma. The master &quot;not-defined&quot; rule is a short hand notation for specifying all of the *-not-defined rules at the same time.&lt;br/&gt;&lt;/br/&gt;
+
+not-defined&lt;br/&gt;
+facet-not-defined&lt;br/&gt;
+facet-version-not-defined&lt;br/&gt;
+group-not-defined
+               </documentation>
+            </annotation>
+         </attribute>
       </complexType>
    </element>
 
@@ -99,6 +118,22 @@
             <element ref="requires"/>
             <element ref="conflicts"/>
          </choice>
+         <attribute name="ignore-problems" type="string">
+            <annotation>
+               <documentation>
+                  Used to control how the framework reports problems when the entities referenced by this constraint are not defined. When a problem is encountered, the framework will prune the constraint expression in a way that maintains as much of the expression as possible while removing the part that has the problem. For instance, if a problem is found in one branch of an OR expression, only that branch is removed. Once the problem has been handled, the framework will (by default) log an error with information about the problem. The framework can be told not to log anything in specific circumstances by using the ignore-problems attribute.&lt;br/&gt;
+
+If the ignore-problems attribute is specified at multiple levels in the constraint expression, the one that&apos;s closest to the source of the problem takes affect.&lt;br/&gt;
+
+Currently, the following rules are supported. Multiple rules can be specified by separating them with a comma. The master &quot;not-defined&quot; rule is a short hand notation for specifying all of the *-not-defined rules at the same time.&lt;br/&gt;&lt;/br/&gt;
+
+not-defined&lt;br/&gt;
+facet-not-defined&lt;br/&gt;
+facet-version-not-defined&lt;br/&gt;
+group-not-defined
+               </documentation>
+            </annotation>
+         </attribute>
       </complexType>
    </element>
 
@@ -137,6 +172,22 @@
                </documentation>
             </annotation>
          </attribute>
+         <attribute name="ignore-problems" type="string">
+            <annotation>
+               <documentation>
+                  Used to control how the framework reports problems when the entities referenced by this constraint are not defined. When a problem is encountered, the framework will prune the constraint expression in a way that maintains as much of the expression as possible while removing the part that has the problem. For instance, if a problem is found in one branch of an OR expression, only that branch is removed. Once the problem has been handled, the framework will (by default) log an error with information about the problem. The framework can be told not to log anything in specific circumstances by using the ignore-problems attribute.&lt;br/&gt;
+
+If the ignore-problems attribute is specified at multiple levels in the constraint expression, the one that&apos;s closest to the source of the problem takes affect.&lt;br/&gt;
+
+Currently, the following rules are supported. Multiple rules can be specified by separating them with a comma. The master &quot;not-defined&quot; rule is a short hand notation for specifying all of the *-not-defined rules at the same time.&lt;br/&gt;&lt;/br/&gt;
+
+not-defined&lt;br/&gt;
+facet-not-defined&lt;br/&gt;
+facet-version-not-defined&lt;br/&gt;
+group-not-defined
+               </documentation>
+            </annotation>
+         </attribute>
       </complexType>
    </element>
 
@@ -168,6 +219,22 @@
                </documentation>
             </annotation>
          </attribute>
+         <attribute name="ignore-problems" type="string">
+            <annotation>
+               <documentation>
+                  Used to control how the framework reports problems when the entities referenced by this constraint are not defined. When a problem is encountered, the framework will prune the constraint expression in a way that maintains as much of the expression as possible while removing the part that has the problem. For instance, if a problem is found in one branch of an OR expression, only that branch is removed. Once the problem has been handled, the framework will (by default) log an error with information about the problem. The framework can be told not to log anything in specific circumstances by using the ignore-problems attribute.&lt;br/&gt;
+
+If the ignore-problems attribute is specified at multiple levels in the constraint expression, the one that&apos;s closest to the source of the problem takes affect.&lt;br/&gt;
+
+Currently, the following rules are supported. Multiple rules can be specified by separating them with a comma. The master &quot;not-defined&quot; rule is a short hand notation for specifying all of the *-not-defined rules at the same time.&lt;br/&gt;&lt;/br/&gt;
+
+not-defined&lt;br/&gt;
+facet-not-defined&lt;br/&gt;
+facet-version-not-defined&lt;br/&gt;
+group-not-defined
+               </documentation>
+            </annotation>
+         </attribute>
       </complexType>
    </element>
 
@@ -184,6 +251,22 @@
             <element ref="requires"/>
             <element ref="conflicts"/>
          </choice>
+         <attribute name="ignore-problems" type="string">
+            <annotation>
+               <documentation>
+                  Used to control how the framework reports problems when the entities referenced by this constraint are not defined. When a problem is encountered, the framework will prune the constraint expression in a way that maintains as much of the expression as possible while removing the part that has the problem. For instance, if a problem is found in one branch of an OR expression, only that branch is removed. Once the problem has been handled, the framework will (by default) log an error with information about the problem. The framework can be told not to log anything in specific circumstances by using the ignore-problems attribute.&lt;br/&gt;
+
+If the ignore-problems attribute is specified at multiple levels in the constraint expression, the one that&apos;s closest to the source of the problem takes affect.&lt;br/&gt;
+
+Currently, the following rules are supported. Multiple rules can be specified by separating them with a comma. The master &quot;not-defined&quot; rule is a short hand notation for specifying all of the *-not-defined rules at the same time.&lt;br/&gt;&lt;/br/&gt;
+
+not-defined&lt;br/&gt;
+facet-not-defined&lt;br/&gt;
+facet-version-not-defined&lt;br/&gt;
+group-not-defined
+               </documentation>
+            </annotation>
+         </attribute>
       </complexType>
    </element>
 
@@ -272,9 +355,9 @@
                <documentation>
                   The version comparator class name. Has to implement java.util.Comparator&amp;lt;String&amp;gt; interface.
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="java" basedOn="java.util.Comparator"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
@@ -303,9 +386,9 @@
 
    <element name="preset">
       <annotation>
-         <appinfo>
+         <appInfo>
             <meta.element deprecated="true"/>
-         </appinfo>
+         </appInfo>
          <documentation>
             Declares a preset. A preset represents a common configuration of facets and their versions that a user might want to utilize on several projects. Presets can be supplied via this extension point or created by the user.
          </documentation>
@@ -431,9 +514,9 @@
                <documentation>
                   The config factory class name. Has to implement org.eclipse.wst.common.project.facet.core.IActionConfigFactory interface.
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="java" basedOn="org.eclipse.wst.common.project.facet.core.IActionConfigFactory"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
@@ -451,9 +534,9 @@
                <documentation>
                   The delegate class name. Has to implement org.eclipse.wst.common.project.facet.core.IDelegate interface.
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="java" basedOn="org.eclipse.wst.common.project.facet.core.IDelegate"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
@@ -461,9 +544,9 @@
 
    <element name="event-handler">
       <annotation>
-         <appinfo>
+         <appInfo>
             <meta.element deprecated="true"/>
-         </appinfo>
+         </appInfo>
          <documentation>
             Adds an event handler for one of the events in the faceted project life cycle. The event-handler element can be used standalone or embeded inside the project-facet-version element. If used inside the project-facet-version element, the facet and version attributes are implied and should not be specified.&lt;br/&gt;&lt;br/&gt;
 
@@ -559,9 +642,9 @@
                <documentation>
                   Specifies the version provider that will be consulted in order to determine the default version. If this attribute is used, the &lt;code&gt;version&lt;/code&gt; attribute will be ignored if present.
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="java" basedOn="org.eclipse.wst.common.project.facet.core.IDefaultVersionProvider"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
@@ -607,9 +690,9 @@
 
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="examples"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          &lt;p&gt;The following example illustrates the various facilities exposed by this extension point. This example is taken from the &lt;i&gt;Building Project Facets&lt;/i&gt; tutorial.&lt;/p&gt;
 
@@ -673,9 +756,9 @@
 
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="copyright"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          Copyright (c) 2008 Oracle and others.&lt;br&gt;
 All rights reserved. This program and the accompanying materials
diff --git a/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/internal/DefaultFacetsExtensionPoint.java b/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/internal/DefaultFacetsExtensionPoint.java
index 8556fdc..d854d92 100644
--- a/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/internal/DefaultFacetsExtensionPoint.java
+++ b/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/internal/DefaultFacetsExtensionPoint.java
@@ -12,6 +12,8 @@
 package org.eclipse.wst.common.project.facet.core.internal;
 
 import static org.eclipse.wst.common.project.facet.core.internal.FacetCorePlugin.PLUGIN_ID;
+import static org.eclipse.wst.common.project.facet.core.internal.ProblemLog.reportMissingFacet;
+import static org.eclipse.wst.common.project.facet.core.internal.ProblemLog.reportMissingFacetVersion;
 import static org.eclipse.wst.common.project.facet.core.util.internal.PluginUtil.findExtensions;
 import static org.eclipse.wst.common.project.facet.core.util.internal.PluginUtil.findRequiredAttribute;
 import static org.eclipse.wst.common.project.facet.core.util.internal.PluginUtil.getTopLevelElements;
@@ -26,7 +28,6 @@
 
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.osgi.util.NLS;
 import org.eclipse.wst.common.project.facet.core.IFacetedProjectBase;
 import org.eclipse.wst.common.project.facet.core.IProjectFacet;
 import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
@@ -178,6 +179,7 @@
         
     {
         final String pluginId = config.getContributor().getName();
+        final ProblemLog.Policy problemLoggingPolicy = ProblemLog.Policy.createBasedOnIgnoreProblemsAttr( config );
         final DefaultFacetsExtension extension = new DefaultFacetsExtension();
         
         for( IConfigurationElement child : config.getChildren() )
@@ -186,7 +188,7 @@
             
             if( childName.equals( EL_RUNTIME_COMPONENT ) )
             {
-                final RuntimeComponentTypeRef rctRef = RuntimeComponentTypeRef.read( child );
+                final RuntimeComponentTypeRef rctRef = RuntimeComponentTypeRef.read( child, problemLoggingPolicy );
                 
                 if( rctRef == null )
                 {
@@ -203,7 +205,7 @@
                     
                     if( contextChildName.equals( EL_RUNTIME_COMPONENT ) )
                     {
-                        final RuntimeComponentTypeRef rctRef = RuntimeComponentTypeRef.read( contextChild );
+                        final RuntimeComponentTypeRef rctRef = RuntimeComponentTypeRef.read( contextChild, problemLoggingPolicy );
                         
                         if( rctRef == null )
                         {
@@ -214,11 +216,11 @@
                     }
                     else if( contextChildName.equals( EL_FIXED_FACET ) )
                     {
-                        final String fid = findRequiredAttribute( child, ATTR_ID );
+                        final String fid = findRequiredAttribute( contextChild, ATTR_ID );
                         
                         if( ! ProjectFacetsManager.isProjectFacetDefined( fid ) )
                         {
-                            FacetedProjectFrameworkImpl.reportMissingFacet( fid, pluginId );
+                            reportMissingFacet( fid, pluginId, problemLoggingPolicy );
                             throw new InvalidExtensionException();
                         }
                         
@@ -234,7 +236,7 @@
                 
                 if( ! ProjectFacetsManager.isProjectFacetDefined( fid ) )
                 {
-                    FacetedProjectFrameworkImpl.reportMissingFacet( fid, pluginId );
+                    reportMissingFacet( fid, pluginId, problemLoggingPolicy );
                     throw new InvalidExtensionException();
                 }
 
@@ -244,14 +246,7 @@
                 
                 if( ! f.hasVersion( ver ) )
                 {
-                    String msg
-                        = NLS.bind( FacetedProjectFrameworkImpl.Resources.facetVersionNotDefined,
-                                    f.getId(), ver );
-                    
-                    msg += NLS.bind( FacetedProjectFrameworkImpl.Resources.usedInPlugin, pluginId ); 
-                    
-                    FacetCorePlugin.log( msg );
-                    
+                    reportMissingFacetVersion( f, ver, pluginId, problemLoggingPolicy );
                     throw new InvalidExtensionException();
                 }
                 
diff --git a/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/internal/FacetedProjectFrameworkImpl.java b/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/internal/FacetedProjectFrameworkImpl.java
index 1d413c5..238c25d 100644
--- a/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/internal/FacetedProjectFrameworkImpl.java
+++ b/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/internal/FacetedProjectFrameworkImpl.java
@@ -1274,38 +1274,6 @@
         return group.getPreferences( facet );
     }
     
-    public static void reportMissingFacet( final String fid,
-                                           final String plugin )
-    {
-        final String msg
-            = NLS.bind( Resources.facetNotDefined, fid ) +
-              NLS.bind( Resources.usedInPlugin, plugin );
-        
-        FacetCorePlugin.logError( msg, true );
-    }
-
-    public static void reportMissingFacet( final String fid,
-                                           final IProjectFacetVersion fv )
-    {
-        final String msg
-            = NLS.bind( Resources.facetNotDefined, fid ) +
-              NLS.bind( Resources.usedInConstraint, 
-                        fv.getProjectFacet().getId(),
-                        fv.getVersionString() );
-        
-        FacetCorePlugin.logError( msg, true );
-    }
-    
-    public static void reportMissingRuntimeComponentType( final String rct,
-                                                          final String plugin )
-    {
-        final String msg
-            = NLS.bind( Resources.runtimeComponentTypeNotDefined, rct ) +
-              NLS.bind( Resources.usedInPlugin, plugin );
-        
-        FacetCorePlugin.logError( msg, true );
-    }
-    
     private static IProgressMonitor submon( final IProgressMonitor monitor,
                                             final int ticks )
     {
@@ -1607,7 +1575,7 @@
         
         if( f == null )
         {
-            reportMissingFacet( fid, config.getContributor().getName() );
+            ProblemLog.reportMissingFacet( fid, config.getContributor().getName() );
             return;
         }
         
@@ -1833,7 +1801,7 @@
                         }
                         else
                         {
-                            FacetCorePlugin.log( f.createVersionNotFoundErrMsg( version ) );
+                            ProblemLog.reportMissingFacetVersion( f, version, config.getContributor().getName() );
                         }
                     }
                     else
@@ -1871,7 +1839,7 @@
         
         if( f == null )
         {
-            reportMissingFacet( fid, config.getContributor().getName() );
+            ProblemLog.reportMissingFacet( fid, config.getContributor().getName() );
             return;
         }
         
@@ -2062,7 +2030,7 @@
         
         if( f == null )
         {
-            reportMissingFacet( fid, config.getContributor().getName() );
+            ProblemLog.reportMissingFacet( fid, config.getContributor().getName() );
             return;
         }
         
@@ -2166,12 +2134,15 @@
     private void readConstraint( final IConfigurationElement config,
                                  final ProjectFacetVersion fv )
     {
+        final ProblemLog.Policy problemLoggingPolicy 
+            = ProblemLog.Policy.createBasedOnIgnoreProblemsAttr( config );
+
         final IConfigurationElement[] ops = config.getChildren();
         final List<IConstraint> parsed = new ArrayList<IConstraint>();
         
         for( int j = 0; j < ops.length; j++ )
         {
-            final IConstraint op = readConstraintHelper( ops[ j ], fv );
+            final IConstraint op = readConstraintHelper( ops[ j ], fv, problemLoggingPolicy );
             
             if( op != null )
             {
@@ -2194,10 +2165,14 @@
     }
     
     private IConstraint readConstraintHelper( final IConfigurationElement root,
-                                              final ProjectFacetVersion fv )
+                                              final ProjectFacetVersion fv,
+                                              final ProblemLog.Policy parentProblemLoggingPolicy )
     {
         final String pluginId = root.getContributor().getName();
         
+        final ProblemLog.Policy localProblemLoggingPolicy 
+            = ProblemLog.Policy.createBasedOnIgnoreProblemsAttr( root, parentProblemLoggingPolicy );
+        
         final IConstraint.Type type
             = IConstraint.Type.valueOf( root.getName() );
         
@@ -2207,20 +2182,27 @@
             type == IConstraint.Type.OR )
         {
             final IConfigurationElement[] children = root.getChildren();
-            operands = new IConstraint[ children.length ];
+            final List<Object> operandsList = new ArrayList<Object>( children.length );
             
             for( int i = 0; i < children.length; i++ )
             {
                 final IConstraint operand 
-                    = readConstraintHelper( children[ i ], fv );
+                    = readConstraintHelper( children[ i ], fv, localProblemLoggingPolicy );
                 
-                if( operand == null )
+                if( operand != null )
                 {
-                    return null;
+                    operandsList.add( operand );
                 }
-                
-                operands[ i ] = operand;
+                else
+                {
+                    if( type == IConstraint.Type.AND )
+                    {
+                        return null;
+                    }
+                }
             }
+            
+            operands = operandsList.toArray();
         }
         else if( type == IConstraint.Type.REQUIRES ||
                  type == IConstraint.Type.CONFLICTS )
@@ -2253,11 +2235,7 @@
             {
                 if( ! isGroupDefined( gid ) )
                 {
-                    final String msg
-                        = NLS.bind( Resources.groupNotDefined, gid ) +
-                          NLS.bind( Resources.usedInPlugin, pluginId );
-                    
-                    FacetCorePlugin.logError( msg, true );
+                    ProblemLog.reportMissingGroup( gid, pluginId, localProblemLoggingPolicy );
                     return null;
                 }
                 
@@ -2276,11 +2254,7 @@
             {
                 if( ! isProjectFacetDefined( fid ) )
                 {
-                    final String msg
-                        = NLS.bind( Resources.facetNotDefined, fid ) +
-                          NLS.bind( Resources.usedInPlugin, pluginId );
-                    
-                    FacetCorePlugin.logError( msg, true );
+                    ProblemLog.reportMissingFacet( fid, pluginId, localProblemLoggingPolicy );
                     return null;
                 }
                 
@@ -2451,9 +2425,7 @@
         public static String groupNotDefined;
         public static String presetNotDefined;
         public static String templateNotDefined;
-        public static String runtimeComponentTypeNotDefined;
         public static String usedInPlugin;
-        public static String usedInConstraint;
         public static String invalidActionType;
         public static String invalidEventHandlerType;
         public static String invalidRequiresConstraint;
diff --git a/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/internal/FacetedProjectFrameworkImpl.properties b/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/internal/FacetedProjectFrameworkImpl.properties
index 1195933..d2007b2 100644
--- a/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/internal/FacetedProjectFrameworkImpl.properties
+++ b/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/internal/FacetedProjectFrameworkImpl.properties
@@ -7,9 +7,7 @@
 groupNotDefined = Project facet group {0} has not been defined.
 presetNotDefined = Preset {0} has not been defined.
 templateNotDefined = Template {0} has not been defined.
-runtimeComponentTypeNotDefined = Runtime component type {0} has not been defined.
 usedInPlugin = \ It is used in plugin {0}.
-usedInConstraint = \ It is used in the constraint of project facet {0} version {1}.
 invalidActionType = "{0}" is an invalid action type.
 invalidEventHandlerType = "{0}" is an invalid event handler type.
 invalidRequiresConstraint = The requires constraint can specify either a "group" attribute or a "facet" attribute and a "version" attribute. The problem was found in plugin {0}.
diff --git a/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/internal/FacetedProjectTemplatesExtensionPoint.java b/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/internal/FacetedProjectTemplatesExtensionPoint.java
index d845fee..67b1df3 100644
--- a/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/internal/FacetedProjectTemplatesExtensionPoint.java
+++ b/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/internal/FacetedProjectTemplatesExtensionPoint.java
@@ -12,7 +12,6 @@
 package org.eclipse.wst.common.project.facet.core.internal;
 
 import static org.eclipse.wst.common.project.facet.core.internal.FacetCorePlugin.PLUGIN_ID;
-import static org.eclipse.wst.common.project.facet.core.internal.FacetedProjectFrameworkImpl.reportMissingFacet;
 import static org.eclipse.wst.common.project.facet.core.util.internal.PluginUtil.findExtensions;
 import static org.eclipse.wst.common.project.facet.core.util.internal.PluginUtil.findOptionalElement;
 import static org.eclipse.wst.common.project.facet.core.util.internal.PluginUtil.findRequiredAttribute;
@@ -112,7 +111,7 @@
                 
                 if( ! ProjectFacetsManager.isProjectFacetDefined( fid ) )
                 {
-                    reportMissingFacet( fid, pluginId );
+                    ProblemLog.reportMissingFacet( fid, pluginId );
                     return;
                 }
                 
diff --git a/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/internal/ProblemLog.java b/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/internal/ProblemLog.java
new file mode 100644
index 0000000..5643b70
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/internal/ProblemLog.java
@@ -0,0 +1,218 @@
+package org.eclipse.wst.common.project.facet.core.internal;
+
+import java.util.EnumSet;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.wst.common.project.facet.core.IProjectFacet;
+
+public final class ProblemLog 
+{
+    public enum ProblemCase
+    {            
+        FACET_NOT_DEFINED( "facet-not-defined" ), //$NON-NLS-1$
+        FACET_VERSION_NOT_DEFINED( "facet-version-not-defined" ), //$NON-NLS-1$
+        GROUP_NOT_DEFINED( "group-not-defined" ), //$NON-NLS-1$
+        RUNTIME_COMPONENT_TYPE_NOT_DEFINED( "runtime-component-type-not-defined" ), //$NON-NLS-1$
+        RUNTIME_COMPONENT_VERSION_NOT_DEFINED( "runtime-component-version-not-defined" ); //$NON-NLS-1$
+        
+        private String str;
+        
+        private ProblemCase( final String str )
+        {
+            this.str = str;
+        }
+        
+        public String toString()
+        {
+            return this.str;
+        }
+    }
+
+    public static final class Policy
+    {
+        private final EnumSet<ProblemCase> problemCases;
+        
+        public Policy()
+        {
+            this.problemCases = EnumSet.allOf( ProblemCase.class );
+            
+            for( ProblemCase problemCase : ProblemCase.values() )
+            {
+                this.problemCases.add( problemCase );
+            }
+        }
+        
+        public static Policy createBasedOnIgnoreProblemsAttr( final IConfigurationElement element )
+        {
+            return createBasedOnIgnoreProblemsAttr( element, DEFAULT_POLICY );
+        }
+        
+        public static Policy createBasedOnIgnoreProblemsAttr( final IConfigurationElement element,
+                                                              final Policy defaultProblemLoggingPolicy )
+        {
+            final String enabledWhenAttrValue = element.getAttribute( "ignore-problems" ); //$NON-NLS-1$
+            
+            if( enabledWhenAttrValue == null )
+            {
+                return defaultProblemLoggingPolicy;
+            }
+            else
+            {
+                final Policy policy = new Policy();
+            
+                for( String segment : enabledWhenAttrValue.split( "," ) ) //$NON-NLS-1$
+                {
+                    segment = segment.trim();
+                    
+                    boolean knownCase = false;
+                    
+                    if( segment.equalsIgnoreCase( NOT_DEFINED_WILDCARD ) )
+                    {
+                        policy.problemCases.remove( ProblemCase.FACET_NOT_DEFINED );
+                        policy.problemCases.remove( ProblemCase.FACET_VERSION_NOT_DEFINED );
+                        policy.problemCases.remove( ProblemCase.GROUP_NOT_DEFINED );
+                        policy.problemCases.remove( ProblemCase.RUNTIME_COMPONENT_TYPE_NOT_DEFINED );
+                        policy.problemCases.remove( ProblemCase.RUNTIME_COMPONENT_VERSION_NOT_DEFINED );
+                        
+                        knownCase = true;
+                    }
+                    else
+                    {
+                        for( ProblemCase problemCase : ProblemCase.values() )
+                        {
+                            if( segment.equalsIgnoreCase( problemCase.toString() ) )
+                            {
+                                policy.problemCases.remove( problemCase );
+                                knownCase = true;
+                                break;
+                            }
+                        }
+                    }
+                    
+                    if( ! knownCase )
+                    {
+                        final String msg
+                            = NLS.bind( Resources.problemCaseNotRecognized, segment ) +
+                              NLS.bind( Resources.usedInPlugin, element.getContributor().getName() );
+                        
+                        FacetCorePlugin.logWarning( msg, true );
+                    }
+                }
+                
+                return policy;
+            }
+        }
+        
+        public boolean isLoggingEnabled( final ProblemCase problemCase )
+        {
+            return this.problemCases.contains( problemCase );
+        }
+    }
+
+    private static final String NOT_DEFINED_WILDCARD = "not-defined"; //$NON-NLS-1$
+    
+    public static final Policy DEFAULT_POLICY = new Policy();
+    
+    public static void reportMissingFacet( final String fid,
+                                           final String plugin )
+    {
+        reportMissingFacet( fid, plugin, DEFAULT_POLICY );
+    }
+
+    public static void reportMissingFacet( final String fid,
+                                           final String plugin,
+                                           final Policy policy )
+    {
+        if( policy.isLoggingEnabled( ProblemCase.FACET_NOT_DEFINED ) )
+        {
+            final String msg
+                = NLS.bind( Resources.facetNotDefined, fid ) +
+                  NLS.bind( Resources.usedInPlugin, plugin );
+            
+            FacetCorePlugin.logError( msg, true );
+        }
+    }
+    
+    public static void reportMissingFacetVersion( final IProjectFacet facet,
+                                                  final String version,
+                                                  final String plugin )
+    {
+        reportMissingFacetVersion( facet, version, plugin, DEFAULT_POLICY );
+    }
+
+    public static void reportMissingFacetVersion( final IProjectFacet facet,
+                                                  final String version,
+                                                  final String plugin,
+                                                  final Policy policy )
+    {
+        if( policy.isLoggingEnabled( ProblemCase.FACET_VERSION_NOT_DEFINED ) )
+        {
+            final String msg
+                = NLS.bind( Resources.facetVersionNotDefined, facet.getId(), version ) +
+                  NLS.bind( Resources.usedInPlugin, plugin );
+            
+            FacetCorePlugin.logError( msg, true );
+        }
+    }
+
+    public static void reportMissingGroup( final String groupId,
+                                           final String pluginId )
+    {
+        reportMissingGroup( groupId, pluginId, DEFAULT_POLICY );
+    }
+
+    public static void reportMissingGroup( final String groupId,
+                                           final String pluginId,
+                                           final Policy policy )
+    {
+        if( policy.isLoggingEnabled( ProblemCase.GROUP_NOT_DEFINED ) )
+        {
+            final String msg
+                = NLS.bind( Resources.groupNotDefined, groupId ) +
+                  NLS.bind( Resources.usedInPlugin, pluginId );
+            
+            FacetCorePlugin.logError( msg, true );
+        }
+    }
+    
+    public static void reportMissingRuntimeComponentType( final String rct,
+                                                          final String plugin )
+    {
+        reportMissingRuntimeComponentType( rct, plugin, DEFAULT_POLICY );
+    }
+
+    public static void reportMissingRuntimeComponentType( final String rct,
+                                                          final String plugin,
+                                                          final Policy policy )
+    {
+        if( policy.isLoggingEnabled( ProblemCase.RUNTIME_COMPONENT_TYPE_NOT_DEFINED ) )
+        {
+            final String msg
+                = NLS.bind( Resources.runtimeComponentTypeNotDefined, rct ) +
+                  NLS.bind( Resources.usedInPlugin, plugin );
+            
+            FacetCorePlugin.logError( msg, true );
+        }
+    }
+    
+    private static final class Resources
+    
+        extends NLS
+        
+    {
+        public static String problemCaseNotRecognized;
+        public static String facetNotDefined;
+        public static String facetVersionNotDefined;
+        public static String groupNotDefined;
+        public static String runtimeComponentTypeNotDefined;
+        public static String usedInPlugin;
+        
+        static
+        {
+            initializeMessages( FacetedProjectFrameworkImpl.class.getName(), 
+                                Resources.class );
+        }
+    }
+    
+}
diff --git a/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/internal/ProblemLog.properties b/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/internal/ProblemLog.properties
new file mode 100644
index 0000000..abf9833
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/internal/ProblemLog.properties
@@ -0,0 +1,6 @@
+problemCaseNotRecognized = Problem case {0} is not recognized.
+facetNotDefined = Project facet {0} has not been defined.
+facetVersionNotDefined = Version {1} of project facet {0} does not exist.
+groupNotDefined = Project facet group {0} has not been defined.
+runtimeComponentTypeNotDefined = Runtime component type {0} has not been defined.
+usedInPlugin = \ It is used in plugin {0}.
diff --git a/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/internal/ProjectFacetRef.java b/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/internal/ProjectFacetRef.java
index 060874f..b0af10f 100644
--- a/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/internal/ProjectFacetRef.java
+++ b/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/internal/ProjectFacetRef.java
@@ -109,7 +109,7 @@
         
         if( ! ProjectFacetsManager.isProjectFacetDefined( id ) )
         {
-            FacetedProjectFrameworkImpl.reportMissingFacet( id, config.getContributor().getName() );
+            ProblemLog.reportMissingFacet( id, config.getContributor().getName() );
             return null;
         }
         
diff --git a/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/internal/RuntimeComponentTypeRef.java b/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/internal/RuntimeComponentTypeRef.java
index ddc8fd7..78821c4 100644
--- a/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/internal/RuntimeComponentTypeRef.java
+++ b/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/internal/RuntimeComponentTypeRef.java
@@ -72,6 +72,12 @@
     
     public static RuntimeComponentTypeRef read( final IConfigurationElement config )
     {
+        return read( config, ProblemLog.DEFAULT_POLICY );
+    }
+    
+    public static RuntimeComponentTypeRef read( final IConfigurationElement config,
+                                                final ProblemLog.Policy problemLoggingPolicy )
+    {
         final String pluginId = config.getContributor().getName();
         final String id = config.getAttribute( ATTR_ID );
 
@@ -83,7 +89,7 @@
         
         if( ! RuntimeManager.isRuntimeComponentTypeDefined( id ) )
         {
-            FacetedProjectFrameworkImpl.reportMissingRuntimeComponentType( id, pluginId );
+            ProblemLog.reportMissingRuntimeComponentType( id, pluginId, problemLoggingPolicy );
             return null;
         }
         
diff --git a/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/runtime/internal/RuntimeManagerImpl.java b/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/runtime/internal/RuntimeManagerImpl.java
index fb9e5c4..88c5e32 100644
--- a/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/runtime/internal/RuntimeManagerImpl.java
+++ b/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/runtime/internal/RuntimeManagerImpl.java
@@ -37,7 +37,7 @@
 import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
 import org.eclipse.wst.common.project.facet.core.VersionFormatException;
 import org.eclipse.wst.common.project.facet.core.internal.FacetCorePlugin;
-import org.eclipse.wst.common.project.facet.core.internal.FacetedProjectFrameworkImpl;
+import org.eclipse.wst.common.project.facet.core.internal.ProblemLog;
 import org.eclipse.wst.common.project.facet.core.internal.ProjectFacetVersion;
 import org.eclipse.wst.common.project.facet.core.runtime.IRuntime;
 import org.eclipse.wst.common.project.facet.core.runtime.IRuntimeBridge;
@@ -60,7 +60,6 @@
 {
     private static final String EXTENSION_ID = "runtimes"; //$NON-NLS-1$
     private static final String BRIDGES_EXTENSION_ID = "runtimeBridges"; //$NON-NLS-1$
-    private static final String DEFAULT_FACETS_EXTENSION_ID = "defaultFacets"; //$NON-NLS-1$
 
     private static final String ATTR_CLASS = "class"; //$NON-NLS-1$
     private static final String ATTR_ID = "id"; //$NON-NLS-1$
@@ -68,7 +67,6 @@
     private static final String ATTR_VERSION = "version"; //$NON-NLS-1$
     private static final String EL_ADAPTER = "adapter"; //$NON-NLS-1$
     private static final String EL_BRIDGE = "bridge"; //$NON-NLS-1$
-    private static final String EL_DEFAULT_FACETS = "default-facets"; //$NON-NLS-1$
     private static final String EL_FACET = "facet"; //$NON-NLS-1$
     private static final String EL_FACTORY = "factory"; //$NON-NLS-1$
     private static final String EL_RUNTIME_COMPONENT = "runtime-component"; //$NON-NLS-1$
@@ -83,7 +81,6 @@
     private static final IndexedSet<String,IRuntime> runtimes;
     private static final List<Mapping> mappings;
     private static final Map<String,IRuntimeBridge> bridges;
-    private static final List<DefaultFacetsEntry> defaultFacets;
     private static final Set<IListener> listeners;
     private static final RuntimeLifecycleListenerRegistry runtimeLifecycleListenerRegistry;
     
@@ -93,13 +90,11 @@
         runtimes = new IndexedSet<String,IRuntime>();
         mappings = new ArrayList<Mapping>();
         bridges = new HashMap<String,IRuntimeBridge>();
-        defaultFacets = new ArrayList<DefaultFacetsEntry>();
         listeners = new HashSet<IListener>();
         runtimeLifecycleListenerRegistry = new RuntimeLifecycleListenerRegistry();
         
         readMetadata();
         readBridgesExtensions();
-        readDefaultFacetsExtensions();
         
         ( new RuntimeValidationThread() ).start();
     }
@@ -326,28 +321,6 @@
         return result;
     }
     
-    static Set<IProjectFacetVersion> getDefaultFacets( final IRuntimeComponentVersion rcv )
-    {
-        final Set<IProjectFacetVersion> result = new HashSet<IProjectFacetVersion>();
-        
-        for( DefaultFacetsEntry dfe : defaultFacets )
-        {
-            try
-            {
-                if( dfe.match( rcv ) )
-                {
-                    result.addAll( dfe.facets );
-                }
-            }
-            catch( CoreException e )
-            {
-                FacetCorePlugin.log( e );
-            }
-        }
-        
-        return result;
-    }
-    
     private static void bridge()
     {
         boolean modified = false;
@@ -903,118 +876,6 @@
             }
         }
     }
-
-    private static void readDefaultFacetsExtensions()
-    {
-        final IExtensionRegistry registry = Platform.getExtensionRegistry();
-        
-        final IExtensionPoint point 
-            = registry.getExtensionPoint( FacetCorePlugin.PLUGIN_ID, 
-                                          DEFAULT_FACETS_EXTENSION_ID );
-        
-        if( point == null )
-        {
-            throw new RuntimeException( "Extension point not found!" ); //$NON-NLS-1$
-        }
-        
-        final List<IConfigurationElement> cfgels = new ArrayList<IConfigurationElement>();
-        
-        for( IExtension extension : point.getExtensions() )
-        {
-            for( IConfigurationElement cfgel : extension.getConfigurationElements() )
-            {
-                cfgels.add( cfgel );
-            }
-        }
-
-        for( IConfigurationElement config : cfgels )
-        {
-            if( config.getName().equals( EL_DEFAULT_FACETS ) )
-            {
-                readDefaultFacets( config );
-            }
-        }
-    }
-    
-    private static void readDefaultFacets( final IConfigurationElement config )
-    {
-        final DefaultFacetsEntry dfe = new DefaultFacetsEntry();
-        final IConfigurationElement[] children = config.getChildren();
-        
-        for( int i = 0; i < children.length; i++ )
-        {
-            final IConfigurationElement child = children[ i ];
-            final String childName = child.getName();
-            
-            if( childName.equals( EL_RUNTIME_COMPONENT ) )
-            {
-                dfe.rct = readRuntimeComponentTypeRef( child );
-                
-                if( dfe.rct == null )
-                {
-                    return;
-                }
-                
-                final String v = child.getAttribute( ATTR_VERSION );
-                
-                if( v != null )
-                {
-                    try
-                    {
-                        final String pluginId 
-                            = config.getContributor().getName();
-                        
-                        dfe.rcvexpr = new VersionExpr<RuntimeComponentVersion>( dfe.rct, v, pluginId );
-                    }
-                    catch( CoreException e )
-                    {
-                        FacetCorePlugin.log( e.getStatus() );
-                        return;
-                    }
-                }
-            }
-            else if( childName.equals( EL_FACET ) )
-            {
-                final IProjectFacet f = readProjectFacetRef( child );
-                
-                if( f == null )
-                {
-                    return;
-                }
-                
-                final String ver = child.getAttribute( ATTR_VERSION );
-                
-                if( ver == null )
-                {
-                    reportMissingAttribute( child, ATTR_VERSION );
-                    return;
-                }
-                
-                if( ! f.hasVersion( ver ) )
-                {
-                    String msg
-                        = NLS.bind( FacetedProjectFrameworkImpl.Resources.facetVersionNotDefined,
-                                    f.getId(), ver );
-                    
-                    msg += NLS.bind( Resources.usedInPlugin, 
-                                     config.getContributor().getName() );
-                    
-                    FacetCorePlugin.log( msg );
-                    
-                    return;
-                }
-                
-                dfe.facets.add( f.getVersion( ver ) );
-            }
-        }
-        
-        if( dfe.rct == null )
-        {
-            return;
-        }
-        
-        defaultFacets.add( dfe );
-    }
     
     private static IRuntimeComponentType readRuntimeComponentTypeRef( final IConfigurationElement config )
     {
@@ -1053,7 +914,7 @@
         
         if( ! ProjectFacetsManager.isProjectFacetDefined( id ) )
         {
-            FacetedProjectFrameworkImpl.reportMissingFacet( id, config.getContributor().getName() );
+            ProblemLog.reportMissingFacet( id, config.getContributor().getName() );
             return null;
         }
         
@@ -1122,28 +983,6 @@
         }
     }
     
-    private static final class DefaultFacetsEntry
-    {
-        public IRuntimeComponentType rct;
-        public VersionExpr<RuntimeComponentVersion> rcvexpr;
-        public final Set<IProjectFacetVersion> facets = new HashSet<IProjectFacetVersion>();
-        
-        public boolean match( final IRuntimeComponentVersion rcv )
-        
-            throws CoreException
-            
-        {
-            if( rcv.getRuntimeComponentType() != this.rct )
-            {
-                return false;
-            }
-            else
-            {
-                return this.rcvexpr.check( rcv );
-            }
-        }
-    }
-    
     private static final class RuntimeValidationThread
 
         extends Thread