This commit was manufactured by cvs2svn to create tag 'R2_0_2'.
diff --git a/docs/org.eclipse.wst.validation.infopop/.cvsignore b/docs/org.eclipse.wst.validation.infopop/.cvsignore
new file mode 100644
index 0000000..c14487c
--- /dev/null
+++ b/docs/org.eclipse.wst.validation.infopop/.cvsignore
@@ -0,0 +1 @@
+build.xml
diff --git a/docs/org.eclipse.wst.validation.infopop/.project b/docs/org.eclipse.wst.validation.infopop/.project
new file mode 100644
index 0000000..28f5b4f
--- /dev/null
+++ b/docs/org.eclipse.wst.validation.infopop/.project
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.wst.validation.infopop</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+	</natures>
+</projectDescription>
diff --git a/docs/org.eclipse.wst.validation.infopop/META-INF/MANIFEST.MF b/docs/org.eclipse.wst.validation.infopop/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..7161932
--- /dev/null
+++ b/docs/org.eclipse.wst.validation.infopop/META-INF/MANIFEST.MF
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Plugin.name
+Bundle-SymbolicName: org.eclipse.wst.validation.infopop; singleton:=true
+Bundle-Version: 1.0.202.qualifier
+Bundle-Localization: plugin
+Bundle-Vendor: %Plugin.providerName
diff --git a/docs/org.eclipse.wst.validation.infopop/ValidationPrefs_HelpContexts.xml b/docs/org.eclipse.wst.validation.infopop/ValidationPrefs_HelpContexts.xml
new file mode 100644
index 0000000..9a8ccfa
--- /dev/null
+++ b/docs/org.eclipse.wst.validation.infopop/ValidationPrefs_HelpContexts.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?NLS type="org.eclipse.help.contexts"?>
+
+<contexts>
+	<!-- Eclipse Validation preferences -->
+<context id="jvgp0000">
+<description>The validation preferences page allows you to view or change the default validation settings for all workbench projects. A validator is a tool that checks that resources conform to a specification, DTD, or some other set of rules.
+
+Each validator can apply to certain types of files, certain project natures, and certain project facets. When a validator applies to a project facet or nature, the workbench uses that validator only on projects that have that facet or nature. Likewise, most validators apply only to certain types of files, so the workbench uses those validators only on those types of files.
+
+Select the <b>Allow projects to override these preference settings</b> check box if you want to allow individual projects to set their own validation preferences. To configure new validation settings for an individual project, select the project in the Navigator view, right-click and select <b>Properties</b>   &gt; <b>Validation</b> .
+
+Select the <b>Suspend all validators</b> check box to prevent validation at the global level. If you select this check box, you can still enable validation at the project level.
+
+Select the <b>Save all modified resources automatically prior to validating</b> check box if you want to save any resources you have modified before the validation begins.
+
+In the list of validators, select the check boxes next to each validator you want to use at the global level. Each validator has a check box to specify whether it is used on manual validation or on build validation. Choose an alternate implementation for a validator by clicking the button in the <b>Settings</b> column. Not all validators have alternate implementations.
+
+</description>
+<topic href="../org.eclipse.jst.j2ee.doc.user/topics/tjval.html" label="Validating code in enterprise applications"/>
+<topic href="../org.eclipse.jst.j2ee.doc.user/topics/tjvalglobalpref.html" label="Overriding global validation preferences"/>
+<topic href="../org.eclipse.jst.j2ee.doc.user/topics/rvalerr.html" label="Common validation errors and solutions"/>
+</context>
+
+</contexts>
\ No newline at end of file
diff --git a/docs/org.eclipse.wst.validation.infopop/ValidationProjPrefs_HelpContexts.xml b/docs/org.eclipse.wst.validation.infopop/ValidationProjPrefs_HelpContexts.xml
new file mode 100644
index 0000000..489af37
--- /dev/null
+++ b/docs/org.eclipse.wst.validation.infopop/ValidationProjPrefs_HelpContexts.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?NLS type="org.eclipse.help.contexts"?>
+
+<contexts>
+	<!-- Validation settings for project -->
+
+<context id="jvpp0000">
+<description>The project validation page allows you to view or change the validation settings for a project. A validator is a tool that checks that resources conform to a specification, DTD, or some other set of rules.
+
+Each validator can apply to certain types of files, certain project natures, and certain project facets. When a validator applies to a project facet or nature, the workbench uses that validator only on projects that have that facet or nature. Likewise, most validators apply only to certain types of files, so the workbench uses those validators only on those types of files.
+
+Select the <b>Override validation preferences</b> check box if you want to override the default validation preferences set in the workbench Preferences page. If the <b>Override validation preferences</b> check box is not enabled, go to <b>Window</b>   &gt; <b>Preferences</b>   &gt; <b>Validation</b> and select the <b>Allow projects to override these preference settings</b> check box.
+
+Select the <b>Suspend all validators</b> check box to prevent validation for this project.
+
+In the list of validators, select the check boxes next to each validator you want to use for this project. Each validator has a check box to specify whether it is used on manual validation or on build validation. Choose an alternate implementation for a validator by clicking the button in the <b>Settings</b> column. Not all validators have alternate implementations.
+
+</description>
+<topic href="../org.eclipse.jst.j2ee.doc.user/topics/tjval.html" label="Validating code in enterprise applications"/>
+<topic href="../org.eclipse.jst.j2ee.doc.user/topics/tjvalglobalpref.html" label="Overriding global validation preferences"/>
+<topic href="../org.eclipse.jst.j2ee.doc.user/topics/rvalerr.html" label="Common validation errors and solutions"/>
+</context>
+
+</contexts>
\ No newline at end of file
diff --git a/docs/org.eclipse.wst.validation.infopop/about.html b/docs/org.eclipse.wst.validation.infopop/about.html
new file mode 100644
index 0000000..73db36e
--- /dev/null
+++ b/docs/org.eclipse.wst.validation.infopop/about.html
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<HTML>
+
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+
+<BODY lang="EN-US">
+
+<H3>About This Content</H3>
+
+<P>June 06, 2007</P>
+
+<H3>License</H3>
+
+<P>The Eclipse Foundation makes available all content in this plug-in 
+("Content"). Unless otherwise indicated below, the Content is provided to you 
+under the terms and conditions of the Eclipse Public License Version 1.0 
+("EPL"). A copy of the EPL is available at
+<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>. 
+For purposes of the EPL, "Program" will mean the Content.</P>
+
+<P>If you did not receive this Content directly from the Eclipse Foundation, the 
+Content is being redistributed by another party ("Redistributor") and different 
+terms and conditions may apply to your use of any object code in the Content. 
+Check the Redistributor’s license that was provided with the Content. If no such 
+license exists, contact the Redistributor. Unless otherwise indicated below, the 
+terms and conditions of the EPL still apply to any source code in the Content 
+and such source code may be obtained at
+<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P>
+
+</BODY>
+</HTML>
diff --git a/docs/org.eclipse.wst.validation.infopop/build.properties b/docs/org.eclipse.wst.validation.infopop/build.properties
new file mode 100644
index 0000000..ac322ed
--- /dev/null
+++ b/docs/org.eclipse.wst.validation.infopop/build.properties
@@ -0,0 +1,7 @@
+bin.includes = META-INF/,\
+               plugin.xml,\
+               ValidationPrefs_HelpContexts.xml,\
+               ValidationProjPrefs_HelpContexts.xml,\
+               plugin.properties,\
+               about.html
+src.includes = build.properties
diff --git a/docs/org.eclipse.wst.validation.infopop/plugin.properties b/docs/org.eclipse.wst.validation.infopop/plugin.properties
new file mode 100644
index 0000000..b0c0709
--- /dev/null
+++ b/docs/org.eclipse.wst.validation.infopop/plugin.properties
@@ -0,0 +1,6 @@
+# NLS_MESSAGEFORMAT_VAR
+# ==============================================================================
+# Translation Instruction: section to be translated
+# ==============================================================================
+Plugin.name = WST validation infopop plug-in
+Plugin.providerName = Eclipse.org
\ No newline at end of file
diff --git a/docs/org.eclipse.wst.validation.infopop/plugin.xml b/docs/org.eclipse.wst.validation.infopop/plugin.xml
new file mode 100644
index 0000000..aaf27bf
--- /dev/null
+++ b/docs/org.eclipse.wst.validation.infopop/plugin.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+   <extension
+         point="org.eclipse.help.contexts">
+    <contexts file="ValidationProjPrefs_HelpContexts.xml" plugin="org.eclipse.wst.validation.ui" />
+	<contexts file="ValidationPrefs_HelpContexts.xml" plugin="org.eclipse.wst.validation.ui" />
+   </extension>
+
+</plugin>
diff --git a/plugins/org.eclipse.wst.common.core/.classpath b/plugins/org.eclipse.wst.common.core/.classpath
new file mode 100644
index 0000000..21f2a57
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src-search"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.wst.common.core/.cvsignore b/plugins/org.eclipse.wst.common.core/.cvsignore
new file mode 100644
index 0000000..0f861fd
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/.cvsignore
@@ -0,0 +1,6 @@
+bin
+build.xml
+javaCompiler...args
+src.zip
+@dot
+temp.folder
diff --git a/plugins/org.eclipse.wst.common.core/.options b/plugins/org.eclipse.wst.common.core/.options
new file mode 100644
index 0000000..2e5ed2a
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/.options
@@ -0,0 +1 @@
+org.eclipse.wst.common.search/perf=false
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.core/.project b/plugins/org.eclipse.wst.common.core/.project
new file mode 100644
index 0000000..6bb12ef
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.wst.common.core</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.wst.common.core/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.wst.common.core/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..7406de6
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,59 @@
+#Mon Jan 30 23:40:52 EST 2006
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.3
diff --git a/plugins/org.eclipse.wst.common.core/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.wst.common.core/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..c68ceb4
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,3 @@
+#Mon Jan 30 19:45:41 EST 2006
+eclipse.preferences.version=1
+internal.default.compliance=default
diff --git a/plugins/org.eclipse.wst.common.core/META-INF/MANIFEST.MF b/plugins/org.eclipse.wst.common.core/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..3633d68
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/META-INF/MANIFEST.MF
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.wst.common.core; singleton:=true
+Bundle-Version: 1.1.101.qualifier
+Bundle-Activator: org.eclipse.wst.common.core.search.SearchPlugin
+Bundle-Localization: plugin
+Export-Package: org.eclipse.wst.common.core.search,
+ org.eclipse.wst.common.core.search.document,
+ org.eclipse.wst.common.core.search.internal;x-internal:=true,
+ org.eclipse.wst.common.core.search.pattern,
+ org.eclipse.wst.common.core.search.scope,
+ org.eclipse.wst.common.core.search.util
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.2.0,3.4.0)",
+ org.eclipse.core.resources;bundle-version="[3.2.0,3.4.0)",
+ org.eclipse.core.expressions;bundle-version="[3.2.0,3.4.0)"
+Eclipse-LazyStart: true
+Bundle-Vendor: %pluginProvider
+Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/plugins/org.eclipse.wst.common.core/about.html b/plugins/org.eclipse.wst.common.core/about.html
new file mode 100644
index 0000000..73db36e
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/about.html
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<HTML>
+
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+
+<BODY lang="EN-US">
+
+<H3>About This Content</H3>
+
+<P>June 06, 2007</P>
+
+<H3>License</H3>
+
+<P>The Eclipse Foundation makes available all content in this plug-in 
+("Content"). Unless otherwise indicated below, the Content is provided to you 
+under the terms and conditions of the Eclipse Public License Version 1.0 
+("EPL"). A copy of the EPL is available at
+<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>. 
+For purposes of the EPL, "Program" will mean the Content.</P>
+
+<P>If you did not receive this Content directly from the Eclipse Foundation, the 
+Content is being redistributed by another party ("Redistributor") and different 
+terms and conditions may apply to your use of any object code in the Content. 
+Check the Redistributor’s license that was provided with the Content. If no such 
+license exists, contact the Redistributor. Unless otherwise indicated below, the 
+terms and conditions of the EPL still apply to any source code in the Content 
+and such source code may be obtained at
+<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P>
+
+</BODY>
+</HTML>
diff --git a/plugins/org.eclipse.wst.common.core/build.properties b/plugins/org.eclipse.wst.common.core/build.properties
new file mode 100644
index 0000000..cd3e92f
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/build.properties
@@ -0,0 +1,8 @@
+source.. = src-search/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml,\
+               schema/,\
+               plugin.properties,\
+               about.html
diff --git a/plugins/org.eclipse.wst.common.core/component.xml b/plugins/org.eclipse.wst.common.core/component.xml
new file mode 100644
index 0000000..3e9239c
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/component.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component xmlns="http://eclipse.org/wtp/releng/tools/component-model" 
+  name="org.eclipse.wst.common.core">
+  <component-depends unrestricted="true"></component-depends>
+  <plugin id="org.eclipse.wst.common.core" fragment="false" />
+</component>
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.core/plugin.properties b/plugins/org.eclipse.wst.common.core/plugin.properties
new file mode 100644
index 0000000..ff6cdef
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/plugin.properties
@@ -0,0 +1,3 @@
+! Plug-in properties
+pluginName     = WST Common Core Plug-in
+pluginProvider = Eclipse.org
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.core/plugin.xml b/plugins/org.eclipse.wst.common.core/plugin.xml
new file mode 100644
index 0000000..c82f6a0
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/plugin.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+   <extension-point id="searchParticipants" name="%searchParticipants" />      
+</plugin>
+
+
diff --git a/plugins/org.eclipse.wst.common.core/schema/searchParticipants.exsd b/plugins/org.eclipse.wst.common.core/schema/searchParticipants.exsd
new file mode 100644
index 0000000..367c943
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/schema/searchParticipants.exsd
@@ -0,0 +1,89 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.wst.common.core">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.wst.common.search" id="searchParticipants" name="%searchPArticipants"/>
+      </appInfo>
+      <documentation>
+         [Enter description of this extension point.]
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <complexType>
+         <sequence>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         [Enter the first release in which this extension point appears.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="examples"/>
+      </appInfo>
+      <documentation>
+         [Enter extension point usage example here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="apiInfo"/>
+      </appInfo>
+      <documentation>
+         [Enter API information here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="implementation"/>
+      </appInfo>
+      <documentation>
+         [Enter information about supplied implementation of this extension point.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/ISearchOptions.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/ISearchOptions.java
new file mode 100644
index 0000000..33305e5
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/ISearchOptions.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.common.core.search;
+
+/**
+ * This interface provides values that can be used in the map of search options passed
+ * to
+ * {@link SearchEngine#search(org.eclipse.wst.common.core.search.pattern.SearchPattern, SearchRequestor, org.eclipse.wst.common.core.search.scope.SearchScope, java.util.Map, org.eclipse.core.runtime.IProgressMonitor)
+ * SearchEngine.search()}.
+ * <p>
+ * Note that not all search participants will provide specialized behavior based on
+ * use of these search options.
+ * <p>
+ * Also note that individual search participants may support additional options not
+ * listed here. These search options should be formed so that a search participant can
+ * safely ignore any that it does not understand.
+ * 
+ * <p>
+ * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
+ * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
+ * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
+ * (repeatedly) as the API evolves.
+ * </p>
+ */
+public interface ISearchOptions {
+
+	/**
+	 * Search option specifying a trade-off choice between search performance and
+	 * completeness.
+	 */
+	public static final String PRIORITY_OPTION = "org.eclipse.wst.common.core.search.PRIORITY"; //$NON_NLS_1$
+	/**
+	 * Choice for the {@link #PRIORITY_OPTION} search option that emphasizes
+	 * performance at the possible expense of accuracy. This value should be used for
+	 * all search calls made on the user interface thread. In some cases, search
+	 * results may not be complete because of inaccuracies caused by timing windows.
+	 */
+	public static final String PRIORITY_VALUE_TIMELINESS = "FAST_SEARCH"; //$NON_NLS_1$
+	/**
+	 * Choice for the {@link #PRIORITY_OPTION} search option that emphasizes
+	 * accuracy at the possible expense of timeliness. This value should never be used
+	 * for search calls made on the user interface thread, because some search
+	 * participants may choose to use time-consuming background processing to return a
+	 * complete set of matches.
+	 */
+	public static final String PRIORITY_VALUE_COMPLETENESS = "COMPLETE_SEARCH"; //$NON_NLS_1$
+	/**
+	 * Default choice for the {@link #PRIORITY_OPTION} search option.
+	 */
+	public static final String PRIORITY_VALUE_DEFAULT = PRIORITY_VALUE_TIMELINESS;
+
+}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchEngine.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchEngine.java
new file mode 100644
index 0000000..3fed117
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchEngine.java
@@ -0,0 +1,213 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.wst.common.core.search;
+
+import java.util.Map;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.wst.common.core.search.document.SearchDocumentSet;
+import org.eclipse.wst.common.core.search.internal.Messages;
+import org.eclipse.wst.common.core.search.internal.SearchDocumentSetImpl;
+import org.eclipse.wst.common.core.search.pattern.SearchPattern;
+import org.eclipse.wst.common.core.search.scope.SearchScope;
+
+/**
+ * The {@link SearchEngine} class provides a generic way of searching for information
+ * without the need of knowing how or where that information is stored. The results
+ * returned by a search could be scattered in a number of files or stored in an index.
+ * Examples of the information you can search for include element declarations and
+ * references, references between files, and use of qualifiers.
+ * <p>
+ * The search can be limited to a specified search scope, or the entire workspace can
+ * be searched. Search matches are returned to the specified {@link SearchRequestor}.
+ * <p>
+ * This class may be instantiated; it is not intended to be subclassed.
+ * 
+ * <p>
+ * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
+ * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
+ * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
+ * (repeatedly) as the API evolves.
+ * </p>
+ */
+public class SearchEngine implements ISearchOptions
+{
+
+	/**
+	 * Searches for matches of a given search pattern using a specified set of search
+	 * participants and search scope. Search patterns can be created using factory
+	 * methods and encapsulate the description of the information to be searched for
+	 * (for example, element declarations of a specified type, in a case sensitive
+	 * manner).
+	 * @param pattern
+	 *            The pattern describing the information to search for
+	 * @param requestor
+	 *            Callback object to notify with the results of the search (each match
+	 *            is reported to {@link SearchRequestor#acceptSearchMatch(SearchMatch)})
+	 * @param participants
+	 *            The search participants that will conduct the search
+	 * @param scope
+	 *            Optional search scope to limit the source of search candidates;
+	 *            specify <code>null</code> to search the entire workspace
+	 * @param searchOptions
+	 *            Optional map of options and values defining behavior of the search;
+	 *            some options and values are provided by {@link ISearchOptions}
+	 * @param monitor
+	 *            Optional progress monitor used to report work completed
+	 * @exception CoreException
+	 *            if the search fails
+	 */
+	public void search(SearchPattern pattern, SearchRequestor requestor,
+			SearchParticipant[] participants, SearchScope scope, Map searchOptions,
+			IProgressMonitor monitor) throws CoreException
+	{
+
+		if (monitor != null && monitor.isCanceled())
+			throw new OperationCanceledException();
+
+		/* initialize progress monitor */
+		if (monitor != null)
+			monitor.beginTask(Messages.engine_searching, 100);
+
+        SearchDocumentSet set = new SearchDocumentSetImpl();
+		try
+		{
+			// requestor.beginReporting();
+            SearchScope[] scopeArray = new SearchScope[participants.length];
+			for (int i = 0, l = participants == null ? 0 : participants.length; i < l; i++)
+			{
+				if (monitor != null && monitor.isCanceled())
+					throw new OperationCanceledException();
+
+				SearchParticipant participant = participants[i];
+				SubProgressMonitor subMonitor = monitor == null ? null
+						: new SubProgressMonitor(monitor, 1000);
+				if (subMonitor != null)
+					subMonitor.beginTask("", 1000); //$NON-NLS-1$
+				try
+				{
+					if (subMonitor != null)
+						subMonitor.subTask(Messages.bind(
+								Messages.engine_searching_locatingDocuments,
+								new String[]
+								{ participant.getDescription() }));
+					participant.beginSearching(pattern, searchOptions);
+					// requestor.enterParticipant(participant);
+					// participant creates it's own search scope 
+					SearchScope newScope =
+						participant.selectDocumentLocations(pattern, scope, searchOptions, monitor);
+                    scopeArray[i] = newScope;
+					// participant creates search documents based on it's search scope
+					participant.createSearchDocuments(set, pattern, newScope, searchOptions, subMonitor);
+                }
+                catch(Exception e)
+                {                  
+                }
+			}
+            for (int i = 0, l = participants == null ? 0 : participants.length; i < l; i++)
+            {        
+                if (monitor != null && monitor.isCanceled())                                  
+                    throw new OperationCanceledException();
+                
+                SearchParticipant participant = participants[i];
+                SubProgressMonitor subMonitor = monitor == null ? null
+                    : new SubProgressMonitor(monitor, 1000);                     
+                if (subMonitor != null && subMonitor.isCanceled())
+                    throw new OperationCanceledException();
+                try
+                {
+                // locate index matches if any (note that all search matches
+                // could have been issued during index querying)
+                if (subMonitor != null)
+                    subMonitor.subTask(Messages.bind(
+                            Messages.engine_searching_matching,
+                            new String[]
+                            { participant.getDescription() }));
+                // a search document set should contain enough info to reduce the search scope even further 
+                // before finding precize locations
+                
+                // the scope could be null if the partcipant barfed and exeption in the first loop 
+                if (scopeArray[i] != null)
+                {  
+                  participant.locateMatches(set, pattern, scopeArray[i], requestor, searchOptions, subMonitor);
+                }  
+                }
+                catch (Exception e)
+                {
+                  
+                }
+                finally
+                {
+                  // requestor.exitParticipant(participant);
+                  participant.doneSearching(pattern, searchOptions);
+                }         
+            }    
+		} finally
+		{
+            set.dispose();
+			// requestor.endReporting();
+			if (monitor != null)
+				monitor.done();
+		}
+	}
+
+	/**
+	 * Searches for matches of a given search pattern. Search patterns can be created
+	 * using factory methods and encapsulate the description of the information to be
+	 * searched for (for example, element declarations of a specified type, in a case
+	 * sensitive manner).
+	 * @param pattern
+	 *            The pattern describing the information to search for
+	 * @param requestor
+	 *            Callback object to notify with the results of the search (each match
+	 *            is reported to {@link SearchRequestor#acceptSearchMatch(SearchMatch)})
+	 * @param scope
+	 *            Optional search scope to limit the source of search candidates;
+	 *            specify <code>null</code> to search the entire workspace
+	 * @param searchOptions
+	 *            Optional map of options and values defining behavior of the search;
+	 *            some options and values are provided by {@link ISearchOptions}
+	 * @param monitor
+	 *            Optional progress monitor used to report work completed
+	 * @exception CoreException
+	 *            if the search fails
+	 */
+	public void search(SearchPattern pattern, SearchRequestor requestor,
+			SearchScope scope, Map searchOptions, IProgressMonitor monitor)
+			throws CoreException
+	{
+		SearchParticipant[] participants =
+			getApplicableParticipants(pattern, searchOptions);
+        //System.out.println("participants = " + participants.length);
+		search(pattern, requestor, participants, scope, searchOptions, monitor);
+	}
+
+	/**
+	 * Queries the set of participants that support searches described by the
+	 * specified search pattern and options.
+	 * @param pattern
+	 *            The pattern describing the information to search for
+	 * @param searchOptions
+	 *            Optional map of options and values defining behavior of the search;
+	 *            some options and values are provided by {@link ISearchOptions}
+	 * @return Array of applicable search participants
+	 */
+	public SearchParticipant[] getApplicableParticipants(SearchPattern pattern,
+			Map searchOptions)
+	{
+		return SearchPlugin.getDefault().loadSearchParticipants(pattern, searchOptions);
+	}
+
+}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchMatch.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchMatch.java
new file mode 100644
index 0000000..11969e5
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchMatch.java
@@ -0,0 +1,156 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.wst.common.core.search;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.Platform;
+
+/**
+ * A search match represents the result of a search query.
+ * <p>
+ * This class is intended to be instantiated and subclassed by clients.
+ * </p>
+ * <p>
+ * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
+ * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
+ * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
+ * (repeatedly) as the API evolves.
+ * </p>
+ * 
+ * @see SearchEngine#search(org.eclipse.wst.common.core.search.pattern.SearchPattern, SearchParticipant[], ISearchScope,
+ *      SearchRequestor, org.eclipse.core.runtime.IProgressMonitor)
+ */
+public class SearchMatch implements IAdaptable
+{
+
+	/**
+	 * Optional resource of the element
+	 */
+	IFile file; // resource where match is found
+
+	/**
+	 * The offset the match starts at, or -1 if unknown
+	 */
+	int offset;
+
+	/**
+	 * The length the length of the match, or -1 if unknown
+	 */
+	int length;
+
+	/**
+	 * Optional element that encloses or corresponds to the match
+	 */
+	Object object;
+
+	/**
+	 * Creates a new search match.
+	 * 
+	 * @param element
+	 *            the element that encloses or corresponds to the match, or
+	 *            <code>null</code> if none
+	 * @param offset
+	 *            the offset the match starts at, or -1 if unknown
+	 * @param length
+	 *            the length of the match, or -1 if unknown
+	 * @param participant
+	 *            the search participant that created the match
+	 * @param resource
+	 *            the resource of the element, or <code>null</code> if none
+	 */
+	public SearchMatch(Object element, int offset, int length, IFile resource)
+	{
+		this.object = element;
+		this.offset = offset;
+		this.length = length;
+		this.file = resource;
+	}
+
+	public IFile getFile()
+	{
+		return file;
+	}
+
+	public void setFile(IFile file)
+	{
+		this.file = file;
+	}
+
+	public int getLength()
+	{
+		return length;
+	}
+
+	public void setLength(int length)
+	{
+		this.length = length;
+	}
+
+	// issue (cs/eb) holding objects is a bit odd, since it implies the object's
+	// life span
+	// is the same as the SearchMatch. What happens when an object is deleted?
+	// does the SearchMatch get deleted? Aren't coordinates good enough?
+	// at the very least we should document that using this field has some
+	// consequences
+	/**
+	 * (eb) see comments for {@link #setObject(Object)}
+	 */
+	public Object getObject()
+	{
+		return object;
+	}
+
+	/**
+	 * @param object
+	 *            Object is an instance of some part of the model that represent
+	 *            the content that was searched. It may require to calculate
+	 *            some additional information that may be required by the tools
+	 *            through {@link #getObject()) (e.g. XML node namespace,
+	 *            nessesary to obtain the prefix for the refactoring tool).
+	 *            <p>
+	 *            There should be no danger here of preventing the object from
+	 *            garbage collection because instances of the search matches
+	 *            supposed to be short lived. {@link SearchMatch} is usually
+	 *            collected by {@link SearchRequestor} which itself is lived for
+	 *            the time of the search and then discarded or re-initialized.
+	 *            Usually the tool that requested a search extracts the
+	 *            information from the collected {@link SearchMatch} and after
+	 *            that {@link SearchMatch} could be garbage collected, releasing
+	 *            object that they hold to.
+	 *            </p>
+	 */
+	public void setObject(Object object)
+	{
+		this.object = object;
+	}
+
+	public int getOffset()
+	{
+		return offset;
+	}
+
+	public void setOffset(int offset)
+	{
+		this.offset = offset;
+	}
+
+	public Object getAdapter(Class adapter)
+	{
+		return Platform.getAdapterManager().getAdapter(this, adapter);
+	}
+    
+    public Map map = new HashMap(); 
+
+}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchParticipant.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchParticipant.java
new file mode 100644
index 0000000..95a0446
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchParticipant.java
@@ -0,0 +1,281 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.wst.common.core.search;
+
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.wst.common.core.search.document.SearchDocument;
+import org.eclipse.wst.common.core.search.document.SearchDocumentSet;
+import org.eclipse.wst.common.core.search.pattern.SearchPattern;
+import org.eclipse.wst.common.core.search.scope.SearchScope;
+
+/**
+ * <p>
+ * A search participant describes a particular extension to a generic search
+ * mechanism, permitting combined search actions which will involve all required
+ * participants.
+ * </p>
+ * <p>
+ * When there is a need to search a document that has some mixed content, then
+ * using a one participant will not be enough. E.g. for the searching of the JSP
+ * content, a JSP participant needs to create {@link SearchDocument} that
+ * contain Java compilation unit and then pass it to the default Java search
+ * participant of the Java Search Engine. The same with XML: when there is an
+ * XML content that default search participant could not process, but it is
+ * required to be search on, a new search participant needs to be defined. That
+ * search participant would know how create search document from the content and
+ * then it can call default XML search participant.
+ * </p>
+ * <p>
+ * Passing its own {@link SearchRequestor} this participant can then map the
+ * match positions back to the original contents, create its own matches and
+ * report them to the original requestor.
+ * </p>
+ * <p>
+ * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
+ * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
+ * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
+ * (repeatedly) as the API evolves.
+ * </p>
+ * 
+ */
+public abstract class SearchParticipant implements ISearchOptions 
+{
+
+	protected static final boolean debugPerf = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.wst.common.core/perf")); //$NON-NLS-1$ //$NON-NLS-2$
+
+	protected String id;
+	/**
+	 * Creates a new search participant.
+	 */
+	protected SearchParticipant()
+	{
+		// do nothing
+	}
+
+	/**
+	 * Callback method allowing a search participant to indicate whether it supports
+	 * the specified search pattern and options.
+	 * <p>
+	 * If this method returns <code>true</code>, the participant will participate in
+	 * finding matches for the search defined by the search pattern. In this case, the
+	 * search pattern and options will be passed to the following methods of the
+	 * search participant:
+	 * <ol>
+	 * <li>{@link #beginSearching(SearchPattern, Map)}
+	 * <li>{@link #selectDocumentLocations(SearchPattern, SearchScope, Map, IProgressMonitor)}
+	 * <li>{@link #createSearchDocuments(SearchDocumentSet, SearchPattern, SearchScope, Map, IProgressMonitor)}
+	 * <li>{@link #locateMatches(SearchDocumentSet, SearchPattern, SearchScope, SearchRequestor, Map, IProgressMonitor)}
+	 * <li>{@link #doneSearching(SearchPattern, Map)}
+	 * </ol>
+	 * <p>
+	 * If this method returns <code>false</code>, none of the above methods will be
+	 * called, and the search participant contributes no matches for the search
+	 * requrest.
+	 * <p>
+	 * A search participant should only participate in a search when in understands
+	 * the search pattern. Unrecognized search options, however, can be ignored.
+	 * <p>
+	 * This method returns <code>false</code> by default. As a result, subclasses must
+	 * override this method to participate in any searches.
+	 * @param pattern The pattern describing the information to search for
+	 * @param searchOptions Map of options and values defining behavior of the search;
+	 *         <code>null</code> if no options are specified;
+	 *         some options and values are provided by {@link ISearchOptions}
+	 * @return <code>true</code> if the search participant will participate in the
+	 *         search request; <code>false</code> otherwise
+	 */
+	 public abstract boolean isApplicable(SearchPattern pattern, Map searchOptions);
+
+	/**
+	 * Notification that this participant's help is needed in a search.
+	 * <p>
+	 * This method should be re-implemented in subclasses that need to do
+	 * something when the participant is needed in a search.
+	 * </p>
+	 * @param pattern The pattern describing the information to search for
+	 * @param searchOptions Map of options and values defining behavior of the search;
+	 *         <code>null</code> if no options are specified;
+	 *         some options and values are provided by {@link ISearchOptions}
+	 */
+	public void beginSearching(SearchPattern pattern, Map searchOptions)
+	{
+		// do nothing
+	}
+
+	/**
+	 * Notification that this participant's help is no longer needed.
+	 * <p>
+	 * This method should be re-implemented in subclasses that need to do
+	 * something when the participant is no longer needed in a search.
+	 * </p>
+	 * @param pattern
+	 *            The pattern describing the information to search for
+	 * @param searchOptions
+	 *            Map of options and values defining behavior of the search;
+	 *            <code>null</code> if no options are specified;
+	 *            some options and values are provided by {@link ISearchOptions}
+	 */
+	public void doneSearching(SearchPattern pattern, Map searchOptions)
+	{
+		// do nothing
+	}
+	
+	/**
+	 * Returns a displayable name of this search participant.
+	 * <p>
+	 * This method should be re-implemented in subclasses that need to display a
+	 * meaningfull name.
+	 * </p>
+	 * 
+	 * @return the displayable name of this search participant
+	 */
+	public String getDescription()
+	{
+		return "Search participant"; //$NON-NLS-1$
+	}
+
+	/**
+	 * Returns a search document for the given path. The given document path is
+	 * a string that uniquely identifies the document. Most of the time it is a
+	 * workspace-relative path, but it can also be a file system path, or a path
+	 * inside a zip file.
+	 * <p>
+	 * Implementors of this method can either create an instance of their own
+	 * subclass of {@link SearchDocument} or return an existing instance of such
+	 * a subclass.
+	 * </p>
+	 * 
+	 * @param documentPath
+	 *            the path of the document.
+	 * @return a search document
+	 */
+	public abstract SearchDocument createSearchDocument(String documentPath);
+
+	/**
+	 * Locates the matches in the given documents. This method should be called
+	 * by the other search participant or search client once it has
+	 * pre-processed documents and delegating search to this search participant.
+	 * @param documentSet
+	 *            The documents to locate matches in
+	 * @param pattern
+	 *            The pattern describing the information to search for
+	 * @param scope
+	 *            Search scope to limit the source of search candidates;
+	 *            <code>null</code> indicates that the entire workspace is to be
+	 *            searched
+	 * @param requestor
+	 *            Callback object to notify with the results of the search (each match
+	 *            is reported to {@link SearchRequestor#acceptSearchMatch(SearchMatch)})
+	 * @param searchOptions
+	 *            Map of options and values defining behavior of the search;
+	 *            <code>null</code> if no options are specified;
+	 *            some options and values are provided by {@link ISearchOptions}
+	 * @param monitor
+	 *            Progress monitor used to report work completed; <code>null</code>
+	 *            if no progress needs to be reported
+	 * @throws CoreException
+	 *            If the requestor had problem accepting one of the matches
+	 */
+	public abstract void locateMatches(SearchDocumentSet documentSet,
+			SearchPattern pattern, SearchScope scope,
+			SearchRequestor requestor, Map searchOptions, IProgressMonitor monitor)
+			throws CoreException;
+
+	/**
+	 * 
+	 * @param document
+	 * @param pattern
+	 */
+	public abstract void populateSearchDocument(SearchDocument document,
+			SearchPattern pattern);
+
+	/**
+	 * Returns the collection of document locations to consider when performing
+	 * the given search query in the given scope. The search engine calls this
+	 * method before locating matches.
+	 * <p>
+	 * An document location represents a path workspace to the file with the
+	 * content that has potential matches
+	 * </p>
+	 * <p>
+	 * Clients are not expected to call this method.
+	 * </p>
+	 * @param pattern
+	 *            The pattern describing the information to search for
+	 * @param scope
+	 *            Search scope to limit the source of search candidates;
+	 *            <code>null</code> indicates that the entire workspace is to be
+	 *            searched
+	 * @param searchOptions
+	 *            Map of options and values defining behavior of the search;
+	 *            <code>null</code> if no options are specified;
+	 *            some options and values are provided by {@link ISearchOptions}
+	 * @param monitor
+	 *            Progress monitor used to report work completed; <code>null</code>
+	 *            if no progress needs to be reported
+	 * @return the collection of document paths to consider
+	 */
+	public SearchScope selectDocumentLocations(SearchPattern pattern,
+			SearchScope scope, Map searchOptions, IProgressMonitor monitor)
+	{	
+		return scope;
+	}
+
+	/**
+	 * <p>
+	 * This method calls the following methods for each file in the search scope:
+	 * <ol>
+	 * <li>{@link #createSearchDocument(String)}
+	 * <li>{@link #populateSearchDocument(SearchDocument, SearchPattern)}
+	 * </ol>
+	 * @param documentSet
+	 *            The documents to locate matches in
+	 * @param pattern
+	 *            The pattern describing the information to search for
+	 * @param scope
+	 *            Search scope to limit the source of search candidates;
+	 *            <code>null</code> indicates that the entire workspace is to be
+	 *            searched
+	 * @param searchOptions
+	 *            Map of options and values defining behavior of the search;
+	 *            <code>null</code> if no options are specified;
+	 *            some options and values are provided by {@link ISearchOptions}
+	 * @param monitor
+	 *            Progress monitor used to report work completed; <code>null</code>
+	 *            if no progress needs to be reported
+	 */
+	public void createSearchDocuments(SearchDocumentSet documentSet,
+			SearchPattern pattern, SearchScope scope, Map searchOptions,
+			IProgressMonitor monitor)
+	{
+		Assert.isNotNull(id, "The SearchPartipants id has not been initalized");
+		IFile[] files = scope.enclosingFiles();
+		
+		for (int i = 0; i < files.length; i++)
+		{
+			String location = files[i].getLocation().toString();
+			SearchDocument document = documentSet.getSearchDocument(location, id);
+			if(document == null && id != null){
+				documentSet.putSearchDocument(id, document = createSearchDocument(location));
+			}
+			populateSearchDocument(document, pattern); 
+			
+		}
+
+	}	
+}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchPlugin.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchPlugin.java
new file mode 100644
index 0000000..cf7a9fc
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchPlugin.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.wst.common.core.search;
+
+import java.util.Map;
+
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.wst.common.core.search.internal.SearchParticipantRegistry;
+import org.eclipse.wst.common.core.search.internal.SearchParticipantRegistryReader;
+import org.eclipse.wst.common.core.search.pattern.SearchPattern;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The main plugin class to be used in the desktop.
+ * <p>
+ * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
+ * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
+ * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
+ * (repeatedly) as the API evolves.
+ * </p>
+ */
+public class SearchPlugin extends Plugin implements ISearchOptions
+{
+
+	private SearchParticipantRegistry searchParticipantRegistry;
+
+	// The shared instance.
+	private static SearchPlugin plugin;
+
+	/**
+	 * The constructor.
+	 */
+	public SearchPlugin()
+	{
+		plugin = this;
+	}
+
+	/**
+	 * This method is called upon plug-in activation
+	 */
+	public void start(BundleContext context) throws Exception
+	{
+		super.start(context);
+	}
+
+	/**
+	 * This method is called when the plug-in is stopped
+	 */
+	public void stop(BundleContext context) throws Exception
+	{
+		super.stop(context);
+		plugin = null;
+	}
+
+	/**
+	 * Returns the shared instance.
+	 */
+	public static SearchPlugin getDefault()
+	{
+		return plugin;
+	}
+
+	private SearchParticipantRegistry getSearchParticipantRegistry()
+	{
+		if (searchParticipantRegistry == null)
+		{
+			searchParticipantRegistry = new SearchParticipantRegistry();
+			new SearchParticipantRegistryReader(searchParticipantRegistry)
+					.readRegistry();
+		}
+		return searchParticipantRegistry;
+	}
+
+
+	public SearchParticipant getSearchParticipant(String id)
+	{
+		return getSearchParticipantRegistry().getSearchParticipant(id);
+	}
+
+	/**
+	 * Returns the registered search participants that support the specified search
+	 * pattern and options, loading and creating the search participants if necessary.
+	 * @param pattern The pattern representing a search request
+	 * @param searchOptions Map of options and values defining behavior of the search;
+	 *         <code>null</code> if no options are specified;
+	 *         some options and values are provided by {@link ISearchOptions}
+	 * @return Array of search participants that support the specified search request 
+	 */
+	SearchParticipant[] loadSearchParticipants(SearchPattern pattern, Map searchOptions)
+	{
+		return getSearchParticipantRegistry().getParticipants(pattern, searchOptions);
+	}
+
+}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchRequestor.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchRequestor.java
new file mode 100644
index 0000000..460b589
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchRequestor.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.wst.common.core.search;
+
+import org.eclipse.core.runtime.CoreException;
+
+/**
+ * Collects the results from a search engine query. Clients implement a subclass
+ * to pass to <code>SearchEngine.search</code> and implement the
+ * {@link #acceptSearchMatch(SearchMatch)} method.
+ * <p>
+ * The subclasses of the SearchRequestor could collected search matches, filter,
+ * sort and group them. It's up to the client to pass the required extension of
+ * the SearchRequestor to the search engine.
+ * </p>
+ * <p>
+ * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
+ * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
+ * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
+ * (repeatedly) as the API evolves.
+ * </p>
+ * 
+ * @see SearchEngine
+ */
+public abstract class SearchRequestor
+{
+
+	/**
+	 * Accepts the given search match.
+	 * 
+	 * @param match
+	 *            the found match
+	 * @throws CoreException
+	 */
+	public abstract void acceptSearchMatch(SearchMatch match)
+			throws CoreException;
+
+}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/ComponentDeclarationEntry.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/ComponentDeclarationEntry.java
new file mode 100644
index 0000000..f193937
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/ComponentDeclarationEntry.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.wst.common.core.search.document;
+
+import org.eclipse.wst.common.core.search.pattern.QualifiedName;
+
+/**
+ * 
+ * <p>
+ * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
+ * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
+ * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
+ * (repeatedly) as the API evolves.
+ * </p>
+ *
+ */
+public class ComponentDeclarationEntry extends Entry
+{
+	QualifiedName metaName;
+    QualifiedName name;
+
+	public QualifiedName getName()
+	{
+		return name;
+	}
+
+	public void setName(QualifiedName name)
+	{
+		this.name = name;
+	}
+
+  public QualifiedName getMetaName()
+  {
+    return metaName;
+  }
+
+  public void setMetaName(QualifiedName metaName)
+  {
+    this.metaName = metaName;
+  }
+}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/ComponentReferenceEntry.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/ComponentReferenceEntry.java
new file mode 100644
index 0000000..d532f26
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/ComponentReferenceEntry.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.wst.common.core.search.document;
+
+import org.eclipse.wst.common.core.search.pattern.QualifiedName;
+
+/**
+ * 
+ * <p>
+ * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
+ * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
+ * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
+ * (repeatedly) as the API evolves.
+ * </p>
+ *
+ */
+public class ComponentReferenceEntry extends Entry
+{
+	QualifiedName name;
+
+	public QualifiedName getName()
+	{
+		return name;
+	}
+
+	public void setName(QualifiedName name)
+	{
+		this.name = name;
+	}
+}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/Entry.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/Entry.java
new file mode 100644
index 0000000..acd10a6
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/Entry.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.wst.common.core.search.document;
+
+/**
+ * 
+ * <p>
+ * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
+ * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
+ * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
+ * (repeatedly) as the API evolves.
+ * </p>
+ *
+ */
+public class Entry
+{
+  String key;
+  String category;
+
+	public Entry()
+{
+	super();
+	
+}
+
+	public String getCategory()
+	{
+		return category;
+	}
+
+	
+
+	public String getKey()
+	{
+		return key;
+	}
+
+	public void setCategory(String category)
+	{
+		this.category = category;
+	}
+
+	public void setKey(String key)
+	{
+		this.key = key;
+	}
+
+	
+}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/FileReferenceEntry.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/FileReferenceEntry.java
new file mode 100644
index 0000000..2789503
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/FileReferenceEntry.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.wst.common.core.search.document;
+
+/**
+ * <p>
+ * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
+ * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
+ * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
+ * (repeatedly) as the API evolves.
+ * </p>
+ *
+ */
+public class FileReferenceEntry extends Entry
+{
+	String relativeFilePath;
+    String resolvedURI;
+	String publicIdentifier;
+
+	public String getPublicIdentifier()
+	{
+		return publicIdentifier;
+	}
+
+	public void setPublicIdentifier(String publicIdentifier)
+	{
+		this.publicIdentifier = publicIdentifier;
+	}
+
+	public String getRelativeFilePath()
+	{
+		return relativeFilePath;
+	}
+
+	public void setRelativeFilePath(String relativeFilePath)
+	{
+		this.relativeFilePath = relativeFilePath;
+	}
+
+  public String getResolvedURI()
+  {
+    return resolvedURI;
+  }
+
+  public void setResolvedURI(String resolvedURI)
+  {
+    this.resolvedURI = resolvedURI;
+  }
+}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/SearchDocument.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/SearchDocument.java
new file mode 100644
index 0000000..d9bfcb9
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/SearchDocument.java
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.wst.common.core.search.document;
+
+import org.eclipse.wst.common.core.search.SearchParticipant;
+
+/**
+ * A search document encapsulates a content to be searched in. A search
+ * participant creates a search document based on the file locations to locate
+ * matches.
+ * <p>
+ * This class is intended to be subclassed by clients.
+ * </p>
+ * issue (cs/eb) does a search participant always create a SearchDocument?
+ * 
+ * <p>
+ * SearchParticipant or search client create search documents for the search
+ * pass where precise locations of the matches will be determined by calling
+ * {@link SearchParticipan#locateMatches}
+ * </p>
+ * <p>
+ * SearchParticipant knows how to create search document that it can process.
+ * </p>
+ * <p>
+ * The intent of the separation of the {@link SearchDocument} from the
+ * {@link SearchParticipant} is to enable the other search participants to
+ * process parts of the document. For example, if XML document has a fragment
+ * that it can not process, e.g. Java, then XML participant would create
+ * SearchDocument for that fragment which contains Java compilation unit, and
+ * pass it to the Java search participant. Passing its own
+ * {@link org.eclipse.wst.common.core.search.SearchRequestor} this participant can then map the match positions
+ * back to the original contents, create its own matches and report them to the
+ * original requestor.
+ * </p>
+ * <p>
+ * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
+ * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
+ * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
+ * (repeatedly) as the API evolves.
+ * </p>
+ * 
+ * @see SearchParticipant
+ */
+public abstract class SearchDocument
+{
+
+	private String documentPath;
+	private SearchParticipant participant; 
+
+	/**
+	 * Creates a new search document. The given document path is a string that
+	 * uniquely identifies the document. Most of the time it is a
+	 * workspace-relative path, but it can also be a file system path, or a path
+	 * inside a zip file.
+	 * 
+	 * @param documentPath
+	 *            the path to the document, or <code>null</code> if none
+	 */
+	protected SearchDocument(String documentPath, SearchParticipant participant)
+	{
+		this.documentPath = documentPath;
+		this.participant = participant;
+	}
+
+	public abstract Entry[] getEntries(String category, String key, int matchRule);
+
+	/**
+	 * Returns the model of this document. Model may be different from actual
+	 * resource at corresponding document path due to preprocessing.
+	 * <p>
+	 * This method must be implemented in subclasses.
+	 * </p>
+	 * 
+	 * @return the model of this document, or <code>null</code> if none
+	 */
+	public abstract Object getModel();
+	
+	
+	/**
+	 * Returns the participant that created this document.
+	 * 
+	 * @return the participant that created this document
+	 */
+	public final SearchParticipant getParticipant() {
+		return this.participant;
+	}
+	
+	
+//	 this class represents a collection of information
+//	 that has been produced by a search participant
+//	 typically after a file has been processed
+//	 an Entry is typically course grained info that results from the SearchParticipants
+//	 first step ... and is used to compute more accurate SearchMatches during a SearchParticipants 2nd step
+
+	/**
+	 * Returns the path to the original document.
+	 * 
+	 * @return the path to the document
+	 */
+	public final String getPath()
+	{
+		return this.documentPath;
+	} 
+	
+	public abstract void putEntry(Entry entry);
+    
+    public void dispose()
+    {      
+    }
+}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/SearchDocumentSet.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/SearchDocumentSet.java
new file mode 100644
index 0000000..42fb34c
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/SearchDocumentSet.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.wst.common.core.search.document;
+
+/**
+ * The class is used to manage a set of search documents
+ * that have been constructed by various participants
+ * 
+ * <p>
+ * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
+ * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
+ * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
+ * (repeatedly) as the API evolves.
+ * </p>
+ *
+ */
+public abstract class SearchDocumentSet
+{
+  public abstract SearchDocument getSearchDocument(String resourcePath, String participantId);
+  public abstract SearchDocument[] getSearchDocuments(String participantId);
+  public abstract void putSearchDocument(String participantId, SearchDocument document);
+  public abstract SearchDocument _tempGetSearchDocumetn(String resourcePath);
+  public abstract void dispose();
+}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/Messages.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/Messages.java
new file mode 100644
index 0000000..cc3522b
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/Messages.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.wst.common.core.search.internal;
+
+import org.eclipse.osgi.util.NLS;
+
+// issue (cs) is this a UI issue?  where does the framework need to expose stings?
+public class Messages extends NLS
+{
+
+	private static final String BUNDLE_NAME = "org.eclipse.wst.common.core.internal.messages";//$NON-NLS-1$
+
+	public static String engine_searching;
+
+	public static String engine_searching_locatingDocuments;
+
+	public static String engine_searching_matching;
+
+	private Messages()
+	{
+		// Do not instantiate
+	}
+
+	static
+	{
+		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+	}
+}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/SearchDocumentSetImpl.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/SearchDocumentSetImpl.java
new file mode 100644
index 0000000..e3f6c33
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/SearchDocumentSetImpl.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.wst.common.core.search.internal;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.wst.common.core.search.document.SearchDocument;
+import org.eclipse.wst.common.core.search.document.SearchDocumentSet;
+
+public class SearchDocumentSetImpl extends SearchDocumentSet
+{
+    public Map documentPathMap = new HashMap(); //path --> documetn
+	Map documentMap = new HashMap();  // participantId - > list (document)
+	
+	public SearchDocumentSetImpl()
+	{
+		super();
+	}
+    
+    public SearchDocument _tempGetSearchDocumetn(String resourcePath)
+    {      
+       return (SearchDocument)documentPathMap.get(resourcePath);      
+    }
+    
+    public SearchDocument getSearchDocument(String resourcePath, String participantId)
+	{
+		if(resourcePath == null){
+			return null;
+		}
+		SearchDocument[] documents = getSearchDocuments(participantId);
+		for (int i = 0; i < documents.length; i++)
+		{
+			SearchDocument document = documents[i];
+			if(resourcePath.equals(document.getPath())){
+				return document;
+			}
+		}
+		return null;
+	}
+
+	public SearchDocument[] getSearchDocuments(String participantId)
+	{
+		
+		Object object = documentMap.get(participantId);
+		List documentList = null;
+		if(object instanceof List){
+			documentList = (List)object;
+		}
+		else{
+			documentMap.put(participantId, documentList = new ArrayList());
+		}
+		return (SearchDocument[]) documentList.toArray(new SearchDocument[documentList.size()]);
+		
+	}
+
+	public void putSearchDocument(String participantId, SearchDocument document)
+	{
+		Object object = documentMap.get(participantId);
+		List documentList = null;
+		if(object instanceof List){
+			documentList = (List)object;
+		}
+		else{
+			documentMap.put(participantId, documentList = new ArrayList());
+		}
+		documentList.add(document);
+        documentPathMap.put(document.getPath(), document);
+	}
+
+    
+    public void dispose()
+    {
+      try
+      {
+      for (Iterator i = documentMap.values().iterator(); i.hasNext(); )
+      {
+        Object o = i.next();
+        if (o instanceof List)
+        {  
+          for (Iterator j = ((List)o).iterator(); j.hasNext(); )
+          {
+            Object o2 = j.next();
+            if (o2 instanceof SearchDocument)
+            {  
+               SearchDocument searchDocument = (SearchDocument)o2;
+               searchDocument.dispose();
+            }   
+          }          
+        }       
+      }
+      }
+      catch (Exception e)
+      {
+        e.printStackTrace();
+      }
+    }
+
+}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/SearchParticipantDescriptor.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/SearchParticipantDescriptor.java
new file mode 100644
index 0000000..8e39e12
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/SearchParticipantDescriptor.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.wst.common.core.search.internal;
+
+import org.eclipse.core.expressions.EvaluationResult;
+import org.eclipse.core.expressions.Expression;
+import org.eclipse.core.expressions.ExpressionConverter;
+import org.eclipse.core.expressions.ExpressionTagNames;
+import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.core.runtime.Assert; 
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.wst.common.core.search.SearchParticipant;
+
+public class SearchParticipantDescriptor
+{
+
+	private IConfigurationElement fElement;
+
+	private SearchParticipant participant;
+
+	public SearchParticipantDescriptor(IConfigurationElement element)
+	{
+		this.fElement = element;
+	}
+
+	public SearchParticipant getSearchParticipant()
+	{
+		if (participant == null)
+		{
+			try
+			{
+				participant = (SearchParticipant) fElement
+						.createExecutableExtension("class"); //$NON-NLS-1$
+			} catch (Exception e)
+			{
+				// e.printStackTrace();
+			}
+		}
+		return participant;
+	}
+
+	public boolean matches(IEvaluationContext context) throws CoreException
+	{
+		IConfigurationElement[] elements = fElement
+				.getChildren(ExpressionTagNames.ENABLEMENT);
+		if (elements.length == 0)
+			return false;
+		Assert.isTrue(elements.length == 1);
+		Expression exp = ExpressionConverter.getDefault().perform(elements[0]);
+		return convert(exp.evaluate(context));
+	}
+
+	private boolean convert(EvaluationResult eval)
+	{
+		if (eval == EvaluationResult.FALSE)
+			return false;
+		return true;
+	}
+
+	/**
+	 * @deprecated No replacement
+	 */
+	public String[] getSupportedContentTypes()
+	{
+		return new String[0];
+	}
+
+	/**
+	 * @deprecated No replacement
+	 */
+	public void addSupportedContentTypeId(String contentTypeId)
+	{
+	}
+	
+	public String getElementId(){
+		return fElement.getAttribute("id");
+		
+	}
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/SearchParticipantRegistry.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/SearchParticipantRegistry.java
new file mode 100644
index 0000000..a169e91
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/SearchParticipantRegistry.java
@@ -0,0 +1,116 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.wst.common.core.search.internal;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import org.eclipse.core.expressions.EvaluationContext;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.wst.common.core.search.SearchParticipant;
+import org.eclipse.wst.common.core.search.pattern.SearchPattern;
+
+public class SearchParticipantRegistry
+{
+
+	protected Map idMap = new HashMap(); // maps searchParticipant id to a
+											// searchParticipant descriptor
+
+	public SearchParticipantRegistry()
+	{
+	}
+
+	public void putSearchParticipant(String id,
+			SearchParticipantDescriptor searchParticipantDescriptor)
+	{
+		idMap.put(id, searchParticipantDescriptor);
+	}
+
+	public String[] getSearchParticipantIds()
+	{
+		Set ids = idMap.keySet();
+		return (String[]) ids.toArray(new String[ids.size()]);
+	}
+
+	public Collection getSearchParticipants()
+	{
+		return idMap.values();
+	}
+
+
+	public SearchParticipant getSearchParticipant(String id)
+	{
+		SearchParticipantDescriptor searchParticipantDescriptor = null;
+		if (id != null)
+		{
+			searchParticipantDescriptor = (SearchParticipantDescriptor) idMap
+					.get(id);
+		}
+		return searchParticipantDescriptor != null ? searchParticipantDescriptor
+				.getSearchParticipant()
+				: null;
+
+	}
+
+	public SearchParticipant[] getParticipants(SearchPattern pattern, Map searchOptions)
+	{
+
+		EvaluationContext evalContext = createEvaluationContext(pattern);
+		List result = new ArrayList();
+		for (Iterator iter = getSearchParticipants().iterator(); iter.hasNext();)
+		{
+			SearchParticipantDescriptor descriptor = (SearchParticipantDescriptor) iter
+					.next();
+			try
+			{
+				if (descriptor.matches(evalContext))
+				{
+					try
+					{
+						SearchParticipant participant = descriptor
+								.getSearchParticipant();
+						if (!SearchParticipant.class.isInstance(participant))
+							throw new ClassCastException();
+						if (participant.isApplicable(pattern, searchOptions))
+						{
+							result.add(participant);
+						}
+					} catch (ClassCastException e)
+					{
+						iter.remove();
+					}
+				}
+
+			} catch (CoreException e)
+			{
+				iter.remove();
+			}
+
+		}
+
+		return (SearchParticipant[]) result
+				.toArray(new SearchParticipant[result.size()]);
+	}
+
+	private static EvaluationContext createEvaluationContext(
+			SearchPattern pattern)
+	{
+		EvaluationContext result = new EvaluationContext(null, pattern);
+		result.addVariable("pattern", pattern); //$NON-NLS-1$
+		return result;
+	}
+
+}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/SearchParticipantRegistryReader.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/SearchParticipantRegistryReader.java
new file mode 100644
index 0000000..7757ce3
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/SearchParticipantRegistryReader.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.wst.common.core.search.internal;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.Platform;
+
+public class SearchParticipantRegistryReader
+{
+	protected static final String EXTENSION_POINT_ID = "searchParticipants"; //$NON-NLS-1$
+
+	protected static final String TAG_NAME = "searchParticipant"; //$NON-NLS-1$
+
+	protected static final String ATT_CLASS = "class"; //$NON-NLS-1$
+
+	protected static final String ATT_ID = "id"; //$NON-NLS-1$
+
+	protected String pluginId, extensionPointId;
+
+	protected SearchParticipantRegistry registry;
+
+	public SearchParticipantRegistryReader(SearchParticipantRegistry registry)
+	{
+		this.registry = registry;
+	}
+
+	public void readRegistry()
+	{
+		String bundleid = "org.eclipse.wst.common.core"; //$NON-NLS-1$
+		IExtensionPoint point = Platform.getExtensionRegistry()
+				.getExtensionPoint(bundleid, EXTENSION_POINT_ID);
+		if (point != null)
+		{
+			IConfigurationElement[] elements = point.getConfigurationElements();
+			for (int i = 0; i < elements.length; i++)
+			{
+				readElement(elements[i]);
+			}
+		}
+	}
+
+	protected void readElement(IConfigurationElement element)
+	{
+		if (element.getName().equals(TAG_NAME))
+		{
+			String contributorClass = element.getAttribute(ATT_CLASS);
+			String id = element.getAttribute(ATT_ID);
+			if (id != null)
+			{
+				if (contributorClass != null)
+				{
+					SearchParticipantDescriptor descriptor = new SearchParticipantDescriptor(
+							element);
+					registry.putSearchParticipant(id, descriptor);
+				}
+			}
+		}
+	}
+}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/messages.properties b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/messages.properties
new file mode 100644
index 0000000..e3a01a8
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/messages.properties
@@ -0,0 +1,15 @@
+###############################################################################
+# Copyright (c) 2005, 2006 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
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+### Search messages.
+
+engine_searching = Searching...
+engine_searching_locatingDocuments = {0}: locate search documents...
+engine_searching_matching = {0}: locate matches...
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/ComponentDeclarationPattern.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/ComponentDeclarationPattern.java
new file mode 100644
index 0000000..16f3ffe
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/ComponentDeclarationPattern.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.wst.common.core.search.pattern;
+
+/**
+ *
+ * <p>
+ * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
+ * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
+ * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
+ * (repeatedly) as the API evolves.
+ * </p>
+ *
+ */
+public class ComponentDeclarationPattern extends ComponentSearchPattern
+{
+
+	public ComponentDeclarationPattern(QualifiedName name,
+			QualifiedName metaName, int matchRule)
+	{
+		super(null, name, metaName, matchRule);
+
+	}
+
+	public ComponentDeclarationPattern(QualifiedName name,
+			QualifiedName metaName)
+	{
+		super(null, name, metaName);
+	}
+
+}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/ComponentReferencePattern.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/ComponentReferencePattern.java
new file mode 100644
index 0000000..2f1e101
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/ComponentReferencePattern.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.wst.common.core.search.pattern;
+
+import org.eclipse.core.resources.IFile;
+
+/**
+ * 
+ * <p>
+ * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
+ * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
+ * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
+ * (repeatedly) as the API evolves.
+ * </p>
+ *
+ */
+public class ComponentReferencePattern extends ComponentSearchPattern
+{
+
+	public ComponentReferencePattern(IFile file, QualifiedName elementQName,
+			QualifiedName typeQName, int matchRule)
+	{
+		super(file, elementQName, typeQName, matchRule);
+
+	}
+
+	public ComponentReferencePattern(IFile file, QualifiedName elementQName,
+			QualifiedName typeQName)
+	{
+		super(file, elementQName, typeQName);
+
+	}
+
+}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/ComponentSearchPattern.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/ComponentSearchPattern.java
new file mode 100644
index 0000000..4741a10
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/ComponentSearchPattern.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.wst.common.core.search.pattern;
+
+import org.eclipse.core.resources.IFile;
+
+/**
+ * This class defines generic component pattern. Usually there are two types of
+ * component search patterns: pattern for component declaration and for
+ * component definition.
+ * 
+ * <p>
+ * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
+ * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
+ * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
+ * (repeatedly) as the API evolves.
+ * </p>
+ */
+public abstract class ComponentSearchPattern extends SearchPattern
+{
+
+	QualifiedName name;
+
+	QualifiedName metaName;
+
+	IFile file; // (optional) location where component is defined
+
+	public ComponentSearchPattern(IFile file, QualifiedName elementQName,
+			QualifiedName typeQName, int matchRule)
+	{
+		super(matchRule);
+		this.file = file;
+		name = elementQName;
+		metaName = typeQName;
+
+	}
+
+	public ComponentSearchPattern(IFile file, QualifiedName elementQName,
+			QualifiedName typeQName)
+	{
+
+		this.file = file;
+		name = elementQName;
+		metaName = typeQName;
+
+	}
+
+	public IFile getFile()
+	{
+		return file;
+	}
+
+	public QualifiedName getMetaName()
+	{
+		return metaName;
+	}
+
+	public QualifiedName getName()
+	{
+		return name;
+	}
+
+}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/FileReferencePattern.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/FileReferencePattern.java
new file mode 100644
index 0000000..27c1165
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/FileReferencePattern.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.wst.common.core.search.pattern;
+
+import org.eclipse.core.resources.IFile;
+
+/**
+ * 
+ * <p>
+ * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
+ * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
+ * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
+ * (repeatedly) as the API evolves.
+ * </p>
+ *
+ */
+public class FileReferencePattern extends SearchPattern
+{
+
+	IFile file;
+
+	public FileReferencePattern(IFile file)
+	{
+		this.file = file;
+	}
+
+	public FileReferencePattern(IFile file, int matchRule)
+	{
+		super(matchRule);
+		this.file = file;
+	}
+
+}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/QualifiedName.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/QualifiedName.java
new file mode 100644
index 0000000..0f7ab17
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/QualifiedName.java
@@ -0,0 +1,226 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.wst.common.core.search.pattern;
+
+/**
+ * This data class represents a qualified name, consisting of a local name and a
+ * qualifier
+ * 
+ * <p>
+ * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
+ * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
+ * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
+ * (repeatedly) as the API evolves.
+ * </p>
+ */
+// issue (cs) should this go in the 'matching' package (BTW... rename
+// matching->pattern)
+public class QualifiedName
+{
+
+	private String qualifier;
+
+	private String name;
+
+	private static final String NS_DELIM_1 = "{"; //$NON-NLS-1$
+
+	private static final String NS_DELIM_2 = "}"; //$NON-NLS-1$
+
+	/**
+	 * Constructor Creates a qualified name from a namespace and local name.
+	 * 
+	 * @param namespace
+	 * @param localName
+	 */
+	public QualifiedName(String namespace, String localName)
+	{
+
+		super();
+
+		this.qualifier = namespace;
+		if (namespace != null && namespace.length() == 0)
+		{
+			this.qualifier = null;
+		}
+		if (this.qualifier != null && this.qualifier.length() == 0)
+		{
+			this.qualifier = null;
+		}
+
+		this.name = localName;
+		if (localName != null && localName.length() == 0)
+		{
+			this.name = null;
+		}
+
+	}
+
+	/**
+	 * Returns the namespace component of the qualified name.
+	 * 
+	 * @return The namespace; <code>null</code> if none is specified
+	 */
+	public String getNamespace()
+	{
+		return this.qualifier;
+	}
+
+	/**
+	 * Returns the local name component of the qualified name.
+	 * 
+	 * @return The local name; <code>null</code> if none is specified
+	 */
+	public String getLocalName()
+	{
+		return this.name;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Object#equals(java.lang.Object)
+	 */
+	public boolean equals(Object obj)
+	{
+		boolean isEqual = false;
+		if (this == obj)
+		{
+		  isEqual = true;
+		}
+		else
+		{	
+		  if (obj instanceof QualifiedName)
+		  {
+			QualifiedName that = (QualifiedName) obj;
+		    isEqual = isMatch(this.getNamespace(), that.getNamespace()) &&
+		              isMatch(this.getLocalName(), that.getLocalName());	
+		  }  
+		}
+		return isEqual;
+	}
+	
+	protected boolean isMatch(String a, String b)
+	{
+	  return a != null ? a.equals(b) : a == b;
+	}	
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Object#hashCode()
+	 */
+	public int hashCode()
+	{
+		int hash = 0;
+		if (this.qualifier != null)
+		{
+			hash += this.qualifier.hashCode();
+		}
+		if (this.name != null)
+		{
+			hash += this.name.hashCode();
+		}
+		return hash;
+	}
+
+	/**
+	 * Returns a string representation of the qualified name, of the form:
+	 * {namespace}localname. If no namespace is specified, the string has the
+	 * form: {}localname. Note that the string format may change in the future.
+	 * 
+	 * @return The string value
+	 */
+	public String toString()
+	{
+
+		return appendStrings(new String[]
+		{ NS_DELIM_1, // {
+				this.qualifier, NS_DELIM_2, // }
+				this.name });
+
+	}
+
+	/**
+	 * Factory-like method to create a QName object from the string form of a
+	 * QName. The string must have the same format as returned by
+	 * QName.toString().
+	 * 
+	 * @param qnameString -
+	 *            String form of a QName
+	 * @return The created QName object created from the specified string
+	 * @throws IllegalArgumentException -
+	 *             Missing namespace delimiters
+	 */
+	public static QualifiedName valueOf(String qnameString)
+			throws IllegalArgumentException
+	{
+
+		String namespace = null;
+		String localName = null;
+		if (qnameString == null || qnameString.length() == 0)
+		{
+			// Both namespace and local name are null.
+		} else if (qnameString.startsWith(NS_DELIM_1))
+		{
+			// The QName has the notation specifying a namespace.
+			int index = qnameString.indexOf(NS_DELIM_2);
+			if (index == -1)
+			{
+				// The end delimiter for the namespace was not found. The QName
+				// string
+				// is malformed.
+				throw new IllegalArgumentException(
+						"qnameString = " + qnameString); //$NON-NLS-1$
+			}
+			namespace = qnameString.substring(1, index);
+			localName = qnameString.substring(index + 1);
+		} else
+		{
+			// Assume no namespace is specified and the string is a local name.
+			localName = qnameString;
+		}
+		return new QualifiedName(namespace, localName);
+
+	}
+
+	/**
+	 * Creates a single string by appending together an array of strings,
+	 * skipping null strings.
+	 * 
+	 * @param strings -
+	 *            Strings to be appended together
+	 * @return Resulting string
+	 */
+	public static String appendStrings(String[] strings)
+	{
+
+		String result = null;
+		if (strings != null)
+		{
+			StringBuffer tokenBuffer = new StringBuffer();
+			int maxCount = strings.length;
+			String string;
+			for (int i = 0; i < maxCount; i++)
+			{
+				string = strings[i];
+				if (string != null && string.length() > 0)
+				{
+					tokenBuffer.append(string);
+				}// if
+			}// for
+			result = tokenBuffer.toString();
+		}// if
+		return result;
+
+	}// appendStrings()
+
+}// class QName
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/SearchPattern.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/SearchPattern.java
new file mode 100644
index 0000000..df0aaf6
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/SearchPattern.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.wst.common.core.search.pattern;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.Platform;
+
+/**
+ * A search defines how search results are found.
+ * 
+ * This class is intended to be subclassed by clients.
+ * 
+ * <p>
+ * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
+ * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
+ * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
+ * (repeatedly) as the API evolves.
+ * </p>
+ */
+public abstract class SearchPattern implements IAdaptable
+{
+
+	/**
+	 * Match rule: The search pattern matches the search result only if cases
+	 * are the same. Can be combined to previous rules, e.g.
+	 * {@link #R_EXACT_MATCH} | {@link #R_CASE_SENSITIVE}
+	 */
+	public static final int R_CASE_SENSITIVE = 8;
+
+	// Rules for pattern matching: (exact, prefix, pattern) [ | case sensitive]
+	/**
+	 * Match rule: The search pattern matches exactly the search result, that
+	 * is, the source of the search result equals the search pattern.
+	 */
+	public static final int R_EXACT_MATCH = 0;
+
+	/**
+	 * Match rule: The search pattern contains one or more wild cards ('*')
+	 * where a wild-card can replace 0 or more characters in the search result.
+	 */
+	public static final int R_PATTERN_MATCH = 2;
+
+	/**
+	 * Match rule: The search pattern is a prefix of the search result.
+	 */
+	public static final int R_PREFIX_MATCH = 1;
+
+	/**
+	 * Match rule: The search pattern contains a regular expression.
+	 */
+	public static final int R_REGEXP_MATCH = 4;
+
+	private int matchRule;
+
+	public SearchPattern()
+	{
+		this.matchRule = R_EXACT_MATCH | R_CASE_SENSITIVE;
+	}
+
+	public SearchPattern(int matchRule)
+	{
+		this.matchRule = matchRule;
+
+	}
+
+	public final int getMatchRule()
+	{
+		return this.matchRule;
+	}
+
+	public Object getAdapter(Class adapter)
+	{
+		return Platform.getAdapterManager().getAdapter(this, adapter);
+	}
+
+}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/ContentTypeSearchScope.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/ContentTypeSearchScope.java
new file mode 100644
index 0000000..c67af17
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/ContentTypeSearchScope.java
@@ -0,0 +1,105 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.common.core.search.scope;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.content.IContentDescription;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.core.runtime.content.IContentTypeManager;
+
+/**
+ * Scope that has filterers files based on content types. It can limit other
+ * scopes with the given file content types.
+ * 
+ * <p>
+ * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
+ * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
+ * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
+ * (repeatedly) as the API evolves.
+ * </p>
+ */
+public class ContentTypeSearchScope extends SearchScopeImpl
+{
+
+	private List validContentIds = new ArrayList();
+
+	public ContentTypeSearchScope(SearchScope scope, String[] validContentTypes)
+	{
+		if (validContentTypes != null)
+		{
+			for (int i = 0; i < validContentTypes.length; i++)
+			{
+				this.validContentIds.add(validContentTypes[i]);
+			}
+		}
+		if (scope.enclosingFiles() != null)
+		{
+			for (int i = 0; i < scope.enclosingFiles().length; i++)
+			{
+				IFile file = (IFile) scope.enclosingFiles()[i];
+				acceptFile(file);
+			}
+		}
+
+	}
+
+	protected boolean acceptFile(IFile file)
+	{
+
+		if (file == null)
+		{
+			return false;
+		} else
+		{
+			try
+			{
+				IContentDescription description = file.getContentDescription();
+				if (description != null)
+				{
+					IContentType contentType = description.getContentType();
+					if (contentType != null)
+					{
+						// TODO use IContentType.isKindOf
+						for (Iterator iter = validContentIds.iterator(); iter
+								.hasNext();)
+						{
+							String contentId = (String) iter.next();
+							IContentTypeManager contentTypeManager = Platform.getContentTypeManager();
+							IContentType supportedContentType = contentTypeManager.getContentType(contentId);
+							if (supportedContentType != null)
+							{
+								if (contentType.isKindOf(supportedContentType))
+								{
+									files.add(file);
+									projects.add(file.getProject());
+									return true;
+								}
+							}
+
+						}
+
+					}
+				}
+			} catch (CoreException e)
+			{
+				// ignore the file
+			}
+		}
+		return false;
+	}
+
+}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/ProjectSearchScope.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/ProjectSearchScope.java
new file mode 100644
index 0000000..12ace71
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/ProjectSearchScope.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.common.core.search.scope;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+
+/**
+ *
+ * <p>
+ * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
+ * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
+ * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
+ * (repeatedly) as the API evolves.
+ * </p>
+ */
+public class ProjectSearchScope extends SearchScopeImpl
+{
+
+	/**
+	 * Creates a scope that ecloses workspace path and eclosing project
+	 * 
+	 * @param workspacePath -
+	 *            path to the resource in the workspace, e.g.
+	 *            /MyProject/MyFile.xml
+	 */
+	public ProjectSearchScope(IPath workspacePath)
+	{
+		super();
+		initialize(workspacePath);
+
+	}
+
+	protected void initialize(IPath workspacePath)
+	{
+		IResource resource = ResourcesPlugin.getWorkspace().getRoot()
+				.findMember(workspacePath);
+		if (resource != null)
+		{
+			IProject project = resource.getProject();
+			traverseContainer(project);
+		}
+	}
+
+}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/SearchScope.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/SearchScope.java
new file mode 100644
index 0000000..1dd3efd
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/SearchScope.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.common.core.search.scope;
+
+import org.eclipse.core.resources.IFile;
+
+/**
+ * A <code>SearchScope</code> defines where search result should be found by a
+ * <code>SearchEngine</code> (e.g. project, workspace).
+ * 
+ * Clients must pass an instance of this class to the <code>search(...)</code>
+ * methods. Such an instance can be created using the following factory methods
+ * on <code>SearchScope</code>: <code>newSearchScope(IResource[])</code>,
+ * <code>newWorkspaceScope()</code>
+ * 
+ * The default implementaion of the search scope has no filter, and at creation
+ * does not contain any files, It could accept any workspace file.
+ * 
+ * <p>
+ * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
+ * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
+ * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
+ * (repeatedly) as the API evolves.
+ * </p>
+ */
+public abstract class SearchScope
+{
+	/**
+	 * Returns the path to the workspace files that belong in this search scope.
+	 * (see <code>IResource.getFullPath()</code>). For example,
+	 * /MyProject/MyFile.txt
+	 * 
+	 * @return an array of files in the workspace that belong to this scope.
+	 */
+	public abstract IFile[] enclosingFiles();
+
+
+
+	
+
+}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/SearchScopeImpl.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/SearchScopeImpl.java
new file mode 100644
index 0000000..33c4c69
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/SearchScopeImpl.java
@@ -0,0 +1,133 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.common.core.search.scope;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceVisitor;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+
+/**
+ *
+ * <p>
+ * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
+ * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
+ * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
+ * (repeatedly) as the API evolves.
+ * </p>
+ */
+public class SearchScopeImpl extends SearchScope
+{
+
+	protected List files = new ArrayList();
+
+	protected HashSet projects = new HashSet();
+
+	public SearchScopeImpl()
+	{
+		super();
+	}
+
+	/**
+	 * Checks whether the resource at the given path is belongs to this scope.
+	 * Resource path could be added to the scope, if scope conditions are met.
+	 * if {@link ISearchScope.encloses(String resourcePath)} returns false and
+	 * then this method is called and returns true, next call to
+	 * {@link ISearchScope.eclipses(String resourcePath)} should return true.
+	 * 
+	 * @param file -
+	 *            workspace file
+	 * @return whether the resource is enclosed by this scope
+	 */
+	protected boolean acceptFile(IFile file)
+	{
+		if (file == null)
+		{
+			return false;
+		}
+		files.add(file);
+		projects.add(file.getProject());
+		return true;
+
+	}
+
+	/**
+	 * Checks whether the resource at the given path is enclosed by this scope.
+	 * 
+	 * @param resourcePath -
+	 *            workspace relative resource path
+	 * @return whether the resource is enclosed by this scope
+	 */
+	protected boolean encloses(String resourcePath)
+	{
+		IResource resource = ResourcesPlugin.getWorkspace().getRoot()
+				.findMember(resourcePath);
+		if (resource == null)
+			return false;
+		return (files.contains(resource));
+	}
+
+	/**
+	 * Returns the path to the workspace files that belong in this search scope.
+	 * (see <code>IResource.getFullPath()</code>). For example,
+	 * /MyProject/MyFile.txt
+	 * 
+	 * @return an array of files in the workspace that belong to this scope.
+	 */
+	public IFile[] enclosingFiles()
+	{
+		if (files == null)
+			return new IFile[0];
+		return (IFile[]) files.toArray(new IFile[files.size()]);
+	}
+
+	/**
+	 * Returns the paths to the enclosing projects for this search scope. (see
+	 * <code>IResource.getFullPath()</code>). For example, /MyProject
+	 * 
+	 * @return an array of paths to the enclosing projects.
+	 */
+	protected IProject[] enclosingProjects()
+	{
+
+		return (IProject[]) projects.toArray(new IProject[projects.size()]);
+
+	}
+	
+	protected void traverseContainer(IContainer container)
+	{
+
+		IResourceVisitor visitor = new IResourceVisitor()
+		{
+			public boolean visit(IResource resource)
+			{
+				if (resource.getType() == IResource.FILE)
+					acceptFile((IFile) resource);
+				return true;
+			}
+		};
+		try
+		{
+			container.accept(visitor);
+		} catch (CoreException e)
+		{
+			// ignore resource
+		}
+
+	}
+}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/SelectionSearchScope.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/SelectionSearchScope.java
new file mode 100644
index 0000000..4ffcd3e
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/SelectionSearchScope.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.common.core.search.scope;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IResource;
+
+/**
+ * <p>
+ * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
+ * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
+ * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
+ * (repeatedly) as the API evolves.
+ * </p>
+ */
+public class SelectionSearchScope extends SearchScopeImpl
+{
+
+	protected IResource[] resources;
+
+	/**
+	 * Creates a scope that ecloses workspace path and eclosing project
+	 * 
+	 * @param workspacePath -
+	 *            path to the resource in the workspace, e.g.
+	 *            /MyProject/MyFile.xml
+	 */
+	public SelectionSearchScope(IResource[] resources)
+	{
+		super();
+		this.resources = resources;
+		initialize();
+
+	}
+
+	protected void initialize()
+	{
+		if (resources == null)
+			return;
+		for (int index = 0; index < resources.length; index++)
+		{
+			IResource resource = resources[index];
+			if (resource != null)
+			{
+				if (resource.getType() == IResource.FOLDER)
+				{
+					traverseContainer((IFolder) resource);
+				} else if (resource.getType() == IResource.FILE)
+				{
+					acceptFile((IFile) resource);
+				}
+			}
+
+		}
+
+	}
+
+}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/WorkingSetSearchScope.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/WorkingSetSearchScope.java
new file mode 100644
index 0000000..cab1a19
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/WorkingSetSearchScope.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     
+ *******************************************************************************/
+package org.eclipse.wst.common.core.search.scope;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IAdaptable;
+
+/**
+ * This class is required to wrap the content of an IWorkingSet.
+ * We can't use IWorkingSet directly because it's part of an eclipse.ui
+ * component. Therefore, we need to create this object as a surrogate.
+ * <br>
+ * Usage: We get the array IAdaptable[] of the IWorkingSet object and use this
+ * array as argument for all methods of this class including the constructor.
+ */
+public class WorkingSetSearchScope extends SearchScopeImpl{
+	
+	/**
+	 * Creates an empty scope when no resources is given.
+	 */
+	public WorkingSetSearchScope(){
+		super();
+	}
+  
+	/**
+	 * Intended to be used with an IWorkingSet
+	 * <br>
+	 * For example:
+	 * <pre>
+	 * IWorkingSet oneWorkingSet;
+	 * ...
+	 * IAdaptable[] elements = oneWorkingSet.getElements();
+	 * WorkingSetSearchScope scope = new WorkingSetSearchScope(elements);
+	 * </pre>
+	 */
+	public WorkingSetSearchScope(IAdaptable[] elements)
+	{
+		super();
+		addElementsOfWorkingSet(elements);
+	}
+	
+	/**
+	 * Intended to be used with an IWorkingSet
+	 * <br>
+	 * For example:
+	 * <pre>
+	 * WorkingSetSearchScope scope = ..; 
+	 * ...
+	 * IWorkingSet anotherWorkingSet; 
+	 * IAdaptable[] elements = anotherWorkingSet.getElements();
+	 * scope.addAWorkingSetToScope(elements);
+	 * </pre>
+	 */
+	public void addAWorkingSetToScope(IAdaptable[] elements){
+		addElementsOfWorkingSet(elements);
+	}
+	
+	private void addElementsOfWorkingSet(IAdaptable[] elements){
+		for (int j = 0; j < elements.length; j++){
+			IContainer container = (IContainer) elements[j].getAdapter(IContainer.class);
+			if ( container != null ){
+				traverseContainer(container);
+			}
+			else{
+				IFile aFile = (IFile) elements[j].getAdapter(IFile.class);
+				if ( aFile != null)
+					acceptFile(aFile);
+			}
+		}
+	}
+}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/WorkspaceSearchScope.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/WorkspaceSearchScope.java
new file mode 100644
index 0000000..e01c201
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/WorkspaceSearchScope.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.common.core.search.scope;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+
+/**
+ * <p>
+ * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
+ * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
+ * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
+ * (repeatedly) as the API evolves.
+ * </p>
+ */
+public class WorkspaceSearchScope extends SearchScopeImpl
+{
+
+	protected IResource currentResource;
+
+	/**
+	 * Creates a scope that ecloses workspace path and eclosing project
+	 * 
+	 * @param workspacePath -
+	 *            path to the resource in the workspace, e.g.
+	 *            /MyProject/MyFile.xml
+	 */
+	public WorkspaceSearchScope()
+	{
+		super();
+		initialize();
+
+	}
+
+	protected void initialize()
+	{
+		IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+		traverseContainer(root);
+
+	}
+
+}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/util/CollectingSearchRequestor.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/util/CollectingSearchRequestor.java
new file mode 100644
index 0000000..d227f93
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/util/CollectingSearchRequestor.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.common.core.search.util;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.wst.common.core.search.SearchMatch;
+import org.eclipse.wst.common.core.search.SearchRequestor;
+
+/**
+ * Collects the results returned by a <code>ISearchEngine</code>.
+ * 
+ * <p>
+ * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
+ * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
+ * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
+ * (repeatedly) as the API evolves.
+ * </p>
+ */
+// issue should you move this to a util package? what does jdt do?
+public class CollectingSearchRequestor extends SearchRequestor
+{
+	private ArrayList fFound;
+
+	public CollectingSearchRequestor()
+	{
+		fFound = new ArrayList();
+	}
+
+	/**
+	 * @return a List of {@link SearchMatch}es (not sorted)
+	 */
+	public List/* <SearchMatch> */getResults()
+	{
+		return fFound;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.common.core.search.internal.provisional.SearchRequestor#acceptSearchMatch(org.eclipse.wst.common.search.internal.provisional.SearchMatch)
+	 */
+	public void acceptSearchMatch(SearchMatch match) throws CoreException
+	{
+		fFound.add(match);
+
+	}
+}
diff --git a/plugins/org.eclipse.wst.common.infopop/.cvsignore b/plugins/org.eclipse.wst.common.infopop/.cvsignore
new file mode 100644
index 0000000..c14487c
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.infopop/.cvsignore
@@ -0,0 +1 @@
+build.xml
diff --git a/plugins/org.eclipse.wst.common.infopop/.project b/plugins/org.eclipse.wst.common.infopop/.project
new file mode 100644
index 0000000..d8e0250
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.infopop/.project
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.wst.common.infopop</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+	</natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.wst.common.infopop/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.wst.common.infopop/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..76d68cc
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.infopop/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Apr 17 03:12:42 EDT 2006
+eclipse.preferences.version=1
+encoding/<project>=ISO-8859-1
diff --git a/plugins/org.eclipse.wst.common.infopop/.settings/org.eclipse.pde.prefs b/plugins/org.eclipse.wst.common.infopop/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000..f774e3c
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.infopop/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,14 @@
+#Mon Apr 17 03:12:36 EDT 2006
+compilers.incompatible-environment=0
+compilers.p.build=0
+compilers.p.deprecated=1
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=0
+compilers.p.unknown-attribute=0
+compilers.p.unknown-class=0
+compilers.p.unknown-element=0
+compilers.p.unknown-resource=0
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.use-project=true
+eclipse.preferences.version=1
diff --git a/plugins/org.eclipse.wst.common.infopop/META-INF/MANIFEST.MF b/plugins/org.eclipse.wst.common.infopop/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..603bfb0
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.infopop/META-INF/MANIFEST.MF
@@ -0,0 +1,8 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name.0
+Bundle-SymbolicName: org.eclipse.wst.common.infopop; singleton:=true
+Bundle-Version: 1.0.2.qualifier
+Bundle-Vendor: %Bundle-Vendor.0
+Bundle-Localization: plugin
+Eclipse-LazyStart: true
diff --git a/plugins/org.eclipse.wst.common.infopop/SnippetsContexts.xml b/plugins/org.eclipse.wst.common.infopop/SnippetsContexts.xml
new file mode 100644
index 0000000..b3b0c43
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.infopop/SnippetsContexts.xml
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?NLS type="org.eclipse.help.contexts"?>
+<!-- /*******************************************************************************
+ * Copyright (c) 2000, 2005 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/ -->
+
+<contexts>
+<context id="libv1000">
+<description>Use this view to catalog and organize reusable programming objects, such as HTML tagging, JavaScript, and JSP markup, along with custom tags, that can be embedded in existing files.
+</description>
+<topic label="Snippets view" href="../org.eclipse.wst.sse.doc.user/topics/csrcedt001.html"/>
+</context>
+
+<context id="libv1100">
+<description>Supply values in this dialog to define the Snippets view object to be inserted in the current file at the cursor position. Assign a value to the variables being inserted.
+</description>
+<topic label="Inserting and editing items in the active editor" href="../org.eclipse.wst.sse.doc.user/topics/tsrcedt015.html"/>
+<topic label="Snippets view" href="../org.eclipse.wst.sse.doc.user/topics/csrcedt001.html"/>
+</context>
+
+<context id="libv1200">
+<description>In the <b>Name</b> field, type the name of the object as you want it be displayed in the Snippets view.  Optionally, add a description of the object in the <b>Description</b> field.
+
+Select the <b>Hide</b> check box to make this snippet object not visible in the view.
+
+To add a new variable, click the <b>New</b> push button, and type values in the cells of the <b>Variables</b> table. The <b>Name</b> field represents name of the variable that will be inserted when you add it to a document. <b>Default value</b> is the initial value of the named variable. Optionally, add a description of the variable.
+
+Insert the variables that you define into the <b>Template Pattern</b> field using the <b>Insert Variable Placeholder</b> push button.
+</description>
+<topic label="Deleting or hiding snippet items or drawers" href="../org.eclipse.wst.sse.doc.user/topics/tsrcedt016.html"/>
+<topic label="Snippets view" href="../org.eclipse.wst.sse.doc.user/topics/csrcedt001.html"/>
+</context>
+
+<context id="libv1300">
+<description>Type the name of the new category in the <b>Name</b> field and optionally add a description of the category in the <b>Description</b> field.
+
+Select <b>Open drawer at start-up</b> to have the category drawer opened in the Snippets view when the workbench starts up.
+
+You can specify how you want the category drawer displayed in the Snippets view by selecting a radio button for the <b>Show/Hide Drawer</b> field.
+</description>
+<topic label="Snippets view" href="../org.eclipse.wst.sse.doc.user/topics/csrcedt001.html"/>
+<topic label="Deleting or hiding snippet items or drawers" href="../org.eclipse.wst.sse.doc.user/topics/tsrcedt016.html"/>
+</context>
+
+<context id="snip0010">
+<description>Select this option to open the <b>Import</b> dialog, which lets you import snippet categories from the file system.
+</description>
+<topic label="Snippets view" href="../org.eclipse.wst.sse.doc.user/topics/csrcedt001.html"/>
+<topic label="Adding items to snippets drawers" href="../org.eclipse.wst.sse.doc.user/topics/tsrcedt015.html"/>
+</context>
+
+<context id="snip0020">
+<description>Select this option to open the <b>Export</b> dialog, which lets you export snippet categories to the file system.
+</description>
+<topic label="Snippets view" href="../org.eclipse.wst.sse.doc.user/topics/csrcedt001.html"/>
+<topic label="Adding items to snippets drawers" href="../org.eclipse.wst.sse.doc.user/topics/tsrcedt015.html"/>
+</context>
+
+<context id="snip0030">
+<description>Select the content types that should be visible in this drawer for in the Snippets view.
+</description>
+<topic label="Snippets view" href="../org.eclipse.wst.sse.doc.user/topics/csrcedt001.html"/>
+<topic label="Deleting or hiding snippet items or drawers" href="../org.eclipse.wst.sse.doc.user/topics/tsrcedt016.html"/>
+</context>
+
+<context id="snip0040">
+<description>This menu item adds the selected text to the Snippets view as a new item.
+</description>
+<topic label="Snippets view" href="../org.eclipse.wst.sse.doc.user/topics/csrcedt001.html"/>
+<topic label="Adding items to snippets drawers" href="../org.eclipse.wst.sse.doc.user/topics/tsrcedt015.html"/>
+</context>
+
+<context id="snip0050">
+<description>This menu item cuts the selected Snippet item to the clipboard.
+</description>
+<topic label="Snippets view" href="../org.eclipse.wst.sse.doc.user/topics/csrcedt001.html"/>
+<topic label="Editing snippet items" href="../org.eclipse.wst.sse.doc.user/topics/tsrcedt022.html"/>
+</context>
+
+<context id="snip0060">
+<description>This menu item copies the selected Snippet item to the clipboard.
+</description>
+<topic label="Snippets view" href="../org.eclipse.wst.sse.doc.user/topics/csrcedt001.html"/>
+<topic label="Editing snippet items" href="../org.eclipse.wst.sse.doc.user/topics/tsrcedt022.html"/>
+</context>
+
+<context id="snip0070">
+<description>This menu item creates a new Snippets view item containing the current contents of the clipboard.
+</description>
+<topic label="Snippets view" href="../org.eclipse.wst.sse.doc.user/topics/csrcedt001.html"/>
+<topic label="Adding items to snippets drawers" href="../org.eclipse.wst.sse.doc.user/topics/tsrcedt015.html"/>
+</context>
+<context id="snip0080">
+<description>Type a name for the category. The category appears in the Customize Palette dialog box. Once you have created a category, you can add items to the category.
+</description>
+<topic label="Snippets view" href="../org.eclipse.wst.sse.doc.user/topics/csrcedt001.html"/>
+<topic label="Adding items to snippets drawers" href="../org.eclipse.wst.sse.doc.user/topics/tsrcedt015.html"/>
+</context>
+
+</contexts>
diff --git a/plugins/org.eclipse.wst.common.infopop/about.html b/plugins/org.eclipse.wst.common.infopop/about.html
new file mode 100644
index 0000000..73db36e
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.infopop/about.html
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<HTML>
+
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+
+<BODY lang="EN-US">
+
+<H3>About This Content</H3>
+
+<P>June 06, 2007</P>
+
+<H3>License</H3>
+
+<P>The Eclipse Foundation makes available all content in this plug-in 
+("Content"). Unless otherwise indicated below, the Content is provided to you 
+under the terms and conditions of the Eclipse Public License Version 1.0 
+("EPL"). A copy of the EPL is available at
+<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>. 
+For purposes of the EPL, "Program" will mean the Content.</P>
+
+<P>If you did not receive this Content directly from the Eclipse Foundation, the 
+Content is being redistributed by another party ("Redistributor") and different 
+terms and conditions may apply to your use of any object code in the Content. 
+Check the Redistributor’s license that was provided with the Content. If no such 
+license exists, contact the Redistributor. Unless otherwise indicated below, the 
+terms and conditions of the EPL still apply to any source code in the Content 
+and such source code may be obtained at
+<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P>
+
+</BODY>
+</HTML>
diff --git a/plugins/org.eclipse.wst.common.infopop/build.properties b/plugins/org.eclipse.wst.common.infopop/build.properties
new file mode 100644
index 0000000..c1d3dbf
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.infopop/build.properties
@@ -0,0 +1,5 @@
+bin.includes = plugin.xml,\
+               about.html,\
+               SnippetsContexts.xml,\
+               META-INF/,\
+               plugin.properties
diff --git a/plugins/org.eclipse.wst.common.infopop/plugin.properties b/plugins/org.eclipse.wst.common.infopop/plugin.properties
new file mode 100644
index 0000000..74f0260
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.infopop/plugin.properties
@@ -0,0 +1,3 @@
+# properties file for org.eclipse.wst.common.infopop
+Bundle-Name.0 = Common WST infopops
+Bundle-Vendor.0 = Eclipse.org
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.infopop/plugin.xml b/plugins/org.eclipse.wst.common.infopop/plugin.xml
new file mode 100644
index 0000000..f1e178c
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.infopop/plugin.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<!-- ================================================= -->
+<!-- This is the plugin for declaring the help         -->
+<!-- contributions for using the tool.                 -->
+<!-- ================================================= -->
+
+<plugin>
+
+<extension point="org.eclipse.help.contexts">
+       <contexts file="SnippetsContexts.xml" plugin ="org.eclipse.wst.common.snippets"/>
+</extension>
+
+
+</plugin>
\ No newline at end of file