This commit was manufactured by cvs2svn to create tag
'v200603282200premerge'.
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDCMDocumentManager.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDCMDocumentManager.java
deleted file mode 100644
index 4c0264a..0000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDCMDocumentManager.java
+++ /dev/null
@@ -1,919 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contentmodel.tld;
-
-
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Stack;
-
-import org.eclipse.core.filebuffers.FileBuffers;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.core.runtime.content.IContentDescription;
-import org.eclipse.jst.jsp.core.JSP12Namespace;
-import org.eclipse.jst.jsp.core.contentmodel.tld.JSP11TLDNames;
-import org.eclipse.jst.jsp.core.contentmodel.tld.JSP12TLDNames;
-import org.eclipse.jst.jsp.core.contentmodel.tld.JSP20TLDNames;
-import org.eclipse.jst.jsp.core.contentmodel.tld.TLDDocument;
-import org.eclipse.jst.jsp.core.contentmodel.tld.TLDElementDeclaration;
-import org.eclipse.jst.jsp.core.contentmodel.tld.URIResolverProvider;
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.jst.jsp.core.internal.contentmodel.ITaglibRecord;
-import org.eclipse.jst.jsp.core.internal.contentmodel.TaglibController;
-import org.eclipse.jst.jsp.core.internal.contentmodel.TaglibIndex;
-import org.eclipse.jst.jsp.core.internal.parser.JSPSourceParser;
-import org.eclipse.jst.jsp.core.model.parser.XMLJSPRegionContexts;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.uriresolver.URIResolverPlugin;
-import org.eclipse.wst.sse.core.parser.BlockMarker;
-import org.eclipse.wst.sse.core.parser.StructuredDocumentRegionHandler;
-import org.eclipse.wst.sse.core.parser.StructuredDocumentRegionHandlerExtension;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-import org.eclipse.wst.sse.core.text.ITextRegionList;
-import org.eclipse.wst.sse.core.util.Assert;
-import org.eclipse.wst.sse.core.util.Debug;
-import org.eclipse.wst.sse.core.util.StringUtils;
-import org.eclipse.wst.xml.core.parser.XMLRegionContext;
-import org.eclipse.wst.xml.uriresolver.util.URIHelper;
-
-public class TLDCMDocumentManager {
-
-	protected class DirectiveStructuredDocumentRegionHandler implements StructuredDocumentRegionHandler, StructuredDocumentRegionHandlerExtension {
-
-		/**
-		 * Adds a block tagname (fully namespace qualified) into the list of
-		 * block tag names for the parser. The marker
-		 * IStructuredDocumentRegion along with position cues during reparses
-		 * allow the JSPSourceParser to enable/ignore the tags as blocks.
-		 */
-		protected void addBlockTag(String tagnameNS, IStructuredDocumentRegion marker) {
-			if (getParser() == null)
-				return;
-			if (getParser().getBlockMarker(tagnameNS) == null) {
-				getParser().addBlockMarker(new BlockMarker(tagnameNS, marker, XMLRegionContext.BLOCK_TEXT, true, false));
-				if (_debug) {
-					System.out.println("TLDCMDocumentManager added block marker: " + tagnameNS + "@" + marker.getStartOffset()); //$NON-NLS-2$//$NON-NLS-1$
-				}
-			}
-		}
-
-		/**
-		 * Enables a TLD owning the given prefix loaded from the given URI at
-		 * the anchorStructuredDocumentRegion. The list of
-		 * additionalCMDocuments will claim to not know any of its tags at
-		 * positions earlier than that IStructuredDocumentRegion's position.
-		 * 
-		 * For taglib directives, the taglib is the anchor while taglibs
-		 * registered through include directives use the parent document's
-		 * include directive as their anchor.
-		 * 
-		 * @param prefix
-		 * @param uri
-		 * @param anchorStructuredDocumentRegion
-		 */
-		protected void enableTaglibFromURI(String prefix, String uri, IStructuredDocumentRegion anchorStructuredDocumentRegion) {
-			if (prefix == null || uri == null || bannedPrefixes.contains(prefix))
-				return;
-			// Try to load the CMDocument for this URI
-			CMDocument tld = getCMDocument(uri);
-			if (tld == null || !(tld instanceof TLDDocument)) {
-				if (_debug) {
-					System.out.println("TLDCMDocumentManager failed to create a CMDocument for " + uri); //$NON-NLS-1$
-				}
-				return;
-			}
-			CMNamedNodeMap elements = tld.getElements();
-			// Go through the CMDocument for any tags that must be marked as
-			// block tags
-			// starting at the anchoring IStructuredDocumentRegion. As the
-			// document is edited and the
-			// IStructuredDocumentRegion moved around, the block tag
-			// enablement will automatically follow
-			// it.
-			for (int i = 0; i < elements.getLength(); i++) {
-				TLDElementDeclaration ed = (TLDElementDeclaration) elements.item(i);
-				if (ed.getBodycontent() == JSP12TLDNames.CONTENT_TAGDEPENDENT)
-					addBlockTag(prefix + ":" + ed.getNodeName(), anchorStructuredDocumentRegion); //$NON-NLS-1$
-			}
-			// Since modifications to StructuredDocumentRegions adjacent to a
-			// taglib directive can cause
-			// that IStructuredDocumentRegion to be reported, filter out any
-			// duplicated URIs. When the
-			// taglib is actually modified, a full rebuild will occur and no
-			// duplicates
-			// will/should be found.
-			List trackers = getTaglibTrackers();
-			for (int i = 0; i < trackers.size(); i++) {
-				TaglibTracker tracker = (TaglibTracker) trackers.get(i);
-				if (tracker.getPrefix().equals(prefix) && tracker.getURI().equals(uri)) {
-					return;
-				}
-			}
-			if (_debug) {
-				System.out.println("TLDCMDocumentManager registered a tracker for " + uri + " with prefix " + prefix); //$NON-NLS-2$//$NON-NLS-1$
-			}
-			getTaglibTrackers().add(new TaglibTracker(uri, prefix, tld, anchorStructuredDocumentRegion));
-		}
-
-		/**
-		 * Enables a TLD owning the given prefix loaded from the given URI at
-		 * the anchorStructuredDocumentRegion. The list of
-		 * additionalCMDocuments will claim to not know any of its tags at
-		 * positions earlier than that IStructuredDocumentRegion's position.
-		 * 
-		 * For taglib directives, the taglib is the anchor while taglibs
-		 * registered through include directives use the parent document's
-		 * include directive as their anchor.
-		 * 
-		 * @param prefix
-		 * @param uri
-		 * @param taglibStructuredDocumentRegion
-		 */
-		protected void enableTagsInDir(String prefix, String tagdir, IStructuredDocumentRegion taglibStructuredDocumentRegion) {
-			if (prefix == null || tagdir == null || bannedPrefixes.contains(prefix))
-				return;
-			if (_debug) {
-				System.out.println("TLDCMDocumentManager enabling tags from directory" + tagdir + " for prefix " + prefix); //$NON-NLS-2$//$NON-NLS-1$
-			}
-			// Try to load the CMDocument for this URI
-			CMDocument tld = getImplicitCMDocument(tagdir);
-			if (tld == null || !(tld instanceof TLDDocument))
-				return;
-			CMNamedNodeMap elements = tld.getElements();
-			// Go through the CMDocument for any tags that must be marked as
-			// block tags
-			// starting at the anchoring IStructuredDocumentRegion. As the
-			// document is edited and the
-			// IStructuredDocumentRegion moved around, the block tag
-			// enablement will automatically follow
-			// it.
-			for (int i = 0; i < elements.getLength(); i++) {
-				TLDElementDeclaration ed = (TLDElementDeclaration) elements.item(i);
-				if (ed.getBodycontent() == JSP12TLDNames.CONTENT_TAGDEPENDENT)
-					addBlockTag(prefix + ":" + ed.getNodeName(), taglibStructuredDocumentRegion); //$NON-NLS-1$
-			}
-			// Since modifications to StructuredDocumentRegions adjacent to a
-			// taglib directive can cause
-			// that IStructuredDocumentRegion to be reported, filter out any
-			// duplicated URIs. When the
-			// taglib is actually modified, a full rebuild will occur and no
-			// duplicates
-			// will/should be found.
-			List trackers = getTaglibTrackers();
-			for (int i = 0; i < trackers.size(); i++) {
-				TaglibTracker tracker = (TaglibTracker) trackers.get(i);
-				if (tracker.getPrefix().equals(prefix) && tracker.getURI().equals(tagdir)) {
-					return;
-				}
-			}
-			if (_debug) {
-				System.out.println("TLDCMDocumentManager registered a tracker for directory" + tagdir + " with prefix " + prefix); //$NON-NLS-2$//$NON-NLS-1$
-			}
-			getTaglibTrackers().add(new TaglibTracker(tagdir, prefix, tld, taglibStructuredDocumentRegion));
-		}
-
-		public void nodeParsed(IStructuredDocumentRegion aCoreStructuredDocumentRegion) {
-			// could test > 1, but since we only care if there are 8 (<%@,
-			// taglib, uri, =, where, prefix, =, what) [or 4 for includes]
-			if (aCoreStructuredDocumentRegion.getNumberOfRegions() > 4 && aCoreStructuredDocumentRegion.getRegions().get(1).getType() == XMLJSPRegionContexts.JSP_DIRECTIVE_NAME) {
-				ITextRegion name = aCoreStructuredDocumentRegion.getRegions().get(1);
-				try {
-					if (getParser() == null) {
-						Logger.log(Logger.WARNING, "Warning: parser text was requested by " + getClass().getName() + " but none was available; taglib support disabled"); //$NON-NLS-1$ //$NON-NLS-2$
-					}
-					else {
-						boolean taglibDetected = false;
-						boolean taglibDirectiveDetected = false;
-						boolean includeDetected = false;
-						boolean includeDirectiveDetected = false;
-						int startOffset = aCoreStructuredDocumentRegion.getStartOffset(name);
-						int textLength = name.getTextLength();
-
-						if (getParser() != null) {
-							taglibDetected = getParser().regionMatches(startOffset, textLength, JSP12TLDNames.TAGLIB);
-							taglibDirectiveDetected = getParser().regionMatches(startOffset, textLength, JSP12Namespace.ElementName.DIRECTIVE_TAGLIB);
-							includeDetected = getParser().regionMatches(startOffset, textLength, JSP12TLDNames.INCLUDE);
-							includeDirectiveDetected = getParser().regionMatches(startOffset, textLength, JSP12Namespace.ElementName.DIRECTIVE_INCLUDE);
-						}
-						else {
-							// old fashioned way
-							String directiveName = getParser().getText(startOffset, textLength);
-							taglibDetected = directiveName.equals(JSP12TLDNames.TAGLIB);
-							taglibDirectiveDetected = directiveName.equals(JSP12Namespace.ElementName.DIRECTIVE_TAGLIB);
-							includeDetected = directiveName.equals(JSP12TLDNames.INCLUDE);
-							includeDirectiveDetected = directiveName.equals(JSP12Namespace.ElementName.DIRECTIVE_INCLUDE);
-						}
-						if (taglibDetected || taglibDirectiveDetected) {
-							processTaglib(aCoreStructuredDocumentRegion);
-						}
-						else if (includeDetected || includeDirectiveDetected) {
-							processInclude(aCoreStructuredDocumentRegion);
-						}
-					}
-				}
-				catch (StringIndexOutOfBoundsException sioobExc) {
-					// do nothing
-				}
-			}
-			// could test > 1, but since we only care if there are 5 (<,
-			// jsp:root, xmlns:prefix, =, where)
-			else if (aCoreStructuredDocumentRegion.getNumberOfRegions() > 4 && aCoreStructuredDocumentRegion.getRegions().get(1).getType() == XMLJSPRegionContexts.JSP_ROOT_TAG_NAME) {
-				if (getParser() == null) {
-					Logger.log(Logger.WARNING, "Warning: parser text was requested by " + getClass().getName() + " but none was available; taglib support disabled"); //$NON-NLS-1$ //$NON-NLS-2$
-				}
-				else {
-					processJSPRoot(aCoreStructuredDocumentRegion);
-				}
-			}
-		}
-
-		protected void processInclude(IStructuredDocumentRegion aCoreStructuredDocumentRegion) {
-			processInclude(aCoreStructuredDocumentRegion, aCoreStructuredDocumentRegion, getParser());
-		}
-
-		/**
-		 * Process an include directive found by the textSource parser and
-		 * anchor any taglibs found within at the
-		 * anchorStructuredDocumentRegion. Includes use the including file as
-		 * the point of reference, not necessarily the "top" file.
-		 */
-		protected void processInclude(IStructuredDocumentRegion includeStructuredDocumentRegion, IStructuredDocumentRegion anchorStructuredDocumentRegion, JSPSourceParser textSource) {
-			ITextRegionList regions = includeStructuredDocumentRegion.getRegions();
-			String includedFile = null;
-			boolean isFilename = false;
-			try {
-				for (int i = 0; i < regions.size(); i++) {
-					ITextRegion region = regions.get(i);
-					if (region.getType() == XMLRegionContext.XML_TAG_ATTRIBUTE_NAME) {
-						if (textSource.getText(includeStructuredDocumentRegion.getStartOffset(region), region.getTextLength()).equals(JSP12TLDNames.FILE)) {
-							isFilename = true;
-						}
-						else {
-							isFilename = false;
-						}
-					}
-					else if (isFilename && region.getType() == XMLRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
-						includedFile = textSource.getText(includeStructuredDocumentRegion.getStartOffset(region), region.getTextLength());
-						isFilename = false;
-					}
-				}
-			}
-			catch (StringIndexOutOfBoundsException sioobExc) {
-				// nothing to be done
-				includedFile = null;
-			}
-			if (includedFile != null) {
-				IPath root = TaglibIndex.getContextRoot(getCurrentBaseLocation());
-				IPath fileLocation = new Path(URIHelper.normalize(StringUtils.strip(includedFile).trim(), getCurrentBaseLocation().toString(), root.toString()));
-				// check for "loops"
-				if (!getIncludes().contains(fileLocation) && fileLocation != null && !fileLocation.equals(getCurrentBaseLocation())) {
-					getIncludes().push(fileLocation);
-					if (getParser() != null)
-						new IncludeHelper(anchorStructuredDocumentRegion, getParser()).parse(fileLocation.toString());
-					else
-						Logger.log(Logger.WARNING, "Warning: parser text was requested by " + getClass().getName() + " but none was available; taglib support disabled"); //$NON-NLS-1$ //$NON-NLS-2$
-					getIncludes().pop();
-				}
-				else {
-					if (Debug.debugTokenizer)
-						System.out.println("LOOP IN @INCLUDES FOUND: " + fileLocation); //$NON-NLS-1$
-				}
-			}
-		}
-
-		// Pulls the URI and prefix from the given jsp:root
-		// IStructuredDocumentRegion and
-		// makes sure the tags are known.
-		protected void processJSPRoot(IStructuredDocumentRegion jspRootStructuredDocumentRegion) {
-			processJSPRoot(jspRootStructuredDocumentRegion, jspRootStructuredDocumentRegion, getParser());
-		}
-
-		protected void processJSPRoot(IStructuredDocumentRegion taglibStructuredDocumentRegion, IStructuredDocumentRegion anchorStructuredDocumentRegion, JSPSourceParser textSource) {
-			ITextRegionList regions = taglibStructuredDocumentRegion.getRegions();
-			String uri = null;
-			String prefix = null;
-			boolean taglib = false;
-			try {
-				for (int i = 0; i < regions.size(); i++) {
-					ITextRegion region = regions.get(i);
-					if (region.getType() == XMLRegionContext.XML_TAG_ATTRIBUTE_NAME) {
-						String name = textSource.getText(taglibStructuredDocumentRegion.getStartOffset(region), region.getTextLength());
-						if (name.startsWith(XMLNS)) { //$NON-NLS-1$
-							prefix = name.substring(XMLNS_LENGTH);
-							if (!bannedPrefixes.contains(prefix))
-								taglib = true;
-						}
-						else {
-							prefix = null;
-							taglib = false;
-						}
-					}
-					else if (taglib && region.getType() == XMLRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
-						uri = textSource.getText(taglibStructuredDocumentRegion.getStartOffset(region), region.getTextLength());
-						if (uri != null && prefix != null && (StringUtils.strip(uri).length() > 0) && (StringUtils.strip(prefix).length() > 0)) {
-							if (anchorStructuredDocumentRegion == null)
-								enableTaglibFromURI(StringUtils.strip(prefix), StringUtils.strip(uri), taglibStructuredDocumentRegion);
-							else
-								enableTaglibFromURI(StringUtils.strip(prefix), StringUtils.strip(uri), anchorStructuredDocumentRegion);
-							uri = null;
-							prefix = null;
-						}
-					}
-				}
-			}
-			catch (StringIndexOutOfBoundsException sioobExc) {
-				// nothing to be done
-				uri = null;
-				prefix = null;
-			}
-		}
-
-		protected void processTaglib(IStructuredDocumentRegion taglibStructuredDocumentRegion) {
-			processTaglib(taglibStructuredDocumentRegion, taglibStructuredDocumentRegion, getParser());
-		}
-
-		/**
-		 * Pulls the URI and prefix from the given taglib directive
-		 * IStructuredDocumentRegion and makes sure the tags are known.
-		 */
-		protected void processTaglib(IStructuredDocumentRegion taglibStructuredDocumentRegion, IStructuredDocumentRegion anchorStructuredDocumentRegion, JSPSourceParser textSource) {
-			ITextRegionList regions = taglibStructuredDocumentRegion.getRegions();
-			String uri = null;
-			String prefix = null;
-			String tagdir = null;
-			String attrName = null;
-			try {
-				for (int i = 0; i < regions.size(); i++) {
-					ITextRegion region = regions.get(i);
-					// remember attribute name
-					int startOffset = taglibStructuredDocumentRegion.getStartOffset(region);
-					int textLength = region.getTextLength();
-					if (region.getType() == XMLRegionContext.XML_TAG_ATTRIBUTE_NAME) {
-						// String name = textSource.getText(startOffset,
-						// textLength);
-						if (textSource.regionMatches(startOffset, textLength, JSP11TLDNames.PREFIX)) {
-							attrName = JSP11TLDNames.PREFIX;
-						}
-						else if (textSource.regionMatches(startOffset, textLength, JSP12TLDNames.URI)) {
-							attrName = JSP11TLDNames.URI;
-						}
-						else if (textSource.regionMatches(startOffset, textLength, JSP20TLDNames.TAGDIR)) {
-							attrName = JSP20TLDNames.TAGDIR;
-						}
-						else {
-							attrName = null;
-						}
-					}
-					// process value
-					else if (region.getType() == XMLRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
-						if (JSP11TLDNames.PREFIX.equals(attrName))
-							prefix = textSource.getText(startOffset, textLength);
-						else if (JSP11TLDNames.URI.equals(attrName))
-							uri = textSource.getText(startOffset, textLength);
-						else if (JSP20TLDNames.TAGDIR.equals(attrName))
-							tagdir = textSource.getText(startOffset, textLength);
-					}
-				}
-			}
-			catch (StringIndexOutOfBoundsException sioobExc) {
-				// nothing to be done
-				uri = null;
-				prefix = null;
-			}
-			if (uri != null && prefix != null && (StringUtils.strip(uri).length() > 0) && (StringUtils.strip(prefix).length() > 0)) {
-				if (anchorStructuredDocumentRegion == null)
-					enableTaglibFromURI(StringUtils.strip(prefix), StringUtils.strip(uri), taglibStructuredDocumentRegion);
-				else
-					enableTaglibFromURI(StringUtils.strip(prefix), StringUtils.strip(uri), anchorStructuredDocumentRegion);
-			}
-			else if (tagdir != null && prefix != null && (StringUtils.strip(tagdir).length() > 0) && (StringUtils.strip(prefix).length() > 0)) {
-				if (anchorStructuredDocumentRegion == null)
-					enableTagsInDir(StringUtils.strip(prefix), StringUtils.strip(tagdir), taglibStructuredDocumentRegion);
-				else
-					enableTagsInDir(StringUtils.strip(prefix), StringUtils.strip(tagdir), anchorStructuredDocumentRegion);
-			}
-		}
-
-		private void resetBlockTags() {
-			if (getParser() == null)
-				return;
-			Iterator names = getParser().getBlockMarkers().iterator();
-			while (names.hasNext()) {
-				BlockMarker marker = (BlockMarker) names.next();
-				if (!marker.isGlobal() && marker.getContext() == XMLRegionContext.BLOCK_TEXT) {
-					if (_debug) {
-						System.out.println("TLDCMDocumentManager removing block tag named: " + marker.getTagName()); //$NON-NLS-1$
-					}
-					names.remove();
-				}
-			}
-		}
-
-		public void resetNodes() {
-			if (Debug.debugTaglibs)
-				System.out.println(getClass().getName() + ": resetting"); //$NON-NLS-1$
-			getIncludes().clear();
-			resetBlockTags();
-			resetTaglibTrackers();
-		}
-
-		public void setStructuredDocument(IStructuredDocument newDocument) {
-			Assert.isTrue(newDocument != null, "null document");
-			Assert.isTrue(newDocument.getParser() != null, "null document parser");
-			Assert.isTrue(newDocument.getParser() instanceof JSPSourceParser, "can only listen to document with a JSPSourceParser");
-			getSourceParser().removeStructuredDocumentRegionHandler(this);
-			setSourceParser((JSPSourceParser) newDocument.getParser());
-			getSourceParser().addStructuredDocumentRegionHandler(this);
-		}
-	}
-
-	protected class IncludeHelper extends DirectiveStructuredDocumentRegionHandler {
-		protected IStructuredDocumentRegion fAnchor = null;
-		protected JSPSourceParser fLocalParser = null;
-		protected JSPSourceParser fParentParser = null;
-
-		public IncludeHelper(IStructuredDocumentRegion anchor, JSPSourceParser rootParser) {
-			super();
-			fAnchor = anchor;
-			fParentParser = rootParser;
-		}
-
-		private String detectCharset(IFile file) {
-			if (file.getType() == IResource.FILE && file.isAccessible()) {
-				IContentDescription d = null;
-				try {
-					// optimized description lookup, might not succeed
-					d = file.getContentDescription();
-					if (d != null)
-						return d.getCharset();
-				}
-				catch (CoreException e) {
-					// should not be possible given the accessible and file
-					// type
-					// check above
-				}
-				InputStream contents = null;
-				try {
-					contents = file.getContents();
-					IContentDescription description = Platform.getContentTypeManager().getDescriptionFor(contents, file.getName(), new QualifiedName[]{IContentDescription.CHARSET});
-					if (description != null) {
-						return description.getCharset();
-					}
-				}
-				catch (IOException e) {
-					// will try to cleanup in finally
-				}
-				catch (CoreException e) {
-					Logger.logException(e);
-				}
-				finally {
-					if (contents != null) {
-						try {
-							contents.close();
-						}
-						catch (Exception e) {
-							// not sure how to recover at this point
-						}
-					}
-				}
-			}
-			return ResourcesPlugin.getEncoding();
-		}
-
-		protected String getContents(String fileName) {
-			StringBuffer s = new StringBuffer();
-			IFile iFile = FileBuffers.getWorkspaceFileAtLocation(new Path(fileName));
-			if (iFile != null && iFile.exists()) {
-				String charset = detectCharset(iFile);
-				InputStream contents = null;
-				try {
-					contents = iFile.getContents();
-					Reader reader = new InputStreamReader(contents, charset);
-					char[] readBuffer = new char[2048];
-					int n = reader.read(readBuffer);
-					while (n > 0) {
-						s.append(readBuffer, 0, n);
-						n = reader.read(readBuffer);
-					}
-				}
-				catch (Exception e) {
-					if (Debug.debugStructuredDocument)
-						Logger.log(Logger.WARNING, "An exception occured while scanning " + fileName, e); //$NON-NLS-1$
-				}
-				finally {
-					try {
-						if (contents != null) {
-							contents.close();
-						}
-					}
-					catch (Exception e) {
-						// nothing to do
-					}
-				}
-			}
-			else {
-				int c = 0;
-				int length = 0;
-				int count = 0;
-				File file = null;
-				FileInputStream fis = null;
-				try {
-					file = new File(fileName);
-					length = (int) file.length();
-					fis = new FileInputStream(file);
-					while (((c = fis.read()) >= 0) && (count < length)) {
-						count++;
-						s.append((char) c);
-					}
-				}
-				catch (FileNotFoundException e) {
-					if (Debug.debugStructuredDocument)
-						System.out.println("File not found : \"" + fileName + "\""); //$NON-NLS-2$//$NON-NLS-1$
-				}
-				catch (ArrayIndexOutOfBoundsException e) {
-					if (Debug.debugStructuredDocument)
-						System.out.println("Usage wrong: specify inputfile"); //$NON-NLS-1$
-					//$NON-NLS-1$
-				}
-				catch (IOException e) {
-					if (Debug.debugStructuredDocument)
-						System.out.println("An I/O error occured while scanning :"); //$NON-NLS-1$
-					//$NON-NLS-1$
-				}
-				catch (Exception e) {
-					if (Debug.debugStructuredDocument)
-						e.printStackTrace();
-				}
-				finally {
-					try {
-						if (fis != null) {
-							fis.close();
-						}
-					}
-					catch (Exception e) {
-						// nothing to do
-					}
-				}
-			}
-			return s.toString();
-		}
-
-		public void nodeParsed(IStructuredDocumentRegion aCoreStructuredDocumentRegion) {
-			// could test > 1, but since we only care if there are 8 (<%@,
-			// taglib, uri, =, where, prefix, =, what)
-			if (aCoreStructuredDocumentRegion.getNumberOfRegions() > 1 && aCoreStructuredDocumentRegion.getRegions().get(1).getType() == XMLJSPRegionContexts.JSP_DIRECTIVE_NAME) {
-				ITextRegion name = aCoreStructuredDocumentRegion.getRegions().get(1);
-				try {
-					String directiveName = fLocalParser.getText(aCoreStructuredDocumentRegion.getStartOffset(name), name.getTextLength());
-					if (directiveName.equals(JSP12TLDNames.TAGLIB) || directiveName.equals(JSP12Namespace.ElementName.DIRECTIVE_TAGLIB)) {
-						processTaglib(aCoreStructuredDocumentRegion, fAnchor, fLocalParser);
-					}
-					if (directiveName.equals(JSP12TLDNames.INCLUDE) || directiveName.equals(JSP12Namespace.ElementName.DIRECTIVE_INCLUDE)) {
-						processInclude(aCoreStructuredDocumentRegion, fAnchor, fLocalParser);
-					}
-				}
-				catch (StringIndexOutOfBoundsException sioobExc) {
-					// do nothing
-				}
-			}
-			// could test > 1, but since we only care if there are 5 (<,
-			// jsp:root, xmlns:prefix, =, where)
-			else if (aCoreStructuredDocumentRegion.getNumberOfRegions() > 4 && aCoreStructuredDocumentRegion.getRegions().get(1).getType() == XMLJSPRegionContexts.JSP_ROOT_TAG_NAME) {
-				processJSPRoot(aCoreStructuredDocumentRegion, fAnchor, fLocalParser);
-			}
-		}
-
-		public void parse(String filename) {
-			JSPSourceParser p = new JSPSourceParser();
-			fLocalParser = p;
-			List blockTags = fParentParser.getBlockMarkers();
-			String includedFilename = filename;
-			File baseFile = FileBuffers.getSystemFileAtLocation(new Path(includedFilename));
-			try {
-				if (baseFile != null)
-					includedFilename = baseFile.getCanonicalPath();
-			}
-			catch (IOException e) {
-			}
-			String s = getContents(includedFilename);
-			fLocalParser.addStructuredDocumentRegionHandler(this);
-			fLocalParser.reset(s);
-			for (int i = 0; i < blockTags.size(); i++) {
-				BlockMarker marker = (BlockMarker) blockTags.get(i);
-				fLocalParser.addBlockMarker(new BlockMarker(marker.getTagName(), null, marker.getContext(), marker.isCaseSensitive()));
-			}
-			// force parse
-			fLocalParser.getDocumentRegions();
-			fLocalParser = null;
-		}
-
-		public void resetNodes() {
-		}
-
-	}
-
-	static final boolean _debug = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/tldcmdocument/manager")); //$NON-NLS-1$ //$NON-NLS-2$
-
-	// will hold the prefixes banned by the specification; taglibs may not use
-	// them
-	protected static List bannedPrefixes = null;
-	static final String XMLNS = "xmlns:"; //$NON-NLS-1$ 
-	static final int XMLNS_LENGTH = XMLNS.length();
-
-	static {
-		bannedPrefixes = new ArrayList(7);
-		bannedPrefixes.add("jsp"); //$NON-NLS-1$
-		bannedPrefixes.add("jspx"); //$NON-NLS-1$
-		bannedPrefixes.add("java"); //$NON-NLS-1$
-		bannedPrefixes.add("javax"); //$NON-NLS-1$
-		bannedPrefixes.add("servlet"); //$NON-NLS-1$
-		bannedPrefixes.add("sun"); //$NON-NLS-1$
-		bannedPrefixes.add("sunw"); //$NON-NLS-1$
-	}
-
-	private CMDocumentFactoryTLD fCMDocumentBuilder = null;
-	private DirectiveStructuredDocumentRegionHandler fDirectiveHandler = null;
-	private Hashtable fDocuments = null;
-	private Stack fIncludes = null;
-
-	private JSPSourceParser fParser = null;
-
-	// trivial hand edit to remove unused variable private URIResolverProvider
-	// fResolverProvider = null;
-
-	private List fTaglibTrackers = null;
-
-	public TLDCMDocumentManager() {
-		super();
-	}
-
-	public void clearCache() {
-		if (_debug) {
-			System.out.println("TLDCMDocumentManager cleared its CMDocument cache"); //$NON-NLS-1$
-		}
-		getDocuments().clear();
-	}
-
-	/**
-	 * Return the CMDocument at the uri (cached)
-	 */
-	protected CMDocument getCMDocument(String uri) {
-		if (uri == null || uri.length() == 0)
-			return null;
-		String reference = uri;
-		/**
-		 * JSP 1.2 Specification, section 5.2.2 jsp-1_2-fcs-spec.pdf, page 87
-		 */
-		String URNprefix = "urn:jsptld:"; //$NON-NLS-1$
-		if (reference.startsWith(URNprefix)) {
-			/**
-			 * @see section 7.3.2
-			 */
-			if (reference.length() > URNprefix.length())
-				reference = reference.substring(11);
-		}
-		else {
-			/**
-			 * @see section 7.3.6
-			 */
-		}
-		CMDocument doc = (CMDocument) getDocuments().get(reference);
-		if (doc == null) {
-			doc = loadTaglib(reference);
-			if (doc != null)
-				getDocuments().put(reference, doc);
-		}
-		return doc;
-	}
-
-	/**
-	 * Gets the cMDocumentBuilder.
-	 * 
-	 * @return Returns a CMDocumentFactoryTLD, since it has more builder
-	 *         methods
-	 */
-	protected CMDocumentFactoryTLD getCMDocumentBuilder() {
-		if (fCMDocumentBuilder == null)
-			fCMDocumentBuilder = new CMDocumentFactoryTLD();
-		return fCMDocumentBuilder;
-	}
-
-	public List getCMDocumentTrackers(int offset) {
-		List validDocs = new ArrayList();
-		Iterator alldocs = getTaglibTrackers().iterator();
-		while (alldocs.hasNext()) {
-			TaglibTracker aTracker = (TaglibTracker) alldocs.next();
-			if (aTracker.getStructuredDocumentRegion().getStartOffset() < offset || offset < 0) {
-				validDocs.add(aTracker);
-			}
-		}
-		return validDocs;
-	}
-
-	public List getCMDocumentTrackers(String prefix, int offset) {
-		List validDocs = new ArrayList();
-		Iterator alldocs = getTaglibTrackers().iterator();
-		while (alldocs.hasNext()) {
-			TaglibTracker aTracker = (TaglibTracker) alldocs.next();
-			if ((aTracker.getStructuredDocumentRegion().getStartOffset() < offset || offset < 0) && aTracker.getPrefix().equals(prefix)) {
-				validDocs.add(aTracker);
-			}
-		}
-		return validDocs;
-	}
-
-	/**
-	 * 
-	 * @return java.lang.String
-	 */
-	IPath getCurrentBaseLocation() {
-		IPath baseLocation = null;
-		if (!getIncludes().isEmpty()) {
-			baseLocation = (IPath) getIncludes().peek();
-		}
-		else {
-			IPath path = TaglibController.getFileBuffer(this).getLocation();
-			if (path.toFile().exists())
-				baseLocation = path;
-			else
-				baseLocation = ResourcesPlugin.getWorkspace().getRoot().getFile(path).getLocation();
-		}
-		return baseLocation;
-	}
-
-	protected DirectiveStructuredDocumentRegionHandler getDirectiveStructuredDocumentRegionHandler() {
-		if (fDirectiveHandler == null)
-			fDirectiveHandler = new DirectiveStructuredDocumentRegionHandler();
-		return fDirectiveHandler;
-	}
-
-	/**
-	 * Gets the documents.
-	 * 
-	 * @return Returns a Hashtable
-	 */
-	public Hashtable getDocuments() {
-		if (fDocuments == null)
-			fDocuments = new Hashtable();
-		return fDocuments;
-	}
-
-	/**
-	 * Return the CMDocument at the tagdir (cached)
-	 */
-	protected CMDocument getImplicitCMDocument(String tagdir) {
-		if (tagdir == null || tagdir.length() == 0)
-			return null;
-		String reference = tagdir;
-		/**
-		 * JSP 1.2 Specification, section 5.2.2 jsp-1_2-fcs-spec.pdf, page 87
-		 */
-		String URNprefix = "urn:jsptld:"; //$NON-NLS-1$
-		if (reference.startsWith(URNprefix)) {
-			/**
-			 * @see section 7.3.2
-			 */
-			if (reference.length() > URNprefix.length())
-				reference = reference.substring(11);
-		}
-		else {
-			/**
-			 * @see section 7.3.6
-			 */
-		}
-		CMDocument doc = (CMDocument) getDocuments().get(reference);
-		if (doc == null) {
-			doc = loadTagDir(reference);
-			if (doc != null)
-				getDocuments().put(reference, doc);
-		}
-		return doc;
-	}
-
-	/**
-	 * Gets the includes.
-	 * 
-	 * @return Returns a Stack
-	 */
-	protected Stack getIncludes() {
-		if (fIncludes == null)
-			fIncludes = new Stack();
-		return fIncludes;
-	}
-
-	JSPSourceParser getParser() {
-		return fParser;
-	}
-
-	/**
-	 * @deprecated
-	 */
-	public URIResolverProvider getResolverProvider() {
-		return null;
-	}
-
-	public JSPSourceParser getSourceParser() {
-		return fParser;
-	}
-
-	public StructuredDocumentRegionHandler getStructuredDocumentRegionHandler() {
-		return getDirectiveStructuredDocumentRegionHandler();
-	}
-
-	/**
-	 * 
-	 * @return java.util.List
-	 */
-	public List getTaglibTrackers() {
-		if (fTaglibTrackers == null)
-			fTaglibTrackers = new ArrayList();
-		return fTaglibTrackers;
-	}
-
-	/**
-	 * Loads the tags from the specified URI. It must point to a URL of valid
-	 * tag files to work.
-	 */
-	protected CMDocument loadTagDir(String uri) {
-		ITaglibRecord reference = TaglibIndex.resolve(getCurrentBaseLocation().toString(), uri, false);
-		if (reference != null) {
-			CMDocument document = getCMDocumentBuilder().createCMDocument(reference);
-			if (document != null) {
-				return document;
-			}
-		}
-		// JSP2_TODO: implement for JSP 2.0
-		String location = URIResolverPlugin.createResolver().resolve(getCurrentBaseLocation().toString(), null, uri);
-		if (location == null)
-			return null;
-		if (_debug) {
-			System.out.println("Loading tags from dir" + uri + " at " + location); //$NON-NLS-2$//$NON-NLS-1$
-		}
-		return getCMDocumentBuilder().createCMDocument(location);
-	}
-
-	/**
-	 * Loads the taglib from the specified URI. It must point to a valid
-	 * taglib descriptor or valid JAR file to work.
-	 */
-	protected CMDocument loadTaglib(String uri) {
-		CMDocument document = null;
-		ITaglibRecord reference = TaglibIndex.resolve(TaglibController.getFileBuffer(this).getLocation().toString(), uri, false);
-		if (reference != null) {
-			document = getCMDocumentBuilder().createCMDocument(reference);
-		}
-		else {
-			String location = URIResolverPlugin.createResolver().resolve(getCurrentBaseLocation().toString(), null, uri);
-			if (location != null) {
-				if (_debug) {
-					System.out.println("Loading tags from " + uri + " at " + location); //$NON-NLS-2$//$NON-NLS-1$
-				}
-				document = getCMDocumentBuilder().createCMDocument(location);
-			}
-		}
-		return document;
-	}
-
-	protected void resetTaglibTrackers() {
-		if (_debug) {
-			System.out.println("TLDCMDocumentManager cleared its taglib trackers\n"); //$NON-NLS-1$
-		}
-		getTaglibTrackers().clear();
-	}
-
-	public void setSourceParser(JSPSourceParser parser) {
-		if (fParser != null)
-			fParser.removeStructuredDocumentRegionHandler(getStructuredDocumentRegionHandler());
-		fParser = parser;
-		if (fParser != null)
-			fParser.addStructuredDocumentRegionHandler(getStructuredDocumentRegionHandler());
-	}
-}
\ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveWatcherFactory.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveWatcherFactory.java
deleted file mode 100644
index 63ee128..0000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveWatcherFactory.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.document;
-
-import org.eclipse.wst.sse.core.AdapterFactory;
-import org.eclipse.wst.sse.core.INodeAdapter;
-import org.eclipse.wst.sse.core.INodeNotifier;
-import org.eclipse.wst.sse.core.PropagatingAdapterFactory;
-import org.eclipse.wst.xml.core.document.XMLElement;
-import org.eclipse.wst.xml.core.internal.propagate.PropagatingAdapterFactoryImpl;
-import org.w3c.dom.Node;
-
-public class PageDirectiveWatcherFactory extends PropagatingAdapterFactoryImpl implements PropagatingAdapterFactory {
-
-	/**
-	 * Constructor for PageDirectiveWatcherFactory.
-	 */
-	public PageDirectiveWatcherFactory() {
-		this(PageDirectiveWatcher.class, true);
-	}
-
-	/**
-	 * Constructor for PageDirectiveWatcherFactory.
-	 * @param adapterKey
-	 * @param registerAdapters
-	 */
-	public PageDirectiveWatcherFactory(Object adapterKey, boolean registerAdapters) {
-		super(adapterKey, registerAdapters);
-	}
-
-	protected INodeAdapter createAdapter(INodeNotifier target) {
-		PageDirectiveWatcher result = null;
-		if (target instanceof XMLElement) {
-			XMLElement xmlElement = (XMLElement) target;
-			if (xmlElement.getNodeType() == Node.ELEMENT_NODE) {
-				//                if (xmlElement.getNodeName() == JSP12Namespace.ElementName.DIRECTIVE_PAGE) {   // not sure why identity to  JSP11Namespace.ElementName.DIRECTIVE_PAGE doesn't work
-				String nodeName = xmlElement.getNodeName();
-				if (nodeName.equals("jsp:directive.page")) { //$NON-NLS-1$
-					result = new PageDirectiveWatcherImpl(xmlElement);
-				}
-
-			}
-		}
-		return result;
-
-	}
-
-	public AdapterFactory copy() {
-		return new PageDirectiveWatcherFactory(this.adapterKey, this.shouldRegisterAdapter);
-	}
-}
\ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPIncludeRegionHelper.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPIncludeRegionHelper.java
deleted file mode 100644
index 2e3d932..0000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPIncludeRegionHelper.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.java;
-
-import org.eclipse.jst.jsp.core.model.parser.XMLJSPRegionContexts;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-import org.eclipse.wst.xml.core.parser.XMLRegionContext;
-
-
-/**
- * Extension of XMLJSPRegionHelper inteded to parse entire included JSP files.
- * Basically it expands the rules for what tags are parsed as JSP.
- * 
- * @author pavery
- */
-class JSPIncludeRegionHelper extends XMLJSPRegionHelper {
-	/**
-	 * @param JSPTranslator
-	 */
-	public JSPIncludeRegionHelper(JSPTranslator translator) {
-		super(translator);
-	}
-
-	// these methods determine what content gets added to the local scriplet, expression, declaration buffers
-	/*
-	 * return true for elements whose contents we might want to add to the java file we are building
-	 */
-	protected boolean isJSPStartRegion(IStructuredDocumentRegion sdRegion) {
-		String type = sdRegion.getFirstRegion().getType();
-		return type == XMLRegionContext.XML_TAG_OPEN || type == XMLJSPRegionContexts.JSP_DECLARATION_OPEN || type == XMLJSPRegionContexts.JSP_EXPRESSION_OPEN || type == XMLJSPRegionContexts.JSP_SCRIPTLET_OPEN || type == XMLJSPRegionContexts.JSP_DIRECTIVE_OPEN || type == XMLJSPRegionContexts.JSP_DIRECTIVE_NAME;
-	}
-
-	protected boolean isDeclaration(String tagName) {
-		return tagName.equalsIgnoreCase("jsp:declaration") //$NON-NLS-1$		
-					|| tagName.equalsIgnoreCase("<%!"); //$NON-NLS-1$		
-	}
-
-	protected boolean isExpression(String tagName) {
-		return tagName.equalsIgnoreCase("jsp:expression") //$NON-NLS-1$		
-					|| tagName.equalsIgnoreCase("<%="); //$NON-NLS-1$
-	}
-
-	protected boolean isScriptlet(String tagName) {
-		return tagName.equalsIgnoreCase("jsp:scriptlet") //$NON-NLS-1$		
-					|| tagName.equalsIgnoreCase("<%"); //$NON-NLS-1$
-	}
-
-	protected boolean isIncludeDirective(String tagName) {
-		return tagName.equalsIgnoreCase("jsp:directive.include") || //$NON-NLS-1$
-					tagName.equalsIgnoreCase("include"); //$NON-NLS-1$
-	}
-
-	protected boolean isTaglibDirective(String tagName) {
-		return tagName.equalsIgnoreCase("jsp:directive.taglib") //$NON-NLS-1$
-					|| tagName.equalsIgnoreCase("taglib"); //$NON-NLS-1$
-	}
-
-	protected boolean isPageDirective(String tagName) {
-		return tagName.equalsIgnoreCase("jsp:directive.page") //$NON-NLS-1$
-					|| tagName.equalsIgnoreCase("page"); //$NON-NLS-1$
-	}
-
-	// different btwn XML-JSP and JSP tags		
-	protected String getRegionName(IStructuredDocumentRegion sdRegion) {
-		ITextRegion nameRegion = null;
-		String nameStr = ""; //$NON-NLS-1$
-		int size = sdRegion.getRegions().size();
-		if (size > 1) {
-			// presumably XML-JSP <jsp:scriptlet> | <jsp:expression> | <jsp:declaration>
-			nameRegion = sdRegion.getRegions().get(1);
-		}
-		else if (size == 1) {
-			// presumably JSP open <% | <%= | <%!
-			nameRegion = sdRegion.getRegions().get(0);
-		}
-		if (nameRegion != null)
-			nameStr = fTextToParse.substring(sdRegion.getStartOffset(nameRegion), sdRegion.getTextEndOffset(nameRegion));
-		return nameStr.trim();
-	}
-
-	protected void processOtherRegions(IStructuredDocumentRegion sdRegion) {
-		processIncludeDirective(sdRegion);
-		processPageDirective(sdRegion);
-	}
-}
\ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/JSPReParser.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/JSPReParser.java
deleted file mode 100644
index 9cedd84..0000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/JSPReParser.java
+++ /dev/null
@@ -1,384 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.parser;
-
-
-import java.util.Iterator;
-
-import org.eclipse.jst.jsp.core.JSP12Namespace;
-import org.eclipse.jst.jsp.core.contentmodel.tld.JSP11TLDNames;
-import org.eclipse.jst.jsp.core.model.parser.XMLJSPRegionContexts;
-import org.eclipse.wst.sse.core.events.StructuredDocumentEvent;
-import org.eclipse.wst.sse.core.exceptions.SourceEditingRuntimeException;
-import org.eclipse.wst.sse.core.internal.text.CoreNodeList;
-import org.eclipse.wst.sse.core.parser.RegionParser;
-import org.eclipse.wst.sse.core.parser.StructuredDocumentRegionParser;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegionList;
-import org.eclipse.wst.sse.core.text.IStructuredTextReParser;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-import org.eclipse.wst.sse.core.text.ITextRegionContainer;
-import org.eclipse.wst.sse.core.text.ITextRegionList;
-import org.eclipse.wst.sse.core.util.Debug;
-import org.eclipse.wst.xml.core.internal.parser.XMLStructuredDocumentReParser;
-import org.eclipse.wst.xml.core.parser.XMLRegionContext;
-
-public class JSPReParser extends XMLStructuredDocumentReParser {
-
-	/**
-	 * Allow a reparser to check for extra syntactic cases that require
-	 * parsing beyond the flatNode boundary.
-	 * 
-	 * This implementation adds JSP language markers (comments are handled
-	 * elsewhere).
-	 */
-	protected StructuredDocumentEvent checkForCrossStructuredDocumentRegionSyntax() {
-		StructuredDocumentEvent result = super.checkForCrossStructuredDocumentRegionSyntax();
-		// None of the superclass' cases were valid, so check for JSP cases
-		if (result == null) {
-			result = checkForJSP();
-		}
-		return result;
-	}
-
-	/**
-	 * A change to a JSP tag can result in all being reparsed.
-	 */
-	private StructuredDocumentEvent checkForJSP() {
-		StructuredDocumentEvent result = null;
-		result = checkForCriticalKey("<%"); //$NON-NLS-1$
-		if (result == null)
-			result = checkForCriticalKey("<%="); //$NON-NLS-1$
-		if (result == null)
-			result = checkForCriticalKey("<%!"); //$NON-NLS-1$
-		if (result == null)
-			result = checkForCriticalKey("%>"); //$NON-NLS-1$
-
-		return result;
-	}
-
-	/**
-	 * If a comment start or end tag is being added or deleted, we'll rescan
-	 * the whole document. The reason is that content that is revealed or
-	 * commented out can effect the interpretation of the rest of the
-	 * document. Note: for now this is very XML/JSP specific, can
-	 * refactor/improve later.
-	 */
-	protected StructuredDocumentEvent checkForComments() {
-
-		StructuredDocumentEvent result = super.checkForComments();
-
-		if (result == null)
-			result = checkForCriticalKey("<%--"); //$NON-NLS-1$
-		if (result == null)
-			result = checkForCriticalKey("--%>"); //$NON-NLS-1$
-		// we'll also check for these degenerate cases
-		if (result == null)
-			result = checkForCriticalKey("<%---%>"); //$NON-NLS-1$
-
-		return result;
-	}
-
-	/**
-	 * The core reparsing method ... after the dirty start and dirty end have
-	 * been calculated elsewhere. - this method overrides, does not extend
-	 * super's method. changes/fixes to super may have to be made here as
-	 * well.
-	 */
-	protected StructuredDocumentEvent reparse(IStructuredDocumentRegion dirtyStart, IStructuredDocumentRegion dirtyEnd) {
-		StructuredDocumentEvent result = null;
-		int rescanStart = -1;
-		int rescanEnd = -1;
-		boolean firstTime = false;
-		boolean detectedBreakingChange = false;
-
-		//
-		// "save" the oldNodes (that may be replaced) in a list
-		CoreNodeList oldNodes = formOldNodes(dirtyStart, dirtyEnd);
-
-		if (containsBreakingChange(oldNodes) || isBreakingWithNestedTag(dirtyStart, dirtyEnd)) {
-			if (Debug.debugTaglibs)
-				System.out.println("reparse: is taglib or include"); //$NON-NLS-1$
-			detectedBreakingChange = true;
-			rescanStart = 0;
-			rescanEnd = fStructuredDocument.getLength() + fLengthDifference;
-			oldNodes = formOldNodes(fStructuredDocument.getFirstStructuredDocumentRegion(), fStructuredDocument.getLastStructuredDocumentRegion());
-			clearTaglibInfo();
-		}
-		else if (dirtyStart == null || dirtyEnd == null) {
-			// dirtyStart or dirty end are null, then that means we didn't
-			// have a
-			// cached node, which means we have an empty document, so we
-			// just need to rescan the changes
-			rescanStart = 0;
-			rescanEnd = fChanges.length();
-			firstTime = true;
-		}
-		else {
-			// set the start of the text to rescan
-			rescanStart = dirtyStart.getStart();
-			//
-			// set the end of the text to rescan
-			// notice we use the same rationale as for the rescanStart,
-			// with the added caveat that length has to be added to it,
-			// to compensate for the new text which has been added or deleted.
-			// If changes has zero length, then "length" will be negative,
-			// since
-			// we are deleting text. Otherwise, use the difference between
-			// what's selected to be replaced and the length of the new text.
-			rescanEnd = dirtyEnd.getEnd() + fLengthDifference;
-		}
-
-		// now that we have the old stuff "saved" away, update the document
-		// with the changes.
-		fStructuredDocument.updateDocumentData(fStart, fLengthToReplace, fChanges);
-		// ------------------ now the real work
-		result = core_reparse(rescanStart, rescanEnd, oldNodes, firstTime);
-		//
-
-		// if we did not detect a breaking type of change at the beginning,
-		// but
-		// do now, then reparse all! If we did detect them, then we may or may
-		// not detect again, but presumably we've already set up to re-parsed
-		// everthing, so no need to do again.
-		if ((!detectedBreakingChange) && (containsBreakingChange(oldNodes))) {
-			clearTaglibInfo();
-			// reparse all
-			oldNodes = formOldNodes(fStructuredDocument.getFirstStructuredDocumentRegion(), fStructuredDocument.getLastStructuredDocumentRegion());
-			result = core_reparse(0, fStructuredDocument.getLength(), oldNodes, firstTime);
-		}
-
-		// event is returned to the caller, incase there is
-		// some optimization they can do
-		return result;
-	}
-
-	/**
-	 * Verifies that the regions given, representing the contents of a
-	 * IStructuredDocumentRegion, contain regions that could alter the
-	 * behavior of the parser or the parsing of areas outside of the regions
-	 * given.
-	 */
-	private boolean isBreakingChange(IStructuredDocumentRegion node, ITextRegionList regions) {
-		return isTaglibOrInclude(node, regions) || isJspRoot(regions);
-	}
-
-	/**
-	 * Verifies that the regions given, representing the regions touched by a
-	 * text change have: 1) ...an insertion at the textEndOffset of an
-	 * XML_TAG_OPEN that's in it's own IStructuredDocumentRegion and preceded
-	 * by an unended IStructuredDocumentRegion 2) ...a deletion happening in
-	 * an XML_EMPTY_TAG_CLOSE that ends a ITextRegionContainer 3) ...an
-	 * insertion happening with a ' <' character somewhere in an XML attribute
-	 * name or value 4) ...a deletion of a normal XML_TAG_CLOSE since
-	 * subsequent tags become attribute values
-	 */
-
-	private boolean isBreakingWithNestedTag(boolean changesIncludeA_lt, boolean delsIncludeA_gt, IStructuredDocumentRegion parent, ITextRegion region) {
-		boolean result = false;
-
-		IStructuredDocumentRegion previous = parent.getPrevious();
-		// case 1 test
-		if (parent.getRegions().size() == 1 && region.getType() == XMLRegionContext.XML_TAG_OPEN && (previous == null || (!previous.isEnded() || previous.getType() == XMLRegionContext.XML_CONTENT))) {
-			result = true;
-		}
-		//case 2 test
-		if (region instanceof ITextRegionContainer) {
-			ITextRegionContainer container = (ITextRegionContainer) region;
-			ITextRegion internal = container.getRegions().get(container.getRegions().size() - 1);
-			if (internal.getType() == XMLRegionContext.WHITE_SPACE && container.getRegions().size() >= 2)
-				internal = container.getRegions().get(container.getRegions().size() - 2);
-			if (internal.getType() == XMLRegionContext.XML_EMPTY_TAG_CLOSE) {
-				result = true;
-			}
-		}
-		//case 3 test
-		if (changesIncludeA_lt && (region.getType() == XMLRegionContext.XML_TAG_ATTRIBUTE_NAME || region.getType() == XMLRegionContext.XML_TAG_ATTRIBUTE_VALUE)) {
-			result = true;
-		}
-		//case 4 test
-		if (delsIncludeA_gt && region.getType() == XMLRegionContext.XML_TAG_CLOSE) {
-			result = true;
-		}
-		return result;
-	}
-
-	/**
-	 * Verifies that the regions given, representing the contents of a
-	 * IStructuredDocumentRegion, includes a jsp:root tag
-	 */
-	private boolean isJspRoot(ITextRegionList regions) {
-		return regions.size() > 1 && regions.get(0).getType() == XMLRegionContext.XML_TAG_OPEN && regions.get(1).getType() == XMLJSPRegionContexts.JSP_ROOT_TAG_NAME;
-	}
-
-	/**
-	 * Verifies that the regions given, representing the contents of a
-	 * IStructuredDocumentRegion, includes a valid taglib directive or include
-	 * directive
-	 */
-	private boolean isTaglibOrInclude(IStructuredDocumentRegion node, ITextRegionList regions) {
-		boolean sizeAndTypesMatch = (regions.size() > 1) && (regions.get(1).getType() == XMLJSPRegionContexts.JSP_DIRECTIVE_NAME)
-					&& (regions.get(0).getType() == XMLJSPRegionContexts.JSP_DIRECTIVE_OPEN || regions.get(0).getType() == XMLRegionContext.XML_TAG_OPEN);
-		if (!sizeAndTypesMatch)
-			return false;
-		ITextRegion region = regions.get(1);
-		String directiveName = node.getText(region);
-		return sizeAndTypesMatch
-					&& (directiveName.equals(JSP11TLDNames.TAGLIB) || directiveName.equals(JSP11TLDNames.INCLUDE) || directiveName.equals(JSP12Namespace.ElementName.DIRECTIVE_TAGLIB) || directiveName
-								.equals(JSP12Namespace.ElementName.DIRECTIVE_INCLUDE));
-	}
-
-	private void clearTaglibInfo() {
-		if (Debug.debugTaglibs)
-			System.out.println("clearing taglib info"); //$NON-NLS-1$
-		RegionParser parser = fStructuredDocument.getParser();
-		if (parser instanceof StructuredDocumentRegionParser)
-			((StructuredDocumentRegionParser) parser).resetHandlers();
-	}
-
-	private boolean containsBreakingChange(IStructuredDocumentRegionList list) {
-		boolean contains = false;
-		for (int i = 0; i < list.getLength(); i++) {
-			IStructuredDocumentRegion node = list.item(i);
-			if (isBreakingChange(node, node.getRegions())) {
-				contains = true;
-				break;
-			}
-		}
-		return contains;
-	}
-
-	protected IStructuredDocumentRegion findDirtyEnd(int end) {
-
-		IStructuredDocumentRegion result = super.findDirtyEnd(end);
-
-		// if not well formed, get one past, if its not null
-
-		// now, if any of to-be-scanned flatnodes are the start of a jsp
-		// region, we'll
-		// reparse all the way to the end, to be sure we detect embedded
-		// regions (or not-embedded regions) correctly.
-		// notice we don't need to do if we're only processing one node.
-		// notice too we have a strong assumption here that dirtyStart has
-		// already been found!
-		//
-		// note that dirtyEnd is not checked in the do-block below, so we'll
-		// check it first.
-		if (isJSPEmbeddedStartOrEnd(result)) {
-			result = fStructuredDocument.getLastStructuredDocumentRegion();
-		}
-		else {
-			// when end node and start node are the same, we only need the
-			// above
-			// check, otherwise, there's a few cases that we'll search the
-			// rest of the
-			// flatnodes needlessly.
-			if (result != dirtyStart) {
-				IStructuredDocumentRegion searchNode = dirtyStart;
-				do {
-					if (isJSPEmbeddedStartOrEnd(searchNode)) {
-						result = fStructuredDocument.getLastStructuredDocumentRegion();
-						break;
-					}
-					else {
-						searchNode = searchNode.getNext();
-					}
-					// if we get to the current dirty end, or end of
-					// flatnodes, without finding JSP region then we
-					// don't need to check further
-				}
-				while ((searchNode != result) && (searchNode != null));
-			}
-		}
-		// result should never be null, but cachedNode needs to be protected
-		// from being changed to null
-		if (result != null)
-			fStructuredDocument.setCachedDocumentRegion(result);
-		dirtyEnd = result;
-		return dirtyEnd;
-	}
-
-	private boolean isBreakingWithNestedTag(IStructuredDocumentRegion start, IStructuredDocumentRegion end) {
-		boolean result = false;
-		boolean changesIncludeA_lt = fChanges != null && fChanges.indexOf('<') >= 0;
-		boolean delsIncludeA_gt = fDeletedText != null && fDeletedText.indexOf('>') >= 0;
-
-		//List regions = new ArrayList();
-		IStructuredDocumentRegion node = start;
-		int endReplace = fStart + fLengthToReplace;
-		while (end != null && node != end.getNext()) {
-			Iterator i = node.getRegions().iterator();
-			while (i.hasNext()) {
-				ITextRegion region = (ITextRegion) i.next();
-				if (intersects(node, region, fStart, endReplace)) {
-
-					result = isBreakingWithNestedTag(changesIncludeA_lt, delsIncludeA_gt, node, region);
-
-					if (result)
-						break;
-				}
-			}
-			node = node.getNext();
-			if (result)
-				break;
-		}
-		return result;
-	}
-
-	private boolean intersects(IStructuredDocumentRegion node, ITextRegion region, int low, int high) {
-		int start = node.getStartOffset(region);
-		int end = node.getEndOffset(region);
-		return (end >= low && start <= high) || (start <= low && end >= low) || (start <= high && end >= high);
-	}
-
-	/**
-	 * Returns true if potentially could be a jsp embedded region. Things like
-	 * JSP Declaration can't be embedded.
-	 */
-	private boolean isJSPEmbeddedStartOrEnd(IStructuredDocumentRegion flatNode) {
-		boolean result = false;
-		String type = flatNode.getType();
-		result = ((type == XMLJSPRegionContexts.JSP_SCRIPTLET_OPEN) || (type == XMLJSPRegionContexts.JSP_EXPRESSION_OPEN) || (type == XMLJSPRegionContexts.JSP_DECLARATION_OPEN));
-		return result;
-	}
-
-	/**
-	 * extends super class behavior
-	 */
-	protected boolean isPartOfBlockRegion(IStructuredDocumentRegion flatNode) {
-		boolean result = false;
-		String type = flatNode.getType();
-		result = ((type == XMLJSPRegionContexts.JSP_CLOSE) || (type == XMLJSPRegionContexts.JSP_CONTENT) || super.isPartOfBlockRegion(flatNode));
-		return result;
-	}
-
-	public IStructuredTextReParser newInstance() {
-		return new JSPReParser();
-	}
-
-	public StructuredDocumentEvent quickCheck() {
-		if (containsBreakingChange(new CoreNodeList(dirtyStart, dirtyEnd)))
-			return null;
-		return super.quickCheck();
-	}
-
-	public Object clone() {
-		try {
-			return super.clone();
-		}
-		catch (CloneNotSupportedException e) {
-			// could only happen if some changes
-			// superclass someday
-			throw new SourceEditingRuntimeException(e);
-		}
-	}
-
-}
\ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/JSPSourceParser.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/JSPSourceParser.java
deleted file mode 100644
index 8011160..0000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/JSPSourceParser.java
+++ /dev/null
@@ -1,435 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.parser;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jst.jsp.core.JSP12Namespace;
-import org.eclipse.jst.jsp.core.contentmodel.tld.JSP12TLDNames;
-import org.eclipse.jst.jsp.core.internal.parser.internal.JSPTokenizer;
-import org.eclipse.jst.jsp.core.model.parser.XMLJSPRegionContexts;
-import org.eclipse.wst.sse.core.internal.text.IRegionComparible;
-import org.eclipse.wst.sse.core.parser.BlockTokenizer;
-import org.eclipse.wst.sse.core.parser.JSPCapableParser;
-import org.eclipse.wst.sse.core.parser.RegionParser;
-import org.eclipse.wst.sse.core.parser.StructuredDocumentRegionHandler;
-import org.eclipse.wst.sse.core.parser.StructuredDocumentRegionHandlerExtension;
-import org.eclipse.wst.sse.core.parser.StructuredDocumentRegionParser;
-import org.eclipse.wst.sse.core.parser.TagMarker;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-import org.eclipse.wst.sse.core.text.ITextRegionContainer;
-import org.eclipse.wst.sse.core.text.ITextRegionList;
-import org.eclipse.wst.sse.core.util.Debug;
-import org.eclipse.wst.sse.core.util.StringUtils;
-import org.eclipse.wst.xml.core.internal.parser.XMLSourceParser;
-import org.eclipse.wst.xml.core.parser.XMLRegionContext;
-
-/**
- * Takes input from the JSPTokenizer and creates a tag list
- */
-
-public class JSPSourceParser extends XMLSourceParser implements JSPCapableParser {
-	protected class NestablePrefixHandler implements StructuredDocumentRegionHandler, StructuredDocumentRegionHandlerExtension {
-
-		private static final String XMLNS = "xmlns:";
-
-		/**
-		 * Enables a TLD owning the given prefix loaded from the given URI at
-		 * the anchorFlatNode. The list of additionalCMDocuments will claim to
-		 * not know any of its tags at positions earlier than that
-		 * IStructuredDocumentRegion's position.
-		 * 
-		 * For taglib directives, the taglib is the anchor while taglibs
-		 * registered through include directives use the primary include
-		 * directive as their anchor.
-		 */
-		protected void enableForTaglib(String prefix, IStructuredDocumentRegion anchorFlatNode) {
-			if (prefix == null)
-				return;
-			List tagmarkers = ((JSPTokenizer) getTokenizer()).getNestablePrefixes();
-			for (int i = 0; i < tagmarkers.size(); i++) {
-				if (((TagMarker) tagmarkers.get(i)).getTagName().equals(prefix))
-					return;
-			}
-			((JSPTokenizer) getTokenizer()).getNestablePrefixes().add(new TagMarker(prefix, anchorFlatNode));
-		}
-
-		public void nodeParsed(IStructuredDocumentRegion aCoreFlatNode) {
-			// could test > 1, but since we only care if there are 8 (<%@,
-			// taglib, uri, =, where, prefix, =, what) [or 4 for includes]
-			if (aCoreFlatNode.getNumberOfRegions() > 4 && aCoreFlatNode.getRegions().get(1).getType() == XMLJSPRegionContexts.JSP_DIRECTIVE_NAME) {
-				ITextRegion name = aCoreFlatNode.getRegions().get(1);
-				try {
-					int offset = aCoreFlatNode.getStartOffset(name);
-					int length = name.getTextLength();
-					boolean taglibdetected = false;
-					boolean taglibdirectivedetected = false;
-					if (fCharSequenceSource instanceof IRegionComparible) {
-						taglibdetected = ((IRegionComparible) fCharSequenceSource).regionMatches(offset, length, JSP12TLDNames.TAGLIB);
-						taglibdirectivedetected = ((IRegionComparible) fCharSequenceSource).regionMatches(offset, length, JSP12Namespace.ElementName.DIRECTIVE_TAGLIB);
-					}
-					else {
-						// old fashioned way
-						String directiveName = getText(offset, length);
-						taglibdetected = directiveName.equals(JSP12TLDNames.TAGLIB);
-						taglibdirectivedetected = directiveName.equals(JSP12Namespace.ElementName.DIRECTIVE_TAGLIB);
-					}
-					boolean processDirectiveName = taglibdetected || taglibdirectivedetected;
-					if (processDirectiveName) {
-						processTaglib(aCoreFlatNode);
-					}
-				}
-				catch (StringIndexOutOfBoundsException sioobExc) {
-					//do nothing
-				}
-			}
-			// could test > 1, but since we only care if there are 5 (<,
-			// jsp:root, xmlns:prefix, =, where)
-			else if (aCoreFlatNode.getNumberOfRegions() > 4 && (aCoreFlatNode.getRegions().get(1)).getType() == XMLJSPRegionContexts.JSP_ROOT_TAG_NAME) {
-				processJSPRoot(aCoreFlatNode);
-			}
-		}
-
-		protected void processJSPRoot(IStructuredDocumentRegion taglibFlatNode) {
-			ITextRegionList regions = taglibFlatNode.getRegions();
-			String prefix = null;
-			boolean taglib = false;
-			try {
-				for (int i = 0; i < regions.size(); i++) {
-					ITextRegion region = regions.get(i);
-					if (region.getType() == XMLRegionContext.XML_TAG_ATTRIBUTE_NAME) {
-						int offset = taglibFlatNode.getStartOffset(region);
-						int length = region.getTextLength();
-
-						String name = getText(offset, length);
-						if (name.startsWith(XMLNS) && name.length() > XMLNS.length()) { //$NON-NLS-1$
-							prefix = name.substring(6);
-							taglib = true;
-						}
-						else {
-							prefix = null;
-							taglib = false;
-						}
-					}
-					else if (taglib && region.getType() == XMLRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
-						prefix = StringUtils.strip(prefix);
-						if (prefix != null && prefix.length() > 0) {
-							enableForTaglib(prefix, taglibFlatNode);
-							prefix = null;
-						}
-					}
-				}
-			}
-			catch (StringIndexOutOfBoundsException sioobExc) {
-				// nothing to be done
-				prefix = null;
-			}
-		}
-
-		/**
-		 * Pulls the prefix from the given taglib directive
-		 * IStructuredDocumentRegion and makes sure the prefix is nestable.
-		 */
-		protected void processTaglib(IStructuredDocumentRegion taglibFlatNode) {
-			ITextRegionList regions = taglibFlatNode.getRegions();
-			String prefix = null;
-			boolean prefixname = false;
-			try {
-				for (int i = 0; i < regions.size(); i++) {
-					ITextRegion region = regions.get(i);
-					if (region.getType() == XMLRegionContext.XML_TAG_ATTRIBUTE_NAME) {
-						if (fCharSequenceSource != null && fCharSequenceSource instanceof IRegionComparible) {
-							int offset = taglibFlatNode.getStartOffset(region);
-							int length = region.getTextLength();
-							prefixname = ((IRegionComparible) fCharSequenceSource).regionMatches(offset, length, JSP12TLDNames.PREFIX);
-						}
-						else {
-							// old fashioned way
-							prefixname = (getText(taglibFlatNode.getStartOffset(region), region.getTextLength()).equals(JSP12TLDNames.PREFIX));
-						}
-					}
-					else if (prefixname && region.getType() == XMLRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
-						prefix = getText(taglibFlatNode.getStartOffset(region), region.getTextLength());
-					}
-				}
-			}
-			catch (StringIndexOutOfBoundsException sioobExc) {
-				// nothing to be done
-				prefix = null;
-			}
-			prefix = StringUtils.strip(prefix);
-			if (prefix != null && prefix.length() > 0) {
-				enableForTaglib(prefix, taglibFlatNode);
-			}
-		}
-
-		public void resetNodes() {
-			Iterator tagmarkers = ((JSPTokenizer) getTokenizer()).getNestablePrefixes().iterator();
-			while (tagmarkers.hasNext()) {
-				if (!((TagMarker) tagmarkers.next()).isGlobal())
-					tagmarkers.remove();
-			}
-		}
-
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see com.ibm.sse.model.parser.StructuredDocumentRegionHandlerExtension#setStructuredDocument(com.ibm.sse.model.text.IStructuredDocument)
-		 */
-		public void setStructuredDocument(IStructuredDocument newDocument) {
-			resetNodes();
-			getStructuredDocumentRegionHandlers().remove(this);
-			if (newDocument != null && newDocument.getParser() instanceof StructuredDocumentRegionParser) {
-				((StructuredDocumentRegionParser) newDocument.getParser()).addStructuredDocumentRegionHandler(this);
-			}
-		}
-	}
-
-	/**
-	 * JSPSourceParser constructor comment.
-	 */
-	public JSPSourceParser() {
-		super();
-	}
-
-	public void addNestablePrefix(TagMarker marker) {
-		((JSPTokenizer) getTokenizer()).addNestablePrefix(marker);
-	}
-
-	public List getNestablePrefixes() {
-		return ((JSPTokenizer) getTokenizer()).getNestablePrefixes();
-	}
-
-	protected BlockTokenizer getTokenizer() {
-		if (fTokenizer == null) {
-			fTokenizer = new JSPTokenizer();
-			getStructuredDocumentRegionHandlers().add(new NestablePrefixHandler());
-		}
-		return fTokenizer;
-	}
-
-	/**
-	 * @see com.ibm.sed.parser.RegionParser#newInstance()
-	 */
-	public RegionParser newInstance() {
-		JSPSourceParser newInstance = new JSPSourceParser();
-		newInstance.setTokenizer(getTokenizer().newInstance());
-		return newInstance;
-	}
-
-	protected IStructuredDocumentRegion parseNodes() {
-		// regions are initially reported as complete offsets within the
-		// scanned input
-		// they are adjusted here to be indexes from the currentNode's start
-		// offset
-		IStructuredDocumentRegion headNode = null;
-		IStructuredDocumentRegion lastNode = null;
-		ITextRegion region = null;
-		// DMW: 2/12/03. Made current node local variable, since
-		// we changed class to not require state
-		IStructuredDocumentRegion currentNode = null;
-		String type = null;
-
-		while ((region = getNextRegion()) != null) {
-			type = region.getType();
-			// these types (might) demand a IStructuredDocumentRegion for each
-			// of them
-			if (type == XMLRegionContext.BLOCK_TEXT) {
-				if (currentNode != null && currentNode.getLastRegion().getType() == XMLRegionContext.BLOCK_TEXT) {
-					// multiple block texts indicated embedded containers; no
-					// new IStructuredDocumentRegion
-					currentNode.addRegion(region);
-					currentNode.setLength(region.getStart() + region.getLength() - currentNode.getStart());
-					region.adjustStart(-currentNode.getStart());
-					// DW, 4/16/2003 token regions no longer have parents
-					//region.setParent(currentNode);
-					if (region instanceof ITextRegionContainer) {
-						((ITextRegionContainer) region).setParent(currentNode);
-					}
-				}
-				else {
-					// not continuing a IStructuredDocumentRegion
-					if (currentNode != null) {
-						// ensure that any existing node is at least
-						// terminated
-						if (!currentNode.isEnded()) {
-							currentNode.setLength(region.getStart() - currentNode.getStart());
-							// fCurrentNode.setTextLength(region.getStart() -
-							// fCurrentNode.getStart());
-						}
-						lastNode = currentNode;
-					}
-					fireNodeParsed(currentNode);
-					currentNode = createStructuredDocumentRegion(type);
-					if (lastNode != null) {
-						lastNode.setNext(currentNode);
-					}
-					currentNode.setPrevious(lastNode);
-					currentNode.setStart(region.getStart());
-					currentNode.setLength(region.getStart() + region.getLength() - currentNode.getStart());
-					currentNode.setEnded(true);
-					region.adjustStart(-currentNode.getStart());
-					currentNode.addRegion(region);
-					// DW, 4/16/2003 token regions no longer have parents
-					//region.setParent(currentNode);
-					if (region instanceof ITextRegionContainer) {
-						((ITextRegionContainer) region).setParent(currentNode);
-					}
-
-				}
-			}
-			// the following contexts OPEN new StructuredDocumentRegions
-			else if ((currentNode != null && currentNode.isEnded()) || (type == XMLRegionContext.XML_CONTENT) || (type == XMLRegionContext.XML_CHAR_REFERENCE) || (type == XMLRegionContext.XML_ENTITY_REFERENCE)
-						|| (type == XMLRegionContext.XML_PI_OPEN) || (type == XMLRegionContext.XML_TAG_OPEN) || (type == XMLRegionContext.XML_END_TAG_OPEN) || (type == XMLRegionContext.XML_COMMENT_OPEN) || (type == XMLRegionContext.XML_CDATA_OPEN)
-						|| (type == XMLRegionContext.XML_DECLARATION_OPEN) || (type == XMLJSPRegionContexts.JSP_COMMENT_OPEN) || (type == XMLJSPRegionContexts.JSP_DECLARATION_OPEN) || (type == XMLJSPRegionContexts.JSP_DIRECTIVE_OPEN)
-						|| (type == XMLJSPRegionContexts.JSP_EXPRESSION_OPEN) || (type == XMLJSPRegionContexts.JSP_SCRIPTLET_OPEN) || (type == XMLJSPRegionContexts.JSP_CLOSE) || type == XMLJSPRegionContexts.JSP_EL_OPEN) {
-				if (currentNode != null) {
-					// ensure that any existing node is at least terminated
-					if (!currentNode.isEnded()) {
-						currentNode.setLength(region.getStart() - currentNode.getStart());
-						// fCurrentNode.setTextLength(region.getStart() -
-						// fCurrentNode.getStart());
-					}
-					lastNode = currentNode;
-				}
-				fireNodeParsed(currentNode);
-				currentNode = createStructuredDocumentRegion(type);
-				if (lastNode != null) {
-					lastNode.setNext(currentNode);
-				}
-				currentNode.setPrevious(lastNode);
-				currentNode.setStart(region.getStart());
-				currentNode.addRegion(region);
-				currentNode.setLength(region.getStart() + region.getLength() - currentNode.getStart());
-				region.adjustStart(-currentNode.getStart());
-				// DW, 4/16/2003 token regions no longer have parents
-				//region.setParent(currentNode);
-				if (region instanceof ITextRegionContainer) {
-					((ITextRegionContainer) region).setParent(currentNode);
-				}
-
-			}
-			// the following contexts NEITHER open nor close
-			// StructuredDocumentRegions; just add to them
-			else if ((type == XMLRegionContext.XML_TAG_NAME) || (type == XMLRegionContext.XML_TAG_ATTRIBUTE_NAME) || (type == XMLRegionContext.XML_TAG_ATTRIBUTE_EQUALS) || (type == XMLRegionContext.XML_TAG_ATTRIBUTE_VALUE)
-						|| (type == XMLRegionContext.XML_COMMENT_TEXT) || (type == XMLRegionContext.XML_PI_CONTENT) || (type == XMLRegionContext.XML_DOCTYPE_INTERNAL_SUBSET) || (type == XMLJSPRegionContexts.JSP_COMMENT_TEXT)
-						|| (type == XMLJSPRegionContexts.JSP_ROOT_TAG_NAME) || (type == XMLJSPRegionContexts.JSP_DIRECTIVE_NAME) || type == XMLJSPRegionContexts.JSP_EL_CONTENT) {
-				currentNode.addRegion(region);
-				currentNode.setLength(region.getStart() + region.getLength() - currentNode.getStart());
-				region.adjustStart(-currentNode.getStart());
-				// DW, 4/16/2003 token regions no longer have parents
-				//region.setParent(currentNode);
-				if (region instanceof ITextRegionContainer) {
-					((ITextRegionContainer) region).setParent(currentNode);
-				}
-			}
-			// the following contexts close off StructuredDocumentRegions
-			// cleanly
-			else if ((type == XMLRegionContext.XML_PI_CLOSE) || (type == XMLRegionContext.XML_TAG_CLOSE) || (type == XMLRegionContext.XML_EMPTY_TAG_CLOSE) || (type == XMLRegionContext.XML_COMMENT_CLOSE) || (type == XMLRegionContext.XML_CDATA_CLOSE)
-						|| (type == XMLJSPRegionContexts.JSP_CLOSE) || (type == XMLJSPRegionContexts.JSP_COMMENT_CLOSE) || (type == XMLJSPRegionContexts.JSP_DIRECTIVE_CLOSE) || (type == XMLRegionContext.XML_DECLARATION_CLOSE)
-						|| type == XMLJSPRegionContexts.JSP_EL_CLOSE) {
-				currentNode.setEnded(true);
-				currentNode.setLength(region.getStart() + region.getLength() - currentNode.getStart());
-				currentNode.addRegion(region);
-				region.adjustStart(-currentNode.getStart());
-				// DW, 4/16/2003 token regions no longer have parents
-				//region.setParent(currentNode);
-				if (region instanceof ITextRegionContainer) {
-					((ITextRegionContainer) region).setParent(currentNode);
-				}
-			}
-			// this is extremely rare, but valid
-			else if (type == XMLRegionContext.WHITE_SPACE) {
-				ITextRegion lastRegion = currentNode.getLastRegion();
-				// pack the embedded container with this region
-				if (lastRegion instanceof ITextRegionContainer) {
-					ITextRegionContainer container = (ITextRegionContainer) lastRegion;
-					container.getRegions().add(region);
-					// DW, 4/16/2003 container regions have parent. Probably a
-					// better place to set,
-					// but for now, will (re)set each time through
-					container.setParent(currentNode);
-					// DW, 4/16/2003 token regions no longer have parents
-					//region.setParent(container);
-					region.adjustStart(container.getLength() - region.getStart());
-				}
-				currentNode.getLastRegion().adjustLengthWith(region.getLength());
-				currentNode.adjustLengthWith(region.getLength());
-			}
-			else if (type == XMLRegionContext.UNDEFINED && currentNode != null) {
-				// skip on a very-first region situation as the default
-				// behavior is good enough
-				// combine with previous if also undefined
-				if (currentNode.getLastRegion() != null && currentNode.getLastRegion().getType() == XMLRegionContext.UNDEFINED) {
-					currentNode.getLastRegion().adjustLengthWith(region.getLength());
-					currentNode.adjustLengthWith(region.getLength());
-				}
-				// previous wasn't undefined
-				else {
-					currentNode.addRegion(region);
-					currentNode.setLength(region.getStart() + region.getLength() - currentNode.getStart());
-					region.adjustStart(-currentNode.getStart());
-				}
-				if (region instanceof ITextRegionContainer) {
-					((ITextRegionContainer) region).setParent(currentNode);
-				}
-			}
-			else {
-				// if an unknown type is the first region in the document,
-				// ensure that a node exists
-				if (currentNode == null) {
-					currentNode = createStructuredDocumentRegion(type);
-					currentNode.setStart(region.getStart());
-				}
-				currentNode.addRegion(region);
-				currentNode.setLength(region.getStart() + region.getLength() - currentNode.getStart());
-				region.adjustStart(-currentNode.getStart());
-				// DW, 4/16/2003 token regions no longer have parents
-				//region.setParent(currentNode);
-				if (region instanceof ITextRegionContainer) {
-					((ITextRegionContainer) region).setParent(currentNode);
-				}
-
-				if (Debug.debugTokenizer)
-					System.out.println(getClass().getName() + " found region of not specifically handled type " + region.getType() + " @ " + region.getStart() + "[" + region.getLength() + "]");//$NON-NLS-4$//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
-
-			}
-
-			// these regions also get their own node, so close them cleanly
-			// NOTE: these regions have new StructuredDocumentRegions created
-			// for them above; it may
-			// be more readable if that is handled here as well, but the
-			// current layout
-			// ensures that they open StructuredDocumentRegions the same way
-			if ((type == XMLRegionContext.XML_CONTENT) || (type == XMLRegionContext.XML_CHAR_REFERENCE) || (type == XMLRegionContext.XML_ENTITY_REFERENCE) || (type == XMLJSPRegionContexts.JSP_DECLARATION_OPEN)
-						|| (type == XMLJSPRegionContexts.JSP_EXPRESSION_OPEN) || (type == XMLJSPRegionContexts.JSP_SCRIPTLET_OPEN) || (type == XMLJSPRegionContexts.JSP_CONTENT) || (type == XMLJSPRegionContexts.JSP_CLOSE)) {
-				currentNode.setEnded(true);
-			}
-			if (headNode == null && currentNode != null) {
-				headNode = currentNode;
-			}
-		}
-		if (currentNode != null) {
-			fireNodeParsed(currentNode);
-			currentNode.setPrevious(lastNode);
-		}
-		primReset();
-		return headNode;
-	}
-
-	public void removeNestablePrefix(String tagName) {
-		((JSPTokenizer) getTokenizer()).removeNestablePrefix(tagName);
-	}
-
-}
\ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/internal/JSPParserRegionFactory.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/internal/JSPParserRegionFactory.java
deleted file mode 100644
index 4ce1d19..0000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/internal/JSPParserRegionFactory.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.parser.internal;
-
-import org.eclipse.jst.jsp.core.internal.parser.JSPCodeRegion;
-import org.eclipse.jst.jsp.core.model.parser.XMLJSPRegionContexts;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-import org.eclipse.wst.xml.core.internal.parser.regions.XMLParserRegionFactory;
-
-/**
- * 
- * This region factory is very specific to the parser output, 
- * and the specific implementation classes for various regions.
- */
-public class JSPParserRegionFactory extends XMLParserRegionFactory {
-	public JSPParserRegionFactory() {
-		super();
-	}
-
-	public ITextRegion createToken(String context, int start, int textLength, int length, String lang, String surroundingTag) {
-		ITextRegion newRegion = null;
-		if (context == XMLJSPRegionContexts.JSP_CONTENT) {
-			newRegion = new JSPCodeRegion(context, start, textLength, length);
-		}
-		else
-			newRegion = super.createToken(context, start, textLength, length, lang, surroundingTag);
-		return newRegion;
-	}
-}
\ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/tasks/JSPTaskTagSeeker.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/tasks/JSPTaskTagSeeker.java
deleted file mode 100644
index 9797cd1..0000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/tasks/JSPTaskTagSeeker.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.tasks;
-
-import org.eclipse.jst.jsp.core.model.parser.XMLJSPRegionContexts;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-import org.eclipse.wst.xml.core.builder.delegates.XMLTaskTagSeeker;
-
-public class JSPTaskTagSeeker extends XMLTaskTagSeeker {
-	protected boolean isCommentRegion(IStructuredDocumentRegion region, ITextRegion textRegion) {
-		return super.isCommentRegion(region, textRegion) || textRegion.getType().equals(XMLJSPRegionContexts.JSP_COMMENT_TEXT);
-	}
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/breakpointproviders/AbstractBreakpointProvider.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/breakpointproviders/AbstractBreakpointProvider.java
deleted file mode 100644
index 5abe8c9..0000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/breakpointproviders/AbstractBreakpointProvider.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.ui.breakpointproviders;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jst.jsp.core.JSP12Namespace;
-import org.eclipse.jst.jsp.core.contentmodel.tld.TLDElementDeclaration;
-import org.eclipse.jst.jsp.core.model.parser.XMLJSPRegionContexts;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNode;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.sse.core.IStructuredModel;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.sse.core.contentmodel.CMNodeWrapper;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-import org.eclipse.wst.sse.core.text.ITextRegionCollection;
-import org.eclipse.wst.sse.core.text.ITextRegionList;
-import org.eclipse.wst.sse.ui.extensions.breakpoint.IBreakpointProvider;
-import org.eclipse.wst.xml.core.document.XMLDocument;
-import org.eclipse.wst.xml.core.modelquery.ModelQueryUtil;
-import org.eclipse.wst.xml.core.parser.XMLRegionContext;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * Abstract breakpoint provider class which implements breakpoint provider
- * interface.
- * 
- * This is a temporary class for JavaBreakpointProvider and
- * JavaScriptBreakpointProvider, and should be refactored to separate Java and
- * JavaScript parts.
- */
-public abstract class AbstractBreakpointProvider implements IBreakpointProvider {
-
-	private static final String JSP_DIRECTIVE_PAGE = "jsp:directive.page"; //$NON-NLS-1$
-	private static final String[] JAVASCRIPT_LANGUAGE_KEYS = new String[]{"javascript", "javascript1.0", "javascript1.1_3", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-				"javascript1.2", "javascript1.3", "javascript1.4", "javascript1.5", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-				"javascript1.6", "jscript", "sashscript"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-	protected static final int UNSUPPORTED = 0;
-	protected static final int JAVA = 1;
-	protected static final int JAVASCRIPT = 2;
-
-	protected static final int END_OF_LINE = -1;
-	protected static final int NO_VALID_CONTENT = -2;
-
-	protected int getValidPosition(Document doc, IDocument idoc, int lineNumber) {
-		if (doc == null)
-			return NO_VALID_CONTENT;
-		if (idoc == null)
-			return NO_VALID_CONTENT;
-
-		int startOffset, endOffset;
-		try {
-			startOffset = idoc.getLineOffset(lineNumber - 1);
-			endOffset = idoc.getLineOffset(lineNumber) - 1;
-
-			if (idoc == null)
-				return NO_VALID_CONTENT;
-			String lineText = idoc.get(startOffset, endOffset - startOffset).trim();
-
-			// blank lines or lines with only an open or close brace or
-			// scriptlet tag cannot have a breakpoint
-			if (lineText.equals("") || lineText.equals("{") || //$NON-NLS-2$//$NON-NLS-1$
-						lineText.equals("}") || lineText.equals("<%"))//$NON-NLS-2$//$NON-NLS-1$
-				return NO_VALID_CONTENT;
-		}
-		catch (BadLocationException e) {
-			return NO_VALID_CONTENT;
-		}
-
-		IStructuredDocumentRegion flatNode = ((IStructuredDocument) idoc).getRegionAtCharacterOffset(startOffset);
-		// go through the node's regions looking for JSP content
-		// until reaching the end of the line
-		while (flatNode != null) {
-			int validPosition = getValidRegionPosition(((XMLDocument) doc).getModel(), flatNode, startOffset, endOffset);
-
-			if (validPosition == END_OF_LINE)
-				return NO_VALID_CONTENT;
-
-			if (validPosition >= 0)
-				return validPosition;
-
-			flatNode = flatNode.getNext();
-		}
-		return NO_VALID_CONTENT;
-	}
-
-	/*
-	 * Search the RegionContainer's regions looking for JSP content.
-	 * If valid content is found, return the position >= 0
-	 * If no valid content is found, return NO_VALID_CONTENT.
-	 * If a region starts after the line's endOffset, return END_OF_LINE.
-	 */
-	private static int getValidRegionPosition(IStructuredModel model, ITextRegionCollection regionContainer, int startOffset, int endOffset) {
-
-		ITextRegionList regions = regionContainer.getRegions();
-		for (int i = 0; i < regions.size(); i++) {
-			ITextRegion region = regions.get(i);
-			if (region instanceof ITextRegionCollection) {
-				int validPosition = getValidRegionPosition(model, (ITextRegionCollection) region, startOffset, endOffset);
-				if (validPosition == END_OF_LINE || validPosition >= 0)
-					return validPosition;
-			}
-			else {
-				// region must be at least partially on selected line
-				if (regionContainer.getEndOffset(region) > startOffset) {
-
-					int regionStartOffset = regionContainer.getStartOffset(region);
-					// if region starts after line's endOffset, we're done searching
-					if (regionStartOffset > endOffset)
-						return END_OF_LINE;
-
-					// If region is JSP content, make sure the language is Java not Javascript by
-					// checking the content assist adapter's type.
-					if (region.getType().equals(XMLJSPRegionContexts.JSP_CONTENT)) {
-						// DWM: this logic is not incorrect ... given changes to adapters, etc.
-						// but probably don't need anything here, since both Java and JavaScript
-						// are supported in V5.
-
-						// nsd_TODO: verify this!!!
-
-						//						INodeNotifier notifier = (INodeNotifier)model.getNode(region.getStartOffset());
-						//						AdapterFactory factory = model.getFactoryRegistry().getFactoryFor(ContentAssistAdapter.class);
-						//						if(factory instanceof HTMLContentAssistAdapterFactory) {
-						//							INodeAdapter adapter = ((HTMLContentAssistAdapterFactory)factory).createAdapter(notifier, region);
-						//							if(adapter != null && adapter instanceof JSPJavaContentAssistAdapter)
-
-						if (regionStartOffset > startOffset)
-							return regionStartOffset;
-						else
-							return startOffset;
-						//						}
-					}
-					// a custom tag, jsp:useBean, getproperty or setproperty statement is also a valid breakpoint location
-					else if (region.getType().equals(XMLRegionContext.XML_TAG_NAME) && (isCustomTagRegion(model.getIndexedRegion(regionStartOffset)) || regionContainer.getText(region).equals(JSP12Namespace.ElementName.USEBEAN) || regionContainer.getText(region).equals(JSP12Namespace.ElementName.GETPROPERTY) || regionContainer.getText(region).equals(JSP12Namespace.ElementName.SETPROPERTY))) {
-
-						if (regionStartOffset > startOffset)
-							return regionStartOffset;
-						else
-							return startOffset;
-					}
-					else {
-						// Defect #241090, the Text Nodes inside of JSP scriptlets, expressions, and declarations are valid
-						// breakpoint-able locations
-						boolean isCodeNode = false;
-						IndexedRegion node = model.getIndexedRegion(regionStartOffset);
-						if (node != null && node instanceof Node) {
-							Node domNode = (Node) node;
-							Node root = domNode.getOwnerDocument().getDocumentElement();
-							if (root != null && root.getNodeName().equals(JSP12Namespace.ElementName.ROOT) && domNode.getNodeType() == Node.TEXT_NODE && domNode.getParentNode() != null) {
-								String parentName = domNode.getParentNode().getNodeName();
-								isCodeNode = parentName.equals(JSP12Namespace.ElementName.SCRIPTLET) || parentName.equals(JSP12Namespace.ElementName.EXPRESSION) || parentName.equals(JSP12Namespace.ElementName.DECLARATION);
-							}
-						}
-						if (isCodeNode) {
-							if (regionStartOffset > startOffset)
-								return regionStartOffset;
-							else
-								return startOffset;
-						}
-					}
-				}
-			}
-		}
-		return NO_VALID_CONTENT;
-	}
-
-	private static boolean isCustomTagRegion(IndexedRegion node) {
-
-		if (node instanceof Element) {
-			Element xmlElement = (Element) node;
-			ModelQuery mq = ModelQueryUtil.getModelQuery(xmlElement.getOwnerDocument());
-			CMElementDeclaration decl = mq.getCMElementDeclaration(xmlElement);
-			if (decl instanceof CMNodeWrapper) {
-				CMNode cmNode = ((CMNodeWrapper) decl).getOriginNode();
-				return cmNode instanceof TLDElementDeclaration;
-			}
-		}
-		return false;
-	}
-
-	protected IResource getEditorInputResource(IEditorInput input) {
-		IResource resource = (IResource) input.getAdapter(IFile.class);
-		if (resource == null) {
-			resource = (IResource) input.getAdapter(IResource.class);
-		}
-		return resource;
-	}
-
-
-	/*
-	 * Return the page language
-	 */
-	protected static int getPageLanguage(Document doc) {
-		if (doc == null)
-			return UNSUPPORTED;
-
-		NodeList pageDirectives = doc.getElementsByTagName(JSP_DIRECTIVE_PAGE);
-		// Search for first language directive
-		for (int i = 0; i < pageDirectives.getLength(); i++) {
-			Node child = pageDirectives.item(i);
-			Node languageAttr = child.getAttributes().getNamedItem("language"); //$NON-NLS-1$
-			if (languageAttr != null) {
-				String pageLanguage = languageAttr.getNodeValue();
-				if (pageLanguage == null || pageLanguage.length() == 0)
-					return UNSUPPORTED;
-				pageLanguage = pageLanguage.toLowerCase();
-				if (contains(JAVASCRIPT_LANGUAGE_KEYS, pageLanguage))
-					return JAVASCRIPT;
-				else if (pageLanguage.equals("java"))//$NON-NLS-1$
-					return JAVA;
-				else
-					return UNSUPPORTED;
-			}
-		}
-		return JAVA; // Java is default if no language directive
-	}
-
-	protected static boolean contains(String[] haystack, String needle) {
-		for (int i = 0; i < haystack.length; i++) {
-			if (haystack[i].equals(needle)) {
-				return true;
-			}
-		}
-		return false;
-	}
-}
\ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/NoRegionContentAssistProcessorForJSP.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/NoRegionContentAssistProcessorForJSP.java
deleted file mode 100644
index 3e3bf10..0000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/NoRegionContentAssistProcessorForJSP.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * 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
- * 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.ITextViewer;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jst.jsp.core.JSP11Namespace;
-import org.eclipse.jst.jsp.core.internal.text.rules.StructuredTextPartitionerForJSP;
-import org.eclipse.jst.jsp.core.model.parser.XMLJSPRegionContexts;
-import org.eclipse.wst.html.core.internal.text.rules.StructuredTextPartitionerForHTML;
-import org.eclipse.wst.html.ui.internal.contentassist.NoRegionContentAssistProcessorForHTML;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.rules.StructuredTextPartitioner;
-import org.eclipse.wst.xml.core.text.rules.StructuredTextPartitionerForXML;
-
-/**
- * 
- * @author pavery
- */
-public class NoRegionContentAssistProcessorForJSP extends NoRegionContentAssistProcessorForHTML {
-
-	private String[] fJSPContexts = null;
-
-	public NoRegionContentAssistProcessorForJSP() {
-		super();
-		initJSPContexts();
-	}
-
-	/* 
-	 * @see org.eclipse.wst.html.ui.internal.contentassist.NoRegionContentAssistProcessorForHTML#initPartitionToProcessorMap()
-	 */
-	protected void initPartitionToProcessorMap() {
-		super.initPartitionToProcessorMap();
-		IContentAssistProcessor jspContentAssistProcessor = new JSPContentAssistProcessor();
-		// JSP
-		fPartitionToProcessorMap.put(StructuredTextPartitioner.ST_DEFAULT_PARTITION, jspContentAssistProcessor);
-		fPartitionToProcessorMap.put(StructuredTextPartitionerForXML.ST_DEFAULT_XML, jspContentAssistProcessor);
-		fPartitionToProcessorMap.put(StructuredTextPartitionerForHTML.ST_DEFAULT_HTML, jspContentAssistProcessor);
-		fPartitionToProcessorMap.put(StructuredTextPartitionerForHTML.ST_HTML_COMMENT, jspContentAssistProcessor);
-		fPartitionToProcessorMap.put(StructuredTextPartitionerForJSP.ST_DEFAULT_JSP, jspContentAssistProcessor);
-		// JSP directives
-		fPartitionToProcessorMap.put(StructuredTextPartitionerForJSP.ST_JSP_DIRECTIVE, jspContentAssistProcessor);
-		// JSP delimiters
-		fPartitionToProcessorMap.put(StructuredTextPartitionerForJSP.ST_JSP_CONTENT_DELIMITER, jspContentAssistProcessor);
-		// JSP JavaScript
-		fPartitionToProcessorMap.put(StructuredTextPartitionerForJSP.ST_JSP_CONTENT_JAVASCRIPT, jspContentAssistProcessor);
-
-		IContentAssistProcessor jspJavaContentAssistProcessor = new JSPJavaContentAssistProcessor();
-		// JSP Java
-		fPartitionToProcessorMap.put(StructuredTextPartitionerForJSP.ST_JSP_CONTENT_JAVA, jspJavaContentAssistProcessor);
-	}
-
-	/* 
-	 * @see com.ibm.sse.editor.xml.contentassist.NoRegionContentAssistProcessor#initNameToProcessorMap()
-	 */
-	protected void initNameToProcessorMap() {
-		super.initNameToProcessorMap();
-		JSPPropertyContentAssistProcessor jspPropertyCAP = new JSPPropertyContentAssistProcessor();
-		fNameToProcessorMap.put(JSP11Namespace.ElementName.SETPROPERTY, jspPropertyCAP);
-		fNameToProcessorMap.put(JSP11Namespace.ElementName.GETPROPERTY, jspPropertyCAP);
-		fNameToProcessorMap.put(JSP11Namespace.ElementName.USEBEAN, new JSPUseBeanContentAssistProcessor());
-	}
-
-	private void initJSPContexts() {
-		fJSPContexts = new String[]{XMLJSPRegionContexts.JSP_CLOSE, XMLJSPRegionContexts.JSP_CONTENT, XMLJSPRegionContexts.JSP_DECLARATION_OPEN, XMLJSPRegionContexts.JSP_EXPRESSION_OPEN, XMLJSPRegionContexts.JSP_SCRIPTLET_OPEN};
-	}
-
-	/**
-	 * Quick check to see if context (String) should map to JSPContentAssistProcessor.
-	 * @param context
-	 * @return if it's a JSP Region (for which we need JSP Content assist)
-	 */
-	private boolean isJSPRegion(IStructuredDocumentRegion sdRegion) {
-		String context = sdRegion.getType();
-		for (int i = 0; i < fJSPContexts.length; i++) {
-			if (context == fJSPContexts[i])
-				return true;
-		}
-		return false;
-	}
-
-	/*
-	 * @see com.ibm.sse.editor.xml.contentassist.NoRegionContentAssistProcessor#guessContentAssistProcessor(org.eclipse.jface.text.ITextViewer, int)
-	 */
-	protected IContentAssistProcessor guessContentAssistProcessor(ITextViewer viewer, int documentOffset) {
-		IContentAssistProcessor p = super.guessContentAssistProcessor(viewer, documentOffset);
-		if (p == null) {
-			IStructuredDocumentRegion sdRegion = ((IStructuredDocument) viewer.getDocument()).getRegionAtCharacterOffset(documentOffset);
-			if (isJSPRegion(sdRegion))
-				p = (IContentAssistProcessor) fPartitionToProcessorMap.get(StructuredTextPartitionerForJSP.ST_JSP_CONTENT_JAVA);
-		}
-		return p;
-	}
-}
\ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/taginfo/JSPTagInfoHoverProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/taginfo/JSPTagInfoHoverProcessor.java
deleted file mode 100644
index dc8689b..0000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/taginfo/JSPTagInfoHoverProcessor.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.ui.taginfo;
-
-
-
-import org.eclipse.jst.jsp.core.model.parser.XMLJSPRegionContexts;
-import org.eclipse.wst.html.ui.taginfo.HTMLTagInfoHoverProcessor;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-import org.eclipse.wst.xml.core.document.XMLNode;
-
-/**
- * Provides hover help documentation for JSP tags
- */
-public class JSPTagInfoHoverProcessor extends HTMLTagInfoHoverProcessor {
-
-	/* (non-Javadoc)
-	 * @see com.ibm.sed.structured.taginfo.AbstractTextHoverProcessor#computeRegionHelp(com.ibm.sed.model.IndexedRegion, com.ibm.sed.model.xml.XMLNode, com.ibm.sed.structured.text.IStructuredDocumentRegion, com.ibm.sed.structured.text.ITextRegion)
-	 */
-	protected String computeRegionHelp(IndexedRegion treeNode, XMLNode parentNode, IStructuredDocumentRegion flatNode, ITextRegion region) {
-		String result = null;
-
-		if (region == null)
-			return null;
-
-		String regionType = region.getType();
-		if (regionType == XMLJSPRegionContexts.JSP_DIRECTIVE_NAME) {
-			result = computeJSPDirHelp((XMLNode) treeNode, parentNode, flatNode, region);
-		}
-		else
-			result = super.computeRegionHelp(treeNode, parentNode, flatNode, region);
-
-		return result;
-	}
-
-	/**
-	 * Computes the hover help for the jsp directive name
-	 * for now, treat jsp directives like any other tag name
-	 */
-	protected String computeJSPDirHelp(XMLNode xmlnode, XMLNode parentNode, IStructuredDocumentRegion flatNode, ITextRegion region) {
-		return computeTagNameHelp(xmlnode, parentNode, flatNode, region);
-	}
-
-}
\ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/text/JSPDocumentRegionEdgeMatcher.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/text/JSPDocumentRegionEdgeMatcher.java
deleted file mode 100644
index dab2eaa..0000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/text/JSPDocumentRegionEdgeMatcher.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.ui.text;
-
-import org.eclipse.jdt.internal.ui.text.JavaPairMatcher;
-import org.eclipse.jst.jsp.core.model.parser.XMLJSPRegionContexts;
-import org.eclipse.wst.sse.ui.text.DocumentRegionEdgeMatcher;
-import org.eclipse.wst.xml.core.parser.XMLRegionContext;
-
-public class JSPDocumentRegionEdgeMatcher extends DocumentRegionEdgeMatcher {
-
-	protected final static char[] BRACKETS = {'{', '}', '(', ')', '[', ']'};
-
-	/**
-	 * @param validContexts
-	 * @param nextMatcher
-	 */
-	public JSPDocumentRegionEdgeMatcher() {
-		super(new String[]{XMLRegionContext.XML_TAG_NAME, XMLRegionContext.XML_COMMENT_TEXT, XMLJSPRegionContexts.JSP_COMMENT_TEXT, XMLJSPRegionContexts.JSP_DIRECTIVE_NAME, XMLJSPRegionContexts.JSP_ROOT_TAG_NAME, XMLRegionContext.XML_CDATA_TEXT, XMLRegionContext.XML_PI_OPEN, XMLRegionContext.XML_PI_CONTENT}, new JavaPairMatcher(BRACKETS));
-	}
-}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/cleanup/HTMLCleanupHandlerFactory.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/cleanup/HTMLCleanupHandlerFactory.java
deleted file mode 100644
index c1d0eb9..0000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/cleanup/HTMLCleanupHandlerFactory.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.cleanup;
-
-
-
-import org.eclipse.wst.sse.core.cleanup.IStructuredCleanupHandler;
-import org.eclipse.wst.sse.core.cleanup.IStructuredCleanupPreferences;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.xml.core.document.XMLNode;
-import org.eclipse.wst.xml.core.parser.XMLRegionContext;
-import org.w3c.dom.Node;
-
-// nakamori_TODO: check and remove CSS formatting
-
-class HTMLCleanupHandlerFactory {
-
-
-
-	private static HTMLCleanupHandlerFactory fInstance = null;
-
-	static synchronized HTMLCleanupHandlerFactory getInstance() {
-		if (fInstance == null) {
-			fInstance = new HTMLCleanupHandlerFactory();
-		}
-		return fInstance;
-	}
-
-	private HTMLCleanupHandlerFactory() {
-		super();
-	}
-
-	IStructuredCleanupHandler createHandler(Node node, IStructuredCleanupPreferences cleanupPreferences) {
-		short nodeType = node.getNodeType();
-		IStructuredCleanupHandler handler = null;
-		switch (nodeType) {
-			case Node.ELEMENT_NODE : {
-				if (isJSPTag(node))
-					handler = new JSPElementNodeCleanupHandler();
-				else
-					handler = new ElementNodeCleanupHandler();
-				break;
-			}
-			case Node.TEXT_NODE : {
-				if (isParentStyleTag(node))
-					handler = new CSSTextNodeCleanupHandler();
-				else
-					handler = new NodeCleanupHandler();
-				break;
-			}
-			default : {
-				handler = new NodeCleanupHandler();
-			}
-		}
-
-		handler.setCleanupPreferences(cleanupPreferences);
-
-		return handler;
-	}
-
-	/**
-	 * ISSUE: this is a bit of hidden JSP knowledge that was implemented this
-	 * way for expedency. Should be evolved in future to depend on "nestedContext".
-	 */
-
-	private boolean isJSPTag(Node node) {
-
-		final String JSP_CLOSE = "JSP_CLOSE"; //$NON-NLS-1$
-		// final String JSP_COMMENT_CLOSE = "JSP_COMMENT_CLOSE"; //$NON-NLS-1$
-
-		// final String JSP_COMMENT_OPEN = "JSP_COMMENT_OPEN"; //$NON-NLS-1$
-		// final String JSP_COMMENT_TEXT = "JSP_COMMENT_TEXT"; //$NON-NLS-1$
-
-		final String JSP_CONTENT = "JSP_CONTENT"; //$NON-NLS-1$
-		final String JSP_DECLARATION_OPEN = "JSP_DECLARATION_OPEN"; //$NON-NLS-1$
-		final String JSP_DIRECTIVE_CLOSE = "JSP_DIRECTIVE_CLOSE"; //$NON-NLS-1$
-		final String JSP_DIRECTIVE_NAME = "JSP_DIRECTIVE_NAME"; //$NON-NLS-1$
-
-		final String JSP_DIRECTIVE_OPEN = "JSP_DIRECTIVE_OPEN"; //$NON-NLS-1$
-		final String JSP_EXPRESSION_OPEN = "JSP_EXPRESSION_OPEN"; //$NON-NLS-1$
-
-		// final String JSP_ROOT_TAG_NAME = "JSP_ROOT_TAG_NAME"; //$NON-NLS-1$
-
-		final String JSP_SCRIPTLET_OPEN = "JSP_SCRIPTLET_OPEN"; //$NON-NLS-1$
-
-		boolean result = false;
-
-		if (node instanceof XMLNode) {
-			IStructuredDocumentRegion flatNode = ((XMLNode) node).getFirstStructuredDocumentRegion();
-			// in some cases, the nodes exists, but hasn't been associated
-			// with
-			// a flatnode yet (the screen updates can be initiated on a
-			// different thread,
-			// so the request for a flatnode can come in before the node is
-			// fully formed.
-			// if the flatnode is null, we'll just allow the defaults to
-			// apply.
-			if (flatNode != null) {
-				String flatNodeType = flatNode.getType();
-				// should not be null, but just to be sure
-				if (flatNodeType != null) {
-					if ((flatNodeType.equals(JSP_CONTENT)) || (flatNodeType.equals(JSP_EXPRESSION_OPEN)) || (flatNodeType.equals(JSP_SCRIPTLET_OPEN)) || (flatNodeType.equals(JSP_DECLARATION_OPEN)) || (flatNodeType.equals(JSP_DIRECTIVE_CLOSE)) || (flatNodeType.equals(JSP_DIRECTIVE_NAME)) || (flatNodeType.equals(JSP_DIRECTIVE_OPEN)) || (flatNodeType.equals(JSP_CLOSE))) {
-						result = true;
-					}
-				}
-			}
-		}
-
-		return result;
-	}
-
-	private boolean isParentStyleTag(Node node) {
-		if (node == null)
-			return false;
-		if (node.getNodeType() != Node.TEXT_NODE)
-			return false;
-		if (!(node instanceof XMLNode))
-			return false;
-		IStructuredDocumentRegion flatNode = ((XMLNode) node).getFirstStructuredDocumentRegion();
-		if (flatNode == null)
-			return false;
-		if (flatNode.getType() != XMLRegionContext.BLOCK_TEXT)
-			return false;
-
-		// check if the parent is STYLE element
-		Node parent = node.getParentNode();
-		if (parent == null)
-			return false;
-		if (parent.getNodeType() != Node.ELEMENT_NODE)
-			return false;
-		String name = parent.getNodeName();
-		if (name == null)
-			return false;
-		if (!name.equalsIgnoreCase("STYLE"))//$NON-NLS-1$
-			return false;
-		return true;
-	}
-
-}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/DocumentStyleImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/DocumentStyleImpl.java
deleted file mode 100644
index def2557..0000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/DocumentStyleImpl.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Sep 2, 2003
- *
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.wst.html.core.document;
-
-import org.eclipse.wst.css.core.adapters.IStyleSheetListAdapter;
-import org.eclipse.wst.sse.core.INodeAdapter;
-import org.eclipse.wst.xml.core.document.XMLDocument;
-import org.eclipse.wst.xml.core.document.XMLModel;
-import org.eclipse.wst.xml.core.internal.document.DocumentImpl;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.css.CSSStyleDeclaration;
-import org.w3c.dom.css.DocumentCSS;
-import org.w3c.dom.stylesheets.StyleSheetList;
-
-/**
- * @author davidw
- *
- * To change the template for this generated type comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class DocumentStyleImpl extends DocumentImpl implements XMLDocument, DocumentCSS {
-	public DocumentStyleImpl() {
-		super();
-	}
-
-	protected DocumentStyleImpl(DocumentImpl that) {
-		super(that);
-	}
-
-	public CSSStyleDeclaration getOverrideStyle(Element element, String pseudoName) {
-		INodeAdapter adapter = getAdapterFor(IStyleSheetListAdapter.class);
-		if (adapter == null)
-			return null;
-		return ((IStyleSheetListAdapter) adapter).getOverrideStyle(element, pseudoName);
-	}
-
-	public StyleSheetList getStyleSheets() {
-		INodeAdapter adapter = getAdapterFor(IStyleSheetListAdapter.class);
-		if (adapter == null)
-			return null;
-		return ((IStyleSheetListAdapter) adapter).getStyleSheets();
-	}
-
-	protected void releaseStyleSheets() {
-		INodeAdapter adapter = getExistingAdapter(IStyleSheetListAdapter.class);
-		if (adapter == null)
-			return;
-		((IStyleSheetListAdapter) adapter).releaseStyleSheets();
-	}
-
-	/**
-	 * createElement method
-	 * @return org.w3c.dom.Element
-	 * @param tagName java.lang.String
-	 */
-	public Element createElement(String tagName) throws DOMException {
-		checkTagNameValidity(tagName);
-
-		ElementStyleImpl element = new ElementStyleImpl();
-		element.setOwnerDocument(this);
-		element.setTagName(tagName);
-		return element;
-	}
-
-	/**
-	 * cloneNode method
-	 * @return org.w3c.dom.Node
-	 * @param deep boolean
-	 */
-	public Node cloneNode(boolean deep) {
-		DocumentStyleImpl cloned = new DocumentStyleImpl(this);
-		if (deep)
-			cloned.importChildNodes(this, true);
-		return cloned;
-	}
-
-	protected void setModel(XMLModel model) {
-		super.setModel(model);
-	}
-}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/MetaDataAdapter.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/MetaDataAdapter.java
deleted file mode 100644
index 4ef5276..0000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/MetaDataAdapter.java
+++ /dev/null
@@ -1,301 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.document;
-
-
-
-import java.util.Iterator;
-
-import org.eclipse.wst.sse.core.INodeNotifier;
-import org.eclipse.wst.sse.core.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-import org.eclipse.wst.sse.core.text.ITextRegionList;
-import org.eclipse.wst.xml.core.document.TagAdapter;
-import org.eclipse.wst.xml.core.document.XMLElement;
-import org.eclipse.wst.xml.core.document.XMLModel;
-import org.eclipse.wst.xml.core.parser.XMLRegionContext;
-
-/**
- */
-public class MetaDataAdapter implements TagAdapter, MetaData {
-
-	private XMLElement element = null;
-	private String type = null;
-	private String data = null;
-	private String endData = null;
-
-	/**
-	 */
-	public MetaDataAdapter(String type) {
-		super();
-
-		if (type != null) {
-			if (type.equals(ANNOTATION)) {
-				this.type = ANNOTATION;
-			}
-			else if (type.equals(AUTHOR_TIME_VISUAL)) {
-				this.type = AUTHOR_TIME_VISUAL;
-			}
-			else {
-				this.type = type;
-			}
-		}
-	}
-
-	/**
-	 */
-	private String getData(IStructuredDocumentRegion flatNode) {
-		if (flatNode == null)
-			return null;
-		ITextRegionList regions = flatNode.getRegions();
-		if (regions == null)
-			return null;
-
-		String data = null;
-		Iterator e = regions.iterator();
-		while (e.hasNext()) {
-			ITextRegion region = (ITextRegion) e.next();
-			String regionType = region.getType();
-			if (isCommentText(regionType)) {
-				data = flatNode.getText(region);
-				break;
-			}
-		}
-		if (data == null)
-			return null;
-		int length = data.length();
-		int offset = 0;
-		for (; offset < length; offset++) {
-			char c = data.charAt(offset);
-			if (c == '\r' || c == '\n') {
-				offset++;
-				break;
-			}
-		}
-		for (; offset < length; offset++) {
-			char c = data.charAt(offset);
-			if (c != '\r' && c != '\n') {
-				break;
-			}
-		}
-		return data.substring(offset);
-	}
-
-	private boolean isCommentText(String regionType) {
-		boolean result = false;
-		result = isDOMComment(regionType) || isNestedContentComment(regionType);
-		return result;
-	}
-
-	/**
-	 * ISSUE: this is a bit of hidden JSP knowledge that was implemented this
-	 * way for expedency. Should be evolved in future to depend on
-	 * "nestedContext".
-	 */
-
-	private boolean isNestedContentComment(String regionType) {
-		final String JSP_COMMENT_TEXT = "JSP_COMMENT_TEXT"; //$NON-NLS-1$
-		return regionType.equals(JSP_COMMENT_TEXT);
-	}
-
-	private boolean isDOMComment(String regionType) {
-		return regionType == XMLRegionContext.XML_COMMENT_TEXT;
-	}
-
-	public String getData() {
-		if (this.element == null)
-			return null;
-		IStructuredDocumentRegion flatNode = this.element.getStartStructuredDocumentRegion();
-		if (flatNode == null)
-			return null;
-		if (this.data != null)
-			return this.data;
-		return getData(flatNode);
-	}
-
-	/**
-	 */
-	private String getDelimiter(XMLModel model) {
-		String delim = null;
-		if (model != null) {
-			IStructuredDocument structuredDocument = model.getStructuredDocument();
-			if (structuredDocument != null)
-				delim = structuredDocument.getLineDelimiter();
-		}
-		if (delim == null)
-			delim = "\r\n";//$NON-NLS-1$
-		return delim;
-	}
-
-	/**
-	 */
-	public String getEndData() {
-		if (this.element == null)
-			return null;
-		IStructuredDocumentRegion flatNode = this.element.getEndStructuredDocumentRegion();
-		if (flatNode == null)
-			return null;
-		if (this.endData != null)
-			return this.endData;
-		return getData(flatNode);
-	}
-
-	/**
-	 */
-	public String getEndTag(XMLElement element) {
-		StringBuffer buffer = new StringBuffer();
-		if (element.isJSPTag())
-			buffer.append("<%--");//$NON-NLS-1$
-		else
-			buffer.append("<!--");//$NON-NLS-1$
-		buffer.append(METADATA);
-		buffer.append(' ');
-		buffer.append(TYPE);
-		buffer.append("=\"");//$NON-NLS-1$
-		buffer.append(this.type);
-		buffer.append("\" ");//$NON-NLS-1$
-		buffer.append(MetaData.ENDSPAN);
-		String data = getEndData();
-		if (data != null && data.length() > 0) {
-			String delim = getDelimiter(element.getModel());
-			buffer.append(delim);
-			buffer.append(data);
-			buffer.append(delim);
-		}
-		if (element.isJSPTag())
-			buffer.append("--%>");//$NON-NLS-1$
-		else
-			buffer.append("-->");//$NON-NLS-1$
-
-		return buffer.toString();
-	}
-
-	/**
-	 */
-	public String getStartTag(XMLElement element) {
-		StringBuffer buffer = new StringBuffer();
-		if (element.isJSPTag())
-			buffer.append("<%--");//$NON-NLS-1$
-		else
-			buffer.append("<!--");//$NON-NLS-1$
-		buffer.append(METADATA);
-		buffer.append(' ');
-		buffer.append(TYPE);
-		buffer.append("=\"");//$NON-NLS-1$
-		buffer.append(this.type);
-		buffer.append("\" ");//$NON-NLS-1$
-		buffer.append(MetaData.STARTSPAN);
-		String data = getData();
-		if (data != null && data.length() > 0) {
-			String delim = getDelimiter(element.getModel());
-			buffer.append(delim);
-			buffer.append(data);
-			buffer.append(delim);
-		}
-		if (element.isJSPTag())
-			buffer.append("--%>");//$NON-NLS-1$
-		else
-			buffer.append("-->");//$NON-NLS-1$
-
-		return buffer.toString();
-	}
-
-	/**
-	 */
-	public String getType() {
-		return this.type;
-	}
-
-	/**
-	 */
-	public boolean isAdapterForType(Object type) {
-		return (type == TagAdapter.class || type == MetaDataAdapter.class);
-	}
-
-	/**
-	 */
-	public boolean isEndTag() {
-		if (this.element == null)
-			return false;
-		if (this.element.hasStartTag())
-			return false;
-		if (this.element.hasEndTag())
-			return true;
-		if (this.data != null)
-			return false;
-		return (this.endData != null);
-	}
-
-	/**
-	 */
-	public boolean isRuntimeContainer() {
-		return (this.type == ANNOTATION || this.type == AUTHOR_TIME_VISUAL);
-	}
-
-	/**
-	 */
-	public void notifyChanged(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos) {
-	}
-
-	/**
-	 */
-	public void setData(String data) {
-		this.data = data;
-
-		if (this.element != null)
-			this.element.notifyStartTagChanged();
-	}
-
-	/**
-	 */
-	public void setEndData(String data) {
-		this.endData = data;
-
-		if (this.element != null)
-			this.element.notifyEndTagChanged();
-	}
-
-	/**
-	 */
-	public void setElement(XMLElement element) {
-		this.element = element;
-
-		if (this.element != null) {
-			this.element.setCommentTag(true);
-			if (this.type != MetaData.ANNOTATION) {
-				this.element.setJSPTag(true);
-			}
-		}
-	}
-
-	/**
-	 */
-	public void setRuntimeSource(String source) {
-		if (source == null)
-			return;
-		if (this.element == null)
-			return;
-		if (isRuntimeContainer())
-			return;
-
-		XMLModel model = this.element.getModel();
-		if (model == null)
-			return;
-		IStructuredDocument structuredDocument = model.getStructuredDocument();
-		if (structuredDocument == null)
-			return;
-		int offset = this.element.getStartEndOffset();
-		int end = this.element.getEndStartOffset();
-		int length = end - offset;
-		structuredDocument.replaceText(model, offset, length, source);
-	}
-}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLElementFormatter.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLElementFormatter.java
deleted file mode 100644
index f219d94..0000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLElementFormatter.java
+++ /dev/null
@@ -1,356 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.format;
-
-import java.util.Iterator;
-
-import org.eclipse.wst.css.core.adapters.IStyleDeclarationAdapter;
-import org.eclipse.wst.css.core.document.ICSSModel;
-import org.eclipse.wst.css.core.document.ICSSNode;
-import org.eclipse.wst.css.core.format.CSSSourceFormatter;
-import org.eclipse.wst.html.core.HTMLFormatContraints;
-import org.eclipse.wst.sse.core.INodeAdapter;
-import org.eclipse.wst.sse.core.INodeNotifier;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-import org.eclipse.wst.sse.core.text.ITextRegionList;
-import org.eclipse.wst.xml.core.document.XMLElement;
-import org.eclipse.wst.xml.core.document.XMLNode;
-import org.eclipse.wst.xml.core.format.IStructuredFormatPreferencesXML;
-import org.eclipse.wst.xml.core.parser.XMLRegionContext;
-import org.w3c.dom.Attr;
-import org.w3c.dom.NamedNodeMap;
-
-// nakamori_TODO: check and remove CSS formatting
-
-public class HTMLElementFormatter extends HTMLFormatter implements XMLRegionContext {
-
-	/**
-	 */
-	protected HTMLElementFormatter() {
-		super();
-	}
-
-	/**
-	 */
-	private void compressTailingSpaces(IStructuredDocumentRegion flatNode, ITextRegion region) {
-		int offset = region.getTextEnd();
-		int count = region.getEnd() - offset;
-		if (count == 1) {
-			String source = flatNode.getFullText(region);
-			int start = region.getStart();
-			if (source != null && source.charAt(offset - start) == ' ') {
-				// nothing to do
-				return;
-			}
-		}
-		replaceSource(flatNode, offset, count, " ");//$NON-NLS-1$
-	}
-
-	/**
-	 */
-	private void formatEndTag(XMLElement element, HTMLFormatContraints contraints) {
-		IStructuredDocumentRegion endStructuredDocumentRegion = element.getEndStructuredDocumentRegion();
-		if (endStructuredDocumentRegion == null)
-			return;
-
-		if (element.isJSPTag() || element.isCommentTag()) {
-			String endTag = endStructuredDocumentRegion.getText();
-			if (endTag != null && endTag.length() > 0) {
-				setWidth(contraints, endTag);
-			}
-			return;
-		}
-
-		ITextRegion prevRegion = null;
-		ITextRegionList regions = endStructuredDocumentRegion.getRegions();
-		Iterator e = regions.iterator();
-		while (e.hasNext()) {
-			ITextRegion region = (ITextRegion) e.next();
-			if (region == null)
-				continue;
-			String regionType = region.getType();
-			if (regionType == XML_TAG_NAME || isNestedTag(regionType)) {
-				if (prevRegion != null && prevRegion.getType() == XML_END_TAG_OPEN) {
-					removeTailingSpaces(endStructuredDocumentRegion, prevRegion);
-				}
-			}
-			else if (regionType == XML_TAG_CLOSE) {
-				if (prevRegion != null && (prevRegion.getType() == XML_TAG_NAME || isNestedRootTag(prevRegion.getType()))) {
-					removeTailingSpaces(endStructuredDocumentRegion, prevRegion);
-				}
-			}
-			prevRegion = region;
-		}
-		if (prevRegion != null && (prevRegion.getType() == XML_TAG_NAME || isNestedRootTag(prevRegion.getType()))) {
-			removeTailingSpaces(endStructuredDocumentRegion, prevRegion);
-		}
-
-		String newEndTag = endStructuredDocumentRegion.getText();
-		if (newEndTag != null && newEndTag.length() > 0) {
-			setWidth(contraints, newEndTag);
-		}
-	}
-
-	/**
-	 */
-	protected void formatNode(XMLNode node, HTMLFormatContraints contraints) {
-		if (node == null)
-			return;
-		XMLElement element = (XMLElement) node;
-
-		formatStartTag(element, contraints);
-
-		formatChildNodes(element, contraints);
-
-		formatEndTag(element, contraints);
-	}
-
-	/**
-	 */
-	private void formatStartTag(XMLElement element, HTMLFormatContraints contraints) {
-		IStructuredDocumentRegion startStructuredDocumentRegion = element.getStartStructuredDocumentRegion();
-		if (startStructuredDocumentRegion == null)
-			return;
-
-		// We should format attributes in JSPTag?
-		// if (element.isJSPTag() || element.isCommentTag()) {
-		if (element.isCommentTag()) {
-			String startTag = startStructuredDocumentRegion.getText();
-			if (startTag != null && startTag.length() > 0) {
-				setWidth(contraints, startTag);
-			}
-			return;
-		}
-
-		// first process style attribute
-		if (element.isGlobalTag()) {
-			Attr attr = element.getAttributeNode("style");//$NON-NLS-1$
-			if (attr != null)
-				formatStyleAttr(attr);
-		}
-		boolean insertBreak = false;
-		insertBreak = ((IStructuredFormatPreferencesXML) getFormatPreferences()).getSplitMultiAttrs();
-
-		if (insertBreak) {
-			NamedNodeMap attributes = element.getAttributes();
-			if (attributes == null || attributes.getLength() < 2)
-				insertBreak = false;
-		}
-		String breakSpaces = getBreakSpaces(element);
-		String indent = getIndent();
-		if (indent != null && indent.length() > 0) {
-			breakSpaces += indent;
-		}
-		ITextRegion lastBreakRegion = null;
-
-		ITextRegion prevRegion = null;
-		ITextRegionList regions = startStructuredDocumentRegion.getRegions();
-		Iterator e = regions.iterator();
-		while (e.hasNext()) {
-			ITextRegion region = (ITextRegion) e.next();
-			if (region == null)
-				continue;
-
-			ITextRegion breakRegion = null;
-
-			String regionType = region.getType();
-			if (regionType == XML_TAG_NAME || isNestedTag(regionType)) {
-				if (prevRegion != null && prevRegion.getType() == XML_TAG_OPEN) {
-					removeTailingSpaces(startStructuredDocumentRegion, prevRegion);
-				}
-				breakRegion = region;
-			}
-			else if (regionType == XML_TAG_ATTRIBUTE_NAME) {
-				if (prevRegion != null && (prevRegion.getType() == XML_TAG_ATTRIBUTE_NAME || prevRegion.getType() == XML_TAG_ATTRIBUTE_EQUALS)) {
-					// attribute name without value
-					breakRegion = prevRegion;
-				}
-			}
-			else if (regionType == XML_TAG_ATTRIBUTE_EQUALS) {
-				if (prevRegion != null && prevRegion.getType() == XML_TAG_ATTRIBUTE_NAME) {
-					removeTailingSpaces(startStructuredDocumentRegion, prevRegion);
-				}
-			}
-			else if (regionType == XML_TAG_ATTRIBUTE_VALUE) {
-				if (prevRegion != null && prevRegion.getType() == XML_TAG_ATTRIBUTE_EQUALS) {
-					removeTailingSpaces(startStructuredDocumentRegion, prevRegion);
-				}
-				breakRegion = region;
-			}
-			else if (regionType == XML_TAG_CLOSE || regionType == XML_EMPTY_TAG_CLOSE) {
-				if (prevRegion != null && (prevRegion.getType() == XML_TAG_ATTRIBUTE_NAME || prevRegion.getType() == XML_TAG_ATTRIBUTE_EQUALS)) {
-					// attribute name without value
-					breakRegion = prevRegion;
-				}
-			}
-
-			if (breakRegion != null) {
-				int end = breakRegion.getTextEnd();
-				if (lastBreakRegion != null) {
-					int offset = lastBreakRegion.getEnd();
-					int count = end - offset;
-					if (insertBreak || !isWidthAvailable(contraints, count + 1)) {
-						replaceTailingSpaces(startStructuredDocumentRegion, lastBreakRegion, breakSpaces);
-						setWidth(contraints, breakSpaces);
-					}
-					else {
-						compressTailingSpaces(startStructuredDocumentRegion, lastBreakRegion);
-						addWidth(contraints, 1);
-					}
-					addWidth(contraints, count);
-				}
-				else {
-					addWidth(contraints, end);
-				}
-				lastBreakRegion = breakRegion;
-			}
-
-			prevRegion = region;
-		}
-		if (prevRegion != null && (prevRegion.getType() == XML_TAG_ATTRIBUTE_NAME || prevRegion.getType() == XML_TAG_ATTRIBUTE_EQUALS)) {
-			// attribute name without value
-			int end = prevRegion.getTextEnd();
-			if (lastBreakRegion != null) {
-				int offset = lastBreakRegion.getEnd();
-				int count = end - offset;
-				if (insertBreak || !isWidthAvailable(contraints, count + 1)) {
-					replaceTailingSpaces(startStructuredDocumentRegion, lastBreakRegion, breakSpaces);
-					setWidth(contraints, breakSpaces);
-				}
-				else {
-					compressTailingSpaces(startStructuredDocumentRegion, lastBreakRegion);
-					addWidth(contraints, 1);
-				}
-				addWidth(contraints, count);
-			}
-			else {
-				addWidth(contraints, end);
-			}
-			lastBreakRegion = prevRegion;
-		}
-
-		if (lastBreakRegion != null) {
-			int offset = lastBreakRegion.getTextEnd();
-			int count = startStructuredDocumentRegion.getLength() - offset;
-			if (prevRegion != null && prevRegion.getType() == XML_EMPTY_TAG_CLOSE) {
-				compressTailingSpaces(startStructuredDocumentRegion, lastBreakRegion);
-				count++;
-			}
-			else
-				removeTailingSpaces(startStructuredDocumentRegion, lastBreakRegion);
-			addWidth(contraints, count);
-		}
-		else {
-			addWidth(contraints, startStructuredDocumentRegion.getLength());
-		}
-	}
-
-	/**
-	 * ISSUE: this is a bit of hidden JSP knowledge that was implemented this
-	 * way for expedency. Should be evolved in future to depend on
-	 * "nestedContext".
-	 */
-	private boolean isNestedTag(String regionType) {
-		final String JSP_ROOT_TAG_NAME = "JSP_ROOT_TAG_NAME"; //$NON-NLS-1$
-		final String JSP_DIRECTIVE_NAME = "JSP_DIRECTIVE_NAME"; //$NON-NLS-1$
-		boolean result = regionType.equals(JSP_ROOT_TAG_NAME) || regionType.equals(JSP_DIRECTIVE_NAME);
-		return result;
-	}
-
-	/**
-	 * ISSUE: this is a bit of hidden JSP knowledge that was implemented this
-	 * way for expedency. Should be evolved in future to depend on
-	 * "nestedContext".
-	 */
-	private boolean isNestedRootTag(String regionType) {
-		final String JSP_ROOT_TAG_NAME = "JSP_ROOT_TAG_NAME"; //$NON-NLS-1$
-		boolean result = regionType.equals(JSP_ROOT_TAG_NAME);
-		return result;
-	}
-
-
-	/**
-	 */
-	private void formatStyleAttr(Attr attr) {
-		if (attr == null)
-			return;
-		String value = getCSSValue(attr);
-		if (value == null)
-			return;
-		String oldValue = ((XMLNode) attr).getValueSource();
-		if (oldValue != null && value.equals(oldValue))
-			return;
-		attr.setValue(value);
-	}
-
-	/**
-	 */
-	private ICSSModel getCSSModel(Attr attr) {
-		if (attr == null)
-			return null;
-		INodeNotifier notifier = (INodeNotifier) attr.getOwnerElement();
-		if (notifier == null)
-			return null;
-		INodeAdapter adapter = notifier.getAdapterFor(IStyleDeclarationAdapter.class);
-		if (adapter == null)
-			return null;
-		if (!(adapter instanceof IStyleDeclarationAdapter))
-			return null;
-		IStyleDeclarationAdapter styleAdapter = (IStyleDeclarationAdapter) adapter;
-		return styleAdapter.getModel();
-	}
-
-	/**
-	 */
-	private String getCSSValue(Attr attr) {
-		ICSSModel model = getCSSModel(attr);
-		if (model == null)
-			return null;
-		ICSSNode document = model.getDocument();
-		if (document == null)
-			return null;
-		INodeNotifier notifier = (INodeNotifier) document;
-		INodeAdapter adapter = notifier.getAdapterFor(CSSSourceFormatter.class);
-		if (adapter == null)
-			return null;
-		CSSSourceFormatter formatter = (CSSSourceFormatter) adapter;
-		StringBuffer buffer = formatter.format(document);
-		if (buffer == null)
-			return null;
-		return buffer.toString();
-	}
-
-	/**
-	 */
-	private void removeTailingSpaces(IStructuredDocumentRegion flatNode, ITextRegion region) {
-		int offset = region.getTextEnd();
-		int count = region.getEnd() - offset;
-		if (count <= 0)
-			return;
-		replaceSource(flatNode, offset, count, null);
-	}
-
-	/**
-	 */
-	private void replaceTailingSpaces(IStructuredDocumentRegion flatNode, ITextRegion region, String spaces) {
-		int offset = region.getTextEnd();
-		int count = region.getEnd() - offset;
-		if (count == spaces.length()) {
-			String source = flatNode.getFullText(region);
-			if (source != null && source.endsWith(spaces)) {
-				// nothing to do
-				return;
-			}
-		}
-		replaceSource(flatNode, offset, count, spaces);
-	}
-}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLTextFormatter.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLTextFormatter.java
deleted file mode 100644
index 167fcf3..0000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLTextFormatter.java
+++ /dev/null
@@ -1,298 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.format;
-
-
-
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.html.core.HTMLCMProperties;
-import org.eclipse.wst.html.core.HTMLFormatContraints;
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.xml.core.document.XMLElement;
-import org.eclipse.wst.xml.core.document.XMLNode;
-import org.eclipse.wst.xml.core.document.XMLText;
-import org.eclipse.wst.xml.core.parser.XMLRegionContext;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-public class HTMLTextFormatter extends HTMLFormatter {
-
-	public static int FORMAT_ALL = 0;
-	public static int FORMAT_HEAD = 1;
-	public static int FORMAT_TAIL = 2;
-
-	/**
-	 */
-	protected HTMLTextFormatter() {
-		super();
-	}
-
-	/**
-	 */
-	private boolean canFormatText(XMLText text) {
-		if (text == null)
-			return false;
-
-		IStructuredDocumentRegion flatNode = text.getFirstStructuredDocumentRegion();
-		if (flatNode != null) {
-			String type = flatNode.getType();
-			if (isUnparsedRegion(type))
-				return false;
-		}
-
-		Node parent = text.getParentNode();
-		if (parent != null && parent.getNodeType() == Node.ELEMENT_NODE) {
-			XMLElement element = (XMLElement) parent;
-			if (!element.isGlobalTag() && !text.isWhitespace())
-				return false;
-		}
-
-		return canFormatChild(parent);
-	}
-
-	private boolean isUnparsedRegion(String type) {
-		boolean result = isNestedScannedRegion(type) || isBlockScannedRegion(type);
-		return result;
-	}
-
-	private boolean isBlockScannedRegion(String type) {
-		return type == XMLRegionContext.BLOCK_TEXT;
-	}
-
-    /**
-     * ISSUE: this is a bit of hidden JSP knowledge that was implemented this
-     * way for expedency. Should be evolved in future to depend on "nestedContext".
-     */
-	private boolean isNestedScannedRegion(String type) {
-		final String JSP_CONTENT = "JSP_CONTENT"; //$NON-NLS-1$
-		return type.equals(JSP_CONTENT);
-	}
-
-	/**
-	 */
-	private boolean canRemoveHeadingSpaces(XMLNode node) {
-		if (node == null)
-			return false;
-		if (node.getPreviousSibling() != null)
-			return false;
-		Node parent = node.getParentNode();
-		if (parent == null || parent.getNodeType() != Node.ELEMENT_NODE)
-			return false;
-
-		CMElementDeclaration decl = getElementDeclaration((Element) parent);
-		if (decl == null || (!decl.supports(HTMLCMProperties.LINE_BREAK_HINT)))
-			return false;
-		String hint = (String) decl.getProperty(HTMLCMProperties.LINE_BREAK_HINT);
-		return hint.equals(HTMLCMProperties.Values.BREAK_BEFORE_START_AND_AFTER_END);
-	}
-
-	/**
-	 */
-	private boolean canRemoveTailingSpaces(XMLNode node) {
-		if (node == null)
-			return false;
-		if (node.getNextSibling() != null)
-			return false;
-		Node parent = node.getParentNode();
-		if (parent == null || parent.getNodeType() != Node.ELEMENT_NODE)
-			return false;
-
-		CMElementDeclaration decl = getElementDeclaration((Element) parent);
-		if (decl == null || (!decl.supports(HTMLCMProperties.LINE_BREAK_HINT)))
-			return false;
-		String hint = (String) decl.getProperty(HTMLCMProperties.LINE_BREAK_HINT);
-		return hint.equals(HTMLCMProperties.Values.BREAK_BEFORE_START_AND_AFTER_END);
-	}
-
-	/**
-	 */
-	protected void formatNode(XMLNode node, HTMLFormatContraints contraints) {
-		formatText(node, contraints, FORMAT_ALL); // full format
-	}
-
-	/**
-	 */
-	protected void formatText(XMLNode node, HTMLFormatContraints contraints, int mode) {
-		if (node == null)
-			return;
-		Node parent = node.getParentNode();
-		if (parent == null)
-			return;
-
-		XMLText text = (XMLText) node;
-		String source = text.getSource();
-
-		if (!canFormatText(text)) {
-			setWidth(contraints, source);
-			return;
-		}
-
-		int offset = text.getStartOffset();
-		int length = text.getEndOffset() - offset;
-
-		// format adjacent text at once
-		if (mode == FORMAT_HEAD) {
-			Node next = node.getNextSibling();
-			while (next != null && next.getNodeType() == Node.TEXT_NODE) {
-				XMLText nextText = (XMLText) next;
-				length += (nextText.getEndOffset() - nextText.getStartOffset());
-				String nextSource = nextText.getSource();
-				if (nextSource != null && nextSource.length() > 0) {
-					if (source == null)
-						source = nextSource;
-					else
-						source += nextSource;
-				}
-				next = next.getNextSibling();
-			}
-		}
-		else if (mode == FORMAT_TAIL) {
-			Node prev = node.getPreviousSibling();
-			while (prev != null && prev.getNodeType() == Node.TEXT_NODE) {
-				XMLText prevText = (XMLText) prev;
-				offset = prevText.getStartOffset();
-				length += (prevText.getEndOffset() - offset);
-				String prevSource = prevText.getSource();
-				if (prevSource != null && prevSource.length() > 0) {
-					if (source == null)
-						source = prevSource;
-					else
-						source = prevSource + source;
-				}
-				prev = prev.getPreviousSibling();
-			}
-		}
-
-		SpaceConverter converter = new SpaceConverter(source, keepBlankLines(contraints));
-
-		int wordLength = converter.nextWord();
-		if (wordLength == 0) { // only spaces
-			if (!converter.hasSpaces())
-				return; // empty
-			boolean removeSpaces = false;
-			if (parent.getNodeType() == Node.ELEMENT_NODE) {
-				// check if tags are omitted
-				XMLNode element = (XMLNode) parent;
-				if (node.getPreviousSibling() == null && element.getStartStructuredDocumentRegion() == null) {
-					removeSpaces = true;
-				}
-				else if (node.getNextSibling() == null && element.getEndStructuredDocumentRegion() == null) {
-					removeSpaces = true;
-				}
-			}
-			if (removeSpaces) {
-				converter.replaceSpaces(null);
-			}
-			else if (!isWidthAvailable(contraints, 2) || canInsertBreakAfter(node) || canInsertBreakBefore(node)) {
-				String spaces = null;
-				if (node.getNextSibling() == null) { // last spaces
-					// use parent indent for the end tag
-					spaces = getBreakSpaces(parent);
-				}
-				else {
-					spaces = getBreakSpaces(node);
-				}
-				converter.replaceSpaces(spaces);
-				setWidth(contraints, spaces);
-			}
-			else if (canRemoveHeadingSpaces(node) || canRemoveTailingSpaces(node)) {
-				converter.replaceSpaces(null);
-			}
-			else {
-				converter.compressSpaces();
-				addWidth(contraints, 1);
-			}
-		}
-		else {
-			String breakSpaces = null;
-
-			// format heading spaces
-			boolean hasSpaces = converter.hasSpaces();
-			if (mode == FORMAT_TAIL) {
-				// keep spaces as is
-				addWidth(contraints, converter.getSpaceCount());
-			}
-			else if ((hasSpaces && !isWidthAvailable(contraints, wordLength + 1)) || canInsertBreakBefore(node)) {
-				breakSpaces = getBreakSpaces(node);
-				converter.replaceSpaces(breakSpaces);
-				setWidth(contraints, breakSpaces);
-			}
-			else {
-				if (hasSpaces) {
-					if (canRemoveHeadingSpaces(node)) {
-						converter.replaceSpaces(null);
-					}
-					else {
-						converter.compressSpaces();
-						addWidth(contraints, 1);
-					}
-				}
-			}
-			addWidth(contraints, wordLength);
-
-			// format middle
-			wordLength = converter.nextWord();
-			while (wordLength > 0) {
-				if (mode != FORMAT_ALL) {
-					// keep spaces as is
-					addWidth(contraints, converter.getSpaceCount());
-				}
-				else if (!isWidthAvailable(contraints, wordLength + 1)) {
-					if (breakSpaces == null)
-						breakSpaces = getBreakSpaces(node);
-					converter.replaceSpaces(breakSpaces);
-					setWidth(contraints, breakSpaces);
-				}
-				else {
-					converter.compressSpaces();
-					addWidth(contraints, 1);
-				}
-				addWidth(contraints, wordLength);
-				wordLength = converter.nextWord();
-			}
-
-			// format tailing spaces
-			hasSpaces = converter.hasSpaces();
-			if (mode == FORMAT_HEAD) {
-				// keep spaces as is
-				addWidth(contraints, converter.getSpaceCount());
-			}
-			else if ((hasSpaces && !isWidthAvailable(contraints, 2)) || canInsertBreakAfter(node)) {
-				if (node.getNextSibling() == null) { // last test
-					// use parent indent for the end tag
-					breakSpaces = getBreakSpaces(parent);
-				}
-				else {
-					if (breakSpaces == null)
-						breakSpaces = getBreakSpaces(node);
-				}
-				converter.replaceSpaces(breakSpaces);
-				setWidth(contraints, breakSpaces);
-			}
-			else {
-				if (hasSpaces) {
-					if (canRemoveTailingSpaces(node)) {
-						converter.replaceSpaces(null);
-					}
-					else {
-						converter.compressSpaces();
-						addWidth(contraints, 1);
-					}
-				}
-			}
-		}
-
-		if (converter.isModified()) {
-			source = converter.getSource();
-			replaceSource(text.getModel(), offset, length, source);
-		}
-	}
-}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/FMUtil.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/FMUtil.java
deleted file mode 100644
index 3eeacbd..0000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/FMUtil.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.validate;
-
-
-
-import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
-import org.eclipse.wst.xml.core.document.XMLNode;
-
-final class FMUtil {
-
-	public final static int SEG_NONE = 0;
-	public final static int SEG_WHOLE_TAG = 1;
-	public final static int SEG_START_TAG = 2;
-	public final static int SEG_END_TAG = 3;
-
-	/**
-	 */
-	private FMUtil() {
-		super();
-	}
-
-	/**
-	 */
-	public final static Segment getSegment(XMLNode target, int segType) {
-		if (target == null)
-			return new Segment(0, 0);
-		Segment seg = null;
-		IStructuredDocumentRegion startTag = null;
-		IStructuredDocumentRegion endTag = null;
-		switch (segType) {
-			case SEG_WHOLE_TAG :
-				startTag = target.getFirstStructuredDocumentRegion();
-				if (startTag != null) {
-					endTag = target.getLastStructuredDocumentRegion();
-					seg = new Segment(startTag, endTag);
-				}
-				else {
-					int startOffset = target.getStartOffset();
-					int endOffset = target.getEndOffset();
-					seg = new Segment(startOffset, endOffset - startOffset);
-				}
-				break;
-			case SEG_START_TAG :
-				startTag = target.getStartStructuredDocumentRegion();
-				if (startTag != null) {
-					seg = new Segment(startTag);
-				}
-				else {
-					seg = new Segment(target.getStartOffset(), 0);
-				}
-				break;
-			case SEG_END_TAG :
-				endTag = target.getEndStructuredDocumentRegion();
-				if (endTag != null) {
-					seg = new Segment(endTag);
-				}
-				else {
-					seg = new Segment(target.getEndOffset(), 0);
-				}
-				break;
-			case SEG_NONE :
-			default :
-				return new Segment(0, 0);
-		}
-		return seg;
-	}
-
-
-}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLAttributeValidator.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLAttributeValidator.java
deleted file mode 100644
index e392193..0000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLAttributeValidator.java
+++ /dev/null
@@ -1,255 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.validate;
-
-
-
-import java.util.Iterator;
-
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.sse.core.IndexedRegion;
-import org.eclipse.wst.sse.core.text.ITextRegion;
-import org.eclipse.wst.sse.core.text.ITextRegionContainer;
-import org.eclipse.wst.sse.core.text.ITextRegionList;
-import org.eclipse.wst.xml.core.document.XMLAttr;
-import org.eclipse.wst.xml.core.document.XMLElement;
-import org.eclipse.wst.xml.core.document.XMLNode;
-import org.eclipse.wst.xml.core.parser.XMLRegionContext;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-
-public class HTMLAttributeValidator extends PrimeValidator {
-
-	private static final int REGION_NAME = 1;
-	private static final int REGION_VALUE = 2;
-	// <<D210422
-	private static final char SINGLE_QUOTE = '\'';
-	private static final char DOUBLE_QUOTE = '\"';
-
-	// D210422
-	/**
-	 * HTMLAttributeValidator constructor comment.
-	 */
-	public HTMLAttributeValidator() {
-		super();
-	}
-
-	/**
-	 */
-	private Segment getErrorSegment(XMLNode errorNode, int regionType) {
-		ITextRegion rgn = null;
-		switch (regionType) {
-			case REGION_NAME :
-				rgn = errorNode.getNameRegion();
-				break;
-			case REGION_VALUE :
-				rgn = errorNode.getValueRegion();
-				break;
-			default :
-				// nothing to do.
-				break;
-		}
-		if (rgn != null) {
-			if (errorNode instanceof XMLAttr) {
-				XMLElement ownerElement = (XMLElement) ((XMLAttr) errorNode).getOwnerElement();
-				if (ownerElement != null) {
-					int regionStartOffset = ownerElement.getFirstStructuredDocumentRegion().getStartOffset(rgn);
-					int regionLength = rgn.getLength();
-					return new Segment(regionStartOffset, regionLength);
-				}
-			}
-		}
-		return new Segment(errorNode.getStartOffset(), 0);
-	}
-
-	/**
-	 * Allowing the INodeAdapter to compare itself against the type allows it
-	 * to return true in more than one case.
-	 */
-	public boolean isAdapterForType(Object type) {
-		return ((type == HTMLAttributeValidator.class) || super.isAdapterForType(type));
-	}
-
-	/**
-	 */
-	public void validate(IndexedRegion node) {
-		Element target = (Element) node;
-		if (CMUtil.isForeign(target))
-			return;
-		CMElementDeclaration edec = CMUtil.getDeclaration(target);
-		if (edec == null)
-			return;
-		CMNamedNodeMap declarations = edec.getAttributes();
-
-		NamedNodeMap attrs = target.getAttributes();
-		for (int i = 0; i < attrs.getLength(); i++) {
-			int rgnType = REGION_NAME;
-			int state = ErrorState.NONE_ERROR;
-			Attr a = (Attr) attrs.item(i);
-			// D203637; If the target attr has prefix, the validator should
-			// not
-			// warn about it. That is, just ignore. It is able to check
-			// whether
-			// an attr has prefix or not by calling XMLAttr#isGlobalAttr().
-			// When a attr has prefix (not global), it returns false.
-			boolean isXMLAttr = a instanceof XMLAttr;
-			if (isXMLAttr) {
-				XMLAttr xmlattr = (XMLAttr) a;
-				if (!xmlattr.isGlobalAttr())
-					continue; // skip futher validation and begin next loop.
-			}
-
-			CMAttributeDeclaration adec = (CMAttributeDeclaration) declarations.getNamedItem(a.getName());
-			if (adec == null) {
-				// No attr declaration was found. That is, the attr name is
-				// undefined.
-				// but not regard it as undefined name if it includes JSP
-				if (hasJSPRegion(((XMLNode) a).getNameRegion())) {
-					rgnType = REGION_NAME;
-					state = ErrorState.UNDEFINED_NAME_ERROR;
-				}
-			}
-			else {
-				// The attr declaration was found.
-				// At 1st, the name should be checked.
-				if (CMUtil.isHTML(edec) && (!CMUtil.isXHTML(edec))) {
-					// If the target element is pure HTML (not XHTML), some
-					// attributes
-					// might be written in boolean format. It should be check
-					// specifically.
-					if (CMUtil.isBooleanAttr(adec) && ((XMLAttr) a).hasNameOnly())
-						continue; // OK, keep going. No more check is needed
-					// against this attr.
-				}
-				else {
-					// If the target is other than pure HTML (JSP or XHTML),
-					// the name
-					// must be checked exactly (ie in case sensitive way).
-					String actual = a.getName();
-					String desired = adec.getAttrName();
-					if (!actual.equals(desired)) { // case mismatch
-						rgnType = REGION_NAME;
-						state = ErrorState.MISMATCHED_ERROR;
-					}
-				}
-				// Then, the value must be checked.
-				if (state == ErrorState.NONE_ERROR) { // Need more check.
-					// Now, the value should be checked, if the type is ENUM.
-					CMDataType attrType = adec.getAttrType();
-					String actualValue = a.getValue();
-					if (attrType.getImpliedValueKind() == CMDataType.IMPLIED_VALUE_FIXED) {
-						// Check FIXED value.
-						String validValue = attrType.getImpliedValue();
-						if (!actualValue.equals(validValue)) {
-							rgnType = REGION_VALUE;
-							state = ErrorState.UNDEFINED_VALUE_ERROR;
-						}
-					}
-					else {
-						String[] candidates = attrType.getEnumeratedValues();
-						if (candidates != null && candidates.length > 0) {
-							// several candidates are found.
-							boolean found = false;
-							for (int index = 0; index < candidates.length; index++) {
-								String candidate = candidates[index];
-								// At 1st, compare ignoring case.
-								if (actualValue.equalsIgnoreCase(candidate)) {
-									found = true;
-									if (CMUtil.isCaseSensitive(edec) && (!actualValue.equals(candidate))) {
-										rgnType = REGION_VALUE;
-										state = ErrorState.MISMATCHED_VALUE_ERROR;
-									}
-									break; // exit the loop.
-								}
-							}
-							if (!found) {
-								// No candidate was found. That is,
-								// actualValue is invalid.
-								// but not regard it as undefined value if it
-								// includes JSP.
-								if (hasJSPRegion(((XMLNode) a).getValueRegion())) {
-									rgnType = REGION_VALUE;
-									state = ErrorState.UNDEFINED_VALUE_ERROR;
-								}
-							}
-						}
-					}
-				}
-				// <<D210422
-				if (state == ErrorState.NONE_ERROR) { // Need more check.
-					if (isXMLAttr) {
-						String source = ((XMLAttr) a).getValueRegionText();
-						if (source != null) {
-							char firstChar = source.charAt(0);
-							char lastChar = source.charAt(source.length() - 1);
-							if (isQuote(firstChar) || isQuote(lastChar)) {
-								if (lastChar != firstChar) {
-									rgnType = REGION_VALUE;
-									state = ErrorState.UNCLOSED_ATTR_VALUE;
-								}
-							}
-						}
-					}
-				}
-				// D210422
-			}
-			if (state != ErrorState.NONE_ERROR) {
-				Segment seg = getErrorSegment((XMLNode) a, rgnType);
-				if (seg != null)
-					reporter.report(MessageFactory.createMessage(new ErrorInfoImpl(state, seg, a)));
-			}
-		}
-	}
-
-	/**
-	 */
-	private boolean hasJSPRegion(ITextRegion container) {
-		if (!(container instanceof ITextRegionContainer))
-			return false;
-		ITextRegionList regions = ((ITextRegionContainer) container).getRegions();
-		if (regions == null)
-			return false;
-		Iterator e = regions.iterator();
-		while (e.hasNext()) {
-			ITextRegion region = (ITextRegion) e.next();
-			if (region == null)
-				continue;
-			String regionType = region.getType();
-			if (regionType == XMLRegionContext.XML_TAG_OPEN || (isNextedTagName(regionType)))
-				return true;
-		}
-		return false;
-	}
-
-    /**
-     * ISSUE: this is a bit of hidden JSP knowledge that was implemented this
-     * way for expedency. Should be evolved in future to depend on "nestedContext".
-     */
-	private boolean isNextedTagName(String regionType) {
-		final String JSP_SCRIPTLET_OPEN = "JSP_SCRIPTLET_OPEN"; //$NON-NLS-1$
-		final String JSP_EXPRESSION_OPEN = "JSP_EXPRESSION_OPEN"; //$NON-NLS-1$
-		final String JSP_DECLARATION_OPEN = "JSP_DECLARATION_OPEN"; //$NON-NLS-1$
-		final String JSP_DIRECTIVE_OPEN = "JSP_DIRECTIVE_OPEN"; //$NON-NLS-1$
-
-		boolean result = regionType.equals(JSP_SCRIPTLET_OPEN) || regionType.equals(JSP_EXPRESSION_OPEN) || regionType.equals(JSP_DECLARATION_OPEN) || regionType.equals(JSP_DIRECTIVE_OPEN);
-		return result;
-	}
-
-	// <<D214022
-	private boolean isQuote(char c) {
-		return (c == SINGLE_QUOTE) || (c == DOUBLE_QUOTE);
-	}
-	// D210422
-}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.ui/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.wst.html.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 036ecb4..0000000
--- a/bundles/org.eclipse.wst.html.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,50 +0,0 @@
-#Sun Mar 13 23:58:13 EST 2005
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-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.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=enabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
-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.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.wst.xsd.ui/.classpath b/bundles/org.eclipse.wst.xsd.ui/.classpath
new file mode 100644
index 0000000..b3381db
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/.classpath
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src-validation"/>
+	<classpathentry kind="src" path="src-refactor"/>
+	<classpathentry kind="src" path="src-adt"/>
+	<classpathentry kind="src" path="src-adt-xsd"/>
+	<classpathentry kind="src" path="src-common"/>
+	<classpathentry kind="src" path="src-adt-xsd-typeviz"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src-search"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/bundles/org.eclipse.wst.xsd.ui/.cvsignore b/bundles/org.eclipse.wst.xsd.ui/.cvsignore
new file mode 100644
index 0000000..7b94482
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/.cvsignore
@@ -0,0 +1,7 @@
+bin
+xsdeditor.jar
+build.xml
+temp.folder
+org.eclipse.wst.xsd.ui_1.0.0.jar
+@dot
+src.zip
diff --git a/bundles/org.eclipse.wst.xsd.ui/.project b/bundles/org.eclipse.wst.xsd.ui/.project
new file mode 100644
index 0000000..aab3824
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.wst.xsd.ui</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.PluginNature</nature>
+	</natures>
+</projectDescription>
diff --git a/bundles/org.eclipse.wst.xsd.ui/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.wst.xsd.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..02e064f
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,69 @@
+#Mon Feb 27 17:20:28 EST 2006

+eclipse.preferences.version=1

+org.eclipse.jdt.core.builder.cleanOutputFolder=clean

+org.eclipse.jdt.core.builder.duplicateResourceTask=warning

+org.eclipse.jdt.core.builder.invalidClasspath=abort

+org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch

+org.eclipse.jdt.core.circularClasspath=error

+org.eclipse.jdt.core.classpath.exclusionPatterns=enabled

+org.eclipse.jdt.core.classpath.multipleOutputLocations=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

+org.eclipse.jdt.core.compiler.debug.lineNumber=generate

+org.eclipse.jdt.core.compiler.debug.localVariable=generate

+org.eclipse.jdt.core.compiler.debug.sourceFile=generate

+org.eclipse.jdt.core.compiler.doc.comment.support=enabled

+org.eclipse.jdt.core.compiler.maxProblemPerUnit=100

+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning

+org.eclipse.jdt.core.compiler.problem.deprecation=warning

+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled

+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled

+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore

+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning

+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore

+org.eclipse.jdt.core.compiler.problem.finalParameterBound=error

+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning

+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning

+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning

+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning

+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore

+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore

+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled

+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled

+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private

+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore

+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning

+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore

+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled

+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public

+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore

+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled

+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private

+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning

+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning

+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning

+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore

+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning

+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore

+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled

+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning

+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore

+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore

+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore

+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore

+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore

+org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=error

+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.unusedLocal=ignore

+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore

+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled

+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled

+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=ignore

+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error

+org.eclipse.jdt.core.compiler.source=1.3

+org.eclipse.jdt.core.incompatibleJDKLevel=ignore

+org.eclipse.jdt.core.incompleteClasspath=error

diff --git a/bundles/org.eclipse.wst.xsd.ui/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.wst.xsd.ui/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..a232d89
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 27 17:20:24 EST 2006
+eclipse.preferences.version=1
+internal.default.compliance=default
diff --git a/bundles/org.eclipse.wst.xsd.ui/.settings/org.eclipse.pde.prefs b/bundles/org.eclipse.wst.xsd.ui/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000..179abb3
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,12 @@
+#Fri Dec 10 00:50:26 EST 2004

+compilers.p.unused-element-or-attribute=0

+compilers.p.unresolved-ex-points=0

+compilers.p.unknown-element=0

+compilers.p.unknown-resource=0

+compilers.p.unknown-class=0

+compilers.p.unknown-attribute=0

+compilers.p.no-required-att=0

+eclipse.preferences.version=1

+compilers.p.unresolved-import=0

+compilers.p.illegal-att-value=0

+compilers.use-project=true

diff --git a/bundles/org.eclipse.wst.xsd.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.xsd.ui/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..23de916
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,89 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %_UI_PLUGIN_NAME
+Bundle-SymbolicName: org.eclipse.wst.xsd.ui; singleton:=true
+Bundle-Version: 1.0.100.qualifier
+Bundle-Activator: org.eclipse.wst.xsd.editor.XSDEditorPlugin
+Bundle-Vendor: %Bundle-Vendor.0
+Bundle-Localization: plugin
+Export-Package: org.eclipse.wst.xsd.adt.actions,
+ org.eclipse.wst.xsd.adt.design,
+ org.eclipse.wst.xsd.adt.design.directedit,
+ org.eclipse.wst.xsd.adt.design.editparts,
+ org.eclipse.wst.xsd.adt.design.editparts.model,
+ org.eclipse.wst.xsd.adt.design.editpolicies,
+ org.eclipse.wst.xsd.adt.design.figures,
+ org.eclipse.wst.xsd.adt.edit,
+ org.eclipse.wst.xsd.adt.editor,
+ org.eclipse.wst.xsd.adt.facade,
+ org.eclipse.wst.xsd.adt.outline,
+ org.eclipse.wst.xsd.adt.properties,
+ org.eclipse.wst.xsd.adt.typeviz.design.figures,
+ org.eclipse.wst.xsd.adt.typeviz.design.layouts,
+ org.eclipse.wst.xsd.editor,
+ org.eclipse.wst.xsd.editor.internal.actions,
+ org.eclipse.wst.xsd.editor.internal.adapters,
+ org.eclipse.wst.xsd.editor.internal.design.editparts,
+ org.eclipse.wst.xsd.editor.internal.design.editparts.model,
+ org.eclipse.wst.xsd.editor.internal.design.figures,
+ org.eclipse.wst.xsd.editor.internal.design.layouts,
+ org.eclipse.wst.xsd.editor.internal.dialogs,
+ org.eclipse.wst.xsd.editor.internal.icons,
+ org.eclipse.wst.xsd.editor.internal.navigation,
+ org.eclipse.wst.xsd.editor.internal.preferences,
+ org.eclipse.wst.xsd.editor.internal.search,
+ org.eclipse.wst.xsd.editor.internal.utils,
+ org.eclipse.wst.xsd.ui.common.actions,
+ org.eclipse.wst.xsd.ui.common.commands,
+ org.eclipse.wst.xsd.ui.common.properties.providers,
+ org.eclipse.wst.xsd.ui.common.properties.sections,
+ org.eclipse.wst.xsd.ui.common.properties.sections.appinfo,
+ org.eclipse.wst.xsd.ui.common.util,
+ org.eclipse.wst.xsd.ui.internal.actions,
+ org.eclipse.wst.xsd.ui.internal.nsedit;x-internal:=true,
+ org.eclipse.wst.xsd.ui.internal.refactor,
+ org.eclipse.wst.xsd.ui.internal.refactor.actions;x-internal:=true,
+ org.eclipse.wst.xsd.ui.internal.refactor.rename,
+ org.eclipse.wst.xsd.ui.internal.refactor.structure;x-internal:=true,
+ org.eclipse.wst.xsd.ui.internal.refactor.util;x-internal:=true,
+ org.eclipse.wst.xsd.ui.internal.refactor.wizard;x-internal:=true,
+ org.eclipse.wst.xsd.ui.internal.search;x-internal:=true,
+ org.eclipse.wst.xsd.ui.internal.search.actions;x-internal:=true,
+ org.eclipse.wst.xsd.ui.internal.text;x-internal:=true,
+ org.eclipse.wst.xsd.ui.internal.util;x-internal:=true,
+ org.eclipse.wst.xsd.ui.internal.validation;x-internal:=true,
+ org.eclipse.wst.xsd.ui.internal.widgets;x-internal:=true,
+ org.eclipse.wst.xsd.ui.internal.wizards;x-internal:=true
+Require-Bundle: org.eclipse.ui.views.properties.tabbed,
+ org.apache.xerces,
+ org.eclipse.core.runtime,
+ 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,
+ org.eclipse.jface.text,
+ org.eclipse.xsd,
+ org.eclipse.gef,
+ org.eclipse.draw2d,
+ org.eclipse.xsd,
+ org.eclipse.jface,
+ org.eclipse.ui.editors,
+ org.eclipse.ui.workbench.texteditor,
+ org.eclipse.ui,
+ org.eclipse.ui.views,
+ org.eclipse.ui.ide,
+ org.eclipse.emf.ecore.edit,
+ org.eclipse.core.resources,
+ org.eclipse.xsd.edit,
+ org.eclipse.emf.edit,
+ org.eclipse.emf.edit.ui,
+ org.eclipse.wst.validation,
+ org.eclipse.ltk.core.refactoring,
+ org.eclipse.ltk.ui.refactoring,
+ org.eclipse.wst.xsd.core,
+ org.eclipse.search,
+ com.ibm.icu
+Eclipse-LazyStart: true
diff --git a/bundles/org.eclipse.wst.xsd.ui/about.html b/bundles/org.eclipse.wst.xsd.ui/about.html
new file mode 100644
index 0000000..6f6b96c
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/about.html
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+ 
+<p>February 24, 2005</p>	
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content.  Check the Redistributor's license that was provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xsd.ui/build.properties b/bundles/org.eclipse.wst.xsd.ui/build.properties
new file mode 100644
index 0000000..2df31de
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/build.properties
@@ -0,0 +1,26 @@
+###############################################################################
+# 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
+###############################################################################
+source.. = src-validation/,\
+           src-search/,\
+           src-refactor/,\
+           src-adt/,\
+           src-adt-xsd/,\
+           src-adt-xsd-typeviz/,\
+           src-common/
+bin.includes = .,\
+               plugin.xml,\
+               icons/,\
+               plugin.properties,\
+               META-INF/,\
+               about.html
+src.includes = build.properties,\
+               component.xml
+output.. = bin/
diff --git a/bundles/org.eclipse.wst.xsd.ui/component.xml b/bundles/org.eclipse.wst.xsd.ui/component.xml
new file mode 100644
index 0000000..294443a
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/component.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component xmlns="http://eclipse.org/wtp/releng/tools/component-model"
+	name="org.eclipse.wst.xsd">
+	<component-depends unrestricted="true"></component-depends>
+	<plugin	id="org.eclipse.wst.xsd.ui" fragment="false" />
+	<plugin	id="org.eclipse.wst.xsd.core" fragment="false" />
+</component>
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xsd.ui/icons/XSDAttributeGroupRef.gif b/bundles/org.eclipse.wst.xsd.ui/icons/XSDAttributeGroupRef.gif
new file mode 100644
index 0000000..a89fa8f
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/icons/XSDAttributeGroupRef.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsd.ui/icons/XSDElementRef.gif b/bundles/org.eclipse.wst.xsd.ui/icons/XSDElementRef.gif
new file mode 100644
index 0000000..8712930
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/icons/XSDElementRef.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsd.ui/icons/XSDFile.gif b/bundles/org.eclipse.wst.xsd.ui/icons/XSDFile.gif
new file mode 100644
index 0000000..3900f1b
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/icons/XSDFile.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsd.ui/icons/XSDGroupRef.gif b/bundles/org.eclipse.wst.xsd.ui/icons/XSDGroupRef.gif
new file mode 100644
index 0000000..34a7fb3
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/icons/XSDGroupRef.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsd.ui/icons/blank.gif b/bundles/org.eclipse.wst.xsd.ui/icons/blank.gif
new file mode 100644
index 0000000..1936e21
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/icons/blank.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsd.ui/icons/browsebutton.gif b/bundles/org.eclipse.wst.xsd.ui/icons/browsebutton.gif
new file mode 100644
index 0000000..13dae59
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/icons/browsebutton.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsd.ui/icons/collapse_attr.gif b/bundles/org.eclipse.wst.xsd.ui/icons/collapse_attr.gif
new file mode 100644
index 0000000..b872bee
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/icons/collapse_attr.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsd.ui/icons/delete_obj.gif b/bundles/org.eclipse.wst.xsd.ui/icons/delete_obj.gif
new file mode 100644
index 0000000..b6922ac
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/icons/delete_obj.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsd.ui/icons/dlcl16/showproperties_obj.gif b/bundles/org.eclipse.wst.xsd.ui/icons/dlcl16/showproperties_obj.gif
new file mode 100644
index 0000000..d94ff10
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/icons/dlcl16/showproperties_obj.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsd.ui/icons/dtool16/showproperties_obj.gif b/bundles/org.eclipse.wst.xsd.ui/icons/dtool16/showproperties_obj.gif
new file mode 100644
index 0000000..d94ff10
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/icons/dtool16/showproperties_obj.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsd.ui/icons/elcl16/showproperties_obj.gif b/bundles/org.eclipse.wst.xsd.ui/icons/elcl16/showproperties_obj.gif
new file mode 100644
index 0000000..1dc19a3
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/icons/elcl16/showproperties_obj.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsd.ui/icons/etool16/showproperties_obj.gif b/bundles/org.eclipse.wst.xsd.ui/icons/etool16/showproperties_obj.gif
new file mode 100644
index 0000000..1dc19a3
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/icons/etool16/showproperties_obj.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsd.ui/icons/expand_attr.gif b/bundles/org.eclipse.wst.xsd.ui/icons/expand_attr.gif
new file mode 100644
index 0000000..5c287e9
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/icons/expand_attr.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsd.ui/icons/filter.gif b/bundles/org.eclipse.wst.xsd.ui/icons/filter.gif
new file mode 100644
index 0000000..6fe6f0e
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/icons/filter.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsd.ui/icons/newChoice.gif b/bundles/org.eclipse.wst.xsd.ui/icons/newChoice.gif
new file mode 100644
index 0000000..eca1446
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/icons/newChoice.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsd.ui/icons/newSequence2.gif b/bundles/org.eclipse.wst.xsd.ui/icons/newSequence2.gif
new file mode 100644
index 0000000..9e3968c
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/icons/newSequence2.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsd.ui/icons/obj16/annotationsheader.gif b/bundles/org.eclipse.wst.xsd.ui/icons/obj16/annotationsheader.gif
new file mode 100644
index 0000000..9bfb682
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/icons/obj16/annotationsheader.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsd.ui/icons/obj16/attributeGroupRef.gif b/bundles/org.eclipse.wst.xsd.ui/icons/obj16/attributeGroupRef.gif
new file mode 100644
index 0000000..0ea47d2
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/icons/obj16/attributeGroupRef.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsd.ui/icons/obj16/attributegroupsheader.gif b/bundles/org.eclipse.wst.xsd.ui/icons/obj16/attributegroupsheader.gif
new file mode 100644
index 0000000..e618a25
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/icons/obj16/attributegroupsheader.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsd.ui/icons/obj16/attributesheader.gif b/bundles/org.eclipse.wst.xsd.ui/icons/obj16/attributesheader.gif
new file mode 100644
index 0000000..9254879
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/icons/obj16/attributesheader.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsd.ui/icons/obj16/directivesheader.gif b/bundles/org.eclipse.wst.xsd.ui/icons/obj16/directivesheader.gif
new file mode 100644
index 0000000..6000cb8
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/icons/obj16/directivesheader.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsd.ui/icons/obj16/elementsheader.gif b/bundles/org.eclipse.wst.xsd.ui/icons/obj16/elementsheader.gif
new file mode 100644
index 0000000..26f7206
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/icons/obj16/elementsheader.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsd.ui/icons/obj16/error_marker.gif b/bundles/org.eclipse.wst.xsd.ui/icons/obj16/error_marker.gif
new file mode 100644
index 0000000..61e1e25
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/icons/obj16/error_marker.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsd.ui/icons/obj16/groupsheader.gif b/bundles/org.eclipse.wst.xsd.ui/icons/obj16/groupsheader.gif
new file mode 100644
index 0000000..c9745f0
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/icons/obj16/groupsheader.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsd.ui/icons/obj16/notationsheader.gif b/bundles/org.eclipse.wst.xsd.ui/icons/obj16/notationsheader.gif
new file mode 100644
index 0000000..e05c645
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/icons/obj16/notationsheader.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsd.ui/icons/obj16/smpl_list_obj.gif b/bundles/org.eclipse.wst.xsd.ui/icons/obj16/smpl_list_obj.gif
new file mode 100644
index 0000000..6e2cd93
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/icons/obj16/smpl_list_obj.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsd.ui/icons/obj16/smpl_restrict_obj.gif b/bundles/org.eclipse.wst.xsd.ui/icons/obj16/smpl_restrict_obj.gif
new file mode 100644
index 0000000..1ebd546
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/icons/obj16/smpl_restrict_obj.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsd.ui/icons/obj16/smpl_union_obj.gif b/bundles/org.eclipse.wst.xsd.ui/icons/obj16/smpl_union_obj.gif
new file mode 100644
index 0000000..0b01f8c
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/icons/obj16/smpl_union_obj.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsd.ui/icons/obj16/typesheader.gif b/bundles/org.eclipse.wst.xsd.ui/icons/obj16/typesheader.gif
new file mode 100644
index 0000000..3267542
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/icons/obj16/typesheader.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsd.ui/icons/ovr16/attributeoverlay.gif b/bundles/org.eclipse.wst.xsd.ui/icons/ovr16/attributeoverlay.gif
new file mode 100644
index 0000000..1931f92
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/icons/ovr16/attributeoverlay.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsd.ui/icons/ovr16/textoverlay.gif b/bundles/org.eclipse.wst.xsd.ui/icons/ovr16/textoverlay.gif
new file mode 100644
index 0000000..d455c2b
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/icons/ovr16/textoverlay.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsd.ui/icons/sample.gif b/bundles/org.eclipse.wst.xsd.ui/icons/sample.gif
new file mode 100644
index 0000000..34fb3c9
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/icons/sample.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsd.ui/plugin.properties b/bundles/org.eclipse.wst.xsd.ui/plugin.properties
new file mode 100644
index 0000000..bb3d093
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/plugin.properties
@@ -0,0 +1,837 @@
+###############################################################################
+# 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
+###############################################################################
+! Properties file for component: XMSCH - XML Tools -  XML Schema Editor
+! Packaged for translation in:  xml.zip
+
+!
+! Plugin
+!
+_UI_PLUGIN_NAME             = XML Schema Editor
+_UI_EDITOR_NAME             = XML Schema Editor
+
+_UI_ACTION_EXT_GENERATE      = &Generate
+_UI_ACTION_EXT_GENERATE_DDL  = &DDL...
+_UI_ACTION_EXT_GENERATE_DTD  = D&TD...
+_UI_ACTION_EXT_GENERATE_JAVA = &Java Beans...
+
+_UI_ACTION_EXT_GENERATE_XSD = &Generate XML Schema
+_UI_WIZARD_NAME_NEW_XSD     = XML Schema
+
+_UI_XML_TOOLS_PREFERENCE_PAGE  = XML
+_UI_XML_SCHEMA_PREFERENCE      = XML Schema Files
+
+_UI_WIZARD_NEW_XSD             = XML Schema
+_UI_CREATE_A_NEW_SCHEMA        = Create a new XML schema file
+
+! New property tabs
+_UI_LABEL_GENERAL          = General
+_UI_LABEL_ATTRIBUTES       = Attributes
+_UI_LABEL_DOCUMENTATION    = Documentation
+_UI_LABEL_TYPE_CONSTRAINTS = Constraints
+_UI_LABEL_APPLICATION_INFO = Application Info
+_UI_LABEL_EXTENSIONS       = Extensions
+_UI_LABEL_FACETS           = Facets
+_UI_LABEL_ENUMERATIONS     = Enumerations
+_UI_LABEL_NAMESPACE        = Namespace
+_UI_LABEL_ADVANCED         = Advanced
+
+_UI_LABEL_READ_ONLY     = read-only
+_UI_LABEL_KIND          = Kind:
+_UI_LABEL_VARIETY       = Variety:
+
+_UI_LABEL_APP_INFO      = App Info
+
+!
+! Schema File Window
+!
+_UI_LABEL_FILE_NAME              = File name:
+_UI_LABEL_VERSION                = Version:
+_UI_TOOLTIP_VERSION              = Convenient attribute to store version number
+_UI_LABEL_LANGUAGE               = Language:
+_UI_TOOLTIP_LANGUAGE             = Represents natural language identifiers
+_UI_GROUP_NAMESPACE              = Namespace
+_UI_LABEL_SCHEMA_PREFIX          = Prefix:
+_UI_TOOLTIP_SCHEMA_PREFIX        = The prefix associated with the current namespace.
+_UI_LABEL_TARGET_NAME_SPACE      = Target namespace:
+_UI_TOOLTIP_TARGET_NAME_SPACE    = The namespace for this schema.
+_UI_BUTTON_APPLY                 = Apply
+_UI_LABEL_ATTRIBUTE_FORM_DEFAULT = Attribute form default:
+_UI_TOOLTIP_ATTRIBUTE_FORM       = Indicates if all attributes in a schema must be qualified or not in the instance document
+_UI_LABEL_ELEMENT_FORM_DEFAULT   = Element form default:
+_UI_TOOLTIP_ELEMENT_FORM_DEFAULT = Indicates if all elements in a schema must be qualified or not in the instance document
+_UI_LABEL_BLOCK_DEFAULT          = Block default:
+_UI_TOOLTIP_BLOCK_DEFAULT        = Control derivations for every type and element in the schema
+_UI_LABEL_FINAL_DEFAULT          = Final default:
+_UI_TOOLTIP_FINAL_DEFAULT        = Control derivations for every type and element in the schema
+_UI_ACTION_DELETE_INCLUDE        = Delete
+_UI_ACTION_DELETE_NODES          = Delete Nodes
+! Note to translators: The following is the acronym for Uniform Resource Indicator
+_UI_LABEL_URI                    = URI:
+
+
+_UI_LABEL_ADD              = Add...
+_UI_LABEL_EDIT             = Edit...
+_UI_LABEL_PATTERNS         = Patterns
+_ERROR_FILE_ALREADY_EXISTS = The file name already exists: {0}
+
+!
+! Any Section
+!
+! Note to translators - translate only the word and
+_UI_LABEL_NAMESPACE_AND_PROCESS_CONTENTS = namespace and processContents
+
+!
+! minOccurs and maxOccurs section
+!
+! Note to translators - translate only the word and
+_UI_LABEL_MINOCCURS_AND_MAXOCCURS = minOccurs and maxOccurs
+
+!
+! Value Information Section
+!
+_UI_LABEL_VALUE_INFORMATION   = Value Information
+
+!
+! Notation window
+!
+_UI_NOTATION_NAME                = Name:
+_UI_NOTATION_PUBLIC              = Public:
+_UI_NOTATION_SYSTEM              = System:
+_UI_TOOLTIP_PUBLIC               = An optional public identifier
+_UI_TOOLTIP_SYSTEM               = An optional URI reference
+
+!
+! Complex Type Window
+!
+_UI_NAME                         = Name:
+_UI_ABSTRACT                     = Abstract:
+_UI_MIXED                        = Mixed:
+_UI_BLOCK                        = Block:
+_UI_FINAL                        = Final:
+
+_UI_CT_TOOLTIP_MIXED             = Indicates if type may contain mixed content
+_UI_CT_TOOLTIP_ABSTRACT          = When a complex type is declared abstract, it cannot be used in an instance document
+_UI_CT_TOOLTIP_FINAL             = You can use this to prevent further derivations
+_UI_CT_TOOLTIP_BLOCK             = You can use this to block any derivations
+
+!
+! SimpleContent and ComplexContent Window
+! 
+_UI_LABEL_DERIVED_BY            = Derived by:
+_UI_TOOLTIP_DERIVED_BY          = Derive by extension to inherit from a base type content model and add to it. Derive by restriction to restrict the content model of an existing type.
+
+!
+! Combo box items - no need to translate
+!
+_UI_COMBO_RESTRICTION           = restriction
+_UI_COMBO_EXTENSION             = extension
+
+!
+! Element & Element Ref Window
+!
+_UI_ELEMENT_NAME                 = Name:
+_UI_CHECKBOX_NILLABLE            = Nillable
+_UI_CHECKBOX_ABSTRACT            = Abstract
+_UI_SUBSTITUTION                 = Substitution group:
+_UI_MINIMUM                      = Minimum:
+_UI_MAXIMUM                      = Maximum:
+_UI_REFERENCE_NAME               = Reference name:
+
+_UI_TOOLTIP_ELEMENT_MINIMUM      = A non-negative integer that specifies the minimum number of times an element can occur.
+_UI_TOOLTIP_ELEMENT_MAXIMUM      = A non-negative integer or unbounded if there is no upper limit on the number of times the element can occur.
+_UI_TOOLTIP_ELEMENT_ABSTRACT     = When an element is declared abstract, a member of its equivalent class must appear in the instance document,
+_UI_TOOLTIP_ELEMENT_NIL          = If selected, an attribute can be included in the instance document to indicate that the element has a nil value.
+_UI_TOOLTIP_ELEMENT_SUBSTITUTION = Select the element that can be substituted by this element
+_UI_TOOLTIP_ELEMENT_FORM         = Indicates if the element is qualifed in the instance document
+_UI_TOOLTIP_ELEMENT_VALUE        = Provides a default or fixed value for the element.
+
+
+!
+! Attribute Window
+!    _UI_COMBO_BOX strings are used in code generation. 
+!    Probably don't need to be translated
+!
+_UI_COMBO_BOX_REQUIRED           = required
+_UI_COMBO_BOX_OPTIONAL           = optional
+_UI_COMBO_BOX_PROHIBITED         = prohibited
+
+_UI_FIXED                        = Fixed
+_UI_DEFAULT                      = Default
+_UI_ATTRIBUTE_NAME               = Attribute name:
+_UI_USAGE                        = Usage:
+_UI_FORM                         = Form qualification:
+_UI_VALUE                        = Value
+
+_UI_LABEL_OTHER_ATTRIBUTES       = Other Attributes
+
+_UI_TOOLTIP_ATTRIBUTE_USE        = Indicates if the attribute is required, optional, or prohibited
+_UI_TOOLTIP_ATTRIBUTE_FORM       = Indicates if the attribute is qualifed or not in the instance document
+_UI_TOOLTIP_ATTRIBUTE_VALUE      = Provides default or fixed value for the attribute. Default value only valid if Usage value is set to optional.
+
+_UI_PROCESS_CONTENTS             = Process contents:
+
+!
+! Annotation - Doc & AppInfo Window
+!
+_UI_COMMENT                      = Comment
+_UI_TOOLTIP_COMMENT              = Information useful to the user or application
+_UI_SOURCE                       = Source:
+_UI_TOOLTIP_SOURCE               = An optional URI reference to supplement the local information
+_UI_LANGUAGE                     = Language:
+_UI_TOOLTIP_LANGUAGE_ANNOTATION  = Indicate the language in which the annotation is expressed
+
+!
+! Group
+! 
+_UI_CONTENT_MODEL               = Content model
+_UI_SEQUENCE                    = Sequence
+_UI_CHOICE                      = Choice
+_UI_ALL                         = All
+
+
+!
+! Simple Type Related Facets  - appear as entries in a table - restriction on simple type
+!
+_UI_GROUP_FACETS                = Facets
+_UI_LENGTH                      = Length
+_UI_MINIMUM_LENGTH              = Minimum Length
+_UI_MAXIMUM_LENGTH              = Maximum Length
+_UI_MINIMUM_INCLUSIVE           = Minimum Inclusive
+_UI_MAXIMUM_INCLUSIVE           = Maximum Inclusive
+_UI_MINIMUM_EXCLUSIVE           = Minimum Exclusive
+_UI_MAXIMUM_EXCLUSIVE           = Maximum Exclusive
+_UI_TOTAL_DIGITS                = Total Digits
+_UI_FRACTION_DIGITS             = Fraction Digits
+_UI_WHITE_SPACE                 = White Space
+_UI_FACET_NAME                  = Name
+_UI_FACET_VALUE                 = Value
+_UI_FACET_FIXED                 = Fixed
+
+_UI_TOOLTIP_LENGTH              = The number of units of length. Must be a non-negative integer.
+_UI_TOOLTIP_MIN_LEN             = The minimum number of units of length. Must be a non-negative integer.
+_UI_TOOLTIP_MAX_LEN             = The maximum number of units of length. Must be a non-negative integer.
+_UI_TOOLTIP_MAX_INCLUSIVE       = The upper bound of the value space. The value is itself included.
+_UI_TOOLTIP_MAX_EXCLUSIVE       = The upper bound of the value space. The value is itself excluded.
+_UI_TOOLTIP_MIN_INCLUSIVE       = The lower bound of the value space. The value is itself included.
+_UI_TOOLTIP_MIN_EXCLUSIVE       = The lower bound of the value space. The value is itself excluded.
+_UI_TOOLTIP_TOTAL_DIGITS        = The maximum number of decimal digits. Must be a positive integer.
+_UI_TOOLTIP_FRACTION_DIGITS     = The maximum number of decimal digits in the fractional part. Must be a non-negative integer.
+_UI_TOOLTIP_WHITE_SPACE         = Indicates if white space should be preserved, replaced or collapsed. 
+
+_UI_TOOLTIP_PATTERN             = Constrains the value to match a specific pattern. The pattern must be a regular expression. 
+_UI_TOOLTIP_ENUM                = Constrains the value to a specified set of values. 
+
+!
+! Simple/Complex Type Selection 
+!
+_UI_LABEL_TYPE_INFORMATION          = Type information
+_UI_LABEL_BASE_TYPE                 = Base type
+_UI_LABEL_BASE_TYPE_WITH_COLON      = Base type:
+_UI_LABEL_SET_BASE_TYPE             = Set Base Type
+_UI_ACTION_SET_BASE_TYPE            = Set Base Type...
+_UI_RADIO_NONE                      = None
+_UI_RADIO_BUILT_IN_SIMPLE_TYPE      = Built-in simple type
+_UI_RADIO_USER_DEFINED_SIMPLE_TYPE  = User-defined simple type
+_UI_RADIO_USER_DEFINED_COMPLEX_TYPE = User-defined complex type
+_UI_LABEL_NEW_COMPLEX_TYPE          = New Complex Type
+_UI_LABEL_NEW_SIMPLE_TYPE           = New Simple Type
+_UI_LABEL_SET_TYPE				    = Set Type
+_UI_LABEL_SET_EXISTING_TYPE 		= Set Existing Type...
+_UI_NO_TYPE                         = **none**
+_UI_LABEL_COMPONENTS				= Components:
+_UI_LABEL_QUALIFIER					= Qualifier:
+
+_UI_LABEL_COMPONENT_NAME			   = Component Name:
+_UI_LABEL_MATCHING_COMPONENTS		   = Matching Components:
+_UI_LABEL_MATCHING_TYPES		   	   = Matching Types:
+_UI_LABEL_TYPE_NAME					   = Type Name:
+_UI_LABEL_SPECIFIED_FILE			   = Specified File
+_UI_LABEL_ENCLOSING_PROJECT			   = Enclosing Project
+_UI_LABEL_WORKSPACE					   = Workspace
+_UI_LABEL_CURRENT_RESOURCE			   = Current Resource
+_UI_LABEL_SEARCH_SCOPE				   = Search Scope
+_UI_LABEL_NARROW_SEARCH_SCOPE_RESOURCE = Use resource view to narrow search scope
+_UI_LABEL_AVAILABLE_TYPES			   = Available Types
+
+
+!
+! Combo-box value 
+! NOTE TO TRANSLATOR: Do not translate following line
+_UI_DEFAULT_ANONYMOUS               = **anonymous**
+
+!
+! Unique, Key and KeyRef window
+!
+_UI_REFERENCE_KEY                   = Reference key
+_UI_SELECTOR                        = Selector
+_UI_FIELDS                          = Fields
+
+_UI_TOOLTIP_SELECTOR_TEXT           = Specifies an XPath expression relative to instances of the current element
+_UI_TOOLTIP_FIELD_TEXT              = Specifies an XPath expression relative to each element selected by the selector
+
+_UI_ADD_BUTTON                      = Add>>
+_UI_REMOVE_BUTTON                   = <<Remove
+
+!
+! Include & Imports
+!
+_UI_LABEL_PREFIX                = Prefix:
+_UI_LABEL_NAMESPACE             = Namespace:
+
+_UI_SCHEMA_INCLUDE_DESC         = Select a schema file so that the definitions in the schema file will be available in the current schema. The target namespace of the included schema must be the same as the target namespace of the current schema.
+_UI_LABEL_SCHEMA_IMPORT_DESC    = Select a schema file from a different namespace so that its definitions can be referenced by the current schema. You must associate a prefix with the new namespace for use in the current schema.
+
+_UI_LABEL_SCHEMA_LOCATION        = Schema location:
+_UI_BUTTON_SELECT                = Select
+_UI_FILEDIALOG_SELECT_XML_SCHEMA = Select XML schema file
+_UI_FILEDIALOG_SELECT_XML_DESC   = Select an XML schema file from the Workbench projects
+_UI_FILEDIALOG_SELECT_XML_URL    = Select an XML schema file from HTTP
+
+_UI_LABEL_LOADING_XML_SCHEMA     = Loading XML Schema
+_UI_LABEL_FINISH_LOADING         = Finish Loading
+_UI_LABEL_NO_LOCATION_SPECIFIED  = No Location Specified
+
+!
+! XSD Editor
+!
+_UI_TAB_SOURCE                  = Source
+_UI_TAB_DESIGN                  = Design
+!  Note to translators: Graph is the graphic view of the XML schema
+_UI_TAB_GRAPH                   = Graph
+_UI_MENU_UNDO                   = &Undo @Ctrl+Z
+_UI_MENU_REDO                   = &Redo @Ctrl+Y
+
+!
+! Task List Related Message
+!
+_UI_REF_FILE_ERROR_DESCRIPTION      = The errors below were detected when validating the file "{0}" via the file "{1}".  In most cases these errors can be detected by validating "{2}" directly.  However it is possible that errors will only occur when {2} is validated in the context of {3}.
+_UI_REF_FILE_ERROR_PUSH_HELP        = Push the help button below to read more.
+_UI_REF_FILE_ERROR_MESSAGE          = Referenced file contains errors ({0}).  For more information, right click on the message and select "Show Details..."
+_UI_REF_FILE_SHOW_DETAILS           = Show Details...
+
+
+!
+! XSDEditor Menu bar contributor
+!
+_UI_MENU_GENERATE_JAVA              = Generate &Java Beans...
+_UI_MENU_GENERATE_DTD               = Generate &DTD...
+_UI_MENU_GENERATE_SAMPLE_XML        = Generate XM&L...
+_UI_MENU_XSD_EDITOR                 = &XSD
+_UI_MENU_VALIDATE_XML               = &Validate XML Schema
+_UI_MENU_VALIDATE_XML_TOOLTIP       = Validate the current state of the XML Schema
+_UI_MENU_GENERATE_JAVA_TOOLTIP      = Generate Java beans for the XML Schema
+_UI_MENU_GENERATE_DTD_TOOLTIP       = Generate a DTD from the XML Schema
+_UI_MENU_GENERATE_SAMPLE_XML_TOOLTIP = Generate an XML from the XML Schema
+_UI_MENU_RELOAD_DEPENDENCIES_TOOLTIP = Reload Dependencies
+_UI_MENU_RELOAD_DEPENDENCIES = &Reload Dependencies
+
+!
+! Preference Page
+!
+_UI_TEXT_INDENT_LABEL                 = Indentation
+_UI_TEXT_INDENT_SPACES_LABEL          = &Number of spaces: 
+_UI_TEXT_XSD_NAMESPACE_PREFIX         = XML schema language
+_UI_TEXT_XSD_DEFAULT_PREFIX           = XML schema language constructs &prefix:
+_UI_QUALIFY_XSD                       = &Qualify XML schema language constructs
+_UI_SEPARATE_DESIGN_AND_SOURCE_VIEW   = Separate Source, Design and Graph view
+_UI_COMBINED_DESIGN_AND_SOURCE_VIEW   = Combined Source or Graph view with Design view 
+_UI_LABEL_EDITOR_LAYOUT               = Editor Layout
+_UI_PREF_DESIGN_VIEW_LAYOUT           = Design View Location
+_UI_PREF_DESIGN_BOTTOM                = Below
+_UI_PREF_DESIGN_RIGHT                 = Right
+_UI_TEXT_XSD_DEFAULT_TARGET_NAMESPACE = Default Target Namespace:
+
+!
+! Content Outline View action
+! NOTE TO TRANSLATOR: Do not translate the word(s) following "Add" on each line in
+!   this section i.e. Annotation, Documentation, AppInfo  These words are XML Schema keywords.
+_UI_ACTION_DELETE                  = D&elete
+_UI_ACTION_ADD_ANNOTATION          = Add &Annotation
+_UI_ACTION_ADD_DOC                 = Add &Documentation
+_UI_ACTION_ADD_APP_INFO            = Add A&ppInfo
+_UI_ACTION_ADD_GLOBAL_ELEMENT      = Add Glob&al Element
+_UI_ACTION_ADD_KEY                 = Add &Key
+_UI_ACTION_ADD_KEY_REF             = Add Key Re&f
+_UI_ACTION_ADD_UNIQUE              = Add Uni&que
+_UI_ACTION_ADD_GROUP               = Add G&roup
+_UI_ADD_GROUP_REF                  = Add Gr&oup Ref
+_UI_ACTION_ADD_CONTENT_MODEL       = Add Content &Model
+_UI_ACTION_ADD_ELEMENT             = Add &Element
+_UI_ACTION_ADD_ELEMENT_REF         = Add E&lement Ref
+_UI_ACTION_ADD_SIMPLE_TYPE         = Add &Simple Type
+_UI_ACTION_ADD_PATTERN             = Add &Pattern
+_UI_ACTION_ADD_ENUM                = Add En&umeration
+_UI_ACTION_ADD_ENUMS               = Add Enu&merations...
+_UI_ACTION_ADD_COMPLEX_TYPE        = Add Complex &Type
+_UI_ACTION_ADD_COMPLEX_CONTENT     = Add Comple&x Content
+_UI_ACTION_ADD_SIMPLE_CONTENT      = Add Simple &Content
+_UI_ACTION_ADD_ATTRIBUTE           = Add Attri&bute
+_UI_ACTION_ADD_ATTRIBUTE_GROUP     = Add Attr&ibute Group
+_UI_ACTION_ADD_ATTRIBUTE_GROUP_REF = Add A&ttribute Group Ref
+_UI_ACTION_ADD_INCLUDE             = Add In&clude
+_UI_ACTION_ADD_IMPORT              = Add &Import
+_UI_ACTION_ADD_REDEFINE            = Add Re&define
+_UI_ACTION_ADD_NOTATION            = Add &Notation
+_UI_ACTION_ADD_ANY_ELEMENT         = Add An&y
+_UI_ACTION_ADD_ANY_ATTRIBUTE       = Add &Any Attribute
+_UI_ACTION_ADD_GLOBAL_ATTRIBUTE    = Add &Global Attribute
+_UI_ACTION_ADD_ATTRIBUTE_REFERENCE = Add Attrib&ute Ref
+_UI_ACTION_ADD_RESTRICTION         = Add Re&striction
+_UI_ACTION_ADD_UNION               = Add U&nion
+_UI_ACTION_ADD_LIST                = Add &List
+_UI_ACTION_DELETE_GROUP_SCOPE      = D&elete
+_UI_ACTION_ADD_CHOICE              = Add &Choice
+_UI_ACTION_ADD_SEQUENCE            = Add Se&quence
+_UI_ACTION_ADD_ALL                 = Add &All
+_UI_ACTION_ADD_EXTENSION           = Add E&xtension
+_UI_ACTION_ADD_SELECTOR            = Add &Selector
+_UI_ACTION_ADD_FIELD               = Add &Field
+! NOTE TO TRANSLATOR: Translate Add and Node
+_UI_ACTION_ADD_SCHEMA_NODE         = Add &Schema Node
+! NOTE TO TRANSLATOR: TRANSLATE Add and Local
+_UI_ACTION_ADD_LOCAL_SIMPLE_TYPE   = Add Local &Simple Type
+_UI_ACTION_ADD_LOCAL_COMPLEX_TYPE  = Add Local &Complex Type
+_UI_ACTION_BACK_TO_SCHEMA_VIEW     = Back To Schema
+_UI_HOVER_BACK_TO_SCHEMA_VIEW     = Back to schema
+
+_UI_ACTION_MAKE_ANONYMOUS_TYPE_GLOBAL = Make Anonymous Type Global
+_UI_ACTION_OPEN_SCHEMA                = Open Schema
+
+_UI_ACTION_INSERT_BEFORE           = Insert Before
+_UI_ACTION_INSERT_AFTER            = Insert After
+
+_UI_OUTLINE_SORT                   = Sort alphabetically
+_UI_OUTLINE_DO_NOT_SORT            = Do not sort alphabetically
+
+_UI_OUTLINE_SHOW_COMPLEX_TYPE      = Show Complex Types Only
+_UI_OUTLINE_SHOW_SIMPLE_TYPE       = Show Simple Types Only
+_UI_OUTLINE_SHOW_ATTRIBUTE_GROUP   = Show Attribute Groups Only
+_UI_OUTLINE_SHOW_GROUP             = Show Groups Only
+_UI_OUTLINE_SHOW_GLOBAL_ELEMENT    = Show Global Elements Only
+_UI_OUTLINE_SHOW_REFERENCES        = Show Reference Content
+_UI_OUTLINE_SHOW_INHERITED         = Show Inherited Content
+
+_UI_ACTION_SET_MULTIPLICITY		   = Set Multiplicity
+
+!
+! New XML Schema Wizard
+!
+_UI_WIZARD_CREATE_XSD_MODEL_TITLE    = Create XML Schema
+
+! NOTE TO TRANSLATOR: Do not translate following line
+_UI_CREATEXSD                        = createXSD
+_UI_NEW_XML_SCHEMA_TITLE             = New XML Schema
+_UI_CREATE_A_NEW_XML_SCHEMA_DESC     = Create a new XML schema.
+
+! NOTE TO TRANSLATOR: Do not translate following line
+_UI_NEW_XML_SCHEMA_FILENAME          = NewXMLSchema.xsd
+
+!
+! XSD From RDB Schema Wizard
+!
+_UI_WIZARD_CREATE_XSD_FROM_RDB_TITLE = Create XSD from RDB Table
+
+
+!
+! Regular Expression Wizard
+!
+_UI_REGEX_WIZARD_CREATE_BUTTON = Create Regular Expression...
+_UI_TOOLTIP_REGEX_WIZARD_BUTTON = Launch the Regular Expression Wizard
+_UI_REGEX_WIZARD_TITLE = Regular Expression Wizard
+_UI_REGEX_WIZARD_COMPOSITION_PAGE_TITLE = Compose Regular Expression
+_UI_REGEX_WIZARD_COMPOSITION_PAGE_DESCRIPTION = To add a token, specify its contents and occurrence, then click Add.
+_UI_REGEX_WIZARD_INVALID_REGEX_ERROR_PREFIX = The current regular expression is not valid.  Reason:  
+_UI_REGEX_WIZARD_INVALID_TOKEN_ERROR_PREFIX = The current token is not valid.  Reason:  
+_UI_REGEX_WIZARD_INVALID_REGEX_ERROR = The current regular expression is not valid.
+_UI_REGEX_WIZARD_INVALID_TOKEN_ERROR = The current token is not valid.
+_UI_REGEX_WIZARD_INVALID_MIN_ERROR_SUFFIX = Invalid minimum range value.  The value must be a positive integer less than the maximum value.
+_UI_REGEX_WIZARD_MISSING_MIN_ERROR_SUFFIX = Invalid minimum range value.  A minimum range must be specified if a maximum range is specified.
+_UI_REGEX_WIZARD_INVALID_MAX_ERROR_SUFFIX = Invalid maximum range value.  The value must be a positive integer greater than the minimum value.
+_UI_REGEX_WIZARD_INVALID_REPEAT_ERROR_SUFFIX = Invalid repeat value.  The value must be a positive integer.
+_UI_REGEX_WIZARD_INVALID_SELECTION_ERROR = Nothing is currently selected.  Either make a selection or choose a different token. 
+_UI_REGEX_WIZARD_TOKEN_LABEL = Token contents:
+_UI_REGEX_WIZARD_AUTO_ESCAPE_CHECKBOX_LABEL = Auto escape
+_UI_REGEX_WIZARD_OCCURENCE_LABEL = Occurrence
+! Instructions for translators: The following label is used in a phrase to identify a range of values.
+! For example:  5 to 10.
+! The values are text fields that are initially blank so the user has to enter in values
+! For example:   _______ to ________
+_UI_REGEX_WIZARD_TO_LABEL = to
+_UI_REGEX_WIZARD_ADD_BUTTON_LABEL = Add 
+_UI_REGEX_WIZARD_CURRENT_REGEX_LABEL = Current regular expression:
+_UI_TOOLTIP_REGEX_WIZARD_TERMS = Content of new token
+_UI_TOOLTIP_REGEX_WIZARD_AUTO_ESCAPE_CHECKBOX = Insert escape characters to match metacharacter literals (e.g. converts \"*\" to \"\\*\")
+_UI_TOOLTIP_REGEX_WIZARD_ADD_BUTTON = Add this token to the regular expression
+_UI_TOOLTIP_REGEX_WIZARD_CURRENT_REGEX = The current regular expression
+_UI_TOOLTIP_REGEX_WIZARD_REPEAT = The number of times that the token must occur.
+_UI_TOOLTIP_REGEX_WIZARD_MIN = The minimum number of times that the token can occur.
+_UI_TOOLTIP_REGEX_WIZARD_MAX = The maximum number of times that the token can occur.
+_UI_TOOLTIP_REGEX_WIZARD_CARET_LABEL = The location where the new token will be inserted.
+_UI_REGEX_WIZARD_TESTING_PAGE_TITLE = Test Regular Expression
+_UI_REGEX_WIZARD_TESTING_PAGE_DESCRIPTION = To test the regular expression, enter sample text that you wish to match.  The success of the match will be indicated above.
+_UI_REGEX_WIZARD_REGEX_LABEL = Regular expression: 
+_UI_REGEX_WIZARD_SAMPLE_TEXT =  Sample text: 
+_UI_REGEX_WIZARD_MATCHES = The text matches the regular expression.
+_UI_REGEX_WIZARD_DOES_NOT_MATCH = The text does not match the regular expression.
+_UI_REGEX_WIZARD_TERM_ANY_CHAR = Any character
+_UI_REGEX_WIZARD_TERM_ALPHANUMERIC_CHAR = Alphanumeric character
+_UI_REGEX_WIZARD_TERM_WHITESPACE = Whitespace
+_UI_REGEX_WIZARD_TERM_DIGIT = Digit
+_UI_REGEX_WIZARD_TERM_UPPER = Upper case
+_UI_REGEX_WIZARD_TERM_LOWER = Lower case
+_UI_REGEX_WIZARD_TERM_SELECTION = Current selection
+_UI_REGEX_WIZARD_QUANTIFIER_SINGLE = Just once
+_UI_REGEX_WIZARD_QUANTIFIER_STAR = Zero or more
+_UI_REGEX_WIZARD_QUANTIFIER_PLUS = One or more
+_UI_REGEX_WIZARD_QUANTIFIER_OPTIONAL = Optional
+_UI_REGEX_WIZARD_QUANTIFIER_REPEAT = Repeat
+_UI_REGEX_WIZARD_QUANTIFIER_RANGE = Range
+
+!
+! Select Include File Wizard
+_UI_LABEL_INCLUDE_URL_FILE    = Select schema from:
+_UI_RADIO_URL                 = HTTP
+_UI_RADIO_FILE                = Workbench projects
+_UI_WIZARD_INCLUDE_FILE_TITLE = Include Another Schema
+_UI_WIZARD_INCLUDE_FILE_DESC  = Select another schema from workbench projects or from HTTP.
+_UI_LABEL_URL                 = URL:
+_UI_URL_START_WITH            = The URL must start with http://
+_UI_SPECIFY_URL               = Please specify a URL
+
+!
+! Enumerations Dialog
+_UI_ENUMERATIONS_DIALOG_TITLE = Add Enumerations
+_UI_LABEL_DELIMITER_CHAR      = &Delimiter characters:
+_UI_LABEL_PRESERVE_WHITESPACE = &Preserve leading and trailing whitespace
+
+_UI_ACTION_DELETE_ENUMERATION = Delete Enumeration
+
+!
+! 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.
+
+!
+! Combo-box choices 
+!
+! NOTE TO TRANSLATOR: Do not translate following 10 lines
+_UI_COMBO_QUALIFIED             = qualified
+_UI_COMBO_UNQUALIFIED           = unqualified
+_UI_COMBO_EXTENSION             = extension
+_UI_COMBO_RESTRICTION           = restriction
+_UI_COMBO_ALL                   = all
+_UI_COMBO_TRUE                  = true
+_UI_COMBO_FALSE                 = false
+_UI_COMBO_LAX                   = lax
+_UI_COMBO_SKIP                  = skip
+_UI_COMBO_STRICT                = strict
+
+! Generate DTD - pass as title and description for wizard page
+_UI_GENERATE_DTD_TITLE          = Generate DTD
+_UI_GENERATE_DTD_DESCRIPTION    = Generate a DTD from the selected XML schema file.
+
+! Generate DDL - pass as title and description for wizard page
+_UI_GENERATE_DDL_TITLE          = Generate DDL
+_UI_GENERATE_DDL_DESCRIPTION    = Generate DDL from the selected XML schema file.
+
+_UI_XML_SCHEMA_VALIDATOR            = XML Schema Validator
+
+! Generation from the Schema model - pre-condition check
+_UI_DIALOG_TITLE_GRAMMAR_ERROR      = Invalid Grammar
+_UI_DIALOG_INFO_SCHEMA_INVALID      = The schema file contains errors. Open it in the XML Schema editor and validate it for details.
+_UI_DIALOG_TITLE_NO_GLOBAL_ELEMENTS = No Global Elements
+_UI_DIALOG_INFO_NO_GLOBAL_ELEMENTS  = The selected schema has no global elements. Global elements are required to generate anything from an XML schema.
+
+! Section title for other attributes
+_UI_SECTION_ADVANCED_ATTRIBUTES   = Advanced
+
+! For undo action menus
+! Note to Translators: For the following "Change" phrases,
+! maxOccurs, minOccurs, lang, xpath are keywords so please
+! do no translate them.  These are for the undo action menus.
+! For example, if the user makes a change in the name of an
+! element, then the undo action would be Undo Element Name Change
+_UI_NAMESPACE_CHANGE           = Namespace Change
+_UI_PROCESSCONTENTS_CHANGE     = Process Contents Change
+_UI_MAXOCCURS_CHANGE           = maxOccurs Change
+_UI_MINOCCURS_CHANGE           = minOccurs Change
+_UI_SOURCE_ATTRIBUTE_CHANGE    = Source Change
+_UI_COMMENT_CHANGE             = Comment Change
+_UI_PREFIX_CHANGE              = Prefix Change
+_UI_ATTRIBUTEGROUP_REF_CHANGE  = Attribute Group Reference Change
+_UI_ATTRIBUTEGROUP_NAME_CHANGE = Attribute Group Name Change
+_UI_ATTRIBUTE_FIXED_CHANGE     = Attribute Fixed Change
+_UI_ATTRIBUTE_DEFAULT_CHANGE   = Attribute Default Change
+_UI_ATTRIBUTE_NAME_CHANGE      = Attribute Name Change
+_UI_ATTRIBUTE_VALUE_CHANGE     = Attribute Value Change
+_UI_ATTRIBUTE_USE_CHANGE       = Attribute Use Change
+_UI_ATTRIBUTE_FORM_CHANGE      = Attribute Form Change
+_UI_COMPLEXTYPE_NAME_CHANGE    = Complex Type Name Change
+_UI_COMPLEXTYPE_ABSTRACT_CHANGE = Complex Type Abstract Change
+_UI_COMPLEXTYPE_MIXED_CHANGE   = Complex Type Mixed Change
+_UI_COMPLEXTYPE_BLOCK_CHANGE   = Complex Type Block Change
+_UI_COMPLEXTYPE_FINAL_CHANGE   = Complex Type Final Change
+_UI_DOCUMENTATION_SOURCE_CHANGE = Documentation Source Change
+_UI_DOCUMENTATION_LANG_CHANGE   = Documentation lang Change
+_UI_DOCUMENTATION_COMMENT_CHANGE = Documentation Comment Change
+_UI_ELEMENT_NAME_CHANGE          = Element Name Change
+_UI_ELEMENT_VALUE_CHANGE         = Element Value Change
+_UI_ELEMENT_TYPE_CHANGE          = Element Type Change
+_UI_ENUM_VALUE_CHANGE            = Enum Value Change
+_UI_FIELD_XPATH_CHANGE           = Field xpath Change
+_UI_GROUP_REF_CHANGE             = Group Reference Change
+_UI_GROUP_SCOPE_CHANGE           = Content Model Change
+_UI_GROUP_NAME_CHANGE            = Group Name Change
+_UI_IMPORT_CHANGE                = Import Change
+_UI_KEY_NAME_CHANGE              = Key Name Change
+_UI_KEYREF_NAME_CHANGE           = Key Reference Name Change
+! Note to translators
+! For the following item, Refer is the keyref attribute to refer to some other key
+_UI_KEYREF_REFER_CHANGE          = Key Reference Refer Change
+_UI_NOTATION_NAME_CHANGE         = Notation Name Change
+_UI_NOTATION_PUBLIC_CHANGE       = Notation Public Change
+_UI_NOTATION_SYSTEM_CHANGE       = Notation System Change
+_UI_PATTERN_VALUE_CHANGE         = Pattern Value Change
+_UI_SCHEMA_VERSION_CHANGE        = Schema Version Change
+_UI_SCHEMA_LANG_CHANGE           = Schema lang Change
+_UI_SELECTOR_XPATH_CHANGE        = Selector xpath Change
+_UI_TYPE_CHANGE                  = Type Change
+_UI_DERIVEDBY_CHANGE             = Derivation Change
+_UI_FACET_CHANGE                 = Facet Change
+_UI_SIMPLETYPE_NAME_CHANGE       = SimpleType Name Change
+_UI_UNIQUE_NAME_CHANGE           = Unique Name Change
+_UI_SCHEMA_ATTRIBUTEFORMDEFAULT_CHANGE = Attribute Form Default Change
+_UI_SCHEMA_ELEMENTFORMDEFAULT_CHANGE = Element Form Default Change
+_UI_SCHEMA_BLOCKDEFAULT_CHANGE   = Block Default Change
+_UI_SCHEMA_FINALDEFAULT_CHANGE   = Final Default Change
+_UI_ELEMENT_SUBSTITUTIONGROUP_CHANGE = Substitution Group Change
+_UI_ELEMENT_FORM_CHANGE          = Form Change
+_UI_ELEMENT_BLOCK_CHANGE         = Block Change
+_UI_ELEMENT_FINAL_CHANGE         = Final Change
+_UI_ELEMENT_ABSTRACT_CHANGE      = Abstract Change
+_UI_ELEMENT_NILLABLE_CHANGE      = Nillable Change
+_UI_TARGETNAMESPACE_CHANGE       = Target Namespace Change
+
+! Window Headings for Flat View
+_UI_PAGE_HEADING_ANYATTRIBUTE = Any Attribute
+_UI_PAGE_HEADING_ANYELEMENT   = Any Element
+_UI_PAGE_HEADING_APPINFO            = AppInfo
+_UI_PAGE_HEADING_ATTRIBUTEGROUP_REF = Attribute Group Reference
+_UI_PAGE_HEADING_ATTRIBUTEGROUP     = Attribute Group
+_UI_PAGE_HEADING_ATTRIBUTE_REF      = Attribute Reference
+_UI_PAGE_HEADING_ATTRIBUTE          = Attribute
+_UI_PAGE_HEADING_COMPLEXTYPE        = Complex Type
+_UI_PAGE_HEADING_DOCUMENTATION      = Documentation
+_UI_PAGE_HEADING_ELEMENT     = Element
+_UI_PAGE_HEADING_ELEMENT_REF = Element Reference
+_UI_PAGE_HEADING_ENUM        = Enumeration
+_UI_PAGE_HEADING_FIELD       = Field
+_UI_PAGE_HEADING_GROUP_REF   = Group Reference
+_UI_PAGE_HEADING_CONTENTMODEL  = Content Model
+_UI_PAGE_HEADING_GROUP         = Group
+_UI_PAGE_HEADING_IMPORT        = Import
+_UI_PAGE_HEADING_INCLUDE       = Include
+_UI_PAGE_HEADING_KEYREF        = Key Reference
+_UI_PAGE_HEADING_KEY           = Key
+_UI_PAGE_HEADING_NOTATION      = Notation
+_UI_PAGE_HEADING_PATTERN       = Pattern
+_UI_PAGE_HEADING_REDEFINE      = Redefine
+_UI_PAGE_HEADING_SCHEMA        = Schema
+_UI_PAGE_HEADING_SELECTOR      = Selector
+_UI_PAGE_HEADING_LIST          = List
+_UI_PAGE_HEADING_UNION         = Union
+_UI_PAGE_HEADING_SIMPLECONTENT = Simple Content
+_UI_PAGE_HEADING_COMPLEXCONTENT = Complex Content
+_UI_PAGE_HEADING_RESTRICTION   = Restriction
+_UI_PAGE_HEADING_EXTENSION     = Extension
+_UI_PAGE_HEADING_SIMPLETYPE    = Simple Type
+_UI_PAGE_HEADING_UNIQUE        = Unique
+_UI_PAGE_HEADING_REFERENCE     = reference
+
+!
+! Graph page
+!
+_UI_GRAPH_SIMPLE_TYPES         = Simple Types
+_UI_GRAPH_COMPLEX_TYPES        = Complex Types
+_UI_GRAPH_GROUPS               = Groups
+_UI_GRAPH_GLOBAL_ATTRIBUTES    = Global Attributes
+_UI_GRAPH_GLOBAL_ELEMENTS      = Global Elements
+_UI_GRAPH_XSDSCHEMA            = Schema
+_UI_GRAPH_XSDSCHEMA_NO_NAMESPACE = (no target namespace specified)
+_UI_GRAPH_XSDCOMPLEXTYPEDEFINITION = XSD Complex Type Definition:
+_UI_GRAPH_XSDMODELGROUP        = XSD Model Group
+_UI_GRAPH_XSDPARTICLE          = XSD Particle
+_UI_GRAPH_VIEW_NOT_AVAILABLE   = View is not available for selected object.
+_UI_GRAPH_UNKNOWN_OBJECT       = Unknown object
+
+! Additional Categories
+_UI_GRAPH_TYPES                = Types
+_UI_GRAPH_ELEMENTS             = Elements
+_UI_GRAPH_ATTRIBUTES           = Attributes
+_UI_GRAPH_ATTRIBUTE_GROUPS     = Attribute Groups
+_UI_GRAPH_NOTATIONS            = Notations
+_UI_GRAPH_IDENTITY_CONSTRAINTS = Identity Constraints
+_UI_GRAPH_ANNOTATIONS          = Annotations
+_UI_GRAPH_DIRECTIVES           = Directives
+
+! For Union MemberTypes Dialog
+_UI_LABEL_SELECT_MEMBERTYPES   = Select from the available types and add to the memberTypes list
+_UI_LABEL_MEMBERTYPES_CHANGE   = Member Types Change
+_UI_LABEL_MEMBERTYPES_VALUE    = Member Types Value:
+_UI_LABEL_MEMBERTYPES          = Member types:
+
+_UI_LABEL_VARIETY_CHANGE       = Variety Change
+
+_UI_LABEL_FIXEDORDEFAULT_VALUE = Fixed/Default Value
+
+_UI_LABEL_ITEM_TYPE_CHANGE     = Item Type Change
+
+_UI_LABEL_AVAILABLE_TYPES      = Available Types
+
+_UI_LABEL_INCLUDE_CHANGE       = Include Change
+
+_UI_LABEL_ITEM_TYPE            = Item type:
+_UI_LABEL_BASE_TYPE            = Base Type
+_UI_LABEL_TYPE                 = Type
+_UI_LABEL_MODEL_GROUP          = Model Group
+
+_UI_LABEL_ABSENT               = absent
+
+_UI_WARNING_RESET_ATTRGRP_REF  = Reset attribute group reference <{0}>
+_UI_WARNING_REMOVE_ATTRGRP_REF = Remove attribute group reference <{0}>
+_UI_WARNING_RESET_ATTR_REF     = Reset attribute reference <{0}>
+_UI_WARNING_REMOVE_ATTR_REF    = Remove attribute reference <{0}>
+
+!======================================================================================
+!
+! Here is the list of Error string that have message IDs - make sure they are unique
+!  Range for XSDEditor messageIDs: IWAX1001E - IWAX1200E
+!
+!======================================================================================
+! These three errors appear in the select include wizard
+! The name of the file will be substituted in
+_UI_DIFFERENT_NAME_SPACE  = {0} is in a different namespace 
+_UI_SAME_NAME_SPACE       = {0} is in the same namespace
+_UI_INCORRECT_XML_SCHEMA  = {0} is an invalid XML schema file
+
+_ERROR_SCHEMA_NOT_EXIST         = IWAX1003E does not exist.
+_ERROR_LABEL_INVALID_PREFIX     = IWAX1004E Invalid prefix. A prefix must not be empty or contain any space.
+
+! The name of the file will be substituted in
+_ERROR_SCHEMA_NAME_THE_SAME  = IWAX1005E {0} is the current schema. A schema cannot include itself. Reset to the last valid schema.
+
+_ERROR_XSD_GENERATION                = IWAX1006E Error generating XML schema
+_ERROR_NO_CONTAINER                  = IWAX1007E No folder selected
+_ERROR_NO_FILE_NAME                  = IWAX1008E No file name provided
+_ERROR_FILENAME_MUST_END_XSD         = IWAX1011E The file name must end in .xsd
+
+
+!
+! For schema that has too many errors, an extended message. 
+!
+_ERROR_DIALOG_XML_SCHEMA_INVALID_TEXT  = IWAX100d9E The XML schema file is not valid.  
+_ERROR_MORE_ERRORS                    = There are more errors in the schema than are displayed in the Tasks view.  Correct the first {0} errors and re-validate the schema file.
+
+! DDL Generation Failed Dialog
+_UI_DIALOG_DDL_GEN_FAILED_TITLE     = DDL Generation Failed
+_ERROR_DIALOG_DDL_NOT_GENEREATED    = IWAX1010E DDL has not been generated
+_UI_DIALOG_DDL_GEN_FAILED_REASON    = The selected schema has no global elements
+_UI_DIALOG_DDL_GEN_FAILED_REASON2   = None of the global elements in the schema have a complex type or they reference complex types that cannot be found.
+
+_EXC_OPEN_XSD = IWAX1011E Cannot open XML Schema editor
+
+_ERROR_LABEL_PREFIX_EXISTS     = IWAX1012E Prefix already exists
+
+_ERROR_REMOVE_LOCAL_SIMPLETYPE  = IWAX1013E Remove local simple type from extension
+
+_WARN_INVALID_TARGET_NAMESPACE = IWAX1014E The target namespace is not well-formed
+
+_ERROR_TARGET_NAMESPACE_AND_PREFIX = IWAX1015E A target namespace must be associated with a prefix
+
+
+_UI_CONTAINMENT = Containment
+_UI_INHERITANCE = Inheritance
+_UI_SUBSTITUTION_GROUPS = Substitution Groups
+_UI_ANONYMOUS = **anonymous**
+_UI_VALUE = Value
+_UI_ANY_ELEMENT = Any Element
+_UI_SORT = Sort
+
+_UI_ACTION_EDIT_NAMESPACES = Edit Namespaces...
+
+
+_UI_CreateChild_text = {0}
+_UI_CreateChild_text2 = {1} {0}
+_UI_CreateChild_tooltip = Create New {0} Under {1} Feature
+_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}.
+_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent.
+
+!======================================================================================
+!
+! Used by org.eclipse.wst.common.ui.internal.viewers.SelectSingleFileView
+!
+!======================================================================================
+_UI_LABEL_SOURCE_FILES   = Workbench Files
+_UI_LABEL_SELECTED_FILES = Selected Files
+
+_UI_IMPORT_BUTTON          = Import Files...
+_UI_IMPORT_BUTTON_TOOL_TIP = Import files from file system
+
+
+!======================================================================================
+!
+! refactoring
+!
+!======================================================================================
+refactoringActionSet.label=Refactor
+refactoringActionSet.description=XSD Editor refactoring actions
+refactoring.menu.label=Refactor
+refactoring.renameAction.label=Re&name...
+context.text.editor.xsd.name=Editing XSD context
+command.xsd.refactor.rename.element.name=Rename XSD element
+command.xsd.refactor.rename.element.description=Rename XSD element
+command.xsd.refactor.makeElementGlobal.element.name=Make local element global
+command.xsd.refactor.makeElementGlobal.element.description=Promotes local element to global level and replaces its references
+command.xsd.refactor.makeTypeGlobal.element.name=Make anonymous type global
+command.xsd.refactor.makeTypeGlobal.element.description=Promotes anonymous type to global level and replaces its references
+
+! Copied from sse
+23concat_EXC_=Resource {0} does not exist.
+32concat_EXC_=Editor could not be open on {0}
+An_error_has_occurred_when1_ERROR_=An error has occurred when initializing the input for the the editor's source page.
+OpenFileFromSource.label=Op&en Selection
+OpenFileFromSource.tooltip=Open an editor on the selected link
+OpenFileFromSource.image=
+OpenFileFromSource.description=Open an editor on the selected link
+
+AddBookmark.label=Add Boo&kmark...
+SelectRuler.label=Select Ruler
+
+_ZERO_OR_MORE = Zero or More
+_ZERO_OR_ONE  = Zero or One
+_ONE_OR_MORE  = One or More
+
+# For translators, as in structured DOM tree
+_UI_LABEL_STRUCTURED           = Structured
+
+_UI_LABEL_MOVE   				       = Move
+_UI_LABEL_RENAME 				       = Rename
+_UI_LABEL_TARGETNAMESPACE_CHANGE       = Target Namespace Change
+_INFO_RESET_ATTRIBUTE_GROUP_REFERENCE  = Reset attribute group reference
+_INFO_REMOVE_ATTRIBUTE_GROUP_REFERENCE = Remove attribute group reference
+
+Bundle-Vendor.0 = Eclipse.org
+search.declarations.label = Declarations
+search.references.label = References
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xsd.ui/plugin.xml b/bundles/org.eclipse.wst.xsd.ui/plugin.xml
new file mode 100644
index 0000000..90c3e76
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/plugin.xml
@@ -0,0 +1,451 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+
+	<extension point="org.eclipse.ui.editors">
+		<editor
+			name="%_UI_EDITOR_NAME"
+			extensions="xsd"
+			default="true"
+			icon="icons/XSDFile.gif"
+            contributorClass="org.eclipse.wst.xsd.editor.XSDMultiPageEditorContributor"
+            class="org.eclipse.wst.xsd.editor.InternalXSDMultiPageEditor"
+            id="org.eclipse.wst.xsd.editor.InternalXSDMultiPageEditor">
+<!--            <contentTypeBinding
+                contentTypeId="org.eclipse.wst.xsd.core.xsdsource" />
+                -->
+		</editor>
+	</extension>
+
+	<extension point="org.eclipse.ui.editorActions">
+        <editorContribution
+            targetID="org.eclipse.wst.xsd.core.xsdsource.source"
+            id="org.eclipse.wst.xsd.core.xsdsource.ruler.actions">
+         <action
+               label="%AddBookmark.label"
+               helpContextId="org.eclipse.ui.bookmark_action_context"
+               class="org.eclipse.ui.texteditor.BookmarkRulerAction"
+               actionID="RulerDoubleClick"
+               id="org.eclipse.ui.texteditor.BookmarkRulerAction"/>
+         <action
+               label="%SelectRuler.label"
+               class="org.eclipse.ui.texteditor.SelectRulerAction"
+               actionID="RulerClick"
+               id="org.eclipse.ui.texteditor.SelectRulerAction"/>
+        </editorContribution>
+	</extension>
+
+	<extension point="org.eclipse.ui.newWizards">
+		<wizard
+			id="org.eclipse.wst.xsd.ui.internal.wizards.NewXSDWizard"
+			name="%_UI_WIZARD_NEW_XSD"
+			class="org.eclipse.wst.xsd.ui.internal.wizards.NewXSDWizard"
+			category="org.eclipse.wst.XMLCategory"
+			icon="icons/XSDFile.gif">
+			<description>%_UI_CREATE_A_NEW_SCHEMA</description>
+			<selection class="org.eclipse.core.resources.IResource" />
+		</wizard>
+	</extension>
+
+	<extension point="org.eclipse.ui.preferencePages">
+		<page
+			name="%_UI_XML_SCHEMA_PREFERENCE"
+			category="org.eclipse.wst.sse.ui.internal.provisional.preferences"
+			class="org.eclipse.wst.xsd.editor.internal.preferences.XSDPreferencePage"
+			id="org.eclipse.wst.xsd.editor.internal.preferences.XSDPreferencePage">
+		</page>
+	</extension>
+<!--
+	<extension point="org.eclipse.wst.sse.ui.editorConfiguration">
+		<provisionalDefinition
+			type="preferencepages"
+			value="org.eclipse.wst.xsd.ui.internal.preferences.XSDPreferencePage"
+			target="org.eclipse.wst.xsd.ui.internal.XSDEditor.source" />
+     		<sourceViewerConfiguration
+			class="org.eclipse.wst.xsd.ui.internal.StructuredTextViewerConfigurationXSD"
+			target="org.eclipse.wst.xsd.core.xsdsource" />
+		<contentOutlineConfiguration
+			class="org.eclipse.wst.xsd.ui.internal.XSDContentOutlineConfiguration"
+			target="org.eclipse.wst.xsd.core.xsdsource" /> 
+	</extension>  -->
+
+	<!-- ==================================================== -->
+	<!-- Support help on the tags                             -->
+	<!-- ==================================================== -->
+	<!--   <extension
+		point="org.eclipse.wst.xml.core.internal.contentmodel.annotationFiles">
+		<annotationFile
+		location="/w3c/schemaForCodeAssist-annotations.xml"
+		publicId="http://www.w3.org/2001/XMLSchema">
+		</annotationFile>
+		</extension>
+	-->
+	
+	
+   <extension 
+   		point="org.eclipse.ui.views.properties.tabbed.propertyContributor">
+     <propertyContributor
+           contributorId="org.eclipse.wst.xsd.editor"
+           labelProvider="org.eclipse.wst.xsd.ui.common.properties.providers.XSDSectionLabelProvider">
+         <propertyCategory category="General"/>
+   		 <propertyCategory category="Documentation"/>
+         <propertyCategory category="Advanced"/>
+     </propertyContributor>
+   </extension>
+
+   <extension 
+    	point="org.eclipse.ui.views.properties.tabbed.propertyTabs">
+      <propertyTabs 
+            contributorId="org.eclipse.wst.xsd.editor">
+			<propertyTab
+				label="%_UI_LABEL_GENERAL"
+				category="General"
+				id="property.tab.general">
+			</propertyTab>
+			<propertyTab
+				label="%_UI_LABEL_TYPE_CONSTRAINTS"
+				category="General"
+				afterTab="property.tab.general"
+				id="property.tab.typeconstraints">
+			</propertyTab>
+			<propertyTab
+				label="%_UI_LABEL_ENUMERATIONS"
+				category="General"
+				afterTab="property.tab.general"
+				id="property.tab.enumerations">
+			</propertyTab>
+			<propertyTab
+				label="%_UI_LABEL_DOCUMENTATION"
+				category="Documentation"
+				afterTab="property.tab.general"
+				id="property.tab.documentation">
+			</propertyTab>
+			<propertyTab
+				label="%_UI_LABEL_EXTENSIONS"
+				category="Documentation"
+				afterTab="property.tab.general"
+				id="property.tab.extensions">
+			</propertyTab>
+    </propertyTabs>
+ </extension>
+
+
+<extension point="org.eclipse.ui.views.properties.tabbed.propertySections">
+   <propertySections contributorId="org.eclipse.wst.xsd.editor">
+	 <propertySection tab="property.tab.general" 
+        class="org.eclipse.wst.xsd.ui.common.properties.sections.XSDSchemaSection"  
+	 	id="prop.section.XSDSchemaSection">
+	    <input type="org.eclipse.xsd.XSDSchema">
+	    </input>
+	 </propertySection>
+	 <propertySection tab="property.tab.general" 
+        class="org.eclipse.wst.xsd.ui.common.properties.sections.SchemaLocationSection" 
+	 	id="prop.section.SchemaLocationSection">
+	    <input type="org.eclipse.xsd.XSDSchemaCompositor">
+	    </input>
+	 </propertySection>
+	 <propertySection tab="property.tab.general" 
+        class="org.eclipse.wst.xsd.ui.common.properties.sections.XSDComplexTypeSection"  
+	 	id="prop.section.XSDComplexTypeSection">
+	    <input type="org.eclipse.xsd.XSDComplexTypeDefinition">
+	    </input>
+	 </propertySection>
+	 <propertySection tab="property.tab.general" 
+        class="org.eclipse.wst.xsd.ui.common.properties.sections.XSDElementDeclarationSection"  
+	 	id="prop.section.XSDElementDeclarationSection">
+	    <input type="org.eclipse.xsd.XSDElementDeclaration">
+	    </input>
+	 </propertySection>
+	 <propertySection tab="property.tab.general" 
+        class="org.eclipse.wst.xsd.ui.common.properties.sections.XSDAttributeDeclarationSection"
+	 	id="prop.section.XSDAttributeDeclarationSection">
+	    <input type="org.eclipse.xsd.XSDAttributeDeclaration">
+	    </input>
+	 </propertySection>
+	 <propertySection tab="property.tab.general" 
+        class="org.eclipse.wst.xsd.ui.common.properties.sections.XSDAttributeGroupDefinitionSection"  
+	 	id="prop.section.XSDAttributeGroupDefinitionSection">
+	    <input type="org.eclipse.xsd.XSDAttributeGroupDefinition">
+	    </input>
+	 </propertySection>	
+	 <propertySection tab="property.tab.general" 
+        class="org.eclipse.wst.xsd.ui.common.properties.sections.XSDModelGroupSection"  
+	 	id="prop.section.XSDModelGroupSection">
+	    <input type="org.eclipse.xsd.XSDModelGroup">
+	    </input>
+	 </propertySection>
+	 <propertySection tab="property.tab.general" 
+        class="org.eclipse.wst.xsd.ui.common.properties.sections.XSDModelGroupDefinitionSection"  
+	 	id="prop.section.XSDModelGroupDefinitionSection">
+	    <input type="org.eclipse.xsd.XSDModelGroupDefinition">
+	    </input>
+	 </propertySection>
+	 <propertySection tab="property.tab.general" 
+        class="org.eclipse.wst.xsd.ui.common.properties.sections.XSDSimpleTypeSection"
+	 	id="prop.section.XSDSimpleTypeSection">
+	    <input type="org.eclipse.xsd.XSDSimpleTypeDefinition">
+	    </input>
+	 </propertySection>
+	 <propertySection tab="property.tab.typeconstraints" 
+        class="org.eclipse.wst.xsd.ui.common.properties.sections.XSDFacetSection"
+        filter="org.eclipse.wst.xsd.ui.common.properties.sections.XSDFacetSectionFilter"
+	 	id="prop.section.XSDFacetSection">
+	    <input type="org.eclipse.xsd.XSDConcreteComponent">
+	    </input>
+	 </propertySection>
+	 <propertySection tab="property.tab.documentation" 
+	 	class="org.eclipse.wst.xsd.ui.common.properties.sections.AnnotationSection" 
+	 	id="prop.section.AnnotationSection">
+	    <input type="org.eclipse.xsd.XSDConcreteComponent">
+	    </input>
+	 </propertySection>
+	 <propertySection tab="property.tab.extensions" 
+	 	class="org.eclipse.wst.xsd.ui.common.properties.sections.ApplicationInfoSection" 
+	 	id="prop.section.ExtensionsSection">
+	    <input type="org.eclipse.xsd.XSDConcreteComponent">
+	    </input>
+	 </propertySection>
+  </propertySections>
+</extension>
+
+  <extension-point id="ApplicationInformationDescription" name="ApplicationInformationDescription"/>
+
+  <extension-point id="XSDEditorExtensionConfiguration" name="XSDEditorExtensionConfiguration"/>
+
+	<extension
+		point="org.eclipse.wst.xml.core.catalogContributions">
+		<catalogContribution id="default">
+		
+			<uri
+				name="http://www.w3.org/2001/XMLSchema"
+				uri="platform:/plugin/org.eclipse.xsd/cache/www.w3.org/2001/XMLSchema.xsd" />
+			<system
+				systemId="http://www.w3.org/2001/xml.xsd"
+				uri="platform:/plugin/org.eclipse.xsd/cache/www.w3.org/2001/xml.xsd"/>				
+		</catalogContribution>
+	</extension>
+
+
+	<!-- intialize xsd reconcile validator -->
+	<extension point="org.eclipse.wst.sse.ui.sourcevalidation">
+		<validator
+			scope="total"
+			class="org.eclipse.wst.xsd.ui.internal.validation.DelegatingSourceValidatorForXSD"
+			id="org.eclipse.wst.xsd.ui.internal.validation.DelegatingSourceValidatorForXSD">
+			<contentTypeIdentifier
+				id="org.eclipse.wst.xsd.core.xsdsource">
+				<partitionType id="org.eclipse.wst.xml.XML_DEFAULT">
+				</partitionType>
+			</contentTypeIdentifier>
+		</validator>
+	</extension>
+
+	<extension point="org.eclipse.ui.contexts">
+		<context
+			id="org.eclipse.wst.xsd.ui.text.editor.context"
+			name="%context.text.editor.xsd.name"
+			parentId="org.eclipse.ui.textEditorScope" />
+	</extension>
+
+	<!-- this extension point is used to augment the ModelQuery to provide schema specific guided editing -->
+	<extension point="org.eclipse.wst.xml.core.modelQueryExtensions">
+		<modelQueryExtension
+			class="org.eclipse.wst.xsd.ui.internal.text.XSDModelQueryExtension"
+			contentType="org.eclipse.wst.xsd.core.xsdsource">
+		</modelQueryExtension>
+	</extension>
+
+	<!-- ====================================================== -->
+	<!-- Define Assign Validate action on .xsd file             -->
+	<!-- ====================================================== -->
+	<extension point="org.eclipse.ui.popupMenus">
+		<objectContribution
+			objectClass="org.eclipse.core.resources.IFile"
+			nameFilter="*.xsd"
+			id="org.eclipse.wst.xsd.validation.xsdvalidationaction">
+			<action
+				label="%_UI_MENU_VALIDATE_XML"
+				class="org.eclipse.wst.xsd.ui.internal.validation.ValidateSchemaActionDelegate"
+				enablesFor="1"
+				id="org.eclipse.wst.xsd.ui.internal.validation.ValidateSchemaActionDelegate">
+			</action>
+		</objectContribution>
+	</extension>
+
+	<!-- ====================================================== -->
+	<!-- Register the XSD validator with the validation 		-->
+	<!-- framework. 										    -->
+	<!-- ====================================================== -->
+	<extension
+		id="xsdValidator"
+		name="%_UI_XML_SCHEMA_VALIDATOR"
+		point="org.eclipse.wst.validation.validator">
+		<validator>
+			<filter
+				objectClass="org.eclipse.core.resources.IFile"
+				caseSensitive="false"
+				nameFilter="*.xsd">
+			</filter>
+			<helper
+				class="org.eclipse.wst.xml.core.internal.validation.core.Helper">
+			</helper>
+			<run
+				class="org.eclipse.wst.xsd.ui.internal.validation.Validator">
+			</run>
+		</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>
+		</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>
+	-->
+	<!-- ============================================================================================== -->
+	<!-- Register the  'Refactor', 'References' and 'Declarations' items to the design view	            -->
+	<!-- ============================================================================================== -->	    
+   <extension point="org.eclipse.ui.popupMenus"> 
+      <objectContribution 
+         id="org.eclipse.wst.xsd.ui.refactoring.menu.objectContrib" 
+         objectClass="org.eclipse.wst.xsd.editor.internal.adapters.XSDBaseAdapter">  
+         <action
+            id="org.eclipse.wst.xsd.ui.search.declarations.action" 
+            enablesFor="1"
+            style="pulldown"
+            menubarPath="search-slot"
+            label="%search.declarations.label"
+            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="%search.references.label"
+            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="%refactoringActionSet.label" 
+            class="org.eclipse.wst.xsd.ui.internal.refactor.actions.XSDRefactorGroupActionDelegate"> 
+         </action>   
+      </objectContribution>         
+      <!-- here we add the 'refactor' menu item to the source view -->
+      <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>
+
+	
+	<!-- 
+		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-->	
+
+	<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>
+</plugin>
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/adt/typeviz/design/figures/BoxFigure.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/adt/typeviz/design/figures/BoxFigure.java
new file mode 100644
index 0000000..a41d899
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/adt/typeviz/design/figures/BoxFigure.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.adt.typeviz.design.figures;
+
+import java.util.Iterator;
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.Figure;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.ToolbarLayout;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.wst.xsd.adt.typeviz.design.layouts.ColumnData;
+
+public class BoxFigure extends Figure
+{
+  protected ColumnData columnData = new ColumnData();  
+  public HeadingFigure headingFigure;
+  Figure contentPane;
+  
+  public boolean isSelected = false;
+
+  public BoxFigure()
+  {
+    super();
+    headingFigure = new HeadingFigure();   
+    add(headingFigure);
+
+    contentPane = new Figure()
+    {
+      public void paint(Graphics graphics)
+      {
+        super.paint(graphics);
+        boolean isFirst = false;
+        for (Iterator i = getChildren().iterator(); i.hasNext();)
+        {
+          Figure figure = (Figure) i.next();
+          if (isFirst)
+          {
+            isFirst = false;
+          }
+          else
+          {
+            Rectangle r = figure.getBounds();
+            graphics.drawLine(r.x, r.y + 1, r.x + r.width, r.y + 1);
+          }
+        }
+      }
+    };
+    contentPane.setLayoutManager(new ToolbarLayout());
+    add(contentPane);
+    headingFigure.setForegroundColor(ColorConstants.black); 
+  }
+
+  public void paint(Graphics graphics)
+  {
+    super.paint(graphics);
+    /*
+    // Fill for the header section
+    //
+    Rectangle r = getBounds().getCopy();
+    graphics.setBackgroundColor(ColorConstants.darkGray);
+    Color gradient1 = ColorConstants.lightGray;
+    if (isSelected)
+    {
+      gradient1 = ColorConstants.lightBlue;
+    }
+    Color gradient2 = ColorConstants.white;
+    graphics.setForegroundColor(gradient1);
+    graphics.setBackgroundColor(gradient2);
+    graphics.fillGradient(r.x + 1, r.y + 1, r.width - 2, nodeNameLabel.getBounds().height - 1, true);
+    nodeNameLabel.paint(graphics);
+    */
+  }
+
+  public IFigure getContentPane()
+  {
+    return contentPane;
+  }
+
+  public Label getNameLabel()
+  {
+    return headingFigure.getLabel();
+  }
+  
+  public HeadingFigure getHeadingFigure()
+  {
+    return headingFigure;
+  }
+  
+  public ColumnData getColumnData()
+  {
+    return columnData;
+  }  
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/adt/typeviz/design/figures/CompartmentFigure.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/adt/typeviz/design/figures/CompartmentFigure.java
new file mode 100644
index 0000000..7e329bc
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/adt/typeviz/design/figures/CompartmentFigure.java
@@ -0,0 +1,144 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.adt.typeviz.design.figures;
+
+import java.util.Iterator;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.Figure;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.ToolbarLayout;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.EditPart;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.wst.xsd.adt.design.editparts.StructureEditPart;
+import org.eclipse.wst.xsd.adt.design.figures.ICompartmentFigure;
+import org.eclipse.wst.xsd.adt.design.figures.IStructureFigure;
+import org.eclipse.wst.xsd.adt.typeviz.design.layouts.RowLayout;
+
+public class CompartmentFigure extends Figure implements ICompartmentFigure
+{
+  public Label nodeNameLabel;
+  protected Figure contentPane;
+  protected Figure annotationArea;
+  public Figure rowFigure;
+
+  public CompartmentFigure()
+  {
+    super();
+
+    rowFigure = new Figure();
+    add(rowFigure);
+
+    annotationArea = new Figure();
+    ToolbarLayout annotationLayout = new ToolbarLayout(false);
+    annotationLayout.setStretchMinorAxis(true);
+    annotationArea.setLayoutManager(annotationLayout);
+
+    // Need this to show content model structure on the left side of the figure
+    rowFigure.add(annotationArea);
+
+    contentPane = new Figure()
+    {
+      public void paint(Graphics graphics)
+      {
+        super.paint(graphics);
+        graphics.pushState();
+        try
+        {
+          boolean isFirst = true;
+          Color oldColor = graphics.getForegroundColor();
+          graphics.setForegroundColor(ColorConstants.lightGray);
+          for (Iterator i = getChildren().iterator(); i.hasNext();)
+          {
+            Figure figure = (Figure) i.next();
+            Rectangle r = figure.getBounds();
+//            if (figure instanceof FieldFigure)
+//            {
+//               Rectangle rChild = ((FieldFigure)figure).getNameFigure().getBounds();
+//               graphics.drawLine(rChild.right(), rChild.y, rChild.right(), rChild.bottom());
+//               graphics.setForegroundColor(ColorConstants.darkGray);
+//            }
+            if (isFirst)
+            {
+              isFirst = false;
+//               graphics.drawLine(r.x, r.y, r.x, r.y + r.height);
+            }
+            else
+            {
+              graphics.setForegroundColor(ColorConstants.white);
+              graphics.setBackgroundColor(ColorConstants.lightGray);              
+              graphics.fillGradient(r.x, r.y, r.width, 1, false);    
+//              graphics.drawLine(r.x, r.y, r.x + r.width, r.y);
+//            graphics.drawLine(r.x, r.y, r.x, r.y + r.height);
+            }
+          }
+          graphics.setForegroundColor(oldColor);
+        }
+        finally
+        {
+          graphics.popState();
+        }
+      }
+    };
+    contentPane.setLayoutManager(new ToolbarLayout());
+    rowFigure.add(contentPane);
+
+    RowLayout rowLayout = new RowLayout();
+    rowFigure.setLayoutManager(rowLayout);
+    rowLayout.setConstraint(annotationArea, "annotation");
+    rowLayout.setConstraint(contentPane, "contentPane");
+  }
+
+  public IFigure getContentPane()
+  {
+    return contentPane;
+  }
+
+  public IFigure getAnnotationPane()
+  {
+    return annotationArea;
+  }
+  
+  public void editPartAttached(EditPart owner)
+  {   
+    StructureEditPart structureEditPart = null;
+    for (EditPart parent = owner.getParent(); parent != null; parent = parent.getParent())
+    {
+      if (parent instanceof StructureEditPart)
+      {
+        structureEditPart = (StructureEditPart) parent;
+        break;
+      }
+    }
+    RowLayout rowLayout = (RowLayout)rowFigure.getLayoutManager();
+    IStructureFigure typeFigure = structureEditPart.getStructureFigure();    
+    Assert.isTrue(typeFigure instanceof StructureFigure, "Expected object of type StructureFigure");    
+    rowLayout.setColumnData(((StructureFigure)typeFigure).getColumnData());            
+  }
+
+  public void addSelectionFeedback()
+  {
+  }
+
+  public void removeSelectionFeedback()
+  {
+  }   
+  
+  public void refreshVisuals(Object model)
+  {
+    // TODO Auto-generated method stub
+    
+  }
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/adt/typeviz/design/figures/FieldFigure.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/adt/typeviz/design/figures/FieldFigure.java
new file mode 100644
index 0000000..2a90266
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/adt/typeviz/design/figures/FieldFigure.java
@@ -0,0 +1,251 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.adt.typeviz.design.figures;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.draw2d.Figure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.MarginBorder;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.ToolbarLayout;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPart;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.wst.xsd.adt.design.editparts.StructureEditPart;
+import org.eclipse.wst.xsd.adt.design.figures.IFieldFigure;
+import org.eclipse.wst.xsd.adt.design.figures.IStructureFigure;
+import org.eclipse.wst.xsd.adt.typeviz.design.layouts.RowLayout;
+
+public class FieldFigure extends Figure implements IFieldFigure
+{
+  // TODO: put this color is some common class
+  public static final Color cellColor = new Color(null, 224, 233, 246);
+  
+  // Formatting constraints
+  public static final int TOP_MARGIN = 2; // pixels
+  public static final int BOTTOM_MARGIN = TOP_MARGIN + 1; // extra pixel for the
+                                                          // footer line
+  public static final int LEFT_MARGIN = 2;
+  public static final int RIGHT_MARGIN = LEFT_MARGIN;
+  public static final int RIGHT_SIDE_PADDING = 6;
+
+  // States requiring decorators, and their icons
+  // protected static final Image errorIcon = ICON_ERROR;
+
+  // Labels which handle presentation of name and type
+  public Figure rowFigure;
+  protected Label nameLabel;
+  protected Label nameAnnotationLabel;  // for occurrence text, or error icons
+  protected Label typeLabel;
+  protected Label typeAnnotationLabel;  // for occurrence text, or error icons
+  protected Label toolTipLabel;
+
+  public FieldFigure()
+  {
+    super();
+    setLayoutManager(new ToolbarLayout());
+//    setOpaque(true);
+    rowFigure = new Figure();
+//    rowFigure.setOpaque(true);
+    RowLayout rowLayout = new RowLayout();
+    rowFigure.setLayoutManager(rowLayout);
+
+    add(rowFigure);
+
+    nameLabel = new Label();
+    nameLabel.setBorder(new MarginBorder(3, 5, 3, 5));
+    nameLabel.setLabelAlignment(PositionConstants.LEFT);
+    nameLabel.setOpaque(true);
+    rowFigure.add(nameLabel);
+    
+    nameAnnotationLabel = new Label();
+    nameAnnotationLabel.setBorder(new MarginBorder(3, 5, 3, 5));
+    nameAnnotationLabel.setLabelAlignment(PositionConstants.LEFT);
+    nameAnnotationLabel.setOpaque(true);
+    rowFigure.add(nameAnnotationLabel);
+    
+    toolTipLabel = new Label();
+    nameLabel.setToolTip(toolTipLabel);
+    typeLabel = new Label();
+    
+    // cs : we need to add some additional padding to the right
+    // so that when we edit the field there's room for the combobox's arrow
+    // and the type name won't be partially obscured
+    //
+    typeLabel.setBorder(new MarginBorder(3, 5, 3, 20));
+    typeLabel.setLabelAlignment(PositionConstants.LEFT);
+    typeLabel.setOpaque(true);
+    rowFigure.add(typeLabel);
+
+    typeAnnotationLabel = new Label() {
+      
+      public Dimension getPreferredSize(int wHint, int hHint)
+      {
+        if (getText() == null || getText().equals(""))
+        {
+          return new Dimension(0, 0);
+        }
+        return super.getPreferredSize(wHint, hHint);
+      };
+    };
+    typeAnnotationLabel.setBorder(new MarginBorder(3, 5, 3, 5));
+    typeAnnotationLabel.setLabelAlignment(PositionConstants.LEFT);
+    typeAnnotationLabel.setOpaque(true);
+    rowFigure.add(typeAnnotationLabel);
+    typeAnnotationLabel.setToolTip(toolTipLabel);
+    
+    rowLayout.setConstraint(nameLabel, "name");
+    rowLayout.setConstraint(nameAnnotationLabel, "nameAnnotation");
+    rowLayout.setConstraint(typeLabel, "type");
+    rowLayout.setConstraint(typeAnnotationLabel, "typeAnnotation");
+  }
+
+  /**
+   * @return Returns the "name" string used by this figure.
+   */
+  public String getName()
+  {
+    return nameLabel.getText();
+  }
+
+  /**
+   * @return Returns the figure representing the attribute name
+   */
+  public Label getNameLabel()
+  {
+    return nameLabel;
+  }
+
+  /**
+   * @return Returns the "type" string used by this figure.
+   */
+  public String getType()
+  {
+    return typeLabel.getText();
+  }
+
+  /**
+   * @return Returns the figure representing the attribute's type
+   */
+  public Label getTypeLabel()
+  {
+    return typeLabel;
+  }
+
+  /**
+   * @param name
+   *          Set the "name" string used by this figure.
+   */
+  public void setName(String name)
+  {
+    nameLabel.setText(name);
+  }
+
+  /**
+   * @param type
+   *          Set the "type" string used by this figure.
+   */
+  public void setType(String type)
+  {
+    typeLabel.setText(type);
+  }
+  
+  public void setTypeToolTipText(String toolTip)
+  {
+    setNameToolTipText(toolTip);
+  }
+
+  public void setNameToolTipText(String toolTip)
+  {
+    if (toolTip.length() > 0)
+    {
+      nameLabel.setToolTip(toolTipLabel);
+      toolTipLabel.setText(toolTip);
+    }
+    else
+    {
+      nameLabel.setToolTip(null);
+    }
+  }
+  
+  public void setNameAnnotationLabel(String text)
+  {
+    nameAnnotationLabel.setText(text);
+  }
+
+  public void setNameAnnotationLabelIcon(Image icon)
+  {
+    nameAnnotationLabel.setIcon(icon);
+  }
+  
+  public Label getNameAnnotationLabel()
+  {
+    return nameAnnotationLabel;
+  }
+  
+  public void setTypeAnnotationLabel(String text)
+  {
+    typeAnnotationLabel.setText(text);
+  }
+
+  public void setTypeAnnotationLabelIcon(Image icon)
+  {
+    typeAnnotationLabel.setIcon(icon);
+  }
+
+  public Label getTypeAnnotationLabel()
+  {
+    return typeAnnotationLabel;
+  }
+  
+  public void recomputeLayout()
+  {
+    RowLayout layout = (RowLayout)rowFigure.getLayoutManager();
+    if (layout != null && layout.getColumnData() != null)
+    {
+      layout.getColumnData().clearColumnWidths();
+    }    
+  }
+  
+  public void editPartAttached(EditPart owner)
+  {
+    StructureEditPart structureEditPart = null;
+    for (EditPart parent = owner.getParent(); parent != null; parent = parent.getParent())
+    {
+      if (parent instanceof StructureEditPart)
+      {
+        structureEditPart = (StructureEditPart) parent;
+        break;
+      }
+    }
+    RowLayout rowLayout = (RowLayout)rowFigure.getLayoutManager();
+    IStructureFigure typeFigure = structureEditPart.getStructureFigure();    
+    Assert.isTrue(typeFigure instanceof StructureFigure, "Expected object of type StructureFigure");    
+    rowLayout.setColumnData(((StructureFigure)typeFigure).getColumnData());   
+  }
+  
+  public void addSelectionFeedback()
+  {
+    rowFigure.setBackgroundColor(cellColor); 
+  }
+  
+  public void removeSelectionFeedback()
+  {
+    rowFigure.setBackgroundColor(getBackgroundColor());   
+  }
+  
+  public void refreshVisuals(Object model)
+  {
+    // TODO Auto-generated method stub
+    
+  }
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/adt/typeviz/design/figures/HeadingFigure.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/adt/typeviz/design/figures/HeadingFigure.java
new file mode 100644
index 0000000..041396b
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/adt/typeviz/design/figures/HeadingFigure.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.adt.typeviz.design.figures;
+
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.Figure;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.MarginBorder;
+import org.eclipse.draw2d.ToolbarLayout;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.swt.graphics.Color;
+
+public class HeadingFigure extends Figure
+{
+  public static final Color headerColor = new Color(null, 224, 233, 246);
+  Label label;
+  Color[] gradientColor = {ColorConstants.white,  
+                           ColorConstants.lightGray,
+                           ColorConstants.lightBlue,
+                           ColorConstants.gray};
+  boolean isSelected = false;
+  boolean isReadOnly = false;
+  
+  public HeadingFigure()
+  {
+    label = new Label();
+    label.setBorder(new MarginBorder(2));
+    ToolbarLayout toolbarLayout = new ToolbarLayout(false);
+    toolbarLayout.setMinorAlignment(ToolbarLayout.ALIGN_CENTER);
+    setLayoutManager(toolbarLayout);
+    add(label);
+  }
+  
+  public void setGradientColors(Color[] colors)
+  {
+    this.gradientColor = colors;
+  }
+  
+  public void setSelected(boolean isSelected)
+  {
+    this.isSelected = isSelected;
+  }
+
+  public void setIsReadOnly(boolean isReadOnly)
+  {
+    this.isReadOnly = isReadOnly;
+  }
+  
+  public void paint(Graphics graphics)
+  {
+    super.paint(graphics);
+    
+    graphics.pushState();
+    try
+    {
+      // Fill for the header section
+      //
+      Rectangle r = getBounds().getCopy();
+      graphics.setBackgroundColor(ColorConstants.lightGray);
+  
+      Color gradient1 = isReadOnly ? gradientColor[1] : headerColor;
+      if (isSelected && isReadOnly) gradient1 = gradientColor[3];
+      else if (isSelected && !isReadOnly) gradient1 = gradientColor[2];
+      Color gradient2 = gradientColor[0];
+      graphics.setForegroundColor(gradient1);
+      graphics.setBackgroundColor(gradient2);
+      Rectangle labelBounds = label.getBounds();
+      graphics.fillGradient(r.x+1, r.y+1, r.width-2, labelBounds.height - 2, true);    
+      graphics.setForegroundColor(ColorConstants.darkGray);
+      label.paint(graphics);    
+    }
+    finally
+    {
+      graphics.popState();
+    }
+  }
+
+  public Label getLabel()
+  {
+    return label;
+  }  
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/adt/typeviz/design/figures/RoundedLineBorder.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/adt/typeviz/design/figures/RoundedLineBorder.java
new file mode 100644
index 0000000..aac092b
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/adt/typeviz/design/figures/RoundedLineBorder.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.adt.typeviz.design.figures;
+
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.LineBorder;
+import org.eclipse.draw2d.geometry.Insets;
+import org.eclipse.swt.graphics.Color;
+
+public class RoundedLineBorder extends LineBorder
+{
+  protected int arcLength;   
+  protected int lineStyle = Graphics.LINE_SOLID;
+
+  public RoundedLineBorder(Color c, int width, int arcLength)
+  {
+    super(c, width);     
+    this.arcLength = arcLength;
+  }
+
+  public RoundedLineBorder(int width, int arcLength)
+  {
+    super(width);     
+    this.arcLength = arcLength;
+  }
+  
+  public RoundedLineBorder(Color c, int width, int arcLength, int lineStyle)
+  {
+    super(c, width);
+    this.arcLength = arcLength;
+    this.lineStyle = lineStyle;
+  }
+
+  public RoundedLineBorder(int width, int arcLength, int lineStyle)
+  {
+    super(width);
+    this.arcLength = arcLength;
+    this.lineStyle = lineStyle;
+  }
+
+  public void paint(IFigure figure, Graphics graphics, Insets insets)
+  {
+    int rlbWidth = getWidth();
+    tempRect.setBounds(getPaintRectangle(figure, insets));
+    if (rlbWidth%2 == 1)
+    {
+      tempRect.width--;
+      tempRect.height--;
+    }
+    tempRect.shrink(rlbWidth/2,rlbWidth/2);
+    graphics.setLineWidth(rlbWidth);
+    graphics.setLineStyle(lineStyle);
+    if (getColor() != null)
+      graphics.setForegroundColor(getColor());
+    graphics.drawRoundRectangle(tempRect, arcLength, arcLength);
+  }
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/adt/typeviz/design/figures/StructureFigure.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/adt/typeviz/design/figures/StructureFigure.java
new file mode 100644
index 0000000..8d3d14d
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/adt/typeviz/design/figures/StructureFigure.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.adt.typeviz.design.figures;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.LineBorder;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.EditPart;
+import org.eclipse.wst.xsd.adt.design.figures.IStructureFigure;
+import org.eclipse.wst.xsd.adt.facade.IStructure;
+
+
+public class StructureFigure extends BoxFigure implements IStructureFigure
+{
+  public void editPartAttached(EditPart owner)
+  {
+    // nothing to do here :-)
+  }
+
+  public void addSelectionFeedback()
+  {
+    LineBorder boxFigureLineBorder = (LineBorder)getBorder();
+    boxFigureLineBorder.setWidth(2);
+    // TODO (cs) need to fix this
+    //boxFigureLineBorder.setColor(getComplexType().isReadOnly() ? ColorConstants.darkGray : ColorConstants.darkBlue);  
+    getHeadingFigure().setSelected(true);
+    repaint();
+  }
+
+  public void removeSelectionFeedback()
+  {
+    LineBorder boxFigureLineBorder = (LineBorder)getBorder();
+    boxFigureLineBorder.setWidth(1);
+    getHeadingFigure().setSelected(false);
+    repaint();
+  }  
+  
+  public boolean hitTestHeader(Point location)
+  {
+    IFigure target = getHeadingFigure();
+    Rectangle b = target.getBounds().getCopy();
+    target.translateToAbsolute(b);  
+    return b.contains(location);
+  }
+  
+  public void refreshVisuals(Object model)
+  {
+    IStructure structure = (IStructure)model;
+    getNameLabel().setText(structure.getName());    
+  }
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/adt/typeviz/design/figures/TypeVizFigureFactory.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/adt/typeviz/design/figures/TypeVizFigureFactory.java
new file mode 100644
index 0000000..b0e977a
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/adt/typeviz/design/figures/TypeVizFigureFactory.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.adt.typeviz.design.figures;
+
+import org.eclipse.draw2d.LineBorder;
+import org.eclipse.draw2d.MarginBorder;
+import org.eclipse.draw2d.ToolbarLayout;
+import org.eclipse.wst.xsd.adt.design.figures.ICompartmentFigure;
+import org.eclipse.wst.xsd.adt.design.figures.IFieldFigure;
+import org.eclipse.wst.xsd.adt.design.figures.IStructureFigure;
+import org.eclipse.wst.xsd.adt.outline.ITreeElement;
+import org.eclipse.wst.xsd.editor.internal.design.figures.IExtendedFigureFactory;
+import org.eclipse.wst.xsd.editor.internal.design.figures.IModelGroupFigure;
+import org.eclipse.wst.xsd.editor.internal.design.figures.ModelGroupFigure;
+
+public class TypeVizFigureFactory implements IExtendedFigureFactory
+{  
+  public IStructureFigure createStructureFigure(Object model)
+  {
+    StructureFigure figure = new StructureFigure();
+    figure.setBorder(new LineBorder(1));    
+    ToolbarLayout toolbarLayout = new ToolbarLayout();
+    toolbarLayout.setStretchMinorAxis(true);
+    figure.setLayoutManager(toolbarLayout);
+
+    if (model instanceof ITreeElement)
+    {
+      figure.getNameLabel().setIcon(((ITreeElement)model).getImage());
+    }    
+    //figure.getHeadingFigure().setIsReadOnly(getComplexType().isReadOnly());
+    // we should organize ITreeElement and integrate it with the facade    
+    return figure;
+  }
+
+  public IFieldFigure createFieldFigure(Object model)
+  {
+    // TODO Auto-generated method stub
+    return new FieldFigure();
+  }
+  
+  public ICompartmentFigure createCompartmentFigure(Object model)
+  {
+    CompartmentFigure figure = new CompartmentFigure();
+    figure.setBorder(new MarginBorder(1));
+    ToolbarLayout toolbarLayout = new ToolbarLayout(false);
+    toolbarLayout.setStretchMinorAxis(true);
+    figure.setLayoutManager(toolbarLayout);
+    return figure;
+  }  
+  
+  public IModelGroupFigure createModelGroupFigure(Object model)
+  {
+    // TODO Auto-generated method stub
+    return new ModelGroupFigure();
+  }
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/adt/typeviz/design/layouts/ColumnData.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/adt/typeviz/design/layouts/ColumnData.java
new file mode 100644
index 0000000..5c82e84
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/adt/typeviz/design/layouts/ColumnData.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.adt.typeviz.design.layouts;
+
+import java.util.HashMap;
+import java.util.Iterator;
+
+public class ColumnData
+{
+  HashMap map = new HashMap();
+  
+  class Entry
+  {
+    int width = 0;
+    int weight = 1;
+  }
+  
+  public void clearColumnWidths()
+  {
+    for (Iterator i = map.values().iterator(); i.hasNext();)
+    {
+      Entry entry = (Entry)i.next();
+      entry.width = 0;
+    }  
+  }  
+  
+  private Entry lookupOrCreateColumnEntry(String identifier)
+  {
+    Entry entry = (Entry)map.get(identifier);
+    if (entry == null)
+    {
+      entry = new Entry();
+      map.put(identifier, entry);
+    }  
+   return entry; 
+  }  
+  
+  void stretchColumnWidthIfNeeded(String identifier, int width)
+  {
+    Entry entry = lookupOrCreateColumnEntry(identifier);
+    entry.width = Math.max(entry.width, width);
+  }
+  
+  int getColumnWidth(String identifier)
+  {
+    Entry entry = (Entry)map.get(identifier);
+    if (entry != null)
+    {
+      return entry.width;
+    }  
+    else
+    {
+      return 0;//hmm should we return -1 ?
+    }  
+  }
+  
+  int getColumnWeight(String identifier)
+  {
+    Entry entry = (Entry)map.get(identifier);
+    if (entry != null)
+    {
+      return entry.weight;
+    }  
+    else
+    {
+      return 0;
+    }  
+  }
+  
+  public void setColumnWeight(String identifier, int weight)
+  {
+    Entry entry = lookupOrCreateColumnEntry(identifier);
+    entry.weight = weight;
+  }
+}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/adt/typeviz/design/layouts/RowLayout.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/adt/typeviz/design/layouts/RowLayout.java
new file mode 100644
index 0000000..21fc9bf
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/adt/typeviz/design/layouts/RowLayout.java
@@ -0,0 +1,183 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.adt.typeviz.design.layouts;
+
+import java.util.HashMap;
+import java.util.List;
+import org.eclipse.draw2d.AbstractLayout;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Rectangle;
+
+public class RowLayout extends AbstractLayout
+{
+  // layout is associated with a parent context
+  // any layout manager under the parent context is connected
+  // column rows are maintained accross container boundaries  
+  protected ColumnData columnData;
+  protected HashMap figureToContstraintMap = new HashMap();
+  
+  public RowLayout()
+  {
+    super();
+  }
+  
+
+  // this method computes the minimum size required to display the figures
+  //
+  private Dimension calculateChildrenSize(IFigure container, List children, int wHint, int hHint, boolean preferred)
+  {
+    Dimension childSize;
+    IFigure child;
+    int height = 0;
+    int width = 0;
+    
+    //IRowFigure figure = (IRowFigure)container;
+    
+    // for each cell in the row
+    //
+    for (int i = 0; i < children.size(); i++)
+    {
+      child = (IFigure) children.get(i);
+      String columnIdenifier = (String)getConstraint(child);
+             
+      // first we compute the child size without regard for columnData
+      //
+      childSize = child.getPreferredSize(wHint, hHint);// : child.getMinimumSize(wHint, hHint);
+        
+      // now that the columnData has been populated we can consider if the row needs to be larger
+      //
+      int effectiveWidth = childSize.width;
+      if (columnIdenifier != null)
+      {  
+        columnData.stretchColumnWidthIfNeeded(columnIdenifier, childSize.width);
+        effectiveWidth = columnData.getColumnWidth(columnIdenifier);
+      }                       
+      height = Math.max(childSize.height, height);
+      width += effectiveWidth;
+    }  
+    return new Dimension(width, height);
+  }
+  
+  
+  
+  protected Dimension calculatePreferredSize(IFigure container, int wHint, int hHint)
+  {    
+    List children = container.getChildren();
+    Dimension prefSize = calculateChildrenSize(container, children, wHint, hHint, true);
+    //System.out.println("preferredSize=" + prefSize);
+    return prefSize;
+  }
+
+  public void layout(IFigure parent)
+  {
+    // layout a table with the columns aligned      
+    //IRowFigure rowFigure = (IRowFigure)parent;    
+    Rectangle clientArea = parent.getClientArea();   
+    List children = parent.getChildren();
+    Rectangle r = new Rectangle();
+    r.x = clientArea.x;
+    r.y = clientArea.y;
+    r.height = clientArea.height;
+    
+    int childrenSize = children.size();
+    Rectangle[] bounds = new Rectangle[childrenSize];
+    
+    // for each cell in the row
+    //
+    int requiredWidth = 0;
+    int totalColumnWeight = 0;
+    for (int i = 0; i < childrenSize; i++)
+    {
+      IFigure child = (IFigure) children.get(i);
+      //String columnIdenifier = figure.getColumnIdentifier(child);             
+      // first we compute the child size without regard for columnData
+      //
+      Dimension childSize = child.getPreferredSize(-1, -1);
+      
+      int columnWidth = -1;
+      //String columnIdentifier = rowFigure.getColumnIdentifier(child);
+      String columnIdentifier = (String)getConstraint(child);
+      if (columnIdentifier != null)
+      {
+        //columnData.stretchColumnWidthIfNeeded(columnIdentifier, childSize.width);        
+        columnWidth = columnData.getColumnWidth(columnIdentifier);
+        totalColumnWeight += columnData.getColumnWeight(columnIdentifier);
+        //System.out.println("columnWidth(" + columnIdentifier + ")=" + columnWidth);        
+      }  
+      r.width = Math.max(childSize.width, columnWidth);
+      requiredWidth += r.width;
+      bounds[i] = new Rectangle(r);      
+      r.x += r.width;
+    }          
+    if (totalColumnWeight < 1)
+    {
+      totalColumnWeight = 1;
+    }
+    //System.out.println("clientArea.width=" + clientArea.width + ", " + r.x);
+    int extraWidth = Math.max(clientArea.width - requiredWidth, 0);    
+    //System.out.println("extraWidth=" + extraWidth + " totalColumnWeight=" + totalColumnWeight);  
+    int extraWidthAllocated = 0;
+    for (int i = 0; i < childrenSize; i++)
+    {
+      IFigure child = (IFigure) children.get(i);      
+      Rectangle b = bounds[i];    
+      if (extraWidth > 0)
+      {  
+        String columnIdentifier = (String)getConstraint(child);
+        if (columnIdentifier != null)
+        {        
+          int weight = columnData.getColumnWeight(columnIdentifier);
+          float fraction = (float)weight / (float)totalColumnWeight;
+          int extraWidthForChild = (int)(extraWidth * fraction);
+          //System.out.println("extraWidthForChild(" + fraction + ")=" + extraWidthForChild);        
+          b.width += extraWidthForChild;        
+          b.x += extraWidthAllocated;
+          extraWidthAllocated += extraWidthForChild;
+        }  
+        else
+        {
+          b.x += extraWidthAllocated;
+        }
+      }
+      child.setBounds(new Rectangle(b));  
+    }  
+  }
+
+  public ColumnData getColumnData()
+  {
+    return columnData;
+  }
+
+  public void setColumnData(ColumnData columnData)
+  {
+    this.columnData = columnData;
+  }    
+  
+  public Object getConstraint(IFigure child)
+  {
+    return figureToContstraintMap.get(child);
+  }
+  
+  public void setConstraint(IFigure child, Object constraint)
+  {
+    figureToContstraintMap.put(child, constraint);
+  }
+  
+  public void invalidate()
+  {
+    //figureToContstraintMap.clear();
+    //this.columnData.clearColumnWidths();
+    super.invalidate();
+    //System.out.println("invalidate");    
+  }
+}
+
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/ISelectionMapper.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/ISelectionMapper.java
new file mode 100644
index 0000000..516cf7f
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/ISelectionMapper.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor;
+
+import org.eclipse.jface.viewers.ISelection;
+
+public interface ISelectionMapper
+{
+  ISelection mapSelection(ISelection selectedObject);
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/InternalXSDMultiPageEditor.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/InternalXSDMultiPageEditor.java
new file mode 100644
index 0000000..b00f1d3
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/InternalXSDMultiPageEditor.java
@@ -0,0 +1,895 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPartFactory;
+import org.eclipse.gef.RootEditPart;
+import org.eclipse.gef.ui.actions.ActionRegistry;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.IPostSelectionProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.INavigationLocation;
+import org.eclipse.ui.INavigationLocationProvider;
+import org.eclipse.ui.IPropertyListener;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
+import org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor;
+import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
+import org.eclipse.wst.sse.core.internal.provisional.StructuredModelManager;
+import org.eclipse.wst.sse.ui.StructuredTextEditor;
+import org.eclipse.wst.sse.ui.internal.contentoutline.ConfigurableContentOutlinePage;
+import org.eclipse.wst.xml.core.internal.document.NodeImpl;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
+import org.eclipse.wst.xsd.adt.actions.AddFieldAction;
+import org.eclipse.wst.xsd.adt.actions.BaseSelectionAction;
+import org.eclipse.wst.xsd.adt.actions.DeleteAction;
+import org.eclipse.wst.xsd.adt.actions.SetInputToGraphView;
+import org.eclipse.wst.xsd.adt.actions.ShowPropertiesViewAction;
+import org.eclipse.wst.xsd.adt.design.editparts.RootContentEditPart;
+import org.eclipse.wst.xsd.adt.editor.ADTMultiPageEditor;
+import org.eclipse.wst.xsd.adt.facade.IModel;
+import org.eclipse.wst.xsd.editor.internal.adapters.CategoryAdapter;
+import org.eclipse.wst.xsd.editor.internal.adapters.XSDAdapterFactory;
+import org.eclipse.wst.xsd.editor.internal.adapters.XSDBaseAdapter;
+import org.eclipse.wst.xsd.editor.internal.design.editparts.XSDEditPartFactory;
+import org.eclipse.wst.xsd.editor.internal.navigation.DesignViewNavigationLocation;
+import org.eclipse.wst.xsd.editor.internal.navigation.MultiPageEditorTextSelectionNavigationLocation;
+import org.eclipse.wst.xsd.editor.internal.utils.OpenOnSelectionHelper;
+import org.eclipse.wst.xsd.ui.common.actions.AddXSDAttributeDeclarationAction;
+import org.eclipse.wst.xsd.ui.common.actions.AddXSDAttributeGroupDefinitionAction;
+import org.eclipse.wst.xsd.ui.common.actions.AddXSDComplexTypeDefinitionAction;
+import org.eclipse.wst.xsd.ui.common.actions.AddXSDElementAction;
+import org.eclipse.wst.xsd.ui.common.actions.AddXSDModelGroupAction;
+import org.eclipse.wst.xsd.ui.common.actions.AddXSDModelGroupDefinitionAction;
+import org.eclipse.wst.xsd.ui.common.actions.AddXSDSimpleTypeDefinitionAction;
+import org.eclipse.wst.xsd.ui.common.actions.DeleteXSDConcreteComponentAction;
+import org.eclipse.wst.xsd.ui.common.actions.OpenInNewEditor;
+import org.eclipse.wst.xsd.ui.common.actions.SetMultiplicityAction;
+import org.eclipse.wst.xsd.ui.common.actions.SetTypeAction;
+import org.eclipse.wst.xsd.ui.internal.text.XSDModelReconcileAdapter;
+import org.eclipse.xsd.XSDComponent;
+import org.eclipse.xsd.XSDCompositor;
+import org.eclipse.xsd.XSDConcreteComponent;
+import org.eclipse.xsd.XSDNamedComponent;
+import org.eclipse.xsd.XSDPackage;
+import org.eclipse.xsd.XSDSchema;
+import org.eclipse.xsd.impl.XSDSchemaImpl;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+public class InternalXSDMultiPageEditor extends ADTMultiPageEditor implements ITabbedPropertySheetPageContributor, IPropertyListener, INavigationLocationProvider
+{
+  ResourceSet resourceSet;
+  Resource xsdResource;
+  // IModel model;
+  IStructuredModel structuredModel;
+  XSDSchema xsdSchema;
+  private OutlineTreeSelectionChangeListener fOutlineListener;
+  private SourceEditorSelectionListener fSourceEditorSelectionListener;
+  private XSDSelectionManagerSelectionListener fXSDSelectionListener;
+  private StructuredTextEditor structuredTextEditor;
+
+  public IModel buildModel(IFileEditorInput editorInput)
+  {
+    try
+    {
+      EPackage.Registry reg = EPackage.Registry.INSTANCE;
+      XSDPackage xsdPackage = (XSDPackage) reg.getEPackage(XSDPackage.eNS_URI);
+      xsdSchema = xsdPackage.getXSDFactory().createXSDSchema();
+      resourceSet = XSDSchemaImpl.createResourceSet();
+      IFile resourceFile = editorInput.getFile();
+      structuredModel = StructuredModelManager.getModelManager().getModelForEdit(resourceFile);
+      // If the resource is in the workspace....
+      // otherwise the user is trying to open an external file
+      if (resourceFile != null)
+      {
+        String pathName = resourceFile.getFullPath().toString();
+        xsdResource = resourceSet.getResource(URI.createPlatformResourceURI(pathName), true);
+        resourceSet.getResources().add(xsdResource);
+        Object obj = xsdResource.getContents().get(0);
+        if (obj instanceof XSDSchema)
+        {
+          xsdSchema = (XSDSchema) obj;
+          xsdSchema.setElement(((IDOMModel) structuredModel).getDocument().getDocumentElement());
+          model = (IModel) XSDAdapterFactory.getInstance().adapt(xsdSchema);
+        }
+        
+        // If the input schema is from the WSDL Editor, then use that inline schema
+        if (editorInput instanceof XSDFileEditorInput)
+        {
+          xsdSchema = ((XSDFileEditorInput) editorInput).getSchema();
+          model = (IModel) XSDAdapterFactory.getInstance().adapt(xsdSchema);
+        }
+        if (xsdSchema.getElement() != null)
+          
+          // TODO (cs) ... we need to look into performance issues when we add elements
+          // seems to be that formatting is causig lots of notification and things get terribly slow
+          // I'm specializing the method below to add an isModelStateChanging check that should
+          // help here ... but we need to investigate further
+          new XSDModelReconcileAdapter(xsdSchema.getElement().getOwnerDocument(), xsdSchema)
+          {
+            public void handleNotifyChange(INodeNotifier notifier, int eventType, Object feature, Object oldValue, Object newValue, int index)
+            {
+              if (notifier instanceof NodeImpl)
+              {
+                NodeImpl nodeImpl = (NodeImpl)notifier;
+                if (!nodeImpl.getModel().isModelStateChanging())
+                {  
+                  //System.out.println("handleNotifyChange " + eventType);
+                  super.handleNotifyChange(notifier, eventType, feature, oldValue, newValue, index);
+                }  
+              }
+            }
+          };
+        xsdResource.setModified(false);
+      }
+    }
+    catch (StackOverflowError e)
+    {
+    }
+    catch (Exception ex)
+    {
+    }
+    return model;
+  }
+
+  public void dispose()
+  {
+    structuredModel.releaseFromEdit();
+    if (fOutlinePage != null)
+    {
+      if (fOutlinePage instanceof ConfigurableContentOutlinePage && fOutlineListener != null)
+      {
+        ((ConfigurableContentOutlinePage) fOutlinePage).removeDoubleClickListener(fOutlineListener);
+      }
+      if (fOutlineListener != null)
+      {
+        fOutlinePage.removeSelectionChangedListener(fOutlineListener);
+      }
+    }
+    getSelectionManager().removeSelectionChangedListener(fXSDSelectionListener);
+    super.dispose();
+  }
+
+  protected void configureGraphicalViewer()
+  {
+    super.configureGraphicalViewer();
+    // get edit part factory from extension
+    EditPartFactory editPartFactory = XSDEditorPlugin.getDefault().getXSDEditorConfiguration().getEditPartFactory();
+    if (editPartFactory != null)
+    {
+      graphicalViewer.setEditPartFactory(editPartFactory);
+    }
+    else
+    {
+      // otherwise use default
+      graphicalViewer.setEditPartFactory(new XSDEditPartFactory());
+    }
+  }
+
+  public Object getAdapter(Class type)
+  {
+    if (type == org.eclipse.ui.views.properties.IPropertySheetPage.class)
+    {
+      XSDTabbedPropertySheetPage page = new XSDTabbedPropertySheetPage(this);
+      return page;
+    }
+    else if (type == ISelectionProvider.class)
+    {
+      return selectionManager;
+    }  
+    else if (type == XSDSchema.class)
+    {
+      return xsdSchema;
+    }
+    else if (type == IContentOutlinePage.class)
+    {
+      Object adapter = super.getAdapter(type);
+      if (adapter != null)
+      {
+        IContentOutlinePage page = (IContentOutlinePage) adapter;
+        fOutlineListener = new OutlineTreeSelectionChangeListener();
+        page.addSelectionChangedListener(fOutlineListener);
+        if (page instanceof ConfigurableContentOutlinePage)
+        {
+          ((ConfigurableContentOutlinePage) page).addDoubleClickListener(fOutlineListener);
+        }
+        return page;
+      }
+    }
+    else if (type == XSDElementReferenceEditManager.class)
+    {
+    	IEditorInput editorInput = getEditorInput();
+    	if (editorInput instanceof IFileEditorInput)
+    	{
+    		IFileEditorInput fileEditorInput = (IFileEditorInput) editorInput;
+    		// TODO (cs) currently we assume the schema editor will only ever edit a
+    		// single schema
+    		/// but if we want to enable the schema editor to edit wsdl files we
+    		// should pass in
+    		// an array of schemas
+    		// hmm.. perhaps just pass in a ResourceSet
+    		XSDSchema[] schemas = {xsdSchema};
+    		return new XSDElementReferenceEditManager(fileEditorInput.getFile(), schemas);
+    	}
+    }
+    else if (type == XSDTypeReferenceEditManager.class)
+    {
+      IEditorInput editorInput = getEditorInput();
+      if (editorInput instanceof IFileEditorInput)
+      {
+        IFileEditorInput fileEditorInput = (IFileEditorInput) editorInput;
+        // TODO (cs) currently we assume the schema editor will only ever edit a
+        // single schema
+        // but if we want to enable the schema editor to edit wsdl files we
+        // should pass in
+        // an array of schemas
+        // hmm.. perhaps just pass in a ResourceSet
+        XSDSchema[] schemas = {xsdSchema};
+        return new XSDTypeReferenceEditManager(fileEditorInput.getFile(), schemas);
+      }
+    }
+    else if (type == ITextEditor.class)
+    {
+      return getTextEditor();
+    }
+    else if (type == ISelectionMapper.class)
+    {
+      return new XSDSelectionMapper();
+    }  
+    return super.getAdapter(type);
+  }
+
+  public String getContributorId()
+  {
+    return "org.eclipse.wst.xsd.editor";
+  }
+
+  public XSDSchema getXSDSchema()
+  {
+    return xsdSchema;
+  }
+
+  public StructuredTextEditor getTextEditor()
+  {
+    return structuredTextEditor;
+  }
+
+  protected void createSourcePage()
+  {
+    try
+    {
+      structuredTextEditor = new StructuredTextEditor();
+      int index = addPage(structuredTextEditor, getEditorInput());
+      setPageText(index, "Source");
+      structuredTextEditor.update();
+      structuredTextEditor.setEditorPart(this);
+      structuredTextEditor.addPropertyListener(this);
+      firePropertyChange(PROP_TITLE);
+    }
+    catch (PartInitException e)
+    {
+      ErrorDialog.openError(getSite().getShell(), "Error creating nested text editor", null, e.getStatus());
+    }
+  }
+
+  /**
+   * Method openOnGlobalReference. The comp argument is a resolved xsd schema
+   * object from another file. This is created and called from another schema
+   * model to allow F3 navigation to open a new editor and choose the referenced
+   * object within that editor context
+   * 
+   * @param comp
+   */
+  public void openOnGlobalReference(XSDConcreteComponent comp)
+  {
+    XSDNamedComponent namedComponent = openOnSelectionHelper.openOnGlobalReference(comp);
+    
+    if (namedComponent != null)
+    {
+      XSDBaseAdapter adapter = (XSDBaseAdapter) XSDAdapterFactory.getInstance().adapt(namedComponent);
+      getSelectionManager().setSelection(new StructuredSelection(adapter));
+      IAction action = getActionRegistry().getAction(SetInputToGraphView.ID);
+      if (action != null)
+      {
+        action.run();
+      }
+    }
+  }
+  
+  protected OpenOnSelectionHelper openOnSelectionHelper;
+
+  public OpenOnSelectionHelper getOpenOnSelectionHelper()
+  {
+    return openOnSelectionHelper;
+  }
+
+  /**
+   * Creates the pages of the multi-page editor.
+   */
+  protected void createPages()
+  {
+    model = buildModel((IFileEditorInput) getEditorInput());
+    selectionProvider = getSelectionManager();
+    getEditorSite().setSelectionProvider(selectionProvider);
+    createGraphPage();
+    createSourcePage();
+    openOnSelectionHelper = new OpenOnSelectionHelper(getTextEditor(), getXSDSchema());
+    ISelectionProvider provider = getTextEditor().getSelectionProvider();
+    fSourceEditorSelectionListener = new SourceEditorSelectionListener();
+    if (provider instanceof IPostSelectionProvider)
+    {
+      ((IPostSelectionProvider) provider).addPostSelectionChangedListener(fSourceEditorSelectionListener);
+    }
+    else
+    {
+      provider.addSelectionChangedListener(fSourceEditorSelectionListener);
+    }
+    fXSDSelectionListener = new XSDSelectionManagerSelectionListener();
+    getSelectionManager().addSelectionChangedListener(fXSDSelectionListener);
+  }
+
+  protected void createActions()
+  {
+    super.createActions();
+    ActionRegistry registry = getActionRegistry();
+    BaseSelectionAction action = new AddFieldAction(this);
+    action.setSelectionProvider(getSelectionManager());
+    registry.registerAction(action);
+    action = new DeleteAction(this);
+    action.setSelectionProvider(getSelectionManager());
+    registry.registerAction(action);
+    action = new AddXSDElementAction(this, AddXSDElementAction.ID, "Add Element", false);
+    action.setSelectionProvider(getSelectionManager());
+    registry.registerAction(action);
+    action = new AddXSDElementAction(this, AddXSDElementAction.REF_ID, "Add Element Ref", true);
+    action.setSelectionProvider(getSelectionManager());
+    registry.registerAction(action);
+    action = new AddXSDModelGroupAction(this, XSDCompositor.SEQUENCE_LITERAL, AddXSDModelGroupAction.SEQUENCE_ID);
+    action.setSelectionProvider(getSelectionManager());
+    registry.registerAction(action);
+    action = new AddXSDModelGroupAction(this, XSDCompositor.CHOICE_LITERAL, AddXSDModelGroupAction.CHOICE_ID);
+    action.setSelectionProvider(getSelectionManager());
+    registry.registerAction(action);
+    action = new AddXSDModelGroupAction(this, XSDCompositor.ALL_LITERAL, AddXSDModelGroupAction.ALL_ID);
+    action.setSelectionProvider(getSelectionManager());
+    registry.registerAction(action);
+    action = new AddXSDModelGroupDefinitionAction(this, false);
+    action.setId(AddXSDModelGroupDefinitionAction.MODELGROUPDEFINITION_ID);
+    action.setSelectionProvider(getSelectionManager());
+    registry.registerAction(action);
+    action = new AddXSDModelGroupDefinitionAction(this, true);
+    action.setId(AddXSDModelGroupDefinitionAction.MODELGROUPDEFINITIONREF_ID);
+    action.setSelectionProvider(getSelectionManager());
+    registry.registerAction(action);
+    action = new AddXSDComplexTypeDefinitionAction(this);
+    action.setSelectionProvider(getSelectionManager());
+    registry.registerAction(action);
+    action = new AddXSDSimpleTypeDefinitionAction(this);
+    action.setSelectionProvider(getSelectionManager());
+    registry.registerAction(action);
+    action = new AddXSDAttributeDeclarationAction(this);
+    action.setSelectionProvider(getSelectionManager());
+    registry.registerAction(action);
+    action = new OpenInNewEditor(this);
+    action.setSelectionProvider(getSelectionManager());
+    registry.registerAction(action);
+    action = new ShowPropertiesViewAction(this);
+    registry.registerAction(action);
+    action = new AddXSDAttributeGroupDefinitionAction(this);
+    action.setSelectionProvider(getSelectionManager());
+    registry.registerAction(action);
+    action = new DeleteXSDConcreteComponentAction(this);
+    action.setSelectionProvider(getSelectionManager());
+    registry.registerAction(action);
+    
+    SetTypeAction setNewComplexTypeAction = new SetTypeAction("New...", SetTypeAction.SET_NEW_TYPE_ID, this);
+    setNewComplexTypeAction.setSelectionProvider(getSelectionManager());
+    registry.registerAction(setNewComplexTypeAction);
+        
+    SetTypeAction setExistingTypeAction = new SetTypeAction("Browse...", SetTypeAction.SELECT_EXISTING_TYPE_ID, this);
+    setExistingTypeAction.setSelectionProvider(getSelectionManager());
+    registry.registerAction(setExistingTypeAction);
+
+    addMultiplicityMenu(registry);
+  }
+  
+  protected void addMultiplicityMenu(ActionRegistry registry)
+  {
+    SetMultiplicityAction oneMultiplicity = new SetMultiplicityAction(this, "1..1 (" + "Required" + ")", SetMultiplicityAction.REQUIRED_ID);
+    oneMultiplicity.setMaxOccurs(1);
+    oneMultiplicity.setMinOccurs(1);
+    oneMultiplicity.setSelectionProvider(getSelectionManager());
+    registry.registerAction(oneMultiplicity);
+
+    SetMultiplicityAction zeroOrMoreMultiplicity = new SetMultiplicityAction(this, "0..* (" + "Zero or more" + ")", SetMultiplicityAction.ZERO_OR_MORE_ID);
+    zeroOrMoreMultiplicity.setMaxOccurs(-1);
+    zeroOrMoreMultiplicity.setMinOccurs(0);
+    zeroOrMoreMultiplicity.setSelectionProvider(getSelectionManager());
+    registry.registerAction(zeroOrMoreMultiplicity);
+    
+    SetMultiplicityAction zeroOrOneMultiplicity = new SetMultiplicityAction(this, "0..1 (" + "Optional" + ")", SetMultiplicityAction.ZERO_OR_ONE_ID);
+    zeroOrOneMultiplicity.setMaxOccurs(1);
+    zeroOrOneMultiplicity.setMinOccurs(0);
+    zeroOrOneMultiplicity.setSelectionProvider(getSelectionManager());
+    registry.registerAction(zeroOrOneMultiplicity);
+
+    SetMultiplicityAction oneOrMoreMultiplicity = new SetMultiplicityAction(this, "1..* (" + "One or more" + ")", SetMultiplicityAction.ONE_OR_MORE_ID);
+    oneOrMoreMultiplicity.setMaxOccurs(-1);
+    oneOrMoreMultiplicity.setMinOccurs(1);
+    oneOrMoreMultiplicity.setSelectionProvider(getSelectionManager());
+    registry.registerAction(oneOrMoreMultiplicity);
+    
+  }
+
+
+  /**
+   * Closes all project files on project close.
+   */
+  public void resourceChanged(final IResourceChangeEvent event)
+  {
+    if (event.getType() == IResourceChangeEvent.PRE_CLOSE)
+    {
+      Display.getDefault().asyncExec(new Runnable()
+      {
+        public void run()
+        {
+          IWorkbenchPage[] pages = getSite().getWorkbenchWindow().getPages();
+          for (int i = 0; i < pages.length; i++)
+          {
+            if (((FileEditorInput) structuredTextEditor.getEditorInput()).getFile().getProject().equals(event.getResource()))
+            {
+              IEditorPart editorPart = pages[i].findEditor(structuredTextEditor.getEditorInput());
+              pages[i].closeEditor(editorPart, true);
+            }
+          }
+        }
+      });
+    }
+  }
+
+  /**
+   * Returns <code>true</code> if the command stack is dirty
+   * 
+   * @see org.eclipse.ui.ISaveablePart#isDirty()
+   */
+  public boolean isDirty()
+  {
+    super.isDirty();
+    return structuredTextEditor.isDirty() || getCommandStack().isDirty();
+  }
+
+  /*
+   * This method is just to make firePropertyChanged accessbible from some
+   * (anonomous) inner classes.
+   */
+  protected void _firePropertyChange(int property)
+  {
+    super.firePropertyChange(property);
+  }
+
+  /**
+   * Posts the update code "behind" the running operation.
+   */
+  protected void postOnDisplayQue(Runnable runnable)
+  {
+    IWorkbench workbench = PlatformUI.getWorkbench();
+    IWorkbenchWindow[] windows = workbench.getWorkbenchWindows();
+    if (windows != null && windows.length > 0)
+    {
+      Display display = windows[0].getShell().getDisplay();
+      display.asyncExec(runnable);
+    }
+    else
+      runnable.run();
+  }
+
+  /**
+   * Indicates that a property has changed.
+   * 
+   * @param source
+   *          the object whose property has changed
+   * @param propId
+   *          the id of the property which has changed; property ids are
+   *          generally defined as constants on the source class
+   */
+  public void propertyChanged(Object source, int propId)
+  {
+    switch (propId)
+    {
+      // had to implement input changed "listener" so that
+      // strucutedText could tell it containing editor that
+      // the input has change, when a 'resource moved' event is
+      // found.
+      case IEditorPart.PROP_INPUT :
+      case IEditorPart.PROP_DIRTY : {
+        if (source == structuredTextEditor)
+        {
+          if (structuredTextEditor.getEditorInput() != getEditorInput())
+          {
+            setInput(structuredTextEditor.getEditorInput());
+            // title should always change when input changes.
+            // create runnable for following post call
+            Runnable runnable = new Runnable()
+            {
+              public void run()
+              {
+                _firePropertyChange(IWorkbenchPart.PROP_TITLE);
+              }
+            };
+            // Update is just to post things on the display queue
+            // (thread). We have to do this to get the dirty
+            // property to get updated after other things on the
+            // queue are executed.
+            postOnDisplayQue(runnable);
+          }
+        }
+        break;
+      }
+      case IWorkbenchPart.PROP_TITLE : {
+        // update the input if the title is changed
+        if (source == structuredTextEditor)
+        {
+          if (structuredTextEditor.getEditorInput() != getEditorInput())
+          {
+            setInput(structuredTextEditor.getEditorInput());
+          }
+        }
+        break;
+      }
+      default : {
+        // propagate changes. Is this needed? Answer: Yes.
+        if (source == structuredTextEditor)
+        {
+          firePropertyChange(propId);
+        }
+        break;
+      }
+    }
+  }
+  /**
+   * Listener on SSE's outline page's selections that converts DOM selections
+   * into xsd selections and notifies XSD selection manager
+   */
+  class OutlineTreeSelectionChangeListener implements ISelectionChangedListener, IDoubleClickListener
+  {
+    public OutlineTreeSelectionChangeListener()
+    {
+    }
+
+    private ISelection getXSDSelection(ISelection selection)
+    {
+      ISelection sel = null;
+      if (selection instanceof IStructuredSelection)
+      {
+        IStructuredSelection structuredSelection = (IStructuredSelection) selection;
+        Object o = structuredSelection.getFirstElement();
+        if (o != null)
+          sel = new StructuredSelection(o);
+      }
+      return sel;
+    }
+
+    /**
+     * Determines DOM node based on object (xsd node)
+     * 
+     * @param object
+     * @return
+     */
+    private Object getObjectForOtherModel(Object object)
+    {
+      Node node = null;
+      if (object instanceof Node)
+      {
+        node = (Node) object;
+      }
+      else if (object instanceof XSDComponent)
+      {
+        node = ((XSDComponent) object).getElement();
+      }
+      else if (object instanceof CategoryAdapter)
+      {
+        node = ((CategoryAdapter) object).getXSDSchema().getElement();
+      }
+      else if (object instanceof XSDBaseAdapter)
+      {
+        if (((XSDBaseAdapter) object).getTarget() instanceof XSDConcreteComponent)
+        {
+          node = ((XSDConcreteComponent) ((XSDBaseAdapter) object).getTarget()).getElement();
+        }
+      }
+      // the text editor can only accept sed nodes!
+      //
+      if (!(node instanceof IDOMNode))
+      {
+        node = null;
+      }
+      return node;
+    }
+
+    public void doubleClick(DoubleClickEvent event)
+    {
+      /*
+       * Selection in outline tree changed so set outline tree's selection into
+       * editor's selection and say it came from outline tree
+       */
+      if (getSelectionManager() != null && getSelectionManager().getEnableNotify())
+      {
+        ISelection selection = getXSDSelection(event.getSelection());
+        if (selection != null)
+        {
+          getSelectionManager().setSelection(selection, fOutlinePage);
+        }
+        if (getTextEditor() != null && selection instanceof IStructuredSelection)
+        {
+          int start = -1;
+          int length = 0;
+          Object o = ((IStructuredSelection) selection).getFirstElement();
+          if (o != null)
+            o = getObjectForOtherModel(o);
+          if (o instanceof IndexedRegion)
+          {
+            start = ((IndexedRegion) o).getStartOffset();
+            length = ((IndexedRegion) o).getEndOffset() - start;
+          }
+          if (start > -1)
+          {
+            getTextEditor().selectAndReveal(start, length);
+          }
+        }
+      }
+    }
+
+    public void selectionChanged(SelectionChangedEvent event)
+    {
+      /*
+       * Selection in outline tree changed so set outline tree's selection into
+       * editor's selection and say it came from outline tree
+       */
+      if (getSelectionManager() != null && getSelectionManager().getEnableNotify())
+      {
+        ISelection selection = getXSDSelection(event.getSelection());
+        if (selection != null)
+        {
+          getSelectionManager().setSelection(selection, fOutlinePage);
+        }
+      }
+    }
+  }
+  /**
+   * Listener on SSE's source editor's selections that converts DOM selections
+   * into xsd selections and notifies XSD selection manager
+   */
+  private class SourceEditorSelectionListener implements ISelectionChangedListener
+  {
+    /**
+     * Determines XSD node based on object (DOM node)
+     * 
+     * @param object
+     * @return
+     */
+    private Object getXSDNode(Object object)
+    {
+      // get the element node
+      Element element = null;
+      if (object instanceof Node)
+      {
+        Node node = (Node) object;
+        if (node != null)
+        {
+          if (node.getNodeType() == Node.ELEMENT_NODE)
+          {
+            element = (Element) node;
+          }
+          else if (node.getNodeType() == Node.ATTRIBUTE_NODE)
+          {
+            element = ((Attr) node).getOwnerElement();
+          }
+        }
+      }
+      Object o = element;
+      if (element != null)
+      {
+        Object modelObject = getXSDSchema().getCorrespondingComponent(element);
+        if (modelObject != null)
+        {
+          o = modelObject;
+          o = XSDAdapterFactory.getInstance().adapt((Notifier) modelObject);
+        }
+      }
+      return o;
+    }
+
+    public void selectionChanged(SelectionChangedEvent event)
+    {
+      if (getSelectionManager().getEnableNotify() && getActivePage() == 1)
+      {
+        ISelection selection = event.getSelection();
+        if (selection instanceof IStructuredSelection)
+        {
+          List xsdSelections = new ArrayList();
+          for (Iterator i = ((IStructuredSelection) selection).iterator(); i.hasNext();)
+          {
+            Object domNode = i.next();
+            Object xsdNode = getXSDNode(domNode);
+            if (xsdNode != null)
+            {
+              xsdSelections.add(xsdNode);
+            }
+          }
+          if (!xsdSelections.isEmpty())
+          {
+            StructuredSelection xsdSelection = new StructuredSelection(xsdSelections);
+            getSelectionManager().setSelection(xsdSelection, getTextEditor().getSelectionProvider());
+          }
+        }
+      }
+    }
+  }
+  /**
+   * Listener on XSD's selection manager's selections that converts XSD
+   * selections into DOM selections and notifies SSE's selection provider
+   */
+  private class XSDSelectionManagerSelectionListener implements ISelectionChangedListener
+  {
+    /**
+     * Determines DOM node based on object (xsd node)
+     * 
+     * @param object
+     * @return
+     */
+    private Object getObjectForOtherModel(Object object)
+    {
+      Node node = null;
+      if (object instanceof Node)
+      {
+        node = (Node) object;
+      }
+      else if (object instanceof XSDComponent)
+      {
+        node = ((XSDComponent) object).getElement();
+      }
+      else if (object instanceof CategoryAdapter)
+      {
+        node = ((CategoryAdapter) object).getXSDSchema().getElement();
+      }
+      else if (object instanceof XSDBaseAdapter)
+      {
+        if (((XSDBaseAdapter) object).getTarget() instanceof XSDConcreteComponent)
+        {
+          node = ((XSDConcreteComponent) ((XSDBaseAdapter) object).getTarget()).getElement();
+        }
+      }
+      // the text editor can only accept sed nodes!
+      //
+      if (!(node instanceof IDOMNode))
+      {
+        node = null;
+      }
+      return node;
+    }
+
+    public void selectionChanged(SelectionChangedEvent event)
+    {
+      // do not fire selection in source editor if selection event came
+      // from source editor
+      if (event.getSource() != getTextEditor().getSelectionProvider())
+      {
+        ISelection selection = event.getSelection();
+        if (selection instanceof IStructuredSelection)
+        {
+          List otherModelObjectList = new ArrayList();
+          for (Iterator i = ((IStructuredSelection) selection).iterator(); i.hasNext();)
+          {
+            Object modelObject = i.next();
+            Object otherModelObject = getObjectForOtherModel(modelObject);
+            if (otherModelObject != null)
+            {
+              otherModelObjectList.add(otherModelObject);
+            }
+          }
+          if (!otherModelObjectList.isEmpty())
+          {
+            // here's an ugly hack... if we allow text selections to fire during
+            // SetInputToGraphView action we screw up the navigation history!
+            //            
+            //TODO (cs) ... we need to prevent the source editor from messing up the navigation history
+            //
+            if (getActivePage() == 1)
+            {  
+              StructuredSelection nodeSelection = new StructuredSelection(otherModelObjectList);
+              getTextEditor().getSelectionProvider().setSelection(nodeSelection);
+            }  
+          }
+        }
+      }
+    }
+  }
+
+  public INavigationLocation createEmptyNavigationLocation()
+  {
+    if (getActivePage() == 0)
+    {
+      return new DesignViewNavigationLocation(this);
+    }
+    else
+    {
+      return new MultiPageEditorTextSelectionNavigationLocation(getTextEditor(), false);
+    }
+  }
+
+  public INavigationLocation createNavigationLocation()
+  {
+    if (getActivePage() == 0)
+    {
+      try
+      {
+        RootEditPart rootEditPart = graphicalViewer.getRootEditPart();
+        EditPart editPart = rootEditPart.getContents();
+        if (editPart instanceof RootContentEditPart)
+        {
+          RootContentEditPart rootContentEditPart = (RootContentEditPart)editPart;
+          Object input = rootContentEditPart.getInput();      
+          if (input instanceof Adapter)
+          {
+            XSDConcreteComponent concreteComponent = (XSDConcreteComponent)((Adapter)input).getTarget();
+            return new DesignViewNavigationLocation(this, concreteComponent);
+          }
+        }   
+      }
+      catch (Exception e)
+      {
+        e.printStackTrace();
+      }
+      return null;
+    }
+    else
+    {
+      return new MultiPageEditorTextSelectionNavigationLocation(getTextEditor(), true);
+    }
+  }
+}  
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/Messages.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/Messages.java
new file mode 100644
index 0000000..0c335f7
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/Messages.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS
+{
+  static 
+  {
+    NLS.initializeMessages("org.eclipse.wst.xsd.editor" + ".Messages", Messages.class);
+  }
+
+  public Messages()
+  {
+    super();
+  }
+  
+  public static String UI_LABEL_BASE_TYPE;
+  public static String UI_LABEL_DERIVED_BY;
+  public static String UI_LABEL_INHERIT_FROM;
+  public static String UI_LABEL_INHERIT_BY;
+  public static String UI_LABEL_DOCUMENTATION;
+  public static String UI_LABEL_APP_INFO;
+  public static String UI_LABEL_SET_TYPE;
+  public static String UI_LABEL_TYPE;
+  public static String UI_LABEL_MINOCCURS;
+  public static String UI_LABEL_MAXOCCURS;
+  public static String UI_NO_TYPE;
+  public static String UI_PAGE_HEADING_REFERENCE;
+  public static String UI_LABEL_READ_ONLY;
+  public static String UI_LABEL_COMPONENTS;
+
+
+}
+
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/Messages.properties b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/Messages.properties
new file mode 100644
index 0000000..82f42e0
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/Messages.properties
@@ -0,0 +1,32 @@
+###############################################################################
+# Copyright (c) 2001, 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
+###############################################################################
+
+UI_LABEL_BASE_TYPE = Base Type:
+UI_LABEL_DERIVED_BY = Derived By:
+
+UI_LABEL_INHERIT_FROM = Inherit From:
+UI_LABEL_INHERIT_BY = Inherit By:
+
+UI_LABEL_DOCUMENTATION = Documentation
+UI_LABEL_APP_INFO = App Info
+
+UI_LABEL_SET_TYPE = Set Type
+UI_LABEL_TYPE = Type:
+
+UI_LABEL_MINOCCURS = Minimum Occurrence:
+UI_LABEL_MAXOCCURS = Maximum Occurrence:
+
+UI_PAGE_HEADING_REFERENCE = Reference
+UI_LABEL_READ_ONLY = Read-Only
+
+UI_NO_TYPE = No Type
+
+UI_LABEL_COMPONENTS				= Components:
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/XSDEditorConfiguration.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/XSDEditorConfiguration.java
new file mode 100644
index 0000000..1ba155b
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/XSDEditorConfiguration.java
@@ -0,0 +1,187 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.gef.EditPartFactory;
+import org.eclipse.wst.xsd.editor.internal.actions.IXSDToolbarAction;
+import org.eclipse.wst.xsd.editor.internal.adapters.XSDAdapterFactory;
+import org.eclipse.wst.xsd.editor.internal.design.figures.IExtendedFigureFactory;
+
+public class XSDEditorConfiguration
+{
+  public static final String XSDEDITORCONFIGURATIONEXTENSIONID = "org.eclipse.wst.xsd.ui.XSDEditorExtensionConfiguration";
+  public static final String CLASSNAME = "class";
+  public static final String ADAPTERFACTORY = "adapterFactory";
+  public static final String TOOLBARACTION = "toolbarAction";
+  public static final String FIGUREFACTORY = "figureFactory";
+  public static final String EDITPARTFACTORY = "editPartFactory";
+
+  List definedExtensionsList = null;
+
+  public XSDEditorConfiguration()
+  {
+
+  }
+
+  public XSDAdapterFactory getAdapterFactory()
+  {
+    if (definedExtensionsList == null)
+    {
+      readXSDConfigurationRegistry();
+    }
+    if (!definedExtensionsList.isEmpty())
+    {
+      return ((XSDEditorExtensionProperties) definedExtensionsList.get(0)).getAdapterFactory();
+    }
+    return null;
+  }
+
+  public EditPartFactory getEditPartFactory()
+  {
+    if (definedExtensionsList == null)
+    {
+      readXSDConfigurationRegistry();
+    }
+    if (!definedExtensionsList.isEmpty())
+    {
+      return ((XSDEditorExtensionProperties) definedExtensionsList.get(0)).getEditPartFactory();
+    }
+    return null;
+  }
+
+  public IExtendedFigureFactory getFigureFactory()
+  {
+    if (definedExtensionsList == null)
+    {
+      readXSDConfigurationRegistry();
+    }
+    if (!definedExtensionsList.isEmpty())
+    {
+      return ((XSDEditorExtensionProperties) definedExtensionsList.get(0)).getFigureFactory();
+    }
+    return null;
+  }
+
+  public List getToolbarActions()
+  {
+    if (definedExtensionsList == null)
+    {
+      readXSDConfigurationRegistry();
+    }
+    if (!definedExtensionsList.isEmpty())
+    {
+      return ((XSDEditorExtensionProperties) definedExtensionsList.get(0)).getActionList();
+    }
+    return Collections.EMPTY_LIST;
+  }
+
+  protected Object loadClass(IConfigurationElement element, String classString)
+  {
+    String pluginId = element.getDeclaringExtension().getContributor().getName();
+
+    try
+    {
+      Class theClass = Platform.getBundle(pluginId).loadClass(classString);
+      Object instance = theClass.newInstance();
+
+      return instance;
+    }
+    catch (Exception e)
+    {
+
+    }
+    return null;
+  }
+
+  public void readXSDConfigurationRegistry()
+  {
+    IConfigurationElement[] xsdEditorExtensionList = Platform.getExtensionRegistry().getConfigurationElementsFor(XSDEDITORCONFIGURATIONEXTENSIONID);
+
+    boolean definedExtensionsExist = (xsdEditorExtensionList != null && xsdEditorExtensionList.length > 0);
+
+    definedExtensionsList = new ArrayList();
+
+    if (definedExtensionsExist)
+    {
+      for (int i = 0; i < xsdEditorExtensionList.length; i++)
+      {
+        XSDEditorExtensionProperties properties = new XSDEditorExtensionProperties();
+        definedExtensionsList.add(properties);
+
+        IConfigurationElement element = xsdEditorExtensionList[i];
+        String adapterFactoryClass = element.getAttribute(ADAPTERFACTORY);
+        if (adapterFactoryClass != null)
+        {
+          Object object = loadClass(element, adapterFactoryClass);
+          XSDAdapterFactory adapterFactory = null;
+          if (object instanceof XSDAdapterFactory)
+          {
+            adapterFactory = (XSDAdapterFactory) object;
+            properties.setAdapterFactory(adapterFactory);
+          }
+        }
+
+        String figureFactoryClass = element.getAttribute(FIGUREFACTORY);
+        if (figureFactoryClass != null)
+        {
+          Object object = loadClass(element, figureFactoryClass);
+          IExtendedFigureFactory figureFactory = null;
+          if (object instanceof IExtendedFigureFactory)
+          {
+            figureFactory = (IExtendedFigureFactory) object;
+            properties.setFigureFactoryList(figureFactory);
+          }
+        }
+
+        IConfigurationElement[] toolbarActions = element.getChildren(TOOLBARACTION);
+        List actionList = new ArrayList();
+        if (toolbarActions != null)
+        {
+          for (int j = 0; j < toolbarActions.length; j++)
+          {
+            IConfigurationElement actionElement = toolbarActions[j];
+            String actionClass = actionElement.getAttribute(CLASSNAME);
+            IXSDToolbarAction action = null;
+            if (actionClass != null)
+            {
+              Object object = loadClass(actionElement, actionClass);
+              if (object instanceof IXSDToolbarAction)
+              {
+                action = (IXSDToolbarAction) object;
+                actionList.add(action);
+              }
+            }
+          }
+        }
+        properties.setActionList(actionList);
+
+        String editPartFactoryClass = element.getAttribute(EDITPARTFACTORY);
+        if (editPartFactoryClass != null)
+        {
+          Object object = loadClass(element, editPartFactoryClass);
+          EditPartFactory editPartFactory = null;
+          if (object instanceof EditPartFactory)
+          {
+            editPartFactory = (EditPartFactory) object;
+            properties.setEditPartFactoryList(editPartFactory);
+          }
+        }
+
+      }
+    }
+  }
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/XSDEditorContextIds.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/XSDEditorContextIds.java
new file mode 100644
index 0000000..1e4bfc5
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/XSDEditorContextIds.java
@@ -0,0 +1,460 @@
+/*******************************************************************************
+ * 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.editor;
+
+/**
+ * Context help id constants.
+ */
+public interface XSDEditorContextIds 
+{
+  public static final String PLUGIN_NAME = "org.eclipse.wst.xsd.ui.internal";
+
+  /* CONTEXT_IDs New XSD Wizard uses the WizardNewFileCreationPage from org.eclipse.ui.dialogs */
+ 
+  /* CONTEXT_IDs for XSDEditor follow the xsdexxx context IDs */
+
+  /* CONTEXT_ID xsde0010 for XSD Editor Design View */
+  public static final String XSDE_SCHEMA_DESIGN_VIEW      = PLUGIN_NAME + ".xsde0010";
+  /* no CONTEXT_ID for File Name Text Edit (not editable) */
+  /* CONTEXT_ID xsde0020 for Version Text Edit */
+  public static final String XSDE_SCHEMA_VERSION          = PLUGIN_NAME + ".xsde0020";
+  /* CONTEXT_ID xsde0030 for Language Text Edit */
+  public static final String XSDE_SCHEMA_LANGUAGE         = PLUGIN_NAME + ".xsde0030";
+  /* CONTEXT_ID xsde0040 for Namespace Group */
+  public static final String XSDE_SCHEMA_NAMESPACE_GROUP  = PLUGIN_NAME + ".xsde0040";
+  /* CONTEXT_ID xsde0050 for Prefix Text Edit */
+  public static final String XSDE_SCHEMA_PREFIX           = PLUGIN_NAME + ".xsde0050";
+  /* CONTEXT_ID xsde0060 for Target namespace Text Edit */
+  public static final String XSDE_SCHEMA_TARGET_NAMESPACE = PLUGIN_NAME + ".xsde0060";
+  /* CONTEXT_ID xsde0070 for Apply Push Button */
+  public static final String XSDE_SCHEMA_APPLY            = PLUGIN_NAME + ".xsde0070";
+  /* CONTEXT_ID xsde0080 for Attribute form default Combo Box */
+  public static final String XSDE_SCHEMA_ATTRIBUTE        = PLUGIN_NAME + ".xsde0080";
+  /* CONTEXT_ID xsde0090 for Element form default Combo Box */
+  public static final String XSDE_SCHEMA_ELEMENT          = PLUGIN_NAME + ".xsde0090";
+  /* CONTEXT_ID xsde0100 for Block default Combo Box */
+  public static final String XSDE_SCHEMA_BLOCK            = PLUGIN_NAME + ".xsde0100";
+  /* CONTEXT_ID xsde0110 for Final Default Combo Box */
+  public static final String XSDE_SCHEMA_FINAL            = PLUGIN_NAME + ".xsde0110";
+
+  
+  /* CONTEXT_ID xsde0200 for Annotations Comment Group - only used generically */
+  /* CONTEXT_ID      - used in Documentation Design View */
+  /* CONTEXT_ID      - used in App Info Design View */
+  public static final String XSDE_ANNOTATION_COMMENT_GROUP = PLUGIN_NAME + ".xsde0200";
+  /* CONTEXT_ID xsde0210 for Annotations Comment Group - only used generically */
+  /* CONTEXT_ID      - used in Documentation Design View */
+  /* CONTEXT_ID      - used in App Info Design View */
+  public static final String XSDE_ANNOTATION_COMMENT       = PLUGIN_NAME + ".xsde0210";
+  
+  /* CONTEXT_ID xsde0300 for Documentation Design View */
+  public static final String XSDE_DOCUMENTATION_DESIGN_VIEW   = PLUGIN_NAME + ".xsde0300";
+  /* CONTEXT_ID xsde0310 for Source Text Edit */
+  public static final String XSDE_DOCUMENTATION_SOURCE        = PLUGIN_NAME + ".xsde0310";
+  /* CONTEXT_ID xsde0320 for Language Text Edit */
+  public static final String XSDE_DOCUMENTATION_LANGUAGE      = PLUGIN_NAME + ".xsde0320";
+  /* CONTEXT_ID Comment Group is from Annotations Window xsde0200 */
+  /* CONTEXT_ID Comment Multi-line Edit is from Annotations Window xsd0210 */
+
+  /* CONTEXT_ID xsde0400 for App Info Design View */
+  public static final String XSDE_APP_INFO_DESIGN_VIEW = PLUGIN_NAME + ".xsde0400";
+  /* CONTEXT_ID xsde0410 for App Info Source Text Edit */
+  public static final String XSDE_APP_INFO_SOURCE = PLUGIN_NAME + ".xsde0410";
+  /* CONTEXT_ID Comment Group is from Annotations Window xsde0200 */
+  /* CONTEXT_ID Comment Multi-line Edit is from Annotations Window xsd0210 */
+
+  /* CONTEXT_ID xsde0500 for Complex Type Design View */
+  public static final String XSDE_COMPLEX_DESIGN_VIEW = PLUGIN_NAME + ".xsde0500";
+  /* CONTEXT_ID xsde0510 for Name Text Edit */
+  public static final String XSDE_COMPLEX_NAME        = PLUGIN_NAME + ".xsde0510";
+  /* CONTEXT_ID xsde0520 for Abstract Combo Box */
+  public static final String XSDE_COMPLEX_ABSTRACT    = PLUGIN_NAME + ".xsde0520";
+  /* CONTEXT_ID xsde0530 for Mixed Combo Box */
+  public static final String XSDE_COMPLEX_MIXED       = PLUGIN_NAME + ".xsde0530";
+  /* CONTEXT_ID xsde0540 for Block Combo Box */
+  public static final String XSDE_COMPLEX_BLOCK       = PLUGIN_NAME + ".xsde0540";
+  /* CONTEXT_ID xsde0550 for Final Combo Box */
+  public static final String XSDE_COMPLEX_FINAL       = PLUGIN_NAME + ".xsde0550";
+
+  /* CONTEXT_ID xsde0600 for Simple Type Design View */
+  public static final String XSDE_SIMPLE_DESIGN_VIEW = PLUGIN_NAME + ".xsde0600";
+  /* CONTEXT_ID xsde0610 for Name Text Edit */
+  public static final String XSDE_SIMPLE_NAME        = PLUGIN_NAME + ".xsde0610";
+
+  /* CONTEXT_ID for Global Element and Element Design Views are the same */
+  /* CONTEXT_ID xsde0700 for Element Design View */
+  public static final String XSDE_ELEMENT_DESIGN_VIEW = PLUGIN_NAME + ".xsde0700";
+  /* CONTEXT_ID xsde0710 for Element Name Text Edit */
+  public static final String XSDE_ELEMENT_NAME         = PLUGIN_NAME + ".xsde0710";
+  /* CONTEXT_ID Type Information Group is from Type Helper xsde0900 */
+  /* CONTEXT_ID Built-in simple type Radio Button is from Type Helper xsde0920 */
+  /* CONTEXT_ID User-defined simple type Radio Button is from Type Helper xsde0930 */
+  /* CONTEXT_ID User-defined complex type Radio Button is from Type Helper xsde0940 */
+  /* CONTEXT_ID Type information Combo Box is from Type Helper xsde0950 */
+  /* CONTEXT_ID xsde0720 for Abstract Check Box */
+  public static final String XSDE_ELEMENT_ABSTRACT     = PLUGIN_NAME + ".xsde0720";
+  /* CONTEXT_ID xsde0730 for Nillable Check Box */
+  public static final String XSDE_ELEMENT_NILLABLE     = PLUGIN_NAME + ".xsde0730";
+  /* CONTEXT_ID xsde0740 for Value Group */
+  public static final String XSDE_ELEMENT_VALUE        = PLUGIN_NAME + ".xsde0740";
+  /* CONTEXT_ID xsde0750 for Fixed Radio Button */
+  public static final String XSDE_ELEMENT_FIXED        = PLUGIN_NAME + ".xsde0750";
+  /* CONTEXT_ID xsde0760 for Default Radio Button */
+  public static final String XSDE_ELEMENT_DEFAULT      = PLUGIN_NAME + ".xsde0760";
+  /* CONTEXT_ID xsde0770 for Value Group */
+  public static final String XSDE_ELEMENT_VALUE_GROUP  = PLUGIN_NAME + ".xsde0770";
+  /* CONTEXT_ID xsde0780 for Minimum Text Edit */
+  public static final String XSDE_ELEMENT_MINIMUM      = PLUGIN_NAME + ".xsde0780";
+  /* CONTEXT_ID xsde0790 for Maximum Text Edit */
+  public static final String XSDE_ELEMENT_MAXIMUM      = PLUGIN_NAME + ".xsde0790";
+  /* CONTEXT_ID xsde0800 for Block Combo Box */
+  public static final String XSDE_ELEMENT_BLOCK        = PLUGIN_NAME + ".xsde0800";
+  /* CONTEXT_ID xsde0810 for Final Combo Box */
+  public static final String XSDE_ELEMENT_FINAL        = PLUGIN_NAME + ".xsde0810";
+  /* CONTEXT_ID xsde0820 for Substitution Group Combo Box */
+  public static final String XSDE_ELEMENT_SUBSTITUTION = PLUGIN_NAME + ".xsde0820";
+  /* CONTEXT_ID xsde0830 for Form Qualification Combo Box */                    
+  public static final String XSDE_ELEMENT_FORM         = PLUGIN_NAME + ".xsde0830";
+
+  /* CONTEXT_ID xsde0900 for Type Helper Group - only used generically */
+  /* CONTEXT_ID      - used in Global Element Design View */
+  /* CONTEXT_ID      - used in Global Attribute Design View */
+  /* CONTEXT_ID      - used in Simple Content Design View */
+  /* CONTEXT_ID      - used in Restriction Design View */
+  /* CONTEXT_ID      - used in List Design View */
+  /* CONTEXT_ID      - used in Union Design View */
+  public static final String XSDE_TYPE_HELPER_GROUP    = PLUGIN_NAME + ".xsde0900";
+  /* CONTEXT_ID xsde0910 for None Radio Button - only used generically */
+  /* CONTEXT_ID      - used in Simple Content Design View */
+  /* CONTEXT_ID      - used in Restriction Design View */
+  /* CONTEXT_ID      - used in List Design View */
+  /* CONTEXT_ID      - used in Union Design View */
+  public static final String XSDE_TYPE_HELPER_NONE     = PLUGIN_NAME + ".xsde0910";
+  /* CONTEXT_ID xsde0920 for Built-in simple type Radio Button - only used generically */
+  /* CONTEXT_ID      - used in Global Element Design View */
+  /* CONTEXT_ID      - used in Global Attribute Design View */
+  /* CONTEXT_ID      - used in Simple Content Design View */
+  /* CONTEXT_ID      - used in Restriction Design View */
+  /* CONTEXT_ID      - used in List Design View */
+  /* CONTEXT_ID      - used in Union Design View */
+  public static final String XSDE_TYPE_HELPER_BUILT_IN = PLUGIN_NAME + ".xsde0920";
+  /* CONTEXT_ID xsde0930 for User-defined simple type Radio Button - only used generically */
+  /* CONTEXT_ID      - used in Global Element Design View */
+  /* CONTEXT_ID      - used in Global Attribute Design View */
+  /* CONTEXT_ID      - used in Simple Content Design View */
+  /* CONTEXT_ID      - used in Restriction Design View */
+  /* CONTEXT_ID      - used in List Design View */
+  /* CONTEXT_ID      - used in Union Design View */
+  public static final String XSDE_TYPE_HELPER_USER_DEFINED_SIMPLE = PLUGIN_NAME + ".xsde0930";
+  /* CONTEXT_ID xsde0940 for User-defined complex type Radio Button - only used generically */
+  /* CONTEXT_ID      - used in Global Element Design View */
+  public static final String XSDE_TYPE_HELPER_USER_DEFINED_COMPLEX = PLUGIN_NAME + ".xsde0940";
+  /* CONTEXT_ID xsde0950 for Type information Combo Box - only used generically */
+  /* CONTEXT_ID      - used in Global Element Design View */
+  /* CONTEXT_ID      - used in Global Attribute Design View */
+  /* CONTEXT_ID      - used in Simple Content Design View */
+  /* CONTEXT_ID      - used in Restriction Design View */
+  /* CONTEXT_ID      - used in List Design View */
+  public static final String XSDE_TYPE_HELPER_TYPE = PLUGIN_NAME + ".xsde0950";
+
+  /* CONTEXT_ID xsde1000 for Attribute Design View */
+  public static final String XSDE_ATTRIBUTE_DESIGN_VIEW = PLUGIN_NAME + ".xsde1000";
+  /* CONTEXT_ID xsde1010 for Attribute Name Text Edit */
+  public static final String XSDE_ATTRIBUTE_NAME        = PLUGIN_NAME + ".xsde1010";
+  /* CONTEXT_ID Type Information Group is from Type Helper xsde0900 */
+  /* CONTEXT_ID Built-in simple type Radio Button is from Type Helper xsde0920 */
+  /* CONTEXT_ID User-defined simple type Radio Button is from Type Helper xsde0930 */
+  /* CONTEXT_ID Type information Combo Box is from Type Helper xsde0950 */
+  /* CONTEXT_ID xsde1020 for Value Group */
+  public static final String XSDE_ATTRIBUTE_VALUE_GROUP = PLUGIN_NAME + ".xsde1020";
+  /* CONTEXT_ID xsde1030 for Fixed Radio Button */
+  public static final String XSDE_ATTRIBUTE_FIXED       = PLUGIN_NAME + ".xsde1030";
+  /* CONTEXT_ID xsde1040 for Default Radio Button */
+  public static final String XSDE_ATTRIBUTE_DEFAULT     = PLUGIN_NAME + ".xsde1040";
+  /* CONTEXT_ID xsde1050 for Value Text Edit */
+  public static final String XSDE_ATTRIBUTE_VALUE       = PLUGIN_NAME + ".xsde1050";
+  /* CONTEXT_ID xsde1060 for Usage Combo Box */
+  public static final String XSDE_ATTRIBUTE_USAGE       = PLUGIN_NAME + ".xsde1060";
+  /* CONTEXT_ID xsde1070 for Form qualificaiton Combo Box */
+  public static final String XSDE_ATTRIBUTE_FORM        = PLUGIN_NAME + ".xsde1070";
+
+  /* CONTEXT_ID xsde1100 for Element Ref Window Design View */
+  public static final String XSDE_ELEMENT_REF_DESIGN_VIEW = PLUGIN_NAME + ".xsde1100";
+  /* CONTEXT_ID xsde1110 for Reference Name Combo Box */
+  public static final String XSDE_ELEMENT_REF_REFERENCE   = PLUGIN_NAME + ".xsde1110";
+  /* CONTEXT_ID xsde1120 for Minimum Text Edit */
+  public static final String XSDE_ELEMENT_REF_MINIMUM     = PLUGIN_NAME + ".xsde1120";
+  /* CONTEXT_ID xsde1130 for Maximum Text Edit */
+  public static final String XSDE_ELEMENT_REF_MAXIMUM     = PLUGIN_NAME + ".xsde1130";
+  
+  /* CONTEXT_ID xsde1200 for Simple Content Design View - used generically */
+  /* CONTEXT_ID      - used in Simple Content Design View */ 
+  /* CONTEXT_ID      - used in Complex Content Design View */
+    public static final String XSDE_SIMPLE_CONTENT_DESIGN_VIEW = PLUGIN_NAME + ".xsde1200";
+  /* CONTEXT_ID Base Type Group is from Type Helper xsde0900 */
+  /* CONTEXT_ID None Radio Button is from Type Helper xsde0910 */
+  /* CONTEXT_ID Built-in simple type Radio Button is from Type Helper xsde0920 */
+  /* CONTEXT_ID User-defined simple type Radio Button is from Type Helper xsde0930 */
+  /* CONTEXT_ID Type information Combo Box is from Type Helper xsde0950 */
+  /* CONTEXT_ID xsde1210 for Derived by Combo Box - used generically */
+  /* CONTEXT_ID      - used in Simple Content Design View */ 
+  /* CONTEXT_ID      - used in Complex Content Design View */
+  public static final String XSDE_SIMPLE_CONTENT_DERIVED = PLUGIN_NAME + ".xsde1210";
+
+  /* CONTEXT_ID xsde1300 for Restriction Design View */
+  public static final String XSDE_RESTRICTION_DESIGN_VIEW  = PLUGIN_NAME + ".xsde1300";
+  /* CONTEXT_ID Base Type Group is from Type Helper xsde0900 */
+  /* CONTEXT_ID None Radio Button is from Type Helper xsde0910 */
+  /* CONTEXT_ID Built-in simple type Radio Button is from Type Helper xsde0920 */
+  /* CONTEXT_ID User-defined simple type Radio Button is from Type Helper xsde0930 */
+  /* CONTEXT_ID Type information Combo Box is from Type Helper xsde0950 */
+  /* CONTEXT_ID xsde1310 for Facets Group */
+  public static final String XSDE_RESTRICTION_FACETS_GROUP = PLUGIN_NAME + ".xsde1310";
+  /* CONTEXT_ID xsde1320 for Facets Table */
+  public static final String XSDE_RESTRICTION_FACETS       = PLUGIN_NAME + ".xsde1320";
+
+  /* CONTEXT_ID xsde1400 for List Design View */
+  public static final String XSDE_LIST_DESIGN_VIEW  = PLUGIN_NAME + ".xsde1400";
+  /* CONTEXT_ID Base Type Group is from Type Helper xsde0900 */
+  /* CONTEXT_ID None Radio Button is from Type Helper xsde0910 */
+  /* CONTEXT_ID Built-in simple type Radio Button is from Type Helper xsde0920 */
+  /* CONTEXT_ID User-defined simple type Radio Button is from Type Helper xsde0930 */
+  /* CONTEXT_ID Type information Combo Box is from Type Helper xsde0950 */
+
+  /* CONTEXT_ID xsde1500 for Attribute Group Design View */
+  public static final String XSDE_ATTRIBUTE_GROUP_DESIGN_VIEW = PLUGIN_NAME + ".xsde1500";
+  /* CONTEXT_ID xsde1510 for Name Text Edit */
+  public static final String XSDE_ATTRIBUTE_GROUP_NAME = PLUGIN_NAME + ".xsde1510";
+
+  /* CONTEXT_ID for Global Attribute and Attribute Design Views are the same */
+  /* CONTEXT_ID xsde1600 for Attribute Group Reference Design View */
+  public static final String XSDE_ATTRIBUTE_GROUP_REF_DESIGN_VIEW = PLUGIN_NAME + ".xsde1600";
+  /* CONTEXT_ID xsde1610 for Reference Name Combo Box */
+  public static final String XSDE_ATTRIBUTE_GROUP_REF_NAME = PLUGIN_NAME + ".xsde1610";
+
+  /* CONTEXT_ID xsde1700 for Attribute Reference Design View */
+  public static final String XSDE_ATTRIBUTE_REF_DESIGN_VIEW = PLUGIN_NAME + ".xsde1700";
+  /* CONTEXT_ID xsde1710 for Reference Name Combo Box */
+  public static final String XSDE_ATTRIBUTE_REF_NAME = PLUGIN_NAME + ".xsde1710";
+
+  /* CONTEXT_ID xsde1800 for Pattern Design View */
+  public static final String XSDE_PATTERN_DESIGN_VIEW = PLUGIN_NAME + ".xsde1800";
+  /* CONTEXT_ID xsde1810 for Value Text Edit */
+  public static final String XSDE_PATTERN_VALUE   = PLUGIN_NAME + ".xsde1810";
+  /* CONTEXT_ID xsde1820 for Create Regular Expression Push Button */
+  public static final String XSDE_PATTERN_REGULAR = PLUGIN_NAME + ".xsde1820";
+
+  /* CONTEXT_ID xsde1900 for Enum Design View */
+  public static final String XSDE_ENUM_DESIGN_VIEW = PLUGIN_NAME + ".xsde1900";
+  /* CONTEXT_ID xsde1910 for Value Text Edit */
+  public static final String XSDE_ENUM_VALUE       = PLUGIN_NAME + ".xsde1910";
+  
+  /* CONTEXT_ID xsde2000 for Include Design Page */
+  public static final String XSDE_INCLUDE_DESIGN_VIEW = PLUGIN_NAME + ".xsde2000";
+  /* no CONTEXT_ID for Schema Location Text Edit (not editable) */
+  /* CONTEXT_ID Select Push Button is from Include Helper xsde2100 */ 
+  
+  /* CONTEXT_ID xsde2100 for Include Helper Select Push Button - used generically */
+  /* CONTEXT_ID      - used in Include Design View */
+  /* CONTEXT_ID      - used in Import Design View */
+  public static final String XSDE_INCLUDE_HELPER_SELECT = PLUGIN_NAME + ".xsde2100";
+
+  /* CONTEXT_ID xsde2200 for Import Design Page */
+  public static final String XSDE_IMPORT_DESIGN_VIEW = PLUGIN_NAME + ".xsde2200";
+  /* no CONTEXT_ID for Schema Location Text Edit (not editable) */
+  /* CONTEXT_ID Select Push Button is from Include Helper xsde2100 */
+  /* CONTEXT_ID xsde2210 for Prefix Text Edit */
+  public static final String XSDE_IMPORT_PREFIX      = PLUGIN_NAME + ".xsde2210";
+  /* no CONTEXT_ID for Namespace Text Edit (not editable) */
+
+  /* CONTEXT_ID xsde2300 for Redefine Design View */
+  public static final String XSDE_REDEFINE_DESIGN_VIEW = PLUGIN_NAME + ".xsde2300";
+  /* no CONTEXT_ID for Schema Location Text Edit (not editable) */
+  /* CONTEXT_ID Select Push Button is from Include Helper xsde2100 */
+
+  /* CONTEXT_ID xsde2400 for Group Design View */
+  public static final String XSDE_GROUP_DESIGN_VIEW = PLUGIN_NAME + ".xsde2400";
+  /* CONTEXT_ID xsde2410 for Name Text Edit */
+  public static final String XSDE_GROUP_NAME        = PLUGIN_NAME + ".xsde2410";
+
+  /* CONTEXT_ID xsde2500 for Group Scope Design View */
+  public static final String XSDE_GROUP_SCOPE_DESIGN_VIEW   = PLUGIN_NAME + ".xsde2500";
+  /* CONTEXT_ID xsde2510 for Content model Group */
+  public static final String XSDE_GROUP_SCOPE_CONTENT_GROUP = PLUGIN_NAME + ".xsde2510";
+  /* CONTEXT_ID xsde2520 for Sequence Radio Button */
+  public static final String XSDE_GROUP_SCOPE_SEQUENCE = PLUGIN_NAME + ".xsde2520";
+  /* CONTEXT_ID xsde2530 for Choice Radio Button */
+  public static final String XSDE_GROUP_SCOPE_CHOICE   = PLUGIN_NAME + ".xsde2530";
+  /* CONTEXT_ID xsde2540 for All Radio Button */
+  public static final String XSDE_GROUP_SCOPE_ALL      = PLUGIN_NAME + ".xsde2540";
+  /* CONTEXT_ID xsde2550 for Minimum Text Edit */
+  public static final String XSDE_GROUP_SCOPE_MINIMUM  = PLUGIN_NAME + ".xsde2550";
+  /* CONTEXT_ID xsde2560 for Maximum Text Edit*/
+  public static final String XSDE_GROUP_SCOPE_MAXIMUM  = PLUGIN_NAME + ".xsde2560";
+
+  /* CONTEXT_ID xsde2600 for Group Ref Design View */
+  public static final String XSDE_GROUP_REF_DESIGN_VIEW = PLUGIN_NAME + ".xsde2600";
+  /* CONTEXT_ID xsde2610 for Reference name Combo Box */
+  public static final String XSDE_GROUP_REF_REFERENCE   = PLUGIN_NAME + ".xsde2610";
+  /* CONTEXT_ID xsde2620 for Minimum Text Edit */
+  public static final String XSDE_GROUP_REF_MINIMUM     = PLUGIN_NAME + ".xsde2620";
+  /* CONTEXT_ID xsde2630 for Maximum Text Edit */
+  public static final String XSDE_GROUP_REF_MAXIMUM     = PLUGIN_NAME + ".xsde2630";
+
+  /* CONTEXT_ID xsde2700 for Unique Design View */
+  public static final String XSDE_UNIQUE_DESIGN_VIEW = PLUGIN_NAME + ".xsde2700";
+  /* CONTEXT_ID Name Text Edit is from Unique Base xsde2800 */
+  /* CONTEXT_ID Selector Group is from Unique Base xsde2810 */
+  /* CONTEXT_ID Selector Mulit-line Edit is from Unique Base xsde2820 */
+  /* CONTEXT_ID Fields Group is from Unique Base xsde2830 */
+  /* CONTEXT_ID Source Text Edit is from Unique Base xsde2840 */
+  /* CONTEXT_ID Add Push Button is from Unique Base xsde2850 */
+  /* CONTEXT_ID Remove Push Button is from Unique Base xsde2860 */
+  /* CONTEXT_ID Target List Box is from Unique Base xsde2870 */
+  
+  /* CONTEXT_ID xsde2800 for Unique Base Name Text Edit - used generically */
+  /* CONTEXT_ID      - used in Unique Design View */
+  /* CONTEXT_ID      - used in Key Design View */
+  /* CONTEXT_ID      - used in Key Ref Design View */
+  public static final String XSDE_UNIQUE_BASE_NAME = PLUGIN_NAME + ".xsde2800";
+  /* CONTEXT_ID xsde2810 for Selector Group - used generically */
+  /* CONTEXT_ID      - used in Unique Design View */
+  /* CONTEXT_ID      - used in Key Design View */
+  /* CONTEXT_ID      - used in Key Ref Design View */
+  public static final String XSDE_UNIQUE_BASE_SELECTOR_GROUP = PLUGIN_NAME + ".xsde2810";
+  /* CONTEXT_ID xsde2820 for Selector Multi-line Edit - used generically */
+  /* CONTEXT_ID      - used in Unique Design View */
+  /* CONTEXT_ID      - used in Key Design View */
+  /* CONTEXT_ID      - used in Key Ref Design View */
+  public static final String XSDE_UNIQUE_BASE_SELECTOR       = PLUGIN_NAME + ".xsde2820";
+  /* CONTEXT_ID xsde2830 for Fields Group - used generically */
+  /* CONTEXT_ID      - used in Unique Design View */
+  /* CONTEXT_ID      - used in Key Design View */
+  /* CONTEXT_ID      - used in Key Ref Design View */
+  public static final String XSDE_UNIQUE_BASE_FIELDS_GROUP   = PLUGIN_NAME + ".xsde2830";
+  /* CONTEXT_ID xsde2840 for Source Text Edit - used generically */
+  /* CONTEXT_ID      - used in Unique Design View */
+  /* CONTEXT_ID      - used in Key Design View */
+  /* CONTEXT_ID      - used in Key Ref Design View */
+  public static final String XSDE_UNIQUE_BASE_SOURCE         = PLUGIN_NAME + ".xsde2840";
+  /* CONTEXT_ID xsde2850 for Add Push Button - used generically */
+  /* CONTEXT_ID      - used in Unique Design View */
+  /* CONTEXT_ID      - used in Key Design View */
+  /* CONTEXT_ID      - used in Key Ref Design View */
+  public static final String XSDE_UNIQUE_BASE_ADD            = PLUGIN_NAME + ".xsde2850";
+  /* CONTEXT_ID xsde2860 for Remove Push Button - used generically */
+  /* CONTEXT_ID      - used in Unique Design View */
+  /* CONTEXT_ID      - used in Key Design View */
+  /* CONTEXT_ID      - used in Key Ref Design View */
+  public static final String XSDE_UNIQUE_BASE_REMOVE         = PLUGIN_NAME + ".xsde2860";
+  /* CONTEXT_ID xsde2870 for Target List Box - used generically */
+  /* CONTEXT_ID      - used in Unique Design View */
+  /* CONTEXT_ID      - used in Key Design View */
+  /* CONTEXT_ID      - used in Key Ref Design View */
+  public static final String XSDE_UNIQUE_BASE_TARGET         = PLUGIN_NAME + ".xsde2870";
+
+  /* CONTEXT_ID xsde2900 for Key Design View */
+  public static final String XSDE_KEY_DESIGN_VIEW = PLUGIN_NAME + ".xsde2900";
+  /* CONTEXT_ID Name Text Edit is from Unique Base xsde2800 */
+  /* CONTEXT_ID Selector Group is from Unique Base xsde2810 */
+  /* CONTEXT_ID Selector Mulit-line Edit is from Unique Base xsde2820 */
+  /* CONTEXT_ID Fields Group is from Unique Base xsde2830 */
+  /* CONTEXT_ID Source Text Edit is from Unique Base xsde2840 */
+  /* CONTEXT_ID Add Push Button is from Unique Base xsde2850 */
+  /* CONTEXT_ID Remove Push Button is from Unique Base xsde2860 */
+  /* CONTEXT_ID Target List Box is from Unique Base xsde2870 */
+  /* CONTEXT_ID xsde2900 for Key Design View */
+  
+  /* CONTEXT_ID xsde2950 for Key Ref Design View */
+  public static final String XSDE_KEY_REF_DESIGN_VIEW = PLUGIN_NAME + ".xsde2950";
+  /* CONTEXT_ID Name Text Edit is from Unique Base xsde2800 */
+  /* CONTEXT_ID xsde2960 for Reference Key Combo Box */
+  public static final String XSDE_KEY_REF_REFERENCE = PLUGIN_NAME + ".xsde2960";
+  /* CONTEXT_ID Selector Group is from Unique Base xsde2810 */
+  /* CONTEXT_ID Selector Mulit-line Edit is from Unique Base xsde2820 */
+  /* CONTEXT_ID Fields Group is from Unique Base xsde2830 */
+  /* CONTEXT_ID Source Text Edit is from Unique Base xsde2840 */
+  /* CONTEXT_ID Add Push Button is from Unique Base xsde2850 */
+  /* CONTEXT_ID Remove Push Button is from Unique Base xsde2860 */
+  /* CONTEXT_ID Target List Box is from Unique Base xsde2870 */
+
+  /* CONTEXT_ID xsde3000 for Any Element Design View */
+  public static final String XSDE_ANY_ELEMENT_VIEW = PLUGIN_NAME + ".xsde3000";
+  /* CONTEXT_ID xsde3010 for Namespace Text Edit */
+  public static final String XSDE_ANY_ELEMENT_NAMESPACE = PLUGIN_NAME + ".xsde3010";
+  /* CONTEXT_ID xsde3020 for Process Contents Combo Box */
+  public static final String XSDE_ANY_ELEMENT_PROCESS   = PLUGIN_NAME + ".xsde3020";
+  /* CONTEXT_ID xsde3030 for Minimum Text Edit */
+  public static final String XSDE_ANY_ELEMENT_MINIMUM   = PLUGIN_NAME + ".xsde3030";
+  /* CONTEXT_ID xsde3040 for Maximum Text Edit */
+  public static final String XSDE_ANY_ELEMENT_MAXIMUM   = PLUGIN_NAME + ".xsde3040";
+
+  /* CONTEXT_ID xsde3100 for Any Attribute Design View */
+  public static final String XSDE_ANY_ATTRIBUTE_VIEW = PLUGIN_NAME + ".xsde3100";
+  /* CONTEXT_ID xsde3110 for Namespace Text Edit */
+  public static final String XSDE_ANY_ATTRIBUTE_NAMESPACE = PLUGIN_NAME + ".xsde3110";
+  /* CONTEXT_ID xsde3120 for Process Contents Combo Box */
+  public static final String XSDE_ANY_ATTRIBUTE_PROCESS   = PLUGIN_NAME + ".xsde3120";
+
+  /* no CONTEXT_ID for Union Design View - uses a generic interface */
+  /* CONTEXT_ID Type Information Group is from Type Helper xsde0900 */
+  /* CONTEXT_ID Built-in simple type Radio Button is from Type Helper xsde0920 */
+  /* CONTEXT_ID User-defined simple type Radio Button is from Type Helper xsde0930 */
+  /* CONTEXT_ID Type information Combo Box is from Type Helper xsde0950 */
+
+  /* CONTEXT_ID xsde3200 for Notation Design View */
+  public static final String XSDE_NOTATION_VIEW = PLUGIN_NAME + ".xsde3200";
+
+  /* CONTEXT_ID xsde4000 for Source View */
+  public static final String XSDE_SOURCE_VIEW = PLUGIN_NAME + ".xsde4000";
+
+  /* CONTEXT_IDs for Regular Expression Wizard follow the xsdrxxx context IDs */
+  
+  /* CONTEXT_ID xsdr0010 for Compose Regular Expression Page */
+  public static final String XSDR_COMPOSITION_PAGE         = PLUGIN_NAME + ".xsdr0010";
+  /* CONTEXT_ID xsdr0015 for Token Contents Combo Box */
+  public static final String XSDR_COMPOSITION_TOKEN = PLUGIN_NAME + ".xsdr0015";
+  /* CONTEXT_ID xsdr0020 for Occurrece Group */
+  public static final String XSDR_COMPOSITION_OCCURRENCE_GROUP = PLUGIN_NAME + ".xsdr0020";
+  /* CONTEXT_ID xsdr0030 for Just once Radio Button */
+  public static final String XSDR_COMPOSITION_JUST_ONCE    = PLUGIN_NAME + ".xsdr0030";
+  /* CONTEXT_ID xsdr0040 for Zero or more Radio Button */
+  public static final String XSDR_COMPOSITION_ZERO_OR_MORE = PLUGIN_NAME + ".xsdr0040";
+  /* CONTEXT_ID xsdr0050 for One or more Radio Button */
+  public static final String XSDR_COMPOSITION_ONE_OR_MORE  = PLUGIN_NAME + ".xsdr0050";
+  /* CONTEXT_ID xsdr0060 for Optional Radio Button */
+  public static final String XSDR_COMPOSITION_OPTIONAL     = PLUGIN_NAME + ".xsdr0060";
+  /* CONTEXT_ID xsdr0070 for Repeat Radio Button */
+  public static final String XSDR_COMPOSITION_REPEAT       = PLUGIN_NAME + ".xsdr0070";
+  /* CONTEXT_ID xsdr0080 for Range Radio Button */
+  public static final String XSDR_COMPOSITION_RANGE        = PLUGIN_NAME + ".xsdr0080";
+  /* CONTEXT_ID xsdr0090 for Repeat Text Edit */
+  public static final String XSDR_COMPOSITION_REPEAT_TEXT  = PLUGIN_NAME + ".xsdr0090";
+  /* CONTEXT_ID xsdr0100 for Range Minimum Text Edit */
+  public static final String XSDR_COMPOSITION_RANGE_MIN    = PLUGIN_NAME + ".xsdr0100";
+  /* CONTEXT_ID xsdr0110 for Range Maximum Text Edit */
+  public static final String XSDR_COMPOSITION_RANGE_MAX    = PLUGIN_NAME + ".xsdr0110";
+  /* CONTEXT_ID xsdr0120 for Add Push Button */
+  public static final String XSDR_COMPOSITION_ADD          = PLUGIN_NAME + ".xsdr0120";
+  /* CONTEXT_ID xsdr0130 for Current Regular Expression Text Edit */
+  public static final String XSDR_COMPOSITION_CURRENT      = PLUGIN_NAME + ".xsdr0130";
+
+  /* CONTEXT_ID xsdr0200 for Test Regular Expression Page */
+  public static final String XSDR_TEST_PAGE   = PLUGIN_NAME + ".xsdr0200";
+  /* no CONTEXT_ID for Regular Expression Text Edit (not editable) */
+  /* CONTEXT_ID xsdr0210 for Sample Text Text Edit */
+  public static final String XSDR_TEST_SAMPLE = PLUGIN_NAME + ".xsdr0210";
+
+  /* CONTEXT_IDs for Preferences Page follows the xsdpxxx context IDs */
+  
+  /* CONTEXT_ID xsdp0010 for XML Schema Preferences Page */
+  public static final String XSDP_PREFERENCE_PAGE = PLUGIN_NAME + ".xsdp0010";
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/XSDEditorExtensionProperties.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/XSDEditorExtensionProperties.java
new file mode 100644
index 0000000..f0464ea
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/XSDEditorExtensionProperties.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor;
+
+import java.util.List;
+
+import org.eclipse.gef.EditPartFactory;
+import org.eclipse.wst.xsd.editor.internal.adapters.XSDAdapterFactory;
+import org.eclipse.wst.xsd.editor.internal.design.figures.IExtendedFigureFactory;
+
+public class XSDEditorExtensionProperties
+{
+  XSDAdapterFactory adapterFactory;
+  IExtendedFigureFactory figureFactory;
+  EditPartFactory editPartFactory;
+  List actionList;
+
+  public XSDEditorExtensionProperties()
+  {
+
+  }
+
+  public void setActionList(List actionList)
+  {
+    this.actionList = actionList;
+  }
+
+  public void setAdapterFactory(XSDAdapterFactory adapterFactory)
+  {
+    this.adapterFactory = adapterFactory;
+  }
+
+  public void setEditPartFactoryList(EditPartFactory editPartFactory)
+  {
+    this.editPartFactory = editPartFactory;
+  }
+
+  public void setFigureFactoryList(IExtendedFigureFactory figureFactory)
+  {
+    this.figureFactory = figureFactory;
+  }
+
+  public List getActionList()
+  {
+    return actionList;
+  }
+
+  public XSDAdapterFactory getAdapterFactory()
+  {
+    return adapterFactory;
+  }
+
+  public EditPartFactory getEditPartFactory()
+  {
+    return editPartFactory;
+  }
+
+  public IExtendedFigureFactory getFigureFactory()
+  {
+    return figureFactory;
+  }
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/XSDEditorPlugin.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/XSDEditorPlugin.java
new file mode 100644
index 0000000..25580d1
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/XSDEditorPlugin.java
@@ -0,0 +1,272 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor;
+
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.plugin.*;
+import org.eclipse.wst.xsd.ui.common.properties.sections.appinfo.ApplicationInformationPropertiesRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.osgi.framework.BundleContext;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.text.MessageFormat;
+import java.util.*;
+
+public class XSDEditorPlugin extends AbstractUIPlugin
+{
+  public static final String PLUGIN_ID = "org.eclipse.wst.xsd.ui";
+  public static final String CONST_XSD_DEFAULT_PREFIX_TEXT = "org.eclipse.wst.xmlschema.xsdDefaultPrefixText";
+  public static final String CONST_PREFERED_BUILT_IN_TYPES = "org.eclipse.wst.xmlschema.preferedBuiltInTypes"; 
+  public static final String CUSTOM_LIST_SEPARATOR = "\n";
+  public static final String APPINFO_EXTENSIONID = "org.eclipse.wst.xsd.ui.ApplicationInformationDescription";
+  public final static String DEFAULT_TARGET_NAMESPACE = "http://www.example.org";
+  
+	//The shared instance.
+	private static XSDEditorPlugin plugin;
+	//Resource bundle.
+	private ResourceBundle resourceBundle;
+  private ApplicationInformationPropertiesRegistry registry;
+  private XSDEditorConfiguration xsdEditorConfiguration = null;
+  
+  public static final String CONST_USE_SIMPLE_EDIT_MODE = PLUGIN_ID + ".useSimpleEditMode";
+  public static final String CONST_SHOW_INHERITED_CONTENT = PLUGIN_ID + ".showInheritedContent";
+
+  public static final String CONST_XSD_LANGUAGE_QUALIFY = "org.eclipse.wst.xmlschema.xsdQualify";
+  public static final String CONST_DEFAULT_TARGET_NAMESPACE = "org.eclipse.wst.xmlschema.defaultTargetnamespaceText";
+	/**
+	 * The constructor.
+	 */
+	public XSDEditorPlugin() {
+		super();
+		plugin = this;
+	}
+
+	/**
+	 * This method is called upon plug-in activation
+	 */
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+	}
+
+	/**
+	 * This method is called when the plug-in is stopped
+	 */
+	public void stop(BundleContext context) throws Exception {
+		super.stop(context);
+		plugin = null;
+		resourceBundle = null;
+	}
+
+	/**
+	 * Returns the shared instance.
+	 */
+	public static XSDEditorPlugin getDefault() {
+		return plugin;
+	}
+
+	/**
+	 * Returns the string from the plugin's resource bundle,
+	 * or 'key' if not found.
+	 */
+	public static String getResourceString(String key) {
+		ResourceBundle bundle = XSDEditorPlugin.getDefault().getResourceBundle();
+		try {
+			return (bundle != null) ? bundle.getString(key) : key;
+		} catch (MissingResourceException e) {
+			return key;
+		}
+	}
+  
+  public static String getResourceString(String key, Object o)
+  {
+      return getResourceString(key, new Object[] { o});
+  }
+
+  public static String getResourceString(String key, Object[] objects)
+  {
+      return MessageFormat.format(getResourceString(key), objects);
+  }
+	
+  public static String getResourceString(String key, Object o1, Object o2)
+  {
+      return getResourceString(key, new Object[] { o1, o2});
+  }
+
+	/**
+	 * Returns the plugin's resource bundle,
+	 */
+	public ResourceBundle getResourceBundle() {
+		try {
+			if (resourceBundle == null)
+				// resourceBundle = ResourceBundle.getBundle("org.eclipse.wst.xsd.editor.EditorPluginResources");
+        resourceBundle = Platform.getResourceBundle(getBundle());
+		} catch (MissingResourceException x) {
+			resourceBundle = null;
+		}
+		return resourceBundle;
+	}
+
+	/**
+	 * Returns an image descriptor for the image file at the given
+	 * plug-in relative path.
+	 *
+	 * @param path the path
+	 * @return the image descriptor
+	 */
+	public static ImageDescriptor getImageDescriptor(String path) {
+		return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.wst.xsd.ui", path);
+	}
+	
+	public static ImageDescriptor getImageDescriptor(String name, boolean getBaseURL) {
+		try {
+			URL installURL = getDefault().getBundle().getEntry("/"); //$NON-NLS-1$
+			String imageString = getBaseURL ? "icons/" + name : name;
+
+			URL imageURL = new URL(installURL, imageString);
+			return ImageDescriptor.createFromURL(imageURL);
+		} catch (MalformedURLException e) {
+			return null;
+		}
+	}
+
+	
+	public static XSDEditorPlugin getPlugin() {
+		return plugin;
+	}
+
+	public static String getXSDString(String key) {
+		return getResourceString(key);
+	}
+
+  /**
+   * This gets the string resource and does one substitution.
+   */
+  public String getString(String key, Object s1) {
+    return MessageFormat.format(Platform.getResourceBundle(getBundle()).getString(key), new Object[]{s1});
+  }
+  
+	public static Image getXSDImage(String iconName) {
+		return getDefault().getImage("internal/" + iconName);
+	}
+
+	public Image getImage(String iconName) {
+		ImageRegistry imageRegistry = getImageRegistry();
+
+		if (imageRegistry.get(iconName) != null) {
+			return imageRegistry.get(iconName);
+		}
+		else {
+			imageRegistry.put(iconName, ImageDescriptor.createFromFile(getClass(), iconName));
+			return imageRegistry.get(iconName);
+		}
+	}
+	
+	public URL getBaseURL() {
+		return getDescriptor().getInstallURL();
+	}
+
+	public Image getIconImage(String object) {
+		try {
+			return ExtendedImageRegistry.getInstance().getImage(new URL(getBaseURL() + "icons/" + object + ".gif"));
+		}
+		catch (MalformedURLException exception) {
+			System.out.println("Failed to load image for '" + object + "'");
+		}
+		return null;
+	}
+
+  public boolean getShowInheritedContent()
+  {
+    return getPreferenceStore().getBoolean(CONST_SHOW_INHERITED_CONTENT);
+  }
+  
+  protected void initializeDefaultPreferences(IPreferenceStore store)
+  {
+    store.setDefault(CONST_SHOW_INHERITED_CONTENT, false);
+    store.setDefault(CONST_XSD_DEFAULT_PREFIX_TEXT, "xsd");
+    
+    //Even the last item in the list must contain a trailing List separator
+    store.setDefault(CONST_PREFERED_BUILT_IN_TYPES,     		
+    		"boolean"+ CUSTOM_LIST_SEPARATOR +
+    		"date" + CUSTOM_LIST_SEPARATOR +
+    		"dateTime" + CUSTOM_LIST_SEPARATOR +
+    		"double" + CUSTOM_LIST_SEPARATOR +
+    		"float" + CUSTOM_LIST_SEPARATOR +
+    		"hexBinary" + CUSTOM_LIST_SEPARATOR +
+    		"int" + CUSTOM_LIST_SEPARATOR +
+    		"string" + CUSTOM_LIST_SEPARATOR +
+    		"time" + CUSTOM_LIST_SEPARATOR);
+  }
+
+  public ApplicationInformationPropertiesRegistry getApplicationInformationPropertiesRegistry()
+  {
+    if (registry == null)
+    {
+      registry = new ApplicationInformationPropertiesRegistry(APPINFO_EXTENSIONID);
+    }
+    return registry;
+  }
+
+  public XSDEditorConfiguration getXSDEditorConfiguration()
+  {
+    if (xsdEditorConfiguration == null)
+    {
+      xsdEditorConfiguration = new XSDEditorConfiguration();
+    }
+    return xsdEditorConfiguration;
+  }
+
+  /**
+   * Get the xml schema default namespace prefix
+   */
+  public String getXMLSchemaPrefix()
+  {
+    return getPreferenceStore().getString(CONST_XSD_DEFAULT_PREFIX_TEXT);
+  }
+
+  
+  
+  
+  
+  
+  
+  
+  
+
+  /**
+   * Get the xml schema default target namespace
+   */
+  public String getXMLSchemaTargetNamespace() {
+    String targetNamespace = getPreferenceStore().getString(CONST_DEFAULT_TARGET_NAMESPACE);
+    if (!targetNamespace.endsWith("/")) {
+      targetNamespace = targetNamespace + "/";
+    }
+    return targetNamespace;
+  }
+
+  /**
+   * Get the xml schema language qualification
+   */
+  public boolean isQualifyXMLSchemaLanguage() {
+    return getPreferenceStore().getBoolean(CONST_XSD_LANGUAGE_QUALIFY);
+  }
+
+  public static Shell getShell() {
+    return getPlugin().getWorkbench().getActiveWorkbenchWindow().getShell();
+  }
+
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/XSDElementReferenceEditManager.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/XSDElementReferenceEditManager.java
new file mode 100644
index 0000000..105f206
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/XSDElementReferenceEditManager.java
@@ -0,0 +1,117 @@
+package org.eclipse.wst.xsd.editor;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.wst.common.ui.internal.search.dialogs.ComponentSpecification;
+import org.eclipse.wst.common.ui.internal.search.dialogs.IComponentDescriptionProvider;
+import org.eclipse.wst.xsd.adt.edit.ComponentReferenceEditManager;
+import org.eclipse.wst.xsd.adt.edit.IComponentDialog;
+import org.eclipse.wst.xsd.editor.internal.search.XSDSearchListDialogDelegate;
+import org.eclipse.wst.xsd.ui.common.commands.AddXSDElementCommand;
+import org.eclipse.wst.xsd.ui.common.commands.UpdateElementReferenceAndManageDirectivesCommand;
+import org.eclipse.wst.xsd.ui.common.commands.UpdateElementReferenceCommand;
+import org.eclipse.wst.xsd.ui.internal.search.IXSDSearchConstants;
+import org.eclipse.xsd.XSDConcreteComponent;
+import org.eclipse.xsd.XSDElementDeclaration;
+import org.eclipse.xsd.XSDSchema;
+
+public class XSDElementReferenceEditManager implements ComponentReferenceEditManager
+{  
+  protected IFile currentFile;
+  protected XSDSchema[] schemas;
+  
+  public XSDElementReferenceEditManager(IFile currentFile, XSDSchema[] schemas)
+  {
+    this.currentFile = currentFile;
+    this.schemas = schemas;
+  }
+  
+  public void addToHistory(ComponentSpecification component)
+  {
+    // TODO (cs) implement me!    
+  }
+
+  public IComponentDialog getBrowseDialog()
+  {
+    //XSDSetExistingTypeDialog dialog = new XSDSetExistingTypeDialog(currentFile, schemas);
+    //return dialog;
+    XSDSearchListDialogDelegate dialogDelegate = 
+    	new XSDSearchListDialogDelegate(XSDSearchListDialogDelegate.ELEMENT_META_NAME, currentFile, schemas);
+    return dialogDelegate;
+  }
+
+  public IComponentDescriptionProvider getComponentDescriptionProvider()
+  {
+    // TODO Auto-generated method stub
+    return null;
+  }
+
+  public ComponentSpecification[] getHistory()
+  {
+    // TODO (cs) implement this properly - should this history be global or local to each editor?
+    // This is something we should play around with ourselves to see what feels right.
+    //
+    List list = new ArrayList();
+    ComponentSpecification result[] = new ComponentSpecification[list.size()];
+    list.toArray(result);
+    return result;
+  }
+
+  public IComponentDialog getNewDialog()
+  {
+    return null;
+  }
+
+  public ComponentSpecification[] getQuickPicks()
+  {
+    // TODO (cs) implement this properly - we should be providing a list of the 
+    // most 'common' built in schema types here
+    // I believe Trung will be working on a perference page to give us this list
+    // for now let's hard code some values
+    //
+    List list = new ArrayList();
+    
+    ComponentSpecification result[] = new ComponentSpecification[list.size()];
+    list.toArray(result);
+    return result;
+  }
+  
+//TODO not changed yet
+  public void modifyComponentReference(Object referencingObject, ComponentSpecification component)
+  {    
+    if (referencingObject instanceof Adapter)
+    {
+      Adapter adapter = (Adapter)referencingObject;
+      if (adapter.getTarget() instanceof XSDConcreteComponent)
+      {
+        XSDElementDeclaration concreteComponent = (XSDElementDeclaration)adapter.getTarget();
+        if (component.isNew())
+        {  
+          XSDElementDeclaration elementDec = null;
+          if (component.getMetaName() == IXSDSearchConstants.ELEMENT_META_NAME)
+          {  
+            AddXSDElementCommand command = new AddXSDElementCommand("Add Element", concreteComponent.getSchema());
+            command.setNameToAdd(component.getName());
+            command.execute();
+            elementDec = (XSDElementDeclaration) command.getAddedComponent();
+          }
+          if (elementDec != null && elementDec instanceof XSDElementDeclaration)
+          {
+            Command command = new UpdateElementReferenceCommand("Update Element reference",
+            		concreteComponent, elementDec);
+            command.execute();
+          }  
+        }  
+        else
+        {
+          Command command = new UpdateElementReferenceAndManageDirectivesCommand(concreteComponent, component.getName(), component.getQualifier(), component.getFile());
+          command.execute();
+        }  
+      }
+    }
+  }
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/XSDFileEditorInput.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/XSDFileEditorInput.java
new file mode 100644
index 0000000..7c8ee0a
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/XSDFileEditorInput.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.xsd.XSDSchema;
+
+public class XSDFileEditorInput extends FileEditorInput
+{
+  private IFile file;
+  private XSDSchema schema;
+  private String editorName;
+
+  public XSDFileEditorInput(IFile file, XSDSchema schema) {
+    super(file);
+    if (file == null) {
+      throw new IllegalArgumentException();
+    }
+    this.file = file;
+    this.schema = schema;
+    editorName = file.getName();
+  }
+
+  public IFile getFile()
+  {
+    return file;
+  }
+
+  public XSDSchema getSchema()
+  {
+    return schema;
+  }
+
+  public void setEditorName(String name)
+  {
+    editorName = name;
+  }
+ 
+  public String getName()
+  {
+    if (editorName != null)
+    {
+      return editorName;
+    }
+    return super.getName();
+  }
+  
+  public String getToolTipText()
+  {
+    if (schema != null)
+    {
+      String ns = schema.getTargetNamespace();
+      if (ns != null && ns.length() > 0)
+        return "Target Namespace: " + ns;
+      else
+        return "No Namespace";
+    }
+    return super.getToolTipText();
+  }
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/XSDMultiPageEditorContributor.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/XSDMultiPageEditorContributor.java
new file mode 100644
index 0000000..6eeaa05
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/XSDMultiPageEditorContributor.java
@@ -0,0 +1,157 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.gef.editparts.ZoomManager;
+import org.eclipse.gef.ui.actions.ActionRegistry;
+import org.eclipse.gef.ui.actions.ZoomComboContributionItem;
+import org.eclipse.gef.ui.actions.ZoomInRetargetAction;
+import org.eclipse.gef.ui.actions.ZoomOutRetargetAction;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.actions.ActionFactory;
+import org.eclipse.ui.ide.IDEActionFactory;
+import org.eclipse.ui.part.MultiPageEditorActionBarContributor;
+import org.eclipse.ui.part.MultiPageEditorPart;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.ui.texteditor.ITextEditorActionConstants;
+import org.eclipse.wst.xsd.editor.internal.actions.IXSDToolbarAction;
+
+/**
+ * Manages the installation/deinstallation of global actions for multi-page
+ * editors. Responsible for the redirection of global actions to the active
+ * editor. Multi-page contributor replaces the contributors for the individual
+ * editors in the multi-page editor.
+ */
+public class XSDMultiPageEditorContributor extends MultiPageEditorActionBarContributor
+{
+  private IEditorPart activeEditorPart;
+
+  /**
+   * Creates a multi-page contributor.
+   */
+  public XSDMultiPageEditorContributor()
+  {
+    super();
+  }
+
+  /**
+   * Returns the action registed with the given text editor.
+   * 
+   * @return IAction or null if editor is null.
+   */
+  protected IAction getAction(ITextEditor editor, String actionID)
+  {
+    return (editor == null ? null : editor.getAction(actionID));
+  }
+
+  /*
+   * (non-JavaDoc) Method declared in
+   * AbstractMultiPageEditorActionBarContributor.
+   */
+
+  public void setActivePage(IEditorPart part)
+  {
+    if (activeEditorPart == part)
+      return;
+
+    activeEditorPart = part;
+
+    IActionBars actionBars = getActionBars();
+
+    if (part != null)
+    {
+      Object adapter = part.getAdapter(ActionRegistry.class);
+      if (adapter instanceof ActionRegistry)
+      {
+        ActionRegistry registry = (ActionRegistry) adapter;
+        actionBars.setGlobalActionHandler(ActionFactory.UNDO.getId(), registry.getAction(ActionFactory.UNDO.getId()));
+        actionBars.setGlobalActionHandler(ActionFactory.REDO.getId(), registry.getAction(ActionFactory.REDO.getId()));
+        actionBars.updateActionBars();
+      }
+    }
+
+    if (actionBars != null)
+    {
+
+      ITextEditor editor = (part instanceof ITextEditor) ? (ITextEditor) part : null;
+
+      actionBars.setGlobalActionHandler(ActionFactory.DELETE.getId(), getAction(editor, ITextEditorActionConstants.DELETE));
+      actionBars.setGlobalActionHandler(ActionFactory.UNDO.getId(), getAction(editor, ITextEditorActionConstants.UNDO));
+      actionBars.setGlobalActionHandler(ActionFactory.REDO.getId(), getAction(editor, ITextEditorActionConstants.REDO));
+      actionBars.setGlobalActionHandler(ActionFactory.CUT.getId(), getAction(editor, ITextEditorActionConstants.CUT));
+      actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), getAction(editor, ITextEditorActionConstants.COPY));
+      actionBars.setGlobalActionHandler(ActionFactory.PASTE.getId(), getAction(editor, ITextEditorActionConstants.PASTE));
+      actionBars.setGlobalActionHandler(ActionFactory.SELECT_ALL.getId(), getAction(editor, ITextEditorActionConstants.SELECT_ALL));
+      actionBars.setGlobalActionHandler(ActionFactory.FIND.getId(), getAction(editor, ITextEditorActionConstants.FIND));
+      actionBars.setGlobalActionHandler(IDEActionFactory.BOOKMARK.getId(), getAction(editor, IDEActionFactory.BOOKMARK.getId()));
+
+      actionBars.updateActionBars();
+    }
+  }
+
+  public void setActiveEditor(IEditorPart part)
+  {
+    IEditorPart activeNestedEditor = null;
+    if (part instanceof MultiPageEditorPart)
+    {
+      activeNestedEditor = ((MultiPageEditorPart) part);
+    }
+    setActivePage(activeNestedEditor);
+    List list = XSDEditorPlugin.getPlugin().getXSDEditorConfiguration().getToolbarActions();
+    for (Iterator i = list.iterator(); i.hasNext(); )
+    {
+      ((IXSDToolbarAction)i.next()).setEditorPart(activeNestedEditor);
+    }
+  }
+
+  public void contributeToMenu(IMenuManager manager)
+  {
+    IMenuManager menu = new MenuManager("&XSD Editor");
+    manager.prependToGroup(IWorkbenchActionConstants.MB_ADDITIONS, menu);
+
+    // Add extension menu actions
+    List list = XSDEditorPlugin.getPlugin().getXSDEditorConfiguration().getToolbarActions();
+    for (Iterator i = list.iterator(); i.hasNext(); )
+    {
+      menu.add((IXSDToolbarAction)i.next());
+    }
+
+    menu.add((new ZoomInRetargetAction()));
+    menu.add((new ZoomOutRetargetAction()));
+
+    menu.updateAll(true);
+  }
+
+  public void contributeToToolBar(IToolBarManager manager)
+  {
+    manager.add(new Separator());
+    // Add extension toolbar actions
+    List list = XSDEditorPlugin.getPlugin().getXSDEditorConfiguration().getToolbarActions();
+    for (Iterator i = list.iterator(); i.hasNext(); )
+    {
+      manager.add((IXSDToolbarAction)i.next());
+    }
+
+    manager.add(new Separator());
+    String[] zoomStrings = new String[] { ZoomManager.FIT_ALL, ZoomManager.FIT_HEIGHT, ZoomManager.FIT_WIDTH };
+    manager.add(new ZoomComboContributionItem(getPage(), zoomStrings));
+  }
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/XSDSelectionMapper.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/XSDSelectionMapper.java
new file mode 100644
index 0000000..792e0e4
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/XSDSelectionMapper.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+
+public class XSDSelectionMapper implements ISelectionMapper
+{
+  public ISelection mapSelection(ISelection selection)
+  {
+    List list = new ArrayList();
+    if (selection instanceof StructuredSelection)
+    {  
+      StructuredSelection structuredSelection = (StructuredSelection)selection;
+      for (Iterator i = structuredSelection.iterator(); i.hasNext(); )
+      {
+        Object o = i.next();
+        if (o instanceof Adapter)
+        {
+          list.add(((Adapter)o).getTarget());
+        }  
+        else
+        {
+          list.add(o);
+        }  
+      }  
+    }
+    return new StructuredSelection(list);
+  }
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/XSDTabbedPropertySheetPage.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/XSDTabbedPropertySheetPage.java
new file mode 100644
index 0000000..d7a4f55
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/XSDTabbedPropertySheetPage.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+import org.eclipse.wst.xsd.adt.facade.IADTObjectListener;
+import org.eclipse.wst.xsd.editor.internal.adapters.XSDAdapterFactory;
+import org.eclipse.wst.xsd.editor.internal.adapters.XSDBaseAdapter;
+import org.eclipse.wst.xsd.editor.internal.adapters.XSDElementDeclarationAdapter;
+import org.eclipse.wst.xsd.editor.internal.adapters.XSDParticleAdapter;
+import org.eclipse.xsd.XSDConcreteComponent;
+import org.eclipse.xsd.XSDElementDeclaration;
+
+public class XSDTabbedPropertySheetPage extends TabbedPropertySheetPage implements IADTObjectListener
+{
+  XSDBaseAdapter oldSelection;
+  public XSDTabbedPropertySheetPage(ITabbedPropertySheetPageContributor tabbedPropertySheetPageContributor)
+  {
+    super(tabbedPropertySheetPageContributor);
+  }
+  
+  /* (non-Javadoc)
+   * @see org.eclipse.ui.ISelectionListener#selectionChanged(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+   */
+  public void selectionChanged(IWorkbenchPart part, ISelection selection) {
+
+      Object selected = ((StructuredSelection)selection).getFirstElement();
+      System.out.println(selected);
+      if (selected instanceof XSDBaseAdapter)
+      {
+        XSDBaseAdapter adapter = (XSDBaseAdapter)selected;
+        if (oldSelection != null)
+        {
+          oldSelection.unregisterListener(this);
+          if (oldSelection instanceof XSDElementDeclarationAdapter)
+          {
+            XSDElementDeclaration elem = (XSDElementDeclaration)((XSDElementDeclarationAdapter)oldSelection).getTarget();
+            Adapter adap = XSDAdapterFactory.getInstance().adapt(elem.getContainer());
+            if (adap instanceof XSDParticleAdapter)
+            {
+              XSDParticleAdapter particleAdapter = (XSDParticleAdapter)adap;
+              particleAdapter.unregisterListener(this);
+            }
+          }
+        }
+        if (adapter instanceof XSDElementDeclarationAdapter)
+        {
+          XSDElementDeclaration elem = (XSDElementDeclaration)((XSDElementDeclarationAdapter)adapter).getTarget();
+          Adapter adap = XSDAdapterFactory.getInstance().adapt(elem.getContainer());
+          if (adap instanceof XSDParticleAdapter)
+          {
+            XSDParticleAdapter particleAdapter = (XSDParticleAdapter)adap;
+            particleAdapter.registerListener(this);
+          }
+          if (elem.isElementDeclarationReference())
+          {
+            XSDElementDeclarationAdapter resolvedElementAdapter = (XSDElementDeclarationAdapter)XSDAdapterFactory.getInstance().adapt(elem.getResolvedElementDeclaration());
+            resolvedElementAdapter.registerListener(this);
+          }
+        }
+        adapter.registerListener(this);
+        oldSelection = adapter;
+        Object model = adapter.getTarget();
+        if (model instanceof XSDConcreteComponent)
+        {
+          selection = new StructuredSelection((XSDConcreteComponent)model);
+        }
+        super.selectionChanged(part, selection);
+        return;
+      }
+      super.selectionChanged(part, selection);
+  }
+  
+  public void propertyChanged(Object object, String property)
+  {
+    if (getCurrentTab() != null)
+    {
+      refresh();
+    }
+  }
+
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/XSDTypeReferenceEditManager.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/XSDTypeReferenceEditManager.java
new file mode 100644
index 0000000..f4c4777
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/XSDTypeReferenceEditManager.java
@@ -0,0 +1,151 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.wst.common.ui.internal.search.dialogs.ComponentSpecification;
+import org.eclipse.wst.common.ui.internal.search.dialogs.IComponentDescriptionProvider;
+import org.eclipse.wst.xsd.adt.edit.ComponentReferenceEditManager;
+import org.eclipse.wst.xsd.adt.edit.IComponentDialog;
+import org.eclipse.wst.xsd.editor.internal.dialogs.NewTypeDialog;
+import org.eclipse.wst.xsd.editor.internal.search.XSDSearchListDialogDelegate;
+import org.eclipse.wst.xsd.ui.common.commands.AddXSDComplexTypeDefinitionCommand;
+import org.eclipse.wst.xsd.ui.common.commands.AddXSDSimpleTypeDefinitionCommand;
+import org.eclipse.wst.xsd.ui.common.commands.UpdateTypeReferenceAndManageDirectivesCommand;
+import org.eclipse.wst.xsd.ui.common.commands.UpdateTypeReferenceCommand;
+import org.eclipse.wst.xsd.ui.internal.search.IXSDSearchConstants;
+import org.eclipse.xsd.XSDConcreteComponent;
+import org.eclipse.xsd.XSDSchema;
+import org.eclipse.xsd.XSDTypeDefinition;
+import org.eclipse.xsd.util.XSDConstants;
+
+public class XSDTypeReferenceEditManager implements ComponentReferenceEditManager
+{  
+  protected IFile currentFile;
+  protected XSDSchema[] schemas;
+  
+  public XSDTypeReferenceEditManager(IFile currentFile, XSDSchema[] schemas)
+  {
+    this.currentFile = currentFile;
+    this.schemas = schemas;
+  }
+  
+  public void addToHistory(ComponentSpecification component)
+  {
+    // TODO (cs) implement me!    
+  }
+
+  public IComponentDialog getBrowseDialog()
+  {
+    //XSDSetExistingTypeDialog dialog = new XSDSetExistingTypeDialog(currentFile, schemas);
+    //return dialog;
+    XSDSearchListDialogDelegate dialogDelegate = new XSDSearchListDialogDelegate(XSDSearchListDialogDelegate.TYPE_META_NAME, currentFile, schemas);
+    return dialogDelegate;
+  }
+
+  public IComponentDescriptionProvider getComponentDescriptionProvider()
+  {
+    // TODO Auto-generated method stub
+    return null;
+  }
+
+  public ComponentSpecification[] getHistory()
+  {
+    // TODO (cs) implement this properly - should this history be global or local to each editor?
+    // This is something we should play around with ourselves to see what feels right.
+    //
+    List list = new ArrayList();
+    ComponentSpecification result[] = new ComponentSpecification[list.size()];
+    list.toArray(result);
+    return result;
+  }
+
+  public IComponentDialog getNewDialog()
+  {
+    return new NewTypeDialog();
+  }
+
+  public ComponentSpecification[] getQuickPicks()
+  {
+    // TODO (cs) implement this properly - we should be providing a list of the 
+    // most 'common' built in schema types here
+    // I believe Trung will be working on a perference page to give us this list
+    // for now let's hard code some values
+    //
+    List list = new ArrayList();
+    list.add(new ComponentSpecification(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001, "boolean", null));
+    list.add(new ComponentSpecification(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001, "date", null));
+    list.add(new ComponentSpecification(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001, "dateTime", null));    
+    list.add(new ComponentSpecification(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001, "double", null));
+    list.add(new ComponentSpecification(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001, "float", null)); 
+    list.add(new ComponentSpecification(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001, "hexBinary", null));
+    list.add(new ComponentSpecification(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001, "int", null));    
+    list.add(new ComponentSpecification(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001, "string", null));
+    list.add(new ComponentSpecification(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001, "time", null));       
+    ComponentSpecification result[] = new ComponentSpecification[list.size()];
+    list.toArray(result);
+    return result;
+  }
+  
+
+  public void modifyComponentReference(Object referencingObject, ComponentSpecification component)
+  {
+    XSDConcreteComponent concreteComponent = null;
+    if (referencingObject instanceof Adapter)
+    {
+      Adapter adpater = (Adapter)referencingObject;
+      if (adpater.getTarget() instanceof XSDConcreteComponent)
+      {
+        concreteComponent = (XSDConcreteComponent)adpater.getTarget();
+      }
+    }
+    else if (referencingObject instanceof XSDConcreteComponent)
+    {
+      concreteComponent = (XSDConcreteComponent) referencingObject;
+    }
+    
+    if (concreteComponent != null)
+    {
+      if (component.isNew())
+      {  
+        XSDTypeDefinition td = null;
+        if (component.getMetaName() == IXSDSearchConstants.COMPLEX_TYPE_META_NAME)
+        {  
+          AddXSDComplexTypeDefinitionCommand command = new AddXSDComplexTypeDefinitionCommand("Add Complex Type", concreteComponent.getSchema());
+          command.setNameToAdd(component.getName());
+          command.execute();
+          td = command.getCreatedComplexType();
+        }
+        else
+        {
+          AddXSDSimpleTypeDefinitionCommand command = new AddXSDSimpleTypeDefinitionCommand("Add Simple Type", concreteComponent.getSchema());
+          command.setNameToAdd(component.getName());
+          command.execute();
+          td = command.getCreatedSimpleType();
+        }  
+        if (td != null)
+        {
+          Command command = new UpdateTypeReferenceCommand(concreteComponent, td);
+          command.execute();
+        }  
+      }  
+      else
+      {  
+        Command command = new UpdateTypeReferenceAndManageDirectivesCommand(concreteComponent, component.getName(), component.getQualifier(), component.getFile());
+        command.execute();
+      }  
+    }  
+  }
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/actions/IXSDToolbarAction.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/actions/IXSDToolbarAction.java
new file mode 100644
index 0000000..d5c6ca8
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/actions/IXSDToolbarAction.java
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor.internal.actions;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.ui.IEditorPart;
+
+public interface IXSDToolbarAction extends IAction
+{
+  public void setEditorPart(IEditorPart editorPart);
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/CategoryAdapter.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/CategoryAdapter.java
new file mode 100644
index 0000000..6ba89c3
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/CategoryAdapter.java
@@ -0,0 +1,143 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor.internal.adapters;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.wst.xsd.adt.design.editparts.model.IActionProvider;
+import org.eclipse.wst.xsd.adt.facade.IADTObjectListener;
+import org.eclipse.wst.xsd.adt.outline.ITreeElement;
+import org.eclipse.wst.xsd.ui.common.actions.AddXSDAttributeDeclarationAction;
+import org.eclipse.wst.xsd.ui.common.actions.AddXSDAttributeGroupDefinitionAction;
+import org.eclipse.wst.xsd.ui.common.actions.AddXSDComplexTypeDefinitionAction;
+import org.eclipse.wst.xsd.ui.common.actions.AddXSDElementAction;
+import org.eclipse.wst.xsd.ui.common.actions.AddXSDModelGroupDefinitionAction;
+import org.eclipse.wst.xsd.ui.common.actions.AddXSDSimpleTypeDefinitionAction;
+import org.eclipse.xsd.XSDSchema;
+
+public class CategoryAdapter extends XSDBaseAdapter implements IActionProvider, IADTObjectListener
+{
+  protected String text;
+  protected Image image;
+  protected Object parent;
+  protected int groupType;
+  Collection children;
+  XSDSchema xsdSchema;
+
+  public CategoryAdapter(String label, Image image, Collection children, XSDSchema xsdSchema, int groupType)
+  {
+    this.text = label;
+    this.image = image;
+    this.parent = xsdSchema;
+    this.xsdSchema = xsdSchema;
+    this.target = xsdSchema;
+    this.children = children;
+    this.groupType = groupType;
+  }
+
+  public final static int ATTRIBUTES = 1;
+  public final static int ELEMENTS = 2;
+  public final static int TYPES = 3;
+  public final static int GROUPS = 5;
+  public final static int DIRECTIVES = 6;
+  public final static int NOTATIONS = 7;
+  public final static int ATTRIBUTE_GROUPS = 8;
+  public final static int IDENTITY_CONSTRAINTS = 9;
+  public final static int ANNOTATIONS = 10;
+
+  public XSDSchema getXSDSchema()
+  {
+    return xsdSchema;
+  }
+
+  public int getGroupType()
+  {
+    return groupType;
+  }
+
+  public Image getImage()
+  {
+    return image;
+  }
+
+  public String getText()
+  {
+    return text;
+  }
+
+  public ITreeElement[] getChildren()
+  {
+    return (ITreeElement[]) children.toArray(new ITreeElement[0]);
+  }
+
+  public void setChildren(Collection list)
+  {
+    children = list;
+  }
+
+  public Object getParent(Object element)
+  {
+    return xsdSchema;
+  }
+
+  public boolean hasChildren(Object element)
+  {
+    return true;
+  }
+
+  public void inputChanged(Viewer viewer, Object oldInput, Object newInput)
+  {
+
+  }
+
+  public String[] getActions(Object object)
+  {    
+    Collection actionIDs = new ArrayList();
+    
+    switch (groupType)
+    {
+      case TYPES : {
+        actionIDs.add(AddXSDComplexTypeDefinitionAction.ID);
+        actionIDs.add(AddXSDSimpleTypeDefinitionAction.ID);
+        break;
+      }
+      case ELEMENTS : {
+        actionIDs.add(AddXSDElementAction.ID);
+        break;
+      }
+      case GROUPS : {
+        actionIDs.add(AddXSDModelGroupDefinitionAction.MODELGROUPDEFINITION_ID);
+        break;
+      }
+      case ATTRIBUTES : {
+        actionIDs.add(AddXSDAttributeDeclarationAction.ID);
+        break;
+      }
+      case ATTRIBUTE_GROUPS : {
+        actionIDs.add(AddXSDAttributeGroupDefinitionAction.ID);
+        break;
+      }
+      case DIRECTIVES : {
+        break;
+      }
+    }
+    return (String [])actionIDs.toArray(new String[0]);
+  }
+  
+  public void propertyChanged(Object object, String property)
+  {
+    if (getText().equals(property))
+      notifyListeners(this, property);
+  }
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDAdapterFactory.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDAdapterFactory.java
new file mode 100644
index 0000000..7273e03
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDAdapterFactory.java
@@ -0,0 +1,143 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor.internal.adapters;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.wst.xsd.editor.XSDEditorPlugin;
+import org.eclipse.xsd.XSDAttributeDeclaration;
+import org.eclipse.xsd.XSDAttributeGroupDefinition;
+import org.eclipse.xsd.XSDAttributeUse;
+import org.eclipse.xsd.XSDComplexTypeDefinition;
+import org.eclipse.xsd.XSDElementDeclaration;
+import org.eclipse.xsd.XSDModelGroup;
+import org.eclipse.xsd.XSDModelGroupDefinition;
+import org.eclipse.xsd.XSDParticle;
+import org.eclipse.xsd.XSDSchema;
+import org.eclipse.xsd.XSDSchemaDirective;
+import org.eclipse.xsd.XSDSimpleTypeDefinition;
+import org.eclipse.xsd.XSDWildcard;
+import org.eclipse.xsd.util.XSDSwitch;
+
+public class XSDAdapterFactory extends AdapterFactoryImpl
+{
+  protected static XSDAdapterFactory instance;
+  
+  public static XSDAdapterFactory getInstance()
+  {
+    if (instance == null)
+    {
+      // first use the one defined by the configuration
+      instance = XSDEditorPlugin.getPlugin().getXSDEditorConfiguration().getAdapterFactory();
+      // if there isn't one, then use the default
+      if (instance == null)
+        instance = new XSDAdapterFactory();
+    }
+    return instance;
+  }
+  
+  public Adapter createAdapter(Notifier target)
+  {
+    XSDSwitch xsdSwitch = new XSDSwitch()
+    {
+      public Object caseXSDSchemaDirective(XSDSchemaDirective object)
+      {
+        return new XSDSchemaDirectiveAdapter();
+      }
+      
+      public Object caseXSDWildcard(XSDWildcard object)
+      {
+        return new XSDWildcardAdapter();
+      }
+      
+      public Object caseXSDAttributeGroupDefinition(XSDAttributeGroupDefinition object)
+      {
+        return new XSDAttributeGroupDefinitionAdapter();
+      }
+
+      public Object caseXSDModelGroupDefinition(XSDModelGroupDefinition object)
+      {
+        return new XSDModelGroupDefinitionAdapter();
+      }
+      
+      public Object caseXSDAttributeDeclaration(XSDAttributeDeclaration object)
+      {
+        return new XSDAttributeDeclarationAdapter();
+      }
+
+      public Object caseXSDAttributeUse(XSDAttributeUse object)
+      {
+        return new XSDAttributeUseAdapter();
+      }
+      
+      public Object caseXSDParticle(XSDParticle object)
+      {
+        return new XSDParticleAdapter();
+      }
+
+      public Object caseXSDElementDeclaration(XSDElementDeclaration object)
+      {
+        return new XSDElementDeclarationAdapter();
+      }
+      
+      public Object caseXSDSimpleTypeDefinition(XSDSimpleTypeDefinition object)
+      {
+        // TODO Auto-generated method stub
+        return new XSDSimpleTypeDefinitionAdapter();
+      }
+      
+      public Object caseXSDComplexTypeDefinition(XSDComplexTypeDefinition object)
+      {
+        // we don't like exposing the 'anyType' type as a visible complex type
+        // so we adapt it in a specialized way so that it's treated as simple type
+        // that way it doesn't show up as a reference from a field
+        //
+        if ("anyType".equals(object.getName()))
+        {
+          return new XSDAnyTypeDefinitionAdapter(); 
+        }  
+        else
+        {             
+          return new XSDComplexTypeDefinitionAdapter();
+        }  
+      }
+      
+      public Object caseXSDModelGroup(XSDModelGroup object)
+      {
+        return new XSDModelGroupAdapter();
+      }
+
+      public Object caseXSDSchema(XSDSchema object)
+      {
+        return new XSDSchemaAdapter();
+      }
+    };
+    Object o = xsdSwitch.doSwitch((EObject) target);
+    Adapter result = null;
+    if (o instanceof Adapter)
+    {
+      result = (Adapter) o;
+    }
+    else
+    {
+      System.out.println(target);
+      Thread.dumpStack();
+    }
+    return result;
+  }
+
+  public Adapter adapt(Notifier target)
+  {
+    return adapt(target, this);
+  }
+}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDAnyTypeDefinitionAdapter.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDAnyTypeDefinitionAdapter.java
new file mode 100644
index 0000000..1a07e04
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDAnyTypeDefinitionAdapter.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor.internal.adapters;
+
+public class XSDAnyTypeDefinitionAdapter extends XSDTypeDefinitionAdapter
+{
+  public boolean isComplexType()
+  {
+    return false;
+  }
+
+  public boolean isFocusAllowed()
+  {
+    return false;
+  } 
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDAttributeDeclarationAdapter.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDAttributeDeclarationAdapter.java
new file mode 100644
index 0000000..5c1333b
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDAttributeDeclarationAdapter.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor.internal.adapters;
+
+import org.eclipse.xsd.XSDAttributeDeclaration;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.wst.xsd.adt.design.editparts.model.IActionProvider;
+import org.eclipse.wst.xsd.adt.facade.IModel;
+import org.eclipse.xsd.XSDSchema;
+
+public class XSDAttributeDeclarationAdapter extends XSDBaseAttributeAdapter implements IActionProvider
+{
+  protected XSDAttributeDeclaration getXSDAttributeDeclaration()
+  {
+    return (XSDAttributeDeclaration)target;
+  }
+ 
+  protected XSDAttributeDeclaration getResolvedXSDAttributeDeclaration()
+  {
+    return getXSDAttributeDeclaration().getResolvedAttributeDeclaration();
+  }
+  
+  public boolean isGlobal()
+  {
+    return getXSDAttributeDeclaration().eContainer() instanceof XSDSchema;
+  }
+
+  public IModel getModel()
+  {
+    Adapter adapter = XSDAdapterFactory.getInstance().adapt(getXSDAttributeDeclaration().getSchema());
+    return (IModel)adapter;
+  }  
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDAttributeGroupDefinitionAdapter.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDAttributeGroupDefinitionAdapter.java
new file mode 100644
index 0000000..105af1b
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDAttributeGroupDefinitionAdapter.java
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor.internal.adapters;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.wst.xsd.adt.actions.BaseSelectionAction;
+import org.eclipse.wst.xsd.adt.design.editparts.model.IActionProvider;
+import org.eclipse.wst.xsd.adt.facade.IModel;
+import org.eclipse.wst.xsd.adt.facade.IStructure;
+import org.eclipse.wst.xsd.adt.outline.ITreeElement;
+import org.eclipse.wst.xsd.editor.XSDEditorPlugin;
+import org.eclipse.wst.xsd.ui.common.actions.AddXSDAttributeDeclarationAction;
+import org.eclipse.wst.xsd.ui.common.actions.DeleteXSDConcreteComponentAction;
+import org.eclipse.xsd.XSDAttributeGroupDefinition;
+import org.eclipse.xsd.XSDWildcard;
+
+public class XSDAttributeGroupDefinitionAdapter extends XSDBaseAdapter implements IStructure, IActionProvider
+{
+
+  public XSDAttributeGroupDefinitionAdapter()
+  {
+    super();
+  }
+
+  public XSDAttributeGroupDefinition getXSDAttributeGroupDefinition()
+  {
+    return (XSDAttributeGroupDefinition) target;
+  }
+
+  public Image getImage()
+  {
+    XSDAttributeGroupDefinition xsdAttributeGroupDefinition = (XSDAttributeGroupDefinition) target;
+    if (xsdAttributeGroupDefinition.isAttributeGroupDefinitionReference())
+    {
+      return XSDEditorPlugin.getXSDImage("icons/XSDAttributeGroupRef.gif");
+    }
+    else
+    {
+      return XSDEditorPlugin.getXSDImage("icons/XSDAttributeGroup.gif");
+    }
+  }
+
+  public String getText()
+  {
+    XSDAttributeGroupDefinition xsdAttributeGroupDefinition = (XSDAttributeGroupDefinition) target;
+    String result = xsdAttributeGroupDefinition.isAttributeGroupDefinitionReference() ? xsdAttributeGroupDefinition.getQName() : xsdAttributeGroupDefinition.getName();
+    return result == null ? "'absent'" : result;
+  }
+
+  public ITreeElement[] getChildren()
+  {
+    XSDAttributeGroupDefinition xsdAttributeGroup = (XSDAttributeGroupDefinition) target;
+    List list = new ArrayList();
+    list.addAll(xsdAttributeGroup.getContents());
+    XSDWildcard wildcard = xsdAttributeGroup.getAttributeWildcardContent();
+    if (wildcard != null)
+    {
+      list.add(wildcard);
+    }
+    List adapterList = new ArrayList();
+    populateAdapterList(list, adapterList);
+    return (ITreeElement[]) adapterList.toArray(new ITreeElement[0]);
+  }
+  
+  public String[] getActions(Object object)
+  {
+    List list = new ArrayList();
+    list.add(AddXSDAttributeDeclarationAction.ID);
+    list.add(BaseSelectionAction.SEPARATOR_ID);
+    list.add(DeleteXSDConcreteComponentAction.DELETE_XSD_COMPONENT_ID);
+    return (String [])list.toArray(new String[0]);
+  }
+
+  public Command getAddNewFieldCommand(String fieldKind)
+  {
+    // TODO Auto-generated method stub
+    return null;
+  }
+
+  public Command getDeleteCommand()
+  {
+    // TODO Auto-generated method stub
+    return null;
+  }
+
+  public List getFields()
+  {
+    // TODO (cs) ... review this    
+    ITreeElement[] chidlren = getChildren();
+    return Arrays.asList(chidlren);
+  }
+
+  public IModel getModel()
+  {
+    Adapter adapter = XSDAdapterFactory.getInstance().adapt(getXSDAttributeGroupDefinition().getSchema());
+    return (IModel)adapter;
+  }
+
+  public String getName()
+  {
+    // TODO (cs) ... review this
+    return getText();
+  }
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDAttributeUseAdapter.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDAttributeUseAdapter.java
new file mode 100644
index 0000000..d0b6af5
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDAttributeUseAdapter.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor.internal.adapters;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.wst.xsd.adt.design.editparts.model.IActionProvider;
+import org.eclipse.wst.xsd.adt.facade.IModel;
+import org.eclipse.xsd.XSDAttributeDeclaration;
+import org.eclipse.xsd.XSDAttributeUse;
+
+public class XSDAttributeUseAdapter extends XSDBaseAttributeAdapter implements IActionProvider
+{
+  protected XSDAttributeDeclaration getXSDAttributeDeclaration()
+  {
+    return getXSDAttributeUse().getAttributeDeclaration();
+  }
+
+  protected XSDAttributeDeclaration getResolvedXSDAttributeDeclaration()
+  {
+    return getXSDAttributeDeclaration().getResolvedAttributeDeclaration();
+  }
+  
+  protected XSDAttributeUse getXSDAttributeUse()
+  {
+    return (XSDAttributeUse)target;
+  }
+
+  public XSDAttributeUseAdapter()
+  {
+    super();
+  }
+
+  public String getText()
+  {
+    return getTextForAttributeUse(getXSDAttributeUse(), true);
+  }
+
+  public String getTextForAttributeUse(XSDAttributeUse attributeUse, boolean showType)
+  {
+    XSDAttributeDeclaration ad = attributeUse.getAttributeDeclaration();
+      
+    StringBuffer result  = new StringBuffer();
+    result.append(getTextForAttribute(ad, showType));
+    /*
+    if (xsdAttributeUse.isSetConstraint())
+    {
+      if (result.length() != 0)
+      {
+        result.append("  ");
+      }
+      result.append('<');
+      result.append(xsdAttributeUse.getConstraint());
+      result.append("=\"");
+      result.append(xsdAttributeUse.getLexicalValue());
+      result.append("\">");
+    }
+    */
+    return result.toString();
+  }
+  
+  public boolean isGlobal()
+  {
+    return false;
+  }
+
+  public IModel getModel()
+  {
+    Adapter adapter = XSDAdapterFactory.getInstance().adapt(getXSDAttributeDeclaration().getSchema());
+    return (IModel)adapter;
+  }
+}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDBaseAdapter.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDBaseAdapter.java
new file mode 100644
index 0000000..cbe5ee6
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDBaseAdapter.java
@@ -0,0 +1,199 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor.internal.adapters;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.wst.xml.core.internal.document.ElementImpl;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
+import org.eclipse.wst.xsd.adt.facade.IADTObject;
+import org.eclipse.wst.xsd.adt.facade.IADTObjectListener;
+import org.eclipse.wst.xsd.adt.facade.IComplexType;
+import org.eclipse.wst.xsd.adt.outline.ITreeElement;
+import org.eclipse.xsd.XSDComplexTypeDefinition;
+import org.eclipse.xsd.XSDConcreteComponent;
+import org.eclipse.xsd.XSDSchema;
+import org.w3c.dom.Element;
+
+public class XSDBaseAdapter extends AdapterImpl implements IADTObject, ITreeElement
+{  
+  protected List listenerList = new ArrayList();
+  
+  public boolean isAdapterForType(Object type)
+  {
+    return type == XSDAdapterFactory.getInstance();
+  }
+  
+  public void populateAdapterList(List notifierList, List adapterList)
+  {
+    for (Iterator i = notifierList.iterator(); i.hasNext(); )
+    {
+      Object obj = i.next();
+      if (obj instanceof XSDConcreteComponent)
+      {
+        XSDConcreteComponent component = (XSDConcreteComponent)obj;
+        adapterList.add(XSDAdapterFactory.getInstance().adapt(component));
+      }
+      else
+      {
+        adapterList.add(obj);
+      }
+    }
+  }  
+  
+  public void registerListener(IADTObjectListener listener)
+  {
+    if (!listenerList.contains(listener))
+    {
+      listenerList.add(listener);
+    }
+  }
+  
+  public void unregisterListener(IADTObjectListener listener)
+  {
+    listenerList.remove(listener);
+  }
+  
+  public void notifyChanged(Notification msg)
+  {
+    super.notifyChanged(msg);
+    notifyListeners(this, null);
+  }
+  
+  protected void notifyListeners(Object changedObject, String property)
+  {
+    List clonedListenerList = new ArrayList();
+    clonedListenerList.addAll(listenerList);
+    for (Iterator i = clonedListenerList.iterator(); i.hasNext(); )
+    {
+      IADTObjectListener listener = (IADTObjectListener)i.next();
+      listener.propertyChanged(this, property);
+    }      
+  }
+    
+  public ITreeElement[] getChildren()
+  {
+    return null;
+  }
+  
+  public Image getImage()
+  {
+    return null;
+  }
+  
+  public String getText()
+  {
+    return "";
+  }
+  
+  public ITreeElement getParent()
+  {
+    return null;
+  }
+  
+  public boolean hasChildren()
+  {
+    if (getChildren() != null)
+    {
+      return getChildren().length > 0;
+    }
+    return false;
+  }
+  
+
+  /**
+   * Implements IField getContainerType.  Get parent Complex Type containing the field
+   * @return IComplexType
+   */
+  public IComplexType getContainerType()
+  {
+    XSDConcreteComponent xsdConcreteComponent = (XSDConcreteComponent) target;
+    XSDConcreteComponent parent = null;
+    XSDComplexTypeDefinition ct = null;
+    for (parent = xsdConcreteComponent.getContainer(); parent != null; )
+    {
+      if (parent instanceof XSDComplexTypeDefinition)
+      {
+        ct = (XSDComplexTypeDefinition)parent;
+        break;
+      }
+      parent = parent.getContainer();
+    }
+    if (ct != null)
+    {
+      return (IComplexType)XSDAdapterFactory.getInstance().adapt(ct);
+    }
+    return null;
+  }
+  
+  public boolean isReadOnly()
+  {
+    XSDSchema xsdSchema = null;
+    try
+    {
+      IEditorPart editorPart = null;
+      IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+      if (window != null)
+      {
+        IWorkbenchPage page = window.getActivePage();
+        if (page != null)
+        {
+          editorPart = page.getActiveEditor();
+        }
+      }
+      if (target instanceof XSDConcreteComponent)
+      {
+        xsdSchema = ((XSDConcreteComponent)target).getSchema();
+      }
+      if (editorPart == null)
+      {
+        return fallBackCheckIsReadOnly();
+      }
+      
+      XSDSchema editorSchema = (XSDSchema)editorPart.getAdapter(XSDSchema.class);
+      if (xsdSchema != null && xsdSchema == editorSchema)
+      {
+        return false;
+      }
+      else
+      {
+        return fallBackCheckIsReadOnly();
+      }
+    }
+    catch(Exception e)
+    {
+
+    }
+    return true;
+  }
+  
+  private boolean fallBackCheckIsReadOnly()
+  {
+    Element element = ((XSDConcreteComponent)target).getElement();
+    if (element instanceof IDOMNode
+        || element instanceof ElementImpl)
+    {
+       return false;
+    }
+    return true;
+  }
+
+
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDBaseAttributeAdapter.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDBaseAttributeAdapter.java
new file mode 100644
index 0000000..aa3e00f
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDBaseAttributeAdapter.java
@@ -0,0 +1,188 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor.internal.adapters;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.wst.xsd.adt.actions.BaseSelectionAction;
+import org.eclipse.wst.xsd.adt.actions.ShowPropertiesViewAction;
+import org.eclipse.wst.xsd.adt.facade.IField;
+import org.eclipse.wst.xsd.adt.facade.IModel;
+import org.eclipse.wst.xsd.adt.facade.IType;
+import org.eclipse.wst.xsd.editor.XSDEditorPlugin;
+import org.eclipse.wst.xsd.ui.common.actions.AddXSDAttributeDeclarationAction;
+import org.eclipse.wst.xsd.ui.common.actions.DeleteXSDConcreteComponentAction;
+import org.eclipse.wst.xsd.ui.common.commands.DeleteCommand;
+import org.eclipse.wst.xsd.ui.common.commands.UpdateNameCommand;
+import org.eclipse.xsd.XSDAttributeDeclaration;
+import org.eclipse.xsd.XSDTypeDefinition;
+
+// a base adapter for reuse by an AttributeUse and AttributeDeclaration
+//
+public abstract class XSDBaseAttributeAdapter extends XSDBaseAdapter implements IField
+{
+  protected abstract XSDAttributeDeclaration getXSDAttributeDeclaration();
+  protected abstract XSDAttributeDeclaration getResolvedXSDAttributeDeclaration();
+
+  public XSDBaseAttributeAdapter()
+  {
+    super();
+  }
+
+  public String[] getActions(Object object)
+  {
+    List list = new ArrayList();
+    list.add(AddXSDAttributeDeclarationAction.ID);
+    list.add(BaseSelectionAction.SEPARATOR_ID);
+    list.add(DeleteXSDConcreteComponentAction.DELETE_XSD_COMPONENT_ID);
+
+    list.add(BaseSelectionAction.SEPARATOR_ID);
+    list.add(ShowPropertiesViewAction.ID);
+    return (String[]) list.toArray(new String[0]);
+  }
+
+  public Command getDeleteCommand()
+  {
+    return new DeleteCommand("", getXSDAttributeDeclaration());
+  }
+
+  public String getKind()
+  {
+    return "attribute";
+  }
+
+  public int getMaxOccurs()
+  {
+    // TODO Auto-generated method stub
+    return -3;
+  }
+
+  public int getMinOccurs()
+  {
+    // TODO Auto-generated method stub
+    return -3;
+  }
+
+  public String getName()
+  {
+    XSDAttributeDeclaration resolvedAttributeDeclaration = getResolvedXSDAttributeDeclaration();
+    String name = resolvedAttributeDeclaration.getName();
+    return (name == null) ? "" : name;
+  }
+
+  public IType getType()
+  {
+    XSDTypeDefinition td = getResolvedXSDAttributeDeclaration().getTypeDefinition();
+    return (td != null) ? (IType) XSDAdapterFactory.getInstance().adapt(td) : null;
+  }
+
+  public String getTypeName()
+  {
+    XSDTypeDefinition td = getResolvedXSDAttributeDeclaration().getTypeDefinition();
+    return (td != null) ? td.getName() : "(no type defined)";
+  }
+
+  public String getTypeNameQualifier()
+  {
+    // TODO Auto-generated method stub
+    return null;
+  }
+
+  public Command getUpdateMaxOccursCommand(int maxOccurs)
+  {
+    // TODO Auto-generated method stub
+    return null;
+  }
+
+  public Command getUpdateMinOccursCommand(int minOccurs)
+  {
+    // TODO Auto-generated method stub
+    return null;
+  }
+
+  public Command getUpdateNameCommand(String name)
+  {
+    return new UpdateNameCommand("Update Name", getResolvedXSDAttributeDeclaration(), name);
+  }
+
+  public Command getUpdateTypeNameCommand(String typeName, String quailifier)
+  {
+    // TODO Auto-generated method stub
+    return null;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.eclipse.wst.xsd.adt.outline.ITreeElement#getImage()
+   */
+  public Image getImage()
+  {
+    XSDAttributeDeclaration xsdAttributeDeclaration = getXSDAttributeDeclaration();  // don't want the resolved attribute
+    if (xsdAttributeDeclaration.isAttributeDeclarationReference())
+    {
+      return XSDEditorPlugin.getXSDImage("icons/XSDAttributeRef.gif");
+    }
+    else
+    {
+      return XSDEditorPlugin.getXSDImage("icons/XSDAttribute.gif");
+    }
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.eclipse.wst.xsd.adt.outline.ITreeElement#getText()
+   */
+  public String getText()
+  {
+    return getTextForAttribute(getResolvedXSDAttributeDeclaration(), true);
+  }
+
+  public String getTextForAttribute(XSDAttributeDeclaration ad, boolean showType)
+  {
+    ad = ad.getResolvedAttributeDeclaration();
+    String name = ad.getName();
+    StringBuffer result = new StringBuffer();
+    if (name == null)
+    {
+      result.append("'absent'");
+    }
+    else
+    {
+      result.append(name);
+    }
+    if (ad.getAnonymousTypeDefinition() == null && ad.getTypeDefinition() != null)
+    {
+      result.append(" : ");
+      // result.append(resolvedAttributeDeclaration.getTypeDefinition().getQName(xsdAttributeDeclaration));
+      result.append(ad.getTypeDefinition().getName());
+    }
+    return result.toString();
+  }
+
+  public boolean isGlobal()
+  {
+    return false;
+  }
+  
+  public IModel getModel()
+  {
+    Adapter adapter = XSDAdapterFactory.getInstance().adapt(getXSDAttributeDeclaration().getSchema());
+    return (IModel)adapter;
+  }  
+
+}
+
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDChildUtility.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDChildUtility.java
new file mode 100644
index 0000000..53a3d31
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDChildUtility.java
@@ -0,0 +1,286 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor.internal.adapters;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xsd.XSDAttributeUse;
+import org.eclipse.xsd.XSDComplexTypeDefinition;
+import org.eclipse.xsd.XSDElementDeclaration;
+import org.eclipse.xsd.XSDModelGroup;
+import org.eclipse.xsd.XSDModelGroupDefinition;
+import org.eclipse.xsd.XSDParticle;
+import org.eclipse.xsd.XSDSchema;
+import org.eclipse.xsd.XSDTypeDefinition;
+import org.eclipse.xsd.XSDWildcard;
+import org.eclipse.xsd.util.XSDSwitch;
+              
+
+public class XSDChildUtility
+{              
+  static public List getModelChildren(Object model)
+  {
+    XSDChildVisitor visitor = new XSDChildVisitor(model);
+    visitor.visitXSDObject(model);
+    return visitor.list;
+  }
+
+  static public List getImmediateDerivedTypes(XSDComplexTypeDefinition complexType)
+  {
+    ArrayList typesDerivedFrom = new ArrayList();
+
+    // A handy convenience method quickly gets all 
+    // typeDefinitions within our schema; note that 
+    // whether or not this returns types in included, 
+    // imported, or redefined schemas is subject to change
+    List typedefs = complexType.getSchema().getTypeDefinitions();
+
+    for (Iterator iter = typedefs.iterator(); iter.hasNext(); )
+    {
+      XSDTypeDefinition typedef = (XSDTypeDefinition)iter.next();
+      // Walk the baseTypes from this typedef seeing if any 
+      // of them match the requested one
+      if (complexType.equals(typedef.getBaseType()))
+      {
+        // We found it, return the original one and continue
+        typesDerivedFrom.add(typedef);
+      }
+    }
+    return typesDerivedFrom;
+  }
+  // TODO... use the XSDVisitor defined in xsdeditor.util instead
+  //          
+  public static class XSDChildVisitor extends XSDVisitor
+  {
+    Object root;
+    List list = new ArrayList();
+
+    public XSDChildVisitor(Object root)
+    {
+      this.root = root;
+    }                  
+
+    public void visitXSDModelGroup(XSDModelGroup xsdModelGroup)
+    {
+      if (xsdModelGroup != root)
+      {
+        list.add(xsdModelGroup); 
+      }                         
+      else
+      {
+        super.visitXSDModelGroup(xsdModelGroup);
+      }
+    }
+
+    public void visitXSDModelGroupDefinition(XSDModelGroupDefinition xsdModelGroupDefinition)
+    {
+      if (xsdModelGroupDefinition != root)
+      {
+        list.add(xsdModelGroupDefinition);
+      }                         
+      else
+      {
+        super.visitXSDModelGroupDefinition(xsdModelGroupDefinition);
+      }
+    }
+
+    public void visitXSDElementDeclaration(XSDElementDeclaration xsdElementDeclaration)
+    {
+      if (xsdElementDeclaration != root)
+      {
+        list.add(xsdElementDeclaration);
+        
+      }                         
+      else
+      {
+        super.visitXSDElementDeclaration(xsdElementDeclaration);
+      }
+    }
+
+    public void visitXSDComplexTypeDefinition(XSDComplexTypeDefinition xsdComplexTypeDefinition)
+    {
+      if (xsdComplexTypeDefinition != root)
+      {                                    
+        if (xsdComplexTypeDefinition.getName() != null || getModelChildren(xsdComplexTypeDefinition).size() > 0)
+        {
+          list.add(xsdComplexTypeDefinition);
+        }
+      }                         
+      else
+      {
+        super.visitXSDComplexTypeDefinition(xsdComplexTypeDefinition);
+      }
+    }    
+
+    public void visitXSDWildcard(XSDWildcard xsdWildCard)
+    {
+      if (xsdWildCard != root)
+      {                                    
+        list.add(xsdWildCard);        
+      }                         
+      else
+      {
+        super.visitXSDWildcard(xsdWildCard);
+      }
+    }
+  }
+               
+
+  public static class XSDVisitor
+  { 
+    int indent = 0;
+                 
+    public void visitXSDObject(Object object)
+    {           
+      if (object == null)
+        return;
+
+      XSDSwitch theSwitch = new XSDSwitch()
+      {   
+        public Object caseXSDComplexTypeDefinition(XSDComplexTypeDefinition object)
+        {
+          visitXSDComplexTypeDefinition(object);
+          return null;
+        } 
+
+        public Object caseXSDAttributeUse(XSDAttributeUse object)
+        {
+          visitXSDAttributeUse(object);
+          return null;
+        }
+
+        public Object caseXSDElementDeclaration(XSDElementDeclaration object)
+        {
+          visitXSDElementDeclaration(object);
+          return null;
+        }
+
+        public Object caseXSDModelGroupDefinition(XSDModelGroupDefinition object)
+        {
+          visitXSDModelGroupDefinition(object);
+          return super.caseXSDModelGroupDefinition(object);
+        }
+
+        public Object caseXSDModelGroup(XSDModelGroup object)
+        {
+          visitXSDModelGroup(object);
+          return super.caseXSDModelGroup(object);
+        }
+
+        public Object caseXSDParticle(XSDParticle object)
+        { 
+          visitXSDParticle(object);
+          return null;
+        } 
+
+        public Object caseXSDSchema(XSDSchema object)
+        { 
+          visitXSDSchema(object);
+          return null;
+        } 
+
+        public Object caseXSDWildcard(XSDWildcard object)
+        { 
+          visitXSDWildcard(object);
+          return null;
+        } 
+      };
+      theSwitch.doSwitch((EObject)object);
+    }
+         
+    public void visitXSDAttributeUse(XSDAttributeUse xsdAttributeUse)
+    {  
+//      printIndented("@" + xsdAttributeUse.getAttributeDeclaration().getName());
+    }
+
+    public void visitXSDSchema(XSDSchema xsdSchema)
+    {         
+//      printIndented("XSDSchema");
+      indent += 2;
+      for (Iterator iterator = xsdSchema.getElementDeclarations().iterator(); iterator.hasNext(); )
+      {
+        visitXSDObject(iterator.next());
+      }
+      indent -= 2;
+    }
+
+    public void visitXSDElementDeclaration(XSDElementDeclaration xsdElementDeclaration)
+    {      
+//      printIndented(xsdElementDeclaration.getName());
+      indent += 2;         
+      XSDTypeDefinition td = xsdElementDeclaration.getTypeDefinition();
+      if (td == null)
+      {
+        td = xsdElementDeclaration.getAnonymousTypeDefinition();
+      }                       
+      visitXSDObject(td);
+      indent -= 2;
+    }
+   
+    public void visitXSDComplexTypeDefinition(XSDComplexTypeDefinition xsdComplexTypeDefinition)
+    {
+//      printIndented("XSDComplexTypeDefinition : " + xsdComplexTypeDefinition.getContent());
+      indent += 2;
+      for (Iterator i = xsdComplexTypeDefinition.getAttributeUses().iterator(); i.hasNext(); )
+      {        
+        visitXSDObject((XSDAttributeUse)i.next());
+      }
+      visitXSDObject(xsdComplexTypeDefinition.getContent());
+      indent -= 2;
+    }
+
+    public void visitXSDModelGroup(XSDModelGroup xsdModelGroup)
+    {
+//      printIndented("XSDModelGroup");
+      indent += 2;
+      for (Iterator iterator = xsdModelGroup.getContents().iterator(); iterator.hasNext(); )
+      {
+        visitXSDObject(iterator.next());
+      } 
+      indent -= 2;
+    }     
+
+    public void visitXSDModelGroupDefinition(XSDModelGroupDefinition xsdModelGroupDefinition)
+    {
+//      printIndented("XSDModelGroupDefinition");
+      indent += 2;
+      visitXSDObject(xsdModelGroupDefinition.getResolvedModelGroupDefinition().getModelGroup());
+      indent -= 2;
+    }
+
+    public void visitXSDParticle(XSDParticle xsdParticle)
+    {
+//      printIndented("XSDParticle");
+      indent += 2;                 
+      if (xsdParticle.getContent() != null)
+        visitXSDObject(xsdParticle.getContent());
+      indent -= 2;
+    } 
+
+    public void visitXSDWildcard(XSDWildcard object)
+    { 
+//      printIndented("XSDWildcard");
+    }
+
+    public void printIndented(String string)
+    { 
+      //String spaces = "";
+      //for (int i = 0; i < indent; i++)
+      //{
+      //  spaces += " ";
+      //}               
+      //System.out.println(spaces + string);      
+    }
+  } 
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDComplexTypeDefinitionAdapter.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDComplexTypeDefinitionAdapter.java
new file mode 100644
index 0000000..bf8ce65
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDComplexTypeDefinitionAdapter.java
@@ -0,0 +1,412 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor.internal.adapters;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.jface.action.Action;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.wst.xsd.adt.actions.BaseSelectionAction;
+import org.eclipse.wst.xsd.adt.actions.DeleteAction;
+import org.eclipse.wst.xsd.adt.actions.SetInputToGraphView;
+import org.eclipse.wst.xsd.adt.actions.ShowPropertiesViewAction;
+import org.eclipse.wst.xsd.adt.design.editparts.model.IActionProvider;
+import org.eclipse.wst.xsd.adt.facade.IADTObject;
+import org.eclipse.wst.xsd.adt.facade.IADTObjectListener;
+import org.eclipse.wst.xsd.adt.facade.IComplexType;
+import org.eclipse.wst.xsd.adt.facade.IModel;
+import org.eclipse.wst.xsd.adt.facade.IType;
+import org.eclipse.wst.xsd.adt.outline.ITreeElement;
+import org.eclipse.wst.xsd.editor.XSDEditorPlugin;
+import org.eclipse.wst.xsd.editor.internal.design.editparts.model.SpaceFiller;
+import org.eclipse.wst.xsd.editor.internal.design.editparts.model.TargetConnectionSpaceFiller;
+import org.eclipse.wst.xsd.ui.common.actions.AddXSDAttributeDeclarationAction;
+import org.eclipse.wst.xsd.ui.common.actions.AddXSDAttributeGroupDefinitionAction;
+import org.eclipse.wst.xsd.ui.common.actions.AddXSDElementAction;
+import org.eclipse.wst.xsd.ui.common.actions.AddXSDModelGroupAction;
+import org.eclipse.wst.xsd.ui.common.actions.OpenInNewEditor;
+import org.eclipse.wst.xsd.ui.common.commands.AddXSDElementCommand;
+import org.eclipse.wst.xsd.ui.common.commands.DeleteCommand;
+import org.eclipse.wst.xsd.ui.common.commands.UpdateNameCommand;
+import org.eclipse.xsd.XSDAttributeGroupContent;
+import org.eclipse.xsd.XSDAttributeGroupDefinition;
+import org.eclipse.xsd.XSDAttributeUse;
+import org.eclipse.xsd.XSDComplexTypeContent;
+import org.eclipse.xsd.XSDComplexTypeDefinition;
+import org.eclipse.xsd.XSDModelGroup;
+import org.eclipse.xsd.XSDParticle;
+import org.eclipse.xsd.XSDParticleContent;
+import org.eclipse.xsd.XSDSchema;
+import org.eclipse.xsd.XSDTypeDefinition;
+import org.eclipse.xsd.util.XSDConstants;
+
+public class XSDComplexTypeDefinitionAdapter extends XSDTypeDefinitionAdapter implements IComplexType, IActionProvider, IADTObjectListener
+{
+  protected List fields = null;
+  protected List otherThingsToListenTo = null;
+
+  public XSDComplexTypeDefinition getXSDComplexTypeDefinition()
+  {
+    return (XSDComplexTypeDefinition) target;
+  }
+
+  public IType getSuperType()
+  {
+    XSDTypeDefinition td = getXSDTypeDefinition().getBaseType();
+
+    // test to filter out the 'anyType' type ... don't want to see that
+    //
+    if (td != null && !td.getName().equals("anyType"))
+    {
+      return (IType) XSDAdapterFactory.getInstance().adapt(td);
+    }
+    return null;
+  }
+
+  protected void clearFields()
+  {
+    if (otherThingsToListenTo != null)
+    {
+      for (Iterator i = otherThingsToListenTo.iterator(); i.hasNext();)
+      {
+        Adapter adapter = (Adapter) i.next();
+        if (adapter instanceof IADTObject)
+        {
+          IADTObject adtObject = (IADTObject) adapter;
+          adtObject.unregisterListener(this);
+        }
+      }
+    }
+    fields = null;
+    otherThingsToListenTo = null;
+  }
+
+  public List getFields()
+  {
+    if (fields == null)
+    {
+      fields = new ArrayList();
+      otherThingsToListenTo = new ArrayList();
+
+      XSDVisitorForFields visitor = new XSDVisitorForFieldsWithSpaceFillers();
+      visitor.visitComplexTypeDefinition(getXSDComplexTypeDefinition());
+      populateAdapterList(visitor.concreteComponentList, fields);
+      populateAdapterList(visitor.thingsWeNeedToListenTo, otherThingsToListenTo);
+      for (Iterator i = otherThingsToListenTo.iterator(); i.hasNext();)
+      {
+        Adapter adapter = (Adapter) i.next();
+        if (adapter instanceof IADTObject)
+        {
+          IADTObject adtObject = (IADTObject) adapter;
+          adtObject.registerListener(this);
+        }
+      }
+    }
+    // System.out.println("fields[" + this + "].size() = " + fields.size());
+    return fields;
+  }
+
+  class XSDVisitorForFieldsWithSpaceFillers extends XSDVisitorForFields
+  {
+    public XSDVisitorForFieldsWithSpaceFillers()
+    {
+      super();
+    }
+
+    public void visitAttributeGroupDefinition(XSDAttributeGroupDefinition attributeGroup)
+    {
+      for (Iterator it = attributeGroup.getContents().iterator(); it.hasNext();)
+      {
+        Object o = it.next();
+        if (o instanceof XSDAttributeUse)
+        {
+          XSDAttributeUse attributeUse = (XSDAttributeUse) o;
+          concreteComponentList.add(attributeUse.getAttributeDeclaration());
+          thingsWeNeedToListenTo.add(attributeUse.getAttributeDeclaration());
+        }
+        else if (o instanceof XSDAttributeGroupDefinition)
+        {
+          XSDAttributeGroupDefinition attrGroup = (XSDAttributeGroupDefinition) o;
+          thingsWeNeedToListenTo.add(attrGroup);
+          if (attrGroup.isAttributeGroupDefinitionReference())
+          {
+            attrGroup = attrGroup.getResolvedAttributeGroupDefinition();
+            if (attrGroup.getContents().size() == 0)
+            {
+              concreteComponentList.add(new SpaceFiller("attribute"));
+            }
+            visitAttributeGroupDefinition(attrGroup);
+          }
+        }
+      }
+    }
+
+    public void visitModelGroup(XSDModelGroup modelGroup)
+    {
+      int numOfChildren = modelGroup.getContents().size();
+      if (numOfChildren == 0)
+      {
+        concreteComponentList.add(new SpaceFiller("element"));
+      }
+      super.visitModelGroup(modelGroup);
+    }
+  }
+
+  public List getModelGroups()
+  {
+    List groups = new ArrayList();
+    groups.addAll(XSDChildUtility.getModelChildren(getXSDComplexTypeDefinition()));
+    return groups;
+  }
+
+  public List getAttributeGroupContent()
+  {
+    EList attrContent = getXSDComplexTypeDefinition().getAttributeContents();
+    List attrUses = new ArrayList();
+    List list = new ArrayList();
+
+    for (Iterator it = attrContent.iterator(); it.hasNext();)
+    {
+      XSDAttributeGroupContent attrGroupContent = (XSDAttributeGroupContent) it.next();
+
+      if (attrGroupContent instanceof XSDAttributeGroupDefinition)
+      {
+        XSDAttributeGroupDefinition attributeGroupDefinition = (XSDAttributeGroupDefinition) attrGroupContent;
+        list.add(XSDAdapterFactory.getInstance().adapt(attributeGroupDefinition));
+        getAttributeUses(attributeGroupDefinition, attrUses);
+      }
+      else
+      {
+        attrUses.add(attrGroupContent);
+        list.add(new TargetConnectionSpaceFiller(this));
+      }
+    }
+    return list;
+  }
+
+  public boolean isComplexType()
+  {
+    return true;
+  }
+
+  public void notifyChanged(Notification msg)
+  {
+    clearFields();
+    super.notifyChanged(msg);
+  }
+
+  public Command getUpdateNameCommand(String newName)
+  {
+    return new UpdateNameCommand("Update Name", getXSDComplexTypeDefinition(), newName);
+  }
+
+  public Command getAddNewFieldCommand(String fieldKind)
+  {
+    return new AddXSDElementCommand("whyDoWeUseThisLabel?", getXSDComplexTypeDefinition());
+  }
+
+  public Command getDeleteCommand()
+  {
+    return new DeleteCommand("", getXSDComplexTypeDefinition());
+  }
+
+  protected class AddNewFieldCommand extends Command
+  {
+    protected String defaultName;
+    protected String fieldKind;
+
+    AddNewFieldCommand(String defaultName, String fieldKind)
+    {
+      this.defaultName = defaultName;
+      this.fieldKind = fieldKind;
+    }
+  }
+
+  public String[] getActions(Object object)
+  {
+    List list = new ArrayList();
+    IWorkbench workbench = PlatformUI.getWorkbench();
+    IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow();
+    IEditorPart editorPart = workbenchWindow.getActivePage().getActiveEditor();
+    Object schema = editorPart.getAdapter(XSDSchema.class);
+    
+    list.add(AddXSDElementAction.ID);
+    list.add(AddXSDElementAction.REF_ID);
+    list.add(AddXSDAttributeDeclarationAction.ID);
+    list.add(AddXSDAttributeGroupDefinitionAction.ID);
+    list.add(BaseSelectionAction.SEPARATOR_ID);
+    list.add(AddXSDModelGroupAction.SEQUENCE_ID);
+    list.add(AddXSDModelGroupAction.CHOICE_ID);
+
+    list.add(BaseSelectionAction.SEPARATOR_ID);
+    list.add(DeleteAction.ID);
+    list.add(BaseSelectionAction.SEPARATOR_ID);
+    if (getXSDComplexTypeDefinition().getSchema() == schema)
+    {
+      if (getXSDComplexTypeDefinition().getContainer() == schema)
+      {
+        list.add(SetInputToGraphView.ID);
+      }
+    }
+    else
+    {
+      list.add(OpenInNewEditor.ID);
+    }
+    list.add(BaseSelectionAction.SEPARATOR_ID);
+    list.add(ShowPropertiesViewAction.ID);
+    String[] result = new String[list.size()];
+    list.toArray(result);
+    return result;
+  }
+
+  public void propertyChanged(Object object, String property)
+  {
+    clearFields();
+    notifyListeners(this, null);
+  }
+
+  class BogusAction extends Action
+  {
+    BogusAction(String name)
+    {
+      super(name);
+    }
+
+    public void run()
+    {
+      // TODO Auto-generated method stub
+      super.run();
+    }
+  }
+
+  public ITreeElement[] getChildren()
+  {
+    XSDComplexTypeDefinition xsdComplexTypeDefinition = getXSDComplexTypeDefinition();
+    List list = new ArrayList();
+    // Add attributes
+    for (Iterator i = xsdComplexTypeDefinition.getAttributeContents().iterator(); i.hasNext();)
+    {
+      Object obj = i.next();
+      if (obj instanceof XSDAttributeUse)
+      {
+        list.add(obj);
+      }
+      else if (obj instanceof XSDAttributeGroupDefinition)
+      {
+        getAttributeUses((XSDAttributeGroupDefinition) obj, list);
+      }
+    }
+    // get immediate XSD Model Group of this complex type
+    if (xsdComplexTypeDefinition.getContent() != null)
+    {
+      XSDComplexTypeContent xsdComplexTypeContent = xsdComplexTypeDefinition.getContent();
+      if (xsdComplexTypeContent instanceof XSDParticle)
+      {
+        XSDParticleContent particleContent = ((XSDParticle) xsdComplexTypeContent).getContent();
+        if (particleContent instanceof XSDModelGroup)
+        {
+          list.add((XSDModelGroup) particleContent);
+        }
+      }
+    }
+    // get inherited XSD Model Group of this complex type
+    boolean showInheritedContent = XSDEditorPlugin.getPlugin().getShowInheritedContent();
+    if (showInheritedContent)
+    {
+      XSDTypeDefinition typeDef = xsdComplexTypeDefinition.getBaseTypeDefinition();
+      if (typeDef instanceof XSDComplexTypeDefinition)
+      {
+        XSDComplexTypeDefinition baseCT = (XSDComplexTypeDefinition) typeDef;
+        if (baseCT.getTargetNamespace() != null && !baseCT.getTargetNamespace().equals(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001))
+        {
+          if (baseCT.getContent() != null)
+          {
+            XSDComplexTypeContent xsdComplexTypeContent = baseCT.getContent();
+            if (xsdComplexTypeContent instanceof XSDParticle)
+            {
+              XSDParticleContent particleContent = ((XSDParticle) xsdComplexTypeContent).getContent();
+              if (particleContent instanceof XSDModelGroup)
+              {
+                list.add((XSDModelGroup) particleContent);
+              }
+            }
+          }
+        }
+      }
+    }
+    List adapterList = new ArrayList();
+    populateAdapterList(list, adapterList);
+    return (ITreeElement[]) adapterList.toArray(new ITreeElement[0]);
+  }
+
+  public Image getImage()
+  {
+    return XSDEditorPlugin.getXSDImage("icons/XSDComplexType.gif");
+  }
+
+  public String getText()
+  {
+    XSDComplexTypeDefinition xsdComplexTypeDefinition = (XSDComplexTypeDefinition) target;
+
+    StringBuffer result = new StringBuffer();
+
+    result.append(xsdComplexTypeDefinition.getName() == null ? "local type" : xsdComplexTypeDefinition.getName());
+
+    XSDTypeDefinition baseTypeDefinition = xsdComplexTypeDefinition.getBaseTypeDefinition();
+    if (baseTypeDefinition != null && baseTypeDefinition != xsdComplexTypeDefinition.getContent() && baseTypeDefinition.getName() != null && !XSDConstants.isURType(baseTypeDefinition))
+    {
+      result.append(" : ");
+      result.append(baseTypeDefinition.getQName(xsdComplexTypeDefinition));
+    }
+
+    return result.toString();
+  }
+
+  public void getAttributeUses(XSDAttributeGroupDefinition attributeGroupDefinition, List list)
+  {
+    Iterator i = attributeGroupDefinition.getResolvedAttributeGroupDefinition().getContents().iterator();
+
+    while (i.hasNext())
+    {
+      XSDAttributeGroupContent attrGroupContent = (XSDAttributeGroupContent) i.next();
+
+      if (attrGroupContent instanceof XSDAttributeGroupDefinition)
+      {
+        getAttributeUses((XSDAttributeGroupDefinition) attrGroupContent, list);
+      }
+      else
+      {
+        list.add(XSDAdapterFactory.getInstance().adapt(attrGroupContent));
+      }
+    }
+  }
+
+  public IModel getModel()
+  {
+    Adapter adapter = XSDAdapterFactory.getInstance().adapt(getXSDComplexTypeDefinition().getSchema());
+    return (IModel)adapter;
+  }
+
+  public boolean isFocusAllowed()
+  {
+    return true;
+  }
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDElementDeclarationAdapter.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDElementDeclarationAdapter.java
new file mode 100644
index 0000000..d57dda4
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDElementDeclarationAdapter.java
@@ -0,0 +1,280 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor.internal.adapters;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.wst.xsd.adt.actions.BaseSelectionAction;
+import org.eclipse.wst.xsd.adt.actions.DeleteAction;
+import org.eclipse.wst.xsd.adt.actions.ShowPropertiesViewAction;
+import org.eclipse.wst.xsd.adt.design.IAnnotationProvider;
+import org.eclipse.wst.xsd.adt.design.editparts.model.IActionProvider;
+import org.eclipse.wst.xsd.adt.facade.IField;
+import org.eclipse.wst.xsd.adt.facade.IModel;
+import org.eclipse.wst.xsd.adt.facade.IType;
+import org.eclipse.wst.xsd.adt.outline.ITreeElement;
+import org.eclipse.wst.xsd.editor.XSDEditorPlugin;
+import org.eclipse.wst.xsd.ui.common.actions.AddXSDElementAction;
+import org.eclipse.wst.xsd.ui.common.actions.SetMultiplicityAction;
+import org.eclipse.wst.xsd.ui.common.actions.SetTypeAction;
+import org.eclipse.wst.xsd.ui.common.commands.DeleteCommand;
+import org.eclipse.wst.xsd.ui.common.commands.UpdateNameCommand;
+import org.eclipse.xsd.XSDComplexTypeDefinition;
+import org.eclipse.xsd.XSDElementDeclaration;
+import org.eclipse.xsd.XSDParticle;
+import org.eclipse.xsd.XSDSchema;
+import org.eclipse.xsd.XSDTypeDefinition;
+import org.eclipse.xsd.util.XSDConstants;
+import org.w3c.dom.Element;
+
+public class XSDElementDeclarationAdapter extends XSDParticleAdapter implements IField, IActionProvider, IAnnotationProvider
+{
+  protected XSDElementDeclaration getXSDElementDeclaration()
+  {
+    return (XSDElementDeclaration) target;
+  }
+
+  public String getName()
+  {
+    String name = getXSDElementDeclaration().getResolvedElementDeclaration().getName();
+    return (name == null) ? "" : name;
+  }
+
+  public String getTypeName()
+  {
+    IType type = getType();
+    if (type != null)
+    {  
+      return type.getName();
+    }
+    return null;
+  }
+
+  public String getTypeNameQualifier()
+  {
+    return getXSDElementDeclaration().getTypeDefinition().getTargetNamespace();
+  }
+
+  public IType getType()
+  {
+    XSDTypeDefinition td = getXSDElementDeclaration().getResolvedElementDeclaration().getTypeDefinition();
+    //if (td != null &&
+    //    td.getTargetNamespace() != null && td.getTargetNamespace().equals(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001)) return null;
+    return (td != null) ? (IType) XSDAdapterFactory.getInstance().adapt(td) : null;
+  }
+ 
+  public Image getImage()
+  {
+    XSDElementDeclaration xsdElementDeclaration = (XSDElementDeclaration) target;
+
+    if (!xsdElementDeclaration.isElementDeclarationReference())
+    {
+      return XSDEditorPlugin.getXSDImage("icons/XSDElement.gif");
+    }
+    else
+    {
+      return XSDEditorPlugin.getXSDImage("icons/XSDElementRef.gif");
+    }
+  }
+
+  public String getText()
+  {
+    XSDElementDeclaration xsdElementDeclaration = (XSDElementDeclaration) target;
+    XSDElementDeclaration resolvedElementDeclaration = xsdElementDeclaration.getResolvedElementDeclaration();
+    //String name = xsdElementDeclaration != resolvedElementDeclaration ? xsdElementDeclaration.getQName() : xsdElementDeclaration.getName();
+    String name = resolvedElementDeclaration.getName();
+
+    StringBuffer result = new StringBuffer();
+    if (name == null)
+    {
+      result.append("'absent'");
+    }
+    else
+    {
+      result.append(name);
+    }
+
+    if (!xsdElementDeclaration.isGlobal())
+    {
+      Element element = xsdElementDeclaration.getElement();
+      boolean hasMinOccurs = element.hasAttribute(XSDConstants.MINOCCURS_ATTRIBUTE);
+      boolean hasMaxOccurs = element.hasAttribute(XSDConstants.MAXOCCURS_ATTRIBUTE);
+
+      if (hasMinOccurs || hasMaxOccurs)
+      {
+        result.append(" [");
+        if (hasMinOccurs)
+        {
+          int min = ((XSDParticle) xsdElementDeclaration.getContainer()).getMinOccurs();
+          if (min == XSDParticle.UNBOUNDED)
+          {
+            result.append("*");
+          }
+          else
+          {
+            result.append(String.valueOf(min));
+          }
+        }
+        else
+        // print default
+        {
+          int min = ((XSDParticle) xsdElementDeclaration.getContainer()).getMinOccurs();
+          result.append(String.valueOf(min));
+        }
+        if (hasMaxOccurs)
+        {
+          int max = ((XSDParticle) xsdElementDeclaration.getContainer()).getMaxOccurs();
+          result.append("..");
+          if (max == XSDParticle.UNBOUNDED)
+          {
+            result.append("*");
+          }
+          else
+          {
+            result.append(String.valueOf(max));
+          }
+        }
+        else
+        // print default
+        {
+          result.append("..");
+          int max = ((XSDParticle) xsdElementDeclaration.getContainer()).getMaxOccurs();
+          result.append(String.valueOf(max));
+
+        }
+        result.append("]");
+      }
+    }
+
+    if (resolvedElementDeclaration.getAnonymousTypeDefinition() == null && resolvedElementDeclaration.getTypeDefinition() != null)
+    {
+      result.append(" : ");
+      // result.append(resolvedElementDeclaration.getTypeDefinition().getQName(xsdElementDeclaration));
+      result.append(resolvedElementDeclaration.getTypeDefinition().getName());
+    }
+
+    return result.toString();
+
+  }
+
+  public ITreeElement[] getChildren()
+  {
+    XSDElementDeclaration xsdElementDeclaration = (XSDElementDeclaration) target;
+    List list = new ArrayList();
+    XSDTypeDefinition type = null;
+    if (xsdElementDeclaration.isElementDeclarationReference())
+    {
+      type = xsdElementDeclaration.getResolvedElementDeclaration().getTypeDefinition();
+    }
+    else
+    {
+      type = xsdElementDeclaration.getAnonymousTypeDefinition();
+      if (type == null)
+      {
+        type = xsdElementDeclaration.getTypeDefinition();
+      }
+    }
+
+    if (type instanceof XSDComplexTypeDefinition && type.getTargetNamespace() != null && !type.getTargetNamespace().equals(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001))
+    {
+      XSDComplexTypeDefinition ctType = (XSDComplexTypeDefinition) type;
+      if (ctType != null)
+      {
+        if (xsdElementDeclaration.isGlobal())
+          list.add(ctType);
+      }
+    }
+
+    List adapterList = new ArrayList();
+    populateAdapterList(list, adapterList);
+    return (ITreeElement[]) adapterList.toArray(new ITreeElement[0]);
+
+  }
+  
+  public String getKind()
+  {
+    return "element";
+  }
+  
+  public boolean isGlobal()
+  {
+    return getXSDElementDeclaration().eContainer() instanceof XSDSchema;
+  }
+  
+  public boolean isElementDeclarationReference()
+  {
+	  return ((XSDElementDeclaration) target).isElementDeclarationReference();
+  }
+
+  public Command getUpdateMaxOccursCommand(int maxOccurs)
+  {
+    // TODO Auto-generated method stub
+    return null;
+  }
+
+  public Command getUpdateMinOccursCommand(int minOccurs)
+  {
+    // TODO Auto-generated method stub
+    return null;
+  }
+
+  public Command getUpdateNameCommand(String name)
+  {
+    return new UpdateNameCommand("Update Name", getXSDElementDeclaration().getResolvedElementDeclaration(), name);
+  }
+
+  public Command getUpdateTypeNameCommand(String typeName, String quailifier)
+  {
+    // TODO Auto-generated method stub
+    return null;
+  }
+
+  public Command getDeleteCommand()
+  {
+    // TODO Auto-generated method stub
+    return new DeleteCommand("", getXSDElementDeclaration());
+  }
+  
+  public String[] getActions(Object object)
+  {
+    List list = new ArrayList();
+    if (!isGlobal())
+      list.add(AddXSDElementAction.ID);
+
+    list.add(BaseSelectionAction.SUBMENU_START_ID + "Set Type");
+    list.add(SetTypeAction.SET_NEW_TYPE_ID);
+    list.add(SetTypeAction.SELECT_EXISTING_TYPE_ID);
+    list.add(BaseSelectionAction.SUBMENU_END_ID);
+
+    list.add(BaseSelectionAction.SUBMENU_START_ID + "Set Multiplicity");
+    list.add(SetMultiplicityAction.REQUIRED_ID);
+    list.add(SetMultiplicityAction.ZERO_OR_ONE_ID);
+    list.add(SetMultiplicityAction.ZERO_OR_MORE_ID);
+    list.add(SetMultiplicityAction.ONE_OR_MORE_ID);    
+    list.add(BaseSelectionAction.SUBMENU_END_ID);
+
+    list.add(BaseSelectionAction.SEPARATOR_ID);
+    list.add(DeleteAction.ID);
+    list.add(BaseSelectionAction.SEPARATOR_ID);
+    list.add(ShowPropertiesViewAction.ID);
+    return (String [])list.toArray(new String[0]);
+  }
+  
+  public IModel getModel()
+  {
+    Adapter adapter = XSDAdapterFactory.getInstance().adapt(getXSDElementDeclaration().getSchema());
+    return (IModel)adapter;
+  }
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDEmptyFieldAdapter.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDEmptyFieldAdapter.java
new file mode 100644
index 0000000..8f6b858
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDEmptyFieldAdapter.java
@@ -0,0 +1,114 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor.internal.adapters;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.wst.xsd.adt.facade.IField;
+import org.eclipse.wst.xsd.adt.facade.IModel;
+import org.eclipse.wst.xsd.adt.facade.IType;
+
+/**
+ * @deprecated not used
+ */
+public class XSDEmptyFieldAdapter extends XSDBaseAdapter implements IField
+{
+  String kind;
+  public XSDEmptyFieldAdapter()
+  {
+    super();
+  }
+
+  public String getKind()
+  {
+    return kind;
+  }
+  
+  public void setKind(String kind)
+  {
+    this.kind = kind;
+  }
+
+  public String getName()
+  {
+    return null;
+  }
+
+  public String getTypeName()
+  {
+    // TODO Auto-generated method stub
+    return null;
+  }
+
+  public String getTypeNameQualifier()
+  {
+    // TODO Auto-generated method stub
+    return null;
+  }
+
+  public IType getType()
+  {
+    // TODO Auto-generated method stub
+    return null;
+  }
+
+  public int getMinOccurs()
+  {
+    // TODO Auto-generated method stub
+    return 0;
+  }
+
+  public int getMaxOccurs()
+  {
+    // TODO Auto-generated method stub
+    return 0;
+  }
+  
+  public boolean isGlobal()
+  {
+    return false;
+  }
+
+  public Command getUpdateMinOccursCommand(int minOccurs)
+  {
+    // TODO Auto-generated method stub
+    return null;
+  }
+
+  public Command getUpdateMaxOccursCommand(int maxOccurs)
+  {
+    // TODO Auto-generated method stub
+    return null;
+  }
+
+  public Command getUpdateTypeNameCommand(String typeName, String quailifier)
+  {
+    // TODO Auto-generated method stub
+    return null;
+  }
+
+  public Command getUpdateNameCommand(String name)
+  {
+    // TODO Auto-generated method stub
+    return null;
+  }
+
+  public Command getDeleteCommand()
+  {
+    // TODO Auto-generated method stub
+    return null;
+  }
+
+  public IModel getModel()
+  {
+    // TODO Auto-generated method stub
+    return null;
+  }
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDModelGroupAdapter.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDModelGroupAdapter.java
new file mode 100644
index 0000000..0ad1b31
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDModelGroupAdapter.java
@@ -0,0 +1,227 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor.internal.adapters;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.wst.xsd.adt.actions.BaseSelectionAction;
+import org.eclipse.wst.xsd.adt.actions.ShowPropertiesViewAction;
+import org.eclipse.wst.xsd.adt.design.editparts.model.IActionProvider;
+import org.eclipse.wst.xsd.adt.outline.ITreeElement;
+import org.eclipse.wst.xsd.editor.XSDEditorPlugin;
+import org.eclipse.wst.xsd.ui.common.actions.AddXSDElementAction;
+import org.eclipse.wst.xsd.ui.common.actions.AddXSDModelGroupAction;
+import org.eclipse.wst.xsd.ui.common.actions.AddXSDModelGroupDefinitionAction;
+import org.eclipse.wst.xsd.ui.common.actions.DeleteXSDConcreteComponentAction;
+import org.eclipse.wst.xsd.ui.common.actions.SetMultiplicityAction;
+import org.eclipse.xsd.XSDCompositor;
+import org.eclipse.xsd.XSDElementDeclaration;
+import org.eclipse.xsd.XSDModelGroup;
+import org.eclipse.xsd.XSDModelGroupDefinition;
+import org.eclipse.xsd.XSDParticle;
+import org.eclipse.xsd.XSDParticleContent;
+import org.eclipse.xsd.XSDWildcard;
+import org.eclipse.xsd.util.XSDConstants;
+import org.w3c.dom.Element;
+
+public class XSDModelGroupAdapter extends XSDParticleAdapter implements IActionProvider
+{
+  public static final Image SEQUENCE_ICON_IMAGE = XSDEditorPlugin.getImageDescriptor("newSequence2.gif", true).createImage();
+  public static final Image CHOICE_ICON_IMAGE = XSDEditorPlugin.getImageDescriptor("newChoice.gif", true).createImage();
+  public static final Image ALL_ICON_IMAGE = XSDEditorPlugin.getImageDescriptor("obj16/all.gif", true).createImage();
+
+  XSDModelGroup getXSDModelGroup()
+  {
+    return (XSDModelGroup) target;
+  }
+
+  public XSDModelGroupAdapter()
+  {
+
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.eclipse.wst.xsd.adt.outline.ITreeElement#getImage()
+   */
+  public Image getImage()
+  {
+    XSDModelGroup xsdModelGroup = getXSDModelGroup();
+    if (XSDCompositor.CHOICE_LITERAL == xsdModelGroup.getCompositor())
+    {
+      return CHOICE_ICON_IMAGE;
+    }
+    else if (XSDCompositor.ALL_LITERAL == xsdModelGroup.getCompositor())
+    {
+      return ALL_ICON_IMAGE;
+    }
+    else
+    {
+      return SEQUENCE_ICON_IMAGE;
+    }
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.eclipse.wst.xsd.adt.outline.ITreeElement#getText()
+   */
+  public String getText()
+  {
+    XSDModelGroup xsdModelGroup = getXSDModelGroup();
+
+    StringBuffer result = new StringBuffer();
+    String name = xsdModelGroup.getCompositor().getName();
+    if (name != null)
+    {
+      result.append(name);
+    }
+
+    Element element = xsdModelGroup.getElement();
+
+    if (element != null)
+    {
+      boolean hasMinOccurs = element.hasAttribute(XSDConstants.MINOCCURS_ATTRIBUTE);
+      boolean hasMaxOccurs = element.hasAttribute(XSDConstants.MAXOCCURS_ATTRIBUTE);
+
+      if (hasMinOccurs || hasMaxOccurs)
+      {
+        result.append(" [");
+        if (hasMinOccurs)
+        {
+          int min = ((XSDParticle) xsdModelGroup.getContainer()).getMinOccurs();
+          if (min == XSDParticle.UNBOUNDED)
+          {
+            result.append("*");
+          }
+          else
+          {
+            result.append(String.valueOf(min));
+          }
+        }
+        else
+        // print default
+        {
+          int min = ((XSDParticle) xsdModelGroup.getContainer()).getMinOccurs();
+          result.append(String.valueOf(min));
+        }
+        if (hasMaxOccurs)
+        {
+          int max = ((XSDParticle) xsdModelGroup.getContainer()).getMaxOccurs();
+          result.append("..");
+          if (max == XSDParticle.UNBOUNDED)
+          {
+            result.append("*");
+          }
+          else
+          {
+            result.append(String.valueOf(max));
+          }
+        }
+        else
+        // print default
+        {
+          result.append("..");
+          int max = ((XSDParticle) xsdModelGroup.getContainer()).getMaxOccurs();
+          result.append(String.valueOf(max));
+        }
+        result.append("]");
+      }
+    }
+    return result.toString();
+  }
+
+  public ITreeElement[] getChildren()
+  {
+    XSDModelGroup xsdModelGroup = getXSDModelGroup();
+    List list = new ArrayList();
+    for (Iterator i = xsdModelGroup.getContents().iterator(); i.hasNext(); )
+    {
+       Object object = i.next();
+       XSDParticleContent particle = ((XSDParticle)object).getContent();
+       if (particle instanceof XSDElementDeclaration)
+       {
+         list.add((XSDElementDeclaration)particle);
+       }
+       else if (particle instanceof XSDWildcard)
+       {
+         list.add((XSDWildcard)particle);
+       }
+       else if (particle instanceof XSDModelGroup)
+       {
+         list.add((XSDModelGroup)particle);
+       }
+    }
+
+    List adapterList = new ArrayList();
+    populateAdapterList(list, adapterList);
+    return (ITreeElement []) adapterList.toArray(new ITreeElement[0]);
+  }
+
+  public Object getParent(Object object)
+  {
+    XSDModelGroup element = (XSDModelGroup) object;
+    return element.getContainer();
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.eclipse.wst.xsd.adt.design.editparts.model.IActionProvider#getActions(java.lang.Object)
+   */
+  public String[] getActions(Object object)
+  {
+     Collection actionIDs = new ArrayList();
+     actionIDs.add(AddXSDElementAction.ID);
+     actionIDs.add(AddXSDElementAction.REF_ID);
+     // Add Element Ref
+     actionIDs.add(BaseSelectionAction.SEPARATOR_ID);
+     actionIDs.add(AddXSDModelGroupAction.SEQUENCE_ID);
+     actionIDs.add(AddXSDModelGroupAction.CHOICE_ID);
+     actionIDs.add(AddXSDModelGroupDefinitionAction.MODELGROUPDEFINITIONREF_ID);
+//     actionIDs.add(AddFieldAction.ID);
+     actionIDs.add(BaseSelectionAction.SEPARATOR_ID);
+     // Add Any
+
+     actionIDs.add(BaseSelectionAction.SUBMENU_START_ID + "Set Multiplicity");
+     actionIDs.add(SetMultiplicityAction.REQUIRED_ID);
+     actionIDs.add(SetMultiplicityAction.ZERO_OR_ONE_ID);
+     actionIDs.add(SetMultiplicityAction.ZERO_OR_MORE_ID);
+     actionIDs.add(SetMultiplicityAction.ONE_OR_MORE_ID);    
+     actionIDs.add(BaseSelectionAction.SUBMENU_END_ID);
+    
+     if (!(getParent(target) instanceof XSDModelGroupDefinition))
+     {
+       actionIDs.add(BaseSelectionAction.SEPARATOR_ID);
+       actionIDs.add(DeleteXSDConcreteComponentAction.DELETE_XSD_COMPONENT_ID);
+     }    
+     actionIDs.add(BaseSelectionAction.SEPARATOR_ID);
+     actionIDs.add(ShowPropertiesViewAction.ID);
+        
+     return (String [])actionIDs.toArray(new String[0]);
+  }
+
+  public int getMaxOccurs()
+  {
+    return getMaxOccurs(getXSDModelGroup());
+  }
+
+  public int getMinOccurs()
+  {
+    return getMinOccurs(getXSDModelGroup());
+  }
+
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDModelGroupDefinitionAdapter.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDModelGroupDefinitionAdapter.java
new file mode 100644
index 0000000..ac6d93e
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDModelGroupDefinitionAdapter.java
@@ -0,0 +1,146 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor.internal.adapters;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.wst.xsd.adt.actions.BaseSelectionAction;
+import org.eclipse.wst.xsd.adt.design.editparts.model.IActionProvider;
+import org.eclipse.wst.xsd.adt.facade.IModel;
+import org.eclipse.wst.xsd.adt.facade.IStructure;
+import org.eclipse.wst.xsd.adt.outline.ITreeElement;
+import org.eclipse.wst.xsd.editor.XSDEditorPlugin;
+import org.eclipse.wst.xsd.ui.common.actions.AddXSDElementAction;
+import org.eclipse.wst.xsd.ui.common.actions.AddXSDModelGroupAction;
+import org.eclipse.wst.xsd.ui.common.actions.DeleteXSDConcreteComponentAction;
+import org.eclipse.xsd.XSDModelGroup;
+import org.eclipse.xsd.XSDModelGroupDefinition;
+
+public class XSDModelGroupDefinitionAdapter extends XSDBaseAdapter implements IStructure, IActionProvider
+{
+  public XSDModelGroupDefinitionAdapter()
+  {
+    super();
+  }
+
+  public XSDModelGroupDefinition getXSDModelGroupDefinition()
+  {
+    return (XSDModelGroupDefinition) target;
+  }
+
+  public Image getImage()
+  {
+    XSDModelGroupDefinition xsdModelGroupDefinition = (XSDModelGroupDefinition) target;
+
+    if (xsdModelGroupDefinition.isModelGroupDefinitionReference())
+    {
+      return XSDEditorPlugin.getXSDImage("icons/XSDGroupRef.gif");
+    }
+    else
+    {
+      return XSDEditorPlugin.getXSDImage("icons/XSDGroup.gif");
+    }
+  }
+
+  public String getText()
+  {
+    XSDModelGroupDefinition xsdModelGroupDefinition = (XSDModelGroupDefinition) target;
+    String result = xsdModelGroupDefinition.isModelGroupDefinitionReference() ? xsdModelGroupDefinition.getQName() : xsdModelGroupDefinition.getName();
+    return result == null ? "'absent'" : result;
+  }
+
+  public ITreeElement[] getChildren()
+  {
+    List list = new ArrayList();
+    XSDModelGroup xsdModelGroup = ((XSDModelGroupDefinition) target).getResolvedModelGroupDefinition().getModelGroup();
+    if (xsdModelGroup != null)
+      list.add(xsdModelGroup);
+
+    List adapterList = new ArrayList();
+    populateAdapterList(list, adapterList);
+    return (ITreeElement[]) adapterList.toArray(new ITreeElement[0]);
+
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.eclipse.wst.xsd.adt.design.editparts.model.IActionProvider#getActions(java.lang.Object)
+   */
+  public String[] getActions(Object object)
+  {
+    Collection list = new ArrayList();
+
+    if (!getXSDModelGroupDefinition().isModelGroupDefinitionReference())
+    {
+      list.add(AddXSDElementAction.ID);
+      list.add(AddXSDElementAction.REF_ID);
+      list.add(BaseSelectionAction.SEPARATOR_ID);
+      list.add(AddXSDModelGroupAction.SEQUENCE_ID);
+      list.add(AddXSDModelGroupAction.CHOICE_ID);
+    }
+    
+    list.add(DeleteXSDConcreteComponentAction.DELETE_XSD_COMPONENT_ID);
+    return (String [])list.toArray(new String[0]);
+  }
+
+  public Command getAddNewFieldCommand(String fieldKind)
+  {
+    // TODO Auto-generated method stub
+    return null;
+  }
+
+  public Command getDeleteCommand()
+  {
+    // TODO Auto-generated method stub
+    return null;
+  }
+
+  public List getFields()
+  {
+    List fields = new ArrayList();
+    boolean showGroups = false;
+    XSDVisitorForFields visitor = new XSDVisitorForFields();
+    visitor.visitModelGroupDefinition(getXSDModelGroupDefinition());
+    populateAdapterList(visitor.concreteComponentList, fields);
+    
+    // TODO (cs) common a base class for a structure thingee
+    //
+    /*
+    populateAdapterList(visitor.thingsWeNeedToListenTo, otherThingsToListenTo);
+    for (Iterator i = otherThingsToListenTo.iterator(); i.hasNext();)
+    {
+      Adapter adapter = (Adapter) i.next();
+      if (adapter instanceof IADTObject)
+      {
+        IADTObject adtObject = (IADTObject) adapter;
+        adtObject.registerListener(this);
+      }
+    }*/
+    // System.out.println("fields[" + this + "].size() = " + fields.size());
+    return fields;
+  }
+
+  public IModel getModel()
+  {
+    Adapter adapter = XSDAdapterFactory.getInstance().adapt(getXSDModelGroupDefinition().getSchema());
+    return (IModel)adapter;
+  }
+  public String getName()
+  {
+    return getText();
+  }    
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDParticleAdapter.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDParticleAdapter.java
new file mode 100644
index 0000000..d0425e3
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDParticleAdapter.java
@@ -0,0 +1,160 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor.internal.adapters;
+
+import org.eclipse.wst.xsd.adt.design.IAnnotationProvider;
+import org.eclipse.xsd.XSDConcreteComponent;
+import org.eclipse.xsd.XSDParticle;
+
+public class XSDParticleAdapter extends XSDBaseAdapter implements IAnnotationProvider
+{
+  public XSDParticleAdapter()
+  {
+    super();
+  }
+
+  public int getMaxOccurs()
+  {
+    return getMaxOccurs((XSDConcreteComponent) target);
+  }
+
+  public int getMinOccurs()
+  {
+    return getMinOccurs((XSDConcreteComponent) target);
+  }
+
+  public static int getMinOccurs(XSDConcreteComponent component)
+  {
+    int minOccur = -2;
+    if (component != null)
+    {
+      Object o = component.getContainer();
+      if (o instanceof XSDParticle)
+      {
+        if (((XSDParticle) o).isSetMinOccurs())
+        {
+          try
+          {
+            minOccur = ((XSDParticle) o).getMinOccurs();
+          }
+          catch (Exception e)
+          {
+          }
+        }
+      }
+    }
+    return minOccur;
+  }
+
+  public static int getMaxOccurs(XSDConcreteComponent component)
+  {
+    int maxOccur = -2;
+    if (component != null)
+    {
+      Object o = component.getContainer();
+      if (o instanceof XSDParticle)
+      {
+        if (((XSDParticle) o).isSetMaxOccurs())
+        {
+          try
+          {
+            maxOccur = ((XSDParticle) o).getMaxOccurs();
+          }
+          catch (Exception e)
+          {
+          }
+        }
+      }
+    }
+    return maxOccur;
+  }
+
+  public String getNameAnnotationString()
+  {
+    return buildAnnotationString(true);
+  }
+
+  public String getNameAnnotationToolTipString()
+  {
+    return buildAnnotationString(false);
+  }
+
+  public String getTypeAnnotationString()
+  {
+    return null;
+  }
+
+  public String getTypeAnnotationToolTipString()
+  {
+    return null;
+  }
+
+  protected String buildAnnotationString(boolean isForLabel)
+  {
+    String occurenceDescription = "";
+    String toolTipDescription = "";
+    // TODO: set int values as defined constants
+    // -2 means the user didn't specify (so the default is 1)
+    int minOccurs = getMinOccurs();
+    int maxOccurs = getMaxOccurs();
+
+    // This is for the attribute field case, which has no
+    // occurrence attributes
+    if (minOccurs == -3 && maxOccurs == -3)
+    {
+      occurenceDescription = "";
+    }
+    else if (minOccurs == 0 && (maxOccurs == -2 || maxOccurs == 1))
+    {
+      occurenceDescription = "[0..1]";
+      toolTipDescription = "optional";
+    }
+    else if (minOccurs == 0 && maxOccurs == -1)
+    {
+      occurenceDescription = "[0..*]";
+      toolTipDescription = "Zero or more";
+    }
+    else if ((minOccurs == 1 && maxOccurs == -1) || (minOccurs == -2 && maxOccurs == -1))
+    {
+      occurenceDescription = "[1..*]";
+      toolTipDescription = "One or more";
+    }
+    else if ((minOccurs == 1 && maxOccurs == 1) || (minOccurs == -2 && maxOccurs == 1) || (minOccurs == 1 && maxOccurs == -2))
+    {
+      occurenceDescription = "[1..1]";
+      toolTipDescription = "required";
+    }
+    else if (minOccurs == -2 && maxOccurs == -2)
+    {
+      occurenceDescription = "";
+      // none specified, so don't have any toolTip description
+    }
+    else
+    {
+      if (maxOccurs == -2)
+        maxOccurs = 1;
+      String maxSymbol = maxOccurs == -1 ? "*" : "" + maxOccurs;
+      String minSymbol = minOccurs == -2 ? "1" : "" + minOccurs;
+      occurenceDescription = "[" + minSymbol + ".." + maxSymbol + "]";
+      toolTipDescription = "array";
+    }
+
+    if (isForLabel)
+    {
+      return occurenceDescription;
+    }
+    else
+    {
+      return toolTipDescription;
+    }
+  }
+
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDSchemaAdapter.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDSchemaAdapter.java
new file mode 100644
index 0000000..6d418d8
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDSchemaAdapter.java
@@ -0,0 +1,427 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor.internal.adapters;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.impl.NotificationImpl;
+import org.eclipse.wst.xsd.adt.design.editparts.model.IActionProvider;
+import org.eclipse.wst.xsd.adt.facade.IADTObjectListener;
+import org.eclipse.wst.xsd.adt.facade.IModel;
+import org.eclipse.wst.xsd.adt.outline.ITreeElement;
+import org.eclipse.wst.xsd.editor.XSDEditorPlugin;
+import org.eclipse.wst.xsd.ui.common.actions.AddXSDComplexTypeDefinitionAction;
+import org.eclipse.wst.xsd.ui.common.actions.AddXSDElementAction;
+import org.eclipse.xsd.XSDAttributeDeclaration;
+import org.eclipse.xsd.XSDAttributeGroupDefinition;
+import org.eclipse.xsd.XSDComplexTypeDefinition;
+import org.eclipse.xsd.XSDConcreteComponent;
+import org.eclipse.xsd.XSDElementDeclaration;
+import org.eclipse.xsd.XSDModelGroupDefinition;
+import org.eclipse.xsd.XSDPackage;
+import org.eclipse.xsd.XSDSchema;
+import org.eclipse.xsd.XSDSchemaDirective;
+import org.eclipse.xsd.XSDSimpleTypeDefinition;
+import org.eclipse.xsd.XSDTypeDefinition;
+
+public class XSDSchemaAdapter extends XSDBaseAdapter implements IActionProvider, IModel, IADTObjectListener
+{
+  protected List types = null;
+  protected List children;
+
+  protected CategoryAdapter fDirectivesCategory;
+  protected CategoryAdapter fElementsCategory;
+  protected CategoryAdapter fAttributesCategory;
+  protected CategoryAdapter fAttributeGroupsCategory;
+  protected CategoryAdapter fTypesCategory;
+  protected CategoryAdapter fGroupsCategory;
+
+  /**
+   * Create all the category adapters
+   * 
+   * @param xsdSchema
+   */
+  protected void createCategoryAdapters(XSDSchema xsdSchema)
+  {
+    List directivesList = getDirectives(xsdSchema);
+    List elementsList = getGlobalElements(xsdSchema);
+    List attributeGroupList = getAttributeGroupList(xsdSchema);
+    List attributesList = getAttributeList(xsdSchema);
+    List groups = getGroups(xsdSchema);
+    List types = getComplexTypes(xsdSchema);
+    types.addAll(getSimpleTypes(xsdSchema));
+
+    fDirectivesCategory = new CategoryAdapter(XSDEditorPlugin.getResourceString("_UI_GRAPH_DIRECTIVES"), XSDEditorPlugin.getDefault().getIconImage("obj16/directivesheader"), directivesList, xsdSchema, CategoryAdapter.DIRECTIVES);
+    registerListener(fDirectivesCategory);
+
+    fElementsCategory = new CategoryAdapter(XSDEditorPlugin.getResourceString("_UI_GRAPH_ELEMENTS"), XSDEditorPlugin.getDefault().getIconImage("obj16/elementsheader"), elementsList, xsdSchema, CategoryAdapter.ELEMENTS);
+    registerListener(fElementsCategory);
+
+    fAttributesCategory = new CategoryAdapter(XSDEditorPlugin.getResourceString("_UI_GRAPH_ATTRIBUTES"), XSDEditorPlugin.getDefault().getIconImage("obj16/attributesheader"), attributesList, xsdSchema, CategoryAdapter.ATTRIBUTES);
+    registerListener(fAttributesCategory);
+    fAttributeGroupsCategory = new CategoryAdapter(XSDEditorPlugin.getResourceString("_UI_GRAPH_ATTRIBUTE_GROUPS"), XSDEditorPlugin.getDefault().getIconImage("obj16/attributegroupsheader"), attributeGroupList, xsdSchema, CategoryAdapter.ATTRIBUTE_GROUPS);
+    registerListener(fAttributeGroupsCategory);
+
+    fTypesCategory = new CategoryAdapter(XSDEditorPlugin.getResourceString("_UI_GRAPH_TYPES"), XSDEditorPlugin.getDefault().getIconImage("obj16/typesheader"), types, xsdSchema, CategoryAdapter.TYPES);
+    registerListener(fTypesCategory);
+
+    fGroupsCategory = new CategoryAdapter(XSDEditorPlugin.getResourceString("_UI_GRAPH_GROUPS"), XSDEditorPlugin.getDefault().getIconImage("obj16/groupsheader"), groups, xsdSchema, CategoryAdapter.GROUPS);
+    registerListener(fGroupsCategory);
+  }
+
+  public List getTypes()
+  {
+    if (types == null)
+    {
+      types = new ArrayList();
+      XSDSchema schema = (XSDSchema) target;
+      List concreteComponentList = new ArrayList();
+      for (Iterator i = schema.getContents().iterator(); i.hasNext();)
+      {
+        XSDConcreteComponent component = (XSDConcreteComponent) i.next();
+        if (component instanceof XSDTypeDefinition)
+        {
+          concreteComponentList.add(component);
+        }
+      }
+      populateAdapterList(concreteComponentList, types);
+    }
+    return types;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.eclipse.wst.xsd.adt.outline.ITreeElement#getChildren()
+   */
+  public ITreeElement[] getChildren()
+  {
+    XSDSchema xsdSchema = (XSDSchema) getTarget();
+
+    children = new ArrayList();
+
+    // just set categoryadapters' children if category adapters are
+    // already created
+    if (fDirectivesCategory != null)
+    {
+      List directivesList = getDirectives(xsdSchema);
+      List elementsList = getGlobalElements(xsdSchema);
+      List attributeGroupList = getAttributeGroupList(xsdSchema);
+      List attributesList = getAttributeList(xsdSchema);
+      List groups = getGroups(xsdSchema);
+      List types = getComplexTypes(xsdSchema);
+      types.addAll(getSimpleTypes(xsdSchema));
+
+      fDirectivesCategory.setChildren(directivesList);
+      fElementsCategory.setChildren(elementsList);
+      fAttributesCategory.setChildren(attributesList);
+      fAttributeGroupsCategory.setChildren(attributeGroupList);
+      fTypesCategory.setChildren(types);
+      fGroupsCategory.setChildren(groups);
+    }
+    else
+    {
+      createCategoryAdapters(xsdSchema);
+    }
+
+    children.add(fDirectivesCategory);
+    children.add(fElementsCategory);
+    children.add(fAttributesCategory);
+    children.add(fAttributeGroupsCategory);
+    children.add(fTypesCategory);
+    children.add(fGroupsCategory);
+
+    return (ITreeElement[]) children.toArray(new ITreeElement[0]);
+  }
+
+  public void notifyChanged(final Notification msg)
+  {
+    class CategoryNotification extends NotificationImpl
+    {
+      protected Object category;
+
+      public CategoryNotification(Object category)
+      {
+        super(msg.getEventType(), msg.getOldValue(), msg.getNewValue(), msg.getPosition());
+        this.category = category;
+      }
+
+      public Object getNotifier()
+      {
+        return category;
+      }
+
+      public Object getFeature()
+      {
+        return msg.getFeature();
+      }
+    }
+
+    if (children == null)
+    {
+      getChildren();
+    }
+
+    if (msg.getFeature() == XSDPackage.eINSTANCE.getXSDSchema_ReferencingDirectives())
+    {
+      CategoryAdapter adapter = getCategory(CategoryAdapter.DIRECTIVES);
+      Assert.isTrue(adapter != null);
+      XSDSchema xsdSchema = adapter.getXSDSchema();
+      adapter.setChildren(getDirectives(xsdSchema));
+      notifyListeners(new CategoryNotification(adapter), adapter.getText());
+      return;
+    }
+    else if (msg.getFeature() == XSDPackage.eINSTANCE.getXSDSchema_ElementDeclarations())
+    {
+      CategoryAdapter adapter = getCategory(CategoryAdapter.ELEMENTS);
+      Assert.isTrue(adapter != null);
+      XSDSchema xsdSchema = adapter.getXSDSchema();
+      adapter.setChildren(getGlobalElements(xsdSchema));
+      notifyListeners(new CategoryNotification(adapter), adapter.getText());
+      return;
+    }
+    else if (msg.getFeature() == XSDPackage.eINSTANCE.getXSDSchema_AttributeDeclarations())
+    {
+      CategoryAdapter adapter = getCategory(CategoryAdapter.ATTRIBUTES);
+      Assert.isTrue(adapter != null);
+      XSDSchema xsdSchema = adapter.getXSDSchema();
+      adapter.setChildren(getAttributeList(xsdSchema));
+      notifyListeners(new CategoryNotification(adapter), adapter.getText());
+      return;
+    }
+    else if (msg.getFeature() == XSDPackage.eINSTANCE.getXSDSchema_AttributeGroupDefinitions())
+    {
+      CategoryAdapter adapter = getCategory(CategoryAdapter.ATTRIBUTE_GROUPS);
+      Assert.isTrue(adapter != null);
+      XSDSchema xsdSchema = adapter.getXSDSchema();
+      adapter.setChildren(getAttributeGroupList(xsdSchema));
+      notifyListeners(new CategoryNotification(adapter), adapter.getText());
+      return;
+    }
+    else if (msg.getFeature() == XSDPackage.eINSTANCE.getXSDSchema_TypeDefinitions())
+    {
+      CategoryAdapter adapter = getCategory(CategoryAdapter.TYPES);
+      Assert.isTrue(adapter != null);
+      XSDSchema xsdSchema = adapter.getXSDSchema();
+      List types = getComplexTypes(xsdSchema);
+      types.addAll(getSimpleTypes(xsdSchema));
+
+      adapter.setChildren(types);
+      notifyListeners(new CategoryNotification(adapter), adapter.getText());
+      return;
+    }
+    else if (msg.getFeature() == XSDPackage.eINSTANCE.getXSDSchema_ModelGroupDefinitions())
+    {
+      CategoryAdapter adapter = getCategory(CategoryAdapter.GROUPS);
+      Assert.isTrue(adapter != null);
+      XSDSchema xsdSchema = adapter.getXSDSchema();
+      adapter.setChildren(getGroups(xsdSchema));
+      notifyListeners(new CategoryNotification(adapter), adapter.getText());
+      return;
+    }
+    else if (msg.getFeature() == XSDPackage.eINSTANCE.getXSDSchema_Annotations())
+    {
+      return;
+    }
+    else if (msg.getFeature() == XSDPackage.eINSTANCE.getXSDSchema_SchemaLocation())
+    {
+      notifyListeners(msg, null);
+      return;
+    }
+    
+    types = null;
+    getTypes();
+
+    super.notifyChanged(msg);
+  }
+  
+  protected CategoryAdapter getCategory(int category)
+  {
+    int length = children.size();
+    CategoryAdapter adapter = null;
+    for (int i = 0; i < length; i++)
+    {
+      adapter = (CategoryAdapter) children.get(i);
+      if (adapter.getGroupType() ==  category)
+      {
+        break;
+      }
+    }
+    return adapter;
+  }
+
+  protected List getDirectives(XSDSchema schema)
+  {
+    List list = new ArrayList();
+    for (Iterator i = schema.getContents().iterator(); i.hasNext();)
+    {
+      Object o = i.next();
+      if (o instanceof XSDSchemaDirective)
+      {
+        list.add(o);
+      }
+    }
+    List adapterList = new ArrayList();
+    populateAdapterList(list, adapterList);
+    return adapterList;
+  }
+
+  protected List getGlobalElements(XSDSchema schema)
+  {
+    List elements = schema.getElementDeclarations();
+    List list = new ArrayList();
+    for (Iterator i = elements.iterator(); i.hasNext();)
+    {
+      XSDElementDeclaration elem = (XSDElementDeclaration) i.next();
+      if (elem.getRootContainer() == schema)
+      {
+        list.add(elem);
+      }
+    }
+    List adapterList = new ArrayList();
+    populateAdapterList(list, adapterList);
+    return adapterList;
+  }
+
+  /**
+   * @param schema
+   * @return
+   */
+  protected List getComplexTypes(XSDSchema schema)
+  {
+    List allTypes = schema.getTypeDefinitions();
+    List list = new ArrayList();
+    for (Iterator i = allTypes.iterator(); i.hasNext();)
+    {
+      XSDTypeDefinition td = (XSDTypeDefinition) i.next();
+      if (td instanceof XSDComplexTypeDefinition)
+      {
+        XSDComplexTypeDefinition ct = (XSDComplexTypeDefinition) td;
+        if (ct.getRootContainer() == schema)
+        {
+          list.add(ct);
+        }
+      }
+    }
+    List adapterList = new ArrayList();
+    populateAdapterList(list, adapterList);
+    return adapterList;
+  }
+
+  protected List getAttributeGroupList(XSDSchema xsdSchema)
+  {
+    List attributeGroupList = new ArrayList();
+    for (Iterator i = xsdSchema.getAttributeGroupDefinitions().iterator(); i.hasNext();)
+    {
+      XSDAttributeGroupDefinition attrGroup = (XSDAttributeGroupDefinition) i.next();
+      if (attrGroup.getRootContainer() == xsdSchema)
+      {
+        attributeGroupList.add(attrGroup);
+      }
+    }
+    List adapterList = new ArrayList();
+    populateAdapterList(attributeGroupList, adapterList);
+    return adapterList;
+  }
+
+  protected List getAttributeList(XSDSchema xsdSchema)
+  {
+    List attributesList = new ArrayList();
+    for (Iterator iter = xsdSchema.getAttributeDeclarations().iterator(); iter.hasNext();)
+    {
+      Object o = iter.next();
+      if (o instanceof XSDAttributeDeclaration)
+      {
+        XSDAttributeDeclaration attr = (XSDAttributeDeclaration) o;
+        if (attr != null)
+        {
+          if (attr.getTargetNamespace() != null)
+          {
+            if (!(attr.getTargetNamespace().equals("http://www.w3.org/2001/XMLSchema-instance")))
+            {
+              if (attr.getRootContainer() == xsdSchema)
+              {
+                attributesList.add(attr);
+              }
+            }
+          }
+          else
+          {
+            if (attr.getRootContainer() == xsdSchema)
+            {
+              attributesList.add(attr);
+            }
+          }
+        }
+      }
+    }
+    List adapterList = new ArrayList();
+    populateAdapterList(attributesList, adapterList);
+    return adapterList;
+  }
+
+  protected List getSimpleTypes(XSDSchema schema)
+  {
+    List allTypes = schema.getTypeDefinitions();
+    List list = new ArrayList();
+    for (Iterator i = allTypes.iterator(); i.hasNext();)
+    {
+      XSDTypeDefinition td = (XSDTypeDefinition) i.next();
+      if (td instanceof XSDSimpleTypeDefinition)
+      {
+        XSDSimpleTypeDefinition st = (XSDSimpleTypeDefinition) td;
+        if (st.getRootContainer() == schema)
+        {
+          list.add(st);
+        }
+      }
+    }
+    List adapterList = new ArrayList();
+    populateAdapterList(list, adapterList);
+    return adapterList;
+  }
+
+  protected List getGroups(XSDSchema schema)
+  {
+    List groups = schema.getModelGroupDefinitions();
+    List list = new ArrayList();
+    for (Iterator i = groups.iterator(); i.hasNext();)
+    {
+      XSDModelGroupDefinition group = (XSDModelGroupDefinition) i.next();
+      if (group.getRootContainer() == schema)
+      {
+        list.add(group);
+      }
+    }
+    List adapterList = new ArrayList();
+    populateAdapterList(list, adapterList);
+    return adapterList;
+  }
+  
+  public String[] getActions(Object object)
+  {
+     Collection actionIDs = new ArrayList();
+     actionIDs.add(AddXSDElementAction.ID);
+     actionIDs.add(AddXSDComplexTypeDefinitionAction.ID);
+        
+     return (String [])actionIDs.toArray(new String[0]);
+  }
+
+  public void propertyChanged(Object object, String property)
+  {
+    notifyListeners(object, property);
+  }
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDSchemaDirectiveAdapter.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDSchemaDirectiveAdapter.java
new file mode 100644
index 0000000..a2a77bf
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDSchemaDirectiveAdapter.java
@@ -0,0 +1,115 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor.internal.adapters;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.wst.xsd.adt.outline.ITreeElement;
+import org.eclipse.wst.xsd.editor.XSDEditorPlugin;
+import org.eclipse.xsd.XSDAttributeGroupDefinition;
+import org.eclipse.xsd.XSDComplexTypeDefinition;
+import org.eclipse.xsd.XSDImport;
+import org.eclipse.xsd.XSDInclude;
+import org.eclipse.xsd.XSDModelGroupDefinition;
+import org.eclipse.xsd.XSDRedefinableComponent;
+import org.eclipse.xsd.XSDRedefine;
+import org.eclipse.xsd.XSDRedefineContent;
+import org.eclipse.xsd.XSDSchemaDirective;
+import org.eclipse.xsd.XSDSimpleTypeDefinition;
+
+public class XSDSchemaDirectiveAdapter extends XSDBaseAdapter
+{
+  public Image getImage()
+  {
+    XSDSchemaDirective object = (XSDSchemaDirective) target;
+    if (object instanceof XSDImport)
+    {
+      return XSDEditorPlugin.getXSDImage("icons/XSDImport.gif");
+    }
+    else if (object instanceof XSDInclude)
+    {
+      return XSDEditorPlugin.getXSDImage("icons/XSDInclude.gif");
+    }
+    else if (object instanceof XSDRedefine)
+    {
+      return XSDEditorPlugin.getXSDImage("icons/XSDRedefine.gif");
+    }
+    return null;
+  }
+
+  public String getText()
+  {
+    XSDSchemaDirective directive = (XSDSchemaDirective) target;
+    String result = directive.getSchemaLocation();
+    if (result == null)
+      result = "(" + XSDEditorPlugin.getXSDString("_UI_LABEL_NO_LOCATION_SPECIFIED") + ")";
+    if (result.equals(""))
+      result = "(" + XSDEditorPlugin.getXSDString("_UI_LABEL_NO_LOCATION_SPECIFIED") + ")";
+    return result;
+
+  }
+
+  public ITreeElement[] getChildren()
+  {
+    List list = new ArrayList();
+    if (target instanceof XSDRedefine)
+    {
+      XSDRedefine redefine = (XSDRedefine) target;
+      for (Iterator i = redefine.getContents().iterator(); i.hasNext();)
+      {
+        XSDRedefineContent redefineContent = (XSDRedefineContent) i.next();
+        if (redefineContent instanceof XSDAttributeGroupDefinition)
+        {
+          list.add((XSDAttributeGroupDefinition) redefine);
+        }
+        else if (redefineContent instanceof XSDModelGroupDefinition)
+        {
+          list.add((XSDModelGroupDefinition) redefineContent);
+        }
+        else if (redefineContent instanceof XSDRedefinableComponent)
+        {
+          XSDRedefinableComponent comp = (XSDRedefinableComponent) redefineContent;
+          if (comp instanceof XSDAttributeGroupDefinition)
+          {
+            list.add((XSDAttributeGroupDefinition) comp);
+          }
+          else if (comp instanceof XSDModelGroupDefinition)
+          {
+            list.add((XSDModelGroupDefinition) comp);
+          }
+          else if (comp instanceof XSDComplexTypeDefinition)
+          {
+            list.add((XSDComplexTypeDefinition) comp);
+          }
+          else if (comp instanceof XSDSimpleTypeDefinition)
+          {
+            list.add((XSDSimpleTypeDefinition) comp);
+          }
+        }
+        else if (redefineContent instanceof XSDComplexTypeDefinition)
+        {
+          list.add((XSDComplexTypeDefinition) redefineContent);
+        }
+        else if (redefineContent instanceof XSDSimpleTypeDefinition)
+        {
+          list.add((XSDSimpleTypeDefinition) redefineContent);
+        }
+      }
+
+    }
+    List adapterList = new ArrayList();
+    populateAdapterList(list, adapterList);
+    return (ITreeElement[]) adapterList.toArray(new ITreeElement[0]);
+  }
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDSimpleTypeDefinitionAdapter.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDSimpleTypeDefinitionAdapter.java
new file mode 100644
index 0000000..ddc67ee
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDSimpleTypeDefinitionAdapter.java
@@ -0,0 +1,163 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor.internal.adapters;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.wst.xsd.adt.facade.IType;
+import org.eclipse.wst.xsd.editor.XSDEditorPlugin;
+import org.eclipse.xsd.XSDSimpleTypeDefinition;
+import org.eclipse.xsd.XSDVariety;
+import org.eclipse.xsd.util.XSDConstants;
+
+public class XSDSimpleTypeDefinitionAdapter extends XSDTypeDefinitionAdapter implements IType
+{
+  public Image getImage()
+  {
+    XSDSimpleTypeDefinition xsdSimpleTypeDefinition = (XSDSimpleTypeDefinition) target;
+
+    if (xsdSimpleTypeDefinition.getContainer() == null)
+    {
+      return XSDEditorPlugin.getXSDImage("icons/XSDSimpleType.gif");
+    }
+
+    if (XSDVariety.LIST_LITERAL == xsdSimpleTypeDefinition.getVariety())
+    {
+      return XSDEditorPlugin.getPlugin().getIconImage("obj16/smpl_list_obj");
+    }
+    else if (XSDVariety.UNION_LITERAL == xsdSimpleTypeDefinition.getVariety())
+    {
+      return XSDEditorPlugin.getPlugin().getIconImage("obj16/smpl_union_obj");
+    }
+    else if (XSDVariety.ATOMIC_LITERAL == xsdSimpleTypeDefinition.getVariety())
+    {
+      if (xsdSimpleTypeDefinition.getPrimitiveTypeDefinition() != null)
+      {
+        return XSDEditorPlugin.getPlugin().getIconImage("obj16/smpl_restrict_obj");
+      }
+      return XSDEditorPlugin.getXSDImage("icons/XSDSimpleType.gif");
+    }
+    else if (xsdSimpleTypeDefinition.isSetVariety())
+    {
+      return XSDEditorPlugin.getXSDImage("icons/XSDSimpleType.gif");
+    }
+    else
+    {
+      return XSDEditorPlugin.getXSDImage("icons/XSDSimpleType.gif");
+    }
+  }
+  
+  public String getDisplayName()
+  {
+    XSDSimpleTypeDefinition xsdSimpleTypeDefinition = (XSDSimpleTypeDefinition) target;
+    return (xsdSimpleTypeDefinition.getName() == null ? "local type" : xsdSimpleTypeDefinition.getName());
+  }
+
+  public String getText()
+  {
+    return getText(true);
+  }
+
+  public String getText(boolean showType)
+  {
+    XSDSimpleTypeDefinition xsdSimpleTypeDefinition = (XSDSimpleTypeDefinition) target;
+
+    StringBuffer result = new StringBuffer();
+
+    result.append(xsdSimpleTypeDefinition.getName() == null ? "local type" : xsdSimpleTypeDefinition.getName());
+
+    if (showType)
+    {
+      XSDSimpleTypeDefinition baseTypeDefinition = xsdSimpleTypeDefinition.getBaseTypeDefinition();
+      if (baseTypeDefinition != null && XSDVariety.ATOMIC_LITERAL == xsdSimpleTypeDefinition.getVariety())
+      {
+        if (baseTypeDefinition.getName() != null && !xsdSimpleTypeDefinition.getContents().contains(baseTypeDefinition) && !XSDConstants.isAnySimpleType(baseTypeDefinition))
+        {
+          result.append(" : ");
+          result.append(baseTypeDefinition.getQName(xsdSimpleTypeDefinition));
+        }
+      }
+      else
+      {
+        XSDSimpleTypeDefinition itemTypeDefinition = xsdSimpleTypeDefinition.getItemTypeDefinition();
+        if (itemTypeDefinition != null)
+        {
+          if (itemTypeDefinition.getName() != null)
+          {
+            result.append(" : ");
+            result.append(itemTypeDefinition.getQName(xsdSimpleTypeDefinition));
+          }
+        }
+        else
+        {
+          List memberTypeDefinitions = xsdSimpleTypeDefinition.getMemberTypeDefinitions();
+          if (!memberTypeDefinitions.isEmpty())
+          {
+            boolean first = true;
+            for (Iterator members = memberTypeDefinitions.iterator(); members.hasNext();)
+            {
+              XSDSimpleTypeDefinition memberTypeDefinition = (XSDSimpleTypeDefinition) members.next();
+              if (memberTypeDefinition.getName() != null)
+              {
+                if (first)
+                {
+                  result.append(" : ");
+                  first = false;
+                }
+                else
+                {
+                  result.append(" | ");
+                }
+                result.append(memberTypeDefinition.getQName(xsdSimpleTypeDefinition));
+              }
+              else
+              {
+                break;
+              }
+            }
+          }
+          else if (result.length() == 0)
+          {
+            result.append("'absent'");
+          }
+        }
+      }
+    }
+
+    return result.toString();
+  }
+
+  public boolean hasChildren()
+  {
+    return false;
+  }
+  
+  public boolean isComplexType()
+  {
+    return false;
+  }
+
+  public boolean isFocusAllowed()
+  {
+    XSDSimpleTypeDefinition xsdSimpleTypeDefinition = (XSDSimpleTypeDefinition) target;
+    if (XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001.equals(xsdSimpleTypeDefinition.getTargetNamespace()))
+    {
+      return false;
+    }
+    if (xsdSimpleTypeDefinition.getName() == null)
+    {
+      return false;
+    }
+    return true;
+  }
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDTypeDefinitionAdapter.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDTypeDefinitionAdapter.java
new file mode 100644
index 0000000..74ece93
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDTypeDefinitionAdapter.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor.internal.adapters;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.wst.xsd.adt.facade.IType;
+import org.eclipse.xsd.XSDNamedComponent;
+import org.eclipse.xsd.XSDSchema;
+import org.eclipse.xsd.XSDTypeDefinition;
+
+public abstract class XSDTypeDefinitionAdapter extends XSDBaseAdapter implements IType
+{
+  public XSDTypeDefinition getXSDTypeDefinition()
+  {
+    return (XSDTypeDefinition)target;
+  }
+
+  public String getName()
+  {
+    if (getXSDTypeDefinition().eContainer() instanceof XSDSchema)
+    {  
+      return getXSDTypeDefinition().getName();
+    }
+    else 
+    {
+      EObject o = getXSDTypeDefinition().eContainer();
+      if (o instanceof XSDNamedComponent)
+      {
+         XSDNamedComponent ed = (XSDNamedComponent)o;
+         return "(" + ed.getName() + "Type)";               
+      }
+    }
+    return null;
+  }
+
+  public String getQualifier()
+  {
+    return getXSDTypeDefinition().getTargetNamespace();
+  }
+
+  public IType getSuperType()
+  {
+    XSDTypeDefinition td = getXSDTypeDefinition().getBaseType();
+    return td != null ? (IType)XSDAdapterFactory.getInstance().adapt(td) : null;
+  }
+
+  public Command getUpdateNameCommand(String newName)
+  {
+    // TODO Auto-generated method stub
+    return null;
+  }
+
+  public boolean isComplexType()
+  {
+    return false;
+  }    
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDVisitor.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDVisitor.java
new file mode 100644
index 0000000..208d8b7
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDVisitor.java
@@ -0,0 +1,219 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor.internal.adapters;
+
+import java.util.Iterator;
+
+import org.eclipse.xsd.XSDAttributeDeclaration;
+import org.eclipse.xsd.XSDAttributeGroupDefinition;
+import org.eclipse.xsd.XSDAttributeUse;
+import org.eclipse.xsd.XSDComplexTypeContent;
+import org.eclipse.xsd.XSDComplexTypeDefinition;
+import org.eclipse.xsd.XSDElementDeclaration;
+import org.eclipse.xsd.XSDIdentityConstraintDefinition;
+import org.eclipse.xsd.XSDModelGroup;
+import org.eclipse.xsd.XSDModelGroupDefinition;
+import org.eclipse.xsd.XSDNotationDeclaration;
+import org.eclipse.xsd.XSDParticle;
+import org.eclipse.xsd.XSDParticleContent;
+import org.eclipse.xsd.XSDSchema;
+import org.eclipse.xsd.XSDSimpleTypeDefinition;
+import org.eclipse.xsd.XSDTypeDefinition;
+import org.eclipse.xsd.XSDWildcard;
+
+public class XSDVisitor
+{
+  public XSDVisitor()
+  {
+  }
+  
+  protected XSDSchema schema;
+  
+  public void visitSchema(XSDSchema schema)
+  {
+    this.schema = schema;
+    for (Iterator iterator = schema.getAttributeDeclarations().iterator(); iterator.hasNext();)
+    {
+      XSDAttributeDeclaration attr = (XSDAttributeDeclaration) iterator.next();
+      visitAttributeDeclaration(attr);
+    }
+    for (Iterator iterator = schema.getTypeDefinitions().iterator(); iterator.hasNext();)
+    {
+      XSDTypeDefinition type = (XSDTypeDefinition) iterator.next();
+      visitTypeDefinition(type);
+    }
+    for (Iterator iterator = schema.getElementDeclarations().iterator(); iterator.hasNext();)
+    {
+      XSDElementDeclaration element = (XSDElementDeclaration) iterator.next();
+      visitElementDeclaration(element);
+    }
+    for (Iterator iterator = schema.getIdentityConstraintDefinitions().iterator(); iterator.hasNext();)
+    {
+      XSDIdentityConstraintDefinition identityConstraint = (XSDIdentityConstraintDefinition) iterator.next();
+      visitIdentityConstraintDefinition(identityConstraint);
+    }
+    for (Iterator iterator = schema.getModelGroupDefinitions().iterator(); iterator.hasNext();)
+    {
+      XSDModelGroupDefinition modelGroup = (XSDModelGroupDefinition) iterator.next();
+      visitModelGroupDefinition(modelGroup);
+    }
+    for (Iterator iterator = schema.getAttributeGroupDefinitions().iterator(); iterator.hasNext();)
+    {
+      XSDAttributeGroupDefinition attributeGroup = (XSDAttributeGroupDefinition) iterator.next();
+      visitAttributeGroupDefinition(attributeGroup);
+    }
+    for (Iterator iterator = schema.getNotationDeclarations().iterator(); iterator.hasNext();)
+    {
+      XSDNotationDeclaration element = (XSDNotationDeclaration) iterator.next();
+      visitNotationDeclaration(element);
+    }
+    
+  }
+  
+  public void visitAttributeDeclaration(XSDAttributeDeclaration attr)
+  {
+  }
+  
+  public void visitTypeDefinition(XSDTypeDefinition type)
+  {
+    if (type instanceof XSDSimpleTypeDefinition)
+    {
+      visitSimpleTypeDefinition((XSDSimpleTypeDefinition)type);
+    }
+    else if (type instanceof XSDComplexTypeDefinition)
+    {
+      visitComplexTypeDefinition((XSDComplexTypeDefinition)type);
+    }
+  }
+  
+  public void visitElementDeclaration(XSDElementDeclaration element)
+  {
+    if (element.isElementDeclarationReference())
+    {
+      visitElementDeclaration(element.getResolvedElementDeclaration());
+    }
+    else if (element.getAnonymousTypeDefinition() != null)
+    {
+      visitTypeDefinition(element.getAnonymousTypeDefinition());
+    }
+  }
+  
+  public void visitIdentityConstraintDefinition(XSDIdentityConstraintDefinition identityConstraint)
+  {
+  }
+  
+  public void visitModelGroupDefinition(XSDModelGroupDefinition modelGroupDef)
+  {
+    if (!modelGroupDef.isModelGroupDefinitionReference())
+    {
+      if (modelGroupDef.getModelGroup() != null)
+      {
+        visitModelGroup(modelGroupDef.getModelGroup());
+      }
+    }
+    else
+    {
+      XSDModelGroup modelGroup = modelGroupDef.getResolvedModelGroupDefinition().getModelGroup();
+      if (modelGroup != null)
+      {
+        visitModelGroup(modelGroup);
+      }
+    }
+  }
+
+  public void visitAttributeGroupDefinition(XSDAttributeGroupDefinition attributeGroup)
+  {
+    for (Iterator it = attributeGroup.getContents().iterator(); it.hasNext(); )
+    {
+      Object o = it.next();
+      if (o instanceof XSDAttributeUse)
+      {
+        XSDAttributeUse attrUse = (XSDAttributeUse)o;
+        visitAttributeDeclaration(attrUse.getContent());
+      }
+      else if (o instanceof XSDAttributeGroupDefinition)
+      {
+        XSDAttributeGroupDefinition attrGroup = (XSDAttributeGroupDefinition)o;
+        visitAttributeGroupDefinition(attrGroup.getResolvedAttributeGroupDefinition());
+      }
+    }
+  }
+  
+  public void visitNotationDeclaration(XSDNotationDeclaration notation)
+  {
+  }
+  
+  public void visitSimpleTypeDefinition(XSDSimpleTypeDefinition type)
+  {
+  }
+  
+  public void visitComplexTypeContent(XSDSimpleTypeDefinition content)
+  {
+    
+  }
+  
+  public void visitComplexTypeDefinition(XSDComplexTypeDefinition type)
+  {
+    if (type.getContent() != null)
+    {
+      XSDComplexTypeContent complexContent = type.getContent();
+      if (complexContent instanceof XSDSimpleTypeDefinition)
+      {
+        visitComplexTypeContent((XSDSimpleTypeDefinition)complexContent);
+      }
+      else if (complexContent instanceof XSDParticle)
+      {
+        visitParticle((XSDParticle) complexContent);
+      }
+    }
+  }
+  
+  public void visitParticle(XSDParticle particle)
+  {
+    visitParticleContent(particle.getContent());
+  }
+  
+  public void visitParticleContent(XSDParticleContent particleContent)
+  {
+    if (particleContent instanceof XSDModelGroupDefinition)
+    {
+      visitModelGroupDefinition((XSDModelGroupDefinition) particleContent);
+    }
+    else if (particleContent instanceof XSDModelGroup)
+    {
+      visitModelGroup((XSDModelGroup)particleContent);
+    }
+    else if (particleContent instanceof XSDElementDeclaration)
+    {
+      visitElementDeclaration((XSDElementDeclaration)particleContent);
+    }
+    else if (particleContent instanceof XSDWildcard)
+    {
+      visitWildcard((XSDWildcard)particleContent);
+    }
+  }
+  
+  public void visitModelGroup(XSDModelGroup modelGroup)
+  {
+    if (modelGroup.getContents() != null)
+    {
+      for (Iterator iterator = modelGroup.getContents().iterator(); iterator.hasNext();)
+      {
+        XSDParticle particle = (XSDParticle) iterator.next();
+        visitParticle(particle);
+      }
+    }
+  }
+  
+  public void visitWildcard(XSDWildcard wildcard)
+  {
+  }
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDVisitorForFields.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDVisitorForFields.java
new file mode 100644
index 0000000..59b236d
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDVisitorForFields.java
@@ -0,0 +1,166 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor.internal.adapters;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.xsd.XSDAttributeDeclaration;
+import org.eclipse.xsd.XSDAttributeGroupContent;
+import org.eclipse.xsd.XSDAttributeGroupDefinition;
+import org.eclipse.xsd.XSDAttributeUse;
+import org.eclipse.xsd.XSDComplexTypeDefinition;
+import org.eclipse.xsd.XSDElementDeclaration;
+import org.eclipse.xsd.XSDModelGroup;
+import org.eclipse.xsd.XSDModelGroupDefinition;
+import org.eclipse.xsd.XSDParticle;
+import org.eclipse.xsd.XSDSimpleTypeDefinition;
+
+public class XSDVisitorForFields extends XSDVisitor
+{
+  public XSDVisitorForFields()
+  {
+  }
+
+  public List concreteComponentList = new ArrayList();
+  public List thingsWeNeedToListenTo = new ArrayList();
+  
+  public void visitComplexTypeDefinition(XSDComplexTypeDefinition type)
+  {
+    if (type.getAttributeContents() != null)
+    {
+      for (Iterator iter = type.getAttributeContents().iterator(); iter.hasNext(); )
+      {
+        XSDAttributeGroupContent attrGroupContent = (XSDAttributeGroupContent)iter.next();
+        if (attrGroupContent instanceof XSDAttributeUse)
+        {
+          XSDAttributeUse attrUse = (XSDAttributeUse)attrGroupContent;
+          
+          visitAttributeDeclaration(attrUse.getContent());
+
+//          if (attrUse.getAttributeDeclaration() != attrUse.getContent())
+//          {
+//            visitAttributeDeclaration(attrUse.getContent());
+//          }
+//          else
+//          {
+//            thingsWeNeedToListenTo.add(attrUse.getAttributeDeclaration());
+//            concreteComponentList.add(attrUse.getAttributeDeclaration());
+//          }
+        }
+        else if (attrGroupContent instanceof XSDAttributeGroupDefinition)
+        {
+          XSDAttributeGroupDefinition attrGroup = (XSDAttributeGroupDefinition)attrGroupContent;
+          thingsWeNeedToListenTo.add(attrGroup);
+          if (attrGroup.isAttributeGroupDefinitionReference())
+          {
+            attrGroup = attrGroup.getResolvedAttributeGroupDefinition();
+            visitAttributeGroupDefinition(attrGroup);
+          }
+        }
+      }
+    }   
+    super.visitComplexTypeDefinition(type);
+  }
+  
+  public void visitComplexTypeContent(XSDSimpleTypeDefinition content)
+  {
+    thingsWeNeedToListenTo.add(content);
+    
+    super.visitComplexTypeContent(content);   
+  }
+
+  
+  public void visitModelGroupDefinition(XSDModelGroupDefinition modelGroupDef)
+  {
+    if (modelGroupDef.isModelGroupDefinitionReference())
+    {
+      // if it's a reference we need to listen to the reference incase it changes
+      thingsWeNeedToListenTo.add(modelGroupDef);      
+    }    
+    // listen to definition incase it changes
+    XSDModelGroupDefinition resolvedModelGroupDef = modelGroupDef.getResolvedModelGroupDefinition();
+    thingsWeNeedToListenTo.add(resolvedModelGroupDef);
+    super.visitModelGroupDefinition(modelGroupDef);      
+  }
+  
+  public void visitModelGroup(XSDModelGroup modelGroup)
+  {
+    super.visitModelGroup(modelGroup);
+    thingsWeNeedToListenTo.add(modelGroup); 
+  }
+  
+  public void visitAttributeGroupDefinition(XSDAttributeGroupDefinition attributeGroup)
+  {
+    for (Iterator it = attributeGroup.getContents().iterator(); it.hasNext(); )
+    {
+      Object o = it.next();
+      if (o instanceof XSDAttributeUse)
+      {
+        XSDAttributeUse attributeUse = (XSDAttributeUse)o;
+        concreteComponentList.add(attributeUse.getAttributeDeclaration());
+        thingsWeNeedToListenTo.add(attributeUse.getAttributeDeclaration());
+      }
+      else if (o instanceof XSDAttributeGroupDefinition)
+      {
+        XSDAttributeGroupDefinition attrGroup = (XSDAttributeGroupDefinition)o;
+        thingsWeNeedToListenTo.add(attrGroup);
+        if (attrGroup.isAttributeGroupDefinitionReference())
+        {
+          attrGroup = attrGroup.getResolvedAttributeGroupDefinition();
+          visitAttributeGroupDefinition(attrGroup);
+        }
+      }
+    }
+  }
+  
+  public void visitParticle(XSDParticle particle)
+  {
+    thingsWeNeedToListenTo.add(particle);
+    super.visitParticle(particle);
+  }
+
+  public void visitElementDeclaration(XSDElementDeclaration element)
+  {
+    if (element.isElementDeclarationReference())
+    {
+      thingsWeNeedToListenTo.add(element);
+      thingsWeNeedToListenTo.add(element.getResolvedElementDeclaration());
+      // now, add the reference as a field
+      concreteComponentList.add(element);
+    }
+    else
+    {
+      concreteComponentList.add(element.getResolvedElementDeclaration());
+      // note... we intentionally ommit the call to super.visitElementDeclaration()
+      // since we don't want to delve down deeper than the element      
+    }
+  }
+  
+  public void visitAttributeDeclaration(XSDAttributeDeclaration attr)
+  {
+    if (attr.isAttributeDeclarationReference())
+    {
+      thingsWeNeedToListenTo.add(attr);
+      thingsWeNeedToListenTo.add(attr.getResolvedAttributeDeclaration());
+      concreteComponentList.add(attr);
+    }
+    else
+    {
+      concreteComponentList.add(attr.getResolvedAttributeDeclaration());
+      thingsWeNeedToListenTo.add(attr.getResolvedAttributeDeclaration());
+    }
+  }
+}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDWildcardAdapter.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDWildcardAdapter.java
new file mode 100644
index 0000000..1ab8da8
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/adapters/XSDWildcardAdapter.java
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor.internal.adapters;
+
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.wst.xsd.editor.XSDEditorPlugin;
+import org.eclipse.xsd.XSDParticle;
+import org.eclipse.xsd.XSDWildcard;
+import org.eclipse.xsd.util.XSDConstants;
+import org.w3c.dom.Element;
+
+public class XSDWildcardAdapter extends XSDBaseAdapter
+{
+
+  public XSDWildcardAdapter()
+  {
+
+  }
+
+  public Image getImage()
+  {
+    XSDWildcard xsdWildcard = (XSDWildcard) target;
+    return XSDEditorPlugin.getXSDImage(xsdWildcard.eContainer() instanceof XSDParticle ? "icons/XSDAny.gif" : "icons/XSDAnyAttribute.gif");
+  }
+
+  public String getText()
+  {
+    XSDWildcard xsdWildcard = (XSDWildcard) target;
+
+    StringBuffer result = new StringBuffer();
+    Element element = xsdWildcard.getElement();
+
+    if (element != null)
+    {
+      result.append(element.getNodeName());
+      boolean hasMinOccurs = element.hasAttribute(XSDConstants.MINOCCURS_ATTRIBUTE);
+      boolean hasMaxOccurs = element.hasAttribute(XSDConstants.MAXOCCURS_ATTRIBUTE);
+
+      if (hasMinOccurs || hasMaxOccurs)
+      {
+        result.append(" ["); //$NON-NLS-1$
+        if (hasMinOccurs)
+        {
+
+          int min = ((XSDParticle) xsdWildcard.getContainer()).getMinOccurs();
+          if (min == XSDParticle.UNBOUNDED)
+          {
+            result.append("*");
+          }
+          else
+          {
+            result.append(String.valueOf(min));
+          }
+        }
+        else
+        // print default
+        {
+          int min = ((XSDParticle) xsdWildcard.getContainer()).getMinOccurs();
+          result.append(String.valueOf(min));
+        }
+        if (hasMaxOccurs)
+        {
+          int max = ((XSDParticle) xsdWildcard.getContainer()).getMaxOccurs();
+          result.append("..");
+          if (max == XSDParticle.UNBOUNDED)
+          {
+            result.append("*");
+          }
+          else
+          {
+            result.append(String.valueOf(max));
+          }
+        }
+        else
+        // print default
+        {
+          result.append("..");
+          int max = ((XSDParticle) xsdWildcard.getContainer()).getMaxOccurs();
+          result.append(String.valueOf(max));
+        }
+        result.append("]");
+      }
+    }
+    return result.toString();
+
+  }
+
+  public boolean hasChildren()
+  {
+    return false;
+  }
+
+  public Object getParent(Object object)
+  {
+    XSDWildcard xsdWildcard = (XSDWildcard) target;
+    return xsdWildcard.getContainer();
+  }
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/design/editparts/AttributeGroupDefinitionEditPart.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/design/editparts/AttributeGroupDefinitionEditPart.java
new file mode 100644
index 0000000..3c48693
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/design/editparts/AttributeGroupDefinitionEditPart.java
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor.internal.design.editparts;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.wst.xsd.adt.design.editparts.BaseEditPart;
+import org.eclipse.wst.xsd.adt.design.editparts.CenteredConnectionAnchor;
+import org.eclipse.wst.xsd.editor.XSDEditorPlugin;
+import org.eclipse.wst.xsd.editor.internal.adapters.XSDAdapterFactory;
+import org.eclipse.wst.xsd.editor.internal.adapters.XSDAttributeGroupDefinitionAdapter;
+import org.eclipse.wst.xsd.editor.internal.adapters.XSDBaseAdapter;
+import org.eclipse.wst.xsd.editor.internal.design.editparts.model.TargetConnectionSpaceFiller;
+import org.eclipse.wst.xsd.editor.internal.design.figures.GenericGroupFigure;
+import org.eclipse.xsd.XSDAttributeGroupContent;
+import org.eclipse.xsd.XSDAttributeGroupDefinition;
+
+public class AttributeGroupDefinitionEditPart extends ConnectableEditPart
+{
+  public static final Image ATTRIBUTE_GROUP_REF_ICON_IMAGE = XSDEditorPlugin.getImageDescriptor("obj16/attributeGroupRef.gif", true).createImage();
+
+  public AttributeGroupDefinitionEditPart()
+  {
+    super();
+  }
+
+  public XSDAttributeGroupDefinition getXSDAttributeGroupDefinition()
+  {
+    if (getModel() instanceof XSDAttributeGroupDefinitionAdapter)
+    {
+      XSDAttributeGroupDefinitionAdapter adapter = (XSDAttributeGroupDefinitionAdapter) getModel();
+      return (XSDAttributeGroupDefinition) adapter.getTarget();
+    }
+//    else if (getModel() instanceof XSDAttributeGroupDefinition)
+//    {
+//      return (XSDAttributeGroupDefinition) getModel();
+//    }
+    return null;
+
+  }
+
+  protected IFigure createFigure()
+  {
+    GenericGroupFigure figure = new GenericGroupFigure();
+    figure.getIconFigure().image = ATTRIBUTE_GROUP_REF_ICON_IMAGE;
+    return figure;
+  }
+
+  protected List getModelChildren()
+  {
+    List list = new ArrayList();
+    
+    XSDAttributeGroupDefinitionAdapter adapter = (XSDAttributeGroupDefinitionAdapter)getModel();
+    XSDAttributeGroupDefinition attributeGroupDefinition = adapter.getXSDAttributeGroupDefinition();
+    Iterator i = attributeGroupDefinition.getResolvedAttributeGroupDefinition().getContents().iterator();
+
+    while (i.hasNext())
+    {
+      XSDAttributeGroupContent attrGroupContent = (XSDAttributeGroupContent) i.next();
+
+      if (attrGroupContent instanceof XSDAttributeGroupDefinition)
+      {
+        list.add(XSDAdapterFactory.getInstance().adapt(attrGroupContent));
+      }
+      else
+      {
+        list.add(new TargetConnectionSpaceFiller((XSDBaseAdapter)getModel()));
+      }
+    }
+    
+    if (list.isEmpty())
+    {
+      list.add(new TargetConnectionSpaceFiller((XSDBaseAdapter)getModel()));
+    }
+
+    return list;
+  }
+
+
+  public ReferenceConnection createConnectionFigure(BaseEditPart child)
+  {
+    ReferenceConnection connectionFigure = new ReferenceConnection();
+
+    connectionFigure.setSourceAnchor(new CenteredConnectionAnchor(((GenericGroupFigure)getFigure()).getIconFigure(), CenteredConnectionAnchor.RIGHT, 0, 0));
+
+    if (child instanceof AttributeGroupDefinitionEditPart)
+    {
+      connectionFigure.setTargetAnchor(new CenteredConnectionAnchor(((AttributeGroupDefinitionEditPart) child).getTargetFigure(), CenteredConnectionAnchor.LEFT, 0, 0));
+    }
+    else if (child instanceof TargetConnectionSpacingFigureEditPart)
+    {
+      TargetConnectionSpacingFigureEditPart elem = (TargetConnectionSpacingFigureEditPart) child;
+      connectionFigure.setTargetAnchor(new CenteredConnectionAnchor(((TargetConnectionSpacingFigureEditPart) child).getFigure(), CenteredConnectionAnchor.LEFT, 0, 0));
+    }
+
+    connectionFigure.setHighlight(false);
+    return connectionFigure;
+  }
+
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/design/editparts/ConnectableEditPart.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/design/editparts/ConnectableEditPart.java
new file mode 100644
index 0000000..9d9acf1
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/design/editparts/ConnectableEditPart.java
@@ -0,0 +1,225 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor.internal.design.editparts;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.Figure;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.RectangleFigure;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPartFactory;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.LayerConstants;
+import org.eclipse.wst.xsd.adt.design.editparts.BaseEditPart;
+import org.eclipse.wst.xsd.adt.design.editpolicies.ADTSelectionFeedbackEditPolicy;
+import org.eclipse.wst.xsd.editor.internal.adapters.XSDBaseAdapter;
+import org.eclipse.wst.xsd.editor.internal.design.figures.GenericGroupFigure;
+import org.eclipse.wst.xsd.editor.internal.design.figures.IExtendedFigureFactory;
+import org.eclipse.xsd.XSDConcreteComponent;
+
+public abstract class ConnectableEditPart extends BaseEditPart
+{
+  protected ArrayList connectionFigures = new ArrayList();
+  
+  public IExtendedFigureFactory getExtendedFigureFactory()
+  {
+    EditPartFactory factory = getViewer().getEditPartFactory();
+    Assert.isTrue(factory instanceof IExtendedFigureFactory, "EditPartFactory must be an instanceof of IExtendedFigureFactory");    
+    return (IExtendedFigureFactory)factory; 
+  }
+  
+  public ConnectableEditPart()
+  {
+    super();
+  }
+  
+  protected IFigure createFigure()
+  {
+    GenericGroupFigure figure = new GenericGroupFigure();
+    return figure;
+  }
+
+  public XSDConcreteComponent getXSDConcreteComponent()
+  {
+    return (XSDConcreteComponent)((XSDBaseAdapter)getModel()).getTarget();
+  }
+  
+  public List getConnectionFigures()
+  {
+    return connectionFigures;
+  }
+  
+  public abstract ReferenceConnection createConnectionFigure(BaseEditPart child);
+  
+  public void activate()
+  {
+    super.activate();
+    activateConnection();
+  }
+
+  protected void activateConnection()
+  {
+    if (connectionFigures == null)
+    {
+      connectionFigures = new ArrayList();
+    }
+    for (Iterator i = getChildren().iterator(); i.hasNext();)
+    {
+      Object o = i.next();
+      if (o instanceof BaseEditPart)
+      {
+        BaseEditPart g = (BaseEditPart) o;
+        ReferenceConnection figure = createConnectionFigure(g);
+        connectionFigures.add(figure);
+        figure.setPoints(figure.getPoints());
+
+        getLayer(LayerConstants.CONNECTION_LAYER).add(figure);
+      }
+    }
+  }
+  
+  public void deactivate()
+  {
+    super.deactivate();
+    deactivateConnection();
+  }
+
+  protected void deactivateConnection()
+  {
+    // if we have a connection, remove it
+    ReferenceConnection connectionFigure;
+    if (connectionFigures != null && !connectionFigures.isEmpty())
+    {
+      for (Iterator i = connectionFigures.iterator(); i.hasNext();)
+      {
+        connectionFigure = (ReferenceConnection) i.next();
+
+        if (getLayer(LayerConstants.CONNECTION_LAYER).getChildren().contains(connectionFigure))
+        {
+          getLayer(LayerConstants.CONNECTION_LAYER).remove(connectionFigure);
+        }
+      }
+      connectionFigures = null;
+    }
+  }
+
+  public void refresh()
+  {
+    super.refresh();
+    refreshConnection();
+  }
+
+  protected void refreshConnection()
+  {
+    if (!isActive())
+      return;
+
+    if (connectionFigures == null || connectionFigures.isEmpty())
+    {
+      activateConnection();
+    }
+    else
+    {
+      deactivateConnection();
+      activateConnection();
+    }
+  }
+  
+  RectangleFigure selectionFeedbackFigure;
+  public void addFeedback()
+  {
+    ReferenceConnection connectionFigure;
+    if (connectionFigures != null && !connectionFigures.isEmpty())
+    {
+      for (Iterator i = connectionFigures.iterator(); i.hasNext();)
+      {
+        connectionFigure = (ReferenceConnection) i.next();
+        connectionFigure.setHighlight(true);
+      }
+    }
+    GenericGroupFigure figure = (GenericGroupFigure)getFigure();
+    Rectangle r = figure.getIconFigure().getBounds();
+    Rectangle zoomedRect = getZoomedBounds(r);
+    selectionFeedbackFigure = new RectangleFigure();
+    selectionFeedbackFigure.setForegroundColor(ColorConstants.blue);
+    selectionFeedbackFigure.setBounds(zoomedRect);
+    selectionFeedbackFigure.setFill(false);
+    selectionFeedbackFigure.setOpaque(true);
+    selectionFeedbackFigure.setLineWidth(1);
+    getLayer(LayerConstants.FEEDBACK_LAYER).add(selectionFeedbackFigure);
+  }
+  
+  public void removeFeedback()
+  {
+    ReferenceConnection connectionFigure;
+    if (connectionFigures != null && !connectionFigures.isEmpty())
+    {
+      for (Iterator i = connectionFigures.iterator(); i.hasNext();)
+      {
+        connectionFigure = (ReferenceConnection) i.next();
+        connectionFigure.setHighlight(false);
+      }
+    }
+    if (selectionFeedbackFigure != null)
+    {
+      getLayer(LayerConstants.FEEDBACK_LAYER).remove(selectionFeedbackFigure);
+    }
+    selectionFeedbackFigure = null;
+  }
+  
+  protected void refreshVisuals()
+  {
+    super.refreshVisuals();
+    if (selectionFeedbackFigure != null)
+    {
+      GenericGroupFigure figure = (GenericGroupFigure)getFigure();
+      Rectangle r = figure.getIconFigure().getBounds();
+      Rectangle zoomedRect = getZoomedBounds(r);
+      selectionFeedbackFigure.setBounds(zoomedRect);
+      selectionFeedbackFigure.repaint();
+      selectionFeedbackFigure.revalidate();
+    }
+  }
+
+  protected void createEditPolicies()
+  {
+    installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new ADTSelectionFeedbackEditPolicy());
+  }
+
+  protected void addChildVisual(EditPart childEditPart, int index)
+  {
+    IFigure child = ((GraphicalEditPart) childEditPart).getFigure();
+    getContentPane().add(child, index);
+  }
+
+  protected void removeChildVisual(EditPart childEditPart)
+  {
+    IFigure child = ((GraphicalEditPart) childEditPart).getFigure();
+    getContentPane().remove(child);
+  }
+  
+  public IFigure getContentPane()
+  {
+    return ((GenericGroupFigure)getFigure()).getContentFigure();
+  }
+
+  public Figure getTargetFigure()
+  {
+    return ((GenericGroupFigure)getFigure()).getTargetFigure();
+  }
+
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/design/editparts/ModelGroupDefinitionReferenceEditPart.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/design/editparts/ModelGroupDefinitionReferenceEditPart.java
new file mode 100644
index 0000000..33c4989
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/design/editparts/ModelGroupDefinitionReferenceEditPart.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor.internal.design.editparts;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.wst.xsd.adt.design.editparts.BaseEditPart;
+import org.eclipse.wst.xsd.adt.design.editparts.CenteredConnectionAnchor;
+import org.eclipse.wst.xsd.editor.XSDEditorPlugin;
+import org.eclipse.wst.xsd.editor.internal.adapters.XSDAdapterFactory;
+import org.eclipse.wst.xsd.editor.internal.adapters.XSDModelGroupDefinitionAdapter;
+import org.eclipse.wst.xsd.editor.internal.design.figures.GenericGroupFigure;
+import org.eclipse.xsd.XSDModelGroup;
+import org.eclipse.xsd.XSDModelGroupDefinition;
+
+public class ModelGroupDefinitionReferenceEditPart extends ConnectableEditPart
+{
+  public static final Image image = XSDEditorPlugin.getImageDescriptor("XSDGroupRef.gif", true).createImage();
+
+  public ModelGroupDefinitionReferenceEditPart()
+  {
+    super();
+  }
+
+  protected IFigure createFigure()
+  {
+    GenericGroupFigure figure = new GenericGroupFigure();
+    figure.getIconFigure().image = image;
+    return figure;
+  }
+
+  protected List getModelChildren()
+  {
+    List list = new ArrayList();
+
+    XSDModelGroupDefinitionAdapter adapter = (XSDModelGroupDefinitionAdapter)getModel();
+    XSDModelGroup xsdModelGroup = ((XSDModelGroupDefinition) adapter.getTarget()).getResolvedModelGroupDefinition().getModelGroup();
+    if (xsdModelGroup != null)
+      list.add(XSDAdapterFactory.getInstance().adapt(xsdModelGroup));
+    return list;
+  }
+
+  public ReferenceConnection createConnectionFigure(BaseEditPart child)
+  {
+    ReferenceConnection connectionFigure = new ReferenceConnection();
+
+    connectionFigure.setSourceAnchor(new CenteredConnectionAnchor(((GenericGroupFigure)getFigure()).getIconFigure(), CenteredConnectionAnchor.RIGHT, 0, 0));
+
+    if (child instanceof ModelGroupEditPart)
+    {
+      connectionFigure.setTargetAnchor(new CenteredConnectionAnchor(((ModelGroupEditPart) child).getTargetFigure(), CenteredConnectionAnchor.LEFT, 0, 0));
+    }
+    connectionFigure.setHighlight(false);
+    return connectionFigure;
+  }
+
+
+}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/design/editparts/ModelGroupEditPart.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/design/editparts/ModelGroupEditPart.java
new file mode 100644
index 0000000..d0d299e
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/design/editparts/ModelGroupEditPart.java
@@ -0,0 +1,186 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.editor.internal.design.editparts;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.wst.xsd.adt.design.editparts.BaseEditPart;
+import org.eclipse.wst.xsd.adt.design.editparts.CenteredConnectionAnchor;
+import org.eclipse.wst.xsd.editor.internal.adapters.XSDAdapterFactory;
+import org.eclipse.wst.xsd.editor.internal.adapters.XSDBaseAdapter;
+import org.eclipse.wst.xsd.editor.internal.adapters.XSDModelGroupAdapter;
+import org.eclipse.wst.xsd.editor.internal.design.editparts.model.TargetConnectionSpaceFiller;
+import org.eclipse.wst.xsd.editor.internal.design.figures.GenericGroupFigure;
+import org.eclipse.wst.xsd.editor.internal.design.figures.ModelGroupFigure;
+import org.eclipse.xsd.XSDCompositor;
+import org.eclipse.xsd.XSDElementDeclaration;
+import org.eclipse.xsd.XSDModelGroup;
+import org.eclipse.xsd.XSDModelGroupDefinition;
+import org.eclipse.xsd.XSDParticle;
+
+public class ModelGroupEditPart extends ConnectableEditPart
+{
+  protected IFigure createFigure()
+  {
+    return getExtendedFigureFactory().createModelGroupFigure(getModel());
+  }
+  
+  public XSDParticle getXSDParticle()
+  {
+    Object o = getXSDModelGroup().getContainer();
+    return (o instanceof XSDParticle) ? (XSDParticle) o : null;
+  }
+
+  public XSDModelGroup getXSDModelGroup()
+  {
+    if (getModel() instanceof XSDModelGroupAdapter)
+    {
+      XSDModelGroupAdapter adapter = (XSDModelGroupAdapter) getModel();
+      return (XSDModelGroup) adapter.getTarget();
+    }
+//    else if (getModel() instanceof XSDModelGroup)
+//    {
+//      return (XSDModelGroup) getModel();
+//    }
+    return null;
+
+  }
+
+  
+  
+  protected void refreshVisuals()
+  {
+    String iconName = "icons/newSequence.gif";
+    GenericGroupFigure modelGroupFigure = (GenericGroupFigure)getFigure();
+    switch (getXSDModelGroup().getCompositor().getValue())
+    {
+      case XSDCompositor.ALL:
+      {
+        modelGroupFigure.getIconFigure().image = ModelGroupFigure.ALL_ICON_IMAGE;
+        break;
+      }
+      case XSDCompositor.CHOICE:
+      {
+        modelGroupFigure.getIconFigure().image = ModelGroupFigure.CHOICE_ICON_IMAGE;
+        break;
+      }
+      case XSDCompositor.SEQUENCE:
+      {
+        modelGroupFigure.getIconFigure().image = ModelGroupFigure.SEQUENCE_ICON_IMAGE;
+        break;
+      }
+    }
+
+    XSDModelGroupAdapter adapter = (XSDModelGroupAdapter) getModel();
+//    String occurenceDescription = adapter.getNameAnnotationToolTipString();
+//    modelGroupFigure.getIconFigure().setToolTip(occurenceDescription);
+
+    // TODO: commmon this up with XSDParticleAdapter's code
+    
+    // -2 means the user didn't specify (so the default is 1)
+    int minOccurs = adapter.getMinOccurs();
+    int maxOccurs = adapter.getMaxOccurs();
+    String occurenceDescription = "";
+    
+    if (minOccurs == -3 && maxOccurs == -3)
+    {
+      occurenceDescription = "";
+    }
+    else if (minOccurs == 0 && (maxOccurs == -2 || maxOccurs == 1))
+    {
+      occurenceDescription = "[0..1]";
+    }
+    else if ((minOccurs == 1 && maxOccurs == 1) ||
+             (minOccurs == -2 && maxOccurs == 1) ||
+             (minOccurs == 1 && maxOccurs == -2))
+    {
+      occurenceDescription = "[1..1]";
+    }
+    else if (minOccurs == -2 && maxOccurs == -2)
+    {
+      occurenceDescription = "";
+    }
+    else
+    {
+      if (maxOccurs == -2) maxOccurs = 1;
+      String maxSymbol = maxOccurs == -1 ? "*" : "" + maxOccurs;
+      
+      String minSymbol = minOccurs == -2 ? "1" : "" + minOccurs;
+      occurenceDescription = "[" + minSymbol + ".." + maxSymbol + "]";
+    }
+
+    modelGroupFigure.getIconFigure().setToolTipText(occurenceDescription);
+    modelGroupFigure.getIconFigure().repaint();
+
+    refreshConnection();
+  }
+
+  protected List getModelChildren()
+  {
+    List list = new ArrayList();
+    XSDModelGroup xsdModelGroup = getXSDModelGroup();
+    for (Iterator i = xsdModelGroup.getContents().iterator(); i.hasNext();)
+    {
+      XSDParticle next = (XSDParticle) i.next();
+      if (next.getContent() instanceof XSDElementDeclaration)
+      {
+        XSDElementDeclaration elementDeclaration = (XSDElementDeclaration) next.getContent();
+        Adapter adapter = XSDAdapterFactory.getInstance().adapt(elementDeclaration);
+        list.add(new TargetConnectionSpaceFiller((XSDBaseAdapter)adapter));
+      }
+      if (next.getContent() instanceof XSDModelGroupDefinition)
+      {
+        XSDModelGroupDefinition def = (XSDModelGroupDefinition) next.getContent();
+        Adapter adapter = XSDAdapterFactory.getInstance().adapt(def);
+        list.add(adapter);
+      }
+      else if (next.getTerm() instanceof XSDModelGroup)
+      {
+        XSDModelGroup modelGroup = (XSDModelGroup) next.getTerm();
+        Adapter adapter = XSDAdapterFactory.getInstance().adapt(modelGroup);
+        list.add(adapter);
+      }
+    }
+
+    if (list.size() == 0)
+      list.add(new TargetConnectionSpaceFiller(null));
+
+    return list;
+  }
+
+  public ReferenceConnection createConnectionFigure(BaseEditPart child)
+  {
+    ReferenceConnection connectionFigure = new ReferenceConnection();
+    GenericGroupFigure modelGroupFigure = (GenericGroupFigure)getFigure();
+    connectionFigure.setSourceAnchor(new CenteredConnectionAnchor(modelGroupFigure.getIconFigure(), CenteredConnectionAnchor.RIGHT, 0, 0));
+
+    if (child instanceof ModelGroupEditPart)
+    {
+      connectionFigure.setTargetAnchor(new CenteredConnectionAnchor(((ModelGroupEditPart) child).getTargetFigure(), CenteredConnectionAnchor.LEFT, 0, 0));
+    }
+    else if (child instanceof TargetConnectionSpacingFigureEditPart)
+    {
+      TargetConnectionSpacingFigureEditPart elem = (TargetConnectionSpacingFigureEditPart) child;
+      connectionFigure.setTargetAnchor(new CenteredConnectionAnchor(elem.getFigure(), CenteredConnectionAnchor.LEFT, 0, 0));
+    }
+    else if (child instanceof ModelGroup