This commit was manufactured by cvs2svn to create tag 'R1_0_2'.
diff --git a/bundles/org.eclipse.jst.jsp.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.jst.jsp.core/META-INF/MANIFEST.MF
index 04c2da2..975e202 100644
--- a/bundles/org.eclipse.jst.jsp.core/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.jst.jsp.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jst.jsp.core; singleton:=true
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 1.0.2.qualifier
 Bundle-Activator: org.eclipse.jst.jsp.core.internal.JSPCorePlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
@@ -26,9 +26,12 @@
  org.eclipse.jst.jsp.core.internal.provisional.contenttype,
  org.eclipse.jst.jsp.core.internal.provisional.text,
  org.eclipse.jst.jsp.core.internal.regions,
+ org.eclipse.jst.jsp.core.internal.taglib,
  org.eclipse.jst.jsp.core.internal.tasks,
  org.eclipse.jst.jsp.core.internal.text,
  org.eclipse.jst.jsp.core.internal.util,
+ org.eclipse.jst.jsp.core.internal.validation,
+ org.eclipse.jst.jsp.core.jspel,
  org.eclipse.jst.jsp.core.taglib
 Require-Bundle: org.eclipse.core.runtime,
  org.eclipse.core.resources,
diff --git a/bundles/org.eclipse.jst.jsp.core/build.properties b/bundles/org.eclipse.jst.jsp.core/build.properties
index 9bcd78a..ae187ae 100644
--- a/bundles/org.eclipse.jst.jsp.core/build.properties
+++ b/bundles/org.eclipse.jst.jsp.core/build.properties
@@ -17,6 +17,6 @@
 bin.excludes = @dot/**,\
                temp.folder/**
 src.includes = component.xml,\
-               build.properties,\
-               DevTimeSupport/
+               DevTimeSupport/,\
+               schema/
 source.. = src/
diff --git a/bundles/org.eclipse.jst.jsp.core/plugin.properties b/bundles/org.eclipse.jst.jsp.core/plugin.properties
index b474eb2..9d662e3 100644
--- a/bundles/org.eclipse.jst.jsp.core/plugin.properties
+++ b/bundles/org.eclipse.jst.jsp.core/plugin.properties
@@ -18,3 +18,4 @@
 JSP_Syntax_Validator.name=JSP Syntax Validator
 EL_Syntax_Validator.name=EL Syntax Validator
 Structured_JSP_Document_Setup_participant.name=Structured JSP Document Setup Participant
+JSP_EL_Translator=JSP EL Translator
\ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/plugin.xml b/bundles/org.eclipse.jst.jsp.core/plugin.xml
index 95babbb..8684199 100644
--- a/bundles/org.eclipse.jst.jsp.core/plugin.xml
+++ b/bundles/org.eclipse.jst.jsp.core/plugin.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?eclipse version="3.0"?>
 <plugin>
-   <extension-point id="elTranslator" name="org.eclipse.jst.jsp.core.eltranslator" schema="schema/eltranslator.exsd"/>
+   <extension-point id="elTranslator" name="%JSP_EL_Translator" schema="schema/eltranslator.exsd"/>
 
 	<extension point="org.eclipse.wst.sse.core.modelHandler">
 		<modelHandler
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationExtension.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationExtension.java
index c8702e6..265259d 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationExtension.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationExtension.java
@@ -15,7 +15,6 @@
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
-import java.util.StringTokenizer;
 
 import org.eclipse.core.filebuffers.ITextFileBuffer;
 import org.eclipse.core.resources.IFile;
@@ -29,9 +28,7 @@
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.IRegion;
 import org.eclipse.jface.text.Position;
-import org.eclipse.jface.text.TextUtilities;
 import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
 import org.eclipse.text.edits.DeleteEdit;
 import org.eclipse.text.edits.InsertEdit;
 import org.eclipse.text.edits.MalformedTreeException;
@@ -42,9 +39,6 @@
 import org.eclipse.wst.sse.core.internal.FileBufferModelManager;
 import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
 import org.eclipse.wst.sse.core.internal.provisional.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
 
 
 /**
@@ -187,11 +181,6 @@
 				}
 				else {
 					replaceText = newJavaText.substring(deltas[i].postOffset, deltas[i].postOffset + deltas[i].postLength);
-					
-					// get rid of pre and post white space or fine tuned adjustment later.
-					// fix text here...
-					replaceText = fixJspReplaceText(replaceText, jspPos.offset);
-					
 					jspEdits.add(new ReplaceEdit(jspPos.offset, jspPos.length, replaceText));
 				}
 				if(DEBUG) 
@@ -229,109 +218,6 @@
 		return allJspEdits;
 	}
 	
-	private String fixJspReplaceText(String replaceText, int jspOffset) {
-		
-		// result is the text inbetween the delimiters
-		// eg.
-		// 
-		// <%  result 
-		// %>
-		String result = replaceText.trim();
-		String preDelimiterWhitespace = "";
-		
-		IDocument jspDoc = getJspDocument();
-		if(jspDoc instanceof IStructuredDocument) {
-			IStructuredDocument sDoc = (IStructuredDocument)jspDoc;
-			IStructuredDocumentRegion[] regions = sDoc.getStructuredDocumentRegions(0, jspOffset);
-			IStructuredDocumentRegion lastRegion = regions[regions.length-1];
-			
-			// only specifically modify scriptlets
-			if(lastRegion != null && lastRegion.getType() == DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN) {
-				for (int i = regions.length-1; i >= 0; i--) {
-					IStructuredDocumentRegion region = regions[i];
-					
-					// is there a better way to check whitespace?
-					if(region.getType() == DOMRegionContext.XML_CONTENT && region.getFullText().trim().equals("")) {
-						
-						preDelimiterWhitespace = region.getFullText();
-						preDelimiterWhitespace = preDelimiterWhitespace.replaceAll("\r", "");
-						preDelimiterWhitespace = preDelimiterWhitespace.replaceAll("\n", "");
-						
-						// need to determine indent for that first line...
-						 String initialIndent = getInitialIndent(result);
-						 
-						 // fix the first line of java code
-						result = TextUtilities.getDefaultLineDelimiter(sDoc) 
-									+ initialIndent 
-									+ result;
-						
-						result = adjustIndent(result, preDelimiterWhitespace, TextUtilities.getDefaultLineDelimiter(sDoc));
-						
-						// add whitespace before last delimiter to match
-					    // it w/ the opening delimiter
-						result = result + TextUtilities.getDefaultLineDelimiter(sDoc) + preDelimiterWhitespace;
-						break;
-					}
-				}
-			}
-		}
-		return result;
-	}
-	
-	private String adjustIndent(String textBefore, String indent, String delim) {
-		
-		// first replace multiple indent with single indent
-		// the triple indent occurs because the scriptlet code
-		// actually occurs under:
-		// 
-		//    class
-		//       method
-		//          code
-		// 
-		// in the translated java document
-		
-		textBefore = textBefore.replaceAll("\t\t\t", "\t");
-		
-		// get indent after 2nd line break
-		StringBuffer textAfter = new StringBuffer();
-		// will this work on mac?
-		textBefore = textBefore.replaceAll("\r", "");
-		StringTokenizer st = new StringTokenizer(textBefore, "\n", true);
-		while(st.hasMoreTokens()) {
-			String tok = st.nextToken();
-			if(tok.equals("\n")) {
-				textAfter.append(delim);
-			}
-			else {
-				// prepend each line w/ specified indent
-				textAfter.append(indent);
-				textAfter.append(tok);
-			}
-		}
-		return textAfter.toString();
-		
-	}
-	
-	private String getInitialIndent(String result) {
-		
-		// get indent after 2nd line break
-		String indent = "";
-		StringTokenizer st = new StringTokenizer(result, "\r\n", false);
-		if(st.countTokens() > 1) {
-			String tok = st.nextToken();
-			tok = st.nextToken();
-			int index =0;
-			if(tok != null) {
-				while(tok.charAt(index) == ' ' || tok.charAt(index) == '\t') {
-					indent += tok.charAt(index);
-					index++;
-				}
-			}
-		}
-		return indent;
-	}
-
-
 	/**
 	 * Combines an array of edits into one MultiTextEdit (with the appropriate coverage region)
 	 * @param edits
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslator.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslator.java
index b112660..41c770d 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslator.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslator.java
@@ -74,16 +74,15 @@
  */
 public class JSPTranslator {
 	
-	// the name of the element in the extension point
-	private static final String EL_TRANSLATOR_EXTENSION_NAME = "elTranslator"; //$NON-NLS-1$
+	private static final String EL_TRANSLATOR_EXTENSION_NAME = "elTranslator"; //$NON-NLS-1$ 
 
-	private static final String ELTRANSLATOR_PROP_NAME = "ELTranslator"; //$NON-NLS-1$
+	private static final String ELTRANSLATOR_PROP_NAME = "ELTranslator"; //$NON-NLS-1$ 
 
 	// Default EL Translator
-	private static final String DEFAULT_JSP_EL_TRANSLATOR_ID = "org.eclipse.jst.jsp.defaultJSP20"; //$NON-NLS-1$
+	private static final String DEFAULT_JSP_EL_TRANSLATOR_ID = "org.eclipse.jst.jsp.defaultJSP20"; //$NON-NLS-1$ 
 	
 	// handy plugin ID constant
-	private static final String JSP_CORE_PLUGIN_ID = "org.eclipse.jst.jsp.core"; //$NON-NLS-1$
+	private static final String JSP_CORE_PLUGIN_ID = "org.eclipse.jst.jsp.core"; //$NON-NLS-1$ 
 
 	// for debugging
 	private static final boolean DEBUG;
@@ -237,6 +236,8 @@
 		String baseLocation = fStructuredModel.getBaseLocation();
 		
 		fELTranslatorID = getELTranslatorProperty(baseLocation);
+		
+		// fPositionNode = node;
 
 		fStructuredDocument = fStructuredModel.getStructuredDocument();
 
@@ -261,7 +262,6 @@
 		fProgressMonitor = monitor;
 		
 		fELTranslatorID = getELTranslatorProperty(jspFile);
-		
 		String className = createClassname(jspFile);
 		if (className.length() > 0) {
 			setClassname(className);
@@ -933,6 +933,7 @@
 		helper.reset(blockText, startOfBlock);
 		// force parse
 		helper.forceParse();
+		helper.writeToBuffers();
 	}
 
 	/*
@@ -1083,32 +1084,41 @@
 	}
 	/**
 	 * translates embedded containers for ALL attribute values
+	 * 
 	 * @param regions
 	 */
 	private void checkAllAttributeValueContainers(Iterator regions) {
 		// tag name is not jsp
 		// handle embedded jsp attributes...
 		ITextRegion embedded = null;
-		Iterator attrRegions = null;
-		ITextRegion attrChunk = null;
+		//Iterator attrRegions = null;
+		//ITextRegion attrChunk = null;
 		while (regions.hasNext()) {
 			embedded = (ITextRegion) regions.next();
 			if (embedded instanceof ITextRegionContainer) {
 				// parse out container
-				attrRegions = ((ITextRegionContainer) embedded).getRegions().iterator();
-				while (attrRegions.hasNext()) {
-					attrChunk = (ITextRegion) attrRegions.next();
-					String type = attrChunk.getType();
-					// embedded JSP in attribute support only want to translate one time per
-					// embedded region so we only translate on the JSP open tags (not content)
-					if (type == DOMJSPRegionContexts.JSP_EXPRESSION_OPEN || type == DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN || type == DOMJSPRegionContexts.JSP_DECLARATION_OPEN || type == DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN || type == DOMJSPRegionContexts.JSP_EL_OPEN) {
-						// now call jsptranslate
-						translateEmbeddedJSPInAttribute((ITextRegionContainer) embedded);
-					}
-				}
+				
+				// https://bugs.eclipse.org/bugs/show_bug.cgi?id=130606
+				// fix exponential iteration problem w/ embedded expressions
+				translateEmbeddedJSPInAttribute((ITextRegionContainer) embedded);
+//				attrRegions = ((ITextRegionContainer) embedded).getRegions().iterator();
+//				while (attrRegions.hasNext()) {
+//					attrChunk = (ITextRegion) attrRegions.next();
+//					String type = attrChunk.getType();
+//					// embedded JSP in attribute support only want to
+//					// translate one time per
+//					// embedded region so we only translate on the JSP open
+//					// tags (not content)
+//					if (type == DOMJSPRegionContexts.JSP_EXPRESSION_OPEN || type == DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN || type == DOMJSPRegionContexts.JSP_DECLARATION_OPEN || type == DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN || type == DOMJSPRegionContexts.JSP_EL_OPEN) {
+//						// now call jsptranslate
+//						translateEmbeddedJSPInAttribute((ITextRegionContainer) embedded);
+//						break;
+//					}
+//				}
 			}
 		}
 	}
+	
 	/**
 	 * translates embedded container for specified attribute
 	 * @param regions
@@ -1624,6 +1634,7 @@
 				getIncludes().push(fileLocation);
 				JSPIncludeRegionHelper helper = new JSPIncludeRegionHelper(this);
 				helper.parse(fileLocation);
+				helper.writeToBuffers();
 				getIncludes().pop();
 			}
 		}
@@ -1790,8 +1801,11 @@
 		boolean isUseBean = false;
 		for (int i = 0; i < regions.size(); i++) {
 			r = regions.get(i);
-			if (r.getType() == DOMRegionContext.XML_TAG_NAME && jspReferenceRegion.getText(r).equals("jsp:useBean")) { //$NON-NLS-1$
-				isUseBean = true;
+			if(r.getType() == DOMRegionContext.XML_TAG_NAME) {
+				if (r.getTextLength() == 11 && jspReferenceRegion.getText(r).equals("jsp:useBean")) { //$NON-NLS-1$
+					isUseBean = true;
+				}
+				// break no matter what if you hit tagname
 				break;
 			}
 		}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/XMLJSPRegionHelper.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/XMLJSPRegionHelper.java
index 8bb1689..6a7ae9d 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/XMLJSPRegionHelper.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/XMLJSPRegionHelper.java
@@ -11,6 +11,7 @@
 package org.eclipse.jst.jsp.core.internal.java;
 
 import java.io.InputStream;
+import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
@@ -20,7 +21,6 @@
 import org.eclipse.core.runtime.Path;
 import org.eclipse.jst.jsp.core.internal.Logger;
 import org.eclipse.jst.jsp.core.internal.parser.JSPSourceParser;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP11Namespace;
 import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
 import org.eclipse.wst.sse.core.internal.ltk.parser.BlockMarker;
 import org.eclipse.wst.sse.core.internal.ltk.parser.StructuredDocumentRegionHandler;
@@ -47,6 +47,10 @@
 	protected String fTextToParse = null;
 	// need this if not at the start of the document (eg. parsing just a script block)
 	protected int fStartOfTextToParse = 0;
+	// buffers for text that this class parses	
+	protected List fScriptlets = new ArrayList();
+	protected List fExpressions = new ArrayList();
+	protected List fDeclarations = new ArrayList();
 	// name of the open tag that was last handled (if we are interested in it)
 	protected String fTagname = null;
 	protected String fTextBefore = ""; //$NON-NLS-1$
@@ -100,6 +104,23 @@
 		forceParse();
 	}
 
+	/*
+	 * writes out scriptlet, expression, and declaration buffers
+	 * to the ongoing buffers in the JSPTranslator (calls to outer JSPTranslator methods)
+	 */
+	public void writeToBuffers() {
+		IStructuredDocumentRegion currentNode = fTranslator.getCurrentNode();
+		// currentNode should be the <%@page include="xxx"%> StructuredDocumentRegion
+		for (int i = 0; i < fScriptlets.size(); i++) {
+			this.fTranslator.translateScriptletString((String) fScriptlets.get(i), currentNode, currentNode.getStartOffset(), currentNode.getLength());
+		}
+		for (int i = 0; i < fExpressions.size(); i++) {
+			this.fTranslator.translateExpressionString((String) fExpressions.get(i), currentNode, currentNode.getStartOffset(), currentNode.getLength());
+		}
+		for (int i = 0; i < fDeclarations.size(); i++) {
+			this.fTranslator.translateDeclarationString((String) fDeclarations.get(i), currentNode, currentNode.getStartOffset(), currentNode.getLength());
+		}
+	}
 
 	/*
 	 * listens to parser node parsed events
@@ -118,23 +139,8 @@
 					fTagname = nameStr;
 				else
 					fTagname = null;
-				
-
-				// this section assumes important content (to translate)
-				// IS the opening tag
-				
-				// handle include and directive
-				if(fTagname != null && sdRegion.getFirstRegion().getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN) {
-					processOtherRegions(sdRegion);	
-				}
-				// handle jsp:useBean
-				if(fTagname != null && fTagname.equals(JSP11Namespace.ElementName.USEBEAN)) {
-					processUseBean(sdRegion);
-				}
 			}
 			else if (sdRegion.getFirstRegion().getType() == DOMJSPRegionContexts.JSP_CONTENT || sdRegion.getFirstRegion().getType() == DOMRegionContext.XML_CONTENT) {
-				// this section assumes important content (to translate)
-				// is AFTER the opening tag
 				if (fTagname != null) {
 					// assign contents to one of the tables
 					if (isScriptlet(fTagname)) {
@@ -146,8 +152,20 @@
 					else if (isDeclaration(fTagname)) {
 						processDeclaration(sdRegion);
 					}
+					else {
+						if (fTagname != null) {
+							processUseBean(sdRegion);
+							processOtherRegions(sdRegion);
+						}
+					}
 				}
 			}
+//			else if (sdRegion.getFirstRegion().getType() == DOMRegionContext.XML_CONTENT) {
+//				if (fTagname != null) {
+//					processUseBean(sdRegion);
+//					processOtherRegions(sdRegion);
+//				}
+//			}
 			else {
 				fTagname = null;
 			}
@@ -199,23 +217,23 @@
 	}
 
 	private void startScope(String tagName) {
-		IStructuredDocumentRegion currentNode = fTranslator.getCurrentNode();
+		//IStructuredDocumentRegion currentNode = fTranslator.getCurrentNode();
 		StringBuffer text = new StringBuffer();
 		text.append("{ // <"); //$NON-NLS-1$
 		text.append(tagName);
 		text.append(">\n"); //$NON-NLS-1$
-		this.fTranslator.translateScriptletString(text.toString(), currentNode, currentNode.getStartOffset(), currentNode.getLength()); //$NON-NLS-1$
-
+		//this.fTranslator.translateScriptletString(text.toString(), currentNode, currentNode.getStartOffset(), currentNode.getLength()); //$NON-NLS-1$
+		fScriptlets.add(text.toString());
 	}
 
 	private void endScope(String tagName) {
-		IStructuredDocumentRegion currentNode = fTranslator.getCurrentNode();
+		//IStructuredDocumentRegion currentNode = fTranslator.getCurrentNode();
 		StringBuffer text = new StringBuffer();
 		text.append("} // </"); //$NON-NLS-1$
 		text.append(tagName);
 		text.append(">\n"); //$NON-NLS-1$
-		this.fTranslator.translateScriptletString(text.toString(), currentNode, currentNode.getStartOffset(), currentNode.getLength()); //$NON-NLS-1$
-
+		//this.fTranslator.translateScriptletString(text.toString(), currentNode, currentNode.getStartOffset(), currentNode.getLength()); //$NON-NLS-1$
+		fScriptlets.add(text.toString());
 	}
 
 	public void resetNodes() {
@@ -242,22 +260,19 @@
 
 	protected void processDeclaration(IStructuredDocumentRegion sdRegion) {
 		prepareText(sdRegion);
-		IStructuredDocumentRegion currentNode = fTranslator.getCurrentNode();
-		this.fTranslator.translateDeclarationString(fStrippedText, currentNode, currentNode.getStartOffset(), currentNode.getLength());
+		fDeclarations.add(fStrippedText);
 		fPossibleOwner = JSPTranslator.DECLARATION;
 	}
 
 	protected void processExpression(IStructuredDocumentRegion sdRegion) {
 		prepareText(sdRegion);
-		IStructuredDocumentRegion currentNode = fTranslator.getCurrentNode();
-		this.fTranslator.translateExpressionString(fStrippedText, currentNode, currentNode.getStartOffset(), currentNode.getLength());
+		fExpressions.add(fStrippedText);
 		fPossibleOwner = JSPTranslator.EXPRESSION;
 	}
 
 	protected void processScriptlet(IStructuredDocumentRegion sdRegion) {
 		prepareText(sdRegion);
-		IStructuredDocumentRegion currentNode = fTranslator.getCurrentNode();
-		this.fTranslator.translateScriptletString(fStrippedText, currentNode, currentNode.getStartOffset(), currentNode.getLength());
+		fScriptlets.add(fStrippedText);
 		fPossibleOwner = JSPTranslator.SCRIPTLET;
 	}
 
@@ -274,7 +289,8 @@
 
 	protected void processUseBean(IStructuredDocumentRegion sdRegion) {
 		if (fTagname != null && isUseBean(fTagname)) {
-
+			// previous region has the actual attributes
+			sdRegion = sdRegion.getPrevious();
 			String beanClass, beanType, beanId, beanDecl = ""; //$NON-NLS-1$
 			beanClass = getAttributeValue("class", sdRegion); //$NON-NLS-1$
 			beanType = getAttributeValue("type", sdRegion); //$NON-NLS-1$
@@ -289,9 +305,8 @@
 					suffix = "new " + beanClass + "();\n"; //$NON-NLS-1$ //$NON-NLS-2$
 				beanDecl = prefix + suffix;
 			}	
-
-			IStructuredDocumentRegion currentNode = fTranslator.getCurrentNode();
-			this.fTranslator.translateScriptletString(beanDecl, currentNode, currentNode.getStartOffset(), currentNode.getLength());
+			
+			fScriptlets.add(beanDecl);
 			fPossibleOwner = JSPTranslator.SCRIPTLET;
 		}
 	}
@@ -367,7 +382,7 @@
 		while (it.hasNext()) {
 			nameRegion = (ITextRegion) it.next();
 			if (nameRegion.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) {
-				textRegionText = sdRegionText.substring(nameRegion.getStart(), nameRegion.getTextEnd());
+				textRegionText = sdRegionText.substring(nameRegion.getStart(), nameRegion.getEnd());
 				if (textRegionText.equalsIgnoreCase(attrName)) {
 					while (it.hasNext()) {
 						valueRegion = (ITextRegion) it.next();
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ELGeneratorVisitor.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ELGeneratorVisitor.java
index 939a61c..8c92898 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ELGeneratorVisitor.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ELGeneratorVisitor.java
@@ -68,7 +68,7 @@
 	private StringBuffer fResult;
 	private Map fCodeMap;
 	private int fOffsetInUserCode;
-	private static int methodCounter = 0;
+	private int methodCounter = 0;
 	private IStructuredDocument fDocument = null;
 	private int fContentStart;
 	private static Map fOperatorMap;
@@ -199,10 +199,6 @@
 		return(node.childrenAccept(this, data));
 	}
 
-	static synchronized int getMethodCounter() {
-		return methodCounter++;
-	}
-	
 	/**
 	 * Handle top-level expression
 	 */
@@ -210,7 +206,7 @@
 		int start = node.getFirstToken().beginColumn - 1;
 		int end = node.lastToken.endColumn - 1;
 		append(fExpressionHeader1, start, start);
-		append(Integer.toString(getMethodCounter()), start, start);
+		append(Integer.toString(methodCounter++), start, start);
 		append(fExpressionHeader2, start, start);
 		
 		Object retval = node.childrenAccept(this, data);
@@ -353,6 +349,15 @@
 	 * Value node
 	 */
 	public Object visit(ASTValue node, Object data) {
+		if(node.jjtGetNumChildren() >= 2) {
+			if(node.jjtGetChild(0) instanceof ASTValuePrefix && node.jjtGetChild(1) instanceof ASTValueSuffix) {
+				ASTValuePrefix prefix = (ASTValuePrefix) node.jjtGetChild(0);
+				ASTValueSuffix suffix = (ASTValueSuffix) node.jjtGetChild(1);
+				if(prefix.firstToken.image.equals("pageContext") && suffix.getPropertyNameToken().image.equals("request")) {
+					append("((HTTPServletRequest)");
+				}
+			}
+		}
 		return node.childrenAccept(this, data);	
 	}
 
@@ -396,8 +401,21 @@
 		} else if(null != node.getPropertyNameToken()) {
 			Token suffix = node.getPropertyNameToken();
 			String ucaseName = suffix.image.substring(0, 1).toUpperCase() + suffix.image.substring(1, suffix.image.length()); 
+
+			// This is a special case.  Note that the type system, no matter how much type information
+			// we would have wouldn't give us the correct result.  We're looking for "pageContext.request" 
+			// here and will add a downcast to (HTTPServletRequest)
+			
 			append(node.firstToken);
 			append("get" + ucaseName + "()", suffix); //$NON-NLS-1$ //$NON-NLS-2$
+			
+			SimpleNode parent = (SimpleNode) node.jjtGetParent();
+			if(suffix.image.equals("request") && parent instanceof ASTValue && //$NON-NLS-1$
+					parent.jjtGetParent() instanceof ASTUnaryExpression && parent.firstToken.image.equals("pageContext")) { //$NON-NLS-1$
+				append(")");
+			} 
+
+
 		} else {
 			append(node.firstToken);
 		}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserTokenManager.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserTokenManager.java
index 50fe376..74a473d 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserTokenManager.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserTokenManager.java
@@ -372,7 +372,7 @@
       if (curChar < 64)
       {
          long l = 1L << curChar;
-         MatchLoop: do
+         do
          {
             switch(jjstateSet[--i])
             {
@@ -541,7 +541,7 @@
       else if (curChar < 128)
       {
          long l = 1L << (curChar & 077);
-         MatchLoop: do
+         do
          {
             switch(jjstateSet[--i])
             {
@@ -621,7 +621,7 @@
          long l1 = 1L << (hiByte & 077);
          int i2 = (curChar & 0xff) >> 6;
          long l2 = 1L << (curChar & 077);
-         MatchLoop: do
+         do
          {
             switch(jjstateSet[--i])
             {
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/preferences/JSPCorePreferenceInitializer.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/preferences/JSPCorePreferenceInitializer.java
index a0f009e..45150ef 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/preferences/JSPCorePreferenceInitializer.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/preferences/JSPCorePreferenceInitializer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 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
@@ -27,7 +27,7 @@
 
 		// compiler/validation preferences
 		node.putBoolean(JSPCorePreferenceNames.VALIDATE_FRAGMENTS, true);
-
+		
 		// code generation preferences
 		node.put(CommonEncodingPreferenceNames.INPUT_CODESET, ""); //$NON-NLS-1$
 		String defaultEnc = "ISO-8859-1";//$NON-NLS-1$
@@ -37,9 +37,5 @@
 		}
 		node.put(CommonEncodingPreferenceNames.OUTPUT_CODESET, defaultEnc);
 		node.put(CommonEncodingPreferenceNames.END_OF_LINE_CODE, ""); //$NON-NLS-1$
-
-		// this could be made smarter by actually looking up the content
-		// type's valid extensions
-		node.put(JSPCorePreferenceNames.DEFAULT_EXTENSION, "jsp"); //$NON-NLS-1$
 	}
 }
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/preferences/JSPCorePreferenceNames.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/preferences/JSPCorePreferenceNames.java
index 04a4406..bda4dd0 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/preferences/JSPCorePreferenceNames.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/preferences/JSPCorePreferenceNames.java
@@ -1,14 +1,3 @@
-/*******************************************************************************
- * 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.jst.jsp.core.internal.preferences;
 
 /**
@@ -20,15 +9,6 @@
 	}
 
 	/**
-	 * The default extension to use when none is specified in the New JSP File
-	 * Wizard.
-	 * <p>
-	 * Value is of type <code>String</code>.
-	 * </p>
-	 */
-	public static final String DEFAULT_EXTENSION = "defaultExtension"; //$NON-NLS-1$
-
-	/**
 	 * Indicates if JSP fragments should be compiled/validated. JSP fragments
 	 * will be validated when true.
 	 * <p>
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/text/IJSPPartitionTypes.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/text/IJSPPartitionTypes.java
index 01e96d8..1146bc8 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/text/IJSPPartitionTypes.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/text/IJSPPartitionTypes.java
@@ -18,7 +18,6 @@
 	String JSP_CONTENT_JAVA = JSP_SCRIPT_PREFIX + "JAVA"; //$NON-NLS-1$
 	String JSP_CONTENT_JAVASCRIPT = JSP_SCRIPT_PREFIX + "JAVASCRIPT"; //$NON-NLS-1$
 	String JSP_DEFAULT_EL = JSP_SCRIPT_PREFIX + "JSP_EL"; //$NON-NLS-1$
-	String JSP_DEFAULT_EL2 = JSP_SCRIPT_PREFIX + "JSP_EL2"; //$NON-NLS-1$
 	
 	String JSP_DIRECTIVE = "org.eclipse.jst.jsp.JSP_DIRECTIVE"; //$NON-NLS-1$
 }
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/text/StructuredTextPartitionerForJSP.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/text/StructuredTextPartitionerForJSP.java
index 37c9251..24dd977 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/text/StructuredTextPartitionerForJSP.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/text/StructuredTextPartitionerForJSP.java
@@ -170,7 +170,7 @@
 	private static final String XHTML_MIME_TYPE = "text/xhtml"; //$NON-NLS-1$
 	private static final String XML_MIME_TYPE = "text/xml"; //$NON-NLS-1$
 
-	private final static String[] fConfiguredContentTypes = new String[]{IJSPPartitionTypes.JSP_DEFAULT, IJSPPartitionTypes.JSP_DEFAULT_EL, IJSPPartitionTypes.JSP_DEFAULT_EL2, IJSPPartitionTypes.JSP_DIRECTIVE, IJSPPartitionTypes.JSP_CONTENT_DELIMITER, IJSPPartitionTypes.JSP_CONTENT_JAVA, IJSPPartitionTypes.JSP_CONTENT_JAVASCRIPT, IJSPPartitionTypes.JSP_COMMENT};
+	private final static String[] fConfiguredContentTypes = new String[]{IJSPPartitionTypes.JSP_DEFAULT, IJSPPartitionTypes.JSP_DEFAULT_EL, IJSPPartitionTypes.JSP_DIRECTIVE, IJSPPartitionTypes.JSP_CONTENT_DELIMITER, IJSPPartitionTypes.JSP_CONTENT_JAVA, IJSPPartitionTypes.JSP_CONTENT_JAVASCRIPT, IJSPPartitionTypes.JSP_COMMENT};
 
 	/**
 	 * @return
@@ -372,9 +372,6 @@
 		else if (region_type == DOMJSPRegionContexts.JSP_EL_OPEN || region_type == DOMJSPRegionContexts.JSP_EL_CONTENT || region_type == DOMJSPRegionContexts.JSP_EL_CLOSE || region_type == DOMJSPRegionContexts.JSP_EL_DQUOTE
 					|| region_type == DOMJSPRegionContexts.JSP_EL_SQUOTE || region_type == DOMJSPRegionContexts.JSP_EL_QUOTED_CONTENT)
 			result = IJSPPartitionTypes.JSP_DEFAULT_EL;
-		else if (region_type == DOMJSPRegionContexts.JSP_VBL_OPEN || region_type == DOMJSPRegionContexts.JSP_VBL_CONTENT || region_type == DOMJSPRegionContexts.JSP_VBL_CLOSE || region_type == DOMJSPRegionContexts.JSP_VBL_DQUOTE
-					|| region_type == DOMJSPRegionContexts.JSP_VBL_SQUOTE || region_type == DOMJSPRegionContexts.JSP_VBL_QUOTED_CONTENT)
-			result = IJSPPartitionTypes.JSP_DEFAULT_EL2;
 		else if (region_type == DOMRegionContext.XML_CONTENT) {
 			// possibly between <jsp:scriptlet>, <jsp:expression>,
 			// <jsp:declaration>
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/DocumentProvider.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/DocumentProvider.java
index 49aa95b..c5a0789 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/DocumentProvider.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/DocumentProvider.java
@@ -130,12 +130,8 @@
 	 * @return Document
 	 */
 	public Document getDocument() {
-		return getDocument(true);
-	}
-
-	public Document getDocument(boolean createEmptyOnFailure) {
 		if (document == null)
-			load(createEmptyOnFailure);
+			load();
 		return document;
 	}
 
@@ -169,7 +165,7 @@
 	public Element getElement(String name) {
 		Element result = null;
 		if (document == null)
-			load(false);
+			load();
 		if (document != null) {
 			result = (Element) getNode(getRootElement(), name);
 		}
@@ -184,9 +180,6 @@
 		if (resolver == null) {
 			resolver = new EntityResolver() {
 				public InputSource resolveEntity(String publicID, String systemID) throws SAXException, IOException {
-					if (!isValidating())
-						return null;
-
 					InputSource result = null;
 					if (getBaseReference() != null) {
 						try {
@@ -387,7 +380,7 @@
 		return fValidating;
 	}
 
-	void load(boolean createEmptyOnFailure) {
+	public void load() {
 		// rootElementName and fileName are expected to be defined at this
 		// point
 		document = getParsedDocument();
@@ -399,20 +392,18 @@
 		}
 
 		if (document == null || rootElement == null) {
-			if (createEmptyOnFailure) {
-				document = getNewDocument();
-				if (document != null) {
-					NodeList children = document.getChildNodes();
+			document = getNewDocument();
+			if (document != null) {
+				NodeList children = document.getChildNodes();
+				for (int i = 0; i < children.getLength(); i++) {
+					if (children.item(i).getNodeType() == Node.ELEMENT_NODE && children.item(i).getNodeName().equals(getRootElementName()))
+						rootElement =  children.item(i);
+				}
+				if (rootElement == null) {
 					for (int i = 0; i < children.getLength(); i++) {
-						if (children.item(i).getNodeType() == Node.ELEMENT_NODE && children.item(i).getNodeName().equals(getRootElementName()))
+						if (children.item(i).getNodeType() == Node.ELEMENT_NODE) {
 							rootElement = children.item(i);
-					}
-					if (rootElement == null) {
-						for (int i = 0; i < children.getLength(); i++) {
-							if (children.item(i).getNodeType() == Node.ELEMENT_NODE) {
-								rootElement = children.item(i);
-								break;
-							}
+							break;
 						}
 					}
 				}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPValidator.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPValidator.java
index 5b6e839..2e1ffb7 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPValidator.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPValidator.java
@@ -20,24 +20,18 @@
 import org.eclipse.core.runtime.content.IContentDescription;
 import org.eclipse.core.runtime.content.IContentType;
 import org.eclipse.jdt.core.compiler.IProblem;
-import org.eclipse.jface.text.IDocument;
 import org.eclipse.jst.jsp.core.internal.JSPCoreMessages;
 import org.eclipse.jst.jsp.core.internal.JSPCorePlugin;
 import org.eclipse.jst.jsp.core.internal.java.IJSPTranslation;
 import org.eclipse.jst.jsp.core.internal.java.JSPTranslation;
 import org.eclipse.jst.jsp.core.internal.java.JSPTranslationAdapter;
 import org.eclipse.jst.jsp.core.internal.java.JSPTranslationAdapterFactory;
-import org.eclipse.jst.jsp.core.internal.java.JSPTranslationExtension;
 import org.eclipse.jst.jsp.core.internal.preferences.JSPCorePreferenceNames;
 import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
 import org.eclipse.wst.sse.core.internal.provisional.StructuredModelManager;
 import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
 import org.eclipse.wst.validation.internal.core.Message;
 import org.eclipse.wst.validation.internal.core.ValidationException;
 import org.eclipse.wst.validation.internal.operations.IWorkbenchContext;
@@ -47,7 +41,6 @@
 import org.eclipse.wst.validation.internal.provisional.core.IValidator;
 import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
 import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
 
 public class JSPValidator implements IValidator {
 
@@ -272,7 +265,6 @@
 		int sourceEnd = translation.getJspOffset(problem.getSourceEnd());
 		if (sourceStart == -1)
 			return null;
-		
 		// line number for marker starts @ 1
 		// line number from document starts @ 0
 		int lineNo = structuredDoc.getLineOfOffset(sourceStart) + 1;
@@ -285,94 +277,10 @@
 		m.setOffset(sourceStart);
 		m.setLength(sourceEnd - sourceStart + 1);
 
-		// need additional adjustment for problems from
-		// indirect (included) files
-		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=119633
-		if(translation.isIndirect(problem.getSourceStart())) {
-			adjustIndirectPosition(m, translation);
-		}
-		
 		return m;
 	}
 
 	/**
-	 * Assumed the message offset is an indirect position.
-	 * In other words, an error from an included file.
-	 * 
-	 * @param m
-	 * @param translation
-	 */
-	private void adjustIndirectPosition(IMessage m, JSPTranslation translation) {
-		
-		if(!(translation instanceof JSPTranslationExtension))
-			return;
-		
-		IDocument jspDoc = ((JSPTranslationExtension)translation).getJspDocument();
-		if(!(jspDoc instanceof IStructuredDocument))
-			return;
-		
-		IStructuredDocument sDoc = (IStructuredDocument)jspDoc;
-		IStructuredDocumentRegion[] regions = sDoc.getStructuredDocumentRegions(0, m.getOffset() + m.getLength());
-		// iterate backwards until you hit the include directive
-		for(int i=regions.length-1; i>=0; i--) {
-			
-			IStructuredDocumentRegion region = regions[i];
-			if(region.getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME) {
-				if(getDirectiveName(region).equals("include")) { //$NON-NLS-1$
-					ITextRegion fileValueRegion = getAttributeValueRegion(region, "file"); //$NON-NLS-1$
-					m.setOffset(region.getStartOffset(fileValueRegion));
-					m.setLength(fileValueRegion.getTextLength());
-					break;
-				}
-			}
-		}
-	}
-	
-	/**
-	 * 
-	 * @param sdr
-	 * @return the jsp directive name
-	 */
-	private String getDirectiveName(IStructuredDocumentRegion sdr) {
-		String name = "";
-		ITextRegionList subRegions = sdr.getRegions();
-		for (int j = 0; j < subRegions.size(); j++) {
-			ITextRegion subRegion = subRegions.get(j);
-			if(subRegion.getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME) {
-				name = sdr.getText(subRegion);
-				break;
-			}
-		}
-		return name;
-	}
-	
-	/**
-	 * 
-	 * @param sdr
-	 * @param attrName
-	 * @return the ITextRegion for the attribute value of the given attribute name
-	 */
-	private ITextRegion getAttributeValueRegion(IStructuredDocumentRegion sdr, String attrName) {
-		ITextRegion valueRegion = null;
-		ITextRegionList subRegions = sdr.getRegions();
-		for (int i = 0; i < subRegions.size(); i++) {
-			ITextRegion subRegion = subRegions.get(i);
-			if(subRegion.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME && sdr.getText(subRegion).equals(attrName)) {
-				
-				for(int j=i+1; i<subRegions.size(); j++) {
-					subRegion = subRegions.get(j);
-					if(subRegion.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
-						valueRegion = subRegion;
-						break;
-					}
-				}
-				break;
-			}
-		}
-		return valueRegion;
-	}
-
-	/**
 	 * When loading model from a file, you need to explicitly add adapter
 	 * factory.
 	 * 
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ProjectDescription.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ProjectDescription.java
index 6e311f1..04bd47b 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ProjectDescription.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ProjectDescription.java
@@ -11,15 +11,19 @@
  *******************************************************************************/
 package org.eclipse.jst.jsp.core.taglib;
 
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.MalformedURLException;
 import java.net.URL;
+import java.net.URLConnection;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 import java.util.Stack;
 
 import org.eclipse.core.filebuffers.FileBuffers;
@@ -49,6 +53,8 @@
 import org.eclipse.jst.jsp.core.internal.util.DocumentProvider;
 import org.eclipse.wst.common.uriresolver.internal.util.URIHelper;
 import org.eclipse.wst.sse.core.internal.util.JarUtilities;
+import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
+import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalog;
 import org.w3c.dom.Document;
 import org.w3c.dom.EntityReference;
 import org.w3c.dom.Node;
@@ -446,15 +452,107 @@
 	void clear() {
 	}
 
+	private ITaglibRecord createCatalogRecord(String urlString) {
+		ITaglibRecord record = null;
+		if (urlString.toLowerCase(Locale.US).endsWith((".jar")) && urlString.startsWith("file:")) {
+			String fileLocation = null;
+			try {
+				URL url = new URL(urlString);
+				fileLocation = url.getFile();
+			}
+			catch (MalformedURLException e) {
+				// not worth reporting
+			}
+			if (fileLocation != null) {
+				JarRecord jarRecord = createJARRecord(fileLocation);
+				String[] entries = JarUtilities.getEntryNames(fileLocation);
+				for (int jEntry = 0; jEntry < entries.length; jEntry++) {
+					if (entries[jEntry].endsWith(".tld")) { //$NON-NLS-1$
+						if (entries[jEntry].equals(JarUtilities.JSP11_TAGLIB)) {
+							jarRecord.has11TLD = true;
+							InputStream contents = JarUtilities.getInputStream(fileLocation, entries[jEntry]);
+							if (contents != null) {
+								TaglibInfo info = extractInfo(fileLocation, contents);
+								jarRecord.info = info;
+							}
+							try {
+								contents.close();
+							}
+							catch (IOException e) {
+							}
+						}
+					}
+				}
+				if (jarRecord.has11TLD) {
+					if (_debugIndexCreation)
+						Logger.log(Logger.INFO_DEBUG, "created catalog record for " + urlString + "@" + jarRecord.getLocation()); //$NON-NLS-1$ //$NON-NLS-2$
+					record = jarRecord;
+				}
+
+			}
+		}
+		else {
+			URL url = null;
+			ByteArrayInputStream cachedContents = null;
+			InputStream tldStream = null;
+			try {
+				url = new URL(urlString);
+				URLConnection connection = url.openConnection();
+				connection.setDefaultUseCaches(false);
+				tldStream = connection.getInputStream();
+			}
+			catch (Exception e1) {
+				Logger.logException(e1);
+			}
+
+			int c;
+			ByteArrayOutputStream buffer = new ByteArrayOutputStream();
+			// array dim restriction?
+			byte bytes[] = new byte[2048];
+			try {
+				while ((c = tldStream.read(bytes)) >= 0) {
+					buffer.write(bytes, 0, c);
+				}
+				cachedContents = new ByteArrayInputStream(buffer.toByteArray());
+			}
+			catch (IOException ioe) {
+				// no cleanup can be done
+			}
+			finally {
+				try {
+					tldStream.close();
+				}
+				catch (IOException e) {
+				}
+			}
+
+			URLRecord urlRecord = null;
+			TaglibInfo info = extractInfo(urlString, cachedContents);
+			if (info != null) {
+				urlRecord = new URLRecord();
+				urlRecord.info = info;
+				urlRecord.baseLocation = urlString;
+				urlRecord.url = url; //$NON-NLS-1$ //$NON-NLS-2$
+			}
+			try {
+				cachedContents.close();
+			}
+			catch (IOException e) {
+			}
+			record = urlRecord;
+		}
+		return record;
+	}
+
 	/**
 	 * @param resource
 	 * @return
 	 */
-	private ITaglibRecord createJARRecord(IResource jar) {
+	private JarRecord createJARRecord(IResource jar) {
 		return createJARRecord(jar.getLocation().toString());
 	}
 
-	private ITaglibRecord createJARRecord(String fileLocation) {
+	private JarRecord createJARRecord(String fileLocation) {
 		JarRecord record = new JarRecord();
 		record.location = new Path(fileLocation);
 		record.urlRecords = new ArrayList(0);
@@ -930,6 +1028,32 @@
 			record = (ITaglibRecord) fClasspathReferences.get(reference);
 		}
 
+		// Check the XML Catalog
+		if (record == null) {
+			ICatalog catalog = XMLCorePlugin.getDefault().getDefaultXMLCatalog();
+			if (catalog != null) {
+				String resolvedString = null;
+				try {
+					// Check as system reference first
+					resolvedString = catalog.resolveSystem(reference);
+					// Check as URI
+					if (resolvedString == null || resolvedString.trim().length() == 0) {
+						resolvedString = catalog.resolveURI(reference);
+					}
+					// Check as public ID
+					if (resolvedString == null || resolvedString.trim().length() == 0) {
+						resolvedString = catalog.resolvePublic(reference, basePath);
+					}
+				}
+				catch (Exception e) {
+					Logger.logException(e);
+				}
+				if (resolvedString != null && resolvedString.trim().length() > 0) {
+					record = createCatalogRecord(resolvedString);
+				}
+			}
+		}
+
 		// If no records were found and no local-root applies, check ALL of
 		// the web.xml files as a fallback
 		if (record == null && fProject.getFullPath().toString().equals(getLocalRoot(basePath))) {
@@ -945,7 +1069,7 @@
 
 	void updateClasspathLibrary(String libraryLocation, int deltaKind) {
 		String[] entries = JarUtilities.getEntryNames(libraryLocation);
-		JarRecord libraryRecord = (JarRecord) createJARRecord(libraryLocation);
+		JarRecord libraryRecord = createJARRecord(libraryLocation);
 		fClasspathJars.put(libraryLocation, libraryRecord);
 		for (int i = 0; i < entries.length; i++) {
 			if (entries[i].equals(JarUtilities.JSP11_TAGLIB)) {
@@ -988,7 +1112,7 @@
 			Logger.log(Logger.INFO_DEBUG, "creating records for JAR " + jar.getFullPath()); //$NON-NLS-1$
 		String jarLocationString = jar.getLocation().toString();
 		String[] entries = JarUtilities.getEntryNames(jar);
-		JarRecord jarRecord = (JarRecord) createJARRecord(jar);
+		JarRecord jarRecord = createJARRecord(jar);
 		fJARReferences.put(jar.getFullPath().toString(), jarRecord);
 		for (int i = 0; i < entries.length; i++) {
 			if (entries[i].endsWith(".tld")) { //$NON-NLS-1$
@@ -1070,7 +1194,7 @@
 			provider.setValidating(false);
 			provider.setRootElementName("web-app"); //$NON-NLS-1$
 			provider.setBaseReference(webxml.getParent().getLocation().toString());
-			document = provider.getDocument(false);
+			document = provider.getDocument();
 		}
 		catch (CoreException e) {
 			Logger.logException(e);
@@ -1105,18 +1229,53 @@
 				path = new Path(URIHelper.normalize(taglibLocation, webxml.getFullPath().toString(), getLocalRoot(webxml.getLocation().toString())));
 			}
 			if (path.segmentCount() > 1) {
-				IFile tldResource = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
-				if (tldResource.isAccessible()) {
-					TLDRecord record = createTLDRecord(tldResource);
-					// the stored URI should reflect the web.xml's value
-					record.info.uri = taglibUri;
+				IFile resource = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
+				if (resource.isAccessible()) {
+					ITaglibRecord record = null;
+					/*
+					 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=125960
+					 * 
+					 * Also support mappings to .jar files
+					 */
+					if (resource.getFileExtension().equalsIgnoreCase(("jar"))) {
+						JarRecord jarRecord = createJARRecord(resource);
+						String[] entries = JarUtilities.getEntryNames(resource);
+						for (int jEntry = 0; jEntry < entries.length; jEntry++) {
+							if (entries[jEntry].endsWith(".tld")) { //$NON-NLS-1$
+								if (entries[jEntry].equals(JarUtilities.JSP11_TAGLIB)) {
+									jarRecord.has11TLD = true;
+									InputStream contents = JarUtilities.getInputStream(resource, entries[jEntry]);
+									if (contents != null) {
+										TaglibInfo info = extractInfo(resource.getLocation().toString(), contents);
+										jarRecord.info = info;
+									}
+									try {
+										contents.close();
+									}
+									catch (IOException e) {
+									}
+								}
+							}
+						}
+						record = jarRecord;
+						// the stored URI should reflect the web.xml's value
+						jarRecord.info.uri = taglibUri;
+						if (_debugIndexCreation)
+							Logger.log(Logger.INFO_DEBUG, "created web.xml record for " + taglibUri + "@" + jarRecord.getLocation()); //$NON-NLS-1$ //$NON-NLS-2$
+					}
+					else {
+						TLDRecord tldRecord = createTLDRecord(resource);
+						record = tldRecord;
+						// the stored URI should reflect the web.xml's value
+						tldRecord.info.uri = taglibUri;
+						if (_debugIndexCreation)
+							Logger.log(Logger.INFO_DEBUG, "created web.xml record for " + taglibUri + "@" + tldRecord.getPath()); //$NON-NLS-1$ //$NON-NLS-2$
+					}
 					webxmlRecord.tldRecords.add(record);
 					getImplicitReferences(webxml.getFullPath().toString()).put(taglibUri, record);
-					if (_debugIndexCreation)
-						Logger.log(Logger.INFO_DEBUG, "created web.xml record for " + taglibUri + "@" + record.getPath()); //$NON-NLS-1$ //$NON-NLS-2$
 					TaglibIndex.fireTaglibRecordEvent(new TaglibRecordEvent(record, deltaKind));
 				}
 			}
 		}
 	}
-}
+}
\ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/TaglibIndex.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/TaglibIndex.java
index 74c8c36..57ea525 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/TaglibIndex.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/TaglibIndex.java
@@ -312,8 +312,7 @@
 	 * @deprecated - is not correct in flexible projects
 	 * @param path -
 	 *            a path under the web-app root
-	 * @return the IPath considered to be the web-app's root for the given
-	 *         path
+	 * @return
 	 */
 	public static IPath getContextRoot(IPath path) {
 		return _instance.internalGetContextRoot(path);
diff --git a/bundles/org.eclipse.jst.jsp.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.jst.jsp.ui/META-INF/MANIFEST.MF
index f7bc023..879c78f 100644
--- a/bundles/org.eclipse.jst.jsp.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.jst.jsp.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jst.jsp.ui; singleton:=true
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 1.0.1.qualifier
 Bundle-Activator: org.eclipse.jst.jsp.ui.internal.JSPUIPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/StructuredTextViewerConfigurationJSP.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/StructuredTextViewerConfigurationJSP.java
index 06ef634..0943cf6 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/StructuredTextViewerConfigurationJSP.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/StructuredTextViewerConfigurationJSP.java
@@ -44,9 +44,7 @@
 import org.eclipse.jst.jsp.ui.internal.style.LineStyleProviderForJSP;
 import org.eclipse.jst.jsp.ui.internal.style.java.LineStyleProviderForJava;
 import org.eclipse.jst.jsp.ui.internal.style.jspel.LineStyleProviderForJSPEL;
-import org.eclipse.jst.jsp.ui.internal.taginfo.JSPInformationProvider;
 import org.eclipse.jst.jsp.ui.internal.taginfo.JSPJavaJavadocHoverProcessor;
-import org.eclipse.jst.jsp.ui.internal.taginfo.JSPJavaJavadocInformationProvider;
 import org.eclipse.jst.jsp.ui.internal.taginfo.JSPTagInfoHoverProcessor;
 import org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants;
 import org.eclipse.wst.css.core.internal.provisional.text.ICSSPartitionTypes;
@@ -308,14 +306,6 @@
 			IInformationPresenter xmlPresenter = getXMLSourceViewerConfiguration().getInformationPresenter(sourceViewer);
 			provider = xmlPresenter.getInformationProvider(IXMLPartitions.XML_DEFAULT);
 		}
-		else if ((partitionType == IJSPPartitionTypes.JSP_DEFAULT) || (partitionType == IJSPPartitionTypes.JSP_DIRECTIVE)) {
-			// JSP tags
-			provider = new JSPInformationProvider();
-		}
-		else if (partitionType == IJSPPartitionTypes.JSP_CONTENT_JAVA) {
-			// JSP java
-			provider = new JSPJavaJavadocInformationProvider();
-		}
 		return provider;
 	}
 
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/JSPUIMessages.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/JSPUIMessages.java
index acc2fce..aeff150 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/JSPUIMessages.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/JSPUIMessages.java
@@ -45,7 +45,6 @@
 	public static String _UI_WIZARD_NEW_HEADING;
 	public static String _UI_WIZARD_NEW_DESCRIPTION;
 	public static String _ERROR_FILENAME_MUST_END_JSP;
-	public static String ResourceGroup_nameExists;
 	public static String NewJSPTemplatesWizardPage_0;
 	public static String NewJSPTemplatesWizardPage_1;
 	public static String NewJSPTemplatesWizardPage_2;
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/JSPUIPluginResources.properties b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/JSPUIPluginResources.properties
index 77444ac..a447662 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/JSPUIPluginResources.properties
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/JSPUIPluginResources.properties
@@ -37,7 +37,6 @@
 _UI_WIZARD_NEW_HEADING = JavaServer Page
 _UI_WIZARD_NEW_DESCRIPTION = Create a new JavaServer Page.
 _ERROR_FILENAME_MUST_END_JSP = The file name must end in one of the following extensions {0}.
-ResourceGroup_nameExists = The same name already exists.
 NewJSPTemplatesWizardPage_0=Select JSP Template
 NewJSPTemplatesWizardPage_1=Select a template as initial content in the JSP page.
 NewJSPTemplatesWizardPage_2=Name
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/AutoImportProposal.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/AutoImportProposal.java
deleted file mode 100644
index d0e1bf9..0000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/AutoImportProposal.java
+++ /dev/null
@@ -1,142 +0,0 @@
-package org.eclipse.jst.jsp.ui.internal.contentassist;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.TextUtilities;
-import org.eclipse.jface.text.contentassist.IContextInformation;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.text.edits.InsertEdit;
-import org.eclipse.text.edits.MalformedTreeException;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-public class AutoImportProposal extends JSPCompletionProposal {
-	
-	// the import string, no quotes or colons
-	String fImportDeclaration;
-	
-	public AutoImportProposal(String importDeclaration, String replacementString, int replacementOffset, int replacementLength, int cursorPosition, Image image, String displayString, IContextInformation contextInformation, String additionalProposalInfo, int relevance, boolean updateReplacementLengthOnValidate) {
-		super(replacementString, replacementOffset, replacementLength, cursorPosition, image, displayString, contextInformation, additionalProposalInfo, relevance, updateReplacementLengthOnValidate);
-		setImportDeclaration(importDeclaration);
-	}
-	
-	public void apply(ITextViewer viewer, char trigger, int stateMask, int offset) {
-		super.apply(viewer, trigger, stateMask, offset);
-		addImportDeclaration(viewer);
-	}
-	/**
-	 * adds the import declaration to the document in the viewer in the appropriate position
-	 * @param viewer
-	 */
-	private void addImportDeclaration(ITextViewer viewer) {
-		
-		IDocument doc = viewer.getDocument();
-		
-		// calculate once and pass along
-		boolean isXml = isXmlFormat(doc);
-		
-		int insertPosition = getInsertPosition(doc, isXml);
-		String insertText = createImportDeclaration(doc, isXml);
-		InsertEdit insert = new InsertEdit(insertPosition, insertText);
-		try {
-			insert.apply(doc);
-		}
-		catch (MalformedTreeException e) {
-			Logger.logException(e);
-		}
-		catch (BadLocationException e) {
-			Logger.logException(e);
-		}
-		
-		// make sure the cursor position after is correct
-		setCursorPosition(getCursorPosition() + insertText.length());
-	}
-	/**
-	 * 
-	 * @param doc
-	 * @param isXml
-	 * @return position after <jsp:root> if xml, otherwise right before the document element
-	 */
-	private int getInsertPosition(IDocument doc, boolean isXml) {
-		int pos = 0;
-		IStructuredModel sModel = StructuredModelManager.getModelManager().getExistingModelForRead(doc);
-		try {
-			if(sModel != null) {
-				if(sModel instanceof IDOMModel) {
-					IDOMDocument documentNode = ((IDOMModel)sModel).getDocument();
-					Node docElement = documentNode.getDocumentElement();
-					if(docElement != null && docElement instanceof IDOMElement) {
-						IStructuredDocumentRegion sdRegion = ((IDOMElement)docElement).getFirstStructuredDocumentRegion();
-						if(isXml) {
-							// insert right after document element
-							pos = sdRegion.getEndOffset();
-						}
-						else {
-							// insert before document element
-							pos = sdRegion.getStartOffset();
-						}
-					}
-				}
-			}
-		}
-		finally {
-			if(sModel != null)
-				sModel.releaseFromRead();
-		}
-		return pos;
-	}
-	/**
-	 * 
-	 * @param doc
-	 * @return true if this document is xml-jsp syntax, otherwise false
-	 */
-	private boolean isXmlFormat(IDocument doc) {
-		boolean isXml = false;
-		IStructuredModel sModel = StructuredModelManager.getModelManager().getExistingModelForRead(doc);
-		try {
-			if(sModel != null) {
-				if(!isXml) {
-					if(sModel instanceof IDOMModel) {
-						IDOMDocument documentNode = ((IDOMModel)sModel).getDocument();
-						Element docElement = documentNode.getDocumentElement();
-						isXml = docElement != null && ((docElement.getNodeName().equals("jsp:root")) || ((((IDOMNode) docElement).getStartStructuredDocumentRegion() == null && ((IDOMNode) docElement).getEndStructuredDocumentRegion() == null))); //$NON-NLS-1$
-					}
-				}				
-			}
-		}
-		finally {
-			if(sModel != null)
-				sModel.releaseFromRead();
-		}
-		return isXml;
-	}
-	/**
-	 * 
-	 * @param doc
-	 * @param isXml
-	 * @return appropriate import declaration string depending if document is xml or not
-	 */
-	private String createImportDeclaration(IDocument doc, boolean isXml) {
-		String delim = (doc instanceof IStructuredDocument) ? ((IStructuredDocument)doc).getLineDelimiter() : TextUtilities.getDefaultLineDelimiter(doc);
-		if(isXml)
-			return delim + "<jsp:directive.page import=\""+getImportDeclaration()+"\"/>"; //$NON-NLS-1$ //$NON-NLS-2$
-		return "<%@page import=\"" + getImportDeclaration() + "\"%>" + delim; //$NON-NLS-1$ //$NON-NLS-2$
-	}
-
-	public String getImportDeclaration() {
-		return fImportDeclaration;
-	}
-	public void setImportDeclaration(String importDeclaration) {
-		fImportDeclaration = importDeclaration;
-	}
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPCompletionProposal.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPCompletionProposal.java
index 6b0eb1f..e0e6c3b 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPCompletionProposal.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPCompletionProposal.java
@@ -22,7 +22,6 @@
 	 */
 	public void apply(ITextViewer viewer, char trigger, int stateMask, int offset) {
 		super.apply(viewer, trigger, stateMask, offset);
-		// not sure why we needed this
-		//viewer.setSelectedRange(getCursorPosition(), 0);
+		viewer.setSelectedRange(getCursorPosition(), 0);
 	}
 }
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPContentAssistProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPContentAssistProcessor.java
index de14905..39858f5 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPContentAssistProcessor.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPContentAssistProcessor.java
@@ -866,48 +866,8 @@
 				jspResults = merge(jspResults, htmlResults);
 			}
 		}
-
-		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=86656
-		if(partitionType == IJSPPartitionTypes.JSP_DIRECTIVE) {
-			ICompletionProposal[] importProposals = getImportProposals(viewer, documentPosition);
-			if(importProposals.length > 0)
-				jspResults = merge(jspResults, importProposals);			
-		}
 		return jspResults;
 	}
-	
-	private ICompletionProposal[] getImportProposals(ITextViewer viewer, int documentPosition) {
-		List importProposals = new ArrayList();
-		ICompletionProposal[] proposals =  getJSPJavaCompletionProposals(viewer, documentPosition);
-		for (int i = 0; i < proposals.length; i++) {
-			if(proposals[i] instanceof JSPCompletionProposal) {
-				
-				ICompletionProposal importProposal = adjustImportProposal((JSPCompletionProposal)proposals[i]);
-				importProposals.add(importProposal);
-			}
-		}
-		return (ICompletionProposal[])importProposals.toArray(new ICompletionProposal[importProposals.size()]);
-	}
-
-	
-	private ICompletionProposal adjustImportProposal(JSPCompletionProposal importProposal) {
-		
-		// just need to remove the ";"
-		// and adjust offsets for the change
-		String newReplace = importProposal.getReplacementString().replaceAll(";", ""); 
-		importProposal.setReplacementString(newReplace);
-		
-		String newDisplay = importProposal.getDisplayString().replaceAll(";", "");
-		importProposal.setDisplayString(newDisplay);
-		
-		int newReplacementLength = importProposal.getReplacementLength()-1;
-		importProposal.setReplacementLength(newReplacementLength);
-		
-		int newCursorPosition = importProposal.getCursorPosition() - 1;
-		importProposal.setCursorPosition(newCursorPosition);
-		
-		return importProposal;
-	}
 
 	/**
 	 * Adds 2 arrays of ICompletionProposals and sorts them with a
@@ -996,7 +956,7 @@
 		JSPJavaContentAssistProcessor p = (JSPJavaContentAssistProcessor) fPartitionToProcessorMap.get(IJSPPartitionTypes.JSP_DEFAULT);
 		return p.computeCompletionProposals(viewer, documentPosition);
 	}
-	
+
 	/**
 	 * @param viewer
 	 * @param documentPosition
@@ -1185,7 +1145,8 @@
 			}
 		}
 		
-		addTemplates(request, TemplateContextTypeIdsJSP.ALL);
+		// bug115927 use original document position for all/any region templates
+		addTemplates(request, TemplateContextTypeIdsJSP.ALL, documentPosition);
 		return request;
 	}
 
@@ -1203,6 +1164,17 @@
 	 * @param context
 	 */
 	private void addTemplates(ContentAssistRequest contentAssistRequest, String context) {
+		addTemplates(contentAssistRequest, context, contentAssistRequest.getReplacementBeginPosition());
+	}
+	
+	/**
+	 * Adds templates to the list of proposals
+	 * 
+	 * @param contentAssistRequest
+	 * @param context
+	 * @param startOffset
+	 */
+	private void addTemplates(ContentAssistRequest contentAssistRequest, String context, int startOffset) {
 		if (contentAssistRequest == null)
 			return;
 		
@@ -1214,7 +1186,7 @@
 
 			if (getTemplateCompletionProcessor() != null) {
 				getTemplateCompletionProcessor().setContextType(context);
-				ICompletionProposal[] proposals = getTemplateCompletionProcessor().computeCompletionProposals(fTextViewer, contentAssistRequest.getReplacementBeginPosition());
+				ICompletionProposal[] proposals = getTemplateCompletionProcessor().computeCompletionProposals(fTextViewer, startOffset);
 				for (int i = 0; i < proposals.length; ++i) {
 					if (useProposalList)
 						contentAssistRequest.addProposal(proposals[i]);
@@ -1224,8 +1196,7 @@
 			}
 		}
 	}
-
-
+	
 	protected void addEntityProposals(ContentAssistRequest contentAssistRequest, int documentPosition, ITextRegion completionRegion, IDOMNode treeNode) {
 		// ignore
 	}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPProposalCollector.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPProposalCollector.java
index 829382c..af7392d 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPProposalCollector.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPProposalCollector.java
@@ -85,90 +85,36 @@
 		
 		JSPCompletionProposal jspProposal = null;
 		
-		// ignore constructor proposals (they're not relevant for our JSP proposal list)
-		if(!proposal.isConstructor()) {
-			
-			if(proposal.getKind() == CompletionProposal.TYPE_REF) {
-				String signature = String.valueOf(proposal.getDeclarationSignature());
-				String completion = String.valueOf(proposal.getCompletion());
-				if(completion.indexOf(signature) != -1) {
-					jspProposal = createAutoImportProposal(proposal);			
-				}
-			}
-			
-			// default behavior
-			if(jspProposal == null)
-				jspProposal = createJspProposal(proposal);		
-		}
-		return jspProposal;
-	}
-
-	
-	
-	private JSPCompletionProposal createAutoImportProposal(CompletionProposal proposal) {
-		
-		JSPCompletionProposal jspProposal = null;
-
-		String signature = new String(proposal.getDeclarationSignature());
-		String completion = new String(proposal.getCompletion());
-		
-		// it's fully qualified so we should
-		// add an import statement
-		// create an autoimport proposal
-		String newCompletion = completion.replaceAll(signature + ".", "");
-		
-		// java offset
-		int offset = proposal.getReplaceStart();
-		// replacement length
-		int length = proposal.getReplaceEnd() - offset;
-		// translate offset from Java > JSP
-		offset = fTranslation.getJspOffset(offset);
-		// cursor position after must be calculated
-		int positionAfter = calculatePositionAfter(proposal, newCompletion, offset);
-		
-		// from java proposal
-		IJavaCompletionProposal javaProposal = super.createJavaCompletionProposal(proposal);
-		proposal.getDeclarationSignature();
-		Image image = javaProposal.getImage();
-		String displayString = javaProposal.getDisplayString();
-		displayString = fixupDisplayString(displayString);
-		IContextInformation contextInformation = javaProposal.getContextInformation();
-		String additionalInfo = javaProposal.getAdditionalProposalInfo();
-		int relevance = javaProposal.getRelevance();
-		
-		boolean updateLengthOnValidate = true;
-		
-		jspProposal = new AutoImportProposal(completion, newCompletion, offset, length, positionAfter, image, displayString, contextInformation, additionalInfo, relevance, updateLengthOnValidate);
-		
-		return jspProposal;
-	}
-
-	private JSPCompletionProposal createJspProposal(CompletionProposal proposal) {
-		
-		JSPCompletionProposal jspProposal;
+		// from proposal
 		String completion = String.valueOf(proposal.getCompletion());
-		// java offset
-		int offset = proposal.getReplaceStart();
-		// replacement length
-		int length = proposal.getReplaceEnd() - offset;
-		// translate offset from Java > JSP
-		offset = fTranslation.getJspOffset(offset);
-		// cursor position after must be calculated
-		int positionAfter = calculatePositionAfter(proposal, completion, offset);
+		String mangledName = getMangledName();
 		
-		// from java proposal
-		IJavaCompletionProposal javaProposal = super.createJavaCompletionProposal(proposal);
-		proposal.getDeclarationSignature();
-		Image image = javaProposal.getImage();
-		String displayString = javaProposal.getDisplayString();
-		displayString = fixupDisplayString(displayString);
-		IContextInformation contextInformation = javaProposal.getContextInformation();
-		String additionalInfo = javaProposal.getAdditionalProposalInfo();
-		int relevance = javaProposal.getRelevance();
-		
-		boolean updateLengthOnValidate = true;
-		
-		jspProposal = new JSPCompletionProposal(completion, offset, length, positionAfter, image, displayString, contextInformation, additionalInfo, relevance, updateLengthOnValidate);
+		// ignore constructor proposals
+		// (they will include mangled servlet name)
+		if(mangledName != null && completion.indexOf(mangledName) == -1) {
+			
+			// java offset
+			int offset = proposal.getReplaceStart();
+			// replacement length
+			int length = proposal.getReplaceEnd() - offset;
+			// translate offset from Java > JSP
+			offset = fTranslation.getJspOffset(offset);
+			// cursor position after must be calculated
+			int positionAfter = calculatePositionAfter(proposal, completion, offset);
+			
+			// from java proposal
+			IJavaCompletionProposal javaProposal = super.createJavaCompletionProposal(proposal);
+			Image image = javaProposal.getImage();
+			String displayString = javaProposal.getDisplayString();
+			displayString = fixupDisplayString(displayString);
+			IContextInformation contextInformation = javaProposal.getContextInformation();
+			String additionalInfo = javaProposal.getAdditionalProposalInfo();
+			int relevance = javaProposal.getRelevance();
+			
+			boolean updateLengthOnValidate = true;
+			
+			jspProposal = new JSPCompletionProposal(completion, offset, length, positionAfter, image, displayString, contextInformation, additionalInfo, relevance, updateLengthOnValidate);
+		}
 		return jspProposal;
 	}
 
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPTemplateCompletionProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPTemplateCompletionProcessor.java
index f3214dc..e835787 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPTemplateCompletionProcessor.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPTemplateCompletionProcessor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
+ * 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
@@ -10,14 +10,24 @@
  *******************************************************************************/
 package org.eclipse.jst.jsp.ui.internal.contentassist;
 
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextSelection;
 import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.Region;
 import org.eclipse.jface.text.contentassist.ICompletionProposal;
 import org.eclipse.jface.text.templates.ContextTypeRegistry;
 import org.eclipse.jface.text.templates.Template;
 import org.eclipse.jface.text.templates.TemplateCompletionProcessor;
 import org.eclipse.jface.text.templates.TemplateContext;
 import org.eclipse.jface.text.templates.TemplateContextType;
+import org.eclipse.jface.text.templates.TemplateException;
+import org.eclipse.jface.text.templates.TemplateProposal;
 import org.eclipse.jface.text.templates.persistence.TemplateStore;
 import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
 import org.eclipse.jst.jsp.ui.internal.editor.JSPEditorPluginImageHelper;
@@ -30,12 +40,90 @@
  * JSPTemplateCompletionProcessor is asked for content assist proposals, the
  * jsp content assist processor has already set the context type for
  * templates.
- * 
- * @plannedfor 1.0
  */
 class JSPTemplateCompletionProcessor extends TemplateCompletionProcessor {
+	private static final class ProposalComparator implements Comparator {
+		public int compare(Object o1, Object o2) {
+			return ((TemplateProposal) o2).getRelevance() - ((TemplateProposal) o1).getRelevance();
+		}
+	}
+
+	private static final Comparator fgProposalComparator = new ProposalComparator();
 	private String fContextTypeId = null;
 
+	/*
+	 * Copied from super class except instead of calling createContext(viewer,
+	 * region) call createContext(viewer, region, offset) instead
+	 */
+	public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
+
+		ITextSelection selection = (ITextSelection) viewer.getSelectionProvider().getSelection();
+
+		// adjust offset to end of normalized selection
+		if (selection.getOffset() == offset)
+			offset = selection.getOffset() + selection.getLength();
+
+		String prefix = extractPrefix(viewer, offset);
+		Region region = new Region(offset - prefix.length(), prefix.length());
+		TemplateContext context = createContext(viewer, region, offset);
+		if (context == null)
+			return new ICompletionProposal[0];
+
+		context.setVariable("selection", selection.getText()); // name of the
+																// selection
+																// variables
+																// {line,
+																// word}_selection
+																// //$NON-NLS-1$
+
+		Template[] templates = getTemplates(context.getContextType().getId());
+
+		List matches = new ArrayList();
+		for (int i = 0; i < templates.length; i++) {
+			Template template = templates[i];
+			try {
+				context.getContextType().validate(template.getPattern());
+			}
+			catch (TemplateException e) {
+				continue;
+			}
+			if (template.matches(prefix, context.getContextType().getId()))
+				matches.add(createProposal(template, context, (IRegion) region, getRelevance(template, prefix)));
+		}
+
+		Collections.sort(matches, fgProposalComparator);
+
+		return (ICompletionProposal[]) matches.toArray(new ICompletionProposal[matches.size()]);
+	}
+
+	/**
+	 * Creates a concrete template context for the given region in the
+	 * document. This involves finding out which context type is valid at the
+	 * given location, and then creating a context of this type. The default
+	 * implementation returns a <code>SmartReplaceTemplateContext</code> for
+	 * the context type at the given location. This takes the offset at which
+	 * content assist was invoked into consideration.
+	 * 
+	 * @param viewer
+	 *            the viewer for which the context is created
+	 * @param region
+	 *            the region into <code>document</code> for which the
+	 *            context is created
+	 * @param offset
+	 *            the original offset where content assist was invoked
+	 * @return a template context that can handle template insertion at the
+	 *         given location, or <code>null</code>
+	 */
+	private TemplateContext createContext(ITextViewer viewer, IRegion region, int offset) {
+		// pretty much same code as super.createContext except create SmartReplaceTemplateContext
+		TemplateContextType contextType = getContextType(viewer, region);
+		if (contextType != null) {
+			IDocument document = viewer.getDocument();
+			return new ReplaceNameTemplateContext(contextType, document, region.getOffset(), region.getLength(), offset);
+		}
+		return null;
+	}
+	
 	protected ICompletionProposal createProposal(Template template, TemplateContext context, IRegion region, int relevance) {
 		return new CustomTemplateProposal(template, context, region, getImage(template), relevance);
 	}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/ReplaceNameTemplateContext.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/ReplaceNameTemplateContext.java
new file mode 100644
index 0000000..1f4e9d1
--- /dev/null
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/ReplaceNameTemplateContext.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 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.jst.jsp.ui.internal.contentassist;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.templates.DocumentTemplateContext;
+import org.eclipse.jface.text.templates.Template;
+import org.eclipse.jface.text.templates.TemplateBuffer;
+import org.eclipse.jface.text.templates.TemplateContextType;
+import org.eclipse.jface.text.templates.TemplateException;
+
+/**
+ * Just like DocumentTemplateContext except if an insert offset is passed in,
+ * during evaluation, the "prefix" before the template will be checked to see
+ * if it matches the template name. If so, overwrite the template name.
+ * Otherwise, just insert the template at the insert offset location (by not
+ * overwriting the prefix text)
+ */
+public class ReplaceNameTemplateContext extends DocumentTemplateContext {
+	private int fInsertOffset = -1;
+
+	/**
+	 * Creates a document template context.
+	 * 
+	 * @param type
+	 *            the context type
+	 * @param document
+	 *            the document this context applies to
+	 * @param offset
+	 *            the offset of the document region
+	 * @param length
+	 *            the length of the document region
+	 */
+	public ReplaceNameTemplateContext(TemplateContextType type, IDocument document, int offset, int length) {
+		this(type, document, new Position(offset, length));
+	}
+
+	/**
+	 * Creates a document template context. The supplied <code>Position</code>
+	 * will be queried to compute the <code>getStart</code> and
+	 * <code>getEnd</code> methods, which will therefore answer updated
+	 * position data if it is registered with the document.
+	 * 
+	 * @param type
+	 *            the context type
+	 * @param document
+	 *            the document this context applies to
+	 * @param position
+	 *            the position describing the area of the document which forms
+	 *            the template context
+	 * @since 3.1
+	 */
+	public ReplaceNameTemplateContext(TemplateContextType type, IDocument document, Position position) {
+		super(type, document, position);
+	}
+
+	/**
+	 * Creates a document template context.
+	 * 
+	 * @param type
+	 *            the context type
+	 * @param document
+	 *            the document this context applies to
+	 * @param offset
+	 *            the offset of the document region
+	 * @param length
+	 *            the length of the document region
+	 * @param insertOffset
+	 *            the offset of the document region where insert was
+	 *            originally requested
+	 */
+	public ReplaceNameTemplateContext(TemplateContextType type, IDocument document, int offset, int length, int insertOffset) {
+		this(type, document, new Position(offset, length));
+		fInsertOffset = insertOffset;
+	}
+
+	/*
+	 * @see org.eclipse.jface.text.templates.TemplateContext#evaluate(org.eclipse.jface.text.templates.Template)
+	 */
+	public TemplateBuffer evaluate(Template template) throws BadLocationException, TemplateException {
+		TemplateBuffer buffer = super.evaluate(template);
+		if (buffer != null) {
+			if (fInsertOffset > -1 && fInsertOffset > getStart()) {
+				String prefix = getDocument().get(getStart(), fInsertOffset - getStart());
+				if (!template.getName().startsWith(prefix)) {
+					// generate a new buffer that actually contains the
+					// text that was going to be overwritten
+					buffer = new TemplateBuffer(prefix + buffer.getString(), buffer.getVariables());
+				}
+			}
+		}
+		return buffer;
+	}
+}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPFilesPreferencePage.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPFilesPreferencePage.java
index f81c4e4..991a942 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPFilesPreferencePage.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPFilesPreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004 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
@@ -10,13 +10,10 @@
  *******************************************************************************/
 package org.eclipse.jst.jsp.ui.internal.preferences.ui;
 
-import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Preferences;
-import org.eclipse.core.runtime.content.IContentType;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jst.jsp.core.internal.JSPCorePlugin;
 import org.eclipse.jst.jsp.core.internal.preferences.JSPCorePreferenceNames;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
 import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
 import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
 import org.eclipse.jst.jsp.ui.internal.editor.IHelpContextIds;
@@ -55,7 +52,7 @@
 	protected Control createContents(Composite parent) {
 		Control c = super.createContents(parent);
 
-		Group g = createGroup((Composite) c, 1);
+		Group g = createGroup((Composite)c, 1);
 		g.setText(JSPUIMessages.JSPFilesPreferencePage_0);
 		fValidateFragments = createCheckBox(g, JSPUIMessages.JSPFilesPreferencePage_1);
 		boolean validateFragments = getModelPreferences().getBoolean(JSPCorePreferenceNames.VALIDATE_FRAGMENTS);
@@ -74,10 +71,6 @@
 		// no loading preferences
 	}
 
-	protected IContentType getContentType() {
-		return Platform.getContentTypeManager().getContentType(ContentTypeIdForJSP.ContentTypeID_JSP);
-	}
-
 	/*
 	 * (non-Javadoc)
 	 * 
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/HTMLPrinter.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/HTMLPrinter.java
index 25dfb44..031b108 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/HTMLPrinter.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/HTMLPrinter.java
@@ -17,7 +17,6 @@
 
 import org.eclipse.jst.jsp.ui.internal.Logger;
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.SWTError;
 import org.eclipse.swt.graphics.RGB;
 import org.eclipse.swt.widgets.Display;
 
@@ -32,28 +31,34 @@
 	static RGB BG_COLOR_RGB = null;
 
 	static {
-		final Display display = Display.getDefault();
-		if (display != null && !display.isDisposed()) {
-			try {
+		// try to do in advance
+		getSystemBGColor();
+	}
+
+	private static RGB getSystemBGColor() {
+		RGB result = null;
+		if (BG_COLOR_RGB == null) {
+			final Display display = Display.getCurrent();
+			if (display != null && !display.isDisposed()) {
+
 				display.asyncExec(new Runnable() {
-					/*
-					 * @see java.lang.Runnable#run()
-					 */
 					public void run() {
-						BG_COLOR_RGB = display.getSystemColor(SWT.COLOR_INFO_BACKGROUND).getRGB();
+						if (display != null && !display.isDisposed()) {
+							BG_COLOR_RGB = display.getSystemColor(SWT.COLOR_INFO_BACKGROUND).getRGB();
+						}
 					}
 				});
-			}
-			catch (SWTError err) {
-				// see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=45294
-				if (err.code != SWT.ERROR_DEVICE_DISPOSED)
-					throw err;
+
 			}
 		}
+		else {
+			result = BG_COLOR_RGB;
+		}
+		return result;
 	}
 
 	private HTMLPrinter() {
-		// nothing
+		super();
 	}
 
 	private static String replace(String text, char c, String s) {
@@ -77,8 +82,6 @@
 	}
 
 	public static String convertToHTMLContent(String content) {
-		content = replace(content, '&', "&amp;"); //$NON-NLS-1$
-		content = replace(content, '"', "&quot;"); //$NON-NLS-1$
 		content = replace(content, '<', "&lt;"); //$NON-NLS-1$
 		return replace(content, '>', "&gt;"); //$NON-NLS-1$
 	}
@@ -98,7 +101,7 @@
 		}
 		catch (IOException x) {
 			// never expected
-			Logger.log(Logger.WARNING_DEBUG, x.getMessage(), x);
+			Logger.logException(x);
 		}
 
 		return null;
@@ -156,18 +159,22 @@
 	}
 
 	public static void insertPageProlog(StringBuffer buffer, int position) {
-		insertPageProlog(buffer, position, getBgColor());
+		insertPageProlog(buffer, position, getBgColor()); //$NON-NLS-1$
 	}
 
 	public static void insertPageProlog(StringBuffer buffer, int position, URL styleSheetURL) {
-		insertPageProlog(buffer, position, getBgColor(), styleSheetURL);
+		insertPageProlog(buffer, position, getBgColor(), styleSheetURL); //$NON-NLS-1$
 	}
 
-	private static RGB getBgColor() {
-		if (BG_COLOR_RGB != null)
-			return BG_COLOR_RGB;
-		// RGB value of info bg color on WindowsXP
-		return new RGB(255, 255, 225);
+	static RGB getBgColor() {
+		RGB result = getSystemBGColor();
+		if (result == null) {
+			// use RGB value of default info bg color
+			// on WindowsXP
+			result = new RGB(255, 255, 225);
+		}
+		return result;
+
 	}
 
 	public static void addPageProlog(StringBuffer buffer) {
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPInformationProvider.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPInformationProvider.java
deleted file mode 100644
index b2f680b..0000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPInformationProvider.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jst.jsp.ui.internal.taginfo;
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextHover;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.information.IInformationProvider;
-import org.eclipse.jface.text.information.IInformationProviderExtension;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
-
-/**
- * Provides context help for JSP tags (Show tooltip description)
- */
-public class JSPInformationProvider implements IInformationProvider, IInformationProviderExtension {
-	private ITextHover fTextHover = null;
-
-	public JSPInformationProvider() {
-		fTextHover = SSEUIPlugin.getDefault().getTextHoverManager().createBestMatchHover(new JSPTagInfoHoverProcessor());
-	}
-
-	public IRegion getSubject(ITextViewer textViewer, int offset) {
-		return fTextHover.getHoverRegion(textViewer, offset);
-	}
-
-	public String getInformation(ITextViewer textViewer, IRegion subject) {
-		return (String) getInformation2(textViewer, subject);
-	}
-
-	public Object getInformation2(ITextViewer textViewer, IRegion subject) {
-		return fTextHover.getHoverInfo(textViewer, subject);
-	}
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPJavaJavadocHoverProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPJavaJavadocHoverProcessor.java
index 1c900cc..7ee1293 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPJavaJavadocHoverProcessor.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPJavaJavadocHoverProcessor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004 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
@@ -18,84 +18,91 @@
 import org.eclipse.jdt.ui.JavaElementLabels;
 import org.eclipse.jdt.ui.JavadocContentAccess;
 import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextHover;
 import org.eclipse.jface.text.ITextViewer;
 import org.eclipse.jst.jsp.core.internal.java.IJSPTranslation;
 import org.eclipse.jst.jsp.core.internal.java.JSPTranslation;
 import org.eclipse.jst.jsp.core.internal.java.JSPTranslationAdapter;
 import org.eclipse.wst.sse.core.internal.provisional.StructuredModelManager;
-import org.eclipse.wst.sse.ui.internal.taginfo.AbstractHoverProcessor;
 import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
 import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
 
 /**
  * Provides javadoc hover help documentation for java code inside JSPs
  */
-public class JSPJavaJavadocHoverProcessor extends AbstractHoverProcessor {
-	/*
-	 * Bulk of the work was copied from
-	 * org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover
-	 */
-	private final long LABEL_FLAGS = JavaElementLabels.ALL_FULLY_QUALIFIED | JavaElementLabels.M_PRE_RETURNTYPE | JavaElementLabels.M_PARAMETER_TYPES | JavaElementLabels.M_PARAMETER_NAMES | JavaElementLabels.M_EXCEPTIONS | JavaElementLabels.F_PRE_TYPE_SIGNATURE | JavaElementLabels.M_PRE_TYPE_PARAMETERS | JavaElementLabels.T_TYPE_PARAMETERS | JavaElementLabels.USE_RESOLVED;
-	private final long LOCAL_VARIABLE_FLAGS = LABEL_FLAGS & ~JavaElementLabels.F_FULLY_QUALIFIED | JavaElementLabels.F_POST_QUALIFIED;
-
+public class JSPJavaJavadocHoverProcessor implements ITextHover {
+	private final long LABEL_FLAGS=  JavaElementLabels.ALL_FULLY_QUALIFIED
+	| JavaElementLabels.M_PRE_RETURNTYPE | JavaElementLabels.M_PARAMETER_TYPES | JavaElementLabels.M_PARAMETER_NAMES | JavaElementLabels.M_EXCEPTIONS 
+	| JavaElementLabels.F_PRE_TYPE_SIGNATURE;
+	
+	private String getInfoText(IJavaElement member) {
+		String label= JavaElementLabels.getElementLabel(member, LABEL_FLAGS);
+		StringBuffer buf= new StringBuffer();
+		for (int i= 0; i < label.length(); i++) {
+			char ch= label.charAt(i);
+			if (ch == '<') {
+				buf.append("&lt;"); //$NON-NLS-1$
+			} else if (ch == '>') {
+				buf.append("&gt;"); //$NON-NLS-1$
+			} else {
+				buf.append(ch);
+			}
+		}
+		return buf.toString();
+	}
+	
 	private String getHoverInfo(IJavaElement[] result) {
-		StringBuffer buffer = new StringBuffer();
-		int nResults = result.length;
+		StringBuffer buffer= new StringBuffer();
+		int nResults= result.length;
 		if (nResults == 0)
 			return null;
-
+		
 		if (nResults > 1) {
-
-			for (int i = 0; i < result.length; i++) {
+			
+			for (int i= 0; i < result.length; i++) {
 				HTMLPrinter.startBulletList(buffer);
-				IJavaElement curr = result[i];
+				IJavaElement curr= result[i];
 				if (curr instanceof IMember || curr.getElementType() == IJavaElement.LOCAL_VARIABLE)
 					HTMLPrinter.addBullet(buffer, getInfoText(curr));
 				HTMLPrinter.endBulletList(buffer);
 			}
-
-		}
-		else {
-
-			IJavaElement curr = result[0];
+			
+		} else {
+			
+			IJavaElement curr= result[0];
 			if (curr instanceof IMember) {
-				IMember member = (IMember) curr;
+				IMember member= (IMember) curr;
 				HTMLPrinter.addSmallHeader(buffer, getInfoText(member));
 				Reader reader;
 				try {
-					reader = JavadocContentAccess.getHTMLContentReader(member, true, true);
-				}
-				catch (JavaModelException ex) {
+					reader= JavadocContentAccess.getHTMLContentReader(member, true);
+				} catch (JavaModelException ex) {
 					return null;
 				}
 				if (reader != null) {
 					HTMLPrinter.addParagraph(buffer, reader);
 				}
-			}
-			else if (curr.getElementType() == IJavaElement.LOCAL_VARIABLE || curr.getElementType() == IJavaElement.TYPE_PARAMETER)
+			} else if (curr.getElementType() == IJavaElement.LOCAL_VARIABLE)
 				HTMLPrinter.addSmallHeader(buffer, getInfoText(curr));
 		}
-
+		
 		if (buffer.length() > 0) {
 			HTMLPrinter.insertPageProlog(buffer, 0);
 			HTMLPrinter.addPageEpilog(buffer);
 			return buffer.toString();
 		}
-
+		
 		return null;
 	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.ITextHover#getHoverInfo(org.eclipse.jface.text.ITextViewer,
-	 *      org.eclipse.jface.text.IRegion)
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.text.ITextHover#getHoverInfo(org.eclipse.jface.text.ITextViewer, org.eclipse.jface.text.IRegion)
 	 */
 	public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) {
 		// get JSP translation object for this viewer's document
 		IDOMModel xmlModel = (IDOMModel) StructuredModelManager.getModelManager().getExistingModelForRead(textViewer.getDocument());
 		try {
-			if (xmlModel != null) {
+			if(xmlModel != null) {
 				IDOMDocument xmlDoc = xmlModel.getDocument();
 				JSPTranslationAdapter adapter = (JSPTranslationAdapter) xmlDoc.getAdapterFor(IJSPTranslation.class);
 				if (adapter != null) {
@@ -106,38 +113,17 @@
 			}
 		}
 		finally {
-			if (xmlModel != null)
+			if(xmlModel != null) 
 				xmlModel.releaseFromRead();
 		}
 		return null;
 	}
 
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.ITextHover#getHoverRegion(org.eclipse.jface.text.ITextViewer,
-	 *      int)
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.text.ITextHover#getHoverRegion(org.eclipse.jface.text.ITextViewer, int)
 	 */
 	public IRegion getHoverRegion(ITextViewer textViewer, int offset) {
 		return JavaWordFinder.findWord(textViewer.getDocument(), offset);
 	}
 
-	private String getInfoText(IJavaElement member) {
-		long flags = member.getElementType() == IJavaElement.LOCAL_VARIABLE ? LOCAL_VARIABLE_FLAGS : LABEL_FLAGS;
-		String label = JavaElementLabels.getElementLabel(member, flags);
-		StringBuffer buf = new StringBuffer();
-		for (int i = 0; i < label.length(); i++) {
-			char ch = label.charAt(i);
-			if (ch == '<') {
-				buf.append("&lt;"); //$NON-NLS-1$
-			}
-			else if (ch == '>') {
-				buf.append("&gt;"); //$NON-NLS-1$
-			}
-			else {
-				buf.append(ch);
-			}
-		}
-		return buf.toString();
-	}
 }
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPJavaJavadocInformationProvider.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPJavaJavadocInformationProvider.java
deleted file mode 100644
index 190f5aa..0000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPJavaJavadocInformationProvider.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jst.jsp.ui.internal.taginfo;
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextHover;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.information.IInformationProvider;
-import org.eclipse.jface.text.information.IInformationProviderExtension;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
-
-/**
- * Provides javadoc context information for java code inside JSPs (Shows
- * tooltip description)
- */
-public class JSPJavaJavadocInformationProvider implements IInformationProvider, IInformationProviderExtension {
-	private ITextHover fTextHover = null;
-
-	public JSPJavaJavadocInformationProvider() {
-		fTextHover = SSEUIPlugin.getDefault().getTextHoverManager().createBestMatchHover(new JSPJavaJavadocHoverProcessor());
-	}
-
-	public IRegion getSubject(ITextViewer textViewer, int offset) {
-		return fTextHover.getHoverRegion(textViewer, offset);
-	}
-
-	public String getInformation(ITextViewer textViewer, IRegion subject) {
-		return (String) getInformation2(textViewer, subject);
-	}
-
-	public Object getInformation2(ITextViewer textViewer, IRegion subject) {
-		return fTextHover.getHoverInfo(textViewer, subject);
-	}
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewJSPWizard.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewJSPWizard.java
index 969558c..c96288e 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewJSPWizard.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewJSPWizard.java
@@ -1,13 +1,3 @@
-/*******************************************************************************
- * 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.jst.jsp.ui.internal.wizard;
 
 import java.io.ByteArrayInputStream;
@@ -18,11 +8,8 @@
 import java.util.List;
 
 import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Preferences;
 import org.eclipse.core.runtime.content.IContentType;
@@ -31,7 +18,6 @@
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.wizard.Wizard;
 import org.eclipse.jst.jsp.core.internal.JSPCorePlugin;
-import org.eclipse.jst.jsp.core.internal.preferences.JSPCorePreferenceNames;
 import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
 import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
 import org.eclipse.jst.jsp.ui.internal.Logger;
@@ -51,46 +37,16 @@
 	private WizardNewFileCreationPage fNewFilePage;
 	private NewJSPTemplatesWizardPage fNewFileTemplatesPage;
 	private IStructuredSelection fSelection;
-	private IContentType fContentType;
 	private List fValidExtensions = null;
 
 	/**
-	 * Adds default extension to the filename
-	 * 
-	 * @param filename
-	 * @return
-	 */
-	String addDefaultExtension(String filename) {
-		StringBuffer newFileName = new StringBuffer(filename);
-
-		Preferences preference = JSPCorePlugin.getDefault().getPluginPreferences();
-		String ext = preference.getString(JSPCorePreferenceNames.DEFAULT_EXTENSION);
-
-		newFileName.append("."); //$NON-NLS-1$
-		newFileName.append(ext);
-
-		return newFileName.toString();
-	}
-
-	/**
-	 * Get content type associated with this new file wizard
-	 * 
-	 * @return IContentType
-	 */
-	IContentType getContentType() {
-		if (fContentType == null)
-			fContentType = Platform.getContentTypeManager().getContentType(ContentTypeIdForJSP.ContentTypeID_JSP);
-		return fContentType;
-	}
-
-	/**
 	 * Get list of valid extensions for JSP Content type
 	 * 
 	 * @return
 	 */
 	List getValidExtensions() {
 		if (fValidExtensions == null) {
-			IContentType type = getContentType();
+			IContentType type = Platform.getContentTypeManager().getContentType(ContentTypeIdForJSP.ContentTypeID_JSP);
 			fValidExtensions = new ArrayList(Arrays.asList(type.getFileSpecs(IContentType.FILE_EXTENSION_SPEC)));
 		}
 		return fValidExtensions;
@@ -99,33 +55,12 @@
 	public void addPages() {
 		fNewFilePage = new WizardNewFileCreationPage("JSPWizardNewFileCreationPage", new StructuredSelection(IDE.computeSelectedResources(fSelection))) { //$NON-NLS-1$
 			protected boolean validatePage() {
-				IContentType type = getContentType();
-				String fileName = getFileName();
-				// check that filename does not contain invalid extension
-				if ((fileName.lastIndexOf('.') != -1) && (!type.isAssociatedWith(fileName))) {
+				IPath handlePath = new Path(getFileName());
+				String extension = handlePath.getFileExtension();
+				if (extension == null || !getValidExtensions().contains(extension)) {
 					setErrorMessage(NLS.bind(JSPUIMessages._ERROR_FILENAME_MUST_END_JSP, getValidExtensions().toString()));
 					return false;
 				}
-				// no file extension specified so check adding default
-				// extension doesn't equal a file that already exists
-				if (fileName.lastIndexOf('.') == -1) {
-					String newFileName = addDefaultExtension(fileName);
-					IPath resourcePath = getContainerFullPath().append(newFileName);
-
-					IWorkspace workspace = ResourcesPlugin.getWorkspace();
-					IStatus result = workspace.validatePath(resourcePath.toString(), IResource.FOLDER);
-					if (!result.isOK()) {
-						// path invalid
-						setErrorMessage(result.getMessage());
-						return false;
-					}
-
-					if ((workspace.getRoot().getFolder(resourcePath).exists() || workspace.getRoot().getFile(resourcePath).exists())) {
-						setErrorMessage(JSPUIMessages.ResourceGroup_nameExists);
-						return false;
-					}
-				}
-
 				setErrorMessage(null);
 				return super.validatePage();
 			}
@@ -142,7 +77,7 @@
 	public void init(IWorkbench aWorkbench, IStructuredSelection aSelection) {
 		fSelection = aSelection;
 		setWindowTitle(JSPUIMessages._UI_WIZARD_NEW_TITLE);
-
+		
 		ImageDescriptor descriptor = JSPEditorPluginImageHelper.getInstance().getImageDescriptor(JSPEditorPluginImages.IMG_OBJ_WIZBAN_NEWJSPFILE);
 		setDefaultPageImageDescriptor(descriptor);
 	}
@@ -164,60 +99,43 @@
 	}
 
 	public boolean performFinish() {
-		boolean performedOK = false;
-
 		// save user options for next use
 		fNewFileTemplatesPage.saveLastSavedPreferences();
 
-		// no file extension specified so add default extension
-		String fileName = fNewFilePage.getFileName();
-		if (fileName.lastIndexOf('.') == -1) {
-			String newFileName = addDefaultExtension(fileName);
-			fNewFilePage.setFileName(newFileName);
-		}
-
 		// create a new empty file
 		IFile file = fNewFilePage.createNewFile();
 
-		// if there was problem with creating file, it will be null, so make
-		// sure to check
-		if (file != null) {
-			// put template contents into file
-			String templateString = fNewFileTemplatesPage.getTemplateString();
-			if (templateString != null) {
-				// determine the encoding for the new file
-				Preferences preference = JSPCorePlugin.getDefault().getPluginPreferences();
-				String charSet = preference.getString(CommonEncodingPreferenceNames.OUTPUT_CODESET);
+		// put template contents into file
+		String templateString = fNewFileTemplatesPage.getTemplateString();
+		if (templateString != null) {
+			// determine the encoding for the new file
+			Preferences preference = JSPCorePlugin.getDefault().getPluginPreferences();
+			String charSet = preference.getString(CommonEncodingPreferenceNames.OUTPUT_CODESET);
 
-				try {
-					ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
-					OutputStreamWriter outputStreamWriter = null;
-					if (charSet == null || charSet.trim().equals("")) { //$NON-NLS-1$
-						// just use default encoding
-						outputStreamWriter = new OutputStreamWriter(outputStream);
-					}
-					else {
-						outputStreamWriter = new OutputStreamWriter(outputStream, charSet);
-					}
-					outputStreamWriter.write(templateString);
-					outputStreamWriter.flush();
-					outputStreamWriter.close();
-					ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
-					file.setContents(inputStream, true, false, null);
-					inputStream.close();
+			try {
+				ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+				OutputStreamWriter outputStreamWriter = null;
+				if (charSet == null || charSet.trim().equals("")) { //$NON-NLS-1$
+					// just use default encoding
+					outputStreamWriter = new OutputStreamWriter(outputStream);
+				} else {
+					outputStreamWriter = new OutputStreamWriter(outputStream, charSet);
 				}
-				catch (Exception e) {
-					Logger.log(Logger.WARNING_DEBUG, "Could not create contents for new JSP file", e); //$NON-NLS-1$
-				}
+				outputStreamWriter.write(templateString);
+				outputStreamWriter.flush();
+				outputStreamWriter.close();
+				ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
+				file.setContents(inputStream, true, false, null);
+				inputStream.close();
 			}
-
-			// open the file in editor
-			openEditor(file);
-
-			// everything's fine
-			performedOK = true;
+			catch (Exception e) {
+				Logger.log(Logger.WARNING_DEBUG, "Could not create contents for new JSP file", e); //$NON-NLS-1$
+			}
 		}
-		return performedOK;
+
+		// open the file in editor
+		openEditor(file);
+		return true;
 	}
 
 }
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.css.core/META-INF/MANIFEST.MF
index f2026a9..b14badc 100644
--- a/bundles/org.eclipse.wst.css.core/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.css.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.wst.css.core; singleton:=true
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 1.0.0.qualifier
 Bundle-Activator: org.eclipse.wst.css.core.internal.CSSCorePlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorListImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorListImpl.java
index de4a0bc..9c5c7ee 100644
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorListImpl.java
+++ b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorListImpl.java
@@ -124,7 +124,7 @@
 	 */
 	public boolean match(Element element, String pseudoName) {
 		int nSelectors = getLength();
-		selectorListLoop : for (int iSelector = 0; iSelector < nSelectors; iSelector++) {
+		for (int iSelector = 0; iSelector < nSelectors; iSelector++) {
 			// Check each Selector Lists
 			ICSSSelector selector = getSelector(iSelector);
 			if (selector.match(element, pseudoName))
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/preferences/CSSCorePreferenceInitializer.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/preferences/CSSCorePreferenceInitializer.java
index 2056288..fc3997d 100644
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/preferences/CSSCorePreferenceInitializer.java
+++ b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/preferences/CSSCorePreferenceInitializer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 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
@@ -44,11 +44,7 @@
 		}
 		node.put(CommonEncodingPreferenceNames.OUTPUT_CODESET, defaultEnc);
 		node.put(CommonEncodingPreferenceNames.END_OF_LINE_CODE, ""); //$NON-NLS-1$
-
-		// this could be made smarter by actually looking up the content
-		// type's valid extensions
-		node.put(CSSCorePreferenceNames.DEFAULT_EXTENSION, "css"); //$NON-NLS-1$
-
+		
 		// additional css core preferences
 		node.putInt(CSSCorePreferenceNames.FORMAT_PROP_PRE_DELIM, 0);
 		node.putInt(CSSCorePreferenceNames.FORMAT_PROP_POST_DELIM, 1);
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/preferences/CSSCorePreferenceNames.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/preferences/CSSCorePreferenceNames.java
index d3fa08d..130389a 100644
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/preferences/CSSCorePreferenceNames.java
+++ b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/preferences/CSSCorePreferenceNames.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 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
@@ -39,15 +39,6 @@
 	public static final String CLEANUP_CASE_SELECTOR = "cleanupSelectorCase"; //$NON-NLS-1$
 
 	/**
-	 * The default extension to use when none is specified in the New CSS File
-	 * Wizard.
-	 * <p>
-	 * Value is of type <code>String</code>.
-	 * </p>
-	 */
-	public static final String DEFAULT_EXTENSION = "defaultExtension"; //$NON-NLS-1$
-	
-	/**
 	 * The maximum width of a line before a line split is needed.
 	 * <p>
 	 * Value is of type <code>Integer</code>.
diff --git a/bundles/org.eclipse.wst.css.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.css.ui/META-INF/MANIFEST.MF
index 896921f..06bc72a 100644
--- a/bundles/org.eclipse.wst.css.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.css.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.wst.css.ui; singleton:=true
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 1.0.0.qualifier
 Bundle-Activator: org.eclipse.wst.css.ui.internal.CSSUIPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIMessages.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIMessages.java
index c72d102..001bcc9 100644
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIMessages.java
+++ b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIMessages.java
@@ -88,7 +88,6 @@
 	public static String StructureSelectPrevious_tooltip;
 	public static String StructureSelectPrevious_description;
 	public static String Creating_files_encoding;
-	public static String ResourceGroup_nameExists;
 	public static String NewCSSTemplatesWizardPage_0;
 	public static String NewCSSTemplatesWizardPage_1;
 	public static String NewCSSTemplatesWizardPage_2;
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIPluginResources.properties b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIPluginResources.properties
index f686435..dfa88c5 100644
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIPluginResources.properties
+++ b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIPluginResources.properties
@@ -55,7 +55,7 @@
 _UI_WIZARD_NEW_TITLE = New Cascading Style Sheet
 _UI_WIZARD_NEW_HEADING = Cascading Style Sheet
 _UI_WIZARD_NEW_DESCRIPTION = Create a new CSS file.
-_ERROR_FILENAME_MUST_END_CSS = The file name must end in one of the following extensions {0}.
+_ERROR_FILENAME_MUST_END_CSS = The file name must end in .css
 #
 Title_InvalidValue=Invalid Value
 Message_InvalidValue=Invalid property value.
@@ -94,7 +94,6 @@
 StructureSelectPrevious_description=Expand selection to include previous sibling
 ##
 Creating_files_encoding=Creating files encoding preference
-ResourceGroup_nameExists = The same name already exists.
 NewCSSTemplatesWizardPage_0=Select CSS Template
 NewCSSTemplatesWizardPage_1=Select a template as initial content in the CSS page.
 NewCSSTemplatesWizardPage_2=Name
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/ui/CSSFilesPreferencePage.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/ui/CSSFilesPreferencePage.java
index ab01fe8..36f3e38 100644
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/ui/CSSFilesPreferencePage.java
+++ b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/ui/CSSFilesPreferencePage.java
@@ -8,15 +8,12 @@
  ****************************************************************************/
 package org.eclipse.wst.css.ui.internal.preferences.ui;
 
-import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Preferences;
-import org.eclipse.core.runtime.content.IContentType;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.internal.provisional.contenttype.ContentTypeIdForCSS;
 import org.eclipse.wst.css.ui.internal.CSSUIPlugin;
 import org.eclipse.wst.css.ui.internal.editor.IHelpContextIds;
 import org.eclipse.wst.xml.ui.internal.preferences.XMLFilesPreferencePage;
@@ -39,8 +36,4 @@
 		PlatformUI.getWorkbench().getHelpSystem().setHelp(c, IHelpContextIds.CSS_PREFWEBX_FILES_HELPID);
 		return c;
 	}
-
-	protected IContentType getContentType() {
-		return Platform.getContentTypeManager().getContentType(ContentTypeIdForCSS.ContentTypeID_CSS);
-	}
 }
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/wizard/NewCSSWizard.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/wizard/NewCSSWizard.java
index d77ef60..dad0429 100644
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/wizard/NewCSSWizard.java
+++ b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/wizard/NewCSSWizard.java
@@ -1,14 +1,3 @@
-/*******************************************************************************
- * 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.css.ui.internal.wizard;
 
 import java.io.ByteArrayInputStream;
@@ -19,11 +8,8 @@
 import java.util.List;
 
 import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Preferences;
 import org.eclipse.core.runtime.content.IContentType;
@@ -31,7 +17,6 @@
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.osgi.util.NLS;
 import org.eclipse.ui.INewWizard;
 import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.IWorkbenchPage;
@@ -40,7 +25,6 @@
 import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
 import org.eclipse.ui.ide.IDE;
 import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.internal.preferences.CSSCorePreferenceNames;
 import org.eclipse.wst.css.core.internal.provisional.contenttype.ContentTypeIdForCSS;
 import org.eclipse.wst.css.ui.internal.CSSUIMessages;
 import org.eclipse.wst.css.ui.internal.Logger;
@@ -52,80 +36,30 @@
 	private WizardNewFileCreationPage fNewFilePage;
 	private NewCSSTemplatesWizardPage fNewFileTemplatesPage;
 	private IStructuredSelection fSelection;
-	private IContentType fContentType;
 	private List fValidExtensions = null;
 
 	/**
-	 * Adds default extension to the filename
-	 * 
-	 * @param filename
-	 * @return
-	 */
-	String addDefaultExtension(String filename) {
-		StringBuffer newFileName = new StringBuffer(filename);
-
-		Preferences preference = CSSCorePlugin.getDefault().getPluginPreferences();
-		String ext = preference.getString(CSSCorePreferenceNames.DEFAULT_EXTENSION);
-
-		newFileName.append("."); //$NON-NLS-1$
-		newFileName.append(ext);
-
-		return newFileName.toString();
-	}
-
-	/**
-	 * Get content type associated with this new file wizard
-	 * 
-	 * @return IContentType
-	 */
-	IContentType getContentType() {
-		if (fContentType == null)
-			fContentType = Platform.getContentTypeManager().getContentType(ContentTypeIdForCSS.ContentTypeID_CSS);
-		return fContentType;
-	}
-
-	/**
 	 * Get list of valid extensions for CSS Content type
 	 * 
 	 * @return
 	 */
 	List getValidExtensions() {
 		if (fValidExtensions == null) {
-			IContentType type = getContentType();
+			IContentType type = Platform.getContentTypeManager().getContentType(ContentTypeIdForCSS.ContentTypeID_CSS);
 			fValidExtensions = new ArrayList(Arrays.asList(type.getFileSpecs(IContentType.FILE_EXTENSION_SPEC)));
 		}
 		return fValidExtensions;
 	}
-
+	
 	public void addPages() {
 		fNewFilePage = new WizardNewFileCreationPage("CSSWizardNewFileCreationPage", new StructuredSelection(IDE.computeSelectedResources(fSelection))) { //$NON-NLS-1$
 			protected boolean validatePage() {
-				IContentType type = getContentType();
-				String fileName = getFileName();
-				// check that filename does not contain invalid extension
-				if ((fileName.lastIndexOf('.') != -1) && (!type.isAssociatedWith(fileName))) {
-					setErrorMessage(NLS.bind(CSSUIMessages._ERROR_FILENAME_MUST_END_CSS, getValidExtensions().toString()));
+				IPath handlePath = new Path(getFileName());
+				String extension = handlePath.getFileExtension();
+				if (extension == null || !extension.equalsIgnoreCase("css")) { //$NON-NLS-1$
+					setErrorMessage(CSSUIMessages._ERROR_FILENAME_MUST_END_CSS); //$NON-NLS-1$
 					return false;
 				}
-				// no file extension specified so check adding default
-				// extension doesn't equal a file that already exists
-				if (fileName.lastIndexOf('.') == -1) {
-					String newFileName = addDefaultExtension(fileName);
-					IPath resourcePath = getContainerFullPath().append(newFileName);
-
-					IWorkspace workspace = ResourcesPlugin.getWorkspace();
-					IStatus result = workspace.validatePath(resourcePath.toString(), IResource.FOLDER);
-					if (!result.isOK()) {
-						// path invalid
-						setErrorMessage(result.getMessage());
-						return false;
-					}
-
-					if ((workspace.getRoot().getFolder(resourcePath).exists() || workspace.getRoot().getFile(resourcePath).exists())) {
-						setErrorMessage(CSSUIMessages.ResourceGroup_nameExists);
-						return false;
-					}
-				}
 				setErrorMessage(null);
 				return super.validatePage();
 			}
@@ -134,7 +68,7 @@
 		fNewFilePage.setDescription(CSSUIMessages._UI_WIZARD_NEW_DESCRIPTION); //$NON-NLS-1$
 
 		addPage(fNewFilePage);
-
+		
 		fNewFileTemplatesPage = new NewCSSTemplatesWizardPage();
 		addPage(fNewFileTemplatesPage);
 	}
@@ -163,59 +97,42 @@
 	}
 
 	public boolean performFinish() {
-		boolean performedOK = false;
-
 		// save user options for next use
 		fNewFileTemplatesPage.saveLastSavedPreferences();
-
-		// no file extension specified so add default extension
-		String fileName = fNewFilePage.getFileName();
-		if (fileName.lastIndexOf('.') == -1) {
-			String newFileName = addDefaultExtension(fileName);
-			fNewFilePage.setFileName(newFileName);
-		}
-
-		// create a new empty file
+		
 		IFile file = fNewFilePage.createNewFile();
+		
+		// put template contents into file
+		String templateString = fNewFileTemplatesPage.getTemplateString();
+		if (templateString != null) {
+			// determine the encoding for the new file
+			Preferences preference = CSSCorePlugin.getDefault().getPluginPreferences();
+			String charSet = preference.getString(CommonEncodingPreferenceNames.OUTPUT_CODESET);
 
-		// if there was problem with creating file, it will be null, so make
-		// sure to check
-		if (file != null) {
-			// put template contents into file
-			String templateString = fNewFileTemplatesPage.getTemplateString();
-			if (templateString != null) {
-				// determine the encoding for the new file
-				Preferences preference = CSSCorePlugin.getDefault().getPluginPreferences();
-				String charSet = preference.getString(CommonEncodingPreferenceNames.OUTPUT_CODESET);
-
-				try {
-					ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
-					OutputStreamWriter outputStreamWriter = null;
-					if (charSet == null || charSet.trim().equals("")) { //$NON-NLS-1$
-						// just use default encoding
-						outputStreamWriter = new OutputStreamWriter(outputStream);
-					}
-					else {
-						outputStreamWriter = new OutputStreamWriter(outputStream, charSet);
-					}
-					outputStreamWriter.write(templateString);
-					outputStreamWriter.flush();
-					outputStreamWriter.close();
-					ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
-					file.setContents(inputStream, true, false, null);
-					inputStream.close();
+			try {
+				ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+				OutputStreamWriter outputStreamWriter = null;
+				if (charSet == null || charSet.trim().equals("")) { //$NON-NLS-1$
+					// just use default encoding
+					outputStreamWriter = new OutputStreamWriter(outputStream);
+				} else {
+					outputStreamWriter = new OutputStreamWriter(outputStream, charSet);
 				}
-				catch (Exception e) {
-					Logger.log(Logger.WARNING_DEBUG, "Could not create contents for new CSS file", e); //$NON-NLS-1$
-				}
+				outputStreamWriter.write(templateString);
+				outputStreamWriter.flush();
+				outputStreamWriter.close();
+				ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
+				file.setContents(inputStream, true, false, null);
+				inputStream.close();
 			}
-			// open the file in editor
-			openEditor(file);
-
-			// everything's fine
-			performedOK = true;
+			catch (Exception e) {
+				Logger.log(Logger.WARNING_DEBUG, "Could not create contents for new CSS file", e); //$NON-NLS-1$
+			}
 		}
-		return performedOK;
+
+		// open the file in editor
+		openEditor(file);
+		return true;
 	}
 
 }
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.dtd.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.dtd.core/META-INF/MANIFEST.MF
index baa7e1c..3984f31 100644
--- a/bundles/org.eclipse.wst.dtd.core/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.dtd.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.wst.dtd.core; singleton:=true
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 1.0.1.qualifier
 Bundle-Activator: org.eclipse.wst.dtd.core.internal.DTDCorePlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
@@ -17,7 +17,6 @@
  org.eclipse.wst.dtd.core.internal.event,
  org.eclipse.wst.dtd.core.internal.modelhandler,
  org.eclipse.wst.dtd.core.internal.parser,
-  org.eclipse.wst.dtd.core.internal.preferences,
  org.eclipse.wst.dtd.core.internal.provisional.contenttype,
  org.eclipse.wst.dtd.core.internal.provisional.document,
  org.eclipse.wst.dtd.core.internal.provisional.text,
@@ -37,4 +36,4 @@
  org.eclipse.wst.sse.core,
  org.eclipse.wst.xml.core,
  org.eclipse.wst.validation
-Eclipse-LazyStart: true
+Eclipse-AutoStart: true
diff --git a/bundles/org.eclipse.wst.dtd.core/plugin.xml b/bundles/org.eclipse.wst.dtd.core/plugin.xml
index 1b3f04e..cc6c541 100644
--- a/bundles/org.eclipse.wst.dtd.core/plugin.xml
+++ b/bundles/org.eclipse.wst.dtd.core/plugin.xml
@@ -79,9 +79,4 @@
 		</factory>
 	</extension>
 
-	<!-- initialize dtd core preferences -->
-	<extension point="org.eclipse.core.runtime.preferences">
-		<initializer
-			class="org.eclipse.wst.dtd.core.internal.preferences.DTDCorePreferenceInitializer" />
-	</extension>
 </plugin>
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/preferences/DTDCorePreferenceInitializer.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/preferences/DTDCorePreferenceInitializer.java
deleted file mode 100644
index c3fb65a..0000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/preferences/DTDCorePreferenceInitializer.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.dtd.core.internal.preferences;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.core.runtime.preferences.DefaultScope;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.wst.dtd.core.internal.DTDCorePlugin;
-
-/**
- * Sets default values for DTD Core preferences
- */
-public class DTDCorePreferenceInitializer extends AbstractPreferenceInitializer {
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
-	 */
-	public void initializeDefaultPreferences() {
-		IEclipsePreferences node = new DefaultScope().getNode(DTDCorePlugin.getInstance().getBundle().getSymbolicName());
-
-		// this could be made smarter by actually looking up the content
-		// type's valid extensions
-		node.put(DTDCorePreferenceNames.DEFAULT_EXTENSION, "dtd"); //$NON-NLS-1$
-	}
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/preferences/DTDCorePreferenceNames.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/preferences/DTDCorePreferenceNames.java
deleted file mode 100644
index d348e0f..0000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/preferences/DTDCorePreferenceNames.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.dtd.core.internal.preferences;
-
-/**
- * Common preference keys used by DTD core
- * 
- * @plannedfor 1.0
- */
-public class DTDCorePreferenceNames {
-	private DTDCorePreferenceNames() {
-		// empty private constructor so users cannot instantiate class
-	}
-
-	/**
-	 * The default extension to use when none is specified in the New File
-	 * Wizard.
-	 * <p>
-	 * Value is of type <code>String</code>.
-	 * </p>
-	 */
-	public static final String DEFAULT_EXTENSION = "defaultExtension"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.dtd.ui/META-INF/MANIFEST.MF
index 366e1aa..3dc3da7 100644
--- a/bundles/org.eclipse.wst.dtd.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.dtd.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.wst.dtd.ui; singleton:=true
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 1.0.1.qualifier
 Bundle-Activator: org.eclipse.wst.dtd.ui.internal.DTDUIPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/DTDUIMessages.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/DTDUIMessages.java
index d44e604..80eee08 100644
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/DTDUIMessages.java
+++ b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/DTDUIMessages.java
@@ -36,9 +36,6 @@
 	public static String _UI_MOVE_NODE;
 	public static String _UI_MOVE_NODES;
 	public static String _ERROR_FILENAME_MUST_END_DTD;
-	public static String Creating_files;
-	public static String DTDFilesPreferencePage_ExtensionLabel;
-	public static String DTDFilesPreferencePage_ExtensionError;
 	public static String DTDColorPage_0;
 	public static String DTDColorPage_1;
 	public static String DTDColorPage_2;
@@ -56,7 +53,6 @@
 	public static String _UI_WIZARD_NEW_DTD_TITLE;
 	public static String _UI_WIZARD_NEW_DTD_EXPL;
 	public static String _UI_LABEL_DTD_FILE_DELETE;
-	public static String ResourceGroup_nameExists;
 	public static String NewDTDTemplatesWizardPage_0;
 	public static String NewDTDTemplatesWizardPage_1;
 	public static String NewDTDTemplatesWizardPage_2;
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/DTDUIPluginResources.properties b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/DTDUIPluginResources.properties
index 7e34308..b74fd8a 100644
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/DTDUIPluginResources.properties
+++ b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/DTDUIPluginResources.properties
@@ -38,12 +38,7 @@
 _UI_MOVE_NODE=Move Node
 _UI_MOVE_NODES=Move Nodes
 
-_ERROR_FILENAME_MUST_END_DTD=The file name must end in one of the following extensions {0}.
-
-#DTD File page
-Creating_files=Creating files
-DTDFilesPreferencePage_ExtensionLabel=Add this suffix (if not specified):
-DTDFilesPreferencePage_ExtensionError=Suffix must be one of the following {0}.
+_ERROR_FILENAME_MUST_END_DTD=The file name must end in .dtd
 
 #DTD Style page
 DTDColorPage_0=<!ELEMENT Main (One,Two+)>\r\n<!ELEMENT One (Three,Four)>\r\n<!ATTLIST One\r\n oneone CDATA #REQUIRED\r\n>\r\n<!-- You need this -->\r\n<!ELEMENT Two (moremore*)>\r\n<!ATTLIST Two\r\n twotwo CDATA #REQUIRED\r\n twothree (aaa | bbb) "aaa"\r\n>\r\n
@@ -67,7 +62,6 @@
 # copied from dtd core
 _UI_LABEL_DTD_FILE_DELETE=Delete
 ##
-ResourceGroup_nameExists = The same name already exists.
 NewDTDTemplatesWizardPage_0=Select DTD Template
 NewDTDTemplatesWizardPage_1=Select a template as initial content in the DTD page.
 NewDTDTemplatesWizardPage_2=Name
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDFilesPreferencePage.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDFilesPreferencePage.java
index 90ffffd..e8df96f 100644
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDFilesPreferencePage.java
+++ b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDFilesPreferencePage.java
@@ -12,57 +12,31 @@
  *******************************************************************************/
 package org.eclipse.wst.dtd.ui.internal.preferences;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Preferences;
-import org.eclipse.core.runtime.content.IContentType;
 import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Text;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.wst.dtd.core.internal.DTDCorePlugin;
-import org.eclipse.wst.dtd.core.internal.preferences.DTDCorePreferenceNames;
-import org.eclipse.wst.dtd.core.internal.provisional.contenttype.ContentTypeIdForDTD;
-import org.eclipse.wst.dtd.ui.internal.DTDUIMessages;
 import org.eclipse.wst.dtd.ui.internal.DTDUIPlugin;
 import org.eclipse.wst.dtd.ui.internal.editor.IHelpContextIds;
 import org.eclipse.wst.sse.ui.internal.preferences.ui.AbstractPreferencePage;
 
 
 public class DTDFilesPreferencePage extends AbstractPreferencePage {
-	private Text fDefaultSuffix = null;
-	private List fValidExtensions = null;
 
 	protected Control createContents(Composite parent) {
+		noDefaultAndApplyButton();
+		
 		Composite composite = (Composite) super.createContents(parent);
 		PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.DTD_PREFWEBX_FILES_HELPID);
 
-		Group creatingGroup = createGroup(composite, 2);
-		creatingGroup.setText(DTDUIMessages.Creating_files);
-
-		// Default extension for New file Wizard
-		createLabel(creatingGroup, DTDUIMessages.DTDFilesPreferencePage_ExtensionLabel);
-		fDefaultSuffix = createTextField(creatingGroup);
-		fDefaultSuffix.addModifyListener(this);
-
 		setSize(composite);
 		loadPreferences();
 
 		return composite;
 	}
 
-	public void dispose() {
-		fDefaultSuffix.removeModifyListener(this);
-		super.dispose();
-	}
-
 	protected IPreferenceStore doGetPreferenceStore() {
 		return DTDUIPlugin.getDefault().getPreferenceStore();
 	}
@@ -71,28 +45,6 @@
 		DTDCorePlugin.getInstance().savePluginPreferences(); // model
 	}
 
-	/**
-	 * Get content type associated with this new file wizard
-	 * 
-	 * @return IContentType
-	 */
-	private IContentType getContentType() {
-		return Platform.getContentTypeManager().getContentType(ContentTypeIdForDTD.ContentTypeID_DTD);
-	}
-
-	/**
-	 * Get list of valid extensions
-	 * 
-	 * @return List
-	 */
-	private List getValidExtensions() {
-		if (fValidExtensions == null) {
-			IContentType type = getContentType();
-			fValidExtensions = new ArrayList(Arrays.asList(type.getFileSpecs(IContentType.FILE_EXTENSION_SPEC)));
-		}
-		return fValidExtensions;
-	}
-
 	/*
 	 * (non-Javadoc)
 	 * 
@@ -102,18 +54,6 @@
 		return DTDCorePlugin.getInstance().getPluginPreferences();
 	}
 
-	protected void initializeValues() {
-		String suffix = getModelPreferences().getString(DTDCorePreferenceNames.DEFAULT_EXTENSION);
-		fDefaultSuffix.setText(suffix);
-	}
-
-	protected void performDefaults() {
-		String suffix = getModelPreferences().getDefaultString(DTDCorePreferenceNames.DEFAULT_EXTENSION);
-		fDefaultSuffix.setText(suffix);
-
-		super.performDefaults();
-	}
-
 	public boolean performOk() {
 		boolean result = super.performOk();
 
@@ -121,27 +61,4 @@
 
 		return result;
 	}
-
-	protected void storeValues() {
-		String suffix = fDefaultSuffix.getText();
-		getModelPreferences().setValue(DTDCorePreferenceNames.DEFAULT_EXTENSION, suffix);
-	}
-
-	protected void validateValues() {
-		boolean isValid = false;
-		Iterator i = getValidExtensions().iterator();
-		while (i.hasNext() && !isValid) {
-			String extension = (String) i.next();
-			isValid = extension.equalsIgnoreCase(fDefaultSuffix.getText());
-		}
-
-		if (!isValid) {
-			setErrorMessage(NLS.bind(DTDUIMessages.DTDFilesPreferencePage_ExtensionError, getValidExtensions().toString()));
-			setValid(false);
-		}
-		else {
-			setErrorMessage(null);
-			setValid(true);
-		}
-	}
 }
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/wizard/NewDTDWizard.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/wizard/NewDTDWizard.java
index 88ec64d..0cec6ef 100644
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/wizard/NewDTDWizard.java
+++ b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/wizard/NewDTDWizard.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 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
@@ -19,11 +19,8 @@
 import java.util.List;
 
 import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Preferences;
 import org.eclipse.core.runtime.content.IContentType;
@@ -31,7 +28,6 @@
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.osgi.util.NLS;
 import org.eclipse.ui.INewWizard;
 import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.IWorkbenchPage;
@@ -40,7 +36,6 @@
 import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
 import org.eclipse.ui.ide.IDE;
 import org.eclipse.wst.dtd.core.internal.DTDCorePlugin;
-import org.eclipse.wst.dtd.core.internal.preferences.DTDCorePreferenceNames;
 import org.eclipse.wst.dtd.core.internal.provisional.contenttype.ContentTypeIdForDTD;
 import org.eclipse.wst.dtd.ui.internal.DTDUIMessages;
 import org.eclipse.wst.dtd.ui.internal.Logger;
@@ -52,90 +47,39 @@
 	private WizardNewFileCreationPage fNewFilePage;
 	private NewDTDTemplatesWizardPage fNewFileTemplatesPage;
 	private IStructuredSelection fSelection;
-	private IContentType fContentType;
 	private List fValidExtensions = null;
 
 	/**
-	 * Adds default extension to the filename
-	 * 
-	 * @param filename
-	 * @return
-	 */
-	String addDefaultExtension(String filename) {
-		StringBuffer newFileName = new StringBuffer(filename);
-
-		Preferences preference = DTDCorePlugin.getInstance().getPluginPreferences();
-		String ext = preference.getString(DTDCorePreferenceNames.DEFAULT_EXTENSION);
-
-		newFileName.append("."); //$NON-NLS-1$
-		newFileName.append(ext);
-
-		return newFileName.toString();
-	}
-
-	/**
-	 * Get content type associated with this new file wizard
-	 * 
-	 * @return IContentType
-	 */
-	IContentType getContentType() {
-		if (fContentType == null)
-			fContentType = Platform.getContentTypeManager().getContentType(ContentTypeIdForDTD.ContentTypeID_DTD);
-		return fContentType;
-	}
-
-	/**
 	 * Get list of valid extensions for DTD Content type
 	 * 
 	 * @return
 	 */
 	List getValidExtensions() {
 		if (fValidExtensions == null) {
-			IContentType type = getContentType();
+			IContentType type = Platform.getContentTypeManager().getContentType(ContentTypeIdForDTD.ContentTypeID_DTD);
 			fValidExtensions = new ArrayList(Arrays.asList(type.getFileSpecs(IContentType.FILE_EXTENSION_SPEC)));
 		}
 		return fValidExtensions;
 	}
-
-
+	
 	public void addPages() {
 		fNewFilePage = new WizardNewFileCreationPage("DTDWizardNewFileCreationPage", new StructuredSelection(IDE.computeSelectedResources(fSelection))) { //$NON-NLS-1$
 			protected boolean validatePage() {
-				IContentType type = getContentType();
-				String fileName = getFileName();
-				// check that filename does not contain invalid extension
-				if ((fileName.lastIndexOf('.') != -1) && (!type.isAssociatedWith(fileName))) {
-					setErrorMessage(NLS.bind(DTDUIMessages._ERROR_FILENAME_MUST_END_DTD, getValidExtensions().toString()));
+				IPath handlePath = new Path(getFileName());
+				String extension = handlePath.getFileExtension();
+				if (extension == null || !extension.equalsIgnoreCase("dtd")) { //$NON-NLS-1$
+					setErrorMessage(DTDUIMessages._ERROR_FILENAME_MUST_END_DTD); //$NON-NLS-1$
 					return false;
 				}
-				// no file extension specified so check adding default
-				// extension doesn't equal a file that already exists
-				if (fileName.lastIndexOf('.') == -1) {
-					String newFileName = addDefaultExtension(fileName);
-					IPath resourcePath = getContainerFullPath().append(newFileName);
-
-					IWorkspace workspace = ResourcesPlugin.getWorkspace();
-					IStatus result = workspace.validatePath(resourcePath.toString(), IResource.FOLDER);
-					if (!result.isOK()) {
-						// path invalid
-						setErrorMessage(result.getMessage());
-						return false;
-					}
-
-					if ((workspace.getRoot().getFolder(resourcePath).exists() || workspace.getRoot().getFile(resourcePath).exists())) {
-						setErrorMessage(DTDUIMessages.ResourceGroup_nameExists);
-						return false;
-					}
-				}
 				setErrorMessage(null);
 				return super.validatePage();
 			}
 		};
-		fNewFilePage.setTitle(DTDUIMessages._UI_CREATE_NEW_DTD_FILE);
-		fNewFilePage.setDescription(DTDUIMessages._UI_WIZARD_NEW_DTD_EXPL);
+		fNewFilePage.setTitle(DTDUIMessages._UI_CREATE_NEW_DTD_FILE); 
+		fNewFilePage.setDescription(DTDUIMessages._UI_WIZARD_NEW_DTD_EXPL); 
 
 		addPage(fNewFilePage);
-
+		
 		fNewFileTemplatesPage = new NewDTDTemplatesWizardPage();
 		addPage(fNewFileTemplatesPage);
 	}
@@ -143,7 +87,7 @@
 	public void init(IWorkbench aWorkbench, IStructuredSelection aSelection) {
 		fSelection = aSelection;
 		setWindowTitle(DTDUIMessages._UI_WIZARD_NEW_DTD_TITLE); //$NON-NLS-1$
-
+		
 		ImageDescriptor descriptor = DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_WIZBAN_NEWDTDFILE);
 		setDefaultPageImageDescriptor(descriptor);
 	}
@@ -165,60 +109,42 @@
 	}
 
 	public boolean performFinish() {
-		boolean performedOK = false;
-
 		// save user options for next use
 		fNewFileTemplatesPage.saveLastSavedPreferences();
-
-		// no file extension specified so add default extension
-		String fileName = fNewFilePage.getFileName();
-		if (fileName.lastIndexOf('.') == -1) {
-			String newFileName = addDefaultExtension(fileName);
-			fNewFilePage.setFileName(newFileName);
-		}
-
-		// create a new empty file
+		
 		IFile file = fNewFilePage.createNewFile();
+		
+		// put template contents into file
+		String templateString = fNewFileTemplatesPage.getTemplateString();
+		if (templateString != null) {
+			// determine the encoding for the new file
+			Preferences preference = DTDCorePlugin.getInstance().getPluginPreferences();
+			String charSet = preference.getString(CommonEncodingPreferenceNames.OUTPUT_CODESET);
 
-		// if there was problem with creating file, it will be null, so make
-		// sure to check
-		if (file != null) {
-			// put template contents into file
-			String templateString = fNewFileTemplatesPage.getTemplateString();
-			if (templateString != null) {
-				// determine the encoding for the new file
-				Preferences preference = DTDCorePlugin.getInstance().getPluginPreferences();
-				String charSet = preference.getString(CommonEncodingPreferenceNames.OUTPUT_CODESET);
-
-				try {
-					ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
-					OutputStreamWriter outputStreamWriter = null;
-					if (charSet == null || charSet.trim().equals("")) { //$NON-NLS-1$
-						// just use default encoding
-						outputStreamWriter = new OutputStreamWriter(outputStream);
-					}
-					else {
-						outputStreamWriter = new OutputStreamWriter(outputStream, charSet);
-					}
-					outputStreamWriter.write(templateString);
-					outputStreamWriter.flush();
-					outputStreamWriter.close();
-					ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
-					file.setContents(inputStream, true, false, null);
-					inputStream.close();
+			try {
+				ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+				OutputStreamWriter outputStreamWriter = null;
+				if (charSet == null || charSet.trim().equals("")) { //$NON-NLS-1$
+					// just use default encoding
+					outputStreamWriter = new OutputStreamWriter(outputStream);
+				} else {
+					outputStreamWriter = new OutputStreamWriter(outputStream, charSet);
 				}
-				catch (Exception e) {
-					Logger.log(Logger.WARNING_DEBUG, "Could not create contents for new DTD file", e); //$NON-NLS-1$
-				}
+				outputStreamWriter.write(templateString);
+				outputStreamWriter.flush();
+				outputStreamWriter.close();
+				ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
+				file.setContents(inputStream, true, false, null);
+				inputStream.close();
 			}
-
-			// open the file in editor
-			openEditor(file);
-
-			// everything's fine
-			performedOK = true;
+			catch (Exception e) {
+				Logger.log(Logger.WARNING_DEBUG, "Could not create contents for new DTD file", e); //$NON-NLS-1$
+			}
 		}
-		return performedOK;
+
+		// open the file in editor
+		openEditor(file);
+		return true;
 	}
 
 }
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.core/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.wst.html.core/.settings/org.eclipse.jdt.core.prefs
index e015586..a0c83a3 100644
--- a/bundles/org.eclipse.wst.html.core/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.wst.html.core/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Mon May 30 17:55:54 EDT 2005
+#Sat Jan 28 00:54:50 EST 2006
 eclipse.preferences.version=1
 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
 org.eclipse.jdt.core.builder.duplicateResourceTask=warning
@@ -11,7 +11,7 @@
 org.eclipse.jdt.core.compiler.problem.deprecation=warning
 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
 org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
 org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
 org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
@@ -23,7 +23,7 @@
 org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
 org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
 org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
 org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
 org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
 org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
diff --git a/bundles/org.eclipse.wst.html.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.html.core/META-INF/MANIFEST.MF
index d1eb346..e6b6b31 100644
--- a/bundles/org.eclipse.wst.html.core/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.html.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.wst.html.core; singleton:=true
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 1.0.0.qualifier
 Bundle-Activator: org.eclipse.wst.html.core.internal.HTMLCorePlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/AttributeCollection.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/AttributeCollection.java
index f4e6340..53d29b9 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/AttributeCollection.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/AttributeCollection.java
@@ -45,9 +45,8 @@
 
 	/**
 	 * Create an attribute declaration.
-	 * 
-	 * @param attrName
-	 *            java.lang.String
+
+	 * @param attrName java.lang.String
 	 */
 	private HTMLAttrDeclImpl create(String attrName) {
 		HTMLAttrDeclImpl attr = null;
@@ -406,8 +405,7 @@
 		}
 		else if (attrName.equalsIgnoreCase(ATTR_NAME_FRAME)) {
 			// (frame %TFrame; #IMPLIED)
-			// %TFrame; is
-			// (void|above|below|hsides|lhs|rhs|vsides|box|border).
+			// %TFrame; is (void|above|below|hsides|lhs|rhs|vsides|box|border).
 			atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
 			String[] values = {ATTR_VALUE_VOID, ATTR_VALUE_ABOVE, ATTR_VALUE_BELOW, ATTR_VALUE_HSIDES, ATTR_VALUE_LHS, ATTR_VALUE_RHS, ATTR_VALUE_VSIDES, ATTR_VALUE_BOX, ATTR_VALUE_BORDER};
 			atype.setEnumValues(values);
@@ -422,13 +420,13 @@
 			atype.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, ATTR_VALUE_1);
 			attr = new HTMLAttrDeclImpl(ATTR_NAME_FRAMEBORDER, atype, CMAttributeDeclaration.OPTIONAL);
 
-			// <<D215684
+			//<<D215684
 		}
 		else if (attrName.equalsIgnoreCase(ATTR_NAME_FRAMESPACING)) {
 			// (framespacing CDATA; #IMPLIED)
 			atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
 			attr = new HTMLAttrDeclImpl(ATTR_NAME_FRAMESPACING, atype, CMAttributeDeclaration.OPTIONAL);
-			// D215684
+			//D215684
 		}
 		else if (attrName.equalsIgnoreCase(ATTR_NAME_HEADERS)) {
 			// (HEADERS IDREFS; #IMPLIED)
@@ -660,7 +658,7 @@
 
 		}
 		else if (attrName.equalsIgnoreCase(ATTR_NAME_ONFOCUS)) {
-			// (onfocus %Script; #IMPLIED)
+			//	(onfocus %Script; #IMPLIED)
 			atype = new HTMLCMDataTypeImpl(HTMLCMDataType.SCRIPT);
 			attr = new HTMLAttrDeclImpl(ATTR_NAME_ONFOCUS, atype, CMAttributeDeclaration.OPTIONAL);
 
@@ -916,8 +914,8 @@
 		else if (attrName.equalsIgnoreCase(ATTR_NAME_SRC)) {
 			// (src %URI; #IMPLIED)
 			// NOTE: "src" attributes are defined in several elements.
-			// The definition of IMG is different from others.
-			// So, it should be locally defined.
+			//		 The definition of IMG is different from others.
+			//		 So, it should be locally defined.
 			atype = new HTMLCMDataTypeImpl(CMDataType.URI);
 			attr = new HTMLAttrDeclImpl(ATTR_NAME_SRC, atype, CMAttributeDeclaration.OPTIONAL);
 
@@ -959,8 +957,8 @@
 
 		}
 		else if (attrName.equalsIgnoreCase(ATTR_NAME_TEXT)) {
-			// (text %Color; #IMPLIED)
-			atype = new HTMLCMDataTypeImpl(HTMLCMDataType.COLOR);
+			// (text CDATA #IMPLIED)
+			atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
 			attr = new HTMLAttrDeclImpl(ATTR_NAME_TEXT, atype, CMAttributeDeclaration.OPTIONAL);
 
 		}
@@ -1110,9 +1108,9 @@
 	}
 
 	/**
-	 * Get align attribute which has %CAlign; as values.. At this time
-	 * (4/19/2001), it is identical to %LAlign;.
-	 * 
+	 * Get align attribute which has %CAlign; as values..
+	 * At this time (4/19/2001), it is identical to %LAlign;.
+	 *
 	 */
 	public static final HTMLAttrDeclImpl createAlignForCaption() {
 		// align (local)
@@ -1154,12 +1152,13 @@
 	}
 
 	/**
-	 * Create an attribute declaration for <code>align</code> in several
-	 * elements, like <code>P</code>, <code>DIV</code>. The values are
-	 * different from attributes those have the same name in other elements (<code>IMG</code>
-	 * and <code>TABLE</code>). So, it can't treat as global attributes.
-	 * <strong>NOTE: These attribute declaration has no owner CMDocument
-	 * instance.</strong>
+	 * Create an attribute declaration for <code>align</code>
+	 * in several elements, like <code>P</code>, <code>DIV</code>.
+	 * The values are different from attributes those have the same name
+	 * in other elements (<code>IMG</code> and <code>TABLE</code>).
+	 * So, it can't treat as global attributes.
+	 * <strong>NOTE: These attribute declaration has
+	 * no owner CMDocument instance.</strong>
 	 */
 	public static final HTMLAttrDeclImpl createAlignForParagraph() {
 		HTMLCMDataTypeImpl atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
@@ -1172,8 +1171,8 @@
 	}
 
 	/**
-	 * Get %attrs; declarations. %attrs; consists of %coreattrs;, %i18n, and
-	 * %events;.
+	 * Get %attrs; declarations.
+	 * %attrs; consists of %coreattrs;, %i18n, and %events;.
 	 */
 	public void getAttrs(CMNamedNodeMapImpl declarations) {
 		// %coreattrs;
@@ -1196,9 +1195,11 @@
 	}
 
 	/**
-	 * Get %cellhalign; declarations. %cellhaligh; consists of: - (align
-	 * (left|center|right|justify|char) #IMPLIED) - (char %Character;
-	 * #IMPLIED) - (charoff %Length; #IMPLIED)
+	 * Get %cellhalign; declarations.
+	 * %cellhaligh; consists of:
+	 *  - (align (left|center|right|justify|char) #IMPLIED)
+	 *  - (char %Character; #IMPLIED)
+	 *  - (charoff %Length; #IMPLIED)
 	 */
 	public void getCellhalign(CMNamedNodeMapImpl declarations) {
 		// (align (left|center|right|justify|char) #IMPLIED) should be defined
@@ -1217,8 +1218,9 @@
 	}
 
 	/**
-	 * Get %cellvalign; declarations. %cellhaligh; is: - (valign
-	 * (top|middle|bottom|baseline) #IMPLIED)
+	 * Get %cellvalign; declarations.
+	 * %cellhaligh; is:
+	 *  - (valign (top|middle|bottom|baseline) #IMPLIED)
 	 */
 	public void getCellvalign(CMNamedNodeMapImpl declarations) {
 		HTMLAttributeDeclaration dec = getDeclaration(HTML40Namespace.ATTR_NAME_VALIGN);
@@ -1236,9 +1238,7 @@
 
 	/**
 	 * Get a global attribute declaration.
-	 * 
-	 * @param attrName
-	 *            java.lang.String
+	 * @param attrName java.lang.String
 	 */
 	public HTMLAttributeDeclaration getDeclaration(String attrName) {
 		CMNode cmnode = getNamedItem(attrName);
@@ -1254,9 +1254,7 @@
 
 	/**
 	 * Get declarations which are specified by names.
-	 * 
-	 * @param names
-	 *            java.util.Iterator
+	 * @param names java.util.Iterator
 	 */
 	public void getDeclarations(CMNamedNodeMapImpl declarations, Iterator names) {
 		while (names.hasNext()) {
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/format/HTMLElementFormatter.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/format/HTMLElementFormatter.java
index 67c3a7e..27fcc9b 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/format/HTMLElementFormatter.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/format/HTMLElementFormatter.java
@@ -28,7 +28,6 @@
 import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
 import org.w3c.dom.Attr;
 import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
 
 // nakamori_TODO: check and remove CSS formatting
 
@@ -59,14 +58,6 @@
 	/**
 	 */
 	private void formatEndTag(IDOMElement element, HTMLFormatContraints contraints) {
-		Node lastChild = element.getLastChild();
-
-		if (lastChild != null && lastChild instanceof IDOMElement && lastChild.getNodeName().equals("jsp:scriptlet")) { //$NON-NLS-1$
-			insertBreakAfter((IDOMElement) lastChild, contraints);
-			return;
-		}
-
-
 		IStructuredDocumentRegion endStructuredDocumentRegion = element.getEndStructuredDocumentRegion();
 		if (endStructuredDocumentRegion == null)
 			return;
@@ -103,12 +94,10 @@
 			removeTailingSpaces(endStructuredDocumentRegion, prevRegion);
 		}
 
-		// BUG123890 (end tag length was already prefactored into
-		// formatStartTag so no need to do it here)
-		// String newEndTag = endStructuredDocumentRegion.getText();
-		// if (newEndTag != null && newEndTag.length() > 0) {
-		// setWidth(contraints, newEndTag);
-		//		}
+		String newEndTag = endStructuredDocumentRegion.getText();
+		if (newEndTag != null && newEndTag.length() > 0) {
+			setWidth(contraints, newEndTag);
+		}
 	}
 
 	/**
@@ -128,12 +117,6 @@
 	/**
 	 */
 	private void formatStartTag(IDOMElement element, HTMLFormatContraints contraints) {
-
-		if (element.getNodeName().equals("jsp:scriptlet")) { //$NON-NLS-1$
-			insertBreakBefore(element, contraints);
-			return;
-		}
-
 		IStructuredDocumentRegion startStructuredDocumentRegion = element.getStartStructuredDocumentRegion();
 		if (startStructuredDocumentRegion == null)
 			return;
@@ -262,11 +245,8 @@
 				compressTailingSpaces(startStructuredDocumentRegion, lastBreakRegion);
 				count++;
 			}
-			else {
+			else
 				removeTailingSpaces(startStructuredDocumentRegion, lastBreakRegion);
-				// BUG123890 (pre-factor in end tag)
-				count += element.getTagName().length() + 3;
-			}
 			addWidth(contraints, count);
 		}
 		else {
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/preferences/HTMLCorePreferenceInitializer.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/preferences/HTMLCorePreferenceInitializer.java
index 1021cc7..1683e1c 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/preferences/HTMLCorePreferenceInitializer.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/preferences/HTMLCorePreferenceInitializer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 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
@@ -55,9 +55,5 @@
 
 		node.putInt(HTMLCorePreferenceNames.TAG_NAME_CASE, HTMLCorePreferenceNames.LOWER);
 		node.putInt(HTMLCorePreferenceNames.ATTR_NAME_CASE, HTMLCorePreferenceNames.LOWER);
-
-		// this could be made smarter by actually looking up the content
-		// type's valid extensions
-		node.put(HTMLCorePreferenceNames.DEFAULT_EXTENSION, "html"); //$NON-NLS-1$
 	}
 }
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/preferences/HTMLCorePreferenceNames.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/preferences/HTMLCorePreferenceNames.java
index 606783d..90e1d78 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/preferences/HTMLCorePreferenceNames.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/preferences/HTMLCorePreferenceNames.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 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
@@ -23,15 +23,6 @@
 	}
 
 	/**
-	 * The default extension to use when none is specified in the New HTML
-	 * File Wizard.
-	 * <p>
-	 * Value is of type <code>String</code>.
-	 * </p>
-	 */
-	public static final String DEFAULT_EXTENSION = "defaultExtension"; //$NON-NLS-1$
-
-	/**
 	 * The maximum width of a line before a line split is needed.
 	 * <p>
 	 * Value is of type <code>Integer</code>.
diff --git a/bundles/org.eclipse.wst.html.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.html.ui/META-INF/MANIFEST.MF
index 5626995..92311f0 100644
--- a/bundles/org.eclipse.wst.html.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.html.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.wst.html.ui; singleton:=true
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 1.0.0.qualifier
 Bundle-Activator: org.eclipse.wst.html.ui.internal.HTMLUIPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/HTMLUIMessages.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/HTMLUIMessages.java
index 0acfb87..b4547be 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/HTMLUIMessages.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/HTMLUIMessages.java
@@ -29,7 +29,6 @@
 	public static String _UI_WIZARD_NEW_HEADING;
 	public static String _UI_WIZARD_NEW_DESCRIPTION;
 	public static String _ERROR_FILENAME_MUST_END_HTML;
-	public static String ResourceGroup_nameExists;
 	public static String NewHTMLTemplatesWizardPage_0;
 	public static String NewHTMLTemplatesWizardPage_1;
 	public static String NewHTMLTemplatesWizardPage_2;
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/HTMLUIPluginResources.properties b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/HTMLUIPluginResources.properties
index 1aba94a..efddd5d 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/HTMLUIPluginResources.properties
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/HTMLUIPluginResources.properties
@@ -19,7 +19,6 @@
 _UI_WIZARD_NEW_HEADING = HTML Page
 _UI_WIZARD_NEW_DESCRIPTION = Create a new HTML Page.
 _ERROR_FILENAME_MUST_END_HTML = The file name must end in one of the following extensions {0}.
-ResourceGroup_nameExists = The same name already exists.
 NewHTMLTemplatesWizardPage_0=Select HTML Template
 NewHTMLTemplatesWizardPage_1=Select a template as initial content in the HTML page.
 NewHTMLTemplatesWizardPage_2=Name
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLContentAssistProcessor.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLContentAssistProcessor.java
index ff35669..f605ba6 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLContentAssistProcessor.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLContentAssistProcessor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
+ * 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
@@ -119,9 +119,20 @@
 	 * @param context
 	 */
 	private void addTemplates(ContentAssistRequest contentAssistRequest, String context) {
+		addTemplates(contentAssistRequest, context, contentAssistRequest.getReplacementBeginPosition());
+	}
+	
+	/**
+	 * Adds templates to the list of proposals
+	 * 
+	 * @param contentAssistRequest
+	 * @param context
+	 * @param startOffset
+	 */
+	private void addTemplates(ContentAssistRequest contentAssistRequest, String context, int startOffset) {
 		if (contentAssistRequest == null)
 			return;
-
+		
 		// if already adding template proposals for a certain context type, do
 		// not add again
 		if (!fTemplateContexts.contains(context)) {
@@ -130,7 +141,7 @@
 
 			if (getTemplateCompletionProcessor() != null) {
 				getTemplateCompletionProcessor().setContextType(context);
-				ICompletionProposal[] proposals = getTemplateCompletionProcessor().computeCompletionProposals(fTextViewer, contentAssistRequest.getReplacementBeginPosition());
+				ICompletionProposal[] proposals = getTemplateCompletionProcessor().computeCompletionProposals(fTextViewer, startOffset);
 				for (int i = 0; i < proposals.length; ++i) {
 					if (useProposalList)
 						contentAssistRequest.addProposal(proposals[i]);
@@ -151,7 +162,8 @@
 
 	protected ContentAssistRequest computeCompletionProposals(int documentPosition, String matchString, ITextRegion completionRegion, IDOMNode treeNode, IDOMNode xmlnode) {
 		ContentAssistRequest request = super.computeCompletionProposals(documentPosition, matchString, completionRegion, treeNode, xmlnode);
-		addTemplates(request, TemplateContextTypeIdsHTML.ALL);
+		// bug115927 use original document position for all/any region templates
+		addTemplates(request, TemplateContextTypeIdsHTML.ALL, documentPosition);
 		return request;
 	}
 
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLTemplateCompletionProcessor.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLTemplateCompletionProcessor.java
index cc01530..1013fab 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLTemplateCompletionProcessor.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLTemplateCompletionProcessor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
+ * 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
@@ -10,14 +10,24 @@
  *******************************************************************************/
 package org.eclipse.wst.html.ui.internal.contentassist;
 
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextSelection;
 import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.Region;
 import org.eclipse.jface.text.contentassist.ICompletionProposal;
 import org.eclipse.jface.text.templates.ContextTypeRegistry;
 import org.eclipse.jface.text.templates.Template;
 import org.eclipse.jface.text.templates.TemplateCompletionProcessor;
 import org.eclipse.jface.text.templates.TemplateContext;
 import org.eclipse.jface.text.templates.TemplateContextType;
+import org.eclipse.jface.text.templates.TemplateException;
+import org.eclipse.jface.text.templates.TemplateProposal;
 import org.eclipse.jface.text.templates.persistence.TemplateStore;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.wst.html.ui.internal.HTMLUIPlugin;
@@ -33,8 +43,88 @@
  * templates.
  */
 class HTMLTemplateCompletionProcessor extends TemplateCompletionProcessor {
+	private static final class ProposalComparator implements Comparator {
+		public int compare(Object o1, Object o2) {
+			return ((TemplateProposal) o2).getRelevance() - ((TemplateProposal) o1).getRelevance();
+		}
+	}
+
+	private static final Comparator fgProposalComparator = new ProposalComparator();
 	private String fContextTypeId = null;
 
+	/*
+	 * Copied from super class except instead of calling createContext(viewer,
+	 * region) call createContext(viewer, region, offset) instead
+	 */
+	public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
+
+		ITextSelection selection = (ITextSelection) viewer.getSelectionProvider().getSelection();
+
+		// adjust offset to end of normalized selection
+		if (selection.getOffset() == offset)
+			offset = selection.getOffset() + selection.getLength();
+
+		String prefix = extractPrefix(viewer, offset);
+		Region region = new Region(offset - prefix.length(), prefix.length());
+		TemplateContext context = createContext(viewer, region, offset);
+		if (context == null)
+			return new ICompletionProposal[0];
+
+		context.setVariable("selection", selection.getText()); // name of the
+																// selection
+																// variables
+																// {line,
+																// word}_selection
+																// //$NON-NLS-1$
+
+		Template[] templates = getTemplates(context.getContextType().getId());
+
+		List matches = new ArrayList();
+		for (int i = 0; i < templates.length; i++) {
+			Template template = templates[i];
+			try {
+				context.getContextType().validate(template.getPattern());
+			}
+			catch (TemplateException e) {
+				continue;
+			}
+			if (template.matches(prefix, context.getContextType().getId()))
+				matches.add(createProposal(template, context, (IRegion) region, getRelevance(template, prefix)));
+		}
+
+		Collections.sort(matches, fgProposalComparator);
+
+		return (ICompletionProposal[]) matches.toArray(new ICompletionProposal[matches.size()]);
+	}
+
+	/**
+	 * Creates a concrete template context for the given region in the
+	 * document. This involves finding out which context type is valid at the
+	 * given location, and then creating a context of this type. The default
+	 * implementation returns a <code>SmartReplaceTemplateContext</code> for
+	 * the context type at the given location. This takes the offset at which
+	 * content assist was invoked into consideration.
+	 * 
+	 * @param viewer
+	 *            the viewer for which the context is created
+	 * @param region
+	 *            the region into <code>document</code> for which the
+	 *            context is created
+	 * @param offset
+	 *            the original offset where content assist was invoked
+	 * @return a template context that can handle template insertion at the
+	 *         given location, or <code>null</code>
+	 */
+	private TemplateContext createContext(ITextViewer viewer, IRegion region, int offset) {
+		// pretty much same code as super.createContext except create SmartReplaceTemplateContext
+		TemplateContextType contextType = getContextType(viewer, region);
+		if (contextType != null) {
+			IDocument document = viewer.getDocument();
+			return new ReplaceNameTemplateContext(contextType, document, region.getOffset(), region.getLength(), offset);
+		}
+		return null;
+	}
+
 	protected ICompletionProposal createProposal(Template template, TemplateContext context, IRegion region, int relevance) {
 		return new CustomTemplateProposal(template, context, region, getImage(template), relevance);
 	}
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/ReplaceNameTemplateContext.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/ReplaceNameTemplateContext.java
new file mode 100644
index 0000000..eef8962
--- /dev/null
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/ReplaceNameTemplateContext.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 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.html.ui.internal.contentassist;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.templates.DocumentTemplateContext;
+import org.eclipse.jface.text.templates.Template;
+import org.eclipse.jface.text.templates.TemplateBuffer;
+import org.eclipse.jface.text.templates.TemplateContextType;
+import org.eclipse.jface.text.templates.TemplateException;
+
+/**
+ * Just like DocumentTemplateContext except if an insert offset is passed in,
+ * during evaluation, the "prefix" before the template will be checked to see
+ * if it matches the template name. If so, overwrite the template name.
+ * Otherwise, just insert the template at the insert offset location (by not
+ * overwriting the prefix text)
+ */
+public class ReplaceNameTemplateContext extends DocumentTemplateContext {
+	private int fInsertOffset = -1;
+
+	/**
+	 * Creates a document template context.
+	 * 
+	 * @param type
+	 *            the context type
+	 * @param document
+	 *            the document this context applies to
+	 * @param offset
+	 *            the offset of the document region
+	 * @param length
+	 *            the length of the document region
+	 */
+	public ReplaceNameTemplateContext(TemplateContextType type, IDocument document, int offset, int length) {
+		this(type, document, new Position(offset, length));
+	}
+
+	/**
+	 * Creates a document template context. The supplied <code>Position</code>
+	 * will be queried to compute the <code>getStart</code> and
+	 * <code>getEnd</code> methods, which will therefore answer updated
+	 * position data if it is registered with the document.
+	 * 
+	 * @param type
+	 *            the context type
+	 * @param document
+	 *            the document this context applies to
+	 * @param position
+	 *            the position describing the area of the document which forms
+	 *            the template context
+	 * @since 3.1
+	 */
+	public ReplaceNameTemplateContext(TemplateContextType type, IDocument document, Position position) {
+		super(type, document, position);
+	}
+
+	/**
+	 * Creates a document template context.
+	 * 
+	 * @param type
+	 *            the context type
+	 * @param document
+	 *            the document this context applies to
+	 * @param offset
+	 *            the offset of the document region
+	 * @param length
+	 *            the length of the document region
+	 * @param insertOffset
+	 *            the offset of the document region where insert was
+	 *            originally requested
+	 */
+	public ReplaceNameTemplateContext(TemplateContextType type, IDocument document, int offset, int length, int insertOffset) {
+		this(type, document, new Position(offset, length));
+		fInsertOffset = insertOffset;
+	}
+
+	/*
+	 * @see org.eclipse.jface.text.templates.TemplateContext#evaluate(org.eclipse.jface.text.templates.Template)
+	 */
+	public TemplateBuffer evaluate(Template template) throws BadLocationException, TemplateException {
+		TemplateBuffer buffer = super.evaluate(template);
+		if (buffer != null) {
+			if (fInsertOffset > -1 && fInsertOffset > getStart()) {
+				String prefix = getDocument().get(getStart(), fInsertOffset - getStart());
+				if (!template.getName().startsWith(prefix)) {
+					// generate a new buffer that actually contains the
+					// text that was going to be overwritten
+					buffer = new TemplateBuffer(prefix + buffer.getString(), buffer.getVariables());
+				}
+			}
+		}
+		return buffer;
+	}
+}
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLFilesPreferencePage.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLFilesPreferencePage.java
index 165153b..097e0bf 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLFilesPreferencePage.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLFilesPreferencePage.java
@@ -10,20 +10,20 @@
  *******************************************************************************/
 package org.eclipse.wst.html.ui.internal.preferences.ui;
 
-import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Preferences;
-import org.eclipse.core.runtime.content.IContentType;
 import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.wst.html.core.internal.HTMLCorePlugin;
-import org.eclipse.wst.html.core.internal.provisional.contenttype.ContentTypeIdForHTML;
 import org.eclipse.wst.html.ui.internal.HTMLUIMessages;
 import org.eclipse.wst.html.ui.internal.HTMLUIPlugin;
 import org.eclipse.wst.html.ui.internal.editor.IHelpContextIds;
 import org.eclipse.wst.sse.core.internal.encoding.CommonEncodingPreferenceNames;
+import org.eclipse.wst.xml.ui.internal.preferences.EncodingSettings;
 import org.eclipse.wst.xml.ui.internal.preferences.WorkbenchDefaultEncodingSettings;
 import org.eclipse.wst.xml.ui.internal.preferences.XMLFilesPreferencePage;
 
@@ -34,9 +34,7 @@
 		return HTMLCorePlugin.getDefault().getPluginPreferences();
 	}
 
-	/*
-	 * (non-Javadoc)
-	 * 
+	/* (non-Javadoc)
 	 * @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
 	 */
 	protected IPreferenceStore doGetPreferenceStore() {
@@ -47,9 +45,7 @@
 		HTMLCorePlugin.getDefault().savePluginPreferences(); // model
 	}
 
-	/*
-	 * (non-Javadoc)
-	 * 
+	/* (non-Javadoc)
 	 * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
 	 */
 	protected Control createContents(Composite parent) {
@@ -57,12 +53,12 @@
 		createContentsForCreatingOrSavingGroup(scrolledComposite);
 		createContentsForCreatingGroup(scrolledComposite);
 		createContentsForLoadingGroup(scrolledComposite);
-
+		
 		PlatformUI.getWorkbench().getHelpSystem().setHelp(scrolledComposite, IHelpContextIds.HTML_PREFWEBX_FILES_HELPID);
-
+		
 		setSize(scrolledComposite);
 		loadPreferences();
-
+		
 		return scrolledComposite;
 	}
 
@@ -72,57 +68,48 @@
 
 		fInputEncodingSettings = new WorkbenchDefaultEncodingSettings(group);
 	}
-
-	protected IContentType getContentType() {
-		return Platform.getContentTypeManager().getContentType(ContentTypeIdForHTML.ContentTypeID_HTML);
-	}
-
+	
 	protected void initializeValues() {
 		super.initializeValues();
 		initializeValuesForLoadingGroup();
 	}
-
+	
 	protected void initializeValuesForLoadingGroup() {
 		String encoding = getModelPreferences().getString(CommonEncodingPreferenceNames.INPUT_CODESET);
-
+		
 		fInputEncodingSettings.setIANATag(encoding);
 	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
+	
+	/* (non-Javadoc)
 	 * @see org.eclipse.jface.preference.PreferencePage#performDefaults()
 	 */
 	protected void performDefaults() {
 		super.performDefaults();
 		performDefaultsForLoadingGroup();
 	}
-
+	
 	protected void performDefaultsForLoadingGroup() {
 		String encoding = getModelPreferences().getDefaultString(CommonEncodingPreferenceNames.INPUT_CODESET);
 
 		fInputEncodingSettings.setIANATag(encoding);
 	}
-
+	
 	protected void storeValues() {
 		super.storeValues();
 		storeValuesForLoadingGroup();
 	}
-
+	
 	protected void storeValuesForLoadingGroup() {
-		getModelPreferences().setValue(CommonEncodingPreferenceNames.INPUT_CODESET, fInputEncodingSettings.getIANATag());
+		getModelPreferences().setValue(CommonEncodingPreferenceNames.INPUT_CODESET, fInputEncodingSettings.getIANATag());		
 	}
-
 	protected void createContentsForCreatingGroup(Composite parent) {
-		super.createContentsForCreatingGroup(parent);
-		// Group creatingGroup = createGroup(parent, 2);
-		// creatingGroup.setText(HTMLUIMessages.Creating_files);
-		//		
-		// // Encoding..
-		// Label label = createLabel(creatingGroup,
-		// HTMLUIMessages.Encoding_desc);
-		// ((GridData)label.getLayoutData()).horizontalSpan = 2;
-		// fEncodingSettings = new EncodingSettings(creatingGroup);
-		// ((GridData)fEncodingSettings.getLayoutData()).horizontalSpan = 2;
+		Group creatingGroup = createGroup(parent, 2);
+		creatingGroup.setText(HTMLUIMessages.Creating_files);
+		
+		// Encoding..
+		Label label = createLabel(creatingGroup, HTMLUIMessages.Encoding_desc);
+		((GridData)label.getLayoutData()).horizontalSpan = 2;
+		fEncodingSettings = new EncodingSettings(creatingGroup);
+		((GridData)fEncodingSettings.getLayoutData()).horizontalSpan = 2;
 	}
 }
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/taginfo/HTMLInformationProvider.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/taginfo/HTMLInformationProvider.java
index 4e9cb00..9c85f32 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/taginfo/HTMLInformationProvider.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/taginfo/HTMLInformationProvider.java
@@ -21,6 +21,8 @@
 
 /**
  * Provides context information for HTML tags (Shows tooltip description)
+ * 
+ * @author amywu
  */
 public class HTMLInformationProvider implements IInformationProvider, IInformationProviderExtension {
 
@@ -30,31 +32,22 @@
 		fTextHover = SSEUIPlugin.getDefault().getTextHoverManager().createBestMatchHover(new HTMLTagInfoHoverProcessor());
 	}
 
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.information.IInformationProvider#getSubject(org.eclipse.jface.text.ITextViewer,
-	 *      int)
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.text.information.IInformationProvider#getSubject(org.eclipse.jface.text.ITextViewer, int)
 	 */
 	public IRegion getSubject(ITextViewer textViewer, int offset) {
 		return fTextHover.getHoverRegion(textViewer, offset);
 	}
 
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.information.IInformationProvider#getInformation(org.eclipse.jface.text.ITextViewer,
-	 *      org.eclipse.jface.text.IRegion)
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.text.information.IInformationProvider#getInformation(org.eclipse.jface.text.ITextViewer, org.eclipse.jface.text.IRegion)
 	 */
 	public String getInformation(ITextViewer textViewer, IRegion subject) {
-		return (String) getInformation2(textViewer, subject);
+		return (String)getInformation2(textViewer, subject);
 	}
 
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.information.IInformationProviderExtension#getInformation2(org.eclipse.jface.text.ITextViewer,
-	 *      org.eclipse.jface.text.IRegion)
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.text.information.IInformationProviderExtension#getInformation2(org.eclipse.jface.text.ITextViewer, org.eclipse.jface.text.IRegion)
 	 */
 	public Object getInformation2(ITextViewer textViewer, IRegion subject) {
 		return fTextHover.getHoverInfo(textViewer, subject);
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/wizard/NewHTMLWizard.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/wizard/NewHTMLWizard.java
index 63a9c03..081f609 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/wizard/NewHTMLWizard.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/wizard/NewHTMLWizard.java
@@ -1,13 +1,3 @@
-/*******************************************************************************
- * 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.html.ui.internal.wizard;
 
 import java.io.ByteArrayInputStream;
@@ -18,11 +8,8 @@
 import java.util.List;
 
 import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Preferences;
 import org.eclipse.core.runtime.content.IContentType;
@@ -39,7 +26,6 @@
 import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
 import org.eclipse.ui.ide.IDE;
 import org.eclipse.wst.html.core.internal.HTMLCorePlugin;
-import org.eclipse.wst.html.core.internal.preferences.HTMLCorePreferenceNames;
 import org.eclipse.wst.html.core.internal.provisional.contenttype.ContentTypeIdForHTML;
 import org.eclipse.wst.html.ui.internal.HTMLUIMessages;
 import org.eclipse.wst.html.ui.internal.Logger;
@@ -51,46 +37,16 @@
 	private WizardNewFileCreationPage fNewFilePage;
 	private NewHTMLTemplatesWizardPage fNewFileTemplatesPage;
 	private IStructuredSelection fSelection;
-	private IContentType fContentType;
 	private List fValidExtensions = null;
 
 	/**
-	 * Adds default extension to the filename
-	 * 
-	 * @param filename
-	 * @return
-	 */
-	String addDefaultExtension(String filename) {
-		StringBuffer newFileName = new StringBuffer(filename);
-
-		Preferences preference = HTMLCorePlugin.getDefault().getPluginPreferences();
-		String ext = preference.getString(HTMLCorePreferenceNames.DEFAULT_EXTENSION);
-
-		newFileName.append("."); //$NON-NLS-1$
-		newFileName.append(ext);
-
-		return newFileName.toString();
-	}
-
-	/**
-	 * Get content type associated with this new file wizard
-	 * 
-	 * @return IContentType
-	 */
-	IContentType getContentType() {
-		if (fContentType == null)
-			fContentType = Platform.getContentTypeManager().getContentType(ContentTypeIdForHTML.ContentTypeID_HTML);
-		return fContentType;
-	}
-
-	/**
-	 * Get list of valid extensions for HTML Content type
+	 * Get list of valid extensions for JSP Content type
 	 * 
 	 * @return
 	 */
 	List getValidExtensions() {
 		if (fValidExtensions == null) {
-			IContentType type = getContentType();
+			IContentType type = Platform.getContentTypeManager().getContentType(ContentTypeIdForHTML.ContentTypeID_HTML);
 			fValidExtensions = new ArrayList(Arrays.asList(type.getFileSpecs(IContentType.FILE_EXTENSION_SPEC)));
 		}
 		return fValidExtensions;
@@ -99,33 +55,12 @@
 	public void addPages() {
 		fNewFilePage = new WizardNewFileCreationPage("HTMLWizardNewFileCreationPage", new StructuredSelection(IDE.computeSelectedResources(fSelection))) { //$NON-NLS-1$
 			protected boolean validatePage() {
-				IContentType type = getContentType();
-				String fileName = getFileName();
-				// check that filename does not contain invalid extension
-				if ((fileName.lastIndexOf('.') != -1) && (!type.isAssociatedWith(fileName))) {
+				IPath handlePath = new Path(getFileName());
+				String extension = handlePath.getFileExtension();
+				if (extension == null || !getValidExtensions().contains(extension)) {
 					setErrorMessage(NLS.bind(HTMLUIMessages._ERROR_FILENAME_MUST_END_HTML, getValidExtensions().toString()));
 					return false;
 				}
-				// no file extension specified so check adding default
-				// extension doesn't equal a file that already exists
-				if (fileName.lastIndexOf('.') == -1) {
-					String newFileName = addDefaultExtension(fileName);
-					IPath resourcePath = getContainerFullPath().append(newFileName);
-
-					IWorkspace workspace = ResourcesPlugin.getWorkspace();
-					IStatus result = workspace.validatePath(resourcePath.toString(), IResource.FOLDER);
-					if (!result.isOK()) {
-						// path invalid
-						setErrorMessage(result.getMessage());
-						return false;
-					}
-
-					if ((workspace.getRoot().getFolder(resourcePath).exists() || workspace.getRoot().getFile(resourcePath).exists())) {
-						setErrorMessage(HTMLUIMessages.ResourceGroup_nameExists);
-						return false;
-					}
-				}
-
 				setErrorMessage(null);
 				return super.validatePage();
 			}
@@ -134,7 +69,7 @@
 		fNewFilePage.setDescription(HTMLUIMessages._UI_WIZARD_NEW_DESCRIPTION);
 
 		addPage(fNewFilePage);
-
+		
 		fNewFileTemplatesPage = new NewHTMLTemplatesWizardPage();
 		addPage(fNewFileTemplatesPage);
 	}
@@ -142,7 +77,7 @@
 	public void init(IWorkbench aWorkbench, IStructuredSelection aSelection) {
 		fSelection = aSelection;
 		setWindowTitle(HTMLUIMessages._UI_WIZARD_NEW_TITLE);
-
+		
 		ImageDescriptor descriptor = HTMLEditorPluginImageHelper.getInstance().getImageDescriptor(HTMLEditorPluginImages.IMG_WIZBAN_NEWHTMLFILE);
 		setDefaultPageImageDescriptor(descriptor);
 	}
@@ -164,58 +99,42 @@
 	}
 
 	public boolean performFinish() {
-		boolean performedOK = false;
 		// save user options for next use
 		fNewFileTemplatesPage.saveLastSavedPreferences();
 
-		// no file extension specified so add default extension
-		String fileName = fNewFilePage.getFileName();
-		if (fileName.lastIndexOf('.') == -1) {
-			String newFileName = addDefaultExtension(fileName);
-			fNewFilePage.setFileName(newFileName);
-		}
-
 		// create a new empty file
 		IFile file = fNewFilePage.createNewFile();
 
-		// if there was problem with creating file, it will be null, so make
-		// sure to check
-		if (file != null) {
-			// put template contents into file
-			String templateString = fNewFileTemplatesPage.getTemplateString();
-			if (templateString != null) {
-				// determine the encoding for the new file
-				Preferences preference = HTMLCorePlugin.getDefault().getPluginPreferences();
-				String charSet = preference.getString(CommonEncodingPreferenceNames.OUTPUT_CODESET);
+		// put template contents into file
+		String templateString = fNewFileTemplatesPage.getTemplateString();
+		if (templateString != null) {
+			// determine the encoding for the new file
+			Preferences preference = HTMLCorePlugin.getDefault().getPluginPreferences();
+			String charSet = preference.getString(CommonEncodingPreferenceNames.OUTPUT_CODESET);
 
-				try {
-					ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
-					OutputStreamWriter outputStreamWriter = null;
-					if (charSet == null || charSet.trim().equals("")) { //$NON-NLS-1$
-						// just use default encoding
-						outputStreamWriter = new OutputStreamWriter(outputStream);
-					}
-					else {
-						outputStreamWriter = new OutputStreamWriter(outputStream, charSet);
-					}
-					outputStreamWriter.write(templateString);
-					outputStreamWriter.flush();
-					outputStreamWriter.close();
-					ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
-					file.setContents(inputStream, true, false, null);
-					inputStream.close();
+			try {
+				ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+				OutputStreamWriter outputStreamWriter = null;
+				if (charSet == null || charSet.trim().equals("")) { //$NON-NLS-1$
+					// just use default encoding
+					outputStreamWriter = new OutputStreamWriter(outputStream);
+				} else {
+					outputStreamWriter = new OutputStreamWriter(outputStream, charSet);
 				}
-				catch (Exception e) {
-					Logger.log(Logger.WARNING_DEBUG, "Could not create contents for new HTML file", e); //$NON-NLS-1$
-				}
+				outputStreamWriter.write(templateString);
+				outputStreamWriter.flush();
+				outputStreamWriter.close();
+				ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
+				file.setContents(inputStream, true, false, null);
+				inputStream.close();
 			}
-
-			// open the file in editor
-			openEditor(file);
-
-			// everything's fine
-			performedOK = true;
+			catch (Exception e) {
+				Logger.log(Logger.WARNING_DEBUG, "Could not create contents for new HTML file", e); //$NON-NLS-1$
+			}
 		}
-		return performedOK;
+
+		// open the file in editor
+		openEditor(file);
+		return true;
 	}
 }
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.sse.core/.cvsignore b/bundles/org.eclipse.wst.sse.core/.cvsignore
index 60d0b9a..fa4ec03 100644
--- a/bundles/org.eclipse.wst.sse.core/.cvsignore
+++ b/bundles/org.eclipse.wst.sse.core/.cvsignore
@@ -5,4 +5,3 @@
 org.eclipse.wst.sse.core_1.0.0.jar
 @dot
 src.zip
-.fbwarnings
diff --git a/bundles/org.eclipse.wst.sse.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.sse.core/META-INF/MANIFEST.MF
index 5b8b8a2..5be5741 100644
--- a/bundles/org.eclipse.wst.sse.core/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.sse.core/META-INF/MANIFEST.MF
@@ -40,4 +40,4 @@
  org.eclipse.core.filebuffers,
  org.eclipse.wst.common.uriresolver,
  org.eclipse.emf.common
-Eclipse-LazyStart: true
+Eclipse-AutoStart: true
diff --git a/bundles/org.eclipse.wst.sse.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.sse.ui/META-INF/MANIFEST.MF
index 4857735..7c0be57 100644
--- a/bundles/org.eclipse.wst.sse.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.sse.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.wst.sse.ui; singleton:=true
-Bundle-Version: 1.0.101.qualifier
+Bundle-Version: 1.0.1.qualifier
 Bundle-Activator: org.eclipse.wst.sse.ui.internal.SSEUIPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/InformationProvider.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/InformationProvider.java
deleted file mode 100644
index 8f84759..0000000
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/InformationProvider.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.sse.ui;
-
-import org.eclipse.jface.text.IInformationControlCreator;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.information.IInformationProvider;
-import org.eclipse.jface.text.information.IInformationProviderExtension;
-import org.eclipse.jface.text.information.IInformationProviderExtension2;
-
-/**
- * Information provider used to present the information.
- * 
- * @see org.eclipse.jdt.internal.ui.javaeditor.JavaEditor#InformationDispatchAction
- * @see org.eclipse.wst.sse.ui.StructuredTextEditor#InformationDispatchAction
- */
-class InformationProvider implements IInformationProvider, IInformationProviderExtension, IInformationProviderExtension2 {
-
-	private IRegion fHoverRegion;
-	private String fHoverInfo;
-	private IInformationControlCreator fControlCreator;
-
-	InformationProvider(IRegion hoverRegion, String hoverInfo, IInformationControlCreator controlCreator) {
-		fHoverRegion = hoverRegion;
-		fHoverInfo = hoverInfo;
-		fControlCreator = controlCreator;
-	}
-
-	/*
-	 * @see org.eclipse.jface.text.information.IInformationProvider#getSubject(org.eclipse.jface.text.ITextViewer,
-	 *      int)
-	 */
-	public IRegion getSubject(ITextViewer textViewer, int invocationOffset) {
-		return fHoverRegion;
-	}
-
-	/*
-	 * @see org.eclipse.jface.text.information.IInformationProvider#getInformation(org.eclipse.jface.text.ITextViewer,
-	 *      org.eclipse.jface.text.IRegion)
-	 */
-	public String getInformation(ITextViewer textViewer, IRegion subject) {
-		return (String) getInformation2(textViewer, subject);
-	}
-
-	public Object getInformation2(ITextViewer textViewer, IRegion subject) {
-		return fHoverInfo;
-	}
-
-	/*
-	 * @see org.eclipse.jface.text.information.IInformationProviderExtension2#getInformationPresenterControlCreator()
-	 * @since 3.0
-	 */
-	public IInformationControlCreator getInformationPresenterControlCreator() {
-		return fControlCreator;
-	}
-}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextEditor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextEditor.java
index 4f14982..d57c8eb 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextEditor.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextEditor.java
@@ -38,7 +38,6 @@
 import org.eclipse.jface.action.MenuManager;
 import org.eclipse.jface.action.Separator;
 import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.text.BadLocationException;
 import org.eclipse.jface.text.DefaultInformationControl;
 import org.eclipse.jface.text.DocumentEvent;
 import org.eclipse.jface.text.IDocument;
@@ -53,14 +52,8 @@
 import org.eclipse.jface.text.ITextViewer;
 import org.eclipse.jface.text.ITextViewerExtension;
 import org.eclipse.jface.text.ITextViewerExtension2;
-import org.eclipse.jface.text.ITextViewerExtension4;
-import org.eclipse.jface.text.ITextViewerExtension5;
 import org.eclipse.jface.text.TextSelection;
-import org.eclipse.jface.text.TextUtilities;
 import org.eclipse.jface.text.contentassist.IContentAssistant;
-import org.eclipse.jface.text.information.IInformationProvider;
-import org.eclipse.jface.text.information.IInformationProviderExtension2;
-import org.eclipse.jface.text.information.InformationPresenter;
 import org.eclipse.jface.text.source.ICharacterPairMatcher;
 import org.eclipse.jface.text.source.ISourceViewer;
 import org.eclipse.jface.text.source.IVerticalRuler;
@@ -123,7 +116,6 @@
 import org.eclipse.ui.texteditor.IUpdate;
 import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds;
 import org.eclipse.ui.texteditor.SourceViewerDecorationSupport;
-import org.eclipse.ui.texteditor.TextEditorAction;
 import org.eclipse.ui.texteditor.TextOperationAction;
 import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
 import org.eclipse.ui.views.properties.IPropertySheetPage;
@@ -134,7 +126,6 @@
 import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
 import org.eclipse.wst.sse.core.internal.provisional.StructuredModelManager;
 import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredPartitioning;
 import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
 import org.eclipse.wst.sse.core.internal.text.IExecutionDelegatable;
 import org.eclipse.wst.sse.core.internal.undo.IStructuredTextUndoManager;
@@ -162,7 +153,6 @@
 import org.eclipse.wst.sse.ui.internal.debug.ManageBreakpointAction;
 import org.eclipse.wst.sse.ui.internal.debug.ToggleBreakpointAction;
 import org.eclipse.wst.sse.ui.internal.debug.ToggleBreakpointsTarget;
-import org.eclipse.wst.sse.ui.internal.derived.HTMLTextPresenter;
 import org.eclipse.wst.sse.ui.internal.editor.EditorModelUtil;
 import org.eclipse.wst.sse.ui.internal.editor.IHelpContextIds;
 import org.eclipse.wst.sse.ui.internal.editor.StructuredModelDocumentProvider;
@@ -843,127 +833,6 @@
 	}
 
 	/**
-	 * This action behaves in two different ways: If there is no current text
-	 * hover, the javadoc is displayed using information presenter. If there
-	 * is a current text hover, it is converted into a information presenter
-	 * in order to make it sticky.
-	 * 
-	 * @see org.eclipse.jdt.internal.ui.javaeditor.JavaEditor#InformationDispatchAction
-	 */
-	class InformationDispatchAction extends TextEditorAction {
-
-		/** The wrapped text operation action. */
-		private final TextOperationAction fTextOperationAction;
-
-		/**
-		 * Creates a dispatch action.
-		 * 
-		 * @param resourceBundle
-		 *            the resource bundle
-		 * @param prefix
-		 *            the prefix
-		 * @param textOperationAction
-		 *            the text operation action
-		 */
-		public InformationDispatchAction(ResourceBundle resourceBundle, String prefix, final TextOperationAction textOperationAction) {
-			super(resourceBundle, prefix, StructuredTextEditor.this);
-			if (textOperationAction == null)
-				throw new IllegalArgumentException();
-			fTextOperationAction = textOperationAction;
-		}
-
-		/*
-		 * @see org.eclipse.jface.action.IAction#run()
-		 */
-		public void run() {
-			ISourceViewer sourceViewer = getSourceViewer();
-			if (sourceViewer == null) {
-				fTextOperationAction.run();
-				return;
-			}
-
-			if (sourceViewer instanceof ITextViewerExtension4) {
-				ITextViewerExtension4 extension4 = (ITextViewerExtension4) sourceViewer;
-				if (extension4.moveFocusToWidgetToken())
-					return;
-			}
-
-			if (!(sourceViewer instanceof ITextViewerExtension2)) {
-				fTextOperationAction.run();
-				return;
-			}
-
-			ITextViewerExtension2 textViewerExtension2 = (ITextViewerExtension2) sourceViewer;
-
-			// does a text hover exist?
-			ITextHover textHover = textViewerExtension2.getCurrentTextHover();
-			if (textHover == null) {
-				fTextOperationAction.run();
-				return;
-			}
-
-			Point hoverEventLocation = textViewerExtension2.getHoverEventLocation();
-			int offset = computeOffsetAtLocation(sourceViewer, hoverEventLocation.x, hoverEventLocation.y);
-			if (offset == -1) {
-				fTextOperationAction.run();
-				return;
-			}
-
-			try {
-				// get the text hover content
-				String contentType = TextUtilities.getContentType(sourceViewer.getDocument(), IStructuredPartitioning.DEFAULT_STRUCTURED_PARTITIONING, offset, true);
-
-				IRegion hoverRegion = textHover.getHoverRegion(sourceViewer, offset);
-				if (hoverRegion == null)
-					return;
-
-				String hoverInfo = textHover.getHoverInfo(sourceViewer, hoverRegion);
-
-				IInformationControlCreator controlCreator = null;
-				if (textHover instanceof IInformationProviderExtension2)
-					controlCreator = ((IInformationProviderExtension2) textHover).getInformationPresenterControlCreator();
-
-				IInformationProvider informationProvider = new InformationProvider(hoverRegion, hoverInfo, controlCreator);
-
-				fInformationPresenter.setOffset(offset);
-				fInformationPresenter.setDocumentPartitioning(IStructuredPartitioning.DEFAULT_STRUCTURED_PARTITIONING);
-				fInformationPresenter.setInformationProvider(informationProvider, contentType);
-				fInformationPresenter.showInformation();
-
-			}
-			catch (BadLocationException e) {
-				// No good information to display
-			}
-		}
-
-		// modified version from TextViewer
-		private int computeOffsetAtLocation(ITextViewer textViewer, int x, int y) {
-
-			StyledText styledText = textViewer.getTextWidget();
-			IDocument document = textViewer.getDocument();
-
-			if (document == null)
-				return -1;
-
-			try {
-				int widgetLocation = styledText.getOffsetAtLocation(new Point(x, y));
-				if (textViewer instanceof ITextViewerExtension5) {
-					ITextViewerExtension5 extension = (ITextViewerExtension5) textViewer;
-					return extension.widgetOffset2ModelOffset(widgetLocation);
-				}
-				else {
-					IRegion visibleRegion = textViewer.getVisibleRegion();
-					return widgetLocation + visibleRegion.getOffset();
-				}
-			}
-			catch (IllegalArgumentException e) {
-				return -1;
-			}
-
-		}
-	}
-
-	/**
 	 * Not API. May be removed in the future.
 	 */
 	protected final static char[] BRACKETS = {'{', '}', '(', ')', '[', ']'};
@@ -1046,8 +915,6 @@
 	private String fViewerConfigurationTargetId;
 	/** The selection history of the editor */
 	private SelectionHistory fSelectionHistory;
-	/** The information presenter. */
-	private InformationPresenter fInformationPresenter;
 	private boolean fUpdateMenuTextPending;
 	int hoverX = -1;
 	int hoverY = -1;
@@ -1320,7 +1187,6 @@
 		// the current insertion
 		// position
 		action = new TextOperationAction(SSEUIMessages.getResourceBundle(), StructuredTextEditorActionConstants.ACTION_NAME_INFORMATION + UNDERSCORE, this, ISourceViewer.INFORMATION, true);
-		action = new InformationDispatchAction(SSEUIMessages.getResourceBundle(), StructuredTextEditorActionConstants.ACTION_NAME_INFORMATION + UNDERSCORE, (TextOperationAction) action);
 		action.setActionDefinitionId(ActionDefinitionIds.INFORMATION);
 		setAction(StructuredTextEditorActionConstants.ACTION_NAME_INFORMATION, action);
 		markAsStateDependentAction(StructuredTextEditorActionConstants.ACTION_NAME_INFORMATION, true);
@@ -1489,19 +1355,6 @@
 		else {
 			updateEditorControlsForContentType(null);
 		}
-
-		// used for Show Tooltip Description
-		IInformationControlCreator informationControlCreator = new IInformationControlCreator() {
-			public IInformationControl createInformationControl(Shell shell) {
-				boolean cutDown = false;
-				int style = cutDown ? SWT.NONE : (SWT.V_SCROLL | SWT.H_SCROLL);
-				return new DefaultInformationControl(shell, SWT.RESIZE | SWT.TOOL, style, new HTMLTextPresenter(cutDown));
-			}
-		};
-
-		fInformationPresenter = new InformationPresenter(informationControlCreator);
-		fInformationPresenter.setSizeConstraints(60, 10, true, true);
-		fInformationPresenter.install(getSourceViewer());
 	}
 
 	protected PropertySheetConfiguration createPropertySheetConfiguration() {
@@ -1658,12 +1511,6 @@
 			System.out.println("Average time per call: " + (adapterTime / adapterRequests)); //$NON-NLS-1$
 		}
 
-		// dispose of information presenter
-		if (fInformationPresenter != null) {
-			fInformationPresenter.dispose();
-			fInformationPresenter = null;
-		}
-
 		// dispose of selection history
 		if (fSelectionHistory != null) {
 			fSelectionHistory.dispose();
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextViewerConfiguration.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextViewerConfiguration.java
index 5ca2617..00c932c 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextViewerConfiguration.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextViewerConfiguration.java
@@ -282,7 +282,7 @@
 		// used by hover help
 		return new IInformationControlCreator() {
 			public IInformationControl createInformationControl(Shell parent) {
-				return new DefaultInformationControl(parent, SWT.NONE, new HTMLTextPresenter(true));
+				return new DefaultInformationControl(parent, SWT.NONE, new HTMLTextPresenter(false));
 			}
 		};
 	}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/SSEUIMessages.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/SSEUIMessages.java
index 2b295b4..be08070 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/SSEUIMessages.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/SSEUIMessages.java
@@ -1,5 +1,5 @@
 /**********************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others. All rights reserved.   This
+ * Copyright (c) 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
@@ -275,9 +275,6 @@
 	public static String OccurrencesSearchQuery_2;
 	public static String ShowView_errorTitle;
 	public static String proc_dirty_regions_0;
-	
-	public static String textHoverMakeStickyHint;
-	
 	// Encoding
 	public static String EncodingPreferencePage_0;
 	public static String EncodingPreferencePage_1;
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/SSEUIPluginResources.properties b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/SSEUIPluginResources.properties
index 65d725f..af1d4f1 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/SSEUIPluginResources.properties
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/SSEUIPluginResources.properties
@@ -251,9 +251,6 @@
 OccurrencesSearchQuery_2=file
 ShowView_errorTitle=Problems Showing View
 proc_dirty_regions_0 = Processing Dirty Regions
-
-textHoverMakeStickyHint=Press ''{0}'' for focus.
-
 ## Encoding
 EncodingPreferencePage_0=Encoding settings for Web and XML files:
 EncodingPreferencePage_1=Use 3 byte BOM (Byte Order Mark) when saving UTF-8 encoded files
diff --git a/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/impl/messages.properties b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredTextEditor.java
similarity index 100%
rename from bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/impl/messages.properties
rename to bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredTextEditor.java
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredTextViewer.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredTextViewer.java
index efa9b45..e0801ed 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredTextViewer.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredTextViewer.java
@@ -16,7 +16,6 @@
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.IDocumentAdapter;
 import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextSelection;
 import org.eclipse.jface.text.ITextViewerExtension2;
 import org.eclipse.jface.text.Region;
 import org.eclipse.jface.text.TextSelection;
@@ -737,11 +736,8 @@
 	 * @see org.eclipse.wst.sse.core.undo.IDocumentSelectionMediator#undoOperationSelectionChanged(org.eclipse.wst.sse.core.undo.UndoDocumentEvent)
 	 */
 	public void undoOperationSelectionChanged(UndoDocumentEvent event) {
-		if (event.getRequester() != null && event.getRequester().equals(this) && event.getDocument().equals(getDocument())) {
-			//BUG107687: Undo/redo do not scroll editor
-			ITextSelection selection = new TextSelection(event.getOffset(), event.getLength());
-			setSelection(selection, true);
-		}
+		if (event.getRequester() != null && event.getRequester().equals(this) && event.getDocument().equals(getDocument()))
+			setSelectedRange(event.getOffset(), event.getLength());
 	}
 
 	/**
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CustomCompletionProposal.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CustomCompletionProposal.java
index 013799b..9872fb2 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CustomCompletionProposal.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CustomCompletionProposal.java
@@ -188,7 +188,7 @@
     public int getContextInformationPosition() {
         return getCursorPosition();
     }
-    
+
     public int getCursorPosition() {
         return fCursorPosition;
     }
@@ -197,10 +197,6 @@
         fCursorPosition = pos;
     }
 
-    public void setDisplayString(String newDisplayString) {
-    	fDisplayString = newDisplayString;
-    }
-    
     public String getDisplayString() {
         // return fProposal.getDisplayString();
         return fDisplayString;
@@ -215,9 +211,6 @@
         return fRelevance;
     }
 
-    public void setReplacementLength(int newReplacementLength) {
-        fReplacementLength = newReplacementLength;
-    }  
     public int getReplacementLength() {
         return fReplacementLength;
     }
@@ -268,15 +261,13 @@
 
     // code is borrowed from JavaCompletionProposal
     protected boolean startsWith(IDocument document, int offset, String word) {
-	
-    	int wordLength = word == null ? 0 : word.length();
+        int wordLength = word == null ? 0 : word.length();
         if (offset > fReplacementOffset + wordLength)
             return false;
 
         try {
             int length = offset - fReplacementOffset;
             String start = document.get(fReplacementOffset, length);
-
             return word.substring(0, length).equalsIgnoreCase(start);
         } catch (BadLocationException x) {
         }
@@ -300,20 +291,11 @@
         if (offset < fReplacementOffset)
             return false;
         boolean validated = startsWith(document, offset, fDisplayString);
-
+        // CMVC 269884
         if (fUpdateLengthOnValidate) {
-
-            // it would be better to use "originalCursorPosition" instead of
-            // getReplacementOffset(), but we don't have that info.
             int newLength = offset - getReplacementOffset();
             int delta = newLength - fOriginalReplacementLength;
             fReplacementLength = delta + fOriginalReplacementLength;
-            
-        	// if it's an attribute value, replacement offset is
-            // going to be one off from the actual cursor offset...
-        	char firstChar = document.get().charAt(getReplacementOffset());
-        	if(firstChar == '"' || firstChar == '\'')
-        		fReplacementLength ++;
         }
         return validated;
     }
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentoutline/ConfigurableContentOutlinePage.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentoutline/ConfigurableContentOutlinePage.java
index fbb1466..2f1874c 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentoutline/ConfigurableContentOutlinePage.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentoutline/ConfigurableContentOutlinePage.java
@@ -153,7 +153,7 @@
 				 * have focus.
 				 */
 				ISelection validContentSelection = getConfiguration().getSelection(getTreeViewer(), selection);
-//				getTreeViewer().refresh(true);
+				getTreeViewer().refresh(true);
 				boolean isLinked = getConfiguration().isLinkedWithEditor(getTreeViewer());
 				if (isLinked) {
 					getTreeViewer().setSelection(validContentSelection, true);
@@ -383,6 +383,7 @@
 	}
 
 	public void dispose() {
+		super.dispose();
 		getSite().getWorkbenchWindow().getSelectionService().removePostSelectionListener(getSelectionServiceListener());
 		if (fDoubleClickProvider != null) {
 			getTreeViewer().removeDoubleClickListener(fDoubleClickProvider);
@@ -398,7 +399,6 @@
 			fContextMenuManager.dispose();
 		}
 		setConfiguration(NULL_CONFIGURATION);
-		super.dispose();
 	}
 
 	/*
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/ReconcileStepForValidator.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/ReconcileStepForValidator.java
index 96f1ae7..afee08d 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/ReconcileStepForValidator.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/ReconcileStepForValidator.java
@@ -273,7 +273,7 @@
 
 		IFile file = getFile();
 
-		if (file != null && file.exists()) {
+		if (file != null) {
 			try {
 				IProject project = file.getProject();
 				IncrementalHelper helper = getHelper(project);
@@ -323,25 +323,30 @@
  		IReconcileResult[] results = EMPTY_RECONCILE_RESULT_SET;
  
  		IFile file = getFile();
- 		
- 		if(file != null && file.exists()) {
-			try {
-				IProject project = file.getProject();
-				IncrementalHelper helper = getHelper(project);
+		try {
+			IProject project = null;
+			if (file != null)
+				project = file.getProject();
+ 
+			IncrementalHelper helper = getHelper(project);
+
+			if (file != null)
 				helper.setURI(file.getFullPath().toString());
-				
-				if(fValidator instanceof ISourceValidator) {
-					IncrementalReporter reporter = getReporter();
-					((ISourceValidator)fValidator).validate(dirtyRegion, helper, reporter);
-					//results = createAnnotations(reporter.getMessages());
-					results = createAnnotations(reporter.getAnnotationInfo());
-					reporter.removeAllMessages(fValidator);
-				}
-	
-			} catch (Exception e) {
-				Logger.logException(e);
-	 		}
+ 
+			if(fValidator instanceof ISourceValidator) {
+				IncrementalReporter reporter = getReporter();
+				((ISourceValidator)fValidator).validate(dirtyRegion, helper, reporter);
+				//results = createAnnotations(reporter.getMessages());
+				results = createAnnotations(reporter.getAnnotationInfo());
+				reporter.removeAllMessages(fValidator);
+			}
+
+		} catch (Exception e) {
+			Logger.logException(e);
  		}
  		return results;
  	}
+	
+	
+	
 }
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/AbstractHoverProcessor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/AbstractHoverProcessor.java
deleted file mode 100644
index 0ea279f..0000000
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/AbstractHoverProcessor.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.sse.ui.internal.taginfo;
-
-import org.eclipse.jface.bindings.TriggerSequence;
-import org.eclipse.jface.text.DefaultInformationControl;
-import org.eclipse.jface.text.IInformationControl;
-import org.eclipse.jface.text.IInformationControlCreator;
-import org.eclipse.jface.text.ITextHover;
-import org.eclipse.jface.text.ITextHoverExtension;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.keys.IBindingService;
-import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
-import org.eclipse.wst.sse.ui.internal.actions.ActionDefinitionIds;
-import org.eclipse.wst.sse.ui.internal.derived.HTMLTextPresenter;
-
-/**
- * Abstract class for providing hover information for Source editor. Includes
- * a hover control creator which has the "Press F2 for focus" message built
- * in.
- * 
- * @since WTP 1.5
- */
-abstract public class AbstractHoverProcessor implements ITextHover, ITextHoverExtension {
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.text.ITextHoverExtension#getHoverControlCreator()
-	 */
-	public IInformationControlCreator getHoverControlCreator() {
-		return new IInformationControlCreator() {
-			public IInformationControl createInformationControl(Shell parent) {
-				return new DefaultInformationControl(parent, SWT.NONE, new HTMLTextPresenter(true), getTooltipAffordanceString());
-			}
-		};
-	}
-
-	/**
-	 * Returns the short cut assigned to the sub menu or <code>null</code>
-	 * if no short cut is assigned.
-	 * 
-	 * @return the short cut as a human readable string or <code>null</code>
-	 */
-	private String getShortCutString() {
-		final IWorkbench workbench = PlatformUI.getWorkbench();
-		final IBindingService bindingService = (IBindingService) workbench.getAdapter(IBindingService.class);
-		final TriggerSequence[] activeBindings = bindingService.getActiveBindingsFor(ActionDefinitionIds.INFORMATION);
-		if (activeBindings.length > 0) {
-			return activeBindings[0].format();
-		}
-
-		return null;
-	}
-
-	/**
-	 * Returns the tool tip affordance string.
-	 * 
-	 * @return the affordance string or <code>null</code> if disabled or no
-	 *         key binding is defined
-	 * @since 3.0
-	 */
-	private String getTooltipAffordanceString() {
-		String sticky = null;
-		String keySequence = getShortCutString();
-		if (keySequence != null) {
-			sticky = NLS.bind(SSEUIMessages.textHoverMakeStickyHint, keySequence);
-		}
-		return sticky;
-	}
-}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/AnnotationHoverProcessor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/AnnotationHoverProcessor.java
index b4f7ce1..b3ffc99 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/AnnotationHoverProcessor.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/AnnotationHoverProcessor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2001, 2006 IBM Corporation and others.
+ * Copyright (c) 2001, 2004 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
@@ -18,6 +18,7 @@
 
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextHover;
 import org.eclipse.jface.text.ITextViewer;
 import org.eclipse.jface.text.Position;
 import org.eclipse.jface.text.Region;
@@ -38,13 +39,13 @@
  * 
  * @author amywu
  */
-public class AnnotationHoverProcessor extends AbstractHoverProcessor {
+public class AnnotationHoverProcessor implements ITextHover {
 	private final static String LIST_BEGIN = "<ul>"; //$NON-NLS-1$
 	private final static String LIST_ELEMENT = "<li>"; //$NON-NLS-1$
 	private final static String PARAGRAPH_END = "</p>"; //$NON-NLS-1$
-	private final static String PARAGRAPH_START = "<p>"; //$NON-NLS-1$
 
-	private IPreferenceStore fPreferenceStore = null;
+	private final static String PARAGRAPH_START = "<p>"; //$NON-NLS-1$
+	protected IPreferenceStore fPreferenceStore = null;
 
 	/**
 	 * 
@@ -60,7 +61,7 @@
 	 *            assumes msg is neither null nor empty string
 	 * @return
 	 */
-	private String formatMessage(String msg) {
+	protected String formatMessage(String msg) {
 		StringBuffer buf = new StringBuffer();
 		buf.append(PARAGRAPH_START);
 		buf.append(StringUtils.convertToHTMLContent(msg));
@@ -74,7 +75,7 @@
 	 * @param messages
 	 * @return
 	 */
-	private String formatMessages(List messages) {
+	protected String formatMessages(List messages) {
 		StringBuffer buffer = new StringBuffer();
 		buffer.append(PARAGRAPH_START);
 		buffer.append(SSEUIMessages.Multiple_errors); //$NON-NLS-1$
@@ -104,6 +105,7 @@
 		return EditorsUI.getAnnotationPreferenceLookup().getAnnotationPreference(annotation);
 	}
 
+
 	public String getHoverInfo(ITextViewer viewer, IRegion hoverRegion) {
 		IAnnotationModel model = ((SourceViewer) viewer).getAnnotationModel();
 		if (model != null) {
@@ -182,7 +184,7 @@
 	 * Retreives the preference store If no preference store is currently
 	 * stored, retreive the appropriate preference store
 	 */
-	private IPreferenceStore getPreferenceStore() {
+	protected IPreferenceStore getPreferenceStore() {
 		if (fPreferenceStore == null) {
 			IPreferenceStore sseEditorPrefs = SSEUIPlugin.getDefault().getPreferenceStore();
 			IPreferenceStore baseEditorPrefs = EditorsUI.getPreferenceStore();
@@ -191,7 +193,7 @@
 		return fPreferenceStore;
 	}
 
-	boolean isAnnotationValid(Annotation a) {
+	protected boolean isAnnotationValid(Annotation a) {
 		AnnotationPreference preference = getAnnotationPreference(a);
 		if (preference == null)
 			return false;
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/BestMatchHover.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/BestMatchHover.java
index 5e4eb60..227d229 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/BestMatchHover.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/BestMatchHover.java
@@ -16,10 +16,8 @@
 import java.util.Iterator;
 import java.util.List;
 
-import org.eclipse.jface.text.IInformationControlCreator;
 import org.eclipse.jface.text.IRegion;
 import org.eclipse.jface.text.ITextHover;
-import org.eclipse.jface.text.ITextHoverExtension;
 import org.eclipse.jface.text.ITextViewer;
 import org.eclipse.wst.sse.ui.internal.Logger;
 
@@ -28,11 +26,11 @@
  * processors) Priority of hover help processors is: ProblemHoverProcessor,
  * TagInfoProcessor, AnnotationHoverProcessor
  */
-public class BestMatchHover implements ITextHover, ITextHoverExtension {
+public class BestMatchHover implements ITextHover {
 	private ITextHover fBestMatchHover; // current best match text hover
 	private ITextHover fTagInfoHover; // documentation/information hover
 	private List fTextHovers; // list of text hovers to consider in best
-	// match
+								// match
 
 	public BestMatchHover(ITextHover infotaghover) {
 		fTagInfoHover = infotaghover;
@@ -60,15 +58,6 @@
 		return hoverList;
 	}
 
-	public IInformationControlCreator getHoverControlCreator() {
-		IInformationControlCreator creator = null;
-
-		if (fBestMatchHover instanceof ITextHoverExtension) {
-			creator = ((ITextHoverExtension) fBestMatchHover).getHoverControlCreator();
-		}
-		return creator;
-	}
-
 	/*
 	 * (non-Javadoc)
 	 * 
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/DebugInfoHoverProcessor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/DebugInfoHoverProcessor.java
index 2e292a5..e96ee19 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/DebugInfoHoverProcessor.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/DebugInfoHoverProcessor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2001, 2006 IBM Corporation and others.
+ * Copyright (c) 2001, 2004 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
@@ -24,9 +24,10 @@
 /**
  * Provides debug hover help
  * 
+ * @author amywu
  * @see org.eclipse.jface.text.ITextHover
  */
-public class DebugInfoHoverProcessor extends AbstractHoverProcessor {
+public class DebugInfoHoverProcessor implements ITextHover {
 	public static final String TRACEFILTER = "debuginfohover"; //$NON-NLS-1$
 	protected IPreferenceStore fPreferenceStore = null;
 
@@ -43,8 +44,7 @@
 		String displayText = null;
 		if ((hoverRegion == null) || (viewer == null) || (viewer.getDocument() == null)) {
 			displayText = null;
-		}
-		else {
+		} else {
 			int offset = hoverRegion.getOffset();
 
 			ITypedRegion region;
@@ -52,12 +52,10 @@
 				region = viewer.getDocument().getPartition(offset);
 				if (region != null) {
 					displayText = region.getType();
-				}
-				else {
+				} else {
 					displayText = "Null Region was returned?!"; //$NON-NLS-1$
 				}
-			}
-			catch (BadLocationException e) {
+			} catch (BadLocationException e) {
 				displayText = "BadLocationException Occurred!?"; //$NON-NLS-1$
 			}
 
@@ -80,13 +78,11 @@
 		ITypedRegion region = null;
 		if ((textViewer == null) || (textViewer.getDocument() == null)) {
 			region = null;
-		}
-		else {
+		} else {
 
 			try {
 				region = textViewer.getDocument().getPartition(offset);
-			}
-			catch (BadLocationException e) {
+			} catch (BadLocationException e) {
 				region = null;
 			}
 		}
diff --git a/bundles/org.eclipse.wst.xml.core/.classpath b/bundles/org.eclipse.wst.xml.core/.classpath
index 16b5963..9ca79ee 100644
--- a/bundles/org.eclipse.wst.xml.core/.classpath
+++ b/bundles/org.eclipse.wst.xml.core/.classpath
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
 	<classpathentry kind="src" path="src-contentmodel"/>
-	<classpathentry kind="src" path="src-search"/>
 	<classpathentry kind="src" path="src-validation"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="src" path="src-catalog"/>
diff --git a/bundles/org.eclipse.wst.xml.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.xml.core/META-INF/MANIFEST.MF
index 89a20ca..e4488b8 100644
--- a/bundles/org.eclipse.wst.xml.core/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.xml.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.wst.xml.core; singleton:=true
-Bundle-Version: 1.1.0.qualifier
+Bundle-Version: 1.0.2.qualifier
 Bundle-Activator: org.eclipse.wst.xml.core.internal.XMLCorePlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
@@ -26,6 +26,7 @@
  org.eclipse.wst.xml.core.internal.contentmodel.util,
  org.eclipse.wst.xml.core.internal.contenttype,
  org.eclipse.wst.xml.core.internal.document,
+ org.eclipse.wst.xml.core.internal.emf2xml,
  org.eclipse.wst.xml.core.internal.encoding,
  org.eclipse.wst.xml.core.internal.modelhandler,
  org.eclipse.wst.xml.core.internal.modelquery,
@@ -48,15 +49,11 @@
  org.eclipse.wst.xml.core.internal.validation,
  org.eclipse.wst.xml.core.internal.validation.core,
  org.eclipse.wst.xml.core.internal.validation.core.logging,
- org.eclipse.wst.xml.core.internal.search,
- org.eclipse.wst.xml.core.internal.search.impl,
- org.eclipse.wst.xml.core.internal.search.quickscan, 
- org.eclipse.wst.xml.core.internal.search.matching,  
+ org.eclipse.wst.xml.core.internal.validation.eclipse,
+ org.eclipse.wst.xml.core.internal.validation.errorcustomization,
  org.w3c.dom,
  org.w3c.dom.ranges,
- org.w3c.dom.traversal,
- org.eclipse.wst.xml.core.internal.emf2xml
- 
+ org.w3c.dom.traversal
 Require-Bundle: org.apache.xerces;visibility:=reexport,
  org.eclipse.wst.sse.core,
  org.eclipse.core.resources,
@@ -69,6 +66,6 @@
  org.eclipse.emf.ecore.edit;resolution:=optional,
  org.eclipse.wst.common.emf;resolution:=optional,
  org.eclipse.emf.ecore.xmi;resolution:=optional,
- org.eclipse.wst.common.emfworkbench.integration;resolution:=optional,
- org.eclipse.wst.common.core
-Eclipse-LazyStart: true; exceptions="org.eclipse.wst.xml.core.internal.contenttype"
+ org.eclipse.wst.common.emfworkbench.integration;resolution:=optional
+ 
+Eclipse-AutoStart: true; exceptions="org.eclipse.wst.xml.core.internal.contenttype"
diff --git a/bundles/org.eclipse.wst.xml.core/build.properties b/bundles/org.eclipse.wst.xml.core/build.properties
index ab4a205..8b7f886 100644
--- a/bundles/org.eclipse.wst.xml.core/build.properties
+++ b/bundles/org.eclipse.wst.xml.core/build.properties
@@ -30,7 +30,6 @@
            src-contentmodel/,\
            src-validation/,\
            src/,\
-           src-emfModelSynch/,\
-           src-search/
+           src-emfModelSynch/
 
 output.. = bin/
diff --git a/bundles/org.eclipse.wst.xml.core/plugin.properties b/bundles/org.eclipse.wst.xml.core/plugin.properties
index e1cdf41..837cda4 100644
--- a/bundles/org.eclipse.wst.xml.core/plugin.properties
+++ b/bundles/org.eclipse.wst.xml.core/plugin.properties
@@ -22,4 +22,5 @@
 XML_Catalog_Contributions_Extension_Point.name=XML Catalog Contributions Extension Point
 XML_Catalog_Contributor_Extension_Point.name=XML Catalog Contributor Extension Point
 XSL_Content_Type_Extension_Element.name=XSL
-XMI_Content_Type=XMI
\ No newline at end of file
+XMI_Content_Type=XMI
+XML_Validation_Error_Customizer.name=XML Validator Error Customizer Extension Point
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xml.core/plugin.xml b/bundles/org.eclipse.wst.xml.core/plugin.xml
index d721dbe..4a8f4c4 100644
--- a/bundles/org.eclipse.wst.xml.core/plugin.xml
+++ b/bundles/org.eclipse.wst.xml.core/plugin.xml
@@ -2,6 +2,10 @@
 <?eclipse version="3.0"?>
 <plugin>
 
+   <!-- An extension for contributing a XML validation error customizer. -->
+   <extension-point id="errorCustomizer" name="%XML_Validation_Error_Customizer.name" schema="schema/errorCustomizer.exsd"/>
+
+
 	<extension point="org.eclipse.wst.sse.core.modelHandler">
 		<modelHandler
 			default="true"
diff --git a/bundles/org.eclipse.wst.xml.core/schema/errorCustomizer.exsd b/bundles/org.eclipse.wst.xml.core/schema/errorCustomizer.exsd
new file mode 100644
index 0000000..608f190
--- /dev/null
+++ b/bundles/org.eclipse.wst.xml.core/schema/errorCustomizer.exsd
@@ -0,0 +1,123 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.wst.xml.core">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.wst.xml.core" id="errorCustomizer" name="XML Validation Error Customizer"/>
+      </appInfo>
+      <documentation>
+         The error customizer extension point allows a client to contribute an error customizer for a specific namespace. The error customizer can provide error messages that are more domain specific than the generic error messages provided by the underlying generic XML validator.
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <complexType>
+         <sequence>
+            <element ref="errorCustomizer" minOccurs="1" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  a fully qualified identifier of the target extension point
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  an optional identifier of the extension instance
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  an optional name of the extension instance
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="errorCustomizer">
+      <complexType>
+         <attribute name="namespace" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The namespace for which this error customizer will consider error customizations.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The class that implements &lt;code&gt;org.eclipse.wst.xml.core.internal.validation.errorcustomization.IErrorMessageCustomizer&lt;/code&gt;.
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         &lt;b&gt;This extension point 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.&lt;/b&gt;
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="examples"/>
+      </appInfo>
+      <documentation>
+         The following is an example of an Error Customizer contribution:
+&lt;pre&gt;
+   &lt;extension
+         id=&quot;sampleErrorCustomizer&quot;
+         name=&quot;Sample Error Customizer&quot;
+         point=&quot;org.eclipse.wst.xml.core.errorCustomizer&quot;&gt;
+      &lt;errorCustomizer
+            namespace=&quot;http://sample.namespace&quot;
+            class=&quot;org.eclipse.wst.xml.core.SampleErrorCustomizer&quot;/&gt;
+   &lt;/extension&gt;
+&lt;/pre&gt;
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="apiInfo"/>
+      </appInfo>
+      <documentation>
+         The supplied class must implement &lt;code&gt;org.eclipse.wst.xml.core.internal.validation.errorcustomization.IErrorMessageCustomizer&lt;/code&gt;.
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="implementation"/>
+      </appInfo>
+      <documentation>
+         
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         Copyright (c) 2006 IBM Corporation and others.&lt;br&gt;
+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 &lt;a
+href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/bundles/org.eclipse.wst.xml.core/src-emfModelSynch/org/eclipse/wst/xml/core/internal/emf2xml/EMF2DOMSSERenderer.java b/bundles/org.eclipse.wst.xml.core/src-emfModelSynch/org/eclipse/wst/xml/core/internal/emf2xml/EMF2DOMSSERenderer.java
index d7e6d05..e17cd65 100644
--- a/bundles/org.eclipse.wst.xml.core/src-emfModelSynch/org/eclipse/wst/xml/core/internal/emf2xml/EMF2DOMSSERenderer.java
+++ b/bundles/org.eclipse.wst.xml.core/src-emfModelSynch/org/eclipse/wst/xml/core/internal/emf2xml/EMF2DOMSSERenderer.java
@@ -47,6 +47,7 @@
 import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
 import org.w3c.dom.Node;
 
+
 public class EMF2DOMSSERenderer extends EMF2DOMRenderer implements IModelStateListener, IModelLifecycleListener {
 
 	/** The XML DOM model */
@@ -121,12 +122,14 @@
 				try {
 					xmlModelReverted = true;
 					resource.unload();
-				} finally {
+				}
+				finally {
 					if (getXMLModel() != null)
 						getXMLModel().releaseFromEdit();
 				}
 			}
-		} finally {
+		}
+		finally {
 			aboutToChangeNode = null;
 		}
 	}
@@ -148,7 +151,7 @@
 	}
 
 	public void modelDirtyStateChanged(IStructuredModel model, boolean isDirty) {
-		if (!isDirty && resource.isModified()) { //The XMLModel was saved
+		if (!isDirty && resource.isModified()) { // The XMLModel was saved
 			resource.setModified(false);
 			long stamp = WorkbenchResourceHelper.computeModificationStamp(resource);
 			WorkbenchResourceHelper.setSynhronizationStamp(resource, stamp);
@@ -156,21 +159,21 @@
 			IFile aFile = WorkbenchResourceHelper.getFile(resource);
 			synchronizer.preSave(aFile);
 		}
-		if (isDirty) 
+		if (isDirty)
 			resource.setModified(true);
 	}
 
 	public void modelResourceDeleted(IStructuredModel model) {
-		//Do nothing
+		// Do nothing
 	}
 
 	public void modelResourceMoved(IStructuredModel oldModel, IStructuredModel newModel) {
-		//Do nothing
+		// Do nothing
 	}
 
 	/**
-	 * This method is called just prior to being removed from the ResourceSet. Ensure that all
-	 * reference counts to the XMLModel are removed.
+	 * This method is called just prior to being removed from the ResourceSet.
+	 * Ensure that all reference counts to the XMLModel are removed.
 	 */
 	public void preDelete() {
 		if (resource.isLoaded())
@@ -191,10 +194,11 @@
 		// Calling getModelManager() can result in a class cast exception that
 		// should
 		// be ignored.
-		//ModelManager mgr = null;
+		// ModelManager mgr = null;
 		try {
 			getModelManager();
-		} catch (ClassCastException exc) {
+		}
+		catch (ClassCastException exc) {
 			return;
 		}
 		if (xmlModel != null) {
@@ -214,7 +218,8 @@
 	}
 
 	/**
-	 * Insert the method's description here. Creation date: (9/7/2001 10:49:53 AM)
+	 * Insert the method's description here. Creation date: (9/7/2001 10:49:53
+	 * AM)
 	 */
 	public void registerAsModelStateListener() {
 		this.xmlModel.addModelStateListener(this);
@@ -242,7 +247,8 @@
 	/*
 	 * (non-Javadoc)
 	 * 
-	 * @see com.ibm.etools.emf2xml.Renderer#doSave(java.io.OutputStream, java.util.Map)
+	 * @see com.ibm.etools.emf2xml.Renderer#doSave(java.io.OutputStream,
+	 *      java.util.Map)
 	 */
 	public void doSave(OutputStream outputStream, Map options) throws IOException {
 
@@ -256,12 +262,14 @@
 			try {
 				synchronizer.preSave(aFile);
 				xmlModel.save(aFile);
-			} catch (CoreException ex) {
+			}
+			catch (CoreException ex) {
 				synchronizer.removeFromRecentlySavedList(aFile);
 				Logger.getLogger().logError(ex);
 			}
 			cacheSynchronizationStamp();
-		} finally {
+		}
+		finally {
 			isSaving = false;
 		}
 	}
@@ -287,7 +295,8 @@
 			IFile file = WorkbenchResourceHelper.getFile(getResource());
 			if (file != null) {
 				xmlModelId = getModelManager().calculateId(file);
-			} else {
+			}
+			else {
 				xmlModelId = resource.getURI() + Long.toString(System.currentTimeMillis());
 			}
 		}
@@ -347,15 +356,18 @@
 				}
 				file.create(is, true, null);
 				file.setLocal(true, 1, null);
-			} catch (CoreException e1) {
+			}
+			catch (CoreException e1) {
 				org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError(e1);
-			} finally {
+			}
+			finally {
 				if (null != is) {
 					is.close();
 				}
 			}
 			initializeXMLModel(file, true);
-		} catch (java.io.IOException ex) {
+		}
+		catch (java.io.IOException ex) {
 			org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError(UIResourceHandler.getString("Unexpected_IO_exception_occurred_creating_xml_document_1_EXC_"));//$NON-NLS-1$
 			org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError(ex);
 		}
@@ -378,7 +390,8 @@
 			}
 			setXMLModelId(getXMLModel().getId());
 			needsToCreateDOM = false;
-		} catch (CoreException e) {
+		}
+		catch (CoreException e) {
 			org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError(e);
 			return null;
 		}
@@ -419,18 +432,74 @@
 		}
 	}
 
+
+	/**
+	 * @deprecated use batchModeStart and BatchModeEnd instead
+	 * even if you do not use batchModelStart/End, you still need to 
+	 * use the try/finally pattern documented there. 
+	 */
+
 	public void setBatchMode(boolean isBatch) {
+		
+		// This is some extra processing for clients to know they may be using incorrectly
 		if (isBatch) {
-			isBatchChanges = true;
-			getXMLModel().aboutToChangeModel();
-			setRootNodeAdapterNotificationEnabled(false);
+			if (isBatchChanges) {
+				org.eclipse.wst.xml.core.internal.Logger.log(org.eclipse.wst.xml.core.internal.Logger.INFO, "setBatch was set to true when it was already true. This can be an inidcation of invalid calling order");
+			}
+		}
+
+
+		if (isBatch) {
+			batchModeStart();
 		}
 		else {
-			getXMLModel().changedModel();
-			setRootNodeAdapterNotificationEnabled(true);
-			isBatchChanges = false;
+			batchModeEnd();
 		}
 	}
+
+	/**
+	 * batchModeStart and batchModeEnd is a pair that controls notifications, and tread access. 
+	 * They should always be called in a try/finally block.
+	 * 
+	 * setBatchModel begins the processing where notifications are not sent
+	 * out on each change, but saved up until the endBatchMode called.
+	 * 
+	 * This pair of calls can also, indirectly, "lock" the DOM Model to access
+	 * from only one thread, so it should not be locked for long periods of
+	 * time. That's also why it is important to have the endBatchMode in a
+	 * finally block to be sure it is always called, or the DOM will be left
+	 * in a locked, unusable, state and only shortly away from severere program error.
+	 * 
+	 * <pre><code>Example</code>
+	 * 
+	 * try { 
+	 * 		batchModelStart();
+	 * 		...do a some work ...
+	 * 		}
+	 * 	finally {
+	 * 		endBatchMode();
+	 * 		}
+	 * 
+	 * 
+	 * </pre>
+	 */
+	public void batchModeStart() {
+		isBatchChanges = true;
+		getXMLModel().aboutToChangeModel();
+		setRootNodeAdapterNotificationEnabled(false);
+	}
+
+	/**
+	 * see batchModelEnd
+	 * 
+	 */
+
+	public void batchModeEnd() {
+		getXMLModel().changedModel();
+		setRootNodeAdapterNotificationEnabled(true);
+		isBatchChanges = false;
+	}
+
 	public boolean isBatchMode() {
 		return isBatchChanges;
 	}
@@ -439,8 +508,11 @@
 		EObject root = resource.getRootObject();
 		if (root != null) {
 			EMF2DOMAdapter adapter = (EMF2DOMAdapter) EcoreUtil.getExistingAdapter(root, EMF2DOMAdapter.ADAPTER_CLASS);
-			if (adapter != null)
+			if (adapter != null) {
 				adapter.setNotificationEnabled(b);
+				if (b)
+					adapter.updateDOM();
+			}
 		}
 	}
 
@@ -499,11 +571,11 @@
 
 	public void modelAboutToBeReinitialized(IStructuredModel structuredModel) {
 		// TODO Auto-generated method stub
-		
+
 	}
 
 	public void modelReinitialized(IStructuredModel structuredModel) {
 		// TODO Auto-generated method stub
-		
+
 	}
 }
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/ComponentSearchContributor.java b/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/ComponentSearchContributor.java
deleted file mode 100644
index 6c1dcde..0000000
--- a/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/ComponentSearchContributor.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * 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.xml.core.internal.search;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import org.eclipse.wst.common.core.search.pattern.QualifiedName;
-
-public abstract class ComponentSearchContributor  {
-
-	protected HashMap declarations;
-
-	protected HashMap references;
-
-	protected String[] namespaces;
-
-	public ComponentSearchContributor() {
-		super();
-	}
-
-	public XMLSearchPattern getDeclarationPattern(QualifiedName componentName) {
-		return (XMLSearchPattern) getDeclarations().get(componentName);
-	}
-
-	protected Map getDeclarations() {
-		if (declarations == null) {
-			initializeDeclarations();
-		}
-		return declarations;
-	}
-
-	protected Map getReferences() {
-		if (references == null) {
-			initializeReferences();
-		}
-		return references;
-	}
-
-	public XMLSearchPattern[] getReferencesPatterns(QualifiedName componentName) {
-		List references = (List) getReferences().get(componentName);
-		if (references != null) {
-			return (XMLSearchPattern[]) references
-					.toArray(new XMLSearchPattern[references.size()]);
-		}
-		return new XMLSearchPattern[0];
-	}
-	
-	
-	public boolean supports(QualifiedName componentName){
-		return getReferencesPatterns(componentName).length > 0 ||
-			getDeclarationPattern(componentName) != null;
-	}
-
-	public String[] getSupportedNamespaces() {
-		return namespaces;
-	}
-
-	protected abstract void initializeDeclarations();
-
-	protected abstract void initializeReferences();
-
-	protected abstract void initializeSupportedNamespaces();
-}
diff --git a/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/TargetNamespaceReferencePattern.java b/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/TargetNamespaceReferencePattern.java
deleted file mode 100644
index 6321b7c..0000000
--- a/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/TargetNamespaceReferencePattern.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * 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.xml.core.internal.search;
-
-import org.eclipse.wst.common.core.search.pattern.SearchPattern;
-
-public class TargetNamespaceReferencePattern extends SearchPattern {
-	
-	String namespaceURI;
-	
-	public TargetNamespaceReferencePattern(int matchRule, String namespaceuri) {
-		super(matchRule);
-		namespaceURI = namespaceuri;
-	}
-	
-	public TargetNamespaceReferencePattern(String namespaceuri) {
-		super();
-		namespaceURI = namespaceuri;
-	}
-
-}
diff --git a/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/XMLComponentDeclarationPattern.java b/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/XMLComponentDeclarationPattern.java
deleted file mode 100644
index 19f475b..0000000
--- a/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/XMLComponentDeclarationPattern.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * 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.xml.core.internal.search;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.wst.common.core.search.pattern.QualifiedName;
-
-public class XMLComponentDeclarationPattern extends XMLComponentSearchPattern {
-
-	public XMLComponentDeclarationPattern(QualifiedName elementQName, QualifiedName typeQName, int matchRule) {
-		super(null, elementQName, typeQName, matchRule);
-		
-	}
-
-	public XMLComponentDeclarationPattern(IFile file, QualifiedName elementQName, QualifiedName typeQName) {
-		super(file, elementQName, typeQName);
-	}
-	
-	public XMLComponentDeclarationPattern(QualifiedName elementQName, QualifiedName typeQName) {
-		super(null, elementQName, typeQName);
-	}
-
-	
-	
-}
diff --git a/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/XMLComponentReferencePattern.java b/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/XMLComponentReferencePattern.java
deleted file mode 100644
index e68a8a4..0000000
--- a/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/XMLComponentReferencePattern.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * 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.xml.core.internal.search;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.wst.common.core.search.pattern.QualifiedName;
-
-public class XMLComponentReferencePattern extends XMLComponentSearchPattern{
-
-	public XMLComponentReferencePattern(IFile file, QualifiedName elementQName, QualifiedName typeQName, int matchRule) {
-		super(file, elementQName, typeQName, matchRule);
-		
-	}
-
-	public XMLComponentReferencePattern(IFile file, QualifiedName elementQName, QualifiedName typeQName) {
-		super(file, elementQName, typeQName);
-		
-	}
-	
-	public XMLComponentReferencePattern(QualifiedName elementQName, QualifiedName typeQName) {
-		super(null, elementQName, typeQName);
-		
-	}
-	
-	
-	
-	
-}
diff --git a/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/XMLComponentSearchPattern.java b/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/XMLComponentSearchPattern.java
deleted file mode 100644
index 7abd04b..0000000
--- a/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/XMLComponentSearchPattern.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * 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.xml.core.internal.search;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.wst.common.core.search.pattern.ComponentSearchPattern;
-import org.eclipse.wst.common.core.search.pattern.QualifiedName;
-
-/**
- * XML component search pattern is a composite pattern that combines XML element pattern.
- *
- */
-public class XMLComponentSearchPattern extends ComponentSearchPattern {
-	
-	/**
-	 * Containing element patterns
-	 */
-	XMLSearchPattern[] children = new XMLSearchPattern[0];
-	
-
-	public XMLComponentSearchPattern(IFile file, QualifiedName elementQName, QualifiedName typeQName, int matchRule) {
-		super(file, elementQName, typeQName, matchRule);
-		
-	}
-
-
-	public XMLComponentSearchPattern(IFile file, QualifiedName elementQName, QualifiedName typeQName) {
-		super(file, elementQName, typeQName);
-		
-	}
-
-	public XMLSearchPattern[] getChildren(){
-		return children;
-	}
-	
-	public void setChildren(XMLSearchPattern[] patterns){
-		children = patterns;
-		
-	}
-
-}
diff --git a/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/XMLSearchParticipant.java b/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/XMLSearchParticipant.java
deleted file mode 100644
index 8657076..0000000
--- a/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/XMLSearchParticipant.java
+++ /dev/null
@@ -1,376 +0,0 @@
-/*******************************************************************************
- * 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.xml.core.internal.search;
-
-import java.util.HashMap;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.wst.common.core.search.SearchMatch;
-import org.eclipse.wst.common.core.search.SearchParticipant;
-import org.eclipse.wst.common.core.search.SearchRequestor;
-import org.eclipse.wst.common.core.search.document.ComponentDeclarationEntry;
-import org.eclipse.wst.common.core.search.document.Entry;
-import org.eclipse.wst.common.core.search.document.FileReferenceEntry;
-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.ComponentSearchPattern;
-import org.eclipse.wst.common.core.search.pattern.FileReferencePattern;
-import org.eclipse.wst.common.core.search.pattern.SearchPattern;
-import org.eclipse.wst.common.core.search.scope.ContentTypeSearchScope;
-import org.eclipse.wst.common.core.search.scope.SearchScope;
-import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolver;
-import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolverPlugin;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.eclipse.wst.xml.core.internal.search.impl.IXMLSearchConstants;
-import org.eclipse.wst.xml.core.internal.search.impl.XMLSearchDocument;
-import org.eclipse.wst.xml.core.internal.search.matching.PatternMatcher;
-import org.eclipse.wst.xml.core.internal.search.matching.XMLSearchPatternMatcher;
-import org.eclipse.wst.xml.core.internal.search.quickscan.XMLQuickScan;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- *
- */
-public abstract class XMLSearchParticipant extends SearchParticipant {
-	
-	String[] supportedContentTypes;
-	
-	protected static final boolean debugPerf = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.wst.xml.core.internal.search/perf")); //$NON-NLS-1$ //$NON-NLS-2$
-
-	public XMLSearchParticipant() {
-		super();
-	}
-	
- public  boolean initialize(SearchPattern pattern, String[] contentTypes){
-		
-	    super.initialize(pattern, contentTypes);
-		this.supportedContentTypes = contentTypes;
-		
-		if(pattern instanceof XMLComponentSearchPattern){
-			return true;
-		}
-		return false;
-	}
-
-	
-
-	public SearchDocument getDocument(String documentPath) {
-
-		return new XMLSearchDocument(documentPath, this);
-
-	}
-
-	public String getDescription() {
-		return "XML search participant"; //$NON-NLS-1$
-	}
-
-
-
-	private void locateMatches(SearchPattern pattern, SearchDocument document,
-			SearchRequestor requestor, IProgressMonitor monitor) {
-
-        // TODO... utilize search options (that should get passed down via the SearchEngine)
-        // to specify if accurate source coordinates are req'd if not, simply use the SAX results
-        //
-        if (pattern.getMatchRule() == SearchPattern.R_PATTERN_MATCH)
-        {          
-          IFile file = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(new Path(document.getPath()));
-          // TODO.. don't assume the category is COMPONENT_DECL... handle any arbitarty category
-          Entry[] entries = document.getEntries(IXMLSearchConstants.COMPONENT_DECL, null, 0);
-          for (int i = 0; i < entries.length; i++)
-          {
-            // TODO.. don't assume this is just a component declaration entry            
-            ComponentDeclarationEntry entry = (ComponentDeclarationEntry)entries[i];
-            SearchMatch searchMatch = new SearchMatch(null, 0, 0, file);
-            searchMatch.map.put("name", entry.getName());
-            try
-            {
-              requestor.acceptSearchMatch(searchMatch);
-            }
-            catch (Exception e)
-            {              
-            }
-          }  
-        }
-        else 
-        {  if (document.getModel() instanceof IDOMModel) {
-			IDOMModel domModel = (IDOMModel) document.getModel();
-			IDOMElement contextNode = (IDOMElement) domModel.getDocument()
-					.getDocumentElement();
-			DOMVisitor visitor = new DOMVisitor(document.getPath(), pattern,
-					requestor);
-			visitor.visit(contextNode);
-		}
-        }
-	}
-	
-	private PatternMatcher getAdapter(Object adaptableObject, Class adapterType) {
-		if (PatternMatcher.class.equals(adapterType) &&
-				(adaptableObject instanceof XMLSearchPattern ||
-				adaptableObject instanceof XMLComponentSearchPattern) ) {
-			return new XMLSearchPatternMatcher();
-		} 
-		return null; 
-	}
-
-	private class DOMVisitor {
-
-		String path;
-		SearchPattern pattern;
-		SearchRequestor requestor;
-		PatternMatcher matcher;
-
-		
-		protected DOMVisitor(String path, SearchPattern pattern,
-				SearchRequestor requestor) {
-			super();
-			this.path = path;
-			this.pattern = pattern;
-			
-			matcher = (PatternMatcher)pattern.getAdapter(PatternMatcher.class);
-			if(matcher == null){
-				matcher = getAdapter(pattern, PatternMatcher.class);
-			}
-			this.requestor = requestor;
-		}
-
-		private void visit(Node node) {
-			if (node.getNodeType() == Node.ELEMENT_NODE) {
-				match((Element)node);
-				NodeList nodeList = node.getChildNodes();
-				for (int i = 0; i < nodeList.getLength(); i++) {
-					Node aNode = nodeList.item(i);
-					visit(aNode);
-				}
-			}
-		}
-
-		private void match(Element node) {
-			IFile file = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(
-					new Path(path));
-			if(matcher != null){
-				matcher.locateMatches(pattern, file, node, requestor);
-			}
-
-			
-		}
-
-	}
-
-	public SearchScope selectDocumentLocations(SearchPattern pattern, SearchScope scope, IProgressMonitor monitor) {
-		/*
-		 * gate #1: reduce the scope to the files with the content type that
-		 * could be searched using this participant
-		 */ 
-		String[] contentTypes = getSupportedContentTypes();	
-		if(contentTypes != null && contentTypes.length > 0){
-			scope = new ContentTypeSearchScope(scope, contentTypes);
-		}
-		return super.selectDocumentLocations(pattern, scope, monitor);
-	}
-	
-	public abstract ComponentSearchContributor getSearchContributor();
-
-
-	public void beginSearching(SearchPattern pattern) {
-		
-		super.beginSearching(pattern);
-		if(pattern instanceof XMLComponentDeclarationPattern){
-			XMLComponentDeclarationPattern componentPattern = (XMLComponentDeclarationPattern)pattern;
-			XMLSearchPattern childPattern = getSearchContributor().getDeclarationPattern(componentPattern.getMetaName());
-			if(childPattern != null){
-					childPattern.setSearchName(componentPattern.getName().getLocalName());
-					childPattern.setSearchNamespace(componentPattern.getName().getNamespace());
-	     			componentPattern.setChildren(new XMLSearchPattern[]{childPattern});
-			}
-			
-		}
-		else if(pattern instanceof XMLComponentReferencePattern){
-			XMLComponentReferencePattern componentPattern = (XMLComponentReferencePattern)pattern;
-			XMLSearchPattern[] childPatterns = getSearchContributor().getReferencesPatterns(componentPattern.getMetaName());
-			for (int i = 0; i < childPatterns.length; i++) {
-				XMLSearchPattern childPattern = childPatterns[i];
-				childPattern.setSearchName(componentPattern.getName().getLocalName());
-				childPattern.setSearchNamespace(componentPattern.getName().getNamespace());				
-			}
-			componentPattern.setChildren(childPatterns);
-			
-		}
-	}
-	
-	
-	/**
-	 * The intend of this method is to limit the search to the files that have content 
-	 * which can be searched for the given pattern. It is called from 
-	 * {@link #selectDocumentLocations(SearchPattern, SearchScope, IProgressMonitor)}
-	 * 
-	 * @param pattern the search pattern that is searched for
-	 * @return content type's unique identifiers that could be searched for the given pattern.
-	 */
-	public String[] getSupportedContentTypes(){
-		return supportedContentTypes;
-	}
-
-	public void populateSearchDocument(SearchDocument document, SearchPattern pattern)
-	{
-		PatternMatcher matcher = (PatternMatcher)pattern.getAdapter(PatternMatcher.class);
-		if(matcher == null){
-			matcher = getAdapter(pattern, PatternMatcher.class);
-		}
-		XMLQuickScan.populateSearchDocument(document, matcher, pattern);		
-	}
-
-	public void locateMatches(SearchDocumentSet documentSet, SearchPattern pattern, SearchScope scope, SearchRequestor requestor, IProgressMonitor monitor) throws CoreException
-	{
-		long time = System.currentTimeMillis();
-		
-		// TODO: use the file reference entries in the documents to reduce the scope to the referenced files only
-		// SearchDocument[] documents = documentSet.getSearchDocuments(id);
-                
-        // check to see if the search pattern is qualified by a file location
-        // if this is the case then we can use file scoping rules to prune the matches
-        IFile targetFile = null;
-        if (pattern instanceof ComponentSearchPattern)
-        {
-          ComponentSearchPattern componentSearchPattern = (ComponentSearchPattern)pattern;
-          targetFile = componentSearchPattern.getFile();                                       
-        }		
-        
-		// here we should have in scope only referenced files
-		IFile[] files = scope.enclosingFiles();  
-		for (int i = 0; i < files.length; i++)
-		{
-			IFile file = files[i];
-			String path = file.getLocation().toString();
-			SearchDocument document = documentSet.getSearchDocument(path, id); 
-			Entry[] entries = document.getEntries(getSearchEntryCategory(pattern), null, 0);           
-			if(entries != null && entries.length > 0)
-            {
-              //for (int j = 0; j < entries.length; j++)
-              //{
-              //  Entry entry = entries[j];
-                //System.out.println("entry " + entry.getCategory() + " " + entry.getKey() + " " + entry.getClass().getName());                 
-              //}  
-              
-              boolean isInScope = true;
-              if (targetFile != null)
-              {
-                try
-                {
-                  isInScope = isLinked(documentSet, "file:///" + path, "file:///" + targetFile.getLocation().toString());
-                  //if (path.endsWith("CancelSelection.wsdl")  && path.indexOf("clone1") != -1)
-                  //{
-                  //  fileReferenceTable.debug(qualifiedPath, 0, 5);
-                  //}                   
-                }
-                catch (Exception e)
-                {
-                  e.printStackTrace();
-                }
-              }              
-              if (isInScope)
-              { 
-			    this.locateMatches(pattern, document, requestor, monitor);
-              }  
-            }
-		}
-		
-		
-		if (debugPerf)
-		{
-			System.out
-					.println(""
-							+ getDescription()
-							+ ": " + (System.currentTimeMillis() - time) + "ms for locateMatches"); //$NON-NLS-1$ //$NON-NLS-2$
-		}
-
-		
-	}
-    
-    private boolean isLinked(SearchDocumentSet set, String source, String target)
-    {
-      return isLinked(set, source, target, new HashMap());
-    }
-    
-    private boolean isLinked(SearchDocumentSet set, String source, String target, HashMap visited)
-    {
-      if (source.equals(target))
-        return true;
-      
-      String fileProtocol = "file:///";            
-      if (source.startsWith(fileProtocol))
-      {    
-        
-      SearchDocument document = set._tempGetSearchDocumetn(source.substring(fileProtocol.length()));      
-      if (document != null)
-      {        
-        URIResolver uriResolver = URIResolverPlugin.createResolver();        
-        Entry[] entries = document.getEntries(IXMLSearchConstants.REF, null, 0);
-        String[] resolveEntry = new String[entries.length];        
-        for (int j = 0; j < entries.length; j++)
-        {
-          Entry entry = entries[j];
-          if (entry instanceof FileReferenceEntry)
-          {
-            FileReferenceEntry fileReferenceEntry = (FileReferenceEntry)entry;
-            // TODO.. record an utilize the public id from the fileReferenceEntry
-            //
-            if (fileReferenceEntry.getRelativeFilePath() != null)
-            {  
-              String resolvedURI = uriResolver.resolve(source, null, fileReferenceEntry.getRelativeFilePath());
-              resolveEntry[j] = resolvedURI;
-              if (resolvedURI.equals(target))
-              {
-                return true;
-              }             
-            }  
-          }
-        }
-        // now see if there's an indirect link from the source to the target
-        // we keep track of the nodes we've already visited to avoid cycles
-        if (visited.get(source) == null)
-        {
-          visited.put(source, Boolean.TRUE);
-          for (int j = 0; j < entries.length; j++)
-          {                     
-            String resolvedURI = resolveEntry[j];
-            if (resolvedURI != null && isLinked(set, resolveEntry[j], target, visited))                
-              return true;            
-          }    
-        }                      
-      }            
-      } 
-      return false;
-    }
-    
-   
-    
-	public static String getSearchEntryCategory(SearchPattern pattern){
-		if(pattern instanceof XMLComponentDeclarationPattern){
-			return IXMLSearchConstants.COMPONENT_DECL;
-		}
-		else if(pattern instanceof XMLComponentReferencePattern){
-			return IXMLSearchConstants.COMPONENT_REF;
-		}
-		else if(pattern instanceof FileReferencePattern){
-		   return IXMLSearchConstants.COMPONENT_REF;
-		}
-		return null;
-	}   
-}
diff --git a/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/XMLSearchPattern.java b/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/XMLSearchPattern.java
deleted file mode 100644
index 1fb55d7..0000000
--- a/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/XMLSearchPattern.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * 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.xml.core.internal.search;
-
-import org.eclipse.wst.common.core.search.pattern.SearchPattern;
-
-public class XMLSearchPattern extends SearchPattern{
-	
-	private String elementNamespace = null;
-	private String elementName = null;
-	private String attributeName = null;
-	private String searchName = null;
-	private String searchNamespace = null;
-	
-	public XMLSearchPattern(String elementNamespace, String elementName, String attributeName) {
-		super();
-		this.attributeName = attributeName;
-		this.elementName = elementName;
-		this.elementNamespace = elementNamespace;
-	}
-	
-	public XMLSearchPattern(){
-		
-	}
-	
-	public String getAttributeName() {
-		return attributeName;
-	}
-
-	public String getElementName() {
-		return elementName;
-	}
-
-	public String getElementNamespace() {
-		return elementNamespace;
-	}
-
-	public String getSearchName() {
-		return searchName;
-	}
-
-	public String getSearchNamespace() {
-		return searchNamespace;
-	}
-
-	public void setSearchName(String searchName) {
-		this.searchName = searchName;
-	}
-
-	public void setSearchNamespace(String searchNamespace) {
-		this.searchNamespace = searchNamespace;
-	}
-
-	public void setAttributeName(String attributeName) {
-		this.attributeName = attributeName;
-	}
-
-	public void setElementName(String elementName) {
-		this.elementName = elementName;
-	}
-
-	public void setElementNamespace(String elementNamespace) {
-		this.elementNamespace = elementNamespace;
-	}
-	
-
-	
-}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/impl/IXMLSearchConstants.java b/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/impl/IXMLSearchConstants.java
deleted file mode 100644
index d160d81..0000000
--- a/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/impl/IXMLSearchConstants.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * 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.xml.core.internal.search.impl;
-
-public interface IXMLSearchConstants
-{
-		String REF= "outLink"; //$NON-NLS-1$
-		String COMPONENT_DECL = "componentDecl"; //$NON-NLS-1$
-		String COMPONENT_REF = "componentDecl"; //$NON-NLS-1$
-	
-}
diff --git a/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/impl/Messages.java b/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/impl/Messages.java
deleted file mode 100644
index d7ae22f..0000000
--- a/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/impl/Messages.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * 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.xml.core.internal.search.impl;
-
-import java.text.MessageFormat;
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
-	
-	private static final String BUNDLE_NAME = "org.eclipse.wst.xml.core.internal.search.messages";//$NON-NLS-1$
-
-	
-	static {
-		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
-	}
-	private Messages() {
-		// Do not instantiate
-	}
-	
-	/**
-	 * Bind the given message's substitution locations with the given string values.
-	 * 
-	 * @param message the message to be manipulated
-	 * @return the manipulated String
-	 */
-	public static String bind(String message) {
-		return bind(message, null);
-	}
-	
-	/**
-	 * Bind the given message's substitution locations with the given string values.
-	 * 
-	 * @param message the message to be manipulated
-	 * @param binding the object to be inserted into the message
-	 * @return the manipulated String
-	 */
-	public static String bind(String message, Object binding) {
-		return bind(message, new Object[] {binding});
-	}
-
-	/**
-	 * Bind the given message's substitution locations with the given string values.
-	 * 
-	 * @param message the message to be manipulated
-	 * @param binding1 An object to be inserted into the message
-	 * @param binding2 A second object to be inserted into the message
-	 * @return the manipulated String
-	 */
-	public static String bind(String message, Object binding1, Object binding2) {
-		return bind(message, new Object[] {binding1, binding2});
-	}
-
-	/**
-	 * Bind the given message's substitution locations with the given string values.
-	 * 
-	 * @param message the message to be manipulated
-	 * @param bindings An array of objects to be inserted into the message
-	 * @return the manipulated String
-	 */
-	public static String bind(String message, Object[] bindings) {
-		return MessageFormat.format(message, bindings);
-	}
-
-}
diff --git a/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/impl/XMLSearchDocument.java b/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/impl/XMLSearchDocument.java
deleted file mode 100644
index 7e70485..0000000
--- a/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/impl/XMLSearchDocument.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * 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.xml.core.internal.search.impl;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.wst.common.core.search.document.Entry;
-import org.eclipse.wst.common.core.search.document.SearchDocument;
-import org.eclipse.wst.sse.core.internal.provisional.StructuredModelManager;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.eclipse.wst.xml.core.internal.search.XMLSearchParticipant;
-
-public class XMLSearchDocument extends SearchDocument {
-	
-	IDOMModel model;
-	Map entries = new HashMap(); // category -> set (entry)	
-
-	public XMLSearchDocument(String documentPath, XMLSearchParticipant participant) {
-		super(documentPath, participant);
-	}
-
-	public Object getModel() {
-		if(model == null){
-            //System.out.println("creating DOM for " + getPath());
-			IFile file = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(new Path(getPath()));
-			if(file != null){
-				try {
-					model = (IDOMModel)StructuredModelManager.getModelManager().getModelForRead(file);
-				} catch (IOException e) {
-					e.printStackTrace();
-				} catch (CoreException e) {
-					e.printStackTrace();
-				}
-			
-			}
-		}
-		return model;
-	}
-
-	public Entry[] getEntries(String category, String key, int matchRule)
-	{
-		// TODO use matchRule
-		Set results = new HashSet();
-		if(category != null){
-			Set values = (Set)entries.get(category);
-			if(values == null){
-				return new Entry[0];
-			}
-			if(key == null || "".equals(key) || "*".equals(key)){
-				// entries with any key in the given category
-				results.addAll(values);
-			}
-			else{
-				// entries with the specified key in the given category
-				for (Iterator iter = values.iterator(); iter.hasNext();)
-				{
-					Entry entry = (Entry) iter.next();
-					if(key.equals(entry.getKey())){
-						results.add(entry);
-					}
-				}
-			}
-			
-		}
-		return (Entry[]) results.toArray(new Entry[results.size()]);
-	}
-
-	public void putEntry(Entry entry)
-	{
-		if(entry.getCategory() != null){
-			Set values = (Set)entries.get(entry.getCategory());
-			if(values == null){
-				entries.put(entry.getCategory(), values=new HashSet());
-			}
-			values.add(entry);
-		}
-		
-	}
-
-}
diff --git a/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/matching/PatternMatcher.java b/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/matching/PatternMatcher.java
deleted file mode 100644
index 7590f57..0000000
--- a/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/matching/PatternMatcher.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * 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.xml.core.internal.search.matching;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.wst.common.core.search.SearchMatch;
-import org.eclipse.wst.common.core.search.SearchParticipant;
-import org.eclipse.wst.common.core.search.SearchRequestor;
-import org.eclipse.wst.common.core.search.pattern.SearchPattern;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-
-/**
- * This class contains matching implementation.  
- * <p>
- * Subclasses of the PatternMatches should provide an implementation of the specific pattern matching.
- * </p>
- * <p>
- * Subclasses of the PatternMatches should be set as adapters for the patterns that they match.
- * </p>
- * An implementation of {@link SearchParticipant#selectDocumentLocations()} will call 
- * { @link PatternMatcher#matches() } on the adapter on pattern matcher.
- * 
- * An implementation of {@link SearchParticipant#locateMatches()} will call 
- * { @link PatternMatcher#locateMatches() } on the adapter on pattern matcher.
- *
- */
-public abstract class PatternMatcher {
-	
-	
-	/**
-	 * This method does dive actual match location to the requestor if there are matches
-	 */
-	public abstract void locateMatches(SearchPattern pattern, IFile file, Element element, SearchRequestor requestor);
-
-	/**
-	 * This method only answers if the pattern matches element, it does not give actual match location
-	 */
-	public abstract boolean matches(SearchPattern pattern, Object element);
-    
-    protected SearchMatch createSearchMatch(IFile file, Attr attributeNode)
-    {
-        int start = 0;
-        int length = 0;
-        if(attributeNode instanceof IDOMAttr){
-            IDOMAttr domAttr = (IDOMAttr)attributeNode;
-            start = domAttr.getValueRegionStartOffset();
-            length = domAttr.getValueRegionText().length();
-        }
-        SearchMatch match = new SearchMatch(attributeNode, start, length, file);
-        return match;
-    }
-	
-	protected void addMatch(SearchPattern pattern, IFile file, Attr attributeNode, SearchRequestor requestor) {
-        //System.out.println("addMatch " + pattern + " " + attributeNode.getName() + "=" + attributeNode.getValue());
-		if (attributeNode != null) {
-				SearchMatch match = createSearchMatch(file, attributeNode);                
-				if(requestor != null){
-					try {
-						requestor.acceptSearchMatch(match);
-					} catch (CoreException e) {
-						//do nothing
-					}
-				}
-		}
-	}
-
-
-}
diff --git a/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/matching/SAXSearchElement.java b/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/matching/SAXSearchElement.java
deleted file mode 100644
index 330d144..0000000
--- a/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/matching/SAXSearchElement.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * 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.xml.core.internal.search.matching;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.xml.sax.Attributes;
-
-public class SAXSearchElement{
-	Attributes attributes;
-	String elementName;
-	String elementNamespace;
-	Map namespaceMap = new HashMap(); // Map of string prefix keys and namespace
-	String targetNamespace = "";
-	
-	public SAXSearchElement() {
-		super();
-	}
-	public Attributes getAttributes() {
-		return attributes;
-	}
-	public String getElementName() {
-		return elementName;
-	}
-	public String getElementNamespace() {
-		return elementNamespace;
-	}
-	public Map getNamespaceMap() {
-		return namespaceMap;
-	}
-	public String getTargetNamespace() {
-		return targetNamespace;
-	}
-	public void setAttributes(Attributes attributes) {
-		this.attributes = attributes;
-	}
-	public void setElementName(String elementName) {
-		this.elementName = elementName;
-	}
-	public void setElementNamespace(String elementNamespace) {
-		this.elementNamespace = elementNamespace;
-	}
-	public void setNamespaceMap(Map namespaceMap) {
-		this.namespaceMap = namespaceMap;
-	}
-	public void setTargetNamespace(String targetNamespace) {
-		this.targetNamespace = targetNamespace;
-	}
-	
-	
-	
-	
-}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/matching/XMLSearchPatternMatcher.java b/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/matching/XMLSearchPatternMatcher.java
deleted file mode 100644
index 5723060..0000000
--- a/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/matching/XMLSearchPatternMatcher.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*******************************************************************************
- * 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.xml.core.internal.search.matching;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.wst.common.core.search.SearchMatch;
-import org.eclipse.wst.common.core.search.SearchRequestor;
-import org.eclipse.wst.common.core.search.pattern.QualifiedName;
-import org.eclipse.wst.common.core.search.pattern.SearchPattern;
-import org.eclipse.wst.xml.core.internal.search.XMLComponentSearchPattern;
-import org.eclipse.wst.xml.core.internal.search.XMLSearchPattern;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-
-public class XMLSearchPatternMatcher extends PatternMatcher{
-	
-
-	protected String computeNamespaceForPrefix(Element element, String prefix)
-	{
-	  String result = null;
-	  for (Node node = element; node != null; node = node.getParentNode())
-	  {
-		if (node.getNodeType() == Node.ELEMENT_NODE)
-		{
-		  Element e = (Element)node;
-		  String attributeName = (prefix != null && prefix.length() > 0) ? ("xmlns:" + prefix) : "xmlns"; 
-		  result = e.getAttribute(attributeName);
-		  if (result != null)
-		  {
-			 break;  
-		  }	  
-		}	
-	  }	  
-	  return result;
-	}
-	
-
-	protected void initialize(XMLSearchPattern pattern, Element domElement) {
-	
-			pattern.setElementName(domElement.getLocalName());
-			pattern.setElementNamespace(domElement.getNamespaceURI());
-			String actualValue = domElement.getAttribute(pattern.getAttributeName());
-			 if(actualValue != null){
-					int n = actualValue.indexOf(":");
-					if(n > 0){
-						String prefix = actualValue.substring(0, n);
-						pattern.setSearchName(actualValue.substring(n+1));      
-						
-						String namespace = computeNamespaceForPrefix(domElement, prefix);
-						pattern.setSearchNamespace(namespace);
-					
-					}
-					else {
-						pattern.setSearchName(actualValue);
-						pattern.setSearchNamespace(domElement.getOwnerDocument().getDocumentElement().getAttribute("targetNamespace"));
-					}
-			    }
-		
-	}
-	
-	protected void initialize(XMLSearchPattern pattern, SAXSearchElement saxElement) {
-		
-		pattern.setElementName(saxElement.getElementName());
-		pattern.setElementNamespace(saxElement.getElementNamespace());
-		String actualValue = saxElement.getAttributes().getValue(pattern.getAttributeName());
-		 if(actualValue != null){
-				int n = actualValue.indexOf(":");
-				if(n > 0){
-					String prefix = actualValue.substring(0, n);
-					pattern.setSearchName(actualValue.substring(n+1));
-					pattern.setSearchNamespace((String)saxElement.getNamespaceMap().get(prefix));
-				
-				}
-				else {
-					pattern.setSearchName(actualValue);
-					pattern.setSearchNamespace(saxElement.getTargetNamespace());
-				}
-		    }
-	
-	}
-	
-	XMLSearchPattern searchPattern;
-	
-	public XMLSearchPatternMatcher() {
-		super();
-		
-	}
-
-	
-
-	
-	/**
-	 * This method does dive actual match location to the requestor if there are matches
-	 */
-	
-	public void locateMatches(SearchPattern pattern, IFile file, Element element, SearchRequestor requestor) {
-		if(pattern instanceof XMLComponentSearchPattern){
-			XMLSearchPattern[] childPatterns = ((XMLComponentSearchPattern)pattern).getChildren();
-			for (int i = 0; i < childPatterns.length; i++) {
-				PatternMatcher matcher = (PatternMatcher)childPatterns[i].getAdapter(PatternMatcher.class);
-				if(matcher == null){
-					matcher = this;
-				}
-				if(matcher != null){
-					matcher.locateMatches(childPatterns[i], file, element, requestor);
-				}
-			}
-		}
-		else if(pattern instanceof XMLSearchPattern){
-			if(matches(pattern, element)){
-				Attr attribute = element.getAttributeNode(((XMLSearchPattern)pattern).getAttributeName());
-				addMatch(pattern, file, attribute, requestor);
-			}
-		
-		}
-	}
-	
-	/**
-	 * This method only answers if the pattern matches element, it does not give actual match location
-	 */
-	public boolean matches(SearchPattern pattern, Object element){
-		if(pattern instanceof XMLComponentSearchPattern){
-			XMLSearchPattern[] childPatterns = ((XMLComponentSearchPattern)pattern).getChildren();
-			for (int i = 0; i < childPatterns.length; i++) {
-				PatternMatcher matcher = (PatternMatcher)childPatterns[i].getAdapter(PatternMatcher.class);
-				if(matcher == null){
-					matcher = this;
-				}
-				if(matcher != null){
-					if(matcher.matches(childPatterns[i], element)){
-						return true;
-					}
-				}
-				
-			}
-		}
-		else if(pattern instanceof XMLSearchPattern){
-			
-			XMLSearchPattern possibleMatch = new XMLSearchPattern();
-			possibleMatch.setAttributeName(((XMLSearchPattern)pattern).getAttributeName());
-			if(element instanceof Element){
-				initialize(possibleMatch, (Element)element);
-			}
-			else if(element instanceof SAXSearchElement){
-				initialize(possibleMatch, (SAXSearchElement)element);
-			}
-			searchPattern = (XMLSearchPattern)pattern;
-			return matchesPattern(possibleMatch);
-		}
-		return false;
-	}
-	
-	protected boolean matchesPattern(SearchPattern pattern) {
-		if(searchPattern != null && pattern instanceof XMLSearchPattern){
-			XMLSearchPattern decodedPattern = (XMLSearchPattern)pattern;
-            if(searchPattern.getElementName().equals(decodedPattern.getElementName()) &&
-					searchPattern.getElementNamespace().equals(decodedPattern.getElementNamespace())){
-				if(searchPattern.getSearchName() == null)
-                {  
-                  return false;
-                }
-                else if ("*".equals(searchPattern.getSearchName()))
-                {
-                  return true;
-                }  
-                else if(searchPattern.getSearchNamespace() == null){
-					return searchPattern.getSearchName().equals(decodedPattern.getSearchName());
-				}
-				else{
-					return searchPattern.getSearchName().equals(decodedPattern.getSearchName()) &&
-					searchPattern.getSearchNamespace().equals(decodedPattern.getSearchNamespace());
-				}
-			}
-		}
-		
-		return false;
-	}
-	
-    
-    protected SearchMatch createSearchMatch(IFile file, Attr attributeNode)
-    {
-      SearchMatch match = super.createSearchMatch(file, attributeNode);
-      // todo... remove this ugly hack!!
-      if ("name".equals(attributeNode.getName()))
-      {
-        QualifiedName qualifiedName = new QualifiedName("todo-compute-targetNamespace", attributeNode.getValue());
-        match.map.put("name", qualifiedName);
-      }
-      //Element element = attributeNode.getOwnerDocument().getDocumentElement();
-      //if (element.getAttribute("targetNamespace"))
-      //{        
-      //}  
-      return match;
-    }
-
-}
diff --git a/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/quickscan/XMLQuickScan.java b/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/quickscan/XMLQuickScan.java
deleted file mode 100644
index 34e7dc5..0000000
--- a/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/quickscan/XMLQuickScan.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2004 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.xml.core.internal.search.quickscan;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-import org.eclipse.wst.common.core.search.document.SearchDocument;
-import org.eclipse.wst.common.core.search.pattern.SearchPattern;
-import org.eclipse.wst.xml.core.internal.search.matching.PatternMatcher;
-import org.xml.sax.InputSource;
-import org.xml.sax.XMLReader;
-
-/**
- * 
- */
-public class XMLQuickScan
-{
-
-	public static String getTargetNamespace(String fullFilePath)
-	{
-		XMLQuickScanContentHandler handler = new XMLQuickScanContentHandler();
-		parseFile(fullFilePath, handler);
-		return handler.getTargetNamespace();
-	}
-	
-	/*
-	 * Returns information about matches encountered based on the criteria
-	 * provided.
-	 */
-	public static boolean hasMatch(String fullFilePath, PatternMatcher matcher, SearchPattern pattern)
-	{
-		XMLQuickScanContentHandler handler = new XMLQuickScanContentHandler(matcher, pattern);
-		parseFile(fullFilePath, handler);
-		return handler.hasMatch();
-	}
-	
-	public static boolean populateSearchDocument(SearchDocument document, PatternMatcher matcher, SearchPattern pattern)
-	{
-		XMLQuickScanContentHandler handler = new XMLQuickScanContentHandler(document, matcher, pattern);
-		parseFile(document.getPath(), handler);
-		return handler.hasMatch();
-	}
-
-	private static void parseFile(String fullFilePath,
-			XMLQuickScanContentHandler handler)
-	{
-		FileInputStream inputStream = null;
-		try
-		{
-			inputStream = new FileInputStream(new File(fullFilePath));
-			SAXParser parser = SAXParserFactory.newInstance().newSAXParser();
-			
-			XMLReader reader = parser.getXMLReader();
-			reader.setFeature("http://xml.org/sax/features/namespaces", true);
-			reader.setContentHandler(handler);
-			reader.parse(new InputSource(inputStream));
-		} catch (Exception e)
-		{
-			// skip the file
-		} 
-		finally{
-			if(inputStream != null){
-				try {
-					inputStream.close();
-				} catch (IOException e) {
-					// can not do much 
-				}
-			}
-			
-		}
-	}
-}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/quickscan/XMLQuickScanContentHandler.java b/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/quickscan/XMLQuickScanContentHandler.java
deleted file mode 100644
index c653eee..0000000
--- a/bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/quickscan/XMLQuickScanContentHandler.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*******************************************************************************
- * 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.xml.core.internal.search.quickscan;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.wst.common.core.search.document.ComponentDeclarationEntry;
-import org.eclipse.wst.common.core.search.document.ComponentReferenceEntry;
-import org.eclipse.wst.common.core.search.document.FileReferenceEntry;
-import org.eclipse.wst.common.core.search.document.SearchDocument;
-import org.eclipse.wst.common.core.search.pattern.QualifiedName;
-import org.eclipse.wst.common.core.search.pattern.SearchPattern;
-import org.eclipse.wst.xml.core.internal.search.XMLComponentDeclarationPattern;
-import org.eclipse.wst.xml.core.internal.search.XMLComponentReferencePattern;
-import org.eclipse.wst.xml.core.internal.search.impl.IXMLSearchConstants;
-import org.eclipse.wst.xml.core.internal.search.matching.PatternMatcher;
-import org.eclipse.wst.xml.core.internal.search.matching.SAXSearchElement;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * This class is a SAX content handler, it should be recycled before scanning a file for the new SearchPattern.
- *
- */
-public class XMLQuickScanContentHandler extends DefaultHandler
-{
-	private Map namespaceMap = new HashMap(); // Map of string prefix keys and namespace
-	private String targetNamespace = "";
-	
-	private SearchPattern pattern;
-	private SearchDocument document;  // we'll add useful entries in the search document as we parsing
-	private SAXSearchElement searchElement = new SAXSearchElement();
-
-	private boolean hasMatch = false;
-	private  StringBuffer currentPath = new StringBuffer();
-	private PatternMatcher matcher;
-	
-	public static final String XMLSCHEMA_NAMESPACE = "http://www.w3.org/2001/XMLSchema";
-
-	
-	public XMLQuickScanContentHandler(PatternMatcher matcher, SearchPattern pattern) {
-		super();
-		this.pattern = pattern;
-		this.matcher = matcher;
-	}
-	
-	public XMLQuickScanContentHandler(SearchDocument document, PatternMatcher matcher, SearchPattern pattern) {
-		super();
-		this.pattern = pattern;
-		this.matcher = matcher;
-		this.document = document;
-	}
-	
-	public XMLQuickScanContentHandler() {
-		super();
-	}
-
-	public void startElement(String uri, String localName, String qName,
-			Attributes attributes) throws SAXException
-	{
-	
-		currentPath.append("/" + localName);
-
-		// Search for targetNamespace if we haven't encountered it yet.
-		if (targetNamespace.equals(""))
-		{
-			int nAttributes = attributes.getLength();
-			for (int i = 0; i < nAttributes; i++)
-			{
-				if ("targetNamespace".equals(attributes.getQName(i)))
-				{
-					targetNamespace = attributes.getValue(i);
-					break;
-				}
-			}
-		}
-		
-		// collect link info
-		if("import".equals(localName) && XMLSCHEMA_NAMESPACE.equals(uri)){
-			FileReferenceEntry documentEntry = new FileReferenceEntry();
-			documentEntry.setCategory(IXMLSearchConstants.REF);
-			documentEntry.setKey("import");
-			String namespace = attributes.getValue("namespace");
-			String location = attributes.getValue("schemaLocation");
-			documentEntry.setPublicIdentifier(namespace);
-			documentEntry.setRelativeFilePath(location);            
-			document.putEntry(documentEntry);
-		}
-		if(("redefine".equals(localName)|| "include".equals(localName)) &&
-				XMLSCHEMA_NAMESPACE.equals(uri)){
-			FileReferenceEntry documentEntry = new FileReferenceEntry();
-			documentEntry.setCategory(IXMLSearchConstants.REF);
-			documentEntry.setKey("include");
-			String location = attributes.getValue("schemaLocation");
-			documentEntry.setPublicIdentifier(uri);
-			documentEntry.setRelativeFilePath(location);
-			document.putEntry(documentEntry);
-		}
-		
-		
-        // issue (cs) you may want to try perf measurements to compate reusing the same
-        // instance of a SAXSearchElement instead of newing one each time 
-		//XMLSearchPattern.SAXSearchElement searchElement = new XMLSearchPattern.SAXSearchElement();
-		searchElement.setElementName(localName);
-		searchElement.setElementNamespace(uri);
-		searchElement.setAttributes(attributes);
-		searchElement.setNamespaceMap(namespaceMap);
-		searchElement.setTargetNamespace(targetNamespace);
-	
-
-		if(matcher != null){
-			if(matcher.matches(pattern, searchElement)){
-				hasMatch = true;
-				if(pattern instanceof XMLComponentReferencePattern){
-					ComponentReferenceEntry documentEntry = new ComponentReferenceEntry();
-					documentEntry.setCategory(IXMLSearchConstants.COMPONENT_REF);
-					QualifiedName name = new QualifiedName(uri, localName);
-					documentEntry.setKey(name.toString());
-					documentEntry.setName(name);
-					document.putEntry(documentEntry);
-				}
-				else if(pattern instanceof XMLComponentDeclarationPattern){
-					ComponentDeclarationEntry documentEntry = new ComponentDeclarationEntry();
-					documentEntry.setCategory(IXMLSearchConstants.COMPONENT_DECL);
-                    QualifiedName name = new QualifiedName(targetNamespace, attributes.getValue("name"));
-					QualifiedName metaName = new QualifiedName(uri, localName);                    
-					documentEntry.setKey(name.toString());
-                    documentEntry.setName(name);
-					documentEntry.setMetaName(metaName);
-					document.putEntry(documentEntry);
-				}
-			}
-		}
-		
-	}
-	
-	public void endElement(String uri, String localName, String qName)
-			throws SAXException
-	{
-		int slashIndex = currentPath.lastIndexOf("/");
-		currentPath.delete(slashIndex, currentPath.length());
-	}
-
-	/**
-	 * Callback for SAX parser
-	 * 
-	 * @see org.xml.sax.ContentHandler#startPrefixMapping(java.lang.String,
-	 *      java.lang.String)
-	 */
-	public void startPrefixMapping(String arg0, String arg1)
-			throws SAXException
-	{
-		if (arg0 != null && arg0.length() > 0)
-		{
-			this.namespaceMap.put(arg0, arg1);
-		}
-	}
-
-	public String getTargetNamespace() {
-		return targetNamespace;
-	}
-
-	public void setTargetNamespace(String targetNamespace) {
-		this.targetNamespace = targetNamespace;
-	}
-
-	public boolean hasMatch() {
-		return hasMatch;
-	}
-
-	
-}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidator.java b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidator.java
index a8bc261..103f874 100644
--- a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidator.java
+++ b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidator.java
@@ -19,11 +19,11 @@
 import java.io.Reader;
 import java.io.StringReader;
 import java.net.ConnectException;
+import java.net.URL;
 import java.net.UnknownHostException;
 import java.util.ArrayList;
 import java.util.Hashtable;
 import java.util.List;
-
 import org.apache.xerces.impl.XMLErrorReporter;
 import org.apache.xerces.parsers.StandardParserConfiguration;
 import org.apache.xerces.xni.NamespaceContext;
@@ -36,11 +36,14 @@
 import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolver;
 import org.eclipse.wst.xml.core.internal.validation.core.LazyURLInputStream;
 import org.eclipse.wst.xml.core.internal.validation.core.logging.LoggerFactory;
+import org.eclipse.wst.xml.core.internal.validation.errorcustomization.ErrorCustomizationManager;
+import org.xml.sax.Attributes;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 import org.xml.sax.SAXParseException;
 import org.xml.sax.XMLReader;
 import org.xml.sax.ext.DeclHandler;
+import org.xml.sax.helpers.DefaultHandler;
 
 /**
  * This class performs validation using a xerces sax parser.  
@@ -52,6 +55,7 @@
 {
   protected URIResolver uriResolver = null;
   //protected MyEntityResolver entityResolver = null;
+  protected ErrorCustomizationManager errorCustomizationManager;
   protected Hashtable ingoredErrorKeyTable = new Hashtable();
 
   protected static final String IGNORE_ALWAYS = "IGNORE_ALWAYS"; //$NON-NLS-1$
@@ -115,6 +119,25 @@
       reader.setFeature("http://xml.org/sax/features/namespaces", valinfo.isNamespaceEncountered());               //$NON-NLS-1$
       reader.setFeature("http://xml.org/sax/features/validation", valinfo.isGrammarEncountered());  //$NON-NLS-1$
       reader.setFeature("http://apache.org/xml/features/validation/schema", valinfo.isGrammarEncountered()); //$NON-NLS-1$
+      reader.setContentHandler(new DefaultHandler()
+      {
+        public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
+          
+          if (errorCustomizationManager == null)
+          {
+            errorCustomizationManager = new ErrorCustomizationManager();
+//            if (errorCustomizationManager.isDocumentNamespaceApplicable(uri))
+//            {
+//              errorCustomizationManager.setActive(true);
+//            }  
+          }
+          errorCustomizationManager.startElement(uri, localName);                    
+        }
+        
+        public void endElement(String uri, String localName, String qName) throws SAXException {
+          errorCustomizationManager.endElement(uri, localName);
+        }
+      });      
       
       // MH make sure validation works even when a customer entityResolver is note set (i.e. via setURIResolver())
       if (entityResolver != null)
@@ -342,6 +365,23 @@
       {                     
         String physical = uriResolver.resolvePhysicalLocation(rid.getBaseSystemId(), id, location);
         is = new XMLInputSource(rid.getPublicId(), location, location);
+        
+        // This block checks that the file exists. If it doesn't we need to throw
+        // an exception so Xerces will report an error. note: This may not be
+        // necessary with all versions of Xerces but has specifically been 
+        // experienced with the version included in IBM's 1.4.2 JDK.
+        InputStream isTemp = null;
+        try
+        {
+          isTemp = new URL(physical).openStream();
+        }
+        finally
+        {
+          if(isTemp != null)
+          {
+            isTemp.close();
+          }
+        }
         is.setByteStream(new LazyURLInputStream(physical));      
       }
     }
@@ -526,6 +566,7 @@
 		      if (reportError)
 		      {
 		        super.reportError(domain, key, arguments, severity);
+		        errorCustomizationManager.considerReportedError(valinfo, key, arguments);
 		      }
 		    }
 		};
diff --git a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/ValidationMessage.java b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/ValidationMessage.java
index 807ea9a..d364d24 100644
--- a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/ValidationMessage.java
+++ b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/ValidationMessage.java
@@ -191,5 +191,11 @@
   {
 	  return this.messageArguments;
   }
+  
+
+  public void setMessage(String message)
+  {
+    this.message = message;
+  }  
                                      
 }
diff --git a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/eclipse/ErrorCustomizationPluginRegistryReader.java b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/eclipse/ErrorCustomizationPluginRegistryReader.java
new file mode 100644
index 0000000..ab6c170
--- /dev/null
+++ b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/eclipse/ErrorCustomizationPluginRegistryReader.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 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.xml.core.internal.validation.eclipse;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.wst.xml.core.internal.validation.errorcustomization.ErrorCustomizationRegistry;
+import org.eclipse.wst.xml.core.internal.validation.errorcustomization.ErrorMessageCustomizerDelegate;
+import org.osgi.framework.Bundle;
+/**
+ * This class reads the plug-in manifests and registers each extension
+ * error customizer with the ErrorCustomizationRegistry.
+ */
+public class ErrorCustomizationPluginRegistryReader {
+	
+	  protected static final String PLUGIN_ID = "org.eclipse.wst.xml.core";
+	  protected static final String ATT_CLASS = "class";
+	  protected static final String ATT_NAMESPACE = "namespace";
+	  protected static final String EXTENSION_POINT_ID = "errorCustomizer";
+	  protected static final String tagName = EXTENSION_POINT_ID;
+
+	  /**
+	   * Read from plugin registry for the errorcustomizer extension.
+	   */
+	  public void readRegistry()
+	  {
+	    IExtensionRegistry pluginRegistry = Platform.getExtensionRegistry();
+	    IExtensionPoint point = pluginRegistry.getExtensionPoint(PLUGIN_ID, EXTENSION_POINT_ID);
+	    if (point != null)
+	    {
+	      IConfigurationElement[] elements = point.getConfigurationElements();
+	      for (int i = 0; i < elements.length; i++)
+	      {
+	        readElement(elements[i]);
+	      }
+	    }
+	  }
+
+	  /**
+	   * readElement() - parse and deal with an extension like:
+	   *
+	   * <extension point="org.eclipse.wst.xml.core.errorCustomizer"
+	   *            id="specificErrorCustomizer"
+	   *            name="Specific Error Customizer">
+	   *   <errorCustomizer
+	   *   			namespace="http://specificnamespace"
+	   *   			class="org.eclipse.wst.xml.core.MySpecificErrorCustomizer/>
+	   * </extension>
+	   */
+	  protected void readElement(IConfigurationElement element)
+	  {
+	    if (element.getName().equals(tagName))
+	    {
+	      String errorCustomizerClass = element.getAttribute(ATT_CLASS);
+	      String namespace = element.getAttribute(ATT_NAMESPACE);
+
+	      if (errorCustomizerClass != null)
+	      {
+	        try
+	        {
+	          Bundle pluginBundle = Platform.getBundle(element.getDeclaringExtension().getNamespace());
+	          ErrorMessageCustomizerDelegate delegate = new ErrorMessageCustomizerDelegate(pluginBundle, errorCustomizerClass);
+	          ErrorCustomizationRegistry.getInstance().addErrorMessageCustomizer(namespace, delegate);
+	        }
+	        catch (Exception e)
+	        {
+	        }
+	      }
+	    }
+	  }
+}
diff --git a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ElementInformation.java b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ElementInformation.java
new file mode 100644
index 0000000..eb1cca2
--- /dev/null
+++ b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ElementInformation.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 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.xml.core.internal.validation.errorcustomization;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * A simple class to store information about an XML element.
+ */
+public class ElementInformation
+{
+  protected String localName;
+  protected String namespace;
+  protected List children = new ArrayList();
+
+  /**
+   * Constructor.
+   * 
+   * @param uri
+   * 		The namespace URI of the element.
+   * @param localName
+   * 		The local name of the element.
+   */
+  public ElementInformation(String uri, String localName)
+  {
+    this.localName = localName;
+    this.namespace = uri;
+  }
+  
+  /**
+   * Get the namespace of this element.
+   * 
+   * @return
+   * 		The namespace of this element.
+   */
+  public String getNamespace()
+  {
+	return namespace;
+  }
+  
+  /**
+   * Get the local name of this element.
+   * 
+   * @return
+   * 		The local name of this element.
+   */
+  public String getLocalname()
+  {
+	return localName;
+  }
+  
+  /**
+   * Get the list of children of this element. The list contains
+   * ElementInformation objects representing the children of this element.
+   * 
+   * @return
+   * 		The list of children of this element.
+   */
+  public List getChildren()
+  {
+	return children;
+  }
+}
diff --git a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorCustomizationManager.java b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorCustomizationManager.java
new file mode 100644
index 0000000..745acc0
--- /dev/null
+++ b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorCustomizationManager.java
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * Copyright (c) 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.xml.core.internal.validation.errorcustomization;
+
+import java.util.Stack;
+
+import org.eclipse.wst.xml.core.internal.validation.core.ValidationInfo;
+import org.eclipse.wst.xml.core.internal.validation.core.ValidationMessage;
+
+/**
+ * This class tracks the context of the parsed document to help identify error
+ * conditions
+ */
+public class ErrorCustomizationManager
+{
+  protected Stack elementInformationStack = new Stack();
+  protected ErrorMessageInformation messageForConsideration;
+
+  /**
+   * This method should be called in the start element method of the XML validator's
+   * content handler.
+   * 
+   * @param uri
+   * 		The namespace of the element.
+   * @param localName
+   * 		The local name of the element.
+   */
+  public void startElement(String uri, String localName)
+  { 
+    ElementInformation elementInformation = new ElementInformation(uri, localName);
+    if (elementInformationStack.size() > 0)
+    {
+      ElementInformation parent = (ElementInformation) elementInformationStack.peek();
+      parent.children.add(elementInformation);
+    }
+    elementInformationStack.push(elementInformation);
+  }
+
+  /**
+   * This method should be called in the end element method of the XML validator's
+   * content handler.
+   * 
+   * @param uri
+   * 		The namespace of the element.
+   * @param localName
+   * 		The local name of the element.
+   */
+  public void endElement(String uri, String localName)
+  {   
+    if (elementInformationStack.size() > 0)
+    {
+      ElementInformation elementInformation = (ElementInformation)elementInformationStack.pop();
+      if (messageForConsideration != null)
+      {  
+        IErrorMessageCustomizer[] customizers = ErrorCustomizationRegistry.getInstance().getCustomizers(elementInformation.getNamespace());
+        int numCustomizers = customizers.length;
+        for(int i = 0; i < numCustomizers; i++)
+        {
+          String message = customizers[i].customizeMessage(elementInformation, messageForConsideration.key, messageForConsideration.arguments);
+          if(message != null)
+          {
+        	messageForConsideration.message.setMessage(message);
+        	break;
+          }
+        }
+      }  
+    }
+  }
+
+  /**
+   * Consider the reported error for customization.
+   * 
+   * @param valInfo
+   * 		The current ValidationInfo object containing validation specific information.
+   * @param key
+   * 		The key related to the message.
+   * @param arguments
+   * 		Any message arguments.
+   */
+  public void considerReportedError(ValidationInfo valInfo, String key, Object[] arguments)
+  {
+    messageForConsideration = null;
+    ValidationMessage[] messages = valInfo.getValidationMessages();
+    if (messages.length > 0)
+    {  
+      messageForConsideration = new ErrorMessageInformation();
+      messageForConsideration.key = key;
+      messageForConsideration.arguments = arguments;
+      messageForConsideration.message = messages[messages.length - 1]; 
+    }
+  }
+  
+  /**
+   * A simple class to hold error message information.
+   */
+  public class ErrorMessageInformation
+  {
+	public String key = null;
+	public Object[] arguments = null;
+	public ValidationMessage message = null;
+  }
+}
diff --git a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorCustomizationRegistry.java b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorCustomizationRegistry.java
new file mode 100644
index 0000000..db0d0ce
--- /dev/null
+++ b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorCustomizationRegistry.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 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.xml.core.internal.validation.errorcustomization;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * The error customization regsitry manages all registered
+ * IErrorMessageCustomizers by namespace.
+ */
+public class ErrorCustomizationRegistry 
+{
+  protected static ErrorCustomizationRegistry registry = null;
+  protected Map customizers = new HashMap();
+  
+  /**
+   * Restricted constructor in keeping with the singleton pattern.
+   */
+  protected ErrorCustomizationRegistry()
+  {
+  }
+  
+  /**
+   * Get the one and only instance of the registry.
+   * 
+   * @return
+   * 		The one and only instance of the registry.
+   */
+  public static ErrorCustomizationRegistry getInstance()
+  {
+	if(registry == null)
+	{
+	  registry = new ErrorCustomizationRegistry();
+	}
+	return registry;
+  }
+  
+  /**
+   * Add a customizer to the registry. 
+   * 
+   * @param namespace
+   * 		The namespace the customizer will act on.
+   * @param customizer
+   * 		The error customizer to register.
+   */
+  public void addErrorMessageCustomizer(String namespace, IErrorMessageCustomizer customizer)
+  {
+	// To register a customizer for the no namespace use an empty string.
+	if(namespace == null)
+	{
+	  namespace = "";
+	}
+	List customizersForNS = (List)customizers.get(namespace);
+	if(customizersForNS == null)
+	{
+	  customizersForNS = new ArrayList();
+	  customizers.put(namespace, customizersForNS);
+	}
+	if(customizer != null)
+	{
+	  customizersForNS.add(customizer);
+	}
+  }
+  
+  /**
+   * Get the error customizers for a given namespace.
+   * 
+   * @param namespace
+   * 		The namespace for which to retrieve the customizers.
+   * @return
+   * 		An array of customizers registered for this namespace.
+   */
+  public IErrorMessageCustomizer[] getCustomizers(String namespace)
+  {
+	if(namespace == null)
+	{
+	  namespace = "";
+	}
+	List customizersForNS = (List)customizers.get(namespace);
+	if(customizersForNS == null)
+	{
+	  customizersForNS = new ArrayList();
+	}
+	return (IErrorMessageCustomizer[])customizersForNS.toArray(new IErrorMessageCustomizer[customizersForNS.size()]);
+  }
+}
diff --git a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorMessageCustomizerDelegate.java b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorMessageCustomizerDelegate.java
new file mode 100644
index 0000000..444d86d
--- /dev/null
+++ b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorMessageCustomizerDelegate.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 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.xml.core.internal.validation.errorcustomization;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
+import org.osgi.framework.Bundle;
+
+/**
+ * An error message customizer delegate is used to allow for
+ * lazy loading of error customizers.
+ *
+ */
+public class ErrorMessageCustomizerDelegate implements IErrorMessageCustomizer
+{
+  protected Bundle bundle = null;
+  protected String classname = null;
+  protected IErrorMessageCustomizer customizer = null;
+  
+  public ErrorMessageCustomizerDelegate(Bundle bundle, String classname)
+  {
+	this.bundle = bundle;
+	this.classname = classname;
+  }
+
+  /* (non-Javadoc)
+   * @see org.eclipse.wst.xml.core.internal.validation.errorcustomization.IErrorMessageCustomizer#customizeMessage(org.eclipse.wst.xml.core.internal.validation.errorcustomization.ElementInformation, java.lang.String, java.lang.Object[])
+   */
+  public String customizeMessage(ElementInformation elementInfo, String errorKey, Object[] arguments) 
+  {
+	if(customizer == null)
+	{
+	  loadCustomizer();
+	}
+	if(customizer == null)
+	{
+	  return null;
+	}
+	return customizer.customizeMessage(elementInfo, errorKey, arguments);
+  }
+  
+  /**
+   * Load the customizer class.
+   */
+  protected void loadCustomizer()
+  {
+	try
+	{
+	  Class customizerClass = bundle.loadClass(classname);
+	  customizer = (IErrorMessageCustomizer)customizerClass.newInstance();
+	}
+	catch(Exception e)
+	{
+	  XMLCorePlugin.getDefault().getLog().log(
+			  new Status(IStatus.WARNING, 
+					     XMLCorePlugin.getDefault().getBundle().getSymbolicName(), 
+					     IStatus.OK, 
+					     "The XML validator error customizer was unable to load class " + classname, e));
+	}
+  }
+  
+  
+}
diff --git a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/IErrorMessageCustomizer.java b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/IErrorMessageCustomizer.java
new file mode 100644
index 0000000..ac6d1e0
--- /dev/null
+++ b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/IErrorMessageCustomizer.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 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.xml.core.internal.validation.errorcustomization;
+
+/**
+ * An error message customizer will be called by the XML validator to customize
+ * XML validation errors for a given namespace. The customizer can be used to 
+ * create clearer errors for specific application domains.
+ */
+public interface IErrorMessageCustomizer 
+{
+  /**
+   * Return a customized error message for the given element. Null should be returned
+   * if the message should not be customized.
+   * 
+   * @param elementInformation
+   * 		The information about the element for which to customize the error.
+   * @param errorKey
+   * 		The key for the error for which to replace the message.
+   * @param arguments
+   * 		Arguments related the the error message.
+   * @return
+   * 		A customized error message or null if this customizer will not customize the message.
+   */
+  public String customizeMessage(ElementInformation elementInfo, String errorKey, Object[] arguments);
+}
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/preferences/XMLCorePreferenceInitializer.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/preferences/XMLCorePreferenceInitializer.java
index 5b9634c..7211076 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/preferences/XMLCorePreferenceInitializer.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/preferences/XMLCorePreferenceInitializer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 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
@@ -28,14 +28,14 @@
 	 */
 	public void initializeDefaultPreferences() {
 		IEclipsePreferences node = new DefaultScope().getNode(XMLCorePlugin.getDefault().getBundle().getSymbolicName());
-
+		
 		// formatting preferences
 		node.putInt(XMLCorePreferenceNames.LINE_WIDTH, 72);
 		node.putBoolean(XMLCorePreferenceNames.CLEAR_ALL_BLANK_LINES, false);
 		node.put(XMLCorePreferenceNames.INDENTATION_CHAR, XMLCorePreferenceNames.TAB);
 		node.putInt(XMLCorePreferenceNames.INDENTATION_SIZE, 1);
 		node.putBoolean(XMLCorePreferenceNames.SPLIT_MULTI_ATTRS, false);
-
+		
 		// cleanup preferences
 		node.putBoolean(XMLCorePreferenceNames.COMPRESS_EMPTY_ELEMENT_TAGS, true);
 		node.putBoolean(XMLCorePreferenceNames.INSERT_REQUIRED_ATTRS, true);
@@ -47,9 +47,5 @@
 		node.put(CommonEncodingPreferenceNames.INPUT_CODESET, ""); //$NON-NLS-1$
 		node.put(CommonEncodingPreferenceNames.OUTPUT_CODESET, "UTF-8");//$NON-NLS-1$
 		node.put(CommonEncodingPreferenceNames.END_OF_LINE_CODE, ""); //$NON-NLS-1$
-
-		// this could be made smarter by actually looking up the content
-		// type's valid extensions
-		node.put(XMLCorePreferenceNames.DEFAULT_EXTENSION, "xml"); //$NON-NLS-1$
 	}
 }
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/preferences/XMLCorePreferenceNames.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/preferences/XMLCorePreferenceNames.java
index 0106616..74d0f7f 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/preferences/XMLCorePreferenceNames.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/preferences/XMLCorePreferenceNames.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 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
@@ -20,17 +20,7 @@
 	private XMLCorePreferenceNames() {
 		// empty private constructor so users cannot instantiate class
 	}
-
-	/**
-	 * The default extension to use when none is specified in the New File
-	 * Wizard.
-	 * <p>
-	 * Value is of type <code>String</code>.
-	 * </p>
-	 */
-	public static final String DEFAULT_EXTENSION = "defaultExtension"; //$NON-NLS-1$
-
-
+	
 	/**
 	 * The maximum width of a line before a line split is needed.
 	 * <p>
@@ -38,7 +28,7 @@
 	 * </p>
 	 */
 	public static final String LINE_WIDTH = "lineWidth";//$NON-NLS-1$
-
+	
 	/**
 	 * Indicates if all blanks lines should be cleared during formatting.
 	 * Blank lines will be kept when false.
@@ -91,7 +81,7 @@
 	 * </p>
 	 */
 	public static final String SPLIT_MULTI_ATTRS = "splitMultiAttrs";//$NON-NLS-1$
-
+	
 	/**
 	 * Indicates whether or not cleanup processor should format source.
 	 * <p>
@@ -146,8 +136,8 @@
 	 * delimiters.
 	 * <p>
 	 * Value is of type <code>String</code>.<br />
-	 * Possible values: {CR, CRLF, LF, NO_TRANSLATION}
-	 * </p>
+	 * Possible values: {CR, CRLF, LF, NO_TRANSLATION} 
+	 * </p> 
 	 * 
 	 */
 	public static final String CLEANUP_EOL_CODE = "cleanupEOLCode";//$NON-NLS-1$
diff --git a/bundles/org.eclipse.wst.xml.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.xml.ui/META-INF/MANIFEST.MF
index d70052d..8c3d7af 100644
--- a/bundles/org.eclipse.wst.xml.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.xml.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.wst.xml.ui; singleton:=true
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 1.0.2.qualifier
 Bundle-Activator: org.eclipse.wst.xml.ui.internal.XMLUIPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/XMLValidator.java b/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/XMLValidator.java
index 0f67568..1f3cb21 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/XMLValidator.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/XMLValidator.java
@@ -15,6 +15,7 @@
 
 import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolverPlugin;
 import org.eclipse.wst.xml.core.internal.validation.XMLValidationReport;
+import org.eclipse.wst.xml.core.internal.validation.eclipse.ErrorCustomizationPluginRegistryReader;
 
 /**
  * An XML validator specific to Eclipse. This validator will wrap the internal
@@ -50,6 +51,7 @@
   {
     validator = new org.eclipse.wst.xml.core.internal.validation.XMLValidator();
     validator.setURIResolver(URIResolverPlugin.createResolver());
+    new ErrorCustomizationPluginRegistryReader().readRegistry();
   }
   /**
    * Validate the file at the given URI.
diff --git a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewModelWizard.java b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewModelWizard.java
index c2163a1..f0ae26b 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewModelWizard.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewModelWizard.java
@@ -277,8 +277,9 @@
 			setErrorMessage(XMLWizardsMessages._ERROR_BAD_FILENAME_EXTENSION);
 			return false;
 		}
-		// no fileExtension, let's check for this file with default file extension
-		fullFileName += defaultFileExtension;
+		// no fileExtension, let's check for this file with an .xml
+		// extension
+		fullFileName += ".xml"; //$NON-NLS-1$
 		if ((getContainerFullPath() != null) && (getContainerFullPath().isEmpty() == false) && (getFileName().compareTo("") != 0)) //$NON-NLS-1$
 		{
 			Path fullPath = new Path(getContainerFullPath().toString() + '/' + fullFileName);
diff --git a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLWizard.java b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLWizard.java
index 1bd994c..f645262 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLWizard.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLWizard.java
@@ -18,7 +18,6 @@
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Preferences;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.util.Assert;
@@ -50,14 +49,12 @@
 import org.eclipse.ui.part.PageBook;
 import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard;
 import org.eclipse.wst.common.uriresolver.internal.util.URIHelper;
-import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
 import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry;
 import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
 import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
 import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
 import org.eclipse.wst.xml.core.internal.contentmodel.util.DOMContentBuilder;
 import org.eclipse.wst.xml.core.internal.contentmodel.util.NamespaceInfo;
-import org.eclipse.wst.xml.core.internal.preferences.XMLCorePreferenceNames;
 import org.eclipse.wst.xml.ui.internal.Logger;
 import org.eclipse.wst.xml.ui.internal.dialogs.NamespaceInfoErrorHelper;
 import org.eclipse.wst.xml.ui.internal.dialogs.SelectFileOrXMLCatalogIdPanel;
@@ -152,9 +149,7 @@
 		newFilePage.setTitle(XMLWizardsMessages._UI_WIZARD_CREATE_XML_FILE_HEADING);
 		newFilePage.setDescription(XMLWizardsMessages._UI_WIZARD_CREATE_XML_FILE_EXPL);
 		newFilePage.defaultName = (grammarURI != null) ? URIHelper.removeFileExtension(URIHelper.getLastSegment(grammarURI)) : "NewFile"; //$NON-NLS-1$
-		Preferences preference = XMLCorePlugin.getDefault().getPluginPreferences();
-		String ext = preference.getString(XMLCorePreferenceNames.DEFAULT_EXTENSION);
-		newFilePage.defaultFileExtension = "."+ext; //$NON-NLS-1$
+		newFilePage.defaultFileExtension = ".xml"; //$NON-NLS-1$
 		newFilePage.filterExtensions = filePageFilterExtensions;
 		addPage(newFilePage);
 
@@ -257,7 +252,7 @@
 			if (result) {
 				fileName = newFilePage.getFileName();
 				if ((new Path(fileName)).getFileExtension() == null) {
-					newFilePage.setFileName(fileName.concat(newFilePage.defaultFileExtension));
+					newFilePage.setFileName(fileName.concat(".xml")); //$NON-NLS-1$
 				}
 
 				IFile newFile = newFilePage.createNewFile();
diff --git a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/wizardResource.properties b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/wizardResource.properties
index 42393a0..b4e5252 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/wizardResource.properties
+++ b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/wizardResource.properties
@@ -57,7 +57,7 @@
 _UI_INVALID_GRAMMAR_ERROR             = Invalid Grammar
 
 !NewModelWizard
-_ERROR_BAD_FILENAME_EXTENSION         = The file name must end in one of the following extensions {0}.
+_ERROR_BAD_FILENAME_EXTENSION         = The specified file name must have a recognized extension (e.g. '.xml').
 _ERROR_FILE_ALREADY_EXISTS            = The same file already exists.
 _ERROR_ROOT_ELEMENT_MUST_BE_SPECIFIED = A root element must be specified.
 _UI_LABEL_ERROR_SCHEMA_INVALID_INFO   = The schema file contains errors. Open it in the XML schema editor for details.
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIMessages.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIMessages.java
index 274bed4..0c470f9 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIMessages.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIMessages.java
@@ -213,8 +213,6 @@
 	public static String EOL_Unix;
 	public static String EOL_Mac;
 	public static String EOL_NoTranslation;
-	public static String XMLFilesPreferencePage_ExtensionLabel;
-	public static String XMLFilesPreferencePage_ExtensionError;
 	public static String Content_assist_UI_;
 	public static String Automatically_make_suggest_UI_;
 	public static String Prompt_when_these_characte_UI_;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIPluginResources.properties b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIPluginResources.properties
index 9eb2de8..fed4031 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIPluginResources.properties
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIPluginResources.properties
@@ -240,8 +240,6 @@
 EOL_Unix=UNIX
 EOL_Mac=Mac
 EOL_NoTranslation=No translation
-XMLFilesPreferencePage_ExtensionLabel=Add this suffix (if not specified):
-XMLFilesPreferencePage_ExtensionError=Suffix must be one of the following {0}.
 ## XML Source preference page
 Content_assist_UI_=Content assist
 Automatically_make_suggest_UI_=Automatically ma&ke suggestions
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AbstractContentAssistProcessor.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AbstractContentAssistProcessor.java
index 7333cbb..033c0d1 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AbstractContentAssistProcessor.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AbstractContentAssistProcessor.java
@@ -149,7 +149,7 @@
 			if (attributes != null) {
 				for (int i = 0; i < attributes.getLength(); i++) {
 					CMAttributeDeclaration attrDecl = (CMAttributeDeclaration) attributes.item(i);
-					
+					// CMVC 246618
 					int isRequired = 0;
 					if (attrDecl.getUsage() == CMAttributeDeclaration.REQUIRED) {
 						isRequired = XMLRelevanceConstants.R_REQUIRED;
@@ -180,7 +180,8 @@
 						if (attrAtLocationHasValue) {
 							// only propose the name
 							proposedText = getRequiredName(node, attrDecl);
-							proposal = new CustomCompletionProposal(proposedText, contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), proposedText.length(), attrImage, proposedText, null, proposedInfo, XMLRelevanceConstants.R_XML_ATTRIBUTE_NAME + isRequired, true);		
+							proposal = new CustomCompletionProposal(proposedText, contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), proposedText.length(), attrImage, proposedText, null, proposedInfo, XMLRelevanceConstants.R_XML_ATTRIBUTE_NAME + isRequired, true); // CMVC
+							// 269884
 						}
 						// no attribute exists or is elsewhere, generate
 						// minimally
@@ -211,7 +212,6 @@
 	}
 
 	protected void addAttributeValueProposals(ContentAssistRequest contentAssistRequest) {
-		
 		IDOMNode node = (IDOMNode) contentAssistRequest.getNode();
 
 		// Find the attribute region and name for which this position should
@@ -288,14 +288,8 @@
 							String possibleValue = (String) j.next();
 							currentValid = currentValid || possibleValue.equals(currentValue);
 							if (matchString.length() == 0 || possibleValue.startsWith(matchString)) {
-								
-								String rString = "\"" + possibleValue + "\""; //$NON-NLS-2$//$NON-NLS-1$
-								int rOffset = contentAssistRequest.getReplacementBeginPosition();
-								int rLength = contentAssistRequest.getReplacementLength();
-								int cursorAfter = possibleValue.length() + 1;
-								String displayString = "\"" + possibleValue + "\""; //$NON-NLS-2$//$NON-NLS-1$
-								
-								CustomCompletionProposal proposal = new CustomCompletionProposal(rString, rOffset, rLength, cursorAfter, image, displayString, null, proposedInfo, XMLRelevanceConstants.R_XML_ATTRIBUTE_VALUE);
+								CustomCompletionProposal proposal = new CustomCompletionProposal("\"" + possibleValue + "\"", //$NON-NLS-2$//$NON-NLS-1$
+											contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), possibleValue.length() + 1, image, possibleValue, null, proposedInfo, XMLRelevanceConstants.R_XML_ATTRIBUTE_VALUE);
 								contentAssistRequest.addProposal(proposal);
 							}
 						}
@@ -305,14 +299,12 @@
 					// FIXED values
 					String value = attrDecl.getAttrType().getImpliedValue();
 					if (value != null && value.length() > 0) {
-						String rValue = "\"" + value + "\"";//$NON-NLS-2$//$NON-NLS-1$
-						CustomCompletionProposal proposal = new CustomCompletionProposal(rValue, 
-									contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), rValue.length() + 1, image, rValue, null, proposedInfo, XMLRelevanceConstants.R_XML_ATTRIBUTE_VALUE);
+						CustomCompletionProposal proposal = new CustomCompletionProposal("\"" + value + "\"", //$NON-NLS-2$//$NON-NLS-1$
+									contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), value.length() + 1, image, value, null, proposedInfo, XMLRelevanceConstants.R_XML_ATTRIBUTE_VALUE);
 						contentAssistRequest.addProposal(proposal);
 						if (currentValue.length() > 0 && !value.equals(currentValue)) {
-							rValue = "\"" + currentValue + "\""; //$NON-NLS-2$//$NON-NLS-1$
-							proposal = new CustomCompletionProposal(rValue,
-										contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), rValue.length() + 1, image, rValue, null, proposedInfo, XMLRelevanceConstants.R_XML_ATTRIBUTE_VALUE);
+							proposal = new CustomCompletionProposal("\"" + currentValue + "\"", //$NON-NLS-2$//$NON-NLS-1$
+										contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), currentValue.length() + 1, image, currentValue, null, proposedInfo, XMLRelevanceConstants.R_XML_ATTRIBUTE_VALUE);
 							contentAssistRequest.addProposal(proposal);
 						}
 					}
@@ -323,9 +315,8 @@
 				proposedInfo = getAdditionalInfo(null, elementDecl);
 				CustomCompletionProposal proposal = null;
 				if (currentValue != null && currentValue.length() > 0) {
-					String rValue = "\"" + currentValue + "\""; //$NON-NLS-2$//$NON-NLS-1$
-					proposal = new CustomCompletionProposal(rValue,
-								contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), 1, image, rValue, //$NON-NLS-2$//$NON-NLS-1$
+					proposal = new CustomCompletionProposal("\"" + currentValue + "\"", //$NON-NLS-2$//$NON-NLS-1$
+								contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), 1, image, "\"" + currentValue + "\"", //$NON-NLS-2$//$NON-NLS-1$
 								null, proposedInfo, XMLRelevanceConstants.R_XML_ATTRIBUTE_VALUE);
 					contentAssistRequest.addProposal(proposal);
 				}
@@ -486,6 +477,7 @@
 		boolean addProposal = false;
 
 		if (node.getNodeType() == Node.ELEMENT_NODE) {
+			// fix for CMVC 261790
 			// ////////////////////////////////////////////////////////////////////////////////////
 			IStructuredDocument sDoc = (IStructuredDocument) fTextViewer.getDocument();
 			IStructuredDocumentRegion xmlEndTagOpen = sDoc.getRegionAtCharacterOffset(contentAssistRequest.getReplacementBeginPosition());
@@ -544,8 +536,9 @@
 				addProposal = true;
 			}
 		}
+		// fix for CMVC 261790
 		// ////////////////////////////////////////////////////////////////////////////////////
-		// sometimes the node is not null, but
+		// fix for CMVC 263163, sometimes the node is not null, but
 		// getNodeValue() is null, put in a null check
 		else if (node.getNodeValue() != null && node.getNodeValue().indexOf("</") != -1) { //$NON-NLS-1$
 			// the case where "</" is started, but the nodes comes in as a
@@ -560,6 +553,7 @@
 				addProposal = true;
 			}
 		}
+		// end fix for CMVC 261790
 		// ////////////////////////////////////////////////////////////////////////////////////
 		else if (node.getNodeType() == Node.DOCUMENT_NODE) {
 			setErrorMessage(UNKNOWN_CONTEXT);
@@ -628,6 +622,8 @@
 
 		// make sure xmlpi is root element
 		// don't want doctype proposal if XMLPI isn't first element...
+		// CMVC 242943
+		// CMVC 245532
 		Node first = owningDocument.getFirstChild();
 		boolean xmlpiIsFirstElement = (first != null && first.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE);
 		boolean insertDoctype = xmlpiIsFirstElement;
@@ -642,10 +638,10 @@
 				}
 				// skip white space and text
 				while ((child = child.getNextSibling()) != null && (child.getNodeType() == Node.TEXT_NODE)) {
-					// just skipping
 				}
 				// check if theres a node inbetween XMLPI and cursor position
 				if (child != null && child instanceof IDOMNode) {
+					// CMVC 257486
 					if (contentAssistRequest.getReplacementBeginPosition() >= ((IDOMNode) child).getEndOffset() || !xmlpiIsFirstElement) {
 						insertDoctype = false;
 					}
@@ -710,6 +706,7 @@
 					// prompt with the closer for the start tag and an end tag
 					// if one is not present
 					if (node.getEndStructuredDocumentRegion() == null) {
+						// FIX FOR CMVC 247482
 						// make sure tag name is actually what it thinks it
 						// is...(eg. <%@ vs. <jsp:directive)
 						IStructuredDocumentRegion sdr = contentAssistRequest.getDocumentRegion();
@@ -768,6 +765,7 @@
 		Node parent = contentAssistRequest.getParent();
 		String error = null;
 
+		// CMVC #242943 shouldn't have proposals before XMLPI
 		// (nsd) This is only valid at the document element level
 		// only valid if it's XML (check added 2/17/2004)
 		if (parent != null && parent.getNodeType() == Node.DOCUMENT_NODE && ((IDOMDocument) parent).isXMLType() && !isCursorAfterXMLPI(contentAssistRequest)) {
@@ -776,7 +774,8 @@
 		// only want proposals if cursor is after doctype...
 		if (!isCursorAfterDoctype(contentAssistRequest))
 			return;
-		
+
+		// CMVC 248081
 		// fix for meta-info comment nodes.. they currently "hide" other
 		// proposals because the don't
 		// have a content model (so can't propose any children..)
@@ -861,15 +860,13 @@
                             }
                               
 						}
-
-						//int markupAdjustment = getContentGenerator().getMinimalStartTagLength(parent, elementDecl);
+						// Account for the &lt; and &gt;. If attributes were
+						// added, the cursor will be placed
+						// at the offset before of the first character of the
+						// first attribute name.
+						int markupAdjustment = getContentGenerator().getMinimalStartTagLength(parent, elementDecl);
 						if (beginsWith(tagname, matchString)) {
 							String proposedText = getRequiredText(parent, elementDecl);
-							
-							// https://bugs.eclipse.org/bugs/show_bug.cgi?id=89811
-							// place cursor in first empty quotes
-							int markupAdjustment = getCursorPositionForProposedText(proposedText);
-							
 							String proposedInfo = getAdditionalInfo(parentDecl, elementDecl);
                             int relevance = isStrictCMNodeSuggestion ? XMLRelevanceConstants.R_STRICTLY_VALID_TAG_INSERTION : XMLRelevanceConstants.R_TAG_INSERTION; 
 							CustomCompletionProposal proposal = new CustomCompletionProposal(proposedText, contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), markupAdjustment, image, tagname, null, proposedInfo, relevance);
@@ -973,16 +970,8 @@
 								cursorAdjustment = proposedText.length();
 							}
 							else {
-								// https://bugs.eclipse.org/bugs/show_bug.cgi?id=89811
-								StringBuffer sb = new StringBuffer();
-								getContentGenerator().generateTag(parent, ed, sb);
-								// since it's a name proposal, assume '<' is already there
-								// only return the rest of the tag
-								proposedText = sb.toString().substring(1);
-								cursorAdjustment = getCursorPositionForProposedText(proposedText);
-								
-								//cursorAdjustment = proposedText.length() + 1;
-								//proposedText += "></" + getRequiredName(parent, elementDecl) + ">"; //$NON-NLS-2$//$NON-NLS-1$
+								cursorAdjustment = proposedText.length() + 1;
+								proposedText += "></" + getRequiredName(parent, elementDecl) + ">"; //$NON-NLS-2$//$NON-NLS-1$
 							}
 						}
 					}
@@ -1015,53 +1004,36 @@
 					continue;
 				String proposedText = null;
 				int cursorAdjustment = 0;
-				if(ed instanceof CMElementDeclaration) {
-					// proposedText = getRequiredName(parent, ed);
-					StringBuffer sb = new StringBuffer();
-					getContentGenerator().generateTag(parent, (CMElementDeclaration)ed, sb);
-					// tag starts w/ '<', but we want to compare to name
-					proposedText = sb.toString().substring(1);
-					
-					if (!beginsWith(proposedText, matchString))
-						continue;
-					
-					cursorAdjustment = getCursorPositionForProposedText(proposedText);
-				
+				proposedText = getRequiredName(parent, ed);
+				if (!beginsWith(proposedText, matchString))
+					continue;
+				if ((node != null && node.getAttributes() != null && node.getAttributes().getLength() > 0) || ((node.getNodeType() != Node.TEXT_NODE) && node.getFirstStructuredDocumentRegion().isEnded())) {
+					cursorAdjustment = proposedText.length();
+				}
+				else {
+					cursorAdjustment = proposedText.length();
 					if (ed instanceof CMElementDeclaration) {
 						CMElementDeclaration elementDecl = (CMElementDeclaration) ed;
 						if (elementDecl.getContentType() == CMElementDeclaration.EMPTY) {
 							proposedText += getContentGenerator().getStartTagClose(parent, elementDecl);
 							cursorAdjustment = proposedText.length();
 						}
+						else {
+							cursorAdjustment = proposedText.length() + 1;
+							proposedText += "></" + getRequiredName(parent, elementDecl) + ">"; //$NON-NLS-2$//$NON-NLS-1$
+						}
 					}
-				
-					String proposedInfo = getAdditionalInfo(null, ed);
-					Image image = CMImageUtil.getImage(ed);
-					if (image == null) {
-						image = XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TAG_GENERIC);
-					}
-					CustomCompletionProposal proposal = new CustomCompletionProposal(proposedText, contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), cursorAdjustment, image, getRequiredName(parent, ed), null, proposedInfo, XMLRelevanceConstants.R_TAG_NAME);
-					contentAssistRequest.addProposal(proposal);
 				}
+				String proposedInfo = getAdditionalInfo(null, ed);
+				Image image = CMImageUtil.getImage(ed);
+				if (image == null) {
+					image = XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TAG_GENERIC);
+				}
+				CustomCompletionProposal proposal = new CustomCompletionProposal(proposedText, contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), cursorAdjustment, image, getRequiredName(parent, ed), null, proposedInfo, XMLRelevanceConstants.R_TAG_NAME);
+				contentAssistRequest.addProposal(proposal);
 			}
 		}
 	}
-	/**
-	 * this is the position the cursor should be in after the proposal is applied
-	 * @param proposedText
-	 * @return  the position the cursor should be in after the proposal is applied
-	 */
-	private int getCursorPositionForProposedText(String proposedText) {
-		int cursorAdjustment;
-		cursorAdjustment = proposedText.indexOf("\"\"") + 1; //$NON-NLS-1$
-		// otherwise, after the first tag
-		if(cursorAdjustment==0)
-			cursorAdjustment = proposedText.indexOf('>') + 1;
-		if(cursorAdjustment==0)
-			cursorAdjustment = proposedText.length() + 1;
-		
-		return cursorAdjustment;
-	}
 
 	protected void addXMLProposal(ContentAssistRequest contentAssistRequest) {
 		String proposedText = "<?xml version=\"1.0\" encoding=\"" + ContentTypeEncodingPreferences.getUserPreferredCharsetName(ContentTypeIdForXML.ContentTypeID_XML) + "\"?>"; //$NON-NLS-2$//$NON-NLS-1$
@@ -1117,7 +1089,7 @@
 	protected boolean beginsWith(String aString, String prefix) {
 		if (aString == null || prefix == null)
 			return true;
-		// (pa) matching independent of case to be consistant with Java
+		// (pa) 221190 matching independent of case to be consistant with Java
 		// editor CA
 		return aString.toLowerCase().startsWith(prefix.toLowerCase());
 	}
@@ -1548,8 +1520,7 @@
 			}
 			else {
 				if (sdRegion.getRegions().get(0).getType() != DOMRegionContext.XML_END_TAG_OPEN) {
-					int replaceLength = documentPosition - sdRegion.getStartOffset(completionRegion);
-					contentAssistRequest = newContentAssistRequest(node, node.getParentNode(), sdRegion, completionRegion, sdRegion.getStartOffset(completionRegion), replaceLength, matchString);
+					contentAssistRequest = newContentAssistRequest(node, node.getParentNode(), sdRegion, completionRegion, sdRegion.getStartOffset(completionRegion), completionRegion.getTextLength(), matchString);
 					addTagNameProposals(contentAssistRequest, getElementPositionForModelQuery(nodeAtOffset));
 				}
 				else {
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/ReplaceNameTemplateContext.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/ReplaceNameTemplateContext.java
new file mode 100644
index 0000000..9eb98c4
--- /dev/null
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/ReplaceNameTemplateContext.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 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.xml.ui.internal.contentassist;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.templates.DocumentTemplateContext;
+import org.eclipse.jface.text.templates.Template;
+import org.eclipse.jface.text.templates.TemplateBuffer;
+import org.eclipse.jface.text.templates.TemplateContextType;
+import org.eclipse.jface.text.templates.TemplateException;
+
+/**
+ * Just like DocumentTemplateContext except if an insert offset is passed in,
+ * during evaluation, the "prefix" before the template will be checked to see
+ * if it matches the template name. If so, overwrite the template name.
+ * Otherwise, just insert the template at the insert offset location (by not
+ * overwriting the prefix text)
+ */
+public class ReplaceNameTemplateContext extends DocumentTemplateContext {
+	private int fInsertOffset = -1;
+
+	/**
+	 * Creates a document template context.
+	 * 
+	 * @param type
+	 *            the context type
+	 * @param document
+	 *            the document this context applies to
+	 * @param offset
+	 *            the offset of the document region
+	 * @param length
+	 *            the length of the document region
+	 */
+	public ReplaceNameTemplateContext(TemplateContextType type, IDocument document, int offset, int length) {
+		this(type, document, new Position(offset, length));
+	}
+
+	/**
+	 * Creates a document template context. The supplied <code>Position</code>
+	 * will be queried to compute the <code>getStart</code> and
+	 * <code>getEnd</code> methods, which will therefore answer updated
+	 * position data if it is registered with the document.
+	 * 
+	 * @param type
+	 *            the context type
+	 * @param document
+	 *            the document this context applies to
+	 * @param position
+	 *            the position describing the area of the document which forms
+	 *            the template context
+	 * @since 3.1
+	 */
+	public ReplaceNameTemplateContext(TemplateContextType type, IDocument document, Position position) {
+		super(type, document, position);
+	}
+
+	/**
+	 * Creates a document template context.
+	 * 
+	 * @param type
+	 *            the context type
+	 * @param document
+	 *            the document this context applies to
+	 * @param offset
+	 *            the offset of the document region
+	 * @param length
+	 *            the length of the document region
+	 * @param insertOffset
+	 *            the offset of the document region where insert was
+	 *            originally requested
+	 */
+	public ReplaceNameTemplateContext(TemplateContextType type, IDocument document, int offset, int length, int insertOffset) {
+		this(type, document, new Position(offset, length));
+		fInsertOffset = insertOffset;
+	}
+
+	/*
+	 * @see org.eclipse.jface.text.templates.TemplateContext#evaluate(org.eclipse.jface.text.templates.Template)
+	 */
+	public TemplateBuffer evaluate(Template template) throws BadLocationException, TemplateException {
+		TemplateBuffer buffer = super.evaluate(template);
+		if (buffer != null) {
+			if (fInsertOffset > -1 && fInsertOffset > getStart()) {
+				String prefix = getDocument().get(getStart(), fInsertOffset - getStart());
+				if (!template.getName().startsWith(prefix)) {
+					// generate a new buffer that actually contains the
+					// text that was going to be overwritten
+					buffer = new TemplateBuffer(prefix + buffer.getString(), buffer.getVariables());
+				}
+			}
+		}
+		return buffer;
+	}
+}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLContentAssistProcessor.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLContentAssistProcessor.java
index 01068ba..32b40df 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLContentAssistProcessor.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLContentAssistProcessor.java
@@ -65,9 +65,20 @@
 	 * @param context
 	 */
 	private void addTemplates(ContentAssistRequest contentAssistRequest, String context) {
+		addTemplates(contentAssistRequest, context, contentAssistRequest.getReplacementBeginPosition());
+	}
+	
+	/**
+	 * Adds templates to the list of proposals
+	 * 
+	 * @param contentAssistRequest
+	 * @param context
+	 * @param startOffset
+	 */
+	private void addTemplates(ContentAssistRequest contentAssistRequest, String context, int startOffset) {
 		if (contentAssistRequest == null)
 			return;
-
+		
 		// if already adding template proposals for a certain context type, do
 		// not add again
 		if (!fTemplateContexts.contains(context)) {
@@ -76,7 +87,7 @@
 
 			if (getTemplateCompletionProcessor() != null) {
 				getTemplateCompletionProcessor().setContextType(context);
-				ICompletionProposal[] proposals = getTemplateCompletionProcessor().computeCompletionProposals(fTextViewer, contentAssistRequest.getReplacementBeginPosition());
+				ICompletionProposal[] proposals = getTemplateCompletionProcessor().computeCompletionProposals(fTextViewer, startOffset);
 				for (int i = 0; i < proposals.length; ++i) {
 					if (useProposalList)
 						contentAssistRequest.addProposal(proposals[i]);
@@ -89,7 +100,8 @@
 	
 	protected ContentAssistRequest computeCompletionProposals(int documentPosition, String matchString, ITextRegion completionRegion, IDOMNode treeNode, IDOMNode xmlnode) {
 		ContentAssistRequest request = super.computeCompletionProposals(documentPosition, matchString, completionRegion, treeNode, xmlnode);
-		addTemplates(request, TemplateContextTypeIdsXML.ALL);
+		// bug115927 use original document position for all/any region templates
+		addTemplates(request, TemplateContextTypeIdsXML.ALL, documentPosition);
 		return request;
 	}
 	
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLTemplateCompletionProcessor.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLTemplateCompletionProcessor.java
index a789a47..619bcae 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLTemplateCompletionProcessor.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLTemplateCompletionProcessor.java
@@ -12,14 +12,24 @@
  *******************************************************************************/
 package org.eclipse.wst.xml.ui.internal.contentassist;
 
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextSelection;
 import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.Region;
 import org.eclipse.jface.text.contentassist.ICompletionProposal;
 import org.eclipse.jface.text.templates.ContextTypeRegistry;
 import org.eclipse.jface.text.templates.Template;
 import org.eclipse.jface.text.templates.TemplateCompletionProcessor;
 import org.eclipse.jface.text.templates.TemplateContext;
 import org.eclipse.jface.text.templates.TemplateContextType;
+import org.eclipse.jface.text.templates.TemplateException;
+import org.eclipse.jface.text.templates.TemplateProposal;
 import org.eclipse.jface.text.templates.persistence.TemplateStore;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
@@ -35,8 +45,88 @@
  * templates.
  */
 class XMLTemplateCompletionProcessor extends TemplateCompletionProcessor {
+	private static final class ProposalComparator implements Comparator {
+		public int compare(Object o1, Object o2) {
+			return ((TemplateProposal) o2).getRelevance() - ((TemplateProposal) o1).getRelevance();
+		}
+	}
+
+	private static final Comparator fgProposalComparator = new ProposalComparator();
 	private String fContextTypeId = null;
 
+	/*
+	 * Copied from super class except instead of calling createContext(viewer,
+	 * region) call createContext(viewer, region, offset) instead
+	 */
+	public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
+
+		ITextSelection selection = (ITextSelection) viewer.getSelectionProvider().getSelection();
+
+		// adjust offset to end of normalized selection
+		if (selection.getOffset() == offset)
+			offset = selection.getOffset() + selection.getLength();
+
+		String prefix = extractPrefix(viewer, offset);
+		Region region = new Region(offset - prefix.length(), prefix.length());
+		TemplateContext context = createContext(viewer, region, offset);
+		if (context == null)
+			return new ICompletionProposal[0];
+
+		context.setVariable("selection", selection.getText()); // name of the
+																// selection
+																// variables
+																// {line,
+																// word}_selection
+																// //$NON-NLS-1$
+
+		Template[] templates = getTemplates(context.getContextType().getId());
+
+		List matches = new ArrayList();
+		for (int i = 0; i < templates.length; i++) {
+			Template template = templates[i];
+			try {
+				context.getContextType().validate(template.getPattern());
+			}
+			catch (TemplateException e) {
+				continue;
+			}
+			if (template.matches(prefix, context.getContextType().getId()))
+				matches.add(createProposal(template, context, (IRegion) region, getRelevance(template, prefix)));
+		}
+
+		Collections.sort(matches, fgProposalComparator);
+
+		return (ICompletionProposal[]) matches.toArray(new ICompletionProposal[matches.size()]);
+	}
+
+	/**
+	 * Creates a concrete template context for the given region in the
+	 * document. This involves finding out which context type is valid at the
+	 * given location, and then creating a context of this type. The default
+	 * implementation returns a <code>SmartReplaceTemplateContext</code> for
+	 * the context type at the given location. This takes the offset at which
+	 * content assist was invoked into consideration.
+	 * 
+	 * @param viewer
+	 *            the viewer for which the context is created
+	 * @param region
+	 *            the region into <code>document</code> for which the
+	 *            context is created
+	 * @param offset
+	 *            the original offset where content assist was invoked
+	 * @return a template context that can handle template insertion at the
+	 *         given location, or <code>null</code>
+	 */
+	private TemplateContext createContext(ITextViewer viewer, IRegion region, int offset) {
+		// pretty much same code as super.createContext except create SmartReplaceTemplateContext
+		TemplateContextType contextType = getContextType(viewer, region);
+		if (contextType != null) {
+			IDocument document = viewer.getDocument();
+			return new ReplaceNameTemplateContext(contextType, document, region.getOffset(), region.getLength(), offset);
+		}
+		return null;
+	}
+	
 	protected ICompletionProposal createProposal(Template template, TemplateContext context, IRegion region, int relevance) {
 		return new CustomTemplateProposal(template, context, region, getImage(template), relevance);
 	}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLFilesPreferencePage.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLFilesPreferencePage.java
index 29e8080..3340219 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLFilesPreferencePage.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLFilesPreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2001, 2006 IBM Corporation and others.
+ * Copyright (c) 2001, 2004 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
@@ -12,29 +12,19 @@
  *******************************************************************************/
 package org.eclipse.wst.xml.ui.internal.preferences;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
 import java.util.Vector;
 
-import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Preferences;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.Combo;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Group;
 import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.wst.sse.core.internal.encoding.CommonEncodingPreferenceNames;
 import org.eclipse.wst.sse.ui.internal.preferences.ui.AbstractPreferencePage;
 import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
-import org.eclipse.wst.xml.core.internal.preferences.XMLCorePreferenceNames;
-import org.eclipse.wst.xml.core.internal.provisional.contenttype.ContentTypeIdForXML;
 import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
 import org.eclipse.wst.xml.ui.internal.editor.IHelpContextIds;
 
@@ -43,8 +33,6 @@
 
 	protected Combo fEndOfLineCode = null;
 	private Vector fEOLCodes = null;
-	private Text fDefaultSuffix = null;
-	private List fValidExtensions = null;
 
 	protected Control createContents(Composite parent) {
 		Composite composite = (Composite) super.createContents(parent);
@@ -59,18 +47,12 @@
 	}
 
 	protected void createContentsForCreatingGroup(Composite parent) {
-		Group creatingGroup = createGroup(parent, 2);
+		Group creatingGroup = createGroup(parent, 1);
 		creatingGroup.setText(XMLUIMessages.Creating_files);
 
-		// Default extension for New file Wizard
-		createLabel(creatingGroup, XMLUIMessages.XMLFilesPreferencePage_ExtensionLabel);
-		fDefaultSuffix = createTextField(creatingGroup);
-		fDefaultSuffix.addModifyListener(this);
+		createLabel(creatingGroup, XMLUIMessages.Encoding_desc);
 
-		Label label = createLabel(creatingGroup, XMLUIMessages.Encoding_desc);
-		((GridData) label.getLayoutData()).horizontalSpan = 2;
 		fEncodingSettings = new EncodingSettings(creatingGroup, XMLUIMessages.Encoding);
-		((GridData) fEncodingSettings.getLayoutData()).horizontalSpan = 2;
 	}
 
 	protected void createContentsForCreatingOrSavingGroup(Composite parent) {
@@ -86,38 +68,11 @@
 		populateLineDelimiters();
 	}
 
-	public void dispose() {
-		fDefaultSuffix.removeModifyListener(this);
-		super.dispose();
-	}
-
 	protected void doSavePreferenceStore() {
 		XMLCorePlugin.getDefault().savePluginPreferences(); // model
 	}
 
 	/**
-	 * Get content type associated with this new file wizard
-	 * 
-	 * @return IContentType
-	 */
-	protected IContentType getContentType() {
-		return Platform.getContentTypeManager().getContentType(ContentTypeIdForXML.ContentTypeID_XML);
-	}
-
-	/**
-	 * Get list of valid extensions
-	 * 
-	 * @return List
-	 */
-	private List getValidExtensions() {
-		if (fValidExtensions == null) {
-			IContentType type = getContentType();
-			fValidExtensions = new ArrayList(Arrays.asList(type.getFileSpecs(IContentType.FILE_EXTENSION_SPEC)));
-		}
-		return fValidExtensions;
-	}
-
-	/**
 	 * Return the currently selected line delimiter preference
 	 * 
 	 * @return a line delimiter constant from CommonEncodingPreferenceNames
@@ -145,9 +100,6 @@
 	}
 
 	protected void initializeValuesForCreatingGroup() {
-		String suffix = getModelPreferences().getString(XMLCorePreferenceNames.DEFAULT_EXTENSION);
-		fDefaultSuffix.setText(suffix);
-
 		String encoding = getModelPreferences().getString(CommonEncodingPreferenceNames.OUTPUT_CODESET);
 
 		fEncodingSettings.setIANATag(encoding);
@@ -170,13 +122,10 @@
 	}
 
 	protected void performDefaultsForCreatingGroup() {
-		String suffix = getModelPreferences().getDefaultString(XMLCorePreferenceNames.DEFAULT_EXTENSION);
-		fDefaultSuffix.setText(suffix);
-
 		String encoding = getModelPreferences().getDefaultString(CommonEncodingPreferenceNames.OUTPUT_CODESET);
 
 		fEncodingSettings.setIANATag(encoding);
-		// fEncodingSettings.resetToDefaultEncoding();
+		//		fEncodingSettings.resetToDefaultEncoding();
 	}
 
 	protected void performDefaultsForCreatingOrSavingGroup() {
@@ -236,9 +185,6 @@
 	}
 
 	protected void storeValuesForCreatingGroup() {
-		String suffix = fDefaultSuffix.getText();
-		getModelPreferences().setValue(XMLCorePreferenceNames.DEFAULT_EXTENSION, suffix);
-
 		getModelPreferences().setValue(CommonEncodingPreferenceNames.OUTPUT_CODESET, fEncodingSettings.getIANATag());
 	}
 
@@ -246,22 +192,4 @@
 		String eolCode = getCurrentEOLCode();
 		getModelPreferences().setValue(CommonEncodingPreferenceNames.END_OF_LINE_CODE, eolCode);
 	}
-
-	protected void validateValues() {
-		boolean isValid = false;
-		Iterator i = getValidExtensions().iterator();
-		while (i.hasNext() && !isValid) {
-			String extension = (String) i.next();
-			isValid = extension.equalsIgnoreCase(fDefaultSuffix.getText());
-		}
-
-		if (!isValid) {
-			setErrorMessage(NLS.bind(XMLUIMessages.XMLFilesPreferencePage_ExtensionError, getValidExtensions().toString()));
-			setValid(false);
-		}
-		else {
-			setErrorMessage(null);
-			setValid(true);
-		}
-	}
 }
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/taginfo/MarkupTagInfoProvider.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/taginfo/MarkupTagInfoProvider.java
index 5b553d8..860a4f9 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/taginfo/MarkupTagInfoProvider.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/taginfo/MarkupTagInfoProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2001, 2006 IBM Corporation and others.
+ * Copyright (c) 2001, 2004 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
@@ -98,7 +98,6 @@
 				sb.append(PARAGRAPH_START + BOLD_START + XMLUIMessages.Element____1 + SPACE + BOLD_END);
 				sb.append(node.getNodeName());
 				sb.append(PARAGRAPH_END);
-				printDocumentation(sb, node);
 				if (ed.getContentType() == CMElementDeclaration.PCDATA) {
 					CMDataType dataType = ed.getDataType();
 					if (dataType != null) {
@@ -112,16 +111,17 @@
 						sb.append(description + PARAGRAPH_END);
 					}
 				}
+				printDocumentation(sb, node);
 			} else if (node.getNodeType() == CMNode.ATTRIBUTE_DECLARATION) {
 				CMAttributeDeclaration ad = (CMAttributeDeclaration) node;
 				sb.append(PARAGRAPH_START + BOLD_START + XMLUIMessages.Attribute____3 + SPACE + BOLD_END);
 				sb.append(node.getNodeName());
 				sb.append(PARAGRAPH_END);
-				printDocumentation(sb, node);
 				CMDataType dataType = ad.getAttrType();
 				if (dataType != null) {
 					printDataTypeInfo(sb, dataType);
 				}
+				printDocumentation(sb, node);
 			} else if (node.getNodeType() == CMNode.DATA_TYPE) {
 				sb.append(PARAGRAPH_START + BOLD_START + XMLUIMessages.Data_Type____4 + SPACE + BOLD_END);
 				sb.append(node.getNodeName());
@@ -150,6 +150,7 @@
 	protected void printDocumentation(StringBuffer sb, CMNode node) {
 		CMNodeList nodeList = (CMNodeList) node.getProperty("documentation"); //$NON-NLS-1$
 		if ((nodeList != null) && (nodeList.getLength() > 0)) {
+			sb.append(NEW_LINE);
 			for (int i = 0; i < nodeList.getLength(); i++) {
 				CMDocumentation documentation = (CMDocumentation) nodeList.item(i);
 				String doc = documentation.getValue();
@@ -157,7 +158,6 @@
 					sb.append(PARAGRAPH_START + doc.trim() + PARAGRAPH_END);
 				}
 			}
-			sb.append(NEW_LINE);
 		}
 	}
 
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/taginfo/XMLTagInfoHoverProcessor.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/taginfo/XMLTagInfoHoverProcessor.java
index 937bafa..bb2177d 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/taginfo/XMLTagInfoHoverProcessor.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/taginfo/XMLTagInfoHoverProcessor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2001, 2006 IBM Corporation and others.
+ * Copyright (c) 2001, 2004 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
@@ -27,7 +27,6 @@
 import org.eclipse.wst.sse.core.internal.util.Debug;
 import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
 import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
-import org.eclipse.wst.sse.ui.internal.taginfo.AbstractHoverProcessor;
 import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
 import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
 import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
@@ -45,16 +44,16 @@
 /**
  * Provides hover help documentation for xml tags
  * 
+ * @author amywu
  * @see org.eclipse.jface.text.ITextHover
  */
-public class XMLTagInfoHoverProcessor extends AbstractHoverProcessor {
+public class XMLTagInfoHoverProcessor implements ITextHover {
 	protected MarkupTagInfoProvider fInfoProvider = null;
 
 	/**
 	 * Constructor for XMLTextHoverProcessor.
 	 */
 	public XMLTagInfoHoverProcessor() {
-		// nothing
 	}
 
 	/**
@@ -62,7 +61,7 @@
 	 * 
 	 * @return String any documentation information to display
 	 *         <code>null</code> if there is nothing to display.
-	 * 
+	 *  
 	 */
 	protected String computeHoverHelp(ITextViewer textViewer, int documentPosition) {
 		String result = null;
@@ -274,8 +273,7 @@
 							return new Region(flatNode.getStartOffset(region), region.getTextLength());
 						}
 					}
-				}
-				catch (BadLocationException e) {
+				} catch (BadLocationException e) {
 					Logger.logException(e);
 				}
 			}
@@ -313,8 +311,7 @@
 							return new Region(flatNode.getStartOffset(region), region.getTextLength());
 						}
 					}
-				}
-				catch (BadLocationException e) {
+				} catch (BadLocationException e) {
 					Logger.logException(e);
 				}
 			}
diff --git a/bundles/org.eclipse.wst.xsd.core/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.wst.xsd.core/.settings/org.eclipse.jdt.core.prefs
index f9bd082..6cdb4d2 100644
--- a/bundles/org.eclipse.wst.xsd.core/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.wst.xsd.core/.settings/org.eclipse.jdt.core.prefs
@@ -1,6 +1,6 @@
-#Mon Jan 30 23:39:29 EST 2006
+#Mon Jan 30 18:54:33 EST 2006
 eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
 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
@@ -34,7 +34,6 @@
 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
@@ -49,7 +48,6 @@
 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
diff --git a/bundles/org.eclipse.wst.xsd.core/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.wst.xsd.core/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 83ee912..0000000
--- a/bundles/org.eclipse.wst.xsd.core/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Mon Jan 30 23:28:33 EST 2006
-eclipse.preferences.version=1
-internal.default.compliance=default
diff --git a/bundles/org.eclipse.wst.xsd.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.xsd.core/META-INF/MANIFEST.MF
index a7c6808..390939c 100644
--- a/bundles/org.eclipse.wst.xsd.core/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.xsd.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %_UI_PLUGIN_NAME
 Bundle-SymbolicName: org.eclipse.wst.xsd.core; singleton:=true
-Bundle-Version: 1.0.1.qualifer
+Bundle-Version: 1.0.1.qualifier
 Bundle-Activator: org.eclipse.wst.xsd.core.internal.XSDCorePlugin
 Bundle-Vendor: Eclipse.org
 Bundle-Localization: plugin
@@ -19,6 +19,6 @@
  org.eclipse.core.resources,
  org.eclipse.wst.validation,
  org.apache.xerces
-Eclipse-LasyStart: true
+Eclipse-AutoStart: true
 Plugin-Class: org.eclipse.wst.xsd.core.internal.XSDCorePlugin
 
diff --git a/bundles/org.eclipse.wst.xsd.core/plugin.properties b/bundles/org.eclipse.wst.xsd.core/plugin.properties
index fb668cb..35666bf 100644
--- a/bundles/org.eclipse.wst.xsd.core/plugin.properties
+++ b/bundles/org.eclipse.wst.xsd.core/plugin.properties
@@ -16,4 +16,21 @@
 _UI_PLUGIN_NAME                           = XSD Core Plugin
 XSD_Content_Type=XSD
 
+!
+! XSDEditor Menu bar contributor
+!
+
+_UI_MENU_VALIDATE_XML                     = &Validate XML Schema
+
+!
+! Validate Schema 
+!
+_UI_DIALOG_XML_SCHEMA_INVALID_TITLE       = Validation Failed
+_UI_DIALOG_XML_SCHEMA_VALID_TITLE         = Validation Succeeded
+_UI_DIALOG_XML_SCHEMA_VALID_TEXT          = The XML schema file is valid.
+_UI_DIALOG_XML_SCHEMA_VALID_WITH_WARNINGS = The XML schema file is valid however warnings have been issued. See the Problems view for the warning messages.
+_UI_DIALOG_XML_SCHEMA_INVALID_TEXT        = The XML schema file is not valid. See the Problems view for the error messages.
+_UI_DIALOG_XML_SCHEMA_LIMITE_EXCEEDED     = The XML schema file is not valid.  The message limit for the Problems view has been exceeded.  To see all the messages increase the limit and validate again.
+
+
 _UI_XML_SCHEMA_VALIDATOR                  = XML Schema Validator
diff --git a/bundles/org.eclipse.wst.xsd.ui/.classpath b/bundles/org.eclipse.wst.xsd.ui/.classpath
index 905c508..ed58bc2 100644
--- a/bundles/org.eclipse.wst.xsd.ui/.classpath
+++ b/bundles/org.eclipse.wst.xsd.ui/.classpath
@@ -2,7 +2,6 @@
 <classpath>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="src" path="src-validation"/>
-	<classpathentry kind="src" path="src-refactor"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/bundles/org.eclipse.wst.xsd.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.xsd.ui/META-INF/MANIFEST.MF
index 759a0f1..91c80fe 100644
--- a/bundles/org.eclipse.wst.xsd.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.xsd.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %_UI_PLUGIN_NAME
 Bundle-SymbolicName: org.eclipse.wst.xsd.ui; singleton:=true
-Bundle-Version: 1.0.0.qualifer
+Bundle-Version: 1.0.0.qualifier
 Bundle-Activator: org.eclipse.core.internal.compatibility.PluginActivator
 Bundle-Vendor: Eclipse.org
 Bundle-Localization: plugin
@@ -27,11 +27,9 @@
  org.eclipse.wst.xsd.ui.internal.provider,
  org.eclipse.wst.xsd.ui.internal.refactor,
  org.eclipse.wst.xsd.ui.internal.refactor.actions,
+ org.eclipse.wst.xsd.ui.internal.refactor.delete,
  org.eclipse.wst.xsd.ui.internal.refactor.rename,
  org.eclipse.wst.xsd.ui.internal.refactor.structure,
- org.eclipse.wst.xsd.ui.internal.refactor.util,
- org.eclipse.wst.xsd.ui.internal.refactor.wizard,
- org.eclipse.wst.xsd.ui.internal.search,
  org.eclipse.wst.xsd.ui.internal.text,
  org.eclipse.wst.xsd.ui.internal.util,
  org.eclipse.wst.xsd.ui.internal.validation,
@@ -41,7 +39,6 @@
  org.eclipse.wst.common.uriresolver,
  org.eclipse.wst.sse.ui,
  org.eclipse.wst.sse.core,
- org.eclipse.wst.common.core,
  org.eclipse.wst.xml.core,
  org.eclipse.wst.xml.ui,
  org.eclipse.wst.common.ui,
@@ -62,7 +59,6 @@
  org.eclipse.wst.validation,
  org.eclipse.ltk.core.refactoring,
  org.eclipse.ltk.ui.refactoring,
- org.eclipse.wst.xsd.core,
- org.eclipse.search
-Eclipse-LazyStart: true
+ org.eclipse.wst.xsd.core
+Eclipse-AutoStart: true
 Plugin-Class: org.eclipse.wst.xsd.ui.internal.XSDEditorPlugin
diff --git a/bundles/org.eclipse.wst.xsd.ui/build.properties b/bundles/org.eclipse.wst.xsd.ui/build.properties
index 7204163..607430b 100644
--- a/bundles/org.eclipse.wst.xsd.ui/build.properties
+++ b/bundles/org.eclipse.wst.xsd.ui/build.properties
@@ -9,8 +9,7 @@
 #     IBM Corporation - initial API and implementation
 ###############################################################################
 source.. = src/,\
-           src-validation/,\
-           src-refactor/
+					   src-validation
 bin.includes = .,\
                plugin.xml,\
                icons/,\
@@ -23,4 +22,3 @@
                about.html
 src.includes = build.properties,\
                component.xml
-output.. = bin/
diff --git a/bundles/org.eclipse.wst.xsd.ui/plugin.properties b/bundles/org.eclipse.wst.xsd.ui/plugin.properties
index dc01a76..01944f1 100644
--- a/bundles/org.eclipse.wst.xsd.ui/plugin.properties
+++ b/bundles/org.eclipse.wst.xsd.ui/plugin.properties
@@ -514,11 +514,10 @@
 !
 ! Validate Schema 
 !
-_UI_DIALOG_XML_SCHEMA_INVALID_TITLE       = Validation Failed
-_UI_DIALOG_XML_SCHEMA_VALID_TITLE         = Validation Succeeded
-_UI_DIALOG_XML_SCHEMA_VALID_TEXT          = The XML schema file is valid.
-_UI_DIALOG_XML_SCHEMA_VALID_WITH_WARNINGS = The XML schema file is valid however warnings have been issued. See the Problems view for the warning messages.
-_UI_DIALOG_XML_SCHEMA_INVALID_TEXT        = The XML schema file is not valid. See the Problems view for the error messages.
+_UI_DIALOG_XML_SCHEMA_INVALID_TITLE  = Validation Failed
+_UI_DIALOG_XML_SCHEMA_VALID_TITLE    = Validation Succeeded
+_UI_DIALOG_XML_SCHEMA_VALID_TEXT     = The XML schema file is valid.
+_UI_DIALOG_XML_SCHEMA_LIMITE_EXCEEDED  = The XML schema file is not valid.  The message limit for the Tasks view has been exceeded.  Please increase the limit and try again.
 
 !
 ! Combo-box choices 
diff --git a/bundles/org.eclipse.wst.xsd.ui/plugin.xml b/bundles/org.eclipse.wst.xsd.ui/plugin.xml
index 98791f3..564798d 100644
--- a/bundles/org.eclipse.wst.xsd.ui/plugin.xml
+++ b/bundles/org.eclipse.wst.xsd.ui/plugin.xml
@@ -296,159 +296,4 @@
 		</validator>
 	</extension>
 
-	<!-- ============================================================================== -->
-	<!-- Register the XSDSearchParticpant against for XMLComponentSearchPatterns 		-->
-	<!-- ============================================================================== -->	
-	 <extension   
-		point="org.eclipse.wst.common.core.searchParticipants">
-		<searchParticipant
-			id="org.eclipse.wst.xsd.search.XSDSearchParticipant"
-			class="org.eclipse.wst.xsd.ui.internal.search.XSDSearchParticipant">
-			<enablement>
-			   <or>
-			      <with variable="pattern">
-					<instanceof value="org.eclipse.wst.xml.core.internal.search.XMLComponentSearchPattern"/>			   
-				  </with>
-				</or>
-			</enablement>
-			 <contentTypeBinding
-                contentTypeId="org.eclipse.wst.xsd.core.xsdsource" />
-		</searchParticipant>
-	 </extension>
-	
-	<!-- ============================================================================== -->	 
-    <!-- Register a 'rename' participant this enables us to provide refactoring for     --> 
-    <!-- renamed XML Schema components (e.g. elements, types etc.)                      --> 
-	<!-- ============================================================================== -->	 
-	<extension
-		point="org.eclipse.ltk.core.refactoring.renameParticipants">
-		<renameParticipant
-			name="%xsd.resource.rename.participant.name"
-			class="org.eclipse.wst.xsd.ui.internal.refactor.rename.XSDComponentRenameParticipant"
-			id="org.eclipse.wst.xsd.refactoring.XSDComponentRenameParticipant">
-			<enablement>
-				<with variable="element">
-					<instanceof
-						value="org.eclipse.xsd.XSDNamedComponent">
-					</instanceof>
-				</with>
-			</enablement>
-		</renameParticipant>
-		
-	</extension>
-	
-
-	<!-- ============================================================================== -->	 
-    <!-- Register a 'rename' participant this enables us to provide refactoring for     --> 
-    <!-- renamed resources.                                                             --> 
-	<!-- ============================================================================== -->	 
-    <extension
-		point="org.eclipse.ltk.core.refactoring.renameParticipants">
-		<renameParticipant
-			name="%xsd.resource.rename.participant.name"
-			class="org.eclipse.wst.xsd.ui.internal.refactor.rename.ResourceRenameParticipant"
-			id="org.eclipse.wst.xsd.refactoring.XSDResourceRenameParticipant">
-			<enablement>
-				<with variable="element">
-					<instanceof value="org.eclipse.core.resources.IResource"/>
-				</with>
-			</enablement>
-		</renameParticipant>
-	</extension>
-	
-	
-   <extension point="org.eclipse.ui.popupMenus"> 
-      <objectContribution 
-         id="org.eclipse.wst.xsd.ui.refactoring.menu.objectContrib" 
-         objectClass="org.eclipse.xsd.XSDComponent">  
-         <action
-            id="org.eclipse.wst.xsd.ui.search.declarations.action" 
-            enablesFor="1"
-            style="pulldown"
-            menubarPath="search-slot"
-            label="Declarations"
-            class="org.eclipse.wst.xsd.ui.internal.search.actions.XSDSearchDeclarationsGroupActionDelegate"> 
-         </action>          
-         <action
-            id="org.eclipse.wst.xsd.ui.search.references.action" 
-            enablesFor="1"
-            style="pulldown"
-            menubarPath="search-slot"
-            label="References"
-            class="org.eclipse.wst.xsd.ui.internal.search.actions.XSDSearchReferencesGroupActionDelegate"> 
-         </action>
-         <action
-            id="org.eclipse.wst.xsd.ui.refactoring.menu.refactorGroup.object" 
-            enablesFor="1"
-            style="pulldown"
-            menubarPath="refactoring-slot"
-            label="%refactoring.menu.label" 
-            class="org.eclipse.wst.xsd.ui.internal.refactor.actions.XSDRefactorGroupActionDelegate"> 
-         </action>          
-      </objectContribution>         
-    <viewerContribution
-        id="org.eclipse.wst.xsd.ui.refactoring.menu.source"
-        targetID="org.eclipse.wst.xsd.core.xsdsource.source.EditorContext">
-	    <action id="org.eclipse.wst.xsd.ui.refactoring.menu.refactorGroup.source"
-       		style="pulldown"
-            menubarPath="additions"
-            label="%refactoring.menu.label" 
-            class="org.eclipse.wst.xsd.ui.internal.refactor.actions.XSDRefactorGroupActionDelegate"> 
-  	    </action>
-       </viewerContribution>
-       
-     </extension>
-  
-
-	<extension point="org.eclipse.ui.commands">
-		<command
-			name="%command.xsd.refactor.rename.element.name"
-			description="%command.xsd.refactor.rename.element.description"
-			categoryId="org.eclipse.ui.category.edit"
-			id="org.eclipse.wst.xsd.ui.refactor.rename.element">
-		</command>
-		<command
-			name="%command.xsd.refactor.makeElementGlobal.element.name"
-			description="%command.xsd.refactor.makeElementGlobal.element.description"
-			categoryId="org.eclipse.ui.category.edit"
-			id="org.eclipse.wst.xsd.ui.refactor.makeElementGlobal">
-		</command>
-		<command
-			name="%command.xsd.refactor.makeTypeGlobal.element.name"
-			description="%command.xsd.refactor.makeTypeGlobal.element.description"
-			categoryId="org.eclipse.ui.category.edit"
-			id="org.eclipse.wst.xsd.ui.refactor.makeTypeGlobal">
-		</command>
-		<command
-			name="%command.xsd.refactor.renameTargetNamespace.name"
-			description="%command.xsd.refactor.renameTargetNamespace.description"
-			categoryId="org.eclipse.ui.category.edit"
-			id="org.eclipse.wst.xsd.ui.refactor.renameTargetNamespace">
-		</command>
-	</extension>
-	
-	
-	<!-- 
-		The following extension to the file context menu is temporary until resource 
-		navigator will provide allow to extend refactor menu        
-	-->
-	
-	<!--extension point="org.eclipse.ui.popupMenus">
-	 <objectContribution
-		objectClass="org.eclipse.core.resources.IFile"
-		nameFilter="*.xsd"
-		id="org.wst.xsd.ui.rename">
-		<menu id="refactorXSDResource" path="additions" label="%refactoring.menu.label">
-		  <separator name="refactor"/>
-		</menu>
-	<action
-		label="%refactoring.renameAction.label"
-		menubarPath="refactorXSDResource/refactor"
-		class="org.eclipse.wst.xsd.ui.internal.refactor.actions.RenameResourceActionDelegate"
-		enablesFor="1"
-		id="org.eclipse.wst.xsd.ui.refactoring.actions.RenameResource">
-	 </action>
-	 </objectContribution>
-	</extension-->	
-
 </plugin>
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/Checks.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/Checks.java
index db67a13..92a2027 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/Checks.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/Checks.java
@@ -1,14 +1,3 @@
-/*******************************************************************************
- * 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.xsd.ui.internal.refactor;
 
 import org.eclipse.ltk.core.refactoring.RefactoringStatus;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/INameUpdating.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/INameUpdating.java
index af89666..76adc4d 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/INameUpdating.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/INameUpdating.java
@@ -1,14 +1,9 @@
-/*******************************************************************************
- * 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
- *     
- *******************************************************************************/
+/*
+ * Created on Feb 16, 2005
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
 package org.eclipse.wst.xsd.ui.internal.refactor;
 
 import org.eclipse.ltk.core.refactoring.RefactoringStatus;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/IReferenceUpdating.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/IReferenceUpdating.java
index 1ff48fe..2b65694 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/IReferenceUpdating.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/IReferenceUpdating.java
@@ -1,14 +1,3 @@
-/*******************************************************************************
- * 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.xsd.ui.internal.refactor;
 
 public interface IReferenceUpdating {
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/RefactoringComponent.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/RefactoringComponent.java
index 554bc8a..8f4dc58 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/RefactoringComponent.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/RefactoringComponent.java
@@ -1,14 +1,3 @@
-/*******************************************************************************
- * 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.xsd.ui.internal.refactor;
 
 import org.eclipse.wst.common.core.search.pattern.QualifiedName;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/Startup.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/Startup.java
new file mode 100644
index 0000000..4a3fc53
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/Startup.java
@@ -0,0 +1,14 @@
+package org.eclipse.wst.xsd.ui.internal.refactor;
+
+
+import org.eclipse.ui.IStartup;
+import org.eclipse.wst.xsd.ui.internal.XSDEditorPlugin;
+
+public class Startup implements IStartup {
+
+	public void earlyStartup() {
+		XSDEditorPlugin.getPlugin();
+
+	}
+
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/TextChangeManager.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/TextChangeManager.java
index 5252362..69ff744 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/TextChangeManager.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/TextChangeManager.java
@@ -1,14 +1,3 @@
-/*******************************************************************************
- * 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.xsd.ui.internal.refactor;
 
 import java.util.HashMap;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/XMLRefactoringComponent.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/XMLRefactoringComponent.java
index ad779b1..93eac43 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/XMLRefactoringComponent.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/XMLRefactoringComponent.java
@@ -1,14 +1,3 @@
-/*******************************************************************************
- * 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.xsd.ui.internal.refactor;
 
 import org.eclipse.wst.common.core.search.pattern.QualifiedName;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/RenameAction.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/RenameAction.java
index fe8c721..6b1d8b8 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/RenameAction.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/RenameAction.java
@@ -1,14 +1,4 @@
-/*******************************************************************************
- * 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.xsd.ui.internal.refactor.actions;
 
 
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/XSDRefactorActionGroup.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/XSDRefactorActionGroup.java
index c8d8603..950fc6f 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/XSDRefactorActionGroup.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/XSDRefactorActionGroup.java
@@ -1,14 +1,3 @@
-/*******************************************************************************
- * 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.xsd.ui.internal.refactor.actions;
 
 import java.util.ArrayList;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/XSDRefactorGroupActionDelegate.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/XSDRefactorGroupActionDelegate.java
index 5a30033..965fc4e 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/XSDRefactorGroupActionDelegate.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/XSDRefactorGroupActionDelegate.java
@@ -1,14 +1,3 @@
-/*******************************************************************************
- * 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.xsd.ui.internal.refactor.actions;
 
 import java.io.IOException;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/XSDSelectionDispatchAction.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/XSDSelectionDispatchAction.java
index 078f4c1..05c72d4 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/XSDSelectionDispatchAction.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/XSDSelectionDispatchAction.java
@@ -1,14 +1,3 @@
-/*******************************************************************************
- * 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.xsd.ui.internal.refactor.actions;
 
 import org.eclipse.jface.viewers.ISelection;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/ComponentRenameArguments.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/ComponentRenameArguments.java
index ebdf3d0..f90685d 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/ComponentRenameArguments.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/ComponentRenameArguments.java
@@ -1,14 +1,3 @@
-/*******************************************************************************
- * 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.xsd.ui.internal.refactor.rename;
 
 import java.util.Map;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/SortingSearchRequestor.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/SortingSearchRequestor.java
index d140a8c..25179e7 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/SortingSearchRequestor.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/SortingSearchRequestor.java
@@ -1,14 +1,3 @@
-/*******************************************************************************
- * 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.xsd.ui.internal.refactor.rename;
 
 import java.util.ArrayList;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/XMLComponentRenameParticipant.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/XMLComponentRenameParticipant.java
index 2b2904c..cce160c 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/XMLComponentRenameParticipant.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/XMLComponentRenameParticipant.java
@@ -1,14 +1,3 @@
-/*******************************************************************************
- * 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.xsd.ui.internal.refactor.rename;
 
 import java.util.Iterator;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/XSDComponentRenameParticipant.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/XSDComponentRenameParticipant.java
index 3d169fd..c61fc01 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/XSDComponentRenameParticipant.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/XSDComponentRenameParticipant.java
@@ -1,14 +1,3 @@
-/*******************************************************************************
- * 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.xsd.ui.internal.refactor.rename;
 
 import java.util.List;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/util/LinkURLHelper.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/util/LinkURLHelper.java
new file mode 100644
index 0000000..30274d4
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/util/LinkURLHelper.java
@@ -0,0 +1,288 @@
+/*
+ * Created on Sep 21, 2004
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Generation - Code and Comments
+ */
+package org.eclipse.wst.xsd.ui.internal.refactor.util;
+
+
+
+
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import org.eclipse.wst.common.uriresolver.internal.URI;
+import org.eclipse.wst.sse.core.internal.util.PathHelper;
+
+
+/**
+ * Hyperlink manager. Proved useful services like link conversion
+ * An utility class to help other parsre modules to convert links
+ */
+public class LinkURLHelper {
+
+	private static final String FILE_PROTOCOL_SEARCH_SIG = "file:/";//$NON-NLS-1$
+	private static final String FILE_PROTOCOL_SIG = "file:///";//$NON-NLS-1$
+	private static String RELATIVE_PATH_SIG = "..";//$NON-NLS-1$	
+	private static final String FORWARD_SLASH = "/";//$NON-NLS-1$	
+	private URL fBaseUrl = null; // base url. assumed to a absulute url
+	private String fBaseUrlString = null;
+	private URL fDocRoot = null;
+	private String fDocRootString = null;
+
+	public LinkURLHelper(String baseUrl) {
+		initialize(baseUrl, null);
+	}
+
+
+	public LinkURLHelper(String baseUrl, String docRoot) {
+		initialize(baseUrl, docRoot);
+	}
+
+	/**
+	 * Special adujust for file url
+	 */
+	public String adjustFileProtocolUrl(String url) {
+		if (url.startsWith(FILE_PROTOCOL_SEARCH_SIG)) {
+			url = FILE_PROTOCOL_SIG + url.substring(FILE_PROTOCOL_SEARCH_SIG.length());
+		}
+		return url;
+	}
+
+	private String convert(String url, URL baseUrl, String urlString) {
+		String absUrl = url;
+		if (baseUrl != null) {
+			try {
+				// do special thing file protocol
+				if (baseUrl.getProtocol().equalsIgnoreCase("file")) {//$NON-NLS-1$
+					// remove the fist
+					if (url.startsWith("/"))//$NON-NLS-1$
+						url = url.substring(1);
+					// empty string causes malformed exception	
+					String tempUrl = url;
+					if ("".equals(url))//$NON-NLS-1$
+						tempUrl = " ";//$NON-NLS-1$
+					URL newUrl = new URL(baseUrl, tempUrl);
+					// do extra math for file protocol to support ie based
+					absUrl = adjustFileProtocolUrl(newUrl.toString());
+				}
+				else {
+					URL newUrl = new URL(fBaseUrl, url);
+					absUrl = newUrl.toString();
+				}
+			}
+			catch (MalformedURLException me) {
+			}
+			// convert everything to forward slash
+			absUrl = PathHelper.switchToForwardSlashes(absUrl);
+		}
+		else {
+			// the given may be based on file
+			if (urlString != null) {
+				// swich the url to proper direction
+				url = PathHelper.removeLeadingSeparator(url);
+				File fle = new File(urlString, url);
+				absUrl = fle.getPath();
+
+			}
+			// convert everything to forward slash
+			absUrl = PathHelper.switchToForwardSlashes(absUrl);
+
+			// if the path ends with ".." we need to add a terminating slash or 
+			// else the link will not be resolved correctly.  (it will look like
+			// /url/path/to/somewhere/.. instead of /url/path/to/
+			if (absUrl.endsWith(FORWARD_SLASH + RELATIVE_PATH_SIG)) {
+				absUrl += FORWARD_SLASH;
+			}
+		}
+
+		// resolve relative path to absolute
+		absUrl = PathHelper.adjustPath(absUrl);
+		return absUrl;
+	}
+
+	private void initialize(String baseUrl, String docRoot) {
+		//
+		// Find out whether baes url is a url or file name
+		//
+		if ( URI.validScheme(baseUrl) ) {
+			try {
+				String temp = PathHelper.appendTrailingURLSlash(baseUrl);
+				fBaseUrl = new URL(temp);
+			}
+			catch (MalformedURLException mue) {
+				// it is a file based url
+				fBaseUrlString = baseUrl;
+			}
+		}
+		else {
+			// it is a file based url
+			fBaseUrlString = baseUrl;
+		}
+
+		// do the same for doc root
+		if (docRoot != null) {
+			if ( URI.validScheme(docRoot) ) {
+				try {
+					String temp = PathHelper.appendTrailingURLSlash(docRoot);
+					fDocRoot = new URL(temp);
+	
+				}
+				catch (MalformedURLException mue) {
+					// it is a file based url
+					fDocRootString = docRoot;
+				}
+			}
+			else {
+				// it is a file based url
+				fDocRootString = docRoot;
+			}
+		}
+	}
+
+	/**
+	 *  Convert the given url to a abolute url using the base url
+	 *  Input url can be of any othe following format
+	 * Absolute urls
+	 * --------------
+	 *  . http://www.foo.com/
+	 *  . http://www.foo.com
+	 *  . http://www.foo.com/folder
+	 *  . http://www.foo.com/folder/
+	 *  . http://www.foo.com/index.html
+	 *  . http://www.foo.com/folder/index.html
+	 *  . http://www.foo.com/folder/../index.html
+	 * Url relative  on document root
+	 * -------------------------
+	 *  . /
+	 *  . /folder
+	 *  . /index.html
+	 *  . /folder/index.html
+	 *  . /folder/../index.html
+	 * 
+	 * Self relative
+	 * -------------------------
+	 *  . index.html
+	 *  . ./index.html
+	 *  . ../index.html
+	 *  . folder/index.html
+	 *  . folder/../index.html
+	 *
+	 * file based url adds another dimension since it doesn't have a document root
+	 * So uses fDocRoot if provided
+	 */
+	public String toAbsolute(String url) {
+		String absUrl = url;
+
+		URL newUrl = null;
+		// try to see it is a absolute url
+		if ( URI.validScheme(url) ) {
+			try {
+				newUrl = new URL(url);
+			}
+			catch (MalformedURLException me) {
+			}
+		}
+		// if document root is provided
+		// do special case
+		if (newUrl == null) {
+			if (fDocRoot == null && fDocRootString == null) {
+				// try to check relative url
+				absUrl = convert(url, fBaseUrl, fBaseUrlString);
+			}
+			else {
+				// doc root is provided
+				// if the url is a doc root based use doc root
+
+				if (url.startsWith("/"))//$NON-NLS-1$
+					absUrl = convert(url, fDocRoot, fDocRootString);
+				else
+					absUrl = convert(url, fBaseUrl, fBaseUrlString);
+
+			}
+		}
+		return absUrl;
+	}
+
+	/**
+	 * Convert from an absolute url to relative url based on the given url
+	 * Both are assumed to be ablsute url
+	 */
+	public String toRelative(String url, String documentUrl) {
+		String output = url;
+		// assuming both urls are absolute
+		try {
+			URL inputUrl = new URL(url);
+			URL docUrl = new URL(documentUrl);
+			// filter out if the urls are not fro the same domain
+			if (!inputUrl.getProtocol().equals(docUrl.getProtocol()) || !inputUrl.getHost().equals(docUrl.getHost()) || inputUrl.getPort() != docUrl.getPort())
+				return output;
+			// both url are coming form the same place
+			// strip off the domain parts
+			String inputName = inputUrl.getFile();
+			String docName = docUrl.getFile();
+			output = PathHelper.convertToRelative(inputName, docName);
+		}
+		catch (MalformedURLException me) {
+			output = null;
+		}
+		return output;
+	}
+
+//	/*
+//	 */
+//	protected  String getScheme(String passedSpec) {
+//		if (passedSpec != null) {
+//	
+//			final String spec = passedSpec.trim();
+//			
+//			// protocol(scheme) java.net.URL can recognize is detemined
+//			// what URL.getURLStreamHandle(protocol) returns.
+//			// in Eclipse, only :
+//			//		valoader:
+//			//		file:
+//			//		jar:
+//			//		platform:
+//			//		doc:
+//			//		ftp:
+//			//		gopher:
+//			//		http:
+//			//		mailto:
+//			//		netdoc:
+//			//		systemresource:
+//			//		verbatim:
+//			// can recognize. Otherwise, it throws exception...
+//			// the following code comes from hpbcom/url.cpp, Url::parse_protocol()
+//			final int limit = spec.length();
+//			String newProtocol = null;
+//			for( int index = 0; index < limit; index++ ) {
+//				final char p = spec.charAt(index);
+//				if (p == '/') {
+//					break;
+//				}
+//				if (p == ':') {
+//					newProtocol = spec.substring(0, index);
+//					break;
+//				}
+//			}
+//			// copy end
+//		
+//			 			
+//			if (newProtocol != null && newProtocol.length() > 1 ) {
+//				for ( int i = 0; i < PROTOCOLS.length; i++ ){
+//					if (newProtocol.compareToIgnoreCase(PROTOCOLS[i]) == 0) {
+//						// matched;
+//						return newProtocol;
+//					}
+//				}
+//			}
+//		}
+//		//i don't know what is newProtocol. Ask URI class itself.
+//		//No, calling URI again is very slow. So, just give up
+//		//URI uri = new URI(spec);
+//		//return uri.getScheme();
+//		return null;//$NON-NLS-1$
+//	}
+}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/util/TextChangeCompatibility.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/util/TextChangeCompatibility.java
index 04a75e8..7f93a4f 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/util/TextChangeCompatibility.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/util/TextChangeCompatibility.java
@@ -1,14 +1,3 @@
-/*******************************************************************************
- * 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.xsd.ui.internal.refactor.util;
 
 import org.eclipse.core.runtime.Assert;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RefactorGroupActionDelegate.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RefactorGroupActionDelegate.java
index 29c5678..983a838 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RefactorGroupActionDelegate.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RefactorGroupActionDelegate.java
@@ -1,14 +1,3 @@
-/*******************************************************************************
- * 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.xsd.ui.internal.refactor.wizard;
 
 import org.eclipse.emf.ecore.resource.ResourceSet;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RefactorGroupSubMenu.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RefactorGroupSubMenu.java
index 77780e1..e402607 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RefactorGroupSubMenu.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RefactorGroupSubMenu.java
@@ -1,14 +1,3 @@
-/*******************************************************************************
- * 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.xsd.ui.internal.refactor.wizard;
 
 import java.util.ArrayList;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/IXSDSearchConstants.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/IXSDSearchConstants.java
index acb6488..b65703a 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/IXSDSearchConstants.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/IXSDSearchConstants.java
@@ -1,18 +1,8 @@
-/*******************************************************************************
- * 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.xsd.ui.internal.search;
 
 import org.eclipse.wst.common.core.search.pattern.QualifiedName;
 
+// todo ... move
 public interface IXSDSearchConstants {
 	
 	public static final String XMLSCHEMA_NAMESPACE = "http://www.w3.org/2001/XMLSchema";
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/XSDSearchContributor.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/XSDSearchContributor.java
index 24e8040..3fdc553 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/XSDSearchContributor.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/XSDSearchContributor.java
@@ -1,14 +1,3 @@
-/*******************************************************************************
- * 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.xsd.ui.internal.search;
 
 import java.util.ArrayList;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/XSDSearchParticipant.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/XSDSearchParticipant.java
index c148c95..ae0b1a6 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/XSDSearchParticipant.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/XSDSearchParticipant.java
@@ -1,14 +1,3 @@
-/*******************************************************************************
- * 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.xsd.ui.internal.search;
 
 import org.eclipse.wst.common.core.search.pattern.SearchPattern;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/XSDSearchQuery.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/XSDSearchQuery.java
deleted file mode 100644
index 4dfefbd..0000000
--- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/XSDSearchQuery.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * 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.xsd.ui.internal.search;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.wst.common.core.search.pattern.QualifiedName;
-import org.eclipse.wst.common.core.search.pattern.SearchPattern;
-import org.eclipse.wst.common.core.search.scope.SearchScope;
-import org.eclipse.wst.common.ui.internal.search.AbstractSearchQuery;
-import org.eclipse.wst.xml.core.internal.search.XMLComponentDeclarationPattern;
-import org.eclipse.wst.xml.core.internal.search.XMLComponentReferencePattern;
-
-public class XSDSearchQuery extends AbstractSearchQuery
-{   
-  public final static int LIMIT_TO_DECLARATIONS = 1;
-  public final static int LIMIT_TO_REFERENCES   = 2;  
-  
-  int fLimitTo = 0;
-  IFile fContextFile;
-  QualifiedName fElementQName;
-  QualifiedName fTypeName;
-  
-  public XSDSearchQuery(String pattern, IFile file, QualifiedName elementQName, QualifiedName typeName, int limitTo, SearchScope scope, String scopeDescription)
-  {
-    super(pattern, scope, scopeDescription);
-    fLimitTo = limitTo;
-    fContextFile = file;
-    fElementQName = elementQName;
-    fTypeName = typeName;
-  }
-
-  protected SearchPattern createSearchPattern(QualifiedName typeName)
-  {
-    if (fLimitTo == LIMIT_TO_DECLARATIONS)
-    {  
-      return new XMLComponentDeclarationPattern(fContextFile, fElementQName, fTypeName);
-    }  
-    else if (fLimitTo == LIMIT_TO_REFERENCES)
-    {
-      return new XMLComponentReferencePattern(fContextFile, fElementQName, fTypeName);
-    }  
-    return null;
-  }
-}
-
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/BaseGroupActionDelegate.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/BaseGroupActionDelegate.java
deleted file mode 100644
index 41a7e02..0000000
--- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/BaseGroupActionDelegate.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * 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.xsd.ui.internal.search.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IMenuCreator;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.events.MenuAdapter;
-import org.eclipse.swt.events.MenuEvent;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.MenuItem;
-import org.eclipse.ui.IEditorActionDelegate;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-
-public abstract class BaseGroupActionDelegate implements IObjectActionDelegate, IEditorActionDelegate, IMenuCreator
-{
-    protected ISelection fSelection;
-    private IAction fDelegateAction;
-    // whether to re-fill the menu (reset on selection change)
-    private boolean fFillMenu = true;
-    protected IWorkbenchPart workbenchPart; 
-    
-
-    public BaseGroupActionDelegate() 
-    {
-      System.out.println("Create ActionDelegate " + this.getClass().getName());
-    }
-    
-    /*
-     * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction, org.eclipse.ui.IWorkbenchPart)
-     */
-    public void setActivePart(IAction action, IWorkbenchPart targetPart) {
-        workbenchPart = targetPart;
-    }
-    /* (non-Javadoc)
-     * @see org.eclipse.jface.action.IMenuCreator#dispose()
-     */
-    public void dispose() {
-        // nothing to do
-    }
-    /* (non-Javadoc)
-     * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Control)
-     */
-    public Menu getMenu(Control parent) {
-        // never called
-        return null;
-    }
-    /* (non-Javadoc)
-     * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Menu)
-     */
-    public Menu getMenu(Menu parent) {
-        //Create the new menu. The menu will get filled when it is about to be shown. see fillMenu(Menu).
-        Menu menu = new Menu(parent);
-        /**
-         * Add listener to repopulate the menu each time
-         * it is shown because MenuManager.update(boolean, boolean) 
-         * doesn't dispose pulldown ActionContribution items for each popup menu.
-         */
-        menu.addMenuListener(new MenuAdapter() {
-            public void menuShown(MenuEvent e) {
-                if (fFillMenu) {
-                    Menu m = (Menu)e.widget;
-                    MenuItem[] items = m.getItems();
-                    for (int i=0; i < items.length; i++) {
-                        items[i].dispose();
-                    }
-                    fillMenu(m);
-                    fFillMenu = false;
-                }
-            }
-        });
-        return menu;
-    }
-
-    /*
-     * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
-     */
-    public void run(IAction action) {
-        // Never called because we become a menu.
-    }
-    
-    /*
-     * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
-     */
-    public void selectionChanged(IAction action, ISelection selection) {
-        fDelegateAction = action;
-        updateWith(selection);
-        
-    }
-
-  public void setActiveEditor(IAction action, IEditorPart targetEditor) {
-        workbenchPart = targetEditor;
-        fDelegateAction = action;
-        if (targetEditor != null && targetEditor.getEditorSite() != null && targetEditor.getEditorSite().getSelectionProvider() != null) {
-            updateWith(targetEditor.getEditorSite().getSelectionProvider().getSelection());
-        }
-        
-    }
-  
-    public void updateWith(ISelection selection) {
-        fSelection = selection;
-        if (fDelegateAction != null) {
-            boolean enable = false;
-            if (selection != null) {
-                if (selection instanceof ITextSelection) {
-                    //if (((ITextSelection) selection).getLength() > 0) {
-                        enable = true;
-                    //}
-                }
-                else if(selection instanceof IStructuredSelection ){
-                    enable = !selection.isEmpty();
-                }
-            }
-            // enable action
-            fDelegateAction.setEnabled(enable);
-            
-            // fill submenu
-            fFillMenu = true;
-            fDelegateAction.setMenuCreator(this);
-            
-            
-        }
-        
-    }
-    
-    
-  protected abstract void fillMenu(Menu menu);
-    
-   
-  
-}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/CompositeActionGroup.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/CompositeActionGroup.java
deleted file mode 100644
index 0bc530a..0000000
--- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/CompositeActionGroup.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-// TODO... open a bugzilla to get the JDT class moved to non internal platform
-package org.eclipse.wst.xsd.ui.internal.search.actions;
-
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.util.Assert;
-
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.actions.ActionContext;
-import org.eclipse.ui.actions.ActionGroup;
-
-public class CompositeActionGroup extends ActionGroup {
-
-    private ActionGroup[] fGroups;
-    
-    public CompositeActionGroup() {
-    }
-    
-    public CompositeActionGroup(ActionGroup[] groups) {
-        setGroups(groups);
-    }
-
-    protected void setGroups(ActionGroup[] groups) {
-        Assert.isTrue(fGroups == null);
-        Assert.isNotNull(groups);
-        fGroups= groups;        
-    }
-        
-    public ActionGroup get(int index) {
-        if (fGroups == null)
-            return null;
-        return fGroups[index];
-    }
-    
-    public void addGroup(ActionGroup group) {
-        if (fGroups == null) {
-            fGroups= new ActionGroup[] { group };
-        } else {
-            ActionGroup[] newGroups= new ActionGroup[fGroups.length + 1];
-            System.arraycopy(fGroups, 0, newGroups, 0, fGroups.length);
-            newGroups[fGroups.length]= group;
-            fGroups= newGroups;
-        }
-    }
-    
-    public void dispose() {
-        super.dispose();
-        if (fGroups == null)
-            return;
-        for (int i= 0; i < fGroups.length; i++) {
-            fGroups[i].dispose();
-        }
-    }
-
-    public void fillActionBars(IActionBars actionBars) {
-        super.fillActionBars(actionBars);
-        if (fGroups == null)
-            return;
-        for (int i= 0; i < fGroups.length; i++) {
-            fGroups[i].fillActionBars(actionBars);
-        }
-    }
-
-    public void fillContextMenu(IMenuManager menu) {
-        super.fillContextMenu(menu);
-        if (fGroups == null)
-            return;
-        for (int i= 0; i < fGroups.length; i++) {
-            fGroups[i].fillContextMenu(menu);
-        }
-    }
-
-    public void setContext(ActionContext context) {
-        super.setContext(context);
-        if (fGroups == null)
-            return;
-        for (int i= 0; i < fGroups.length; i++) {
-            fGroups[i].setContext(context);
-        }
-    }
-
-    public void updateActionBars() {
-        super.updateActionBars();
-        if (fGroups == null)
-            return;
-        for (int i= 0; i < fGroups.length; i++) {
-            fGroups[i].updateActionBars();
-        }
-    }
-}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/DeclarationsSearchGroup.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/DeclarationsSearchGroup.java
deleted file mode 100644
index 05308e2..0000000
--- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/DeclarationsSearchGroup.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * 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.xsd.ui.internal.search.actions;
-
-// TODO.. fill in the content
-public class DeclarationsSearchGroup
-{
-}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/FindAction.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/FindAction.java
deleted file mode 100644
index 187d894..0000000
--- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/FindAction.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * 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.xsd.ui.internal.search.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.ui.IEditorPart;
-
-public class FindAction extends Action implements ISelectionChangedListener
-{
-  IEditorPart editor;
-  
-  protected FindAction(IEditorPart editor)
-  {
-    this.editor = editor;
-  }
-  
-  public void selectionChanged(SelectionChangedEvent event)
-  {
-    // TODO Auto-generated method stub
-    
-  }
-}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/FindReferencesAction.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/FindReferencesAction.java
deleted file mode 100644
index 32d642a..0000000
--- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/FindReferencesAction.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * 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.xsd.ui.internal.search.actions;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.search.ui.NewSearchUI;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.wst.common.core.search.pattern.QualifiedName;
-import org.eclipse.wst.common.core.search.scope.SearchScope;
-import org.eclipse.wst.common.core.search.scope.WorkspaceSearchScope;
-import org.eclipse.wst.xsd.ui.internal.search.IXSDSearchConstants;
-import org.eclipse.wst.xsd.ui.internal.search.XSDSearchQuery;
-import org.eclipse.xsd.XSDComplexTypeDefinition;
-import org.eclipse.xsd.XSDElementDeclaration;
-import org.eclipse.xsd.XSDNamedComponent;
-import org.eclipse.xsd.XSDSimpleTypeDefinition;
-
-public class FindReferencesAction extends FindAction
-{
-  public FindReferencesAction(IEditorPart editor)
-  {   
-    super(editor);
-  }
-  
-  public void setActionDefinitionId(String string)
-  {
-    
-  }
-
-  public void run()
-  {
-    String pattern = "";
-    if (editor != null)
-    {  
-      IEditorInput input = editor.getEditorInput();
-      if (input instanceof IFileEditorInput)
-      {
-        IFileEditorInput fileEditorInput = (IFileEditorInput)input;               
-        IFile file = fileEditorInput.getFile();        
-        ISelectionProvider provider = (ISelectionProvider)editor.getAdapter(ISelectionProvider.class);
-        if (provider != null)
-        {  
-          ISelection selection = provider.getSelection();
-          if (selection != null && selection instanceof IStructuredSelection)
-          {
-            IStructuredSelection s = (IStructuredSelection)selection;
-            Object o = s.getFirstElement();
-            if (o != null && o instanceof XSDNamedComponent)
-            {  
-              XSDNamedComponent c = (XSDNamedComponent)o;
-              QualifiedName metaName = null;
-              if (c instanceof XSDComplexTypeDefinition)
-              {             
-                metaName = IXSDSearchConstants.COMPLEX_TYPE_META_NAME;
-              }
-              else if (c instanceof XSDSimpleTypeDefinition)
-              {
-                metaName = IXSDSearchConstants.SIMPLE_TYPE_META_NAME;
-              }  
-              else if (c instanceof XSDElementDeclaration)
-              {
-               metaName = IXSDSearchConstants.ELEMENT_META_NAME; 
-              }  
-              QualifiedName elementQName = new QualifiedName(c.getTargetNamespace(), c.getName());
-              System.out.println("name" + c.getTargetNamespace() + ":" + c.getName());
-              SearchScope scope = new WorkspaceSearchScope();
-              String scopeDescription = "Workspace";    
-              XSDSearchQuery searchQuery= new XSDSearchQuery(pattern, file, elementQName, metaName, XSDSearchQuery.LIMIT_TO_REFERENCES, scope, scopeDescription);    
-              NewSearchUI.activateSearchResultView();
-              NewSearchUI.runQueryInBackground(searchQuery);
-            }
-          }
-        }
-      }
-    }
-  }     
-}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/ImplementorsSearchGroup.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/ImplementorsSearchGroup.java
deleted file mode 100644
index 0efc8ff..0000000
--- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/ImplementorsSearchGroup.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * 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.xsd.ui.internal.search.actions;
-
-// TODO... fill in the content
-public class ImplementorsSearchGroup
-{
-}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/OccurrencesSearchGroup.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/OccurrencesSearchGroup.java
deleted file mode 100644
index 463e241..0000000
--- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/OccurrencesSearchGroup.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * 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.xsd.ui.internal.search.actions;
-
-// TODO... fill in the content
-public class OccurrencesSearchGroup
-{
-}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/ReferencesSearchGroup.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/ReferencesSearchGroup.java
deleted file mode 100644
index 8acc38f..0000000
--- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/ReferencesSearchGroup.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*******************************************************************************
- * 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.xsd.ui.internal.search.actions;
-
-import java.util.List;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.util.Assert;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchSite;
-import org.eclipse.ui.texteditor.ITextEditorActionConstants;
-
-/**
- * Action group that adds the search for references actions to a
- * context menu and the global menu bar.
- * 
- * <p>
- * This class may be instantiated; it is not intended to be subclassed.
- * </p>
- * 
- * @since 2.0
- */
-public class ReferencesSearchGroup extends SearchGroup  {
-
-    private static final String MENU_TEXT= "References...";//SearchMessages.group_references; 
-
-    private IWorkbenchSite fSite;
-    private IEditorPart fEditor;
-    private IActionBars fActionBars;
-    
-    private String fGroupId;
-    
-    private FindReferencesAction fFindReferencesAction;
-    private FindReferencesAction fFindReferencesInProjectAction;
-    private FindReferencesAction fFindReferencesInHierarchyAction;
-    private FindReferencesAction fFindReferencesInWorkingSetAction;
-
-
-    /**
-     * Note: This constructor is for internal use only. Clients should not call this constructor.
-     * @param editor
-     */
-    public ReferencesSearchGroup(IEditorPart editor) {
-        Assert.isNotNull(editor);
-        fEditor= editor;
-        fSite= fEditor.getSite();
-        fGroupId= ITextEditorActionConstants.GROUP_FIND;
-
-        fFindReferencesAction= new FindReferencesAction(editor);
-        fFindReferencesAction.setText("Workspace");
-        fFindReferencesAction.setActionDefinitionId("SEARCH_REFERENCES_IN_WORKSPACE");
-        //fEditor.setAction("SearchReferencesInWorkspace", fFindReferencesAction); //$NON-NLS-1$
-
-        fFindReferencesInProjectAction= new FindReferencesAction(fEditor);
-        fFindReferencesInProjectAction.setText("Project");        
-        fFindReferencesInProjectAction.setActionDefinitionId("SEARCH_REFERENCES_IN_PROJECT");
-        //fEditor.setAction("SearchReferencesInProject", fFindReferencesInProjectAction); //$NON-NLS-1$
-
-        fFindReferencesInHierarchyAction= new FindReferencesAction(fEditor);
-        fFindReferencesInHierarchyAction.setText("Hierarchy");          
-        fFindReferencesInHierarchyAction.setActionDefinitionId("SEARCH_REFERENCES_IN_HIERARCHY");
-        //fEditor.setAction("SearchReferencesInHierarchy", fFindReferencesInHierarchyAction); //$NON-NLS-1$
-        
-        fFindReferencesInWorkingSetAction= new FindReferencesAction(fEditor);
-        fFindReferencesInWorkingSetAction.setText("Working Set...");         
-        fFindReferencesInWorkingSetAction.setActionDefinitionId(".SEARCH_REFERENCES_IN_WORKING_SET");
-        //fEditor.setAction("SearchReferencesInWorkingSet", fFindReferencesInWorkingSetAction); //$NON-NLS-1$
-    }
-
-    /*
-    private void registerAction(SelectionDispatchAction action, ISelectionProvider provider, ISelection selection) {
-        action.update(selection);
-        provider.addSelectionChangedListener(action);
-    }*/
-
-    /**
-     * Note: this method is for internal use only. Clients should not call this method.
-     * 
-     * @return the menu label
-     */
-    protected String getName() {
-        return MENU_TEXT;
-    }
-    
-    public void fillActions(List list)
-    {
-      list.add(fFindReferencesAction);
-      list.add(fFindReferencesInHierarchyAction);
-      list.add(fFindReferencesInProjectAction);
-      list.add(new Separator());
-      list.add(fFindReferencesInWorkingSetAction);
-    }
-    
-    /* (non-Javadoc)
-     * Method declared in ActionGroup
-     */
-    public void fillActionBars(IActionBars actionBars) {
-        Assert.isNotNull(actionBars);
-        super.fillActionBars(actionBars);
-        fActionBars= actionBars;
-        updateGlobalActionHandlers();
-    }
-
-    
-    private void addAction(IAction action, IMenuManager manager) {
-        if (action.isEnabled()) {
-            manager.add(action);
-        }
-    }
-
-    /*
-    private void addWorkingSetAction(IWorkingSet[] workingSets, IMenuManager manager) {
-        FindAction action;
-        if (fEditor != null)
-            action= new WorkingSetFindAction(fEditor, new FindReferencesInWorkingSetAction(fEditor, workingSets), SearchUtil.toString(workingSets));
-        else
-            action= new WorkingSetFindAction(fSite, new FindReferencesInWorkingSetAction(fSite, workingSets), SearchUtil.toString(workingSets));
-        action.update(getContext().getSelection());
-        addAction(action, manager);
-    }
-    */
-    
-    /* (non-Javadoc)
-     * Method declared on ActionGroup.
-     */
-    public void fillContextMenu(IMenuManager manager) {
-      /*
-        MenuManager javaSearchMM= new MenuManager(getName(), IContextMenuConstants.GROUP_SEARCH);
-        addAction(fFindReferencesAction, javaSearchMM);
-        addAction(fFindReferencesInProjectAction, javaSearchMM);
-        addAction(fFindReferencesInHierarchyAction, javaSearchMM);
-        
-        javaSearchMM.add(new Separator());
-        
-        Iterator iter= SearchUtil.getLRUWorkingSets().sortedIterator();
-        while (iter.hasNext()) {
-            addWorkingSetAction((IWorkingSet[]) iter.next(), javaSearchMM);
-        }
-        addAction(fFindReferencesInWorkingSetAction, javaSearchMM);
-
-        if (!javaSearchMM.isEmpty())
-            manager.appendToGroup(fGroupId, javaSearchMM);
-        */    
-    }
-    
-    /* 
-     * Overrides method declared in ActionGroup
-     */
-    public void dispose() {
-        ISelectionProvider provider= fSite.getSelectionProvider();
-        if (provider != null) {
-            disposeAction(fFindReferencesAction, provider);
-            disposeAction(fFindReferencesInProjectAction, provider);
-            disposeAction(fFindReferencesInHierarchyAction, provider);
-            disposeAction(fFindReferencesInWorkingSetAction, provider);
-        }
-        fFindReferencesAction= null;
-        fFindReferencesInProjectAction= null;
-        fFindReferencesInHierarchyAction= null;
-        fFindReferencesInWorkingSetAction= null;
-        updateGlobalActionHandlers();
-        super.dispose();
-    }
-
-    private void updateGlobalActionHandlers() {
-      /*
-        if (fActionBars != null) {
-            fActionBars.setGlobalActionHandler(JdtActionConstants.FIND_REFERENCES_IN_WORKSPACE, fFindReferencesAction);
-            fActionBars.setGlobalActionHandler(JdtActionConstants.FIND_REFERENCES_IN_PROJECT, fFindReferencesInProjectAction);
-            fActionBars.setGlobalActionHandler(JdtActionConstants.FIND_REFERENCES_IN_HIERARCHY, fFindReferencesInHierarchyAction);
-            fActionBars.setGlobalActionHandler(JdtActionConstants.FIND_REFERENCES_IN_WORKING_SET, fFindReferencesInWorkingSetAction);
-        }
-        */
-    }
-
-    private void disposeAction(ISelectionChangedListener action, ISelectionProvider provider) {
-        if (action != null)
-            provider.removeSelectionChangedListener(action);
-    }
-}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/SearchGroup.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/SearchGroup.java
deleted file mode 100644
index 18071ba..0000000
--- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/SearchGroup.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * 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.xsd.ui.internal.search.actions;
-
-import java.util.List;
-import org.eclipse.ui.actions.ActionGroup;
-
-public abstract class SearchGroup extends ActionGroup
-{
-  public abstract void fillActions(List list);
-}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/XSDSearchActionGroup.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/XSDSearchActionGroup.java
deleted file mode 100644
index e601f8c..0000000
--- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/XSDSearchActionGroup.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * 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.xsd.ui.internal.search.actions;
-
-import org.eclipse.jface.util.Assert;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.actions.ActionGroup;
-
-public class XSDSearchActionGroup extends ActionGroup
-{
-  private ReferencesSearchGroup fReferencesGroup;
-  private DeclarationsSearchGroup fDeclarationsGroup;
-  private ImplementorsSearchGroup fImplementorsGroup;
-  private OccurrencesSearchGroup fOccurrencesGroup;
-  private IEditorPart fEditor;
-
-  public XSDSearchActionGroup(IEditorPart editor)
-  {
-    Assert.isNotNull(editor);
-    fEditor = editor;
-    fReferencesGroup = new ReferencesSearchGroup(editor);
-    fDeclarationsGroup = new DeclarationsSearchGroup();
-    fImplementorsGroup = new ImplementorsSearchGroup();
-    fOccurrencesGroup = new OccurrencesSearchGroup();
-  }
-}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/XSDSearchDeclarationsGroupActionDelegate.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/XSDSearchDeclarationsGroupActionDelegate.java
deleted file mode 100644
index e57b1e5..0000000
--- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/XSDSearchDeclarationsGroupActionDelegate.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * 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.xsd.ui.internal.search.actions;
-
-import org.eclipse.swt.widgets.Menu;
-
-//org.eclipse.wst.xsd.ui.internal.search.actions.XSDSearchGroupActionDelegate
-public class XSDSearchDeclarationsGroupActionDelegate extends BaseGroupActionDelegate
-{
-    protected void fillMenu(Menu menu) {
-      // TODO... fill in the content
-      /*
-        if (fSelection == null) {
-            return;
-        }          
-        XSDSearchActionGroup refactorMenuGroup = new XSDSearchActionGroup(null);
-        XSDSearchGroupSubMenu subMenu = new XSDSearchGroupSubMenu(refactorMenuGroup);
-        subMenu.fill(menu, -1);
-      */          
-    }  
-}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/XSDSearchGroupSubMenu.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/XSDSearchGroupSubMenu.java
deleted file mode 100644
index 65d6ff4..0000000
--- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/XSDSearchGroupSubMenu.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * 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.xsd.ui.internal.search.actions;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.ui.actions.CompoundContributionItem;
-
-public class XSDSearchGroupSubMenu extends CompoundContributionItem
-{
-  SearchGroup searchActionGroup;
-
-  public XSDSearchGroupSubMenu(SearchGroup refactorMenuGroup)
-  {
-    super();
-    searchActionGroup = refactorMenuGroup;
-  }
-
-  public XSDSearchGroupSubMenu(String id)
-  {
-    super(id);
-  }
-
-  protected IContributionItem[] getContributionItems()
-  {
-    ArrayList actionsList = new ArrayList();
-    ArrayList contribList = new ArrayList();
-    searchActionGroup.fillActions(actionsList);
-    if (actionsList != null && !actionsList.isEmpty())
-    {
-      for (Iterator iter = actionsList.iterator(); iter.hasNext();)
-      {
-        Object o = iter.next();
-        if (o instanceof IAction)
-        {  
-          IAction action = (IAction)o;
-          contribList.add(new ActionContributionItem(action));
-        }
-        else if (o instanceof Separator)
-        {
-          Separator separator = (Separator)o;
-          contribList.add(separator);
-        }  
-      }
-    }
-    else
-    {
-      Action dummyAction = new Action("XSDSeachActionGroup_no_refactoring_available")
-      {
-        // dummy inner class; no methods
-      };
-      dummyAction.setEnabled(false);
-      contribList.add(new ActionContributionItem(dummyAction));
-    }
-    return (IContributionItem[]) contribList.toArray(new IContributionItem[contribList.size()]);        
-  }
-}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/XSDSearchReferencesGroupActionDelegate.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/XSDSearchReferencesGroupActionDelegate.java
deleted file mode 100644
index 6466896..0000000
--- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/search/actions/XSDSearchReferencesGroupActionDelegate.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * 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.xsd.ui.internal.search.actions;
-
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.ui.IEditorPart;
-
-//org.eclipse.wst.xsd.ui.internal.search.actions.XSDSearchGroupActionDelegate
-public class XSDSearchReferencesGroupActionDelegate extends BaseGroupActionDelegate
-{
-    protected void fillMenu(Menu menu) {
-      try
-      {
-        if (fSelection == null) {
-            return;
-        }  
-        if (workbenchPart instanceof IEditorPart)
-        {            
-          ReferencesSearchGroup referencesGroup = new ReferencesSearchGroup((IEditorPart)workbenchPart);
-          XSDSearchGroupSubMenu subMenu = new XSDSearchGroupSubMenu(referencesGroup);
-          subMenu.fill(menu, -1);
-        }  
-      }
-      catch (Exception e)
-      {
-        e.printStackTrace();
-      }
-    }  
-}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-validation/org/eclipse/wst/xsd/ui/internal/validation/ValidateAction.java b/bundles/org.eclipse.wst.xsd.ui/src-validation/org/eclipse/wst/xsd/ui/internal/validation/ValidateAction.java
index a489005..f6f85a1 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-validation/org/eclipse/wst/xsd/ui/internal/validation/ValidateAction.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-validation/org/eclipse/wst/xsd/ui/internal/validation/ValidateAction.java
@@ -22,7 +22,6 @@
 import org.eclipse.wst.validation.internal.provisional.core.IMessage;
 import org.eclipse.wst.xml.core.internal.validation.core.ValidationMessage;
 import org.eclipse.wst.xml.core.internal.validation.core.ValidationReport;
-import org.eclipse.wst.xsd.ui.internal.XSDEditorPlugin;
 
 
 
@@ -114,8 +113,8 @@
       {
         if (!valoutcome.isValid)
         {
-          String message = XSDEditorPlugin.getXSDString(_UI_DIALOG_XML_SCHEMA_INVALID_TEXT);
-          String title = XSDEditorPlugin.getXSDString(_UI_DIALOG_XML_SCHEMA_INVALID_TITLE);
+          String message = XSDValidatorManager.getString(_UI_DIALOG_XML_SCHEMA_INVALID_TEXT);
+          String title = XSDValidatorManager.getString(_UI_DIALOG_XML_SCHEMA_INVALID_TITLE);
           if (internalErrorMessage != null)
           {
             message = message + "\n" + internalErrorMessage;
@@ -124,14 +123,14 @@
         } 
         else if (valoutcome.isValid && valoutcome.hasMessages)
         {
-          String message = XSDEditorPlugin.getXSDString(_UI_DIALOG_XML_SCHEMA_VALID_WITH_WARNINGS);
-          String title = XSDEditorPlugin.getXSDString(_UI_DIALOG_XML_SCHEMA_VALID_TITLE);
+          String message = XSDValidatorManager.getString(_UI_DIALOG_XML_SCHEMA_VALID_WITH_WARNINGS);
+          String title = XSDValidatorManager.getString(_UI_DIALOG_XML_SCHEMA_VALID_TITLE);
           openWarningDialog(title, message);
         } 
         else
         {
-          String message = XSDEditorPlugin.getXSDString(_UI_DIALOG_XML_SCHEMA_VALID_TEXT);
-          String title = XSDEditorPlugin.getXSDString(_UI_DIALOG_XML_SCHEMA_VALID_TITLE);
+          String message = XSDValidatorManager.getString(_UI_DIALOG_XML_SCHEMA_VALID_TEXT);
+          String title = XSDValidatorManager.getString(_UI_DIALOG_XML_SCHEMA_VALID_TITLE);
           //String message = validator.isGrammarEncountered() ?
           //                 XSDValidatorManager.getString("_UI_THE_XML_FILE_IS_VALID") :
           //                XSDValidatorManager.getString("_UI_THE_XML_FILE_IS_WELL_FORMED") +
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-validation/org/eclipse/wst/xsd/ui/internal/validation/XSDValidatorManager.java b/bundles/org.eclipse.wst.xsd.ui/src-validation/org/eclipse/wst/xsd/ui/internal/validation/XSDValidatorManager.java
new file mode 100644
index 0000000..d19ad1c
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-validation/org/eclipse/wst/xsd/ui/internal/validation/XSDValidatorManager.java
@@ -0,0 +1,173 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2004 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.xsd.ui.internal.validation;
+
+import java.io.IOException;
+import java.net.URL;
+import java.text.MessageFormat;
+
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IPluginDescriptor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.eclipse.wst.xsd.core.internal.XSDCorePlugin;
+
+public class XSDValidatorManager extends AbstractUIPlugin 
+{
+  protected static XSDValidatorManager plugin;
+ 
+  public XSDValidatorManager(IPluginDescriptor descriptor) 
+  {
+    super(descriptor);
+    plugin = this;
+
+  }
+
+  /**
+   * Copy the w3c XMLSchema.dtd and datatypes.dtd into the plugin metadata directory
+   * for validation purposes
+   */
+  public void startup()
+  {
+    //ModelManagerPlugin plugin = (ModelManagerPlugin) Platform.getPlugin(ModelManagerPlugin.ID);
+    //modelManager = plugin.getModelManager();
+  }
+
+  //private static ModelManager modelManager;
+  //public static ModelManager getModelManager()
+  //{
+  //  return modelManager;
+  //}
+
+  /**
+   * Get the Install URL
+   */
+  public static URL getInstallURL()
+  {
+    return XSDCorePlugin.getDefault().getDescriptor().getInstallURL();
+  }
+
+  /**
+   * Return the plugin physical directory location
+   */
+  public static IPath getPluginLocation()
+  {
+    try 
+    {
+      IPath installPath = new Path(getInstallURL().toExternalForm()).removeTrailingSeparator();
+      String installStr = Platform.asLocalURL(new URL(installPath.toString())).getFile();
+      return new Path(installStr);
+    } 
+    catch (IOException e) 
+    {
+
+    }
+    return null;
+  }
+
+  /**
+   * Get the metadata directory for this plugin
+   */
+  //public static String getMetaDataDirectory()
+  //{
+  //  return getPlugin().getStateLocation().toOSString();
+  //}
+
+  /** 
+   *  Get the one xmlschema package.
+   */
+//   public XMLSchemaPackage getXMLSchemaPackage()
+//   {
+//     return xmlschemaPackage;
+//   }
+
+//   /** 
+//    *  Get the one xmlschema factory.
+//    */
+//   public XMLSchemaFactory getXMLSchemaFactory()
+//   {
+//     return (XMLSchemaFactory)xmlschemaPackage.getEFactoryInstance();
+//   }
+
+  /**
+   * Get the singleton instance.
+   */
+  public static XSDValidatorManager getInstance()
+  {
+    return plugin;
+  }
+
+
+  //public static Image getXSDImage(String iconName)
+  //{
+  //  return getPlugin().getImage(iconName);
+  //}
+
+  /**
+   * Get resource string
+   */
+  public static String getString(String key)
+  {
+    return XSDCorePlugin.getDefault().getDescriptor().getResourceBundle().getString(key);
+  }
+
+  /**
+   * Get resource string
+   */
+  public static String getString(String key, String arg0)
+  {
+    return MessageFormat.format(getString(key), new Object [] { arg0 });
+  }
+  
+  /**
+   * Get resource string
+   */
+  public static String getString(String key, String arg0, String arg1)
+  {
+    return MessageFormat.format(getString(key), new Object [] { arg0, arg1 });
+  }
+  public IWorkspace getWorkspace()
+  {
+    return ResourcesPlugin.getWorkspace();
+  }
+
+  //public static Shell getShell() 
+  //{	
+  //  return getPlugin().getWorkbench().getActiveWorkbenchWindow().getShell();
+  //}
+
+  /**
+   * Get the xml schema default namespace prefix
+   */
+  //public String getXMLSchemaPrefix()
+  //{
+  //  return getPreferenceStore().getString(CONST_XSD_DEFAULT_PREFIX_TEXT);
+  //}
+
+  /**
+   * Get the xml schema language qualification
+   */
+  //public boolean isQualifyXMLSchemaLanguage()
+  //{
+  //  return getPreferenceStore().getBoolean(CONST_XSD_LANGUAGE_QUALIFY);
+  //}
+  
+
+  
+  public static final String CONST_XSD_DEFAULT_PREFIX_TEXT = "org.eclipse.wst.xmlschema.xsdDefaultPrefixText";
+  public static final String CONST_XSD_LANGUAGE_QUALIFY = "org.eclipse.wst.xmlschema.xsdQualify";
+  
+
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDActionBarContributor.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDActionBarContributor.java
index 50f2e5b..3c90b21 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDActionBarContributor.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDActionBarContributor.java
@@ -14,6 +14,7 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.ResourceBundle;
+
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.action.IMenuManager;
@@ -38,6 +39,7 @@
 import org.eclipse.wst.xsd.ui.internal.actions.ISchemaEditorActionConstants;
 import org.eclipse.wst.xsd.ui.internal.actions.ReloadDependenciesAction;
 import org.eclipse.wst.xsd.ui.internal.actions.SourcePageActionContributor;
+import org.eclipse.wst.xsd.ui.internal.refactor.actions.RefactorActionGroup;
 
 public class XSDActionBarContributor extends MultiPageEditorActionBarContributor
 {
@@ -51,7 +53,7 @@
 
   protected RetargetAction retargetReloadDependenciesAction;
   private RetargetTextEditorAction renameElementAction = null;
-  //private IMenuManager refactorMenu = null;
+  private IMenuManager refactorMenu = null;
  
   /**
    * Constructor for XSDActionBarContributor.
@@ -75,8 +77,8 @@
 	renameElementAction.setActionDefinitionId("org.eclipse.wst.xsd.ui.refactor.rename.element"); // TODO: add to contstants command id
 		
 	// the refactor menu, add the menu itself to add all refactor actions
-	//refactorMenu = new MenuManager(XSDEditorPlugin.getXSDString("refactoring.menu.label"), RefactorActionGroup.MENU_ID); //TODO: externalize string
-	//refactorMenu.add(this.renameElementAction);
+	refactorMenu = new MenuManager(XSDEditorPlugin.getXSDString("refactoring.menu.label"), RefactorActionGroup.MENU_ID); //TODO: externalize string
+	refactorMenu.add(this.renameElementAction);
   }
 
   protected void updateActions()
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDEditor.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDEditor.java
index e22fa37..c8ec401 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDEditor.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDEditor.java
@@ -660,7 +660,7 @@
 		if (key == ISelectionProvider.class) {
 			result = xsdSelectionManager;
 		}
-        else if (IPropertySheetPage.class.equals(key)) {
+		if (IPropertySheetPage.class.equals(key)) {
 			fPropertySheetPage = new XSDTabbedPropertySheetPage(this);
 
 			((XSDTabbedPropertySheetPage) fPropertySheetPage).setXSDModelAdapterFactory(xsdModelAdapterFactory);
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDMenuListener.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDMenuListener.java
index 090992a..61093be 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDMenuListener.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDMenuListener.java
@@ -11,6 +11,7 @@
 package org.eclipse.wst.xsd.ui.internal;
 import java.util.ArrayList;
 import java.util.List;
+
 import org.eclipse.jface.action.Action;
 import org.eclipse.jface.action.IMenuListener;
 import org.eclipse.jface.action.IMenuManager;
@@ -22,6 +23,7 @@
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.ui.IWorkbenchActionConstants;
 import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.ActionContext;
 import org.eclipse.wst.xsd.ui.internal.actions.AddEnumsAction;
 import org.eclipse.wst.xsd.ui.internal.actions.AddModelGroupAction;
 import org.eclipse.wst.xsd.ui.internal.actions.BackAction;
@@ -42,6 +44,7 @@
 import org.eclipse.wst.xsd.ui.internal.actions.XSDEditNamespacesAction;
 import org.eclipse.wst.xsd.ui.internal.graph.model.Category;
 import org.eclipse.wst.xsd.ui.internal.provider.CategoryAdapter;
+import org.eclipse.wst.xsd.ui.internal.refactor.actions.RefactorActionGroup;
 import org.eclipse.wst.xsd.ui.internal.util.TypesHelper;
 import org.eclipse.wst.xsd.ui.internal.util.XSDDOMHelper;
 import org.eclipse.xsd.XSDCompositor;
@@ -64,7 +67,7 @@
   protected XSDSchema xsdSchema;
   protected boolean isReadOnly;
   protected Object sourceContext;
-  //private RefactorActionGroup fRefactorMenuGroup;
+  private RefactorActionGroup fRefactorMenuGroup;
 
   /**
    * Constructor for XSDMenuListener.
@@ -150,7 +153,7 @@
     updateXSDSchema();
     if (xsdSchema == null)
     {
-      manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));    
+      manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
       return;
     }
     
@@ -324,15 +327,9 @@
     {
       manager.add(deleteAction);
     }
-
-    manager.add(new Separator());       
-    manager.add(new Separator("refactoring_slot")); 
-    manager.add(new Separator());       
-    manager.add(new Separator("search_slot"));       
-    manager.add(new Separator());
     
     // insertion point for popupMenus extension
-    manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS)); 
+    manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));    
   }
 
   protected String getBuiltInStringQName()
@@ -1678,13 +1675,11 @@
   }
   
   protected void addRefactorMenuGroup(IMenuManager manager){
-    /*
 	  	fRefactorMenuGroup = new RefactorActionGroup(selectionProvider, getXSDSchema());
      	ActionContext context= new ActionContext(selectionProvider.getSelection());
     	fRefactorMenuGroup.setContext(context);
     	fRefactorMenuGroup.fillContextMenu(manager);
     	fRefactorMenuGroup.setContext(null);
-    */    
   }
 
   protected void addCreateAnnotationAction(IMenuManager manager, String elementTag, String label, List attributes, Element parent, Node relativeNode)
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/DeleteAction.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/DeleteAction.java
index 5495c98..d2e4c23 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/DeleteAction.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/DeleteAction.java
@@ -11,6 +11,7 @@
 package org.eclipse.wst.xsd.ui.internal.actions;
 
 import java.util.Iterator;
+
 import org.eclipse.jface.viewers.ISelectionProvider;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.StructuredSelection;
@@ -19,10 +20,26 @@
 import org.eclipse.wst.xml.core.internal.document.DocumentImpl;
 import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
 import org.eclipse.wst.xsd.ui.internal.XSDEditorPlugin;
+import org.eclipse.wst.xsd.ui.internal.refactor.delete.BaseGlobalCleanup;
+import org.eclipse.wst.xsd.ui.internal.refactor.delete.GlobalAttributeCleanup;
+import org.eclipse.wst.xsd.ui.internal.refactor.delete.GlobalAttributeGroupCleanup;
+import org.eclipse.wst.xsd.ui.internal.refactor.delete.GlobalElementCleanup;
+import org.eclipse.wst.xsd.ui.internal.refactor.delete.GlobalGroupCleanup;
+import org.eclipse.wst.xsd.ui.internal.refactor.delete.GlobalSimpleOrComplexTypeCleanup;
+import org.eclipse.wst.xsd.ui.internal.refactor.delete.XSDExternalFileCleanup;
+import org.eclipse.wst.xsd.ui.internal.util.TypesHelper;
 import org.eclipse.wst.xsd.ui.internal.util.XSDDOMHelper;
+import org.eclipse.xsd.XSDAttributeDeclaration;
+import org.eclipse.xsd.XSDAttributeGroupDefinition;
 import org.eclipse.xsd.XSDConcreteComponent;
+import org.eclipse.xsd.XSDElementDeclaration;
+import org.eclipse.xsd.XSDImport;
+import org.eclipse.xsd.XSDInclude;
+import org.eclipse.xsd.XSDModelGroupDefinition;
 import org.eclipse.xsd.XSDParticle;
+import org.eclipse.xsd.XSDRedefine;
 import org.eclipse.xsd.XSDSchema;
+import org.eclipse.xsd.XSDTypeDefinition;
 import org.eclipse.xsd.util.XSDConstants;
 import org.w3c.dom.Node;
 
@@ -144,7 +161,6 @@
   protected boolean cleanupReferences(Node deletedNode)
   {
     boolean refresh = false;
-    /*
     XSDConcreteComponent comp = getSchema().getCorrespondingComponent(deletedNode);
     
     if (comp instanceof XSDInclude ||
@@ -211,7 +227,7 @@
       {
         cleanHelper.visitSchema(getSchema());
       }
-    }*/
+    }
     return refresh;
   }
 
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dialogs/types/xml/XMLComponentFinder.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dialogs/types/xml/XMLComponentFinder.java
index 9c1bf72..d73adcb 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dialogs/types/xml/XMLComponentFinder.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dialogs/types/xml/XMLComponentFinder.java
@@ -10,7 +10,16 @@
  *******************************************************************************/
 package org.eclipse.wst.xsd.ui.internal.dialogs.types.xml;
 
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IContainer;
 import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
 
 /**
  * this thing parsers xml artifacts and picks out the specified components attributes
@@ -21,8 +30,12 @@
     public static final int ENTIRE_WORKSPACE_SCOPE = 1;
 
     protected IFile currentIFile;
+	protected List validExtensions;			// List of extensions as String objects
+	protected List excludeFiles;			// List of files (full path) as String objects
 
 	public XMLComponentFinder() {
+		validExtensions = new ArrayList();
+		excludeFiles = new ArrayList();
 	}
     
     /*
@@ -33,4 +46,69 @@
     public void setFile(IFile file) {
         currentIFile = file;
     }
+    
+    public void setValidExtensions(List newExtensions) {
+        validExtensions.clear();
+        validExtensions.addAll(newExtensions);
+    }
+
+    public void addExcludeFiles(List newExclude) {
+        excludeFiles.addAll(newExclude);
+    }
+
+    /*
+     * Returns a List of absolute file locations. For example
+     * "D:\files\....\file.xsd"
+     */
+    protected List getEnclosingProjectFiles() {
+        List files = new ArrayList();
+        
+        if (currentIFile != null) {
+            IProject project = currentIFile.getProject();
+            try {
+                traverseIContainer(project, validExtensions, excludeFiles, files);
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+        
+        return files;
+    }
+
+    protected List getWorkspaceFiles() {
+        List files = new ArrayList();
+        IWorkspaceRoot iwr = ResourcesPlugin.getWorkspace().getRoot();
+        IProject[] projects = iwr.getProjects();
+
+        try {
+            for (int index = 0; index < projects.length; index++) {
+                traverseIContainer(projects[index], validExtensions, excludeFiles, files);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        return files;
+    }
+
+    /**
+     * Returns a List of absolute file locations. For example
+     * "D:\files\....\file.xsd"
+     */
+    protected void traverseIContainer(IContainer container, List extensions, List excludeFiles, List list) throws Exception {
+        IResource[] children = container.members();
+
+        for (int index = 0; index < children.length; index++) {
+            if (children[index] instanceof IFolder) {
+                traverseIContainer((IFolder) children[index], extensions, excludeFiles, list);
+            } else if (children[index] instanceof IFile) {
+                IFile file = (IFile) children[index];
+                String fileName = file.getLocation().toOSString();
+                String ext = file.getFileExtension();
+                if (extensions.contains(ext) && !excludeFiles.contains(fileName)) {
+                    list.add(file.getLocation());
+                }
+            }
+        }
+    }
 }
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dialogs/types/xml/XMLComponentSelectionProvider.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dialogs/types/xml/XMLComponentSelectionProvider.java
index 5e6bd78..aef0a01 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dialogs/types/xml/XMLComponentSelectionProvider.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dialogs/types/xml/XMLComponentSelectionProvider.java
@@ -19,7 +19,6 @@
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.wst.common.core.search.pattern.QualifiedName;
 import org.eclipse.wst.xsd.ui.internal.dialogs.types.common.IComponentList;
 import org.eclipse.wst.xsd.ui.internal.dialogs.types.common.IComponentSelectionProvider;
 
@@ -53,8 +52,8 @@
             if (treeObject.getName().equals(dataItem.getAttributeInfo("name"))) {
                 // If the existing data item and the new data item have the same names
                 if (treeObject.getXMLComponentSpecification().size() > 0) {
-                    QualifiedName metaName = ((XMLComponentSpecification) treeObject.getXMLComponentSpecification().get(0)).getMetaName();
-                    if (metaName.equals(dataItem.getMetaName())) {
+                    String existingPath = ((XMLComponentSpecification) treeObject.getXMLComponentSpecification().get(0)).getTagPath();
+                    if (existingPath.equals(dataItem.getTagPath())) {
                         // If they are the same 'type' of items (according to the path value)
                         containingTreeObject = treeObject;
                         foundMatch = true;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dialogs/types/xml/XMLComponentSpecification.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dialogs/types/xml/XMLComponentSpecification.java
index 321a5a3..04c2546 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dialogs/types/xml/XMLComponentSpecification.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dialogs/types/xml/XMLComponentSpecification.java
@@ -11,21 +11,19 @@
 package org.eclipse.wst.xsd.ui.internal.dialogs.types.xml;
 
 import java.util.Hashtable;
-import org.eclipse.wst.common.core.search.pattern.QualifiedName;
 
 /*
  * Simple class which keeps track of attribute information.
  * This class is basically a Hashtable with convenience methods.
  */
 public class XMLComponentSpecification {
-  
-    QualifiedName metaName;    
+    String tagPath;
     Hashtable hashtable;
     String targetNamespace;
     String fileLocation;
     
-    public XMLComponentSpecification(QualifiedName metaName) {
-        this.metaName = metaName;
+    public XMLComponentSpecification(String path) {
+        this.tagPath = path;
         hashtable = new Hashtable();
     }
     
@@ -37,8 +35,8 @@
         return hashtable.get(attribute);
     }
     
-    public QualifiedName getMetaName() {
-        return metaName;
+    public String getTagPath() {
+        return tagPath;
     }
     
     public String getTargetNamespace() {
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dialogs/types/xml/XMLQuickScan.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dialogs/types/xml/XMLQuickScan.java
new file mode 100644
index 0000000..30409c2
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dialogs/types/xml/XMLQuickScan.java
@@ -0,0 +1,130 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2004 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.xsd.ui.internal.dialogs.types.xml;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.xml.sax.Attributes;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.XMLReader;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ *
+ */
+public class XMLQuickScan {
+  
+	/*
+	 * Returns information about matches encountered
+     * based on the criteria provided. 
+	 */
+  public static List getTagInfo(String fullFilePath, List paths, List attributes) {
+    XSDGlobalElementTypeContentHandler handler = new XSDGlobalElementTypeContentHandler();
+    handler.stringTagPaths = paths;
+    handler.searchAttributes = attributes;
+    handler.fileLocation = fullFilePath;
+
+    ClassLoader prevClassLoader = Thread.currentThread().getContextClassLoader();
+    
+    try {
+        IPath path = new Path(fullFilePath);
+    	FileInputStream inputStream = new FileInputStream(new File(path.toOSString()));
+    	
+        
+//      SAXParser  sparser = SAXParserFactory.newInstance().newSAXParser();
+//      XMLReader reader = sparser.getXMLReader();
+        
+        // Line below is a hack to get XMLReader working
+        Thread.currentThread().setContextClassLoader(XMLQuickScan.class.getClassLoader());
+        
+    	XMLReader reader = org.xml.sax.helpers.XMLReaderFactory.createXMLReader();
+    	reader.setContentHandler(handler);
+    	reader.parse(new InputSource(inputStream));
+    }
+    catch (Exception e) {
+    	e.printStackTrace();
+    }
+    finally {
+      Thread.currentThread().setContextClassLoader(prevClassLoader);
+    }
+    return handler.getSearchAttributeValues();
+  }
+  
+  public static class XSDGlobalElementTypeContentHandler extends DefaultHandler {
+  	protected List stringTagPaths;
+  	protected List searchAttributes;
+  	private List matchingTags = new ArrayList();
+  	private String targetNamespace = "";
+  	private String fileLocation;
+
+  	StringBuffer currentPath = new StringBuffer();
+  	
+    public void startElement(String uri, String localName, String qName, Attributes attributes)  throws SAXException {
+    	currentPath.append("/" + localName);
+    	
+    	// Search for targetNamespace if we haven't encountered it yet.
+    	if (targetNamespace.equals("")) {
+	        int nAttributes = attributes.getLength();
+	        for (int i = 0; i < nAttributes; i++)
+	        {
+	          if (attributes.getLocalName(i).equals("targetNamespace"))
+	          {
+	            targetNamespace = attributes.getValue(i);
+	            break;
+	          }
+	        }
+    	}
+    	
+    	// Search for the path
+    	for (int index = 0; index < stringTagPaths.size(); index++) {
+    		String path = (String) stringTagPaths.get(index);
+    		if (currentPath.length() == path.length() && currentPath.toString().equals(path)) {
+    			// Found a path match
+    			createTagInfo(attributes, (String[]) searchAttributes.get(index));
+    		}
+    	}
+    }
+    
+    public void endElement(String uri, String localName, String qName) throws SAXException {
+    	int slashIndex = currentPath.lastIndexOf("/");
+    	currentPath.delete(slashIndex, currentPath.length());
+    }
+    
+    /*
+     * Information about a tag is stored in a TagInfo class.
+     */
+    private void createTagInfo(Attributes attributes, String[] attributesToSearch) {
+    	XMLComponentSpecification spec = new XMLComponentSpecification(currentPath.toString());
+    	
+//    	tagInfo.addAttributeInfo("name", attributes.getValue("name"));
+    	for (int index = 0; index < attributesToSearch.length; index++) {
+    		String attrString = (String) attributesToSearch[index];
+    		String value = attributes.getValue(attrString);
+    		if (value != null) {
+    			spec.addAttributeInfo(attrString, value);
+    		}
+    	}
+    	spec.setTargetNamespace(targetNamespace);
+    	spec.setFileLocation(fileLocation);
+    	matchingTags.add(spec);
+    }
+        
+    public List getSearchAttributeValues() {
+    	return matchingTags;
+    }
+  }
+}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dialogs/types/xsd/XSDComponentFinder.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dialogs/types/xsd/XSDComponentFinder.java
index e52e53d..7f9fc7d 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dialogs/types/xsd/XSDComponentFinder.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dialogs/types/xsd/XSDComponentFinder.java
@@ -13,83 +13,58 @@
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.wst.common.core.search.SearchEngine;
-import org.eclipse.wst.common.core.search.SearchMatch;
-import org.eclipse.wst.common.core.search.SearchParticipant;
-import org.eclipse.wst.common.core.search.SearchPlugin;
-import org.eclipse.wst.common.core.search.pattern.QualifiedName;
-import org.eclipse.wst.common.core.search.pattern.SearchPattern;
-import org.eclipse.wst.common.core.search.scope.ProjectSearchScope;
-import org.eclipse.wst.common.core.search.scope.SearchScope;
-import org.eclipse.wst.common.core.search.scope.WorkspaceSearchScope;
-import org.eclipse.wst.common.core.search.util.CollectingSearchRequestor;
-import org.eclipse.wst.xml.core.internal.search.XMLComponentDeclarationPattern;
+
+import org.eclipse.core.runtime.Path;
 import org.eclipse.wst.xsd.ui.internal.dialogs.types.xml.XMLComponentFinder;
-import org.eclipse.wst.xsd.ui.internal.dialogs.types.xml.XMLComponentSpecification;
-import org.eclipse.wst.xsd.ui.internal.search.IXSDSearchConstants;
+import org.eclipse.wst.xsd.ui.internal.dialogs.types.xml.XMLQuickScan;
 
 public class XSDComponentFinder extends XMLComponentFinder {    
     public XSDComponentFinder() {
-    }
-    
-    protected void findTypes(SearchEngine searchEngine, List list, int scope, QualifiedName metaName)
-    {      
-      SearchScope searchScope = new WorkspaceSearchScope();
-      if (scope == ENCLOSING_PROJECT_SCOPE)
-      {
-        searchScope = new ProjectSearchScope(currentIFile.getProject().getLocation());
-      }       
-      try {
-          CollectingSearchRequestor requestor = new CollectingSearchRequestor();
-          
-          XMLComponentDeclarationPattern pattern = new XMLComponentDeclarationPattern(new QualifiedName("*", "*"), metaName, SearchPattern.R_PATTERN_MATCH);
-          SearchParticipant particpant = SearchPlugin.getDefault().getSearchParticipant("org.eclipse.wst.xsd.search.XSDSearchParticipant");
-          
-          // for now we assume that we only want to include the xsd related participant
-          // that way we don't get SearchMatches for things withing WSDL files
-          // TODO... rethink this... since folks should be capable of changing the 'xsd' search participant impl
-          // without killing this logic
-          SearchParticipant[] participants = { particpant };          
-          searchEngine.search(pattern, requestor, participants, searchScope, new NullProgressMonitor());
-          
-          for (Iterator i = requestor.getResults().iterator(); i.hasNext(); )
-          {
-            SearchMatch match = (SearchMatch)i.next();
-            XMLComponentSpecification spec = new XMLComponentSpecification(metaName);
-            spec.setFileLocation(match.getFile().getLocation().toString());
-            Object o = match.map.get("name");
-            if (o != null && o instanceof QualifiedName)
-            {  
-              QualifiedName qualifiedName = (QualifiedName)o;
-              if (qualifiedName.getLocalName() != null)
-              {  
-                spec.addAttributeInfo("name", qualifiedName.getLocalName());
-                spec.setTargetNamespace(qualifiedName.getNamespace());
-                list.add(spec);
-              }  
-            }  
-          }  
-      } catch (CoreException e) {
-        e.printStackTrace();
-          //status.add(e.getStatus());
-      }      
+        validExtensions.add("xsd");
     }
     
     public List getWorkbenchResourceComponents(int scope) {
-      // TODO... by making this method return a list... we're cutting off any chance provide asynchronous friendly
-      // behaviour where we populate the list and refresh the dialog after every few updates or seconds
-      // returning a list makes this an all or nothing deal
-      //
-      List list = new ArrayList();
-      SearchEngine searchEngine = new SearchEngine();
-      // TODO... we need a way to combine these into a single search!!
-      // we can make this search 2X faster by doing so
-      // either we should combine COMPLEX_TYPE_META_NAME and SIMPLE_TYPE_META_NAME into a single TYPE_META_NAME
-      // or we'll need to introduce a way to 'OR' SearchPatterns ... which may be tricky!
-      findTypes(searchEngine, list, scope, IXSDSearchConstants.COMPLEX_TYPE_META_NAME);
-      findTypes(searchEngine, list, scope, IXSDSearchConstants.SIMPLE_TYPE_META_NAME);    
-      return list;
+        List components = new ArrayList();
+        List filePaths = new ArrayList();
+        
+        // We don't want to search through the current file we're working on.
+        if (currentIFile != null) {
+            excludeFiles.add(currentIFile.getLocation().toOSString());
+        }
+        
+        // Find files matching the search criteria specified in List extensions and
+        // List excludeFiles.
+        switch (scope) {
+        case ENCLOSING_PROJECT_SCOPE:
+            filePaths = getEnclosingProjectFiles();
+            break;
+            
+        case ENTIRE_WORKSPACE_SCOPE:
+            filePaths = getWorkspaceFiles();
+            break;
+            
+        default:            
+            break;
+        }
+        
+        // Search for the components in each of the files specified in the path.
+        List paths = new ArrayList();
+        paths.add("/schema/complexType");
+        paths.add("/schema/simpleType");
+        
+        List attributes = new ArrayList();
+        String[] nameAttr = new String[1];
+        nameAttr[0] = "name";
+        attributes.add(nameAttr);
+        attributes.add(nameAttr);
+
+        Iterator pathsIterator = filePaths.iterator();
+        while (pathsIterator.hasNext()) {
+//           String stringPath = ((Path) pathsIterator.next()).toOSString();
+           String stringPath = ((Path) pathsIterator.next()).toString();
+           components.addAll(XMLQuickScan.getTagInfo(stringPath, paths, attributes));
+        }
+        
+        return components;
     }
 }
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dialogs/types/xsd/XSDComponentSelectionProvider.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dialogs/types/xsd/XSDComponentSelectionProvider.java
index 8aa8178..d1936d4 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dialogs/types/xsd/XSDComponentSelectionProvider.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dialogs/types/xsd/XSDComponentSelectionProvider.java
@@ -22,7 +22,6 @@
 import org.eclipse.wst.xsd.ui.internal.dialogs.types.xml.XMLComponentFinder;
 import org.eclipse.wst.xsd.ui.internal.dialogs.types.xml.XMLComponentSelectionProvider;
 import org.eclipse.wst.xsd.ui.internal.dialogs.types.xml.XMLComponentSpecification;
-import org.eclipse.wst.xsd.ui.internal.search.IXSDSearchConstants;
 import org.eclipse.wst.xsd.ui.internal.util.TypesHelper;
 import org.eclipse.wst.xsd.ui.internal.util.XSDDOMHelper;
 import org.eclipse.xsd.XSDComplexTypeDefinition;
@@ -119,10 +118,10 @@
         Iterator itemsIterator = comps.iterator();
         while (itemsIterator.hasNext()) {
             XMLComponentSpecification tagItem = (XMLComponentSpecification) itemsIterator.next();
-            if (tagItem.getMetaName() == IXSDSearchConstants.COMPLEX_TYPE_META_NAME) {
+            if (tagItem.getTagPath().equals("/schema/complexType")) {
                 complex.add(tagItem);
             }               
-            else if (tagItem.getMetaName() == IXSDSearchConstants.SIMPLE_TYPE_META_NAME) {
+            else if (tagItem.getTagPath().equals("/schema/simpleType")) {
                 simple.add(tagItem);
             }
         }
@@ -160,7 +159,7 @@
             Object item = it.next();
             String itemString = item.toString();
             
-            XMLComponentSpecification builtInTypeItem = new XMLComponentSpecification(null);
+            XMLComponentSpecification builtInTypeItem = new XMLComponentSpecification("BUILT_IN_SIMPLE_TYPE");
             builtInTypeItem.addAttributeInfo("name", itemString);
             builtInTypeItem.setTargetNamespace(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001);
 //            String normalizedFile = getNormalizedLocation(schema.getSchemaLocation());
@@ -292,11 +291,11 @@
             if (proceed) {
                 XMLComponentSpecification typeItem =  null;
                 if (showComplexTypes && item instanceof XSDComplexTypeDefinition) {
-                    typeItem = new XMLComponentSpecification(IXSDSearchConstants.COMPLEX_TYPE_META_NAME);
+                    typeItem = new XMLComponentSpecification("/schema/complexType");
                     typeItem.addAttributeInfo("name", ((XSDComplexTypeDefinition) item).getName());
                 }
                 else if (item instanceof XSDSimpleTypeDefinition) {
-                    typeItem = new XMLComponentSpecification(IXSDSearchConstants.SIMPLE_TYPE_META_NAME);
+                    typeItem = new XMLComponentSpecification("/schema/simpleType");
                     typeItem.addAttributeInfo("name", ((XSDSimpleTypeDefinition) item).getName());
                 }
                 
@@ -321,13 +320,13 @@
         public Image getImage(Object element) {
             XMLComponentTreeObject specification = (XMLComponentTreeObject) element;
             XMLComponentSpecification spec = (XMLComponentSpecification) specification.getXMLComponentSpecification().get(0);
-            if (spec.getMetaName() == IXSDSearchConstants.COMPLEX_TYPE_META_NAME) {
+            if (spec.getTagPath().equals("/schema/complexType")) {
                 return XSDEditorPlugin.getXSDImage("icons/XSDComplexType.gif");
             }
-            else if (spec.getMetaName() == IXSDSearchConstants.SIMPLE_TYPE_META_NAME) {
+            else if (spec.getTagPath().equals("/schema/simpleType")) {
                 return XSDEditorPlugin.getXSDImage("icons/XSDSimpleType.gif");
             }
-            else if (spec.getMetaName() == null) {
+            else if (spec.getTagPath().equals("BUILT_IN_SIMPLE_TYPE")) {
                 return XSDEditorPlugin.getXSDImage("icons/XSDSimpleType.gif");
             }
     
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dialogs/types/xsd/XSDSetTypeHelper.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dialogs/types/xsd/XSDSetTypeHelper.java
index 5c45e43..a5b8e17 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dialogs/types/xsd/XSDSetTypeHelper.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dialogs/types/xsd/XSDSetTypeHelper.java
@@ -14,16 +14,16 @@
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
+
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Platform;
-import org.eclipse.wst.common.core.search.pattern.QualifiedName;
 import org.eclipse.wst.common.uriresolver.internal.util.URIHelper;
 import org.eclipse.wst.xsd.ui.internal.actions.CreateElementAction;
 import org.eclipse.wst.xsd.ui.internal.actions.DOMAttribute;
 import org.eclipse.wst.xsd.ui.internal.dialogs.types.xml.XMLComponentSpecification;
-import org.eclipse.wst.xsd.ui.internal.refactor.rename.XSDExternalFileCleanup;
+import org.eclipse.wst.xsd.ui.internal.refactor.delete.XSDExternalFileCleanup;
 import org.eclipse.wst.xsd.ui.internal.util.TypesHelper;
 import org.eclipse.wst.xsd.ui.internal.util.XSDDOMHelper;
 import org.eclipse.xsd.XSDImport;
@@ -59,7 +59,7 @@
         }
 
         if (!XSDDOMHelper.inputEquals(element, XSDConstants.UNION_ELEMENT_TAG, false))
-        {/*
+        {
             if (spec != null && spec.getTagPath().equals("**anonymous**"))
             {
               if (spec.getTagPath().equals("ANONYMOUS_SIMPLE_TYPE"))
@@ -79,7 +79,7 @@
               // element.removeAttribute(XSDConstants.TYPE_ATTRIBUTE);
               element.removeAttribute(property);
             }
-            else*/
+            else
             {
               XSDDOMHelper.updateElementToNotAnonymous(element);
               //element.setAttribute(XSDConstants.TYPE_ATTRIBUTE, typeObject.toString());
@@ -92,9 +92,9 @@
         
         // Get the new type --> typeObject
         if (spec != null) {
-            QualifiedName metaName = spec.getMetaName();
+            String itemType = spec.getTagPath();
            
-            if (metaName != null) {
+            if (!itemType.equals("BUILT_IN_SIMPLE_TYPE")) {
                 // Do an actual import if needed
                 XSDParser parser = new XSDParser();
                 parser.parse(spec.getFileLocation());
@@ -236,14 +236,14 @@
         // Referential integrity on old import
         // How can we be sure that if the newlocation is the same as the oldlocation
         // the file hasn't changed
-                
+        
         XSDSchema referencedSchema = xsdImport.getResolvedSchema();
         if (referencedSchema != null)
         {
           XSDExternalFileCleanup cleanHelper = new XSDExternalFileCleanup(referencedSchema);
           cleanHelper.visitSchema(xsdSchema);
         }
-         
+
         Element schemaElement = xsdSchema.getElement();
 
         // update the xmlns in the schema element first, and then update the import element next
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editpolicies/ComponentNameDirectEditManager.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editpolicies/ComponentNameDirectEditManager.java
index 03c23e6..5f25abc 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editpolicies/ComponentNameDirectEditManager.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/graph/editpolicies/ComponentNameDirectEditManager.java
@@ -14,7 +14,14 @@
 import org.eclipse.gef.GraphicalEditPart;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.wst.xsd.ui.internal.graph.editparts.TopLevelComponentEditPart;
+import org.eclipse.wst.xsd.ui.internal.refactor.rename.GlobalElementRenamer;
+import org.eclipse.wst.xsd.ui.internal.refactor.rename.GlobalGroupRenamer;
+import org.eclipse.wst.xsd.ui.internal.refactor.rename.GlobalSimpleOrComplexTypeRenamer;
+import org.eclipse.xsd.XSDElementDeclaration;
+import org.eclipse.xsd.XSDModelGroupDefinition;
 import org.eclipse.xsd.XSDNamedComponent;
+import org.eclipse.xsd.XSDTypeDefinition;
+import org.eclipse.xsd.util.XSDSwitch;
 
 
 
@@ -50,10 +57,8 @@
       this.name = name;
     }                                                              
 
-    public void run()       
-    { 
-      //TODO cs : revisit
-      /*                            
+    public void run()
+    {                             
       XSDSwitch xsdSwitch = new XSDSwitch()
       {                   
         public Object caseXSDTypeDefinition(XSDTypeDefinition object)
@@ -77,7 +82,7 @@
           return null;
         }
       };
-      xsdSwitch.doSwitch(component);*/ 
+      xsdSwitch.doSwitch(component); 
       component.setName(name);
       if (mySource instanceof TopLevelComponentEditPart)
       {
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/AttributePropertySource.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/AttributePropertySource.java
index b6413fe..0365346 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/AttributePropertySource.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/AttributePropertySource.java
@@ -12,6 +12,7 @@
 
 import java.util.ArrayList;
 import java.util.List;
+
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.views.properties.IPropertyDescriptor;
@@ -19,6 +20,7 @@
 import org.eclipse.ui.views.properties.PropertyDescriptor;
 import org.eclipse.ui.views.properties.TextPropertyDescriptor;
 import org.eclipse.wst.xsd.ui.internal.XSDEditorPlugin;
+import org.eclipse.wst.xsd.ui.internal.refactor.rename.GlobalAttributeRenamer;
 import org.eclipse.wst.xsd.ui.internal.util.XSDDOMHelper;
 import org.eclipse.xsd.XSDAttributeDeclaration;
 import org.eclipse.xsd.XSDConcreteComponent;
@@ -221,9 +223,8 @@
           {
             XSDAttributeDeclaration xsdAttributeDeclaration = (XSDAttributeDeclaration)comp;
             xsdAttributeDeclaration.setName((String)value);
-            //TODO : cs revisit
-            //GlobalAttributeRenamer renamer = new GlobalAttributeRenamer(xsdAttributeDeclaration, (String)value);
-            //renamer.visitSchema(xsdSchema);
+            GlobalAttributeRenamer renamer = new GlobalAttributeRenamer(xsdAttributeDeclaration, (String)value);
+            renamer.visitSchema(xsdSchema);
           }
         }
         element.setAttribute(XSDConstants.NAME_ATTRIBUTE, (String)value);
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/ComplexTypePropertySource.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/ComplexTypePropertySource.java
index aa358e6..0e759c1 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/ComplexTypePropertySource.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/ComplexTypePropertySource.java
@@ -12,15 +12,18 @@
 
 import java.util.ArrayList;
 import java.util.List;
+
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.views.properties.IPropertyDescriptor;
 import org.eclipse.ui.views.properties.IPropertySource;
 import org.eclipse.wst.xsd.ui.internal.XSDEditorPlugin;
 import org.eclipse.wst.xsd.ui.internal.actions.SetBaseTypeAction;
+import org.eclipse.wst.xsd.ui.internal.refactor.rename.GlobalSimpleOrComplexTypeRenamer;
 import org.eclipse.wst.xsd.ui.internal.util.XSDDOMHelper;
 import org.eclipse.xsd.XSDComplexTypeDefinition;
 import org.eclipse.xsd.XSDConcreteComponent;
+import org.eclipse.xsd.XSDNamedComponent;
 import org.eclipse.xsd.XSDSchema;
 import org.eclipse.xsd.util.XSDConstants;
 import org.w3c.dom.Element;
@@ -219,9 +222,8 @@
               {
 //                XSDComplexTypeDefinition ct = (XSDComplexTypeDefinition)comp;
 //                ct.setName(newValue);
-                //TODO : cs revisit
-                //GlobalSimpleOrComplexTypeRenamer renamer = new GlobalSimpleOrComplexTypeRenamer((XSDNamedComponent)comp, newValue);
-                //renamer.visitSchema(xsdSchema);
+                GlobalSimpleOrComplexTypeRenamer renamer = new GlobalSimpleOrComplexTypeRenamer((XSDNamedComponent)comp, newValue);
+                renamer.visitSchema(xsdSchema);
               }
             }
             element.setAttribute(XSDConstants.NAME_ATTRIBUTE, newValue);
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/DocumentationPropertySource.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/DocumentationPropertySource.java
index 0dfda24..06e9ef7 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/DocumentationPropertySource.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/DocumentationPropertySource.java
@@ -12,6 +12,7 @@
 
 import java.util.ArrayList;
 import java.util.List;
+
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.views.properties.IPropertyDescriptor;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/ElementPropertySource.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/ElementPropertySource.java
index 9f21082..65416ac 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/ElementPropertySource.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/ElementPropertySource.java
@@ -12,6 +12,7 @@
 
 import java.util.ArrayList;
 import java.util.List;
+
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.views.properties.IPropertyDescriptor;
@@ -19,9 +20,12 @@
 import org.eclipse.ui.views.properties.PropertyDescriptor;
 import org.eclipse.ui.views.properties.TextPropertyDescriptor;
 import org.eclipse.wst.xsd.ui.internal.XSDEditorPlugin;
+import org.eclipse.wst.xsd.ui.internal.refactor.rename.GlobalElementRenamer;
 import org.eclipse.wst.xsd.ui.internal.util.TypesHelper;
 import org.eclipse.wst.xsd.ui.internal.util.XSDDOMHelper;
 import org.eclipse.xsd.XSDConcreteComponent;
+import org.eclipse.xsd.XSDElementDeclaration;
+import org.eclipse.xsd.XSDNamedComponent;
 import org.eclipse.xsd.XSDSchema;
 import org.eclipse.xsd.util.XSDConstants;
 import org.w3c.dom.Attr;
@@ -326,13 +330,11 @@
           if (xsdSchema != null)
           {
             XSDConcreteComponent comp = xsdSchema.getCorrespondingComponent(element);
-            
-            // TODO cs : revisit
-            //if (comp != null && comp instanceof XSDElementDeclaration && comp.getContainer().equals(xsdSchema))
-            //{
-              //GlobalElementRenamer renamer = new GlobalElementRenamer((XSDNamedComponent)comp, newValue);
-              //renamer.visitSchema(xsdSchema);
-            //}
+            if (comp != null && comp instanceof XSDElementDeclaration && comp.getContainer().equals(xsdSchema))
+            {
+              GlobalElementRenamer renamer = new GlobalElementRenamer((XSDNamedComponent)comp, newValue);
+              renamer.visitSchema(xsdSchema);
+            }
           }
         }
       }
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/EnumerationPropertySource.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/EnumerationPropertySource.java
index 31b7d35..65124f7 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/EnumerationPropertySource.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/EnumerationPropertySource.java
@@ -12,6 +12,7 @@
 
 import java.util.ArrayList;
 import java.util.List;
+
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.views.properties.IPropertyDescriptor;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/GroupRefPropertySource.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/GroupRefPropertySource.java
index ffe87ae..0067c48 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/GroupRefPropertySource.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/GroupRefPropertySource.java
@@ -12,6 +12,7 @@
 
 import java.util.ArrayList;
 import java.util.List;
+
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.ui.views.properties.IPropertyDescriptor;
 import org.eclipse.ui.views.properties.IPropertySource;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/ImportPropertySource.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/ImportPropertySource.java
index 6172f69..cadd611 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/ImportPropertySource.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/ImportPropertySource.java
@@ -13,6 +13,7 @@
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
+
 import org.eclipse.core.resources.IFile;
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.swt.widgets.Display;
@@ -22,7 +23,7 @@
 import org.eclipse.ui.views.properties.TextPropertyDescriptor;
 import org.eclipse.wst.xsd.ui.internal.XSDEditorContextIds;
 import org.eclipse.wst.xsd.ui.internal.XSDEditorPlugin;
-import org.eclipse.wst.xsd.ui.internal.refactor.rename.XSDExternalFileCleanup;
+import org.eclipse.wst.xsd.ui.internal.refactor.delete.XSDExternalFileCleanup;
 import org.eclipse.wst.xsd.ui.internal.util.TypesHelper;
 import org.eclipse.wst.xsd.ui.internal.util.XSDSchemaHelper;
 import org.eclipse.xsd.XSDConcreteComponent;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/IncludePropertySource.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/IncludePropertySource.java
index d1e9e12..b5054ac 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/IncludePropertySource.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/IncludePropertySource.java
@@ -12,13 +12,14 @@
 
 import java.util.ArrayList;
 import java.util.List;
+
 import org.eclipse.core.resources.IFile;
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.views.properties.IPropertyDescriptor;
 import org.eclipse.ui.views.properties.IPropertySource;
 import org.eclipse.wst.xsd.ui.internal.XSDEditorPlugin;
-import org.eclipse.wst.xsd.ui.internal.refactor.rename.XSDExternalFileCleanup;
+import org.eclipse.wst.xsd.ui.internal.refactor.delete.XSDExternalFileCleanup;
 import org.eclipse.xsd.XSDConcreteComponent;
 import org.eclipse.xsd.XSDInclude;
 import org.eclipse.xsd.XSDSchema;
@@ -161,7 +162,7 @@
 
       XSDSchema referencedSchema = include.getResolvedSchema();
       if (referencedSchema != null)
-      {        
+      {
         XSDExternalFileCleanup cleanHelper = new XSDExternalFileCleanup(referencedSchema);
         cleanHelper.visitSchema(xsdSchema);
         
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/KeyrefPropertySource.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/KeyrefPropertySource.java
index f4fcab1..19e95ce 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/KeyrefPropertySource.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/KeyrefPropertySource.java
@@ -13,6 +13,7 @@
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
+
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.views.properties.IPropertyDescriptor;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/ModelGroupPropertySource.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/ModelGroupPropertySource.java
index 728e613..228860c 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/ModelGroupPropertySource.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/ModelGroupPropertySource.java
@@ -12,6 +12,7 @@
 
 import java.util.ArrayList;
 import java.util.List;
+
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.views.properties.IPropertyDescriptor;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/NamePropertySource.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/NamePropertySource.java
index 9c31405..bbfb786 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/NamePropertySource.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/NamePropertySource.java
@@ -12,6 +12,7 @@
 
 import java.util.ArrayList;
 import java.util.List;
+
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.views.properties.IPropertyDescriptor;
@@ -19,8 +20,13 @@
 import org.eclipse.ui.views.properties.PropertyDescriptor;
 import org.eclipse.ui.views.properties.TextPropertyDescriptor;
 import org.eclipse.wst.xsd.ui.internal.XSDEditorPlugin;
+import org.eclipse.wst.xsd.ui.internal.refactor.rename.GlobalAttributeGroupRenamer;
+import org.eclipse.wst.xsd.ui.internal.refactor.rename.GlobalGroupRenamer;
 import org.eclipse.wst.xsd.ui.internal.util.XSDDOMHelper;
+import org.eclipse.xsd.XSDAttributeGroupDefinition;
 import org.eclipse.xsd.XSDConcreteComponent;
+import org.eclipse.xsd.XSDModelGroupDefinition;
+import org.eclipse.xsd.XSDNamedComponent;
 import org.eclipse.xsd.XSDSchema;
 import org.eclipse.xsd.util.XSDConstants;
 
@@ -137,13 +143,11 @@
           if (xsdSchema != null)
           {
             XSDConcreteComponent comp = xsdSchema.getCorrespondingComponent(element);
-            
-            // TODO cs : revisit
-            //if (comp != null && comp instanceof XSDAttributeGroupDefinition && comp.getContainer().equals(xsdSchema))
-            //{
-            //  GlobalAttributeGroupRenamer renamer = new GlobalAttributeGroupRenamer((XSDNamedComponent)comp, (String)value);
-            //  renamer.visitSchema(xsdSchema);
-            //}
+            if (comp != null && comp instanceof XSDAttributeGroupDefinition && comp.getContainer().equals(xsdSchema))
+            {
+              GlobalAttributeGroupRenamer renamer = new GlobalAttributeGroupRenamer((XSDNamedComponent)comp, (String)value);
+              renamer.visitSchema(xsdSchema);
+            }
           }
           element.setAttribute(XSDConstants.NAME_ATTRIBUTE, (String)value);
           endRecording(element);
@@ -188,13 +192,12 @@
             // now rename any references to this element
             if (xsdSchema != null)
              {
-              // TODO cs : revisit
-              //XSDConcreteComponent comp = xsdSchema.getCorrespondingComponent(element);
-              //if (comp != null && comp instanceof XSDModelGroupDefinition && comp.getContainer().equals(xsdSchema))
-              //{
-              //  GlobalGroupRenamer renamer = new GlobalGroupRenamer((XSDNamedComponent)comp, newValue);
-              //  renamer.visitSchema(xsdSchema);
-              //}
+              XSDConcreteComponent comp = xsdSchema.getCorrespondingComponent(element);
+              if (comp != null && comp instanceof XSDModelGroupDefinition && comp.getContainer().equals(xsdSchema))
+              {
+                GlobalGroupRenamer renamer = new GlobalGroupRenamer((XSDNamedComponent)comp, newValue);
+                renamer.visitSchema(xsdSchema);
+              }
             }
             element.setAttribute(XSDConstants.NAME_ATTRIBUTE, newValue);
             endRecording(element);
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/NotationPropertySource.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/NotationPropertySource.java
index 829e192..573d83d 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/NotationPropertySource.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/NotationPropertySource.java
@@ -12,6 +12,7 @@
 
 import java.util.ArrayList;
 import java.util.List;
+
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.views.properties.IPropertyDescriptor;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/PatternPropertySource.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/PatternPropertySource.java
index c437e4c..38f166a 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/PatternPropertySource.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/PatternPropertySource.java
@@ -12,6 +12,7 @@
 
 import java.util.ArrayList;
 import java.util.List;
+
 import org.eclipse.jface.viewers.CellEditor;
 import org.eclipse.jface.viewers.DialogCellEditor;
 import org.eclipse.jface.viewers.Viewer;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/ReadOnlyPropertySource.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/ReadOnlyPropertySource.java
index 46ca063..0f5cb7f 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/ReadOnlyPropertySource.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/ReadOnlyPropertySource.java
@@ -12,6 +12,7 @@
 
 import java.util.ArrayList;
 import java.util.List;
+
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.views.properties.IPropertyDescriptor;
 import org.eclipse.ui.views.properties.IPropertySource;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/SchemaPropertySource.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/SchemaPropertySource.java
index 0ae4888..2d8b402 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/SchemaPropertySource.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/SchemaPropertySource.java
@@ -15,6 +15,7 @@
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
+
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.views.properties.IPropertyDescriptor;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/SimpleContentPropertySource.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/SimpleContentPropertySource.java
index 9df52c1..6b33262 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/SimpleContentPropertySource.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/SimpleContentPropertySource.java
@@ -12,6 +12,7 @@
 
 import java.util.ArrayList;
 import java.util.List;
+
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.views.properties.IPropertyDescriptor;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/SimpleRestrictPropertySource.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/SimpleRestrictPropertySource.java
index 49124a9..4d07c0b 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/SimpleRestrictPropertySource.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/SimpleRestrictPropertySource.java
@@ -13,6 +13,7 @@
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
+
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.views.properties.IPropertyDescriptor;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/SimpleTypeListPropertySource.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/SimpleTypeListPropertySource.java
index 17c4bef..b49ceb1 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/SimpleTypeListPropertySource.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/SimpleTypeListPropertySource.java
@@ -12,6 +12,7 @@
 
 import java.util.ArrayList;
 import java.util.List;
+
 import org.eclipse.jface.viewers.LabelProvider;
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.swt.widgets.Display;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/SimpleTypePropertySource.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/SimpleTypePropertySource.java
index 12d5da9..99885fa 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/SimpleTypePropertySource.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/SimpleTypePropertySource.java
@@ -12,6 +12,7 @@
 
 import java.util.ArrayList;
 import java.util.List;
+
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.views.properties.IPropertyDescriptor;
@@ -19,8 +20,10 @@
 import org.eclipse.ui.views.properties.PropertyDescriptor;
 import org.eclipse.ui.views.properties.TextPropertyDescriptor;
 import org.eclipse.wst.xsd.ui.internal.XSDEditorPlugin;
+import org.eclipse.wst.xsd.ui.internal.refactor.rename.GlobalSimpleOrComplexTypeRenamer;
 import org.eclipse.wst.xsd.ui.internal.util.XSDDOMHelper;
 import org.eclipse.xsd.XSDConcreteComponent;
+import org.eclipse.xsd.XSDNamedComponent;
 import org.eclipse.xsd.XSDSchema;
 import org.eclipse.xsd.XSDSimpleTypeDefinition;
 import org.eclipse.xsd.util.XSDConstants;
@@ -153,9 +156,8 @@
             if (comp != null && comp instanceof XSDSimpleTypeDefinition && comp.getContainer().equals(xsdSchema))
             {
 //                ((XSDNamedComponent)comp).setName(name);
-              // TODO CS : revisit
-              //GlobalSimpleOrComplexTypeRenamer renamer = new GlobalSimpleOrComplexTypeRenamer((XSDNamedComponent)comp, name);
-              //renamer.visitSchema(xsdSchema);
+              GlobalSimpleOrComplexTypeRenamer renamer = new GlobalSimpleOrComplexTypeRenamer((XSDNamedComponent)comp, name);
+              renamer.visitSchema(xsdSchema);
             }
           }
           element.setAttribute(XSDConstants.NAME_ATTRIBUTE, name);
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/SimpleTypeUnionPropertySource.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/SimpleTypeUnionPropertySource.java
index d66b32c..68584b4 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/SimpleTypeUnionPropertySource.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/SimpleTypeUnionPropertySource.java
@@ -13,6 +13,7 @@
 import java.util.ArrayList;
 import java.util.List;
 import java.util.StringTokenizer;
+
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.viewers.CellEditor;
 import org.eclipse.jface.viewers.DialogCellEditor;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/TypesPropertyDescriptor.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/TypesPropertyDescriptor.java
index 961be94..60e238a 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/TypesPropertyDescriptor.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/TypesPropertyDescriptor.java
@@ -11,6 +11,7 @@
 package org.eclipse.wst.xsd.ui.internal.properties;
 
 import java.util.List;
+
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.viewers.CellEditor;
 import org.eclipse.jface.viewers.DialogCellEditor;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/XPathPropertySource.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/XPathPropertySource.java
index 829dc16..9a5d893 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/XPathPropertySource.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/XPathPropertySource.java
@@ -12,6 +12,7 @@
 
 import java.util.ArrayList;
 import java.util.List;
+
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.views.properties.IPropertyDescriptor;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/XSDComboBoxPropertyDescriptor.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/XSDComboBoxPropertyDescriptor.java
index 1bcfb2d..b4d9cc2 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/XSDComboBoxPropertyDescriptor.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/XSDComboBoxPropertyDescriptor.java
@@ -11,6 +11,7 @@
 package org.eclipse.wst.xsd.ui.internal.properties;
 
 import java.text.MessageFormat;
+
 import org.eclipse.jface.util.Assert;
 import org.eclipse.jface.viewers.CellEditor;
 import org.eclipse.swt.SWT;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/AbstractSection.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/AbstractSection.java
index d96ec4b..9f4bd90 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/AbstractSection.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/AbstractSection.java
@@ -46,16 +46,16 @@
 import org.eclipse.xsd.XSDSchema;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
-//import org.apache.xerces.util.XMLChar;
+
 
 public class AbstractSection implements ISection, IPropertyChangeListener, Listener, SelectionListener
 {
-    private TabbedPropertySheetWidgetFactory factory;
-    protected IWorkbenchPart part;
-    protected ISelection selection;
-    protected Object input;
+	private TabbedPropertySheetWidgetFactory factory;
+	protected IWorkbenchPart part;
+	protected ISelection selection;
+	protected Object input;
   protected boolean doRefresh = true;
-    XSDSchema xsdSchema;
+	XSDSchema xsdSchema;
   protected boolean isReadOnly = false;
   private IStatusLineManager statusLine;
   protected Composite composite;
@@ -70,7 +70,7 @@
     super();
   }
   
-  public void createControls(Composite parent,  TabbedPropertySheetPage tabbedPropertySheetPage)
+  public void createControls(Composite parent,	TabbedPropertySheetPage tabbedPropertySheetPage)
   {
     createControls(parent, tabbedPropertySheetPage.getWidgetFactory());
   }
@@ -80,7 +80,7 @@
    */
   public void createControls(Composite parent, TabbedPropertySheetWidgetFactory aFactory)
   {
-        this.factory = aFactory;
+		this.factory = aFactory;
     GC gc = new GC(parent);
     Point extent = gc.textExtent("  ...  ");
     rightMarginSpace = extent.x;
@@ -92,10 +92,10 @@
    */
   public void setInput(IWorkbenchPart part, ISelection selection)
   {
-        Assert.isTrue(selection instanceof IStructuredSelection);
-        this.part = part;
-        this.selection = selection;
-        Object input = ((IStructuredSelection)selection).getFirstElement();
+		Assert.isTrue(selection instanceof IStructuredSelection);
+		this.part = part;
+		this.selection = selection;
+		Object input = ((IStructuredSelection)selection).getFirstElement();
     this.input = input;
     
     if (input instanceof XSDConcreteComponent)
@@ -115,7 +115,7 @@
     statusLine = getStatusLine();
     clearErrorMessage();
 
-//      refresh();
+//		refresh();
   }
 
   /* (non-Javadoc)
@@ -176,20 +176,20 @@
     return xsdSchema;
   }
   
-    /**
-     * Get the widget factory.
-     * @return the widget factory.
-     */
-    public TabbedPropertySheetWidgetFactory getWidgetFactory() {
-        return factory;
-    }
+	/**
+	 * Get the widget factory.
+	 * @return the widget factory.
+	 */
+	public TabbedPropertySheetWidgetFactory getWidgetFactory() {
+		return factory;
+	}
 
-    public void propertyChange(PropertyChangeEvent event)
-    {
+	public void propertyChange(PropertyChangeEvent event)
+	{
     refresh();
-    }
+	}
 
-    
+	
   public void doWidgetDefaultSelected(SelectionEvent e)
   {}
   
@@ -409,9 +409,10 @@
     return true;
   }
 
+  // TODO
   protected boolean validatePrefix(String prefix)
   {
-    return true;//XMLChar.isValidNCName(prefix);
+    return true;
   }
 
   
@@ -491,4 +492,4 @@
     return standardLabelWidth;
   }
 
-}
\ No newline at end of file
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/NameSection.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/NameSection.java
index 28c9abf..95ebbe3 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/NameSection.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/NameSection.java
@@ -20,11 +20,20 @@
 import org.eclipse.wst.common.ui.properties.internal.provisional.ITabbedPropertyConstants;
 import org.eclipse.wst.common.ui.properties.internal.provisional.TabbedPropertySheetWidgetFactory;
 import org.eclipse.wst.xsd.ui.internal.XSDEditorPlugin;
+import org.eclipse.wst.xsd.ui.internal.refactor.rename.GlobalAttributeGroupRenamer;
+import org.eclipse.wst.xsd.ui.internal.refactor.rename.GlobalAttributeRenamer;
+import org.eclipse.wst.xsd.ui.internal.refactor.rename.GlobalElementRenamer;
+import org.eclipse.wst.xsd.ui.internal.refactor.rename.GlobalGroupRenamer;
+import org.eclipse.wst.xsd.ui.internal.refactor.rename.GlobalSimpleOrComplexTypeRenamer;
 import org.eclipse.wst.xsd.ui.internal.util.XSDDOMHelper;
 import org.eclipse.xsd.XSDAttributeDeclaration;
+import org.eclipse.xsd.XSDAttributeGroupDefinition;
 import org.eclipse.xsd.XSDAttributeUse;
 import org.eclipse.xsd.XSDComplexTypeDefinition;
 import org.eclipse.xsd.XSDComponent;
+import org.eclipse.xsd.XSDConcreteComponent;
+import org.eclipse.xsd.XSDElementDeclaration;
+import org.eclipse.xsd.XSDModelGroupDefinition;